hisonvue 1.0.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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +248 -0
  3. package/dist/HAccordion-CPtgQUK0.js +1 -0
  4. package/dist/HAccordion-ll-4cIAw.mjs +262 -0
  5. package/dist/HBaggie-D6omQoFh.js +1 -0
  6. package/dist/HBaggie-D_7mEiuV.mjs +283 -0
  7. package/dist/HBanner-DmcMOFqS.mjs +420 -0
  8. package/dist/HBanner-Io4SdGGs.js +1 -0
  9. package/dist/HButton-DAVuDmOQ.js +1 -0
  10. package/dist/HButton-DAriO81x.mjs +256 -0
  11. package/dist/HCalendar-DKwGatUk.js +2 -0
  12. package/dist/HCalendar-w18iIB90.mjs +3387 -0
  13. package/dist/HCaption-6CbSqRA7.js +1 -0
  14. package/dist/HCaption-DwsXHDNK.mjs +275 -0
  15. package/dist/HChart-C86JXUyW.js +1 -0
  16. package/dist/HChart-CcArHFr0.mjs +179 -0
  17. package/dist/HDrawer-DG1O42iF.mjs +439 -0
  18. package/dist/HDrawer-U5VC_okK.js +1 -0
  19. package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
  20. package/dist/HDropdown-D4RAGmjE.js +1 -0
  21. package/dist/HFileset-BGuP9O4l.mjs +578 -0
  22. package/dist/HFileset-CuPR6Hwf.js +2 -0
  23. package/dist/HGap-BPAdnOQz.js +1 -0
  24. package/dist/HGap-DzGrfWVt.mjs +233 -0
  25. package/dist/HGrid-BiIhVCv_.mjs +345 -0
  26. package/dist/HGrid-C3EV_pgM.js +1 -0
  27. package/dist/HImagebox-D_DKeCrO.mjs +654 -0
  28. package/dist/HImagebox-t_UdFjQO.js +2 -0
  29. package/dist/HInput-BEyJqYkD.mjs +1103 -0
  30. package/dist/HInput-DMGLY473.js +1 -0
  31. package/dist/HInputGroup-D37WTYoI.mjs +281 -0
  32. package/dist/HInputGroup-Dcfr23sZ.js +1 -0
  33. package/dist/HLabel-B2FOqSiS.mjs +369 -0
  34. package/dist/HLabel-Dm48mSwn.js +1 -0
  35. package/dist/HLayout-BbCEm_aO.mjs +196 -0
  36. package/dist/HLayout-C1e4BZ_K.js +1 -0
  37. package/dist/HList-CAeYb-hz.mjs +419 -0
  38. package/dist/HList-eNXmMf27.js +1 -0
  39. package/dist/HModal-BDBEEpKm.mjs +778 -0
  40. package/dist/HModal-GODLq3wH.js +1 -0
  41. package/dist/HNote-CWnUjt3_.mjs +934 -0
  42. package/dist/HNote-D_Xwu9oL.js +1 -0
  43. package/dist/HPagination-Db_L9wv-.js +1 -0
  44. package/dist/HPagination-e5e2a5GS.mjs +496 -0
  45. package/dist/HParagraph-BRuSeOMU.js +1 -0
  46. package/dist/HParagraph-DYuB-qjY.mjs +463 -0
  47. package/dist/HPopup-Brp1FVpm.mjs +431 -0
  48. package/dist/HPopup-ChkoI3xm.js +1 -0
  49. package/dist/HSpinner-DDtU9PL_.js +1 -0
  50. package/dist/HSpinner-DOq2k5kT.mjs +281 -0
  51. package/dist/HTable-DGFnzD4u.js +1 -0
  52. package/dist/HTable-GCDP5O_J.mjs +620 -0
  53. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  54. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  55. package/dist/ar.es-CKau4tBl.js +5 -0
  56. package/dist/ar.es-XxSuE68c.mjs +57 -0
  57. package/dist/bg.es-BJ7fu6yy.mjs +57 -0
  58. package/dist/bg.es-Melqx1M5.js +5 -0
  59. package/dist/bn.es-CYlBkxc5.mjs +57 -0
  60. package/dist/bn.es-ClbAZ4WP.js +5 -0
  61. package/dist/bs.es-KjOcbE96.js +5 -0
  62. package/dist/bs.es-yMnaKmdi.mjs +57 -0
  63. package/dist/ca.es-BaGTENcW.js +5 -0
  64. package/dist/ca.es-DIhlxmQc.mjs +67 -0
  65. package/dist/cs.es-BN8oxRXQ.mjs +57 -0
  66. package/dist/cs.es-ChOlHqBr.js +5 -0
  67. package/dist/da.es-DJB5lAli.mjs +57 -0
  68. package/dist/da.es-DOFXbf8-.js +5 -0
  69. package/dist/de.es-DwE82Kaw.js +5 -0
  70. package/dist/de.es-glb8GeJh.mjs +57 -0
  71. package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
  72. package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
  73. package/dist/el.es-CNrCgzYI.js +5 -0
  74. package/dist/el.es-_bBZf22h.mjs +76 -0
  75. package/dist/en.es-CV9nmQGr.mjs +57 -0
  76. package/dist/en.es-CgL601qd.js +5 -0
  77. package/dist/es.es-CZjcWK54.mjs +57 -0
  78. package/dist/es.es-IdFGKY7Q.js +5 -0
  79. package/dist/et.es-BygWmV3P.js +5 -0
  80. package/dist/et.es-CjvQAzNF.mjs +57 -0
  81. package/dist/fa.es-DW_0SmsT.js +5 -0
  82. package/dist/fa.es-DykeFwDA.mjs +57 -0
  83. package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
  84. package/dist/fi.es-pgfJlZ8i.js +5 -0
  85. package/dist/fr.es-CNKVhFfO.mjs +57 -0
  86. package/dist/fr.es-OENguFuM.js +5 -0
  87. package/dist/he.es-bixEnAeH.js +5 -0
  88. package/dist/he.es-nF4GFhjH.mjs +57 -0
  89. package/dist/hisonvue.cjs.js +1 -0
  90. package/dist/hisonvue.css +1 -0
  91. package/dist/hisonvue.d.ts +19934 -0
  92. package/dist/hisonvue.es.js +114 -0
  93. package/dist/hr.es-CkRAP94O.js +5 -0
  94. package/dist/hr.es-QFfz660j.mjs +57 -0
  95. package/dist/hu.es-Ck2rE01V.mjs +57 -0
  96. package/dist/hu.es-DG6HeiQJ.js +5 -0
  97. package/dist/id.es-D4tPi6wP.js +5 -0
  98. package/dist/id.es-Je7FEUJ5.mjs +57 -0
  99. package/dist/index-BmKMHsSZ.js +153 -0
  100. package/dist/index-DUh7pai4.mjs +19976 -0
  101. package/dist/is.es-CDFqLYCV.js +5 -0
  102. package/dist/is.es-bzprHvXI.mjs +57 -0
  103. package/dist/it.es-BHgrw_C6.js +5 -0
  104. package/dist/it.es-CJtfqmNS.mjs +57 -0
  105. package/dist/ja.es-BaiGjqZ6.mjs +57 -0
  106. package/dist/ja.es-D-lxWwyb.js +5 -0
  107. package/dist/ka.es-CnnB6q4A.js +5 -0
  108. package/dist/ka.es-x9QJo_dl.mjs +57 -0
  109. package/dist/ko.es-6c447eTS.mjs +57 -0
  110. package/dist/ko.es-b18aaB3V.js +5 -0
  111. package/dist/lt.es-2twYdvmJ.mjs +57 -0
  112. package/dist/lt.es-BY9UQ6wZ.js +5 -0
  113. package/dist/mn.es-BLQRG1uu.mjs +57 -0
  114. package/dist/mn.es-YFS7gSdf.js +5 -0
  115. package/dist/nl.es-BEx-4hnj.js +5 -0
  116. package/dist/nl.es-bB1qWR_S.mjs +57 -0
  117. package/dist/no.es-BQnRWlWR.js +5 -0
  118. package/dist/no.es-CWDVXpTf.mjs +57 -0
  119. package/dist/pl.es-CKCsZ_02.js +5 -0
  120. package/dist/pl.es-Dzct23w9.mjs +57 -0
  121. package/dist/pt-br.es-BeBuiitI.mjs +57 -0
  122. package/dist/pt-br.es-oH7qh6Fd.js +5 -0
  123. package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
  124. package/dist/pt-pt.es-DLk5I0ej.js +5 -0
  125. package/dist/ro.es-DfMVJ30M.mjs +57 -0
  126. package/dist/ro.es-DgTen1Dh.js +5 -0
  127. package/dist/ru.es-Bv9UvrBe.mjs +67 -0
  128. package/dist/ru.es-jGIQfREl.js +5 -0
  129. package/dist/scrollManager-BGnq4wyt.mjs +14 -0
  130. package/dist/scrollManager-CEEWQwoK.js +1 -0
  131. package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
  132. package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
  133. package/dist/sk.es-CUOTpLuL.mjs +57 -0
  134. package/dist/sk.es-D2bhVb26.js +5 -0
  135. package/dist/sl.es-DeIGgZbR.mjs +57 -0
  136. package/dist/sl.es-TV8Uraa1.js +5 -0
  137. package/dist/sq.es-CQJJrZHv.mjs +67 -0
  138. package/dist/sq.es-Cc65zxbr.js +5 -0
  139. package/dist/sr.es-CKS0AkiW.mjs +57 -0
  140. package/dist/sr.es-D5VNA_GW.js +5 -0
  141. package/dist/sv.es-ChHQRrAe.mjs +57 -0
  142. package/dist/sv.es-dBeK_DZs.js +5 -0
  143. package/dist/tr.es-B3v90gVv.mjs +57 -0
  144. package/dist/tr.es-BUz4S13G.js +5 -0
  145. package/dist/uk.es-B8uaeLcK.js +5 -0
  146. package/dist/uk.es-CiR4NnbN.mjs +67 -0
  147. package/dist/vi.es-2OFMtbQI.js +5 -0
  148. package/dist/vi.es-DFDi5l7p.mjs +67 -0
  149. package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
  150. package/dist/zh-cn.es-fDHCbCIg.js +5 -0
  151. package/dist/zh-hk.es-COzeh5F8.js +5 -0
  152. package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
  153. package/nuxt/module.mjs +39 -0
  154. package/nuxt/plugin.mjs +21 -0
  155. package/package.json +53 -0
@@ -0,0 +1,153 @@
1
+ "use strict";var Ud=Object.defineProperty;var Gd=(t,e,n)=>e in t?Ud(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Oe=(t,e,n)=>Gd(t,typeof e!="symbol"?e+"":e,n);const ao=require("vue");var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ui={exports:{}};/*! For license information please see Hisonjs.bundle.js.LICENSE.txt */var jd=ui.exports,Ml;function Wd(){return Ml||(Ml=1,function(t,e){(function(n,o){t.exports=o()})(typeof self<"u"?self:typeof So<"u"?So:jd,()=>(()=>{var n={d:(d,y)=>{for(var M in y)n.o(y,M)&&!n.o(d,M)&&Object.defineProperty(d,M,{enumerable:!0,get:y[M]})},o:(d,y)=>Object.prototype.hasOwnProperty.call(d,y),r:d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},o={};n.r(o),n.d(o,{AllDateTimeFormat:()=>Ee,ApiDelete:()=>Se,ApiDeleteUrl:()=>ze,ApiGet:()=>Mt,ApiGetUrl:()=>Rt,ApiPatch:()=>b,ApiPatchUrl:()=>_,ApiPost:()=>x,ApiPostUrl:()=>g,ApiPut:()=>oe,ApiPutUrl:()=>de,CachingModule:()=>I,CountDateType:()=>Me,DataModel:()=>nn,DataWrapper:()=>Zt,DateFormat:()=>L,DateTimeFormat:()=>W,DayFormat:()=>re,DayOfWeekFormat:()=>fe,DayOfWeekFullName:()=>a,DayOfWeekFullNameKR:()=>m,DayOfWeekShortName:()=>c,DayOfWeekShortNameKR:()=>C,HourFormat:()=>ye,HourMinuteFormat:()=>xe,MinuteFormat:()=>ke,MonthFormat:()=>X,MonthFullName:()=>r,MonthShortName:()=>i,SecondFormat:()=>ve,TimeFormat:()=>D,YearFormat:()=>K,YearMonthFormat:()=>ee,createHison:()=>ht});var r=function(d){return d[d.January=1]="January",d[d.February=2]="February",d[d.March=3]="March",d[d.April=4]="April",d[d.May=5]="May",d[d.June=6]="June",d[d.July=7]="July",d[d.August=8]="August",d[d.September=9]="September",d[d.October=10]="October",d[d.November=11]="November",d[d.December=12]="December",d}({}),i=function(d){return d[d.Jan=1]="Jan",d[d.Feb=2]="Feb",d[d.Mar=3]="Mar",d[d.Apr=4]="Apr",d[d.May=5]="May",d[d.Jun=6]="Jun",d[d.Jul=7]="Jul",d[d.Aug=8]="Aug",d[d.Sep=9]="Sep",d[d.Oct=10]="Oct",d[d.Nov=11]="Nov",d[d.Dec=12]="Dec",d}({}),a=function(d){return d[d.Sun=0]="Sun",d[d.Mon=1]="Mon",d[d.Tue=2]="Tue",d[d.Wed=3]="Wed",d[d.Thu=4]="Thu",d[d.Fri=5]="Fri",d[d.Sat=6]="Sat",d}({}),c=function(d){return d[d.Sunday=0]="Sunday",d[d.Monday=1]="Monday",d[d.Tuesday=2]="Tuesday",d[d.Wednesday=3]="Wednesday",d[d.Thursday=4]="Thursday",d[d.Friday=5]="Friday",d[d.Saturday=6]="Saturday",d}({}),m=function(d){return d[d.일=0]="일",d[d.월=1]="월",d[d.화=2]="화",d[d.수=3]="수",d[d.목=4]="목",d[d.금=5]="금",d[d.토=6]="토",d}({}),C=function(d){return d[d.일요일=0]="일요일",d[d.월요일=1]="월요일",d[d.화요일=2]="화요일",d[d.수요일=3]="수요일",d[d.목요일=4]="목요일",d[d.금요일=5]="금요일",d[d.토요일=6]="토요일",d}({}),L=function(d){return d.yyyyMMdd="yyyyMMdd",d["yyyy-MM-dd"]="yyyy-MM-dd",d["yyyy/MM/dd"]="yyyy/MM/dd",d["yyyy. MM. dd"]="yyyy. MM. dd",d["yyyy MM dd"]="yyyy MM dd",d.MMddyyyy="MMddyyyy",d["MM-dd-yyyy"]="MM-dd-yyyy",d["MM/dd/yyyy"]="MM/dd/yyyy",d["MM. dd. yyyy"]="MM. dd. yyyy",d["MMMM dd yyyy"]="MMMM dd yyyy",d["MMMM dd, yyyy"]="MMMM dd, yyyy",d["MMM dd yyyy"]="MMM dd yyyy",d["MMM dd, yyyy"]="MMM dd, yyyy",d.ddMMyyyy="ddMMyyyy",d["dd-MM-yyyy"]="dd-MM-yyyy",d["dd/MM/yyyy"]="dd/MM/yyyy",d["dd. MM. yyyy"]="dd. MM. yyyy",d["dd MMMM yyyy"]="dd MMMM yyyy",d["dd MMM yyyy"]="dd MMM yyyy",d}({}),D=function(d){return d.hhmm="hhmm",d["hh:mm"]="hh:mm",d.HHmm="HHmm",d["HH:mm"]="HH:mm",d.hhmmss="hhmmss",d["hh:mm:ss"]="hh:mm:ss",d.HHmmss="HHmmss",d["HH:mm:ss"]="HH:mm:ss",d}({}),W=function(d){return d["yyyyMMdd hhmmss"]="yyyyMMdd hhmmss",d["yyyyMMdd hh:mm:ss"]="yyyyMMdd hh:mm:ss",d["yyyy-MM-dd hhmmss"]="yyyy-MM-dd hhmmss",d["yyyy-MM-dd hh:mm:ss"]="yyyy-MM-dd hh:mm:ss",d["yyyy/MM/dd hhmmss"]="yyyy/MM/dd hhmmss",d["yyyy/MM/dd hh:mm:ss"]="yyyy/MM/dd hh:mm:ss",d["yyyy. MM. dd hhmmss"]="yyyy. MM. dd hhmmss",d["yyyy. MM. dd hh:mm:ss"]="yyyy. MM. dd hh:mm:ss",d["yyyy MM dd hhmmss"]="yyyy MM dd hhmmss",d["yyyy MM dd hh:mm:ss"]="yyyy MM dd hh:mm:ss",d["MMddyyyy hhmmss"]="MMddyyyy hhmmss",d["MMddyyyy hh:mm:ss"]="MMddyyyy hh:mm:ss",d["MM-dd-yyyy hhmmss"]="MM-dd-yyyy hhmmss",d["MM-dd-yyyy hh:mm:ss"]="MM-dd-yyyy hh:mm:ss",d["MM/dd/yyyy hhmmss"]="MM/dd/yyyy hhmmss",d["MM/dd/yyyy hh:mm:ss"]="MM/dd/yyyy hh:mm:ss",d["MM. dd. yyyy hhmmss"]="MM. dd. yyyy hhmmss",d["MM. dd. yyyy hh:mm:ss"]="MM. dd. yyyy hh:mm:ss",d["MMMM dd yyyy hhmmss"]="MMMM dd yyyy hhmmss",d["MMMM dd yyyy hh:mm:ss"]="MMMM dd yyyy hh:mm:ss",d["MMMM dd, yyyy hhmmss"]="MMMM dd, yyyy hhmmss",d["MMMM dd, yyyy hh:mm:ss"]="MMMM dd, yyyy hh:mm:ss",d["MMM dd yyyy hhmmss"]="MMM dd yyyy hhmmss",d["MMM dd yyyy hh:mm:ss"]="MMM dd yyyy hh:mm:ss",d["MMM dd, yyyy hhmmss"]="MMM dd, yyyy hhmmss",d["MMM dd, yyyy hh:mm:ss"]="MMM dd, yyyy hh:mm:ss",d["ddMMyyyy hhmmss"]="ddMMyyyy hhmmss",d["ddMMyyyy hh:mm:ss"]="ddMMyyyy hh:mm:ss",d["dd-MM-yyyy hhmmss"]="dd-MM-yyyy hhmmss",d["dd-MM-yyyy hh:mm:ss"]="dd-MM-yyyy hh:mm:ss",d["dd/MM/yyyy hhmmss"]="dd/MM/yyyy hhmmss",d["dd/MM/yyyy hh:mm:ss"]="dd/MM/yyyy hh:mm:ss",d["dd. MM. yyyy hhmmss"]="dd. MM. yyyy hhmmss",d["dd. MM. yyyy hh:mm:ss"]="dd. MM. yyyy hh:mm:ss",d["dd MMMM yyyy hhmmss"]="dd MMMM yyyy hhmmss",d["dd MMMM yyyy hh:mm:ss"]="dd MMMM yyyy hh:mm:ss",d["dd MMM yyyy hhmmss"]="dd MMM yyyy hhmmss",d["dd MMM yyyy hh:mm:ss"]="dd MMM yyyy hh:mm:ss",d["yyyyMMdd HHmmss"]="yyyyMMdd HHmmss",d["yyyyMMdd HH:mm:ss"]="yyyyMMdd HH:mm:ss",d["yyyy-MM-dd HHmmss"]="yyyy-MM-dd HHmmss",d["yyyy-MM-dd HH:mm:ss"]="yyyy-MM-dd HH:mm:ss",d["yyyy/MM/dd HHmmss"]="yyyy/MM/dd HHmmss",d["yyyy/MM/dd HH:mm:ss"]="yyyy/MM/dd HH:mm:ss",d["yyyy. MM. dd HHmmss"]="yyyy. MM. dd HHmmss",d["yyyy. MM. dd HH:mm:ss"]="yyyy. MM. dd HH:mm:ss",d["yyyy MM dd HHmmss"]="yyyy MM dd HHmmss",d["yyyy MM dd HH:mm:ss"]="yyyy MM dd HH:mm:ss",d["MMddyyyy HHmmss"]="MMddyyyy HHmmss",d["MMddyyyy HH:mm:ss"]="MMddyyyy HH:mm:ss",d["MM-dd-yyyy HHmmss"]="MM-dd-yyyy HHmmss",d["MM-dd-yyyy HH:mm:ss"]="MM-dd-yyyy HH:mm:ss",d["MM/dd/yyyy HHmmss"]="MM/dd/yyyy HHmmss",d["MM/dd/yyyy HH:mm:ss"]="MM/dd/yyyy HH:mm:ss",d["MM. dd. yyyy HHmmss"]="MM. dd. yyyy HHmmss",d["MM. dd. yyyy HH:mm:ss"]="MM. dd. yyyy HH:mm:ss",d["MMMM dd yyyy HHmmss"]="MMMM dd yyyy HHmmss",d["MMMM dd yyyy HH:mm:ss"]="MMMM dd yyyy HH:mm:ss",d["MMMM dd, yyyy HHmmss"]="MMMM dd, yyyy HHmmss",d["MMMM dd, yyyy HH:mm:ss"]="MMMM dd, yyyy HH:mm:ss",d["MMM dd yyyy HHmmss"]="MMM dd yyyy HHmmss",d["MMM dd yyyy HH:mm:ss"]="MMM dd yyyy HH:mm:ss",d["MMM dd, yyyy HHmmss"]="MMM dd, yyyy HHmmss",d["MMM dd, yyyy HH:mm:ss"]="MMM dd, yyyy HH:mm:ss",d["ddMMyyyy HHmmss"]="ddMMyyyy HHmmss",d["ddMMyyyy HH:mm:ss"]="ddMMyyyy HH:mm:ss",d["dd-MM-yyyy HHmmss"]="dd-MM-yyyy HHmmss",d["dd-MM-yyyy HH:mm:ss"]="dd-MM-yyyy HH:mm:ss",d["dd/MM/yyyy HHmmss"]="dd/MM/yyyy HHmmss",d["dd/MM/yyyy HH:mm:ss"]="dd/MM/yyyy HH:mm:ss",d["dd. MM. yyyy HHmmss"]="dd. MM. yyyy HHmmss",d["dd. MM. yyyy HH:mm:ss"]="dd. MM. yyyy HH:mm:ss",d["dd MMMM yyyy HHmmss"]="dd MMMM yyyy HHmmss",d["dd MMMM yyyy HH:mm:ss"]="dd MMMM yyyy HH:mm:ss",d["dd MMM yyyy HHmmss"]="dd MMM yyyy HHmmss",d["dd MMM yyyy HH:mm:ss"]="dd MMM yyyy HH:mm:ss",d}({}),K=function(d){return d.yyyy="yyyy",d.yy="yy",d}({}),X=function(d){return d.M="M",d.MM="MM",d.MMM="MMM",d.MMMM="MMMM",d}({}),ee=function(d){return d.yyyyMM="yyyyMM",d["yyyy-MM"]="yyyy-MM",d["yyyy/MM"]="yyyy/MM",d["yyyy. MM"]="yyyy. MM",d["yyyy MM"]="yyyy MM",d.MMyyyy="MMyyyy",d["MM-yyyy"]="MM-yyyy",d["MM/yyyy"]="MM/yyyy",d["MM. yyyy"]="MM. yyyy",d["MM yyyy"]="MM yyyy",d["MMMM yyyy"]="MMMM yyyy",d["MMMM, yyyy"]="MMMM, yyyy",d["MMM yyyy"]="MMM yyyy",d["MMM, yyyy"]="MMM, yyyy",d}({}),re=function(d){return d.dd="dd",d.d="d",d}({}),fe=function(d){return d.d="d",d.dy="dy",d.day="day",d.kdy="kdy",d.kday="kday",d}({}),ye=function(d){return d.hh="hh",d.h="h",d}({}),xe=function(d){return d["hh:mm"]="hh:mm",d.hhmm="hhmm",d}({}),ke=function(d){return d.mm="mm",d.m="m",d}({}),ve=function(d){return d.ss="ss",d.s="s",d}({}),Ee=function(d){return d.hhmm="hhmm",d["hh:mm"]="hh:mm",d.HHmm="HHmm",d["HH:mm"]="HH:mm",d.hhmmss="hhmmss",d["hh:mm:ss"]="hh:mm:ss",d.HHmmss="HHmmss",d["HH:mm:ss"]="HH:mm:ss",d.yyyy="yyyy",d.yyyyMM="yyyyMM",d["yyyy-MM"]="yyyy-MM",d["yyyy/MM"]="yyyy/MM",d["yyyy. MM"]="yyyy. MM",d["yyyy MM"]="yyyy MM",d.yyyyMMdd="yyyyMMdd",d["yyyy-MM-dd"]="yyyy-MM-dd",d["yyyy/MM/dd"]="yyyy/MM/dd",d["yyyy. MM. dd"]="yyyy. MM. dd",d["yyyy MM dd"]="yyyy MM dd",d["yyyyMMdd hh"]="yyyyMMdd hh",d["yyyyMMdd hhmm"]="yyyyMMdd hhmm",d["yyyyMMdd hhmmss"]="yyyyMMdd hhmmss",d["yyyyMMdd hh:mm"]="yyyyMMdd hh:mm",d["yyyyMMdd hh:mm:ss"]="yyyyMMdd hh:mm:ss",d["yyyy-MM-dd hh"]="yyyy-MM-dd hh",d["yyyy-MM-dd hhmm"]="yyyy-MM-dd hhmm",d["yyyy-MM-dd hhmmss"]="yyyy-MM-dd hhmmss",d["yyyy-MM-dd hh:mm"]="yyyy-MM-dd hh:mm",d["yyyy-MM-dd hh:mm:ss"]="yyyy-MM-dd hh:mm:ss",d["yyyy/MM/dd hh"]="yyyy/MM/dd hh",d["yyyy/MM/dd hhmm"]="yyyy/MM/dd hhmm",d["yyyy/MM/dd hhmmss"]="yyyy/MM/dd hhmmss",d["yyyy/MM/dd hh:mm"]="yyyy/MM/dd hh:mm",d["yyyy/MM/dd hh:mm:ss"]="yyyy/MM/dd hh:mm:ss",d["yyyy. MM. dd hh"]="yyyy. MM. dd hh",d["yyyy. MM. dd hhmm"]="yyyy. MM. dd hhmm",d["yyyy. MM. dd hhmmss"]="yyyy. MM. dd hhmmss",d["yyyy. MM. dd hh:mm"]="yyyy. MM. dd hh:mm",d["yyyy. MM. dd hh:mm:ss"]="yyyy. MM. dd hh:mm:ss",d["yyyy MM dd hh"]="yyyy MM dd hh",d["yyyy MM dd hhmm"]="yyyy MM dd hhmm",d["yyyy MM dd hhmmss"]="yyyy MM dd hhmmss",d["yyyy MM dd hh:mm"]="yyyy MM dd hh:mm",d["yyyy MM dd hh:mm:ss"]="yyyy MM dd hh:mm:ss",d["yyyyMMdd HH"]="yyyyMMdd HH",d["yyyyMMdd HHmm"]="yyyyMMdd HHmm",d["yyyyMMdd HHmmss"]="yyyyMMdd HHmmss",d["yyyyMMdd HH:mm"]="yyyyMMdd HH:mm",d["yyyyMMdd HH:mm:ss"]="yyyyMMdd HH:mm:ss",d["yyyy-MM-dd HH"]="yyyy-MM-dd HH",d["yyyy-MM-dd HHmm"]="yyyy-MM-dd HHmm",d["yyyy-MM-dd HHmmss"]="yyyy-MM-dd HHmmss",d["yyyy-MM-dd HH:mm"]="yyyy-MM-dd HH:mm",d["yyyy-MM-dd HH:mm:ss"]="yyyy-MM-dd HH:mm:ss",d["yyyy/MM/dd HH"]="yyyy/MM/dd HH",d["yyyy/MM/dd HHmm"]="yyyy/MM/dd HHmm",d["yyyy/MM/dd HHmmss"]="yyyy/MM/dd HHmmss",d["yyyy/MM/dd HH:mm"]="yyyy/MM/dd HH:mm",d["yyyy/MM/dd HH:mm:ss"]="yyyy/MM/dd HH:mm:ss",d["yyyy. MM. dd HH"]="yyyy. MM. dd HH",d["yyyy. MM. dd HHmm"]="yyyy. MM. dd HHmm",d["yyyy. MM. dd HHmmss"]="yyyy. MM. dd HHmmss",d["yyyy. MM. dd HH:mm"]="yyyy. MM. dd HH:mm",d["yyyy. MM. dd HH:mm:ss"]="yyyy. MM. dd HH:mm:ss",d["yyyy MM dd HH"]="yyyy MM dd HH",d["yyyy MM dd HHmm"]="yyyy MM dd HHmm",d["yyyy MM dd HHmmss"]="yyyy MM dd HHmmss",d["yyyy MM dd HH:mm"]="yyyy MM dd HH:mm",d["yyyy MM dd HH:mm:ss"]="yyyy MM dd HH:mm:ss",d.MMyyyy="MMyyyy",d["MM-yyyy"]="MM-yyyy",d["MM/yyyy"]="MM/yyyy",d["MM. yyyy"]="MM. yyyy",d["MM yyyy"]="MM yyyy",d["MMMM yyyy"]="MMMM yyyy",d["MMMM, yyyy"]="MMMM, yyyy",d["MMM yyyy"]="MMM yyyy",d["MMM, yyyy"]="MMM, yyyy",d.MMddyyyy="MMddyyyy",d["MM-dd-yyyy"]="MM-dd-yyyy",d["MM/dd/yyyy"]="MM/dd/yyyy",d["MM. dd. yyyy"]="MM. dd. yyyy",d["MMMM dd yyyy"]="MMMM dd yyyy",d["MMMM dd, yyyy"]="MMMM dd, yyyy",d["MMM dd yyyy"]="MMM dd yyyy",d["MMM dd, yyyy"]="MMM dd, yyyy",d["MMddyyyy hh"]="MMddyyyy hh",d["MMddyyyy hhmm"]="MMddyyyy hhmm",d["MMddyyyy hhmmss"]="MMddyyyy hhmmss",d["MMddyyyy hh:mm"]="MMddyyyy hh:mm",d["MMddyyyy hh:mm:ss"]="MMddyyyy hh:mm:ss",d["MM-dd-yyyy hh"]="MM-dd-yyyy hh",d["MM-dd-yyyy hhmm"]="MM-dd-yyyy hhmm",d["MM-dd-yyyy hhmmss"]="MM-dd-yyyy hhmmss",d["MM-dd-yyyy hh:mm"]="MM-dd-yyyy hh:mm",d["MM-dd-yyyy hh:mm:ss"]="MM-dd-yyyy hh:mm:ss",d["MM/dd/yyyy hh"]="MM/dd/yyyy hh",d["MM/dd/yyyy hhmm"]="MM/dd/yyyy hhmm",d["MM/dd/yyyy hhmmss"]="MM/dd/yyyy hhmmss",d["MM/dd/yyyy hh:mm"]="MM/dd/yyyy hh:mm",d["MM/dd/yyyy hh:mm:ss"]="MM/dd/yyyy hh:mm:ss",d["MM. dd. yyyy hh"]="MM. dd. yyyy hh",d["MM. dd. yyyy hhmm"]="MM. dd. yyyy hhmm",d["MM. dd. yyyy hhmmss"]="MM. dd. yyyy hhmmss",d["MM. dd. yyyy hh:mm"]="MM. dd. yyyy hh:mm",d["MM. dd. yyyy hh:mm:ss"]="MM. dd. yyyy hh:mm:ss",d["MMMM dd yyyy hh"]="MMMM dd yyyy hh",d["MMMM dd yyyy hhmm"]="MMMM dd yyyy hhmm",d["MMMM dd yyyy hhmmss"]="MMMM dd yyyy hhmmss",d["MMMM dd yyyy hh:mm"]="MMMM dd yyyy hh:mm",d["MMMM dd yyyy hh:mm:ss"]="MMMM dd yyyy hh:mm:ss",d["MMMM dd, yyyy hh"]="MMMM dd, yyyy hh",d["MMMM dd, yyyy hhmm"]="MMMM dd, yyyy hhmm",d["MMMM dd, yyyy hhmmss"]="MMMM dd, yyyy hhmmss",d["MMMM dd, yyyy hh:mm"]="MMMM dd, yyyy hh:mm",d["MMMM dd, yyyy hh:mm:ss"]="MMMM dd, yyyy hh:mm:ss",d["MMM dd yyyy hh"]="MMM dd yyyy hh",d["MMM dd yyyy hhmm"]="MMM dd yyyy hhmm",d["MMM dd yyyy hhmmss"]="MMM dd yyyy hhmmss",d["MMM dd yyyy hh:mm"]="MMM dd yyyy hh:mm",d["MMM dd yyyy hh:mm:ss"]="MMM dd yyyy hh:mm:ss",d["MMM dd, yyyy hh"]="MMM dd, yyyy hh",d["MMM dd, yyyy hhmm"]="MMM dd, yyyy hhmm",d["MMM dd, yyyy hhmmss"]="MMM dd, yyyy hhmmss",d["MMM dd, yyyy hh:mm"]="MMM dd, yyyy hh:mm",d["MMM dd, yyyy hh:mm:ss"]="MMM dd, yyyy hh:mm:ss",d["MMddyyyy HH"]="MMddyyyy HH",d["MMddyyyy HHmm"]="MMddyyyy HHmm",d["MMddyyyy HHmmss"]="MMddyyyy HHmmss",d["MMddyyyy HH:mm"]="MMddyyyy HH:mm",d["MMddyyyy HH:mm:ss"]="MMddyyyy HH:mm:ss",d["MM-dd-yyyy HH"]="MM-dd-yyyy HH",d["MM-dd-yyyy HHmm"]="MM-dd-yyyy HHmm",d["MM-dd-yyyy HHmmss"]="MM-dd-yyyy HHmmss",d["MM-dd-yyyy HH:mm"]="MM-dd-yyyy HH:mm",d["MM-dd-yyyy HH:mm:ss"]="MM-dd-yyyy HH:mm:ss",d["MM/dd/yyyy HH"]="MM/dd/yyyy HH",d["MM/dd/yyyy HHmm"]="MM/dd/yyyy HHmm",d["MM/dd/yyyy HHmmss"]="MM/dd/yyyy HHmmss",d["MM/dd/yyyy HH:mm"]="MM/dd/yyyy HH:mm",d["MM/dd/yyyy HH:mm:ss"]="MM/dd/yyyy HH:mm:ss",d["MM. dd. yyyy HH"]="MM. dd. yyyy HH",d["MM. dd. yyyy HHmm"]="MM. dd. yyyy HHmm",d["MM. dd. yyyy HHmmss"]="MM. dd. yyyy HHmmss",d["MM. dd. yyyy HH:mm"]="MM. dd. yyyy HH:mm",d["MM. dd. yyyy HH:mm:ss"]="MM. dd. yyyy HH:mm:ss",d["MMMM dd yyyy HH"]="MMMM dd yyyy HH",d["MMMM dd yyyy HHmm"]="MMMM dd yyyy HHmm",d["MMMM dd yyyy HHmmss"]="MMMM dd yyyy HHmmss",d["MMMM dd yyyy HH:mm"]="MMMM dd yyyy HH:mm",d["MMMM dd yyyy HH:mm:ss"]="MMMM dd yyyy HH:mm:ss",d["MMMM dd, yyyy HH"]="MMMM dd, yyyy HH",d["MMMM dd, yyyy HHmm"]="MMMM dd, yyyy HHmm",d["MMMM dd, yyyy HHmmss"]="MMMM dd, yyyy HHmmss",d["MMMM dd, yyyy HH:mm"]="MMMM dd, yyyy HH:mm",d["MMMM dd, yyyy HH:mm:ss"]="MMMM dd, yyyy HH:mm:ss",d["MMM dd yyyy HH"]="MMM dd yyyy HH",d["MMM dd yyyy HHmm"]="MMM dd yyyy HHmm",d["MMM dd yyyy HHmmss"]="MMM dd yyyy HHmmss",d["MMM dd yyyy HH:mm"]="MMM dd yyyy HH:mm",d["MMM dd yyyy HH:mm:ss"]="MMM dd yyyy HH:mm:ss",d["MMM dd, yyyy HH"]="MMM dd, yyyy HH",d["MMM dd, yyyy HHmm"]="MMM dd, yyyy HHmm",d["MMM dd, yyyy HHmmss"]="MMM dd, yyyy HHmmss",d["MMM dd, yyyy HH:mm"]="MMM dd, yyyy HH:mm",d["MMM dd, yyyy HH:mm:ss"]="MMM dd, yyyy HH:mm:ss",d.ddMMyyyy="ddMMyyyy",d["dd-MM-yyyy"]="dd-MM-yyyy",d["dd/MM/yyyy"]="dd/MM/yyyy",d["dd. MM. yyyy"]="dd. MM. yyyy",d["dd MMMM yyyy"]="dd MMMM yyyy",d["dd MMM yyyy"]="dd MMM yyyy",d["ddMMyyyy hh"]="ddMMyyyy hh",d["ddMMyyyy hhmm"]="ddMMyyyy hhmm",d["ddMMyyyy hhmmss"]="ddMMyyyy hhmmss",d["ddMMyyyy hh:mm"]="ddMMyyyy hh:mm",d["ddMMyyyy hh:mm:ss"]="ddMMyyyy hh:mm:ss",d["dd-MM-yyyy hh"]="dd-MM-yyyy hh",d["dd-MM-yyyy hhmm"]="dd-MM-yyyy hhmm",d["dd-MM-yyyy hhmmss"]="dd-MM-yyyy hhmmss",d["dd-MM-yyyy hh:mm"]="dd-MM-yyyy hh:mm",d["dd-MM-yyyy hh:mm:ss"]="dd-MM-yyyy hh:mm:ss",d["dd/MM/yyyy hh"]="dd/MM/yyyy hh",d["dd/MM/yyyy hhmm"]="dd/MM/yyyy hhmm",d["dd/MM/yyyy hhmmss"]="dd/MM/yyyy hhmmss",d["dd/MM/yyyy hh:mm"]="dd/MM/yyyy hh:mm",d["dd/MM/yyyy hh:mm:ss"]="dd/MM/yyyy hh:mm:ss",d["dd. MM. yyyy hh"]="dd. MM. yyyy hh",d["dd. MM. yyyy hhmm"]="dd. MM. yyyy hhmm",d["dd. MM. yyyy hhmmss"]="dd. MM. yyyy hhmmss",d["dd. MM. yyyy hh:mm"]="dd. MM. yyyy hh:mm",d["dd. MM. yyyy hh:mm:ss"]="dd. MM. yyyy hh:mm:ss",d["dd MMMM yyyy hh"]="dd MMMM yyyy hh",d["dd MMMM yyyy hhmm"]="dd MMMM yyyy hhmm",d["dd MMMM yyyy hhmmss"]="dd MMMM yyyy hhmmss",d["dd MMMM yyyy hh:mm"]="dd MMMM yyyy hh:mm",d["dd MMMM yyyy hh:mm:ss"]="dd MMMM yyyy hh:mm:ss",d["dd MMM yyyy hh"]="dd MMM yyyy hh",d["dd MMM yyyy hhmm"]="dd MMM yyyy hhmm",d["dd MMM yyyy hhmmss"]="dd MMM yyyy hhmmss",d["dd MMM yyyy hh:mm"]="dd MMM yyyy hh:mm",d["dd MMM yyyy hh:mm:ss"]="dd MMM yyyy hh:mm:ss",d["ddMMyyyy HH"]="ddMMyyyy HH",d["ddMMyyyy HHmm"]="ddMMyyyy HHmm",d["ddMMyyyy HHmmss"]="ddMMyyyy HHmmss",d["ddMMyyyy HH:mm"]="ddMMyyyy HH:mm",d["ddMMyyyy HH:mm:ss"]="ddMMyyyy HH:mm:ss",d["dd-MM-yyyy HH"]="dd-MM-yyyy HH",d["dd-MM-yyyy HHmm"]="dd-MM-yyyy HHmm",d["dd-MM-yyyy HHmmss"]="dd-MM-yyyy HHmmss",d["dd-MM-yyyy HH:mm"]="dd-MM-yyyy HH:mm",d["dd-MM-yyyy HH:mm:ss"]="dd-MM-yyyy HH:mm:ss",d["dd/MM/yyyy HH"]="dd/MM/yyyy HH",d["dd/MM/yyyy HHmm"]="dd/MM/yyyy HHmm",d["dd/MM/yyyy HHmmss"]="dd/MM/yyyy HHmmss",d["dd/MM/yyyy HH:mm"]="dd/MM/yyyy HH:mm",d["dd/MM/yyyy HH:mm:ss"]="dd/MM/yyyy HH:mm:ss",d["dd. MM. yyyy HH"]="dd. MM. yyyy HH",d["dd. MM. yyyy HHmm"]="dd. MM. yyyy HHmm",d["dd. MM. yyyy HHmmss"]="dd. MM. yyyy HHmmss",d["dd. MM. yyyy HH:mm"]="dd. MM. yyyy HH:mm",d["dd. MM. yyyy HH:mm:ss"]="dd. MM. yyyy HH:mm:ss",d["dd MMMM yyyy HH"]="dd MMMM yyyy HH",d["dd MMMM yyyy HHmm"]="dd MMMM yyyy HHmm",d["dd MMMM yyyy HHmmss"]="dd MMMM yyyy HHmmss",d["dd MMMM yyyy HH:mm"]="dd MMMM yyyy HH:mm",d["dd MMMM yyyy HH:mm:ss"]="dd MMMM yyyy HH:mm:ss",d["dd MMM yyyy HH"]="dd MMM yyyy HH",d["dd MMM yyyy HHmm"]="dd MMM yyyy HHmm",d["dd MMM yyyy HHmmss"]="dd MMM yyyy HHmmss",d["dd MMM yyyy HH:mm"]="dd MMM yyyy HH:mm",d["dd MMM yyyy HH:mm:ss"]="dd MMM yyyy HH:mm:ss",d}({}),Me=function(d){return d.y="y",d.M="M",d.d="d",d.h="h",d.m="m",d.s="s",d}({}),Ie={dateFormat:L["yyyy-MM-dd"],timeFormat:D["HH:mm:ss"],datetimeFormat:W["yyyy-MM-dd HH:mm:ss"],yearFormat:K.yyyy,monthFormat:X.M,yearMonthFormat:ee["yyyy-MM"],dayFormat:re.d,dayOfWeekFormat:fe.d,hourFormat:ye.h,hourMinuteFormat:xe["hh:mm"],minuteFormat:ke.m,secondFormat:ve.s,numberFormat:"#,##0.##",LESSOREQ_0X7FF_BYTE:2,LESSOREQ_0XFFFF_BYTE:3,GREATER_0XFFFF_BYTE:4},Te={shieldURL:"",exposeIpList:["0:0:0:0:0:0:0:1"],isFreeze:!0,isPossibleGoBack:!1,isPossibleOpenDevTool:!1,doDetectDevTool:function(){}},We={convertValue:function(d){return d}},nt={protocol:"http://",domain:"localhost:8080",controllerPath:"/hison-api-link",timeout:1e4,webSocketProtocol:"ws://",webSocketEndPoint:"/hison-websocket-endpoint",cachingLimit:10,beforeGetRequest:function(d,y){return!0},beforePostRequest:function(d,y){return!0},beforePutRequest:function(d,y){return!0},beforePatchRequest:function(d,y){return!0},beforeDeleteRequest:function(d,y){return!0},afterGetRequest:function(d){return!0},afterPostRequest:function(d){return!0},afterPutRequest:function(d){return!0},afterPatchRequest:function(d){return!0},afterDeleteRequest:function(d){return!0},beforeGetUrlRequest:function(d,y){return!0},beforePostUrlRequest:function(d,y,M){return!0},beforePutUrlRequest:function(d,y,M){return!0},beforePatchUrlRequest:function(d,y,M){return!0},beforeDeleteUrlRequest:function(d,y,M){return!0},afterGetUrlRequest:function(d){return!0},afterPostUrlRequest:function(d){return!0},afterPutUrlRequest:function(d){return!0},afterPatchUrlRequest:function(d){return!0},afterDeleteUrlRequest:function(d){return!0},interceptApiResult:function(d,y){return!0},interceptApiError:function(d){return!0}};function Pe(d){return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},Pe(d)}function ot(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function mt(d,y,M){return(y=Qe(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function Qe(d){var y=function(M){if(Pe(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(Pe(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return Pe(y)=="symbol"?y:y+""}var ut=ot(function d(){(function(y,M){if(!(y instanceof M))throw new TypeError("Cannot call a class as a function")})(this,d),mt(this,"utils",Ie),mt(this,"shield",Te),mt(this,"data",We),mt(this,"link",nt)});function Ye(d,y){var M=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!M){if(Array.isArray(d)||(M=function(V,Z){if(V){if(typeof V=="string")return Je(V,Z);var ne={}.toString.call(V).slice(8,-1);return ne==="Object"&&V.constructor&&(ne=V.constructor.name),ne==="Map"||ne==="Set"?Array.from(V):ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne)?Je(V,Z):void 0}}(d))||y){M&&(d=M);var S=0,N=function(){};return{s:N,n:function(){return S>=d.length?{done:!0}:{done:!1,value:d[S++]}},e:function(V){throw V},f:N}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var O,T=!0,G=!1;return{s:function(){M=M.call(d)},n:function(){var V=M.next();return T=V.done,V},e:function(V){G=!0,O=V},f:function(){try{T||M.return==null||M.return()}finally{if(G)throw O}}}}function Je(d,y){(y==null||y>d.length)&&(y=d.length);for(var M=0,S=Array(y);M<y;M++)S[M]=d[M];return S}function dt(d){return dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},dt(d)}function Dt(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function Re(d,y,M){return(y=ft(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function ft(d){var y=function(M){if(dt(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(dt(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return dt(y)=="symbol"?y:y+""}var nn=Dt(function d(y){var M=this;(function(S,N){if(!(S instanceof N))throw new TypeError("Cannot call a class as a function")})(this,d),Re(this,"_cols",[]),Re(this,"_rows",[]),Re(this,"_isDataModel",!0),Re(this,"_deepCopy",function(S,N){if(S===null||dt(S)!=="object")return S;if(S.constructor!==Object&&S.constructor!==Array){var O=ae.data.convertValue(S);return O!==void 0?O:S}N||(N=[]);for(var T=0;T<N.length;T++)if(N[T].source===S)return N[T].copy;var G;if(Array.isArray(S)){G=[],N.push({source:S,copy:G});for(var V=0;V<S.length;V++)G[V]=M._deepCopy(S[V],N)}else for(var Z in G={},N.push({source:S,copy:G}),S)S.hasOwnProperty(Z)&&(G[Z]=M._deepCopy(S[Z],N));return G}),Re(this,"_isPositiveIntegerIncludingZero",function(S){if(typeof S!="number"&&typeof S!="string"&&typeof S!="bigint")return!1;S=String(S);var N=parseInt(S,10);return!(N!==parseFloat(S)||isNaN(N)||N<0)}),Re(this,"_getValidRowIndex",function(S){if(!M._isPositiveIntegerIncludingZero(S))throw new Error("Invalid number type. It should be a number or a string that can be converted to a number.");var N=Number(S);if(N<0||N>=M._rows.length)throw new Error(`Invalid rowIndex value. It should be within the range of the rows.
3
+ range: between 0 and `.concat(M._rows.length-1,`
4
+ insert rowIndex : `).concat(N));return N}),Re(this,"_isConvertibleString",function(S){if(S===void 0)throw new Error("You can not put a value of undefined type.");return S===null||["string","number","boolean","bigint","symbol"].indexOf(dt(S))>=0}),Re(this,"_hasColumn",function(S){return M._cols.indexOf(S)>=0}),Re(this,"_checkColumn",function(S){if(!M._hasColumn(S))throw new Error("The column does not exist. column : "+S)}),Re(this,"_checkValidFunction",function(S){if(!S||typeof S!="function")throw new Error("Please insert the valid function.")}),Re(this,"_checkBoolean",function(S){if(typeof S!="boolean")throw new Error("Please pass an boolean as a parameter.")}),Re(this,"_checkOriginObject",function(S){if(S.constructor!==Object)throw new Error("Please pass an object with its own key-value pairs as a parameter.")}),Re(this,"_checkArray",function(S){if(S.constructor!==Array)throw new Error("Please pass an array.")}),Re(this,"_getColumnType",function(S,N){if(S===0)return"null";for(var O=S-1;O>=0;O--)if(M._rows[O][N])return dt(M._rows[O][N])==="object"?M._rows[O][N].constructor:dt(M._rows[O][N]);return"null"}),Re(this,"_makeValue",function(S){var N=S;if(dt(S)==="object"){if(S&&S.getIsDataWrapper&&S.getIsDataWrapper()||S&&S.getIsDataModel&&S.getIsDataModel())throw new Error("You cannot insert a datawrapper or datamodel within a datamodel.");N=M._deepCopy(S)}return N}),Re(this,"_getValidColValue",function(S){if(S=M._makeValue(S),!M._isConvertibleString(S))throw new Error("Only strings can be inserted into columns.");if(!S)throw new Error("Column cannot be null.");return S}),Re(this,"_getValidRowValue",function(S,N,O){O=M._makeValue(O);var T=M._getColumnType(S,N);if(T!=="null"&&O!==null){if(dt(O)==="object"){if(O.constructor!==T)throw new Error("Data of the same type must be inserted into the same column. column : "+N)}else if(dt(O)!=="object"&&dt(O)!==T)throw new Error("Data of the same type must be inserted into the same column. column : "+N)}return O}),Re(this,"_addCol",function(S){if(S=M._getValidColValue(S),M._cols.indexOf(S)!==-1)throw new Error("There are duplicate columns to add. column : "+S);M._cols.push(S)}),Re(this,"_addRow",function(S,N){if(!N)throw new Error("Please insert vaild object");if(N.constructor!==Object)throw new Error("Please insert object with their own key-value pairs.");if(Object.keys(N).length!==0){if(M._cols.length===0)for(var O in N)M._addCol(O);var T,G={},V=Ye(M._cols);try{for(V.s();!(T=V.n()).done;){var Z=T.value;N.hasOwnProperty(Z)?G[Z]=M._getValidRowValue(S,Z,N[Z]):G[Z]=null}}catch(ne){V.e(ne)}finally{V.f()}M._rows.push(G)}}),Re(this,"_put",function(S){var N=M._rows.length;if(!Array.isArray(S)){if(dt(S)==="object"){if(S&&S.getIsDataWrapper&&S.getIsDataWrapper())throw new Error("You cannot construct a datamodel with datawrapper.");if(S&&S.getIsDataModel&&S.getIsDataModel()){var O,T=Ye(S.getRows());try{for(T.s();!(O=T.n()).done;){var G=O.value;M._addRow(N,G),N++}}catch(_t){T.e(_t)}finally{T.f()}return}if(S.constructor===Object)return void M._addRow(N,S)}throw new Error("Please insert array contains objects with their own key-value pairs, array contains strings or only object of key-value pairs.")}if(S.length!==0)if(M._isConvertibleString(S[0])){var V,Z=Ye(S);try{for(Z.s();!(V=Z.n()).done;){var ne=V.value;M._addCol(ne)}}catch(_t){Z.e(_t)}finally{Z.f()}}else{var Y,le=Ye(S);try{for(le.s();!(Y=le.n()).done;){var qe=Y.value;M._addRow(N,qe),N++}}catch(_t){le.e(_t)}finally{le.f()}}}),Re(this,"_getNullColumnFirstRowIndex",function(S){S=M._getValidColValue(S),M._checkColumn(S);for(var N=0;N<M._rows.length;N++)if(M._rows[N][S]===null)return N;return-1}),Re(this,"_getDuplColumnFirstRowIndex",function(S){S=M._getValidColValue(S),M._checkColumn(S);for(var N=[],O=0;O<M._rows.length;O++){if(N.includes(JSON.stringify(M._rows[O][S])))return O;M._rows[O][S]!==null&&N.push(JSON.stringify(M._rows[O][S]))}return-1}),Re(this,"_getInValidColumnFirstRowIndex",function(S,N){M._checkValidFunction(N),S=M._getValidColValue(S),M._checkColumn(S);for(var O=0;O<M._rows.length;O++)if(!N(M._rows[O][S]))return O;return-1}),Re(this,"getIsDataModel",function(){return M._isDataModel}),Re(this,"clone",function(){return new te.data.DataModel(M._rows)}),Re(this,"clear",function(){return M._cols=[],M._rows=[],M}),Re(this,"getSerialized",function(){return JSON.stringify(M._rows)}),Re(this,"isDeclare",function(){return M._cols.length>0}),Re(this,"getColumns",function(){return M._deepCopy(M._cols)}),Re(this,"getColumnValues",function(S){S=M._getValidColValue(S),M._checkColumn(S);var N,O=[],T=Ye(M._rows);try{for(T.s();!(N=T.n()).done;){var G=N.value;O.push(M._deepCopy(G[S]))}}catch(V){T.e(V)}finally{T.f()}return O}),Re(this,"addColumn",function(S){M._addCol(S);var N,O=Ye(M._rows);try{for(O.s();!(N=O.n()).done;){var T=N.value;T.hasOwnProperty(S)||(T[S]=null)}}catch(G){O.e(G)}finally{O.f()}return M}),Re(this,"addColumns",function(S){if(!Array.isArray(S))throw new Error("Only array contains strings can be inserted into columns.");var N,O=Ye(S);try{for(O.s();!(N=O.n()).done;){var T=N.value;M._addCol(T);var G,V=Ye(M._rows);try{for(V.s();!(G=V.n()).done;){var Z=G.value;Z.hasOwnProperty(T)||(Z[T]=null)}}catch(ne){V.e(ne)}finally{V.f()}}}catch(ne){O.e(ne)}finally{O.f()}return M}),Re(this,"setColumnSameValue",function(S,N){if(N===void 0)throw new Error("You can not put a value of undefined type.");S=M._getValidColValue(S),M._hasColumn(S)||M._addCol(S);var O,T=0,G=Ye(M._rows);try{for(G.s();!(O=G.n()).done;)O.value[S]=M._getValidRowValue(T,S,N),T++}catch(V){G.e(V)}finally{G.f()}return M}),Re(this,"setColumnSameFormat",function(S,N){M._checkValidFunction(N),S=M._getValidColValue(S),M._checkColumn(S);var O,T=0,G=Ye(M._rows);try{for(G.s();!(O=G.n()).done;){var V=O.value;V[S]=M._getValidRowValue(T,S,N(V[S])),T++}}catch(Z){G.e(Z)}finally{G.f()}return M}),Re(this,"getRow",function(S){return M._deepCopy(M._rows[M._getValidRowIndex(S)])}),Re(this,"getRowAsDataModel",function(S){return new te.data.DataModel(M._rows[M._getValidRowIndex(S)])}),Re(this,"addRow",function(S,N){if(S===void 0&&N===void 0){if(M._cols.length<=0)throw new Error("Please define the column first.");var O,T={},G=Ye(M._cols);try{for(G.s();!(O=G.n()).done;)T[O.value]=null}catch(_t){G.e(_t)}finally{G.f()}M._rows.push(T)}else if(typeof S=="number"&&N===void 0){if(M._cols.length<=0)throw new Error("Please define the column first.");var V,Z=S>=M._rows.length?M._rows.length:M._getValidRowIndex(S),ne={},Y=Ye(M._cols);try{for(Y.s();!(V=Y.n()).done;)ne[V.value]=null}catch(_t){Y.e(_t)}finally{Y.f()}M._rows.splice(Z,0,ne)}else if(dt(S)==="object"&&N===void 0)M._addRow(M._rows.length,S);else{if(typeof S!="number"||dt(N)!=="object")throw new Error("Invalid parameters for addRow method.");var le=S>=M._rows.length?M._rows.length:M._getValidRowIndex(S);M._addRow(le,N);var qe=M._rows.pop();qe&&M._rows.splice(le,0,qe)}return M}),Re(this,"getRows",function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,O=M._getValidRowIndex(S);if(O===0&&N===null)return M._deepCopy(M._rows);for(var T=N?M._getValidRowIndex(N):M._rows.length,G=[],V=O;V<=T&&M._rows[V];V++)G.push(M._deepCopy(M._rows[V]));return G}),Re(this,"getRowsAsDataModel",function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,O=M._getValidRowIndex(S);if(O===0&&N===null)return M.clone();for(var T=N?M._getValidRowIndex(N):M._rows.length,G=[],V=O;V<=T&&M._rows[V];V++)G.push(M._deepCopy(M._rows[V]));return new te.data.DataModel(G)}),Re(this,"addRows",function(S){return M._put(S),M}),Re(this,"getObject",function(){var S=M._deepCopy(M._cols),N=M._deepCopy(M._rows);return{cols:S,rows:N,colCount:S.length,rowCount:N.length,isDeclare:M.isDeclare()}}),Re(this,"getValue",function(S,N){return N=M._getValidColValue(N),M._checkColumn(N),M._deepCopy(M._rows[M._getValidRowIndex(S)][N])}),Re(this,"setValue",function(S,N,O){if(O===void 0)throw new Error("You can not put a value of undefined type.");return N=M._getValidColValue(N),M._checkColumn(N),M._rows[M._getValidRowIndex(S)][N]=M._getValidRowValue(S,N,O),M}),Re(this,"removeColumn",function(S){S=M._getValidColValue(S),M._checkColumn(S);var N,O=Ye(M._rows);try{for(O.s();!(N=O.n()).done;)delete N.value[S]}catch(T){O.e(T)}finally{O.f()}return M._cols=M._cols.filter(function(T){return T!==S}),M}),Re(this,"removeColumns",function(S){var N,O=Ye(S);try{for(O.s();!(N=O.n()).done;){var T=N.value;M.removeColumn(T)}}catch(G){O.e(G)}finally{O.f()}return M}),Re(this,"removeRow",function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return M._rows.splice(M._getValidRowIndex(S),1)[0]}),Re(this,"getColumnCount",function(){return M._cols.length}),Re(this,"getRowCount",function(){return M._rows.length}),Re(this,"hasColumn",function(S){return M._hasColumn(S)}),Re(this,"setValidColumns",function(S){return S=M._cols.filter(function(N){return!S.includes(N)}),M.removeColumns(S),M}),Re(this,"isNotNullColumn",function(S){return M._getNullColumnFirstRowIndex(S)===-1}),Re(this,"findFirstRowNullColumn",function(S){var N=M._getNullColumnFirstRowIndex(S);return N===-1?null:M.getRow(N)}),Re(this,"isNotDuplColumn",function(S){return M._getDuplColumnFirstRowIndex(S)===-1}),Re(this,"findFirstRowDuplColumn",function(S){var N=M._getDuplColumnFirstRowIndex(S);return N===-1?null:M.getRow(N)}),Re(this,"isValidValue",function(S,N){return M._getInValidColumnFirstRowIndex(S,N)===-1}),Re(this,"findFirstRowInvalidValue",function(S,N){var O=M._getInValidColumnFirstRowIndex(S,N);return O===-1?null:M.getRow(O)}),Re(this,"searchRowIndexes",function(S){var N=arguments.length>1&&arguments[1]!==void 0&&arguments[1],O=M;O._checkOriginObject(S),O._checkBoolean(N);var T=[];return O._rows.forEach(function(G,V){var Z=!0;for(var ne in S)if(O._checkColumn(ne),JSON.stringify(G[ne])!==JSON.stringify(S[ne])){Z=!1;break}N?Z||T.push(V):Z&&T.push(V)}),T}),Re(this,"searchRows",function(S){var N=arguments.length>1&&arguments[1]!==void 0&&arguments[1],O=M;O._checkOriginObject(S),O._checkBoolean(N);var T=[];return O._rows.forEach(function(G){var V=!0;for(var Z in S)if(O._checkColumn(Z),JSON.stringify(G[Z])!==JSON.stringify(S[Z])){V=!1;break}N?V||T.push(O._deepCopy(G)):V&&T.push(O._deepCopy(G))}),T}),Re(this,"searchRowsAsDataModel",function(S){var N=arguments.length>1&&arguments[1]!==void 0&&arguments[1],O=M;O._checkOriginObject(S),O._checkBoolean(N);var T=[];return O._rows.forEach(function(G){var V=!0;for(var Z in S)if(O._checkColumn(Z),JSON.stringify(G[Z])!==JSON.stringify(S[Z])){V=!1;break}N?V||T.push(G):V&&T.push(G)}),new te.data.DataModel(T)}),Re(this,"searchAndModify",function(S){var N=arguments.length>1&&arguments[1]!==void 0&&arguments[1],O=M;O._checkOriginObject(S),O._checkBoolean(N);for(var T=0;T<O._rows.length;T++){var G=!0;for(var V in S)if(O._checkColumn(V),JSON.stringify(O._rows[T][V])!==JSON.stringify(S[V])){G=!1;break}N?G&&(O._rows.splice(T,1),T--):G||(O._rows.splice(T,1),T--)}return O}),Re(this,"filterRowIndexes",function(S){var N=M;N._checkValidFunction(S);var O=[];return N._rows.forEach(function(T,G){S(T)&&O.push(G)}),O}),Re(this,"filterRows",function(S){var N=M;N._checkValidFunction(S);var O=[];return N._rows.forEach(function(T){S(T)&&O.push(N._deepCopy(T))}),O}),Re(this,"filterRowsAsDataModel",function(S){var N=M;N._checkValidFunction(S);var O=[];return N._rows.forEach(function(T){S(T)&&O.push(T)}),new te.data.DataModel(O)}),Re(this,"filterAndModify",function(S){var N=M;N._checkValidFunction(S);for(var O=0;O<N._rows.length;O++)S(N._rows[O])||(N._rows.splice(O,1),O--);return N}),Re(this,"setColumnSorting",function(S){M._checkArray(S);var N,O=[],T=Ye(S);try{for(T.s();!(N=T.n()).done;){var G=N.value;G=M._getValidColValue(G),M._checkColumn(G),O.push(G)}}catch(Y){T.e(Y)}finally{T.f()}var V,Z=Ye(M._cols);try{for(Z.s();!(V=Z.n()).done;){var ne=V.value;O.includes(ne)||O.push(ne)}}catch(Y){Z.e(Y)}finally{Z.f()}return M._cols=O,M}),Re(this,"sortColumnAscending",function(){return M._cols.sort(),M}),Re(this,"sortColumnDescending",function(){return M._cols.sort(function(S,N){return S>N?-1:S<N?1:0}),M}),Re(this,"sortColumnReverse",function(){return M._cols.reverse(),M}),Re(this,"sortRowAscending",function(S){var N=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S=M._getValidColValue(S),M._checkColumn(S),M._checkBoolean(N),M._rows.sort(function(O,T){var G=O[S],V=T[S];if(G===null||V===null)return G===null?1:-1;if(dt(G)!=="object"&&dt(V)!=="object"||(G=JSON.stringify(G),V=JSON.stringify(V)),N&&(G=parseInt(G,10),V=parseInt(V,10),isNaN(G)||isNaN(V)))throw new Error("Cannot sort rows: non-integer value encountered.");return G<V?-1:G>V?1:0}),M}),Re(this,"sortRowDescending",function(S){var N=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return S=M._getValidColValue(S),M._checkColumn(S),M._checkBoolean(N),M._rows.sort(function(O,T){var G=O[S],V=T[S];if(G===null||V===null)return G===null?-1:1;if(dt(G)!=="object"&&dt(V)!=="object"||(G=JSON.stringify(G),V=JSON.stringify(V)),N&&(G=parseInt(G,10),V=parseInt(V,10),isNaN(G)||isNaN(V)))throw new Error("Cannot sort rows: non-integer value encountered.");return G<V?1:G>V?-1:0}),M}),Re(this,"sortRowReverse",function(){return M._rows.reverse(),M}),y&&this._put(y)});function Et(d){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},Et(d)}function _e(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function bt(d,y,M){return(y=Yn(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function Yn(d){var y=function(M){if(Et(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(Et(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return Et(y)=="symbol"?y:y+""}var Zt=_e(function d(y,M){var S=this;if(function(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}(this,d),bt(this,"_isDataWrapper",!0),bt(this,"_put",function(O,T){if(typeof O!="string")throw new Error("Keys must always be strings.");if(typeof T=="string")S._data[O]=T;else if(typeof T=="number"||typeof T=="boolean"||typeof T=="bigint")S._data[O]=String(T);else if(Et(T)==="symbol")S._data[O]=T.description?T.description:null;else if(T===null)S._data[O]=null;else{if(T===void 0)throw new Error("You can not put a value of undefined type.");if(Et(T)!=="object")throw new Error("Please insert only values convertible to string or of data-model type.");if(!T||!T.getIsDataModel||!T.getIsDataModel())throw new Error("Please insert only values convertible to string or of data-model type.");S._data[O]=T.clone()}}),bt(this,"getIsDataWrapper",function(){return S._isDataWrapper}),bt(this,"clone",function(){var O={};for(var T in S._data)O[T]=te.utils.deepCopyObject(S._data[T]);return new te.data.DataWrapper(O)}),bt(this,"clear",function(){return S._data={},S}),bt(this,"getSerialized",function(){var O={};for(var T in S._data)S._data.hasOwnProperty(T)&&(S._data[T]&&S._data[T].getIsDataModel&&S._data[T].getIsDataModel()?O[T]=S._data[T].getRows():O[T]=S._data[T]);return JSON.stringify(O)}),bt(this,"get",function(O){if(typeof O!="string")throw new Error("Keys must always be strings.");return S._data[O]?te.utils.deepCopyObject(S._data[O]):null}),bt(this,"getString",function(O){if(typeof O!="string")throw new Error("Keys must always be strings.");if(typeof S._data[O]!="string")throw new Error("The data does not contain the specified string value.");return S._data[O]?S._data[O]:null}),bt(this,"getDataModel",function(O){if(typeof O!="string")throw new Error("Keys must always be strings.");if(!S._data[O]||!S._data[O].getIsDataModel||!S._data[O].getIsDataModel())throw new Error("The data does not contain the specified data-model value.");return S._data[O].clone()}),bt(this,"put",function(O,T){return S._put(O,T),S}),bt(this,"putString",function(O,T){if(typeof O!="string")throw new Error("Keys must always be strings.");if(typeof T!="string"&&typeof T!="number"&&typeof T!="boolean"&&typeof T!="bigint"&&Et(T)!=="symbol"&&T!==null)throw new Error("Please insert only values convertible to string type.");return S._put(O,T),S}),bt(this,"putDataModel",function(O,T){if(typeof O!="string")throw new Error("Keys must always be strings.");if(T===null||!T.getIsDataModel||!T.getIsDataModel())throw new Error("Please insert only values of data-model type.");return S._put(O,T),S}),bt(this,"getObject",function(){var O={};for(var T in S._data)S._data[T]&&S._data[T].getIsDataModel&&S._data[T].getIsDataModel()?O[T]=S._data[T].getObject():O[T]=S._data[T];return O}),bt(this,"containsKey",function(O){if(typeof O!="string")throw new Error("Keys must always be strings.");return S._data.hasOwnProperty(O)}),bt(this,"isEmpty",function(){return Object.keys(S._data).length===0}),bt(this,"remove",function(O){if(typeof O!="string")throw new Error("Keys must always be strings.");var T=null;return S._data.hasOwnProperty(O)&&(T=S._data[O],delete S._data[O]),T}),bt(this,"size",function(){return Object.keys(S._data).length}),bt(this,"keys",function(){return Object.keys(S._data)}),bt(this,"values",function(){var O=[];for(var T in S._data)S._data.hasOwnProperty(T)&&O.push(te.utils.deepCopyObject(S._data[T]));return O}),this._data={},y!==void 0)if(Et(y)==="object"&&y!==null)for(var N in y)this._put(N,y[N]);else{if(typeof y!="string"||M===void 0)throw new Error("Invalid arguments. Provide an object or a key-value pair.");this._put(y,M)}});function Lt(d){return Lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},Lt(d)}function Xe(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function Ut(d,y,M){return(y=gn(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function gn(d){var y=function(M){if(Lt(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(Lt(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return Lt(y)=="symbol"?y:y+""}var gt=Xe(function d(y){var M=this;(function(S,N){if(!(S instanceof N))throw new TypeError("Cannot call a class as a function")})(this,d),Ut(this,"_removeKey",function(S){var N=M._keys.indexOf(S);N>-1&&M._keys.splice(N,1)}),Ut(this,"hasKey",function(S){return M._cache.hasOwnProperty(S)}),Ut(this,"get",function(S){if(!M.hasKey(S))return null;var N=te.utils.deepCopyObject(M._cache[S]);return M._removeKey(S),M._keys.push(S),N}),Ut(this,"put",function(S,N){if(M.hasKey(S))M.remove(S);else if(M._keys.length==M._limit){var O=M._keys.shift();O!==void 0&&delete M._cache[O]}M._cache[S]=te.utils.deepCopyObject(N),M._keys.push(S)}),Ut(this,"remove",function(S){if(!M.hasKey(S))return null;M._removeKey(S);var N=te.utils.deepCopyObject(M._cache[S]);return delete M._cache[S],N}),Ut(this,"getAll",function(){var S={};return Object.keys(M._cache).forEach(function(N){S[N]=te.utils.deepCopyObject(M._cache[N])}),S}),Ut(this,"getKeys",function(){var S=[];return M._keys.forEach(function(N){S.push(N)}),S}),Ut(this,"clear",function(){M._cache={},M._keys=[]}),this._limit=y,this._cache={},this._keys=[]});function yn(d){return yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},yn(d)}function Rn(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function f(d,y,M){return(y=h(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function h(d){var y=function(M){if(yn(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(yn(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return yn(y)=="symbol"?y:y+""}var I=Rn(function d(){var y=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.link.cachingLimit;(function(S,N){if(!(S instanceof N))throw new TypeError("Cannot call a class as a function")})(this,d),f(this,"_checkTypeString",function(S){if(typeof S!="string")throw new Error("key is only a string.")}),f(this,"_checkTypeFunction",function(S){if(S&&typeof S!="function")throw new Error("Please enter only the function.")}),f(this,"_checkWebSocketConnection",function(){return y._webSocket.readyState===WebSocket.OPEN?1:y._webSocket.readyState===WebSocket.CONNECTING?0:-1}),f(this,"getIsCachingModule",function(){return y._isCachingModule}),f(this,"hasKey",function(S){return y._checkTypeString(S),y._LRUCache.hasKey(S)}),f(this,"get",function(S){return y._checkTypeString(S),y._LRUCache.get(S)}),f(this,"put",function(S,N){y._checkTypeString(S),y._LRUCache.put(S,N)}),f(this,"remove",function(S){y._checkTypeString(S);var N=y._LRUCache.get(S);return y._LRUCache.remove(S),N}),f(this,"getAll",function(){return y._LRUCache.getAll()}),f(this,"getKeys",function(){return y._LRUCache.getKeys()}),f(this,"clear",function(){y._LRUCache.clear()}),f(this,"onopen",function(S){y._checkTypeFunction(S),y._webSocket.onopen=S}),f(this,"onmessage",function(S){y._checkTypeFunction(S),y._webSocket.onmessage=S}),f(this,"onclose",function(S){y._checkTypeFunction(S),y._webSocket.onclose=S}),f(this,"onerror",function(S){y._checkTypeFunction(S),y._webSocket.onclose=S}),f(this,"isWebSocketConnection",function(){return y._checkWebSocketConnection()}),this._webSocket=new WebSocket(ae.link.webSocketProtocol+ae.link.domain+ae.link.webSocketEndPoint),this._webSocket.onopen=function(){},this._webSocket.onmessage=function(){},this._webSocket.onclose=function(){},this._webSocket.onerror=function(){},this._LRUCache=new gt(M),this._isCachingModule=!0});function be(d,y){var M=Object.keys(d);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(d);y&&(S=S.filter(function(N){return Object.getOwnPropertyDescriptor(d,N).enumerable})),M.push.apply(M,S)}return M}function Be(d){for(var y=1;y<arguments.length;y++){var M=arguments[y]!=null?arguments[y]:{};y%2?be(Object(M),!0).forEach(function(S){l(d,S,M[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(M)):be(Object(M)).forEach(function(S){Object.defineProperty(d,S,Object.getOwnPropertyDescriptor(M,S))})}return d}function tt(d){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},tt(d)}function Ge(){Ge=function(){return y};var d,y={},M=Object.prototype,S=M.hasOwnProperty,N=Object.defineProperty||function(Ae,we,Fe){Ae[we]=Fe.value},O=typeof Symbol=="function"?Symbol:{},T=O.iterator||"@@iterator",G=O.asyncIterator||"@@asyncIterator",V=O.toStringTag||"@@toStringTag";function Z(Ae,we,Fe){return Object.defineProperty(Ae,we,{value:Fe,enumerable:!0,configurable:!0,writable:!0}),Ae[we]}try{Z({},"")}catch{Z=function(we,Fe,at){return we[Fe]=at}}function ne(Ae,we,Fe,at){var $e=we&&we.prototype instanceof Gt?we:Gt,pt=Object.create($e.prototype),Nt=new Jn(at||[]);return N(pt,"_invoke",{value:Fn(Ae,Fe,Nt)}),pt}function Y(Ae,we,Fe){try{return{type:"normal",arg:Ae.call(we,Fe)}}catch(at){return{type:"throw",arg:at}}}y.wrap=ne;var le="suspendedStart",qe="suspendedYield",_t="executing",on="completed",Ft={};function Gt(){}function St(){}function At(){}var Ct={};Z(Ct,T,function(){return this});var jt=Object.getPrototypeOf,rn=jt&&jt(jt(Zn([])));rn&&rn!==M&&S.call(rn,T)&&(Ct=rn);var Sn=At.prototype=Gt.prototype=Object.create(Ct);function Hn(Ae){["next","throw","return"].forEach(function(we){Z(Ae,we,function(Fe){return this._invoke(we,Fe)})})}function Kn(Ae,we){function Fe($e,pt,Nt,zt){var Wt=Y(Ae[$e],Ae,pt);if(Wt.type!=="throw"){var an=Wt.arg,pn=an.value;return pn&&tt(pn)=="object"&&S.call(pn,"__await")?we.resolve(pn.__await).then(function(Xt){Fe("next",Xt,Nt,zt)},function(Xt){Fe("throw",Xt,Nt,zt)}):we.resolve(pn).then(function(Xt){an.value=Xt,Nt(an)},function(Xt){return Fe("throw",Xt,Nt,zt)})}zt(Wt.arg)}var at;N(this,"_invoke",{value:function($e,pt){function Nt(){return new we(function(zt,Wt){Fe($e,pt,zt,Wt)})}return at=at?at.then(Nt,Nt):Nt()}})}function Fn(Ae,we,Fe){var at=le;return function($e,pt){if(at===_t)throw Error("Generator is already running");if(at===on){if($e==="throw")throw pt;return{value:d,done:!0}}for(Fe.method=$e,Fe.arg=pt;;){var Nt=Fe.delegate;if(Nt){var zt=ho(Nt,Fe);if(zt){if(zt===Ft)continue;return zt}}if(Fe.method==="next")Fe.sent=Fe._sent=Fe.arg;else if(Fe.method==="throw"){if(at===le)throw at=on,Fe.arg;Fe.dispatchException(Fe.arg)}else Fe.method==="return"&&Fe.abrupt("return",Fe.arg);at=_t;var Wt=Y(Ae,we,Fe);if(Wt.type==="normal"){if(at=Fe.done?on:qe,Wt.arg===Ft)continue;return{value:Wt.arg,done:Fe.done}}Wt.type==="throw"&&(at=on,Fe.method="throw",Fe.arg=Wt.arg)}}}function ho(Ae,we){var Fe=we.method,at=Ae.iterator[Fe];if(at===d)return we.delegate=null,Fe==="throw"&&Ae.iterator.return&&(we.method="return",we.arg=d,ho(Ae,we),we.method==="throw")||Fe!=="return"&&(we.method="throw",we.arg=new TypeError("The iterator does not provide a '"+Fe+"' method")),Ft;var $e=Y(at,Ae.iterator,we.arg);if($e.type==="throw")return we.method="throw",we.arg=$e.arg,we.delegate=null,Ft;var pt=$e.arg;return pt?pt.done?(we[Ae.resultName]=pt.value,we.next=Ae.nextLoc,we.method!=="return"&&(we.method="next",we.arg=d),we.delegate=null,Ft):pt:(we.method="throw",we.arg=new TypeError("iterator result is not an object"),we.delegate=null,Ft)}function To(Ae){var we={tryLoc:Ae[0]};1 in Ae&&(we.catchLoc=Ae[1]),2 in Ae&&(we.finallyLoc=Ae[2],we.afterLoc=Ae[3]),this.tryEntries.push(we)}function Xn(Ae){var we=Ae.completion||{};we.type="normal",delete we.arg,Ae.completion=we}function Jn(Ae){this.tryEntries=[{tryLoc:"root"}],Ae.forEach(To,this),this.reset(!0)}function Zn(Ae){if(Ae||Ae===""){var we=Ae[T];if(we)return we.call(Ae);if(typeof Ae.next=="function")return Ae;if(!isNaN(Ae.length)){var Fe=-1,at=function $e(){for(;++Fe<Ae.length;)if(S.call(Ae,Fe))return $e.value=Ae[Fe],$e.done=!1,$e;return $e.value=d,$e.done=!0,$e};return at.next=at}}throw new TypeError(tt(Ae)+" is not iterable")}return St.prototype=At,N(Sn,"constructor",{value:At,configurable:!0}),N(At,"constructor",{value:St,configurable:!0}),St.displayName=Z(At,V,"GeneratorFunction"),y.isGeneratorFunction=function(Ae){var we=typeof Ae=="function"&&Ae.constructor;return!!we&&(we===St||(we.displayName||we.name)==="GeneratorFunction")},y.mark=function(Ae){return Object.setPrototypeOf?Object.setPrototypeOf(Ae,At):(Ae.__proto__=At,Z(Ae,V,"GeneratorFunction")),Ae.prototype=Object.create(Sn),Ae},y.awrap=function(Ae){return{__await:Ae}},Hn(Kn.prototype),Z(Kn.prototype,G,function(){return this}),y.AsyncIterator=Kn,y.async=function(Ae,we,Fe,at,$e){$e===void 0&&($e=Promise);var pt=new Kn(ne(Ae,we,Fe,at),$e);return y.isGeneratorFunction(we)?pt:pt.next().then(function(Nt){return Nt.done?Nt.value:pt.next()})},Hn(Sn),Z(Sn,V,"Generator"),Z(Sn,T,function(){return this}),Z(Sn,"toString",function(){return"[object Generator]"}),y.keys=function(Ae){var we=Object(Ae),Fe=[];for(var at in we)Fe.push(at);return Fe.reverse(),function $e(){for(;Fe.length;){var pt=Fe.pop();if(pt in we)return $e.value=pt,$e.done=!1,$e}return $e.done=!0,$e}},y.values=Zn,Jn.prototype={constructor:Jn,reset:function(Ae){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(Xn),!Ae)for(var we in this)we.charAt(0)==="t"&&S.call(this,we)&&!isNaN(+we.slice(1))&&(this[we]=d)},stop:function(){this.done=!0;var Ae=this.tryEntries[0].completion;if(Ae.type==="throw")throw Ae.arg;return this.rval},dispatchException:function(Ae){if(this.done)throw Ae;var we=this;function Fe(Wt,an){return pt.type="throw",pt.arg=Ae,we.next=Wt,an&&(we.method="next",we.arg=d),!!an}for(var at=this.tryEntries.length-1;at>=0;--at){var $e=this.tryEntries[at],pt=$e.completion;if($e.tryLoc==="root")return Fe("end");if($e.tryLoc<=this.prev){var Nt=S.call($e,"catchLoc"),zt=S.call($e,"finallyLoc");if(Nt&&zt){if(this.prev<$e.catchLoc)return Fe($e.catchLoc,!0);if(this.prev<$e.finallyLoc)return Fe($e.finallyLoc)}else if(Nt){if(this.prev<$e.catchLoc)return Fe($e.catchLoc,!0)}else{if(!zt)throw Error("try statement without catch or finally");if(this.prev<$e.finallyLoc)return Fe($e.finallyLoc)}}}},abrupt:function(Ae,we){for(var Fe=this.tryEntries.length-1;Fe>=0;--Fe){var at=this.tryEntries[Fe];if(at.tryLoc<=this.prev&&S.call(at,"finallyLoc")&&this.prev<at.finallyLoc){var $e=at;break}}$e&&(Ae==="break"||Ae==="continue")&&$e.tryLoc<=we&&we<=$e.finallyLoc&&($e=null);var pt=$e?$e.completion:{};return pt.type=Ae,pt.arg=we,$e?(this.method="next",this.next=$e.finallyLoc,Ft):this.complete(pt)},complete:function(Ae,we){if(Ae.type==="throw")throw Ae.arg;return Ae.type==="break"||Ae.type==="continue"?this.next=Ae.arg:Ae.type==="return"?(this.rval=this.arg=Ae.arg,this.method="return",this.next="end"):Ae.type==="normal"&&we&&(this.next=we),Ft},finish:function(Ae){for(var we=this.tryEntries.length-1;we>=0;--we){var Fe=this.tryEntries[we];if(Fe.finallyLoc===Ae)return this.complete(Fe.completion,Fe.afterLoc),Xn(Fe),Ft}},catch:function(Ae){for(var we=this.tryEntries.length-1;we>=0;--we){var Fe=this.tryEntries[we];if(Fe.tryLoc===Ae){var at=Fe.completion;if(at.type==="throw"){var $e=at.arg;Xn(Fe)}return $e}}throw Error("illegal catch attempt")},delegateYield:function(Ae,we,Fe){return this.delegate={iterator:Zn(Ae),resultName:we,nextLoc:Fe},this.method==="next"&&(this.arg=d),Ft}},y}function j(d,y,M,S,N,O,T){try{var G=d[O](T),V=G.value}catch(Z){return void M(Z)}G.done?y(V):Promise.resolve(V).then(S,N)}function E(d){return function(){var y=this,M=arguments;return new Promise(function(S,N){var O=d.apply(y,M);function T(V){j(O,S,N,T,G,"next",V)}function G(V){j(O,S,N,T,G,"throw",V)}T(void 0)})}}function s(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function l(d,y,M){return(y=k(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function k(d){var y=function(M){if(tt(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(tt(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return tt(y)=="symbol"?y:y+""}var $=s(function d(y,M){var S=this;(function(N,O){if(!(N instanceof O))throw new TypeError("Cannot call a class as a function")})(this,d),l(this,"_cachingModule",null),l(this,"_getResultDataWrapper",function(N){var O=null;if(N&&N.constructor===Object&&N.DATAWRAPPER==="TRUE"){O=new te.data.DataWrapper;for(var T=0,G=Object.keys(N);T<G.length;T++){var V=G[T];N[V].constructor===Object||N[V].constructor===Array?O.putDataModel(V,new te.data.DataModel(N[V])):V!=="DATAWRAPPER"&&O.put(V,N[V])}}else O=N;return O}),l(this,"_getCachingResult",function(){var N=E(Ge().mark(function O(T){var G;return Ge().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(!S._cachingModule||S._cachingModule.isWebSocketConnection()!==1){V.next=8;break}return V.next=3,S._cachingModule.get(T);case 3:if(!(G=V.sent)||ae.link.interceptApiResult(G.data,G.response)===!1){V.next=6;break}return V.abrupt("return",G);case 6:return V.abrupt("return",{data:null,response:G.response});case 8:return V.abrupt("return",{data:null,response:new Response});case 9:case"end":return V.stop()}},O)}));return function(O){return N.apply(this,arguments)}}()),l(this,"_getFetch",function(N,O,T,G,V){if(V&&V.getIsDataWrapper&&V.getIsDataWrapper())G&&V.putString("cmd",G),V=V.getSerialized();else if(V&&V.getIsDataModel&&V.getIsDataModel())V=V.getSerialized();else if(V&&tt(V)==="object")if(typeof V=="string")try{JSON.parse(V)}catch{V=JSON.stringify({data:V})}else Array.isArray(V)?V=JSON.stringify(V):tt(V)==="object"?(G&&V.constructor===Object&&(V.cmd=G),V=JSON.stringify(V)):V=JSON.stringify({data:V});var Z={method:N,headers:{"Content-Type":"application/json"},body:V};if(T.constructor!==Object)throw new Error("fetchOptions must be an object which contains key and value.");var ne=null;if(Object.keys(T).forEach(function(le){le!=="timeout"&&(Z[le]=T[le])}),T.timeout){if(typeof T.timeout!="number"||T.timeout<=0||!Number.isInteger(T.timeout))throw new Error("Timeout must be a positive integer.");ne=new Promise(function(le,qe){return setTimeout(function(){return qe(new Error("Request timed out"))},T.timeout)})}var Y=[fetch(O,Z)];return ne&&Y.push(ne),Y}),l(this,"_request",function(){var N=E(Ge().mark(function O(T,G,V){var Z;return Ge().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return ne.next=2,Promise.race(G).then(function(Y){S._eventEmitter.emit("requestCompleted_Response",Y);var le=Y.headers.get("Content-Type");return le&&le.includes("application/json")?Y.json().then(function(qe){return{data:qe,response:Y}}):le?Y.text().then(function(qe){return{data:qe||null,response:Y}}):{data:null,response:Y}}).then(function(Y){var le=Y.data,qe=S._getResultDataWrapper(le);if(S._eventEmitter.emit("requestCompleted_Data",{data:qe,response:Y.response}),V&&S._cachingModule&&S._cachingModule.isWebSocketConnection()===1&&S._cachingModule.put(V,Promise.resolve({data:qe,response:Y.response})),ae.link.interceptApiResult(qe,Y.response)===!1)return{data:null,response:Y.response};switch(T){case"GET":if(ae.link.afterGetRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"POST":if(ae.link.afterPostRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"PUT":if(ae.link.afterPutRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"PATCH":if(ae.link.afterPatchRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"DELETE":if(ae.link.afterDeleteRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"GETURL":if(ae.link.afterGetUrlRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"POSTURL":if(ae.link.afterPostUrlRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"PUTURL":if(ae.link.afterPutUrlRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"PATCHURL":if(ae.link.afterPatchUrlRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response};case"DELETEURL":if(ae.link.afterDeleteUrlRequest({data:qe,response:Y.response})===!1)return{data:null,response:Y.response}}return{data:qe,response:Y.response}}).catch(function(Y){return S._eventEmitter.emit("requestError",Y),ae.link.interceptApiError(Y)===!1?{data:Y,response:new Response}:Y});case 2:return Z=ne.sent,ne.abrupt("return",Z);case 4:case"end":return ne.stop()}},O)}));return function(O,T,G){return N.apply(this,arguments)}}()),l(this,"get",function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ae.link.beforeGetRequest(N,O)===!1)return Promise.resolve({data:null,response:new Response});var T="GET";return S._eventEmitter.emit("requestStarted_"+T,N,O),S._cachingModule&&S._cachingModule.hasKey(N)?S._getCachingResult(N):S._request(T,S._getFetch(T,ae.link.protocol+ae.link.domain+N,O,"",null),N)}),l(this,"post",function(){var N=E(Ge().mark(function O(T,G){var V,Z,ne=arguments;return Ge().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(V=ne.length>2&&ne[2]!==void 0?ne[2]:{},ae.link.beforePostRequest(T,V)!==!1){Y.next=3;break}return Y.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(Z="POST",S._eventEmitter.emit("requestStarted_"+Z,G,V,T),!S._cachingModule||!S._cachingModule.hasKey(G)){Y.next=7;break}return Y.abrupt("return",S._getCachingResult(G));case 7:return Y.abrupt("return",S._request(Z,S._getFetch(Z,ae.link.protocol+ae.link.domain+ae.link.controllerPath,V,G,T),G));case 8:case"end":return Y.stop()}},O)}));return function(O,T){return N.apply(this,arguments)}}()),l(this,"put",function(){var N=E(Ge().mark(function O(T,G){var V,Z,ne=arguments;return Ge().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(V=ne.length>2&&ne[2]!==void 0?ne[2]:{},ae.link.beforePutRequest(T,V)!==!1){Y.next=3;break}return Y.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(Z="PUT",S._eventEmitter.emit("requestStarted_"+Z,G,V,T),!S._cachingModule||!S._cachingModule.hasKey(G)){Y.next=7;break}return Y.abrupt("return",S._getCachingResult(G));case 7:return Y.abrupt("return",S._request(Z,S._getFetch(Z,ae.link.protocol+ae.link.domain+ae.link.controllerPath,V,G,T),G));case 8:case"end":return Y.stop()}},O)}));return function(O,T){return N.apply(this,arguments)}}()),l(this,"patch",function(){var N=E(Ge().mark(function O(T,G){var V,Z,ne=arguments;return Ge().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(V=ne.length>2&&ne[2]!==void 0?ne[2]:{},ae.link.beforePatchRequest(T,V)!==!1){Y.next=3;break}return Y.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(Z="PATCH",S._eventEmitter.emit("requestStarted_"+Z,G,V,T),!S._cachingModule||!S._cachingModule.hasKey(G)){Y.next=7;break}return Y.abrupt("return",S._getCachingResult(G));case 7:return Y.abrupt("return",S._request(Z,S._getFetch(Z,ae.link.protocol+ae.link.domain+ae.link.controllerPath,V,G,T),G));case 8:case"end":return Y.stop()}},O)}));return function(O,T){return N.apply(this,arguments)}}()),l(this,"delete",function(){var N=E(Ge().mark(function O(T,G){var V,Z,ne=arguments;return Ge().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(V=ne.length>2&&ne[2]!==void 0?ne[2]:{},ae.link.beforeDeleteRequest(T,V)!==!1){Y.next=3;break}return Y.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(Z="DELETE",S._eventEmitter.emit("requestStarted_"+Z,G,V,T),!(G&&S._cachingModule&&S._cachingModule.hasKey(G))){Y.next=7;break}return Y.abrupt("return",S._getCachingResult(G));case 7:return Y.abrupt("return",S._request(Z,S._getFetch(Z,ae.link.protocol+ae.link.domain+ae.link.controllerPath,V,G,T),G));case 8:case"end":return Y.stop()}},O)}));return function(O,T){return N.apply(this,arguments)}}()),l(this,"head",function(){var N=E(Ge().mark(function O(T){var G,V,Z=arguments;return Ge().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return G=Z.length>1&&Z[1]!==void 0?Z[1]:{},V=ae.link.protocol+ae.link.domain+T,ne.abrupt("return",fetch(V,Be({method:"HEAD"},G)).then(function(Y){if(!Y.ok)throw new Error("HEAD request failed with status: ".concat(Y.status));var le={};return Y.headers.forEach(function(qe,_t){le[_t]=qe}),le}).catch(function(Y){return Promise.reject(Y)}));case 3:case"end":return ne.stop()}},O)}));return function(O){return N.apply(this,arguments)}}()),l(this,"options",function(){var N=E(Ge().mark(function O(T){var G,V,Z=arguments;return Ge().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return G=Z.length>1&&Z[1]!==void 0?Z[1]:{},V=ae.link.protocol+ae.link.domain+T,ne.abrupt("return",fetch(V,Be({method:"OPTIONS"},G)).then(function(Y){if(!Y.ok)throw new Error("OPTIONS request failed with status: ".concat(Y.status));var le=Y.headers.get("Allow");return le?le.split(",").map(function(qe){return qe.trim()}):[]}).catch(function(Y){return Promise.reject(Y)}));case 3:case"end":return ne.stop()}},O)}));return function(O){return N.apply(this,arguments)}}()),l(this,"getURL",function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ae.link.beforeGetUrlRequest(N,O)===!1)return Promise.resolve({data:null,response:new Response});var T="GET";return S._eventEmitter.emit("requestStarted_"+T,N,O),S._cachingModule&&S._cachingModule.hasKey(N)?S._getCachingResult(N):S._request(T+"URL",S._getFetch(T,N,O,"",null),N)}),l(this,"postURL",function(){var N=E(Ge().mark(function O(T,G,V){var Z,ne,Y=arguments;return Ge().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(Z=Y.length>3&&Y[3]!==void 0?Y[3]:{},ae.link.beforePostUrlRequest(T,G,Z)!==!1){le.next=3;break}return le.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(ne="POST",S._eventEmitter.emit("requestStarted_"+ne,V,Z,G),!S._cachingModule||!S._cachingModule.hasKey(V)){le.next=7;break}return le.abrupt("return",S._getCachingResult(T+V));case 7:return le.abrupt("return",S._request(ne+"URL",S._getFetch(ne,T,Z,V,G),T+V));case 8:case"end":return le.stop()}},O)}));return function(O,T,G){return N.apply(this,arguments)}}()),l(this,"putURL",function(){var N=E(Ge().mark(function O(T,G,V){var Z,ne,Y=arguments;return Ge().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(Z=Y.length>3&&Y[3]!==void 0?Y[3]:{},ae.link.beforePutUrlRequest(T,G,Z)!==!1){le.next=3;break}return le.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(ne="PUT",S._eventEmitter.emit("requestStarted_"+ne,V,Z,G),!S._cachingModule||!S._cachingModule.hasKey(V)){le.next=7;break}return le.abrupt("return",S._getCachingResult(T+V));case 7:return le.abrupt("return",S._request(ne+"URL",S._getFetch(ne,T,Z,V,G),T+V));case 8:case"end":return le.stop()}},O)}));return function(O,T,G){return N.apply(this,arguments)}}()),l(this,"patchURL",function(){var N=E(Ge().mark(function O(T,G,V){var Z,ne,Y=arguments;return Ge().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(Z=Y.length>3&&Y[3]!==void 0?Y[3]:{},ae.link.beforePatchUrlRequest(T,G,Z)!==!1){le.next=3;break}return le.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(ne="PATCH",S._eventEmitter.emit("requestStarted_"+ne,V,Z,G),!S._cachingModule||!S._cachingModule.hasKey(V)){le.next=7;break}return le.abrupt("return",S._getCachingResult(T+V));case 7:return le.abrupt("return",S._request(ne+"URL",S._getFetch(ne,T,Z,V,G),T+V));case 8:case"end":return le.stop()}},O)}));return function(O,T,G){return N.apply(this,arguments)}}()),l(this,"deleteURL",function(){var N=E(Ge().mark(function O(T,G,V){var Z,ne,Y=arguments;return Ge().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(Z=Y.length>3&&Y[3]!==void 0?Y[3]:{},ae.link.beforeDeleteUrlRequest(T,G,Z)!==!1){le.next=3;break}return le.abrupt("return",Promise.resolve({data:null,response:new Response}));case 3:if(ne="DELETE",S._eventEmitter.emit("requestStarted_"+ne,V,Z,G),!S._cachingModule||!S._cachingModule.hasKey(V)){le.next=7;break}return le.abrupt("return",S._getCachingResult(T+V));case 7:return le.abrupt("return",S._request(ne+"URL",S._getFetch(ne,T,Z,V,G),T+V));case 8:case"end":return le.stop()}},O)}));return function(O,T,G){return N.apply(this,arguments)}}()),l(this,"headURL",function(){var N=E(Ge().mark(function O(T){var G,V=arguments;return Ge().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return G=V.length>1&&V[1]!==void 0?V[1]:{},Z.abrupt("return",fetch(T,Be({method:"HEAD"},G)).then(function(ne){if(!ne.ok)throw new Error("HEAD request failed with status: ".concat(ne.status));var Y={};return ne.headers.forEach(function(le,qe){Y[qe]=le}),Y}).catch(function(ne){return Promise.reject(ne)}));case 2:case"end":return Z.stop()}},O)}));return function(O){return N.apply(this,arguments)}}()),l(this,"optionsURL",function(){var N=E(Ge().mark(function O(T){var G,V=arguments;return Ge().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return G=V.length>1&&V[1]!==void 0?V[1]:{},Z.abrupt("return",fetch(T,Be({method:"OPTIONS"},G)).then(function(ne){if(!ne.ok)throw new Error("OPTIONS request failed with status: ".concat(ne.status));var Y=ne.headers.get("Allow");return Y?Y.split(",").map(function(le){return le.trim()}):[]}).catch(function(ne){return Promise.reject(ne)}));case 2:case"end":return Z.stop()}},O)}));return function(O){return N.apply(this,arguments)}}()),l(this,"onEventEmit",function(N,O,T){if(!O)throw new Error("Event name is required.");if(!T)throw new Error("Event function is required.");if(typeof O!="string")throw new Error("Event name must be a string.");var G="requestStarted_"+N;if([G,"requestCompleted_Response","requestCompleted_Data","requestError"].indexOf(O)===-1)throw new Error(`Invalid event name.
5
+ Inserted event name: `+O+`
6
+ Valid event names are:`+`
7
+ `.concat(G)+`
8
+ requestCompleted_Response
9
+ requestCompleted_Data
10
+ requestError`);if(typeof T!="function")throw new Error("Event function must be a function.");S._eventEmitter.on(O,T)}),this._eventEmitter=y,M&&M.getIsCachingModule&&M.getIsCachingModule()&&(this._cachingModule=M)});function J(d){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},J(d)}function ie(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function ge(d,y,M){return(y=Ce(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function Ce(d){var y=function(M){if(J(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(J(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return J(y)=="symbol"?y:y+""}var He=ie(function d(){var y=this;(function(M,S){if(!(M instanceof S))throw new TypeError("Cannot call a class as a function")})(this,d),ge(this,"events",{}),ge(this,"on",function(M,S){y.events[M]||(y.events[M]=[]),y.events[M].push(S)}),ge(this,"emit",function(M){for(var S=arguments.length,N=new Array(S>1?S-1:0),O=1;O<S;O++)N[O-1]=arguments[O];y.events[M]&&y.events[M].forEach(function(T){return T.apply(void 0,N)})})});function Le(d){return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},Le(d)}function Ke(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function Ze(d,y){if(!(d instanceof y))throw new TypeError("Cannot call a class as a function")}function et(d,y,M){return(y=Ve(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function Ve(d){var y=function(M){if(Le(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(Le(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return Le(y)=="symbol"?y:y+""}var Mt=Ke(function d(){var y=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Ze(this,d),et(this,"_cachingModule",null),et(this,"call",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.get(y._resourcePath,N)}),et(this,"head",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.head(y._resourcePath,N)}),et(this,"options",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.options(y._resourcePath,N)}),et(this,"onEventEmit",function(N,O){y._apiLink.onEventEmit("GET",N,O)}),S&&S.getIsCachingModule&&S.getIsCachingModule()&&(this._cachingModule=S),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._resourcePath=M}),Rt=Ke(function d(y){var M=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(Ze(this,d),et(this,"_cachingModule",null),et(this,"call",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.getURL(M._url,N)}),et(this,"head",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.head(M._url,N)}),et(this,"options",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.options(M._url,N)}),et(this,"onEventEmit",function(N,O){M._apiLink.onEventEmit("GET",N,O)}),!y)throw new Error("Please enter the request URL.");S&&S.getIsCachingModule&&S.getIsCachingModule()&&(this._cachingModule=S),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._url=y});function xt(d){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},xt(d)}function Ht(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function v(d,y){if(!(d instanceof y))throw new TypeError("Cannot call a class as a function")}function w(d,y,M){return(y=A(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function A(d){var y=function(M){if(xt(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(xt(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return xt(y)=="symbol"?y:y+""}var x=Ht(function d(){var y=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;v(this,d),w(this,"_cachingModule",null),w(this,"call",function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y._apiLink.post(N,y._serviceCmd,O)}),w(this,"head",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.head(ae.link.controllerPath,N)}),w(this,"options",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.options(ae.link.controllerPath,N)}),w(this,"onEventEmit",function(N,O){y._apiLink.onEventEmit("POST",N,O)}),S&&S.getIsCachingModule&&S.getIsCachingModule()&&(this._cachingModule=S),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._serviceCmd=M}),g=Ht(function d(y){var M=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(v(this,d),w(this,"_cachingModule",null),w(this,"call",function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M._apiLink.postURL(M._url,O,M._serviceCmd,T)}),w(this,"head",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.headURL(M._url,O)}),w(this,"options",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.options(M._url,O)}),w(this,"onEventEmit",function(O,T){M._apiLink.onEventEmit("POST",O,T)}),!y)throw new Error("Please enter the request URL.");N&&N.getIsCachingModule&&N.getIsCachingModule()&&(this._cachingModule=N),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._url=y,this._serviceCmd=S});function p(d){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},p(d)}function B(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function H(d,y){if(!(d instanceof y))throw new TypeError("Cannot call a class as a function")}function U(d,y,M){return(y=q(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function q(d){var y=function(M){if(p(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(p(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return p(y)=="symbol"?y:y+""}var oe=B(function d(){var y=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;H(this,d),U(this,"_cachingModule",null),U(this,"call",function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y._apiLink.put(N,y._serviceCmd,O)}),U(this,"head",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.head(ae.link.controllerPath,N)}),U(this,"options",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.options(ae.link.controllerPath,N)}),U(this,"onEventEmit",function(N,O){y._apiLink.onEventEmit("PUT",N,O)}),S&&S.getIsCachingModule&&S.getIsCachingModule()&&(this._cachingModule=S),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._serviceCmd=M}),de=B(function d(y){var M=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(H(this,d),U(this,"_cachingModule",null),U(this,"call",function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M._apiLink.putURL(M._url,O,M._serviceCmd,T)}),U(this,"head",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.headURL(M._url,O)}),U(this,"options",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.options(M._url,O)}),U(this,"onEventEmit",function(O,T){M._apiLink.onEventEmit("PUT",O,T)}),!y)throw new Error("Please enter the request URL.");N&&N.getIsCachingModule&&N.getIsCachingModule()&&(this._cachingModule=N),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._url=y,this._serviceCmd=S});function he(d){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},he(d)}function se(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function me(d,y){if(!(d instanceof y))throw new TypeError("Cannot call a class as a function")}function Q(d,y,M){return(y=u(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function u(d){var y=function(M){if(he(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(he(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return he(y)=="symbol"?y:y+""}var b=se(function d(){var y=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;me(this,d),Q(this,"_cachingModule",null),Q(this,"call",function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y._apiLink.patch(N,y._serviceCmd,O)}),Q(this,"head",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.head(ae.link.controllerPath,N)}),Q(this,"options",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.options(ae.link.controllerPath,N)}),Q(this,"onEventEmit",function(N,O){y._apiLink.onEventEmit("PATCH",N,O)}),S&&S.getIsCachingModule&&S.getIsCachingModule()&&(this._cachingModule=S),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._serviceCmd=M}),_=se(function d(y){var M=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(me(this,d),Q(this,"_cachingModule",null),Q(this,"call",function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M._apiLink.patchURL(M._url,O,M._serviceCmd,T)}),Q(this,"head",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.headURL(M._url,O)}),Q(this,"options",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.options(M._url,O)}),Q(this,"onEventEmit",function(O,T){M._apiLink.onEventEmit("PATCH",O,T)}),!y)throw new Error("Please enter the request URL.");N&&N.getIsCachingModule&&N.getIsCachingModule()&&(this._cachingModule=N),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._url=y,this._serviceCmd=S});function R(d){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},R(d)}function F(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function P(d,y){if(!(d instanceof y))throw new TypeError("Cannot call a class as a function")}function z(d,y,M){return(y=pe(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function pe(d){var y=function(M){if(R(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(R(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return R(y)=="symbol"?y:y+""}var Se=F(function d(){var y=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;P(this,d),z(this,"_cachingModule",null),z(this,"call",function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y._apiLink.delete(N,y._serviceCmd,O)}),z(this,"head",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.head(ae.link.controllerPath,N)}),z(this,"options",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return y._apiLink.options(ae.link.controllerPath,N)}),z(this,"onEventEmit",function(N,O){y._apiLink.onEventEmit("DELETE",N,O)}),S&&S.getIsCachingModule&&S.getIsCachingModule()&&(this._cachingModule=S),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._serviceCmd=M}),ze=F(function d(y){var M=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(P(this,d),z(this,"_cachingModule",null),z(this,"call",function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M._apiLink.deleteURL(M._url,O,M._serviceCmd,T)}),z(this,"head",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.headURL(M._url,O)}),z(this,"options",function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return M._apiLink.options(M._url,O)}),z(this,"onEventEmit",function(O,T){M._apiLink.onEventEmit("DELETE",O,T)}),!y)throw new Error("Please enter the request URL.");N&&N.getIsCachingModule&&N.getIsCachingModule()&&(this._cachingModule=N),this._eventEmitter=new He,this._apiLink=new $(this._eventEmitter,this._cachingModule),this._url=y,this._serviceCmd=S});function je(d){return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},je(d)}function Ue(d,y){return function(M){if(Array.isArray(M))return M}(d)||function(M,S){var N=M==null?null:typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if(N!=null){var O,T,G,V,Z=[],ne=!0,Y=!1;try{if(G=(N=N.call(M)).next,S!==0)for(;!(ne=(O=G.call(N)).done)&&(Z.push(O.value),Z.length!==S);ne=!0);}catch(le){Y=!0,T=le}finally{try{if(!ne&&N.return!=null&&(V=N.return(),Object(V)!==V))return}finally{if(Y)throw T}}return Z}}(d,y)||function(M,S){if(M){if(typeof M=="string")return it(M,S);var N={}.toString.call(M).slice(8,-1);return N==="Object"&&M.constructor&&(N=M.constructor.name),N==="Map"||N==="Set"?Array.from(M):N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?it(M,S):void 0}}(d,y)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function it(d,y){(y==null||y>d.length)&&(y=d.length);for(var M=0,S=Array(y);M<y;M++)S[M]=d[M];return S}function rt(d){return rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},rt(d)}function ct(d){return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},ct(d)}function Ne(d,y,M){return Object.defineProperty(d,"prototype",{writable:!1}),d}function De(d,y,M){return(y=lt(y))in d?Object.defineProperty(d,y,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[y]=M,d}function lt(d){var y=function(M){if(ct(M)!="object"||!M)return M;var S=M[Symbol.toPrimitive];if(S!==void 0){var N=S.call(M,"string");if(ct(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)}(d);return ct(y)=="symbol"?y:y+""}var ae=new ut,te=new(Ne(function d(){(function(y,M){if(!(y instanceof M))throw new TypeError("Cannot call a class as a function")})(this,d),De(this,"utils",{isAlpha:function(y){return/^[A-Za-z]+$/.test(y)},isAlphaNumber:function(y){return/^[A-Za-z0-9]+$/.test(y)},isNumber:function(y){return/^[0-9]+$/.test(y)},isNumberSymbols:function(y){return/^[0-9!@#$%^&*()_+\-=\[\]{};':'\\|,.<>\/?~]+$/.test(y)},isIncludeSymbols:function(y){return/[!@#$%^&*()_+\-=\[\]{};':'\\|,.<>\/?~]/.test(y)},isLowerAlpha:function(y){return/^[a-z]+$/.test(y)},isLowerAlphaAndNumber:function(y){return/^[a-z0-9]+$/.test(y)},isUpperAlpha:function(y){return/^[A-Z]+$/.test(y)},isUpperAlphaNumber:function(y){return/^[A-Z0-9]+$/.test(y)},isNumeric:function(y){return!isNaN(y)&&isFinite(y)},isInteger:function(y){return!!te.utils.isNumeric(y)&&(y=Number(y),Number.isInteger(y))},isPositiveInteger:function(y){return!!te.utils.isNumeric(y)&&(y=Number(y),Number.isInteger(y)&&y>0)},isNegativeInteger:function(y){return!!te.utils.isNumeric(y)&&(y=Number(y),Number.isInteger(y)&&y<0)},isArray:function(y){return Array.isArray(y)&&y.constructor===Array},isObject:function(y){return y!==null&&rt(y)==="object"&&!Array.isArray(y)&&y.constructor===Object},isDate:function(y){if(!y)return!1;var M=te.utils.isObject(y)?y:te.utils.getDateObject(y),S=te.utils.getToString(M.y),N=te.utils.getToString(M.M),O=te.utils.getToString(M.d),T=!0;try{if(!te.utils.isInteger(S)||!te.utils.isInteger(N)||!te.utils.isInteger(O)||!S)return!1;if(N?N.length===1&&(N="0"+N):N="01",O?O.length===1&&(O="0"+O):O="01",te.utils.getToNumber(S+N+O)<16000101){var G=new Date(te.utils.getToNumber(S),te.utils.getToNumber(N)-1,te.utils.getToNumber(O));return G.getFullYear()===te.utils.getToNumber(S)&&G.getMonth()===te.utils.getToNumber(N)-1&&G.getDate()===te.utils.getToNumber(O)}T=/^(?=\d)(?:(?:31(?!.(?:0?[2469]|11))|(?:30|29)(?!.0?2)|29(?=.0?2.(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(?:\x20|$))|(?:2[0-8]|1\d|0?[1-9]))([-.\/])(?:1[012]|0?[1-9])\1(?:1[6-9]|[2-9]\d)?\d\d(?:(?=\x20\d)\x20|$))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$/.test(O+"-"+N+"-"+S)}catch{T=!1}return T},isTime:function(y){if(y==null)return!1;var M=te.utils.isObject(y)?y:te.utils.getTimeObject(y),S=M.h,N=M.m,O=M.s;return!!(S!=null&&N!=null&&O!=null&&Number.isInteger(S)&&Number.isInteger(N)&&Number.isInteger(O))&&(S>=0&&S<=23&&N>=0&&N<=59&&O>=0&&O<=59||S===24&&N===0&&O===0)},isDatetime:function(y){var M=te.utils.isObject(y)?y:te.utils.getDatetimeObject(y);return!!te.utils.isDate(M)&&!!te.utils.isTime(M)},isEmail:function(y){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,}$/.test(y)},isURL:function(y){return/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i.test(y)},isValidMask:function(y,M){if(y.length!==M.length)return!1;for(var S=0;S<y.length;S++){var N=y.charAt(S),O=M.charAt(S);switch(O){case"A":if(N<"A"||N>"Z")return!1;break;case"a":if(N<"a"||N>"z")return!1;break;case"9":if(isNaN(parseInt(N)))return!1;break;default:if(N!==O)return!1}}return!0},getFormatDateDash:function(y){var M=y.getFullYear(),S=String(y.getMonth()+1).padStart(2,"0"),N=String(y.getDate()).padStart(2,"0");return"".concat(M,"-").concat(S,"-").concat(N)},getFormatDateCompact:function(y){var M=y.getFullYear(),S=String(y.getMonth()+1).padStart(2,"0"),N=String(y.getDate()).padStart(2,"0");return"".concat(M).concat(S).concat(N)},getDateObject:function(y){var M={y:null,M:null,d:null};if(typeof y=="string"){var S=null,N=null,O=null;if((y=(y=te.utils.getToString(y)).split(" ")[0]).includes("-")){var T=Ue(y.split("-").map(function(V){return parseInt(V,10)}),3);S=T[0],N=T[1],O=T[2]}else if(y.includes("/")){var G=Ue(y.split("/").map(function(V){return parseInt(V,10)}),3);S=G[0],N=G[1],O=G[2]}else{if(y.length!==8)return M;S=parseInt(y.substring(0,4),10),N=parseInt(y.substring(4,6),10),O=parseInt(y.substring(6,8),10)}M.y=S,M.M=N,M.d=O}else y instanceof Date&&(M.y=y.getFullYear(),M.M=y.getMonth()+1,M.d=y.getDate());return M},getTimeObject:function(y){var M={h:null,m:null,s:null};if(typeof y=="string"){var S=null,N=null,O=null,T=(y=te.utils.getToString(y)).split(" ");if((y=T.length>1?T[1]:y).includes(":")){var G=Ue(y.split(":").map(function(V){return parseInt(V,10)}),3);S=G[0],N=G[1],O=G[2]}else{if(y.length!==6)return{h:null,m:null,s:null};S=parseInt(y.substring(0,2),10),N=parseInt(y.substring(2,4),10),O=parseInt(y.substring(4,6),10)}M.h=S,M.m=N,M.s=O}else y instanceof Date&&(M.h=y.getHours(),M.m=y.getMinutes(),M.s=y.getSeconds());return M},getDatetimeObject:function(y){if(typeof y=="string"){var M=(y=te.utils.getToString(y)).split(" "),S=M[0];if(S.includes(":")||S.length===6)return Object.assign({},te.utils.getDateObject(te.utils.getSysDate("yyyy-MM-dd")),te.utils.getTimeObject(S));var N=M.length>1?M[1]:"";return Object.assign({},te.utils.getDateObject(S),te.utils.getTimeObject(N))}return y instanceof Date?{y:y.getFullYear(),M:y.getMonth()+1,d:y.getDate(),h:y.getHours(),m:y.getMinutes(),s:y.getSeconds()}:null},getJSDateObject:function(y){if(y instanceof Date&&!isNaN(y.getTime()))return y;y=te.utils.getToString(y).trim();var M=te.utils.getDateObject(y),S=M.y,N=M.M,O=M.d,T=te.utils.getTimeObject(y),G=T.h,V=T.m,Z=T.s;return S===null||N===null||O===null?null:new Date(S,N-1,O,G??0,V??0,Z??0)},addDate:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=arguments.length>2?arguments[2]:void 0,N=arguments.length>3?arguments[3]:void 0,O=te.utils.isObject(y)?te.utils.deepCopyObject(y):te.utils.getDatetimeObject(y);if(N||(N=O.h===void 0||O.h===null?ae.utils.dateFormat:ae.utils.datetimeFormat),!te.utils.isInteger(M))throw new Error(`ER0001 Please enter a valid value.
12
+ =>`.concat(JSON.stringify(M)));if(M=te.utils.getToNumber(M),O.M=O.M===null||O.M===void 0?1:O.M,O.d=O.d===null||O.d===void 0?1:O.d,O.h=O.h===null||O.h===void 0?0:O.h,O.m=O.m===null||O.m===void 0?0:O.m,O.s=O.s===null||O.s===void 0?0:O.s,!te.utils.isDate(O))throw new Error(`ER0002 Please enter a valid date.
13
+ =>`.concat(JSON.stringify(y)));if(!te.utils.isTime(O))throw new Error(`ER0003 Please enter a valid date.
14
+ =>`.concat(JSON.stringify(y)));if(O.y===null||O.M===null||O.d===null)throw new Error(`ER0002 Please enter a valid date.
15
+ =>`.concat(JSON.stringify(y)));var T=new Date(O.y,O.M-1,O.d,O.h,O.m,O.s);switch(S){case"y":T.setFullYear(T.getFullYear()+M);break;case"M":T.setMonth(T.getMonth()+M);break;case"d":default:T.setDate(T.getDate()+M);break;case"h":T.setHours(T.getHours()+M);break;case"m":T.setMinutes(T.getMinutes()+M);break;case"s":T.setSeconds(T.getSeconds()+M)}var G={y:T.getFullYear(),M:T.getMonth()+1,d:T.getDate(),h:T.getHours(),m:T.getMinutes(),s:T.getSeconds()};return te.utils.isObject(y)?G:te.utils.getDateWithFormat(G,N)},getDateDiff:function(y,M,S){var N=te.utils.isObject(y)?te.utils.deepCopyObject(y):te.utils.getDatetimeObject(y),O=te.utils.isObject(M)?te.utils.deepCopyObject(M):te.utils.getDatetimeObject(M);if(N.M=N.M||1,O.M=O.M||1,N.d=N.d||1,O.d=O.d||1,N.h=N.h||0,O.h=O.h||0,N.m=N.m||0,O.m=O.m||0,N.s=N.s||0,O.s=O.s||0,!te.utils.isDate(N))throw new Error(`ER0004 Please enter a valid date.
16
+ =>`.concat(JSON.stringify(N)));if(!te.utils.isTime(N))throw new Error(`ER0005 Please enter a valid date.
17
+ =>`.concat(JSON.stringify(N)));if(!te.utils.isDate(O))throw new Error(`ER0006 Please enter a valid date.
18
+ =>`.concat(JSON.stringify(O)));if(!te.utils.isTime(O))throw new Error(`ER0007 Please enter a valid date.
19
+ =>`.concat(JSON.stringify(O)));if(N.y===null)throw new Error(`ER0004 Please enter a valid date.
20
+ =>`.concat(JSON.stringify(N)));if(O.y===null)throw new Error(`ER0005 Please enter a valid date.
21
+ =>`.concat(JSON.stringify(O)));var T=new Date(N.y,N.M-1,N.d,N.h,N.m,N.s),G=new Date(O.y,O.M-1,O.d,O.h,O.m,O.s);switch(S){case"y":return G.getFullYear()-T.getFullYear();case"M":return 12*(G.getFullYear()-T.getFullYear())+G.getMonth()-T.getMonth();case"d":default:return Math.floor((G.getTime()-T.getTime())/864e5);case"h":return Math.floor((G.getTime()-T.getTime())/36e5);case"m":return Math.floor((G.getTime()-T.getTime())/6e4);case"s":return Math.floor((G.getTime()-T.getTime())/1e3)}},getMonthName:function(y){var M=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(typeof y=="string"&&(y=parseInt(y,10)),y<1||y>12)throw new Error("ER0008 Month must be between 1 and 12");return M?r[y]:i[y]},getDateWithFormat:function(y,M){var S;S=y instanceof Date&&!isNaN(y.getTime())?te.utils.getDatetimeObject(y):te.utils.isObject(y)?te.utils.deepCopyObject(y):te.utils.getDatetimeObject(y),M||(M=S.h===void 0||S.h===null?ae.utils.dateFormat:ae.utils.datetimeFormat);var N,O,T=S.y.toString(),G=(S.M||1).toString().padStart(2,"0"),V=(S.d||1).toString().padStart(2,"0"),Z=(S.h||0).toString().padStart(2,"0"),ne=(S.h!==0&&S.h%12==0?12:S.h%12).toString().padStart(2,"0"),Y=(S.m||0).toString().padStart(2,"0"),le=(S.s||0).toString().padStart(2,"0");switch(te.utils.isDate(T+G+V)?(N=te.utils.getMonthName(S.M),O=te.utils.getMonthName(S.M,!1)):(T=te.utils.getSysYear("yyyy"),G=te.utils.getSysMonth("MM"),V=te.utils.getSysDay("dd"),N=te.utils.getMonthName(te.utils.getSysMonth("M")),O=te.utils.getMonthName(te.utils.getSysMonth("M"),!1)),te.utils.isTime(Z+Y+le)||(Z="00",ne="00",Y="00",le="00"),M){case"yyyy":return T;case"yyyyMM":return T+G;case"yyyy-MM":return T+"-"+G;case"yyyy/MM":return T+"/"+G;case"yyyy. MM":return T+". "+G;case"yyyy MM":return T+" "+G;case"yyyyMMdd":return T+G+V;case"yyyy-MM-dd":return T+"-"+G+"-"+V;case"yyyy/MM/dd":return T+"/"+G+"/"+V;case"yyyy. MM. dd":return T+". "+G+". "+V;case"yyyy MM dd":return T+" "+G+" "+V;case"yyyyMMdd hh":return T+G+V+" "+ne;case"yyyyMMdd hhmm":return T+G+V+" "+ne+Y;case"yyyyMMdd hhmmss":return T+G+V+" "+ne+Y+le;case"yyyyMMdd hh:mm":return T+G+V+" "+ne+":"+Y;case"yyyyMMdd hh:mm:ss":return T+G+V+" "+ne+":"+Y+":"+le;case"yyyy-MM-dd hh":return T+"-"+G+"-"+V+" "+ne;case"yyyy-MM-dd hhmm":return T+"-"+G+"-"+V+" "+ne+Y;case"yyyy-MM-dd hhmmss":return T+"-"+G+"-"+V+" "+ne+Y+le;case"yyyy-MM-dd hh:mm":return T+"-"+G+"-"+V+" "+ne+":"+Y;case"yyyy-MM-dd hh:mm:ss":return T+"-"+G+"-"+V+" "+ne+":"+Y+":"+le;case"yyyy/MM/dd hh":return T+"/"+G+"/"+V+" "+ne;case"yyyy/MM/dd hhmm":return T+"/"+G+"/"+V+" "+ne+Y;case"yyyy/MM/dd hhmmss":return T+"/"+G+"/"+V+" "+ne+Y+le;case"yyyy/MM/dd hh:mm":return T+"/"+G+"/"+V+" "+ne+":"+Y;case"yyyy/MM/dd hh:mm:ss":return T+"/"+G+"/"+V+" "+ne+":"+Y+":"+le;case"yyyy. MM. dd hh":return T+". "+G+". "+V+" "+ne;case"yyyy. MM. dd hhmm":return T+". "+G+". "+V+" "+ne+Y;case"yyyy. MM. dd hhmmss":return T+". "+G+". "+V+" "+ne+Y+le;case"yyyy. MM. dd hh:mm":return T+". "+G+". "+V+" "+ne+":"+Y;case"yyyy. MM. dd hh:mm:ss":return T+". "+G+". "+V+" "+ne+":"+Y+":"+le;case"yyyy MM dd hh":return T+" "+G+" "+V+" "+ne;case"yyyy MM dd hhmm":return T+" "+G+" "+V+" "+ne+Y;case"yyyy MM dd hhmmss":return T+" "+G+" "+V+" "+ne+Y+le;case"yyyy MM dd hh:mm":return T+" "+G+" "+V+" "+ne+":"+Y;case"yyyy MM dd hh:mm:ss":return T+" "+G+" "+V+" "+ne+":"+Y+":"+le;case"yyyyMMdd HH":return T+G+V+" "+Z;case"yyyyMMdd HHmm":return T+G+V+" "+Z+Y;case"yyyyMMdd HHmmss":return T+G+V+" "+Z+Y+le;case"yyyyMMdd HH:mm":return T+G+V+" "+Z+":"+Y;case"yyyyMMdd HH:mm:ss":return T+G+V+" "+Z+":"+Y+":"+le;case"yyyy-MM-dd HH":return T+"-"+G+"-"+V+" "+Z;case"yyyy-MM-dd HHmm":return T+"-"+G+"-"+V+" "+Z+Y;case"yyyy-MM-dd HHmmss":return T+"-"+G+"-"+V+" "+Z+Y+le;case"yyyy-MM-dd HH:mm":return T+"-"+G+"-"+V+" "+Z+":"+Y;case"yyyy-MM-dd HH:mm:ss":return T+"-"+G+"-"+V+" "+Z+":"+Y+":"+le;case"yyyy/MM/dd HH":return T+"/"+G+"/"+V+" "+Z;case"yyyy/MM/dd HHmm":return T+"/"+G+"/"+V+" "+Z+Y;case"yyyy/MM/dd HHmmss":return T+"/"+G+"/"+V+" "+Z+Y+le;case"yyyy/MM/dd HH:mm":return T+"/"+G+"/"+V+" "+Z+":"+Y;case"yyyy/MM/dd HH:mm:ss":return T+"/"+G+"/"+V+" "+Z+":"+Y+":"+le;case"yyyy. MM. dd HH":return T+". "+G+". "+V+" "+Z;case"yyyy. MM. dd HHmm":return T+". "+G+". "+V+" "+Z+Y;case"yyyy. MM. dd HHmmss":return T+". "+G+". "+V+" "+Z+Y+le;case"yyyy. MM. dd HH:mm":return T+". "+G+". "+V+" "+Z+":"+Y;case"yyyy. MM. dd HH:mm:ss":return T+". "+G+". "+V+" "+Z+":"+Y+":"+le;case"yyyy MM dd HH":return T+" "+G+" "+V+" "+Z;case"yyyy MM dd HHmm":return T+" "+G+" "+V+" "+Z+Y;case"yyyy MM dd HHmmss":return T+" "+G+" "+V+" "+Z+Y+le;case"yyyy MM dd HH:mm":return T+" "+G+" "+V+" "+Z+":"+Y;case"yyyy MM dd HH:mm:ss":return T+" "+G+" "+V+" "+Z+":"+Y+":"+le;case"MMyyyy":return G+T;case"MM-yyyy":return G+"-"+T;case"MM/yyyy":case"MM. yyyy":case"MM yyyy":return G+"/"+T;case"MMMM yyyy":return N+" "+T;case"MMMM, yyyy":return N+", "+T;case"MMM yyyy":return O+" "+T;case"MMM, yyyy":return O+", "+T;case"MMddyyyy":return G+V+T;case"MM-dd-yyyy":return G+"-"+V+"-"+T;case"MM/dd/yyyy":return G+"/"+V+"/"+T;case"MM. dd. yyyy":return G+". "+V+". "+T;case"MMMM dd yyyy":return N+" "+V+" "+T;case"MMMM dd, yyyy":return N+" "+V+", "+T;case"MMM dd yyyy":return O+" "+V+" "+T;case"MMM dd, yyyy":return O+" "+V+", "+T;case"MMddyyyy hh":return G+V+T+" "+ne;case"MMddyyyy hhmm":return G+V+T+" "+ne+Y;case"MMddyyyy hhmmss":return G+V+T+" "+ne+Y+le;case"MMddyyyy hh:mm":return G+V+T+" "+ne+":"+Y;case"MMddyyyy hh:mm:ss":return G+V+T+" "+ne+":"+Y+":"+le;case"MM-dd-yyyy hh":return G+"-"+V+"-"+T+" "+ne;case"MM-dd-yyyy hhmm":return G+"-"+V+"-"+T+" "+ne+Y;case"MM-dd-yyyy hhmmss":return G+"-"+V+"-"+T+" "+ne+Y+le;case"MM-dd-yyyy hh:mm":return G+"-"+V+"-"+T+" "+ne+":"+Y;case"MM-dd-yyyy hh:mm:ss":return G+"-"+V+"-"+T+" "+ne+":"+Y+":"+le;case"MM/dd/yyyy hh":return G+"/"+V+"/"+T+" "+ne;case"MM/dd/yyyy hhmm":return G+"/"+V+"/"+T+" "+ne+Y;case"MM/dd/yyyy hhmmss":return G+"/"+V+"/"+T+" "+ne+Y+le;case"MM/dd/yyyy hh:mm":return G+"/"+V+"/"+T+" "+ne+":"+Y;case"MM/dd/yyyy hh:mm:ss":return G+"/"+V+"/"+T+" "+ne+":"+Y+":"+le;case"MM. dd. yyyy hh":return G+". "+V+". "+T+" "+ne;case"MM. dd. yyyy hhmm":return G+". "+V+". "+T+" "+ne+Y;case"MM. dd. yyyy hhmmss":return G+". "+V+". "+T+" "+ne+Y+le;case"MM. dd. yyyy hh:mm":return G+". "+V+". "+T+" "+ne+":"+Y;case"MM. dd. yyyy hh:mm:ss":return G+". "+V+". "+T+" "+ne+":"+Y+":"+le;case"MMMM dd yyyy hh":return N+" "+V+" "+T+" "+ne;case"MMMM dd yyyy hhmm":return N+" "+V+" "+T+" "+ne+Y;case"MMMM dd yyyy hhmmss":return N+" "+V+" "+T+" "+ne+Y+le;case"MMMM dd yyyy hh:mm":return N+" "+V+" "+T+" "+ne+":"+Y;case"MMMM dd yyyy hh:mm:ss":return N+" "+V+" "+T+" "+ne+":"+Y+":"+le;case"MMMM dd, yyyy hh":return N+" "+V+", "+T+" "+ne;case"MMMM dd, yyyy hhmm":return N+" "+V+", "+T+" "+ne+Y;case"MMMM dd, yyyy hhmmss":return N+" "+V+", "+T+" "+ne+Y+le;case"MMMM dd, yyyy hh:mm":return N+" "+V+", "+T+" "+ne+":"+Y;case"MMMM dd, yyyy hh:mm:ss":return N+" "+V+", "+T+" "+ne+":"+Y+":"+le;case"MMM dd yyyy hh":return O+" "+V+" "+T+" "+ne;case"MMM dd yyyy hhmm":return O+" "+V+" "+T+" "+ne+Y;case"MMM dd yyyy hhmmss":return O+" "+V+" "+T+" "+ne+Y+le;case"MMM dd yyyy hh:mm":return O+" "+V+" "+T+" "+ne+":"+Y;case"MMM dd yyyy hh:mm:ss":return O+" "+V+" "+T+" "+ne+":"+Y+":"+le;case"MMM dd, yyyy hh":return O+" "+V+", "+T+" "+ne;case"MMM dd, yyyy hhmm":return O+" "+V+", "+T+" "+ne+Y;case"MMM dd, yyyy hhmmss":return O+" "+V+", "+T+" "+ne+Y+le;case"MMM dd, yyyy hh:mm":return O+" "+V+", "+T+" "+ne+":"+Y;case"MMM dd, yyyy hh:mm:ss":return O+" "+V+", "+T+" "+ne+":"+Y+":"+le;case"MMddyyyy HH":return G+V+T+" "+Z;case"MMddyyyy HHmm":return G+V+T+" "+Z+Y;case"MMddyyyy HHmmss":return G+V+T+" "+Z+Y+le;case"MMddyyyy HH:mm":return G+V+T+" "+Z+":"+Y;case"MMddyyyy HH:mm:ss":return G+V+T+" "+Z+":"+Y+":"+le;case"MM-dd-yyyy HH":return G+"-"+V+"-"+T+" "+Z;case"MM-dd-yyyy HHmm":return G+"-"+V+"-"+T+" "+Z+Y;case"MM-dd-yyyy HHmmss":return G+"-"+V+"-"+T+" "+Z+Y+le;case"MM-dd-yyyy HH:mm":return G+"-"+V+"-"+T+" "+Z+":"+Y;case"MM-dd-yyyy HH:mm:ss":return G+"-"+V+"-"+T+" "+Z+":"+Y+":"+le;case"MM/dd/yyyy HH":return G+"/"+V+"/"+T+" "+Z;case"MM/dd/yyyy HHmm":return G+"/"+V+"/"+T+" "+Z+Y;case"MM/dd/yyyy HHmmss":return G+"/"+V+"/"+T+" "+Z+Y+le;case"MM/dd/yyyy HH:mm":return G+"/"+V+"/"+T+" "+Z+":"+Y;case"MM/dd/yyyy HH:mm:ss":return G+"/"+V+"/"+T+" "+Z+":"+Y+":"+le;case"MM. dd. yyyy HH":return G+". "+V+". "+T+" "+Z;case"MM. dd. yyyy HHmm":return G+". "+V+". "+T+" "+Z+Y;case"MM. dd. yyyy HHmmss":return G+". "+V+". "+T+" "+Z+Y+le;case"MM. dd. yyyy HH:mm":return G+". "+V+". "+T+" "+Z+":"+Y;case"MM. dd. yyyy HH:mm:ss":return G+". "+V+". "+T+" "+Z+":"+Y+":"+le;case"MMMM dd yyyy HH":return N+" "+V+" "+T+" "+Z;case"MMMM dd yyyy HHmm":return N+" "+V+" "+T+" "+Z+Y;case"MMMM dd yyyy HHmmss":return N+" "+V+" "+T+" "+Z+Y+le;case"MMMM dd yyyy HH:mm":return N+" "+V+" "+T+" "+Z+":"+Y;case"MMMM dd yyyy HH:mm:ss":return N+" "+V+" "+T+" "+Z+":"+Y+":"+le;case"MMMM dd, yyyy HH":return N+" "+V+", "+T+" "+Z;case"MMMM dd, yyyy HHmm":return N+" "+V+", "+T+" "+Z+Y;case"MMMM dd, yyyy HHmmss":return N+" "+V+", "+T+" "+Z+Y+le;case"MMMM dd, yyyy HH:mm":return N+" "+V+", "+T+" "+Z+":"+Y;case"MMMM dd, yyyy HH:mm:ss":return N+" "+V+", "+T+" "+Z+":"+Y+":"+le;case"MMM dd yyyy HH":return O+" "+V+" "+T+" "+Z;case"MMM dd yyyy HHmm":return O+" "+V+" "+T+" "+Z+Y;case"MMM dd yyyy HHmmss":return O+" "+V+" "+T+" "+Z+Y+le;case"MMM dd yyyy HH:mm":return O+" "+V+" "+T+" "+Z+":"+Y;case"MMM dd yyyy HH:mm:ss":return O+" "+V+" "+T+" "+Z+":"+Y+":"+le;case"MMM dd, yyyy HH":return O+" "+V+", "+T+" "+Z;case"MMM dd, yyyy HHmm":return O+" "+V+", "+T+" "+Z+Y;case"MMM dd, yyyy HHmmss":return O+" "+V+", "+T+" "+Z+Y+le;case"MMM dd, yyyy HH:mm":return O+" "+V+", "+T+" "+Z+":"+Y;case"MMM dd, yyyy HH:mm:ss":return O+" "+V+", "+T+" "+Z+":"+Y+":"+le;case"ddMMyyyy":return V+G+T;case"dd-MM-yyyy":return V+"-"+G+"-"+T;case"dd/MM/yyyy":return V+"/"+G+"/"+T;case"dd. MM. yyyy":return V+". "+G+". "+T;case"dd MMMM yyyy":return V+" "+N+" "+T;case"dd MMM yyyy":return V+" "+O+" "+T;case"ddMMyyyy hh":return V+G+T+" "+ne;case"ddMMyyyy hhmm":return V+G+T+" "+ne+Y;case"ddMMyyyy hhmmss":return V+G+T+" "+ne+Y+le;case"ddMMyyyy hh:mm":return V+G+T+" "+ne+":"+Y;case"ddMMyyyy hh:mm:ss":return V+G+T+" "+ne+":"+Y+":"+le;case"dd-MM-yyyy hh":return V+"-"+G+"-"+T+" "+ne;case"dd-MM-yyyy hhmm":return V+"-"+G+"-"+T+" "+ne+Y;case"dd-MM-yyyy hhmmss":return V+"-"+G+"-"+T+" "+ne+Y+le;case"dd-MM-yyyy hh:mm":return V+"-"+G+"-"+T+" "+ne+":"+Y;case"dd-MM-yyyy hh:mm:ss":return V+"-"+G+"-"+T+" "+ne+":"+Y+":"+le;case"dd/MM/yyyy hh":return V+"/"+G+"/"+T+" "+ne;case"dd/MM/yyyy hhmm":return V+"/"+G+"/"+T+" "+ne+Y;case"dd/MM/yyyy hhmmss":return V+"/"+G+"/"+T+" "+ne+Y+le;case"dd/MM/yyyy hh:mm":return V+"/"+G+"/"+T+" "+ne+":"+Y;case"dd/MM/yyyy hh:mm:ss":return V+"/"+G+"/"+T+" "+ne+":"+Y+":"+le;case"dd. MM. yyyy hh":return V+". "+G+". "+T+" "+ne;case"dd. MM. yyyy hhmm":return V+". "+G+". "+T+" "+ne+Y;case"dd. MM. yyyy hhmmss":return V+". "+G+". "+T+" "+ne+Y+le;case"dd. MM. yyyy hh:mm":return V+". "+G+". "+T+" "+ne+":"+Y;case"dd. MM. yyyy hh:mm:ss":return V+". "+G+". "+T+" "+ne+":"+Y+":"+le;case"dd MMMM yyyy hh":return V+" "+N+" "+T+" "+ne;case"dd MMMM yyyy hhmm":return V+" "+N+" "+T+" "+ne+Y;case"dd MMMM yyyy hhmmss":return V+" "+N+" "+T+" "+ne+Y+le;case"dd MMMM yyyy hh:mm":return V+" "+N+" "+T+" "+ne+":"+Y;case"dd MMMM yyyy hh:mm:ss":return V+" "+N+" "+T+" "+ne+":"+Y+":"+le;case"dd MMM yyyy hh":return V+" "+O+" "+T+" "+ne;case"dd MMM yyyy hhmm":return V+" "+O+" "+T+" "+ne+Y;case"dd MMM yyyy hhmmss":return V+" "+O+" "+T+" "+ne+Y+le;case"dd MMM yyyy hh:mm":return V+" "+O+" "+T+" "+ne+":"+Y;case"dd MMM yyyy hh:mm:ss":return V+" "+O+" "+T+" "+ne+":"+Y+":"+le;case"ddMMyyyy HH":return V+G+T+" "+Z;case"ddMMyyyy HHmm":return V+G+T+" "+Z+Y;case"ddMMyyyy HHmmss":return V+G+T+" "+Z+Y+le;case"ddMMyyyy HH:mm":return V+G+T+" "+Z+":"+Y;case"ddMMyyyy HH:mm:ss":return V+G+T+" "+Z+":"+Y+":"+le;case"dd-MM-yyyy HH":return V+"-"+G+"-"+T+" "+Z;case"dd-MM-yyyy HHmm":return V+"-"+G+"-"+T+" "+Z+Y;case"dd-MM-yyyy HHmmss":return V+"-"+G+"-"+T+" "+Z+Y+le;case"dd-MM-yyyy HH:mm":return V+"-"+G+"-"+T+" "+Z+":"+Y;case"dd-MM-yyyy HH:mm:ss":return V+"-"+G+"-"+T+" "+Z+":"+Y+":"+le;case"dd/MM/yyyy HH":return V+"/"+G+"/"+T+" "+Z;case"dd/MM/yyyy HHmm":return V+"/"+G+"/"+T+" "+Z+Y;case"dd/MM/yyyy HHmmss":return V+"/"+G+"/"+T+" "+Z+Y+le;case"dd/MM/yyyy HH:mm":return V+"/"+G+"/"+T+" "+Z+":"+Y;case"dd/MM/yyyy HH:mm:ss":return V+"/"+G+"/"+T+" "+Z+":"+Y+":"+le;case"dd. MM. yyyy HH":return V+". "+G+". "+T+" "+Z;case"dd. MM. yyyy HHmm":return V+". "+G+". "+T+" "+Z+Y;case"dd. MM. yyyy HHmmss":return V+". "+G+". "+T+" "+Z+Y+le;case"dd. MM. yyyy HH:mm":return V+". "+G+". "+T+" "+Z+":"+Y;case"dd. MM. yyyy HH:mm:ss":return V+". "+G+". "+T+" "+Z+":"+Y+":"+le;case"dd MMMM yyyy HH":return V+" "+N+" "+T+" "+Z;case"dd MMMM yyyy HHmm":return V+" "+N+" "+T+" "+Z+Y;case"dd MMMM yyyy HHmmss":return V+" "+N+" "+T+" "+Z+Y+le;case"dd MMMM yyyy HH:mm":return V+" "+N+" "+T+" "+Z+":"+Y;case"dd MMMM yyyy HH:mm:ss":return V+" "+N+" "+T+" "+Z+":"+Y+":"+le;case"dd MMM yyyy HH":return V+" "+O+" "+T+" "+Z;case"dd MMM yyyy HHmm":return V+" "+O+" "+T+" "+Z+Y;case"dd MMM yyyy HHmmss":return V+" "+O+" "+T+" "+Z+Y+le;case"dd MMM yyyy HH:mm":return V+" "+O+" "+T+" "+Z+":"+Y;case"dd MMM yyyy HH:mm:ss":return V+" "+O+" "+T+" "+Z+":"+Y+":"+le;case"hhmm":return ne+Y;case"hh:mm":return ne+":"+Y;case"HHmm":return Z+Y;case"HH:mm":return Z+":"+Y;case"hhmmss":return ne+Y+le;case"hh:mm:ss":return ne+":"+Y+":"+le;case"HHmmss":return Z+Y+le;case"HH:mm:ss":return Z+":"+Y+":"+le;default:throw new Error(`ER0010 Invalid format.
22
+ =>`.concat(JSON.stringify(M)))}},getDayOfWeek:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae.utils.dayOfWeekFormat,S=te.utils.isObject(y)?y:te.utils.getDateObject(y);if(!te.utils.isDate(S))throw new Error(`ER0011 Invalid format.
23
+ =>`.concat(JSON.stringify(y)));if(S.y===null||S.M===null||S.d===null)throw new Error(`ER0011 Invalid format.
24
+ =>`.concat(JSON.stringify(y)));var N=new Date(S.y,S.M-1,S.d).getDay();switch(M.toLowerCase()){case"d":default:return N.toString();case"dy":return c[N];case"day":return a[N];case"kdy":return C[N];case"kday":return m[N]}},getLastDay:function(y){var M;if(te.utils.isObject(y)?(M=te.utils.deepCopyObject(y)).d=1:(y.includes("-")?y+="-01":y.includes("/")?y+="/01":y+="01",M=te.utils.getDateObject(y)),!te.utils.isDate(M))throw new Error(`ER0012 Invalid format.
25
+ =>`.concat(JSON.stringify(y)));if(M.y===null||M.M===null)throw new Error(`ER0012 Invalid format.
26
+ =>`.concat(JSON.stringify(y)));var S=new Date(M.y,M.M,1);return S.setDate(0),S.getDate()},getSysYear:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.yearFormat,M=new Date;return y.toLowerCase()==="yy"?M.getFullYear().toString().substring(2):M.getFullYear().toString()},getSysMonth:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.monthFormat,M=new Date().getMonth()+1;switch(y.toLowerCase()){case"mm":return M.toString().padStart(2,"0");case"mmmm":return te.utils.getMonthName(M);case"mmm":return te.utils.getMonthName(M,!1);default:return M.toString()}},getSysYearMonth:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.yearMonthFormat,M=new Date;return te.utils.getDateWithFormat({y:M.getFullYear(),M:M.getMonth()+1,d:1},y)},getSysDay:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.dayFormat,M=new Date;return y.toLowerCase()==="dd"?M.getDate().toString().padStart(2,"0"):M.getDate().toString()},getSysDayOfWeek:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.dayOfWeekFormat,M=new Date;return te.utils.getDayOfWeek({y:M.getFullYear(),M:M.getMonth()+1,d:M.getDate()},y)},getSysHour:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.hourFormat,M=new Date;return y.toLowerCase()==="hh"?M.getHours().toString().padStart(2,"0"):M.getHours().toString()},getSysHourMinute:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.hourMinuteFormat,M=new Date;return y.toLowerCase()==="hhmm"?M.getHours().toString().padStart(2,"0")+""+M.getMinutes().toString().padStart(2,"0"):M.getHours().toString().padStart(2,"0")+":"+M.getMinutes().toString().padStart(2,"0")},getSysMinute:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.minuteFormat,M=new Date;return y.toLowerCase()==="mm"?M.getMinutes().toString().padStart(2,"0"):M.getMinutes().toString()},getSysSecond:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.secondFormat,M=new Date;return y.toLowerCase()==="ss"?M.getSeconds().toString().padStart(2,"0"):M.getSeconds().toString()},getSysTime:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.timeFormat,M=new Date;return y.toLowerCase()==="hhmmss"?M.getHours().toString().padStart(2,"0")+M.getMinutes().toString().padStart(2,"0")+M.getSeconds().toString().padStart(2,"0"):M.getHours().toString().padStart(2,"0")+":"+M.getMinutes().toString().padStart(2,"0")+":"+M.getSeconds().toString().padStart(2,"0")},getSysDate:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae.utils.datetimeFormat,M=new Date;return te.utils.getDateWithFormat({y:M.getFullYear(),M:M.getMonth()+1,d:M.getDate(),h:M.getHours(),m:M.getMinutes(),s:M.getSeconds()},y)},getCeil:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;y=te.utils.getToNumber(y),M=Math.trunc(te.utils.getToNumber(M));var S=Math.pow(10,M);return Math.ceil(y*S)/S},getFloor:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;y=te.utils.getToNumber(y),M=Math.trunc(te.utils.getToNumber(M));var S=Math.pow(10,M);return Math.floor(y*S)/S},getRound:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;y=te.utils.getToNumber(y),M=Math.trunc(te.utils.getToNumber(M));var S=Math.pow(10,M);return Math.round(y*S)/S},getTrunc:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;y=te.utils.getToNumber(y),M=Math.trunc(te.utils.getToNumber(M));var S=Math.pow(10,M);return Math.trunc(y*S)/S},getByteLength:function(y){y=te.utils.getToString(y);for(var M=0,S=0;S<y.length;S++){var N=y.charCodeAt(S);M+=N<=127?1:N<=2047?ae.utils.LESSOREQ_0X7FF_BYTE:N<=65535?ae.utils.LESSOREQ_0XFFFF_BYTE:ae.utils.GREATER_0XFFFF_BYTE}return M},getCutByteLength:function(y,M){y=te.utils.getToString(y),M=te.utils.getToNumber(M);for(var S=0,N=y.length,O=0;O<y.length;O++){var T=y.charCodeAt(O);if((S+=T<=127?1:T<=2047?ae.utils.LESSOREQ_0X7FF_BYTE:T<=65535?ae.utils.LESSOREQ_0XFFFF_BYTE:ae.utils.GREATER_0XFFFF_BYTE)>M){N=O;break}}return y.substring(0,N)},getStringLenForm:function(y,M){y=te.utils.getToString(y),M=te.utils.getToNumber(M);var S=y.length;if(S>=M)return y;for(var N=M-S,O=S-1,T=Math.floor(N/O),G=N%O,V="",Z=0;Z<O;Z++)V+=y[Z],V+=" ".repeat(T+(Z<G?1:0));return V+y[S-1]},getLpad:function(y,M,S){return y=te.utils.getToString(y),M=te.utils.getToString(M),S=te.utils.getToNumber(S),y.length>=S?y.slice(-S):M.repeat((S-y.length)/M.length)+y},getRpad:function(y,M,S){return y=te.utils.getToString(y),M=te.utils.getToString(M),S=te.utils.getToNumber(S),y.length>=S?y.substring(0,S):y+M.repeat((S-y.length)/M.length)},getTrim:function(y){return(y=te.utils.getToString(y)).trim()},getReplaceAll:function(y,M){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return y=te.utils.getToString(y),M=te.utils.getToString(M),S=te.utils.getToString(S),y.split(M).join(S)},getNumberFormat:function(y,M){y=te.utils.getToNumber(y),M=te.utils.getToString(M);var S=y;if(!te.utils.isNumeric(y))throw new Error(`ER0021 Invalid number
27
+ =>`.concat(JSON.stringify(S)));var N=(M=M||ae.utils.numberFormat).match(/^(.*?)([#0,.]+)(.*?)$/);if(!N)throw new Error(`ER0022 Invalid format
28
+ =>`.concat(JSON.stringify(M)));var O=N[1],T=N[2],G=N[3],V=T.split(".")[0],Z=T.split(".").length>1?T.split(".")[1]:"";G!=="%"&&G!==" %"||(y*=100);var ne,Y=te.utils.getToString(y),le=Y[0]==="-",qe=(Y=le?Y.substring(1):Y).split(".")[0],_t=Y.split(".").length>1?Y.split(".")[1]:"";switch(_t=(_t=te.utils.getToFloat("0."+_t).toLocaleString("en",{minimumFractionDigits:Z.lastIndexOf("0")+1,maximumFractionDigits:Z.length}))==="0"?"":_t.substring(1),V){case"#,###":ne=te.utils.getToNumber(qe)===0?_t:(qe=te.utils.getToFloat(qe).toLocaleString("en"))+_t;break;case"#,##0":ne=(qe=te.utils.getToFloat(qe).toLocaleString("en"))+_t;break;case"#":ne=te.utils.getToNumber(qe)===0?_t:qe+_t;break;case"0":ne=qe+_t;break;default:throw new Error(`ER0023 Invalid format
29
+ =>`.concat(JSON.stringify(M)))}return O+(ne=le?"-"+ne:ne)+G},getRemoveExceptNumbers:function(y){return(y=te.utils.getToString(y)).replace(/[^0-9]/g,"")},getRemoveNumbers:function(y){return(y=te.utils.getToString(y)).replace(/[0-9]/g,"")},getReverse:function(y){return(y=te.utils.getToString(y)).split("").reverse().join("")},getToBoolean:function(y){return te.utils.isNumeric(y)?Number(y)!=0:typeof y=="boolean"?y:typeof y=="string"&&["t","true","y","yes","check","c","checked","selected","참"].indexOf(y.toLowerCase())>=0},getToNumber:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return te.utils.getToFloat(y,M)},getToFloat:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return te.utils.isNumeric(y)?parseFloat(y):M},getToInteger:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return te.utils.isNumeric(y)?Math.trunc(parseInt(y,10)):Math.trunc(M)},getToString:function(y){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof y=="string"||(y=typeof y=="number"||typeof y=="boolean"||typeof y=="bigint"?String(y):rt(y)==="symbol"?y.description:M),y},nvl:function(y,M){return y??M},getFileExtension:function(y){var M=(y=te.utils.getToString(y)).split(".").pop();return M===y?"":M||""},getFileName:function(y){var M=(y=te.utils.getToString(y)).split("/").pop();if(!M)return"";var S=M.lastIndexOf(".");return S===-1?M:M.substring(0,S)},getDecodeBase64:function(y){return y=te.utils.getToString(y),decodeURIComponent(Array.prototype.map.call(atob(y),function(M){return"%"+("00"+M.charCodeAt(0).toString(16)).slice(-2)}).join(""))},getEncodeBase64:function(y){return y=te.utils.getToString(y),btoa(encodeURIComponent(y).replace(/%([0-9A-F]{2})/g,function(M,S){return String.fromCharCode(parseInt(S,16))}))},deepCopyObject:function(y,M){if(y===null||rt(y)!=="object")return y;if(y instanceof Response)return y.clone();if(y.constructor!==Object&&y.constructor!==Array)return y&&y.getIsDataWrapper&&y.getIsDataWrapper()||y&&y.getIsDataModel&&y.getIsDataModel()?y.clone():y;M||(M=[]);for(var S=0;S<M.length;S++)if(M[S].source===y)return M[S].copy;var N;if(Array.isArray(y)){N=[],M.push({source:y,copy:N});for(var O=0;O<y.length;O++)N[O]=te.utils.deepCopyObject(y[O],M)}else for(var T in N={},M.push({source:y,copy:N}),y)y.hasOwnProperty(T)&&(N[T]=te.utils.deepCopyObject(y[T],M));return N}}),De(this,"shield",{isHison:!0,excute:function(y){if(!y)throw new Error("Invalid argument: 'hison' is required.");if(!y.shield.isHison)throw new Error("Invalid argument: 'hison' must be an instance of Hison.");var M,S,N=function(O){return Object.getOwnPropertyNames(O).forEach(function(T){var G=O[T];je(G)=="object"&&G!==null&&N(G)}),Object.freeze(O)};if(ae.shield.isFreeze&&N(y),location.href.indexOf("localhost")<0){if(ae.shield.shieldURL&&location.href.indexOf(ae.shield.shieldURL)<0)return;M=function(O){var T=O&&O.ip?O.ip:"";T&&ae.shield.exposeIpList.indexOf(T)>=0||(ae.shield.isPossibleGoBack||(history.pushState(null,document.title,location.href),window.addEventListener("popstate",function(){history.pushState(null,document.title,location.href)})),ae.shield.isPossibleOpenDevTool||function(){var G="Developer mode is not available.";function V(Z){isNaN(+Z)&&(Z=100);var ne=+new Date;ae.shield.doDetectDevTool();var Y=+new Date;(isNaN(ne)||isNaN(Y)||Y-ne>Z)&&(alert(G),document.write(G))}document.onkeydown=function(Z){if(Z.key==="F12")return alert(G),Z.preventDefault(),!1},window.addEventListener("load",V),window.addEventListener("resize",V),window.addEventListener("mousemove",V),window.addEventListener("focus",V),window.addEventListener("blur",V)}())},(S=new XMLHttpRequest).onreadystatechange=function(){if(S.readyState===XMLHttpRequest.DONE)if(S.status===200){var O=S.response;M(O)}else M(null)},S.open("get","/ajax/getIp"),S.responseType="json",S.send()}}}),De(this,"data",{DataWrapper:Zt,DataModel:nn}),De(this,"link",{CachingModule:I,ApiGet:Mt,ApiPost:x,ApiPut:oe,ApiPatch:b,ApiDelete:Se,ApiGetUrl:Rt,ApiPostUrl:g,ApiPutUrl:de,ApiPatchUrl:_,ApiDeleteUrl:ze})})),ht=function(){return{setDateFormat:function(d){ae.utils.dateFormat=d},setTimeFormat:function(d){ae.utils.timeFormat=d},setDatetimeFormat:function(d){ae.utils.datetimeFormat=d},setYearFormat:function(d){ae.utils.yearFormat=d},setMonthFormat:function(d){ae.utils.monthFormat=d},setYearMonthFormat:function(d){ae.utils.yearMonthFormat=d},setDayFormat:function(d){ae.utils.dayFormat=d},setDayOfWeekFormat:function(d){ae.utils.dayOfWeekFormat=d},setHourFormat:function(d){ae.utils.hourFormat=d},setHourMinuteFormat:function(d){ae.utils.hourMinuteFormat=d},setMinuteFormat:function(d){ae.utils.minuteFormat=d},setSecondFormat:function(d){ae.utils.secondFormat=d},setNumberFormat:function(d){ae.utils.numberFormat=d},setCharByteLess2047:function(d){ae.utils.LESSOREQ_0X7FF_BYTE=d},setCharByteLess65535:function(d){ae.utils.LESSOREQ_0XFFFF_BYTE=d},setCharByteGreater65535:function(d){ae.utils.GREATER_0XFFFF_BYTE=d},getDateFormat:function(){return ae.utils.dateFormat},getTimeFormat:function(){return ae.utils.timeFormat},getDatetimeFormat:function(){return ae.utils.datetimeFormat},getYearFormat:function(){return ae.utils.yearFormat},getMonthFormat:function(){return ae.utils.monthFormat},getYearMonthFormat:function(){return ae.utils.yearMonthFormat},getDayFormat:function(){return ae.utils.dayFormat},getDayOfWeekFormat:function(){return ae.utils.dayOfWeekFormat},getHourFormat:function(){return ae.utils.hourFormat},getHourMinuteFormat:function(){return ae.utils.hourMinuteFormat},getMinuteFormat:function(){return ae.utils.minuteFormat},getSecondFormat:function(){return ae.utils.secondFormat},getNumberFormat:function(){return ae.utils.numberFormat},getCharByteLess2047:function(){return ae.utils.LESSOREQ_0X7FF_BYTE},getCharByteLess65535:function(){return ae.utils.LESSOREQ_0XFFFF_BYTE},getCharByteGreater65535:function(){return ae.utils.GREATER_0XFFFF_BYTE},setShieldURL:function(d){ae.shield.shieldURL=d},setExposeIpList:function(d){ae.shield.exposeIpList=d},setIsFreeze:function(d){ae.shield.isFreeze=d},setIsPossibleGoBack:function(d){ae.shield.isPossibleGoBack=d},setIsPossibleOpenDevTool:function(d){ae.shield.isPossibleOpenDevTool=d},setDoDetectDevTool:function(d){ae.shield.doDetectDevTool=d},getShieldURL:function(){return ae.shield.shieldURL},getExposeIpList:function(){return ae.shield.exposeIpList},getIsFreeze:function(){return ae.shield.isFreeze},getIsPossibleGoBack:function(){return ae.shield.isPossibleGoBack},getIsPossibleOpenDevTool:function(){return ae.shield.isPossibleOpenDevTool},setConvertValue:function(d){ae.data.convertValue=d},setProtocol:function(d){ae.link.protocol=d},setDomain:function(d){ae.link.domain=d},setControllerPath:function(d){ae.link.controllerPath=d},setTimeout:function(d){ae.link.timeout=d},setWebSocketProtocol:function(d){ae.link.webSocketProtocol=d},setWebSocketEndPoint:function(d){ae.link.webSocketEndPoint=d},setCachingLimit:function(d){ae.link.cachingLimit=d},getProtocol:function(){return ae.link.protocol},getDomain:function(){return ae.link.domain},getControllerPath:function(){return ae.link.controllerPath},getTimeout:function(){return ae.link.timeout},getWebSocketProtocol:function(){return ae.link.webSocketProtocol},getWebSocketEndPoint:function(){return ae.link.webSocketEndPoint},getCachingLimit:function(){return ae.link.cachingLimit},setBeforeGetRequest:function(d){ae.link.beforeGetRequest=d},setBeforePostRequest:function(d){ae.link.beforePostRequest=d},setBeforePutRequest:function(d){ae.link.beforePutRequest=d},setBeforePatchRequest:function(d){ae.link.beforePatchRequest=d},setBeforeDeleteRequest:function(d){ae.link.beforeDeleteRequest=d},setAfterGetRequest:function(d){ae.link.afterGetRequest=d},setAfterPostRequest:function(d){ae.link.afterPostRequest=d},setAfterPutRequest:function(d){ae.link.afterPutRequest=d},setAfterPatchRequest:function(d){ae.link.afterPatchRequest=d},setAfterDeleteRequest:function(d){ae.link.afterDeleteRequest=d},setBeforeGetUrlRequest:function(d){ae.link.beforeGetUrlRequest=d},setBeforePostUrlRequest:function(d){ae.link.beforePostUrlRequest=d},setBeforePutUrlRequest:function(d){ae.link.beforePutUrlRequest=d},setBeforePatchUrlRequest:function(d){ae.link.beforePatchUrlRequest=d},setBeforeDeleteUrlRequest:function(d){ae.link.beforeDeleteUrlRequest=d},setAfterGetUrlRequest:function(d){ae.link.afterGetUrlRequest=d},setAfterPostUrlRequest:function(d){ae.link.afterPostUrlRequest=d},setAfterPutUrlRequest:function(d){ae.link.afterPutUrlRequest=d},setAfterPatchUrlRequest:function(d){ae.link.afterPatchUrlRequest=d},setAfterDeleteUrlRequest:function(d){ae.link.afterDeleteUrlRequest=d},setInterceptApiResult:function(d){ae.link.interceptApiResult=d},setInterceptApiError:function(d){ae.link.interceptApiError=d},utils:{isAlpha:function(d){return te.utils.isAlpha(d)},isAlphaNumber:function(d){return te.utils.isAlphaNumber(d)},isNumber:function(d){return te.utils.isNumber(d)},isNumberSymbols:function(d){return te.utils.isNumberSymbols(d)},isIncludeSymbols:function(d){return te.utils.isIncludeSymbols(d)},isLowerAlpha:function(d){return te.utils.isLowerAlpha(d)},isLowerAlphaAndNumber:function(d){return te.utils.isLowerAlphaAndNumber(d)},isUpperAlpha:function(d){return te.utils.isUpperAlpha(d)},isUpperAlphaNumber:function(d){return te.utils.isUpperAlphaNumber(d)},isNumeric:function(d){return te.utils.isNumeric(d)},isInteger:function(d){return te.utils.isInteger(d)},isPositiveInteger:function(d){return te.utils.isPositiveInteger(d)},isNegativeInteger:function(d){return te.utils.isNegativeInteger(d)},isArray:function(d){return te.utils.isArray(d)},isObject:function(d){return te.utils.isObject(d)},isDate:function(d){return te.utils.isDate(d)},isTime:function(d){return te.utils.isTime(d)},isDatetime:function(d){return te.utils.isDatetime(d)},isEmail:function(d){return te.utils.isEmail(d)},isURL:function(d){return te.utils.isURL(d)},isValidMask:function(d,y){return te.utils.isValidMask(d,y)},getFormatDateDash:function(d){return te.utils.getFormatDateDash(d)},getFormatDateCompact:function(d){return te.utils.getFormatDateCompact(d)},getDateObject:function(d){return te.utils.getDateObject(d)},getTimeObject:function(d){return te.utils.getTimeObject(d)},getDatetimeObject:function(d){return te.utils.getDatetimeObject(d)},getJSDateObject:function(d){return te.utils.getJSDateObject(d)},addDate:function(d,y,M,S){return te.utils.addDate(d,y,M,S)},getDateDiff:function(d,y,M){return te.utils.getDateDiff(d,y,M)},getMonthName:function(d,y){return te.utils.getMonthName(d,y)},getDateWithFormat:function(d,y){return te.utils.getDateWithFormat(d,y)},getDayOfWeek:function(d,y){return te.utils.getDayOfWeek(d,y)},getLastDay:function(d){return te.utils.getLastDay(d)},getSysYear:function(d){return te.utils.getSysYear(d)},getSysMonth:function(d){return te.utils.getSysMonth(d)},getSysYearMonth:function(d){return te.utils.getSysYearMonth(d)},getSysDay:function(d){return te.utils.getSysDay(d)},getSysDayOfWeek:function(d){return te.utils.getSysDayOfWeek(d)},getSysHour:function(d){return te.utils.getSysHour(d)},getSysHourMinute:function(d){return te.utils.getSysHourMinute(d)},getSysMinute:function(d){return te.utils.getSysMinute(d)},getSysSecond:function(d){return te.utils.getSysSecond(d)},getSysTime:function(d){return te.utils.getSysTime(d)},getSysDate:function(d){return te.utils.getSysDate(d)},getCeil:function(d,y){return te.utils.getCeil(d,y)},getFloor:function(d,y){return te.utils.getFloor(d,y)},getRound:function(d,y){return te.utils.getRound(d,y)},getTrunc:function(d,y){return te.utils.getTrunc(d,y)},getByteLength:function(d){return te.utils.getByteLength(d)},getCutByteLength:function(d,y){return te.utils.getCutByteLength(d,y)},getStringLenForm:function(d,y){return te.utils.getStringLenForm(d,y)},getLpad:function(d,y,M){return te.utils.getLpad(d,y,M)},getRpad:function(d,y,M){return te.utils.getRpad(d,y,M)},getTrim:function(d){return te.utils.getTrim(d)},getReplaceAll:function(d,y,M){return te.utils.getReplaceAll(d,y,M)},getNumberFormat:function(d,y){return te.utils.getNumberFormat(d,y)},getRemoveExceptNumbers:function(d){return te.utils.getRemoveExceptNumbers(d)},getRemoveNumbers:function(d){return te.utils.getRemoveNumbers(d)},getReverse:function(d){return te.utils.getReverse(d)},getToBoolean:function(d){return te.utils.getToBoolean(d)},getToNumber:function(d,y){return te.utils.getToNumber(d,y)},getToFloat:function(d,y){return te.utils.getToFloat(d,y)},getToInteger:function(d,y){return te.utils.getToInteger(d,y)},getToString:function(d,y){return te.utils.getToString(d,y)},nvl:function(d,y){return te.utils.nvl(d,y)},getFileExtension:function(d){return te.utils.getFileExtension(d)},getFileName:function(d){return te.utils.getFileName(d)},getDecodeBase64:function(d){return te.utils.getDecodeBase64(d)},getEncodeBase64:function(d){return te.utils.getEncodeBase64(d)},deepCopyObject:function(d,y){return te.utils.deepCopyObject(d,y)}},shield:{isHison:!0,excute:function(d){te.shield.excute(d)}},data:te.data,link:te.link}};return ht(),o})())}(ui)),ui.exports}var en=Wd();const qd=(t,e)=>{e.dateFormat&&t.setDateFormat(e.dateFormat),e.timeFormat&&t.setTimeFormat(e.timeFormat),e.datetimeFormat&&t.setDatetimeFormat(e.datetimeFormat),e.yearFormat&&t.setYearFormat(e.yearFormat),e.monthFormat&&t.setMonthFormat(e.monthFormat),e.yearMonthFormat&&t.setYearMonthFormat(e.yearMonthFormat),e.dayFormat&&t.setDayFormat(e.dayFormat),e.dayOfWeekFormat&&t.setDayOfWeekFormat(e.dayOfWeekFormat),e.hourFormat&&t.setHourFormat(e.hourFormat),e.hourMinuteFormat&&t.setHourMinuteFormat(e.hourMinuteFormat),e.minuteFormat&&t.setMinuteFormat(e.minuteFormat),e.secondFormat&&t.setSecondFormat(e.secondFormat),e.numberFormat&&t.setNumberFormat(e.numberFormat),e.LESSOREQ_0X7FF_BYTE&&t.setCharByteLess2047(e.LESSOREQ_0X7FF_BYTE),e.LESSOREQ_0XFFFF_BYTE&&t.setCharByteLess65535(e.LESSOREQ_0XFFFF_BYTE),e.GREATER_0XFFFF_BYTE&&t.setCharByteGreater65535(e.GREATER_0XFFFF_BYTE),e.shieldURL&&t.setShieldURL(e.shieldURL),e.exposeIpList&&t.setExposeIpList(e.exposeIpList),e.isFreeze&&t.setIsFreeze(e.isFreeze),e.isPossibleGoBack&&t.setIsPossibleGoBack(e.isPossibleGoBack),e.isPossibleOpenDevTool&&t.setIsPossibleOpenDevTool(e.isPossibleOpenDevTool),e.doDetectDevTool&&t.setDoDetectDevTool(e.doDetectDevTool),e.convertValue&&t.setConvertValue(e.convertValue),e.protocol&&t.setProtocol(e.protocol),e.domain&&t.setDomain(e.domain),e.controllerPath&&t.setControllerPath(e.controllerPath),e.timeout&&t.setTimeout(e.timeout),e.webSocketProtocol&&t.setWebSocketProtocol(e.webSocketProtocol),e.webSocketEndPoint&&t.setWebSocketEndPoint(e.webSocketEndPoint),e.cachingLimit&&t.setCachingLimit(e.cachingLimit),e.beforeGetRequest&&t.setBeforeGetRequest(e.beforeGetRequest),e.beforePostRequest&&t.setBeforePostRequest(e.beforePostRequest),e.beforePutRequest&&t.setBeforePutRequest(e.beforePutRequest),e.beforePatchRequest&&t.setBeforePatchRequest(e.beforePatchRequest),e.beforeDeleteRequest&&t.setBeforeDeleteRequest(e.beforeDeleteRequest),e.afterGetRequest&&t.setAfterGetRequest(e.afterGetRequest),e.afterPostRequest&&t.setAfterPostRequest(e.afterPostRequest),e.afterPutRequest&&t.setAfterPutRequest(e.afterPutRequest),e.afterPatchRequest&&t.setAfterPatchRequest(e.afterPatchRequest),e.afterDeleteRequest&&t.setAfterDeleteRequest(e.afterDeleteRequest),e.beforeGetUrlRequest&&t.setBeforeGetUrlRequest(e.beforeGetUrlRequest),e.beforePostUrlRequest&&t.setBeforePostUrlRequest(e.beforePostUrlRequest),e.beforePutUrlRequest&&t.setBeforePutUrlRequest(e.beforePutUrlRequest),e.beforePatchUrlRequest&&t.setBeforePatchUrlRequest(e.beforePatchUrlRequest),e.beforeDeleteUrlRequest&&t.setBeforeDeleteUrlRequest(e.beforeDeleteUrlRequest),e.afterGetUrlRequest&&t.setAfterGetUrlRequest(e.afterGetUrlRequest),e.afterPostUrlRequest&&t.setAfterPostUrlRequest(e.afterPostUrlRequest),e.afterPutUrlRequest&&t.setAfterPutUrlRequest(e.afterPutUrlRequest),e.afterPatchUrlRequest&&t.setAfterPatchUrlRequest(e.afterPatchUrlRequest),e.afterDeleteUrlRequest&&t.setAfterDeleteUrlRequest(e.afterDeleteUrlRequest),e.interceptApiResult&&t.setInterceptApiResult(e.interceptApiResult),e.interceptApiError&&t.setInterceptApiError(e.interceptApiError)};var fi={exports:{}},$d=fi.exports,xl;function Yd(){return xl||(xl=1,function(t,e){(function(n,o){t.exports=o()})(typeof self<"u"?self:typeof So<"u"?So:$d,()=>(()=>{var n={d:(v,w)=>{for(var A in w)n.o(w,A)&&!n.o(v,A)&&Object.defineProperty(v,A,{enumerable:!0,get:w[A]})},o:(v,w)=>Object.prototype.hasOwnProperty.call(v,w),r:v=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})}},o={};n.r(o),n.d(o,{Align:()=>r,BasicDataType:()=>L,ColorSet:()=>c,DateFormat:()=>m,MonthFormat:()=>C,RowStatus:()=>D,SelectionPolicy:()=>a,VerticalAlign:()=>i,getVanillagrid:()=>Mt,getVanillagridConfig:()=>Rt});var r=function(v){return v.left="left",v.center="center",v.right="right",v}({}),i=function(v){return v.top="top",v.center="center",v.bottom="bottom",v}({}),a=function(v){return v.single="single",v.range="range",v.none="none",v}({}),c=function(v){return v.skyblue="skyblue",v.blue="blue",v.light_red="light-red",v.red="red",v.light_green="light-green",v.green="green",v.orange="orange",v.yellow="yellow",v.purple="purple",v.brown="brown",v.black="black",v}({}),m=function(v){return v["yyyy-mm-dd"]="yyyy-mm-dd",v["yyyy/mm/dd"]="yyyy/mm/dd",v["yyyy. mm. dd"]="yyyy. mm. dd",v.yyyymmdd="yyyymmdd",v["mm-dd-yyyy"]="mm-dd-yyyy",v["mm/dd/yyyy"]="mm/dd/yyyy",v["mm. dd. yyyy"]="mm. dd. yyyy",v.mmddyyyy="mmddyyyy",v["dd-mm-yyyy"]="dd-mm-yyyy",v["dd/mm/yyyy"]="dd/mm/yyyy",v["dd. mm. yyyy"]="dd. mm. yyyy",v.ddmmyyyy="ddmmyyyy",v}({}),C=function(v){return v.yyyymm="yyyymm",v["yyyy-mm"]="yyyy-mm",v["yyyy/mm"]="yyyy/mm",v["yyyy. mm"]="yyyy. mm",v.mmyyyy="mmyyyy",v["mm-yyyy"]="mm-yyyy",v["mm/yyyy"]="mm/yyyy",v["mm. yyyy"]="mm. yyyy",v}({}),L=function(v){return v.text="text",v.number="number",v.date="date",v.month="month",v.mask="mask",v.select="select",v.checkbox="checkbox",v.button="button",v.link="link",v.code="code",v}({}),D=function(v){return v.create="C",v.update="U",v.delete="D",v}({}),W=Object.freeze({text:"text",number:"number",date:"date",month:"month",mask:"mask",select:"select",checkbox:"checkbox",button:"button",link:"link",code:"code"}),K=Object.freeze({pixel:"px",percent:"%"}),X=Object.freeze({left:"left",center:"center",right:"right"}),ee=Object.freeze({top:"top",center:"center",bottom:"bottom"}),re=Object.freeze({max:"$$MAX",min:"$$MIN",sum:"$$SUM",avg:"$$AVG"}),fe=Object.freeze({create:"C",update:"U",delete:"D"}),ye=Object.freeze({single:"single",range:"range",none:"none"});function xe(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}function ke(v){return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},ke(v)}var ve=function(v){var w=Number(v);if(isNaN(w))throw new Error("The provided parameter is not a number.");return w},Ee=function(v){var w=Number(v);if(isNaN(w))throw new Error("The provided parameter is not a number.");if(!Number.isInteger(w))throw new Error("The provided number is not an integer.");return w},Me=function(v){var w=Number(v);if(isNaN(w))throw new Error("The provided parameter is not a number.");if(!Number.isInteger(w))throw new Error("The provided number is not an integer.");if(w<0)throw new Error("The provided number is not a positive integer.");return w},Ie=function(v){if(v==null)return{number:0,unit:""};v=v.trim();var w=/^([+-]?\d*\.?\d+)([a-zA-Z%]+)$/;if(w.test(v)){var A=v.match(w);return{number:parseFloat(A[1]),unit:A[2]}}return/^[+-]?\d*\.?\d+$/.test(v)?{number:parseFloat(v),unit:""}:/^[a-zA-Z%]+$/.test(v)?{number:0,unit:v}:{number:0,unit:""}},Te=function(v){return v&&typeof v=="string"?v.toLowerCase():""},We=function(v,w){return Object.values(v).includes(w)},nt=function(v,w,A){var x=Number(v),g=Number(w),p=Number(A),B=new Date(x,g-1,p);return B.getFullYear()==x&&B.getMonth()+1==g&&B.getDate()==p},Pe=function(v,w,A){if(v==null)return null;for(var x=0,g=(v=String(v)).length,p=0;p<v.length;p++){var B=v.charCodeAt(p);if((x+=B<=127?1:B<=2047?A.lessoreq0x7ffByte:B<=65535?A.lessoreq0xffffByte:A.greater0xffffByte)>w){g=p;break}}return v.substring(0,g)},ot=function(v,w){if(v===null||ke(v)!=="object"||v.constructor!==Object&&v.constructor!==Array)return v;w||(w=[]);for(var A=0;A<w.length;A++)if(w[A].source===v)return w[A].copy;var x;if(Array.isArray(v)){x=[],w.push({source:v,copy:x});for(var g=0;g<v.length;g++)x[g]=ot(v[g],w)}else for(var p in x={},w.push({source:v,copy:x}),v)v.hasOwnProperty(p)&&(x[p]=ot(v[p],w));return x},mt=function(v,w){if((w=Et(w))==null)throw new Error("Please enter the correct index.");if(w<0||w>=v.length)throw new Error("Index is out of range. Please enter the correct index.");return v[w]},Qe=function(v){for(;v.firstChild;)v.removeChild(v.firstChild)},ut=function(v){if(/^#[0-9a-fA-F]{6}$/.test(v))return v;var w=document.createElement("div");w.style.color=v,document.body.appendChild(w);var A=window.getComputedStyle(w).color;document.body.removeChild(w);var x=A.match(/\d+/g);return"#"+((1<<24)+(+x[0]<<16)+(+x[1]<<8)+ +x[2]).toString(16).slice(1)},Ye=function(v,w){v.startsWith("#")&&(v=v.slice(1));var A=parseInt(w,16);w.startsWith("-")&&(A=-parseInt(w.slice(1),16));var x=parseInt(v.slice(0,2),16),g=parseInt(v.slice(2,4),16),p=parseInt(v.slice(4,6),16);return x=parseInt(String(x+A)),g=parseInt(String(g+A)),p=parseInt(String(p+A)),"#"+(x<0?0:x>255?255:x).toString(16).padStart(2,"0")+(g<0?0:g>255?255:g).toString(16).padStart(2,"0")+(p<0?0:p>255?255:p).toString(16).padStart(2,"0")},Je=function(v){if(!v)return null;v.startsWith("#")&&(v=v.slice(1));var w=255-parseInt(v.slice(0,2),16),A=255-parseInt(v.slice(2,4),16),x=255-parseInt(v.slice(4,6),16);return A=A<127.5?A+16:A-16,x=x<127.5?x+16:x-16,"#"+((w=w<127.5?w+16:w-16)<0?0:w>255?255:w).toString(16).padStart(2,"0")+(A<0?0:A>255?255:A).toString(16).padStart(2,"0")+(x<0?0:x>255?255:x).toString(16).padStart(2,"0")},dt=function(v){var w="";if(!v||v.constructor!==Object||Object.keys(v).length===0)return w;for(var A=Object.entries(v),x=0;x<A.length;x++)A[x].length<2||(w+=A[x][0].trim()+":"+A[x][1].trim()+";");return w},Dt=function(v,w){var A=w.getAttribute(v);if(A==null||A==="")return null;var x=Number(A);return Number.isInteger(x)&&x>=0?x:null},Re=function(v,w){var A=w.getAttribute(v);if(A==null||A==="")return null;var x=Number(A);return isNaN(x)?null:x},ft=function(v,w){var A=w.getAttribute(v);return A==null||A===""?null:Te(A)==="true"},nn=function(v){var w=Number(v);return isNaN(w)?0:w},Et=function(v){var w=Number(v);return isNaN(w)?null:w},_e=function(v,w){return v==null||v===""?w:v},bt=function(v){var w,A=null,x=function(p,B){var H=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!H){if(Array.isArray(p)||(H=function(se,me){if(se){if(typeof se=="string")return xe(se,me);var Q={}.toString.call(se).slice(8,-1);return Q==="Object"&&se.constructor&&(Q=se.constructor.name),Q==="Map"||Q==="Set"?Array.from(se):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?xe(se,me):void 0}}(p))||B){H&&(p=H);var U=0,q=function(){};return{s:q,n:function(){return U>=p.length?{done:!0}:{done:!1,value:p[U++]}},e:function(se){throw se},f:q}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var oe,de=!0,he=!1;return{s:function(){H=H.call(p)},n:function(){var se=H.next();return de=se.done,se},e:function(se){he=!0,oe=se},f:function(){try{de||H.return==null||H.return()}finally{if(he)throw oe}}}}(v);try{for(x.s();!(w=x.n()).done;){var g=w.value;if(g.constructor===Object){if(A!==null&&A===!1)throw new Error("Please insert valid datas.");A=!0}else{if(!Array.isArray(g))throw new Error("Please insert valid datas.");if(g[0]&&g[0].constructor!==Object)throw new Error("Please insert valid datas.");if(A!==null&&A===!0)throw new Error("Please insert valid datas.");A=!1}}}catch(p){x.e(p)}finally{x.f()}return A},Yn=function(v){switch(v){case"skyblue":return"#91c8e4";case"blue":return"#4682a9";case"light-red":return"#fdd2bf";case"red":return"#b61919";case"light-green":return"#a4be7b";case"green":return"#217346";case"orange":return"#f79327";case"yellow":return"#ffe569";case"purple":return"#804674";case"brown":return"#675d50";case"black":return"#272829";default:throw new Error("Please enter the correct colorSet.")}},Zt=function(v,w){var A=w.split(";");if(v>A.length)for(var x=0;x<=v-A.length;x++)A.push("");return A.join(";")},Lt=function(v){for(var w=v.data.id,A="",x=function(H){var U=H.data.id,q={};return q["."+U+"_vanillagrid"]={width:H.data.gridCssInfo.width,height:H.data.gridCssInfo.height,display:H.data.gridInfo.visible?"block":"none",border:"1px solid "+H.data.gridCssInfo.gridBorderColor,overflow:"auto","background-color":"#fff",margin:H.data.gridCssInfo.margin,padding:H.data.gridCssInfo.padding,"font-family":H.data.gridCssInfo.gridFontFamily},q["."+U+"_v-g"]={"background-color":H.data.gridCssInfo.bodyBackColor,display:"flex",position:"relative","flex-direction":"column",height:"100%","overflow-x":"auto","overflow-y":"auto","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},q["."+U+"_v-g-h"]={position:"sticky",top:"0","z-index":"250",display:H.data.gridInfo.headerVisible?"grid":"none"},q["."+U+"_v-g-b"]={"margin-bottom":"22px",display:"grid",position:"relative"},q["."+U+"_v-g-f"]={position:"sticky",bottom:"0","z-index":"250",display:"grid","margin-top":"auto"},q["."+U+"_h-v-g-d"]={"background-color":H.data.gridCssInfo.headerCellBackColor,"justify-content":"center","text-align":"center","align-items":H.data.gridCssInfo.verticalAlign,"border-bottom":H.data.gridCssInfo.horizenBorderSize+"px solid "+H.data.gridCssInfo.headerCellBorderColor,"border-right":H.data.gridCssInfo.verticalBorderSize+"px solid "+H.data.gridCssInfo.headerCellBorderColor,color:H.data.gridCssInfo.headerCellFontColor},q["."+U+"_h-v-g-d select"]={color:"#333"},q["."+U+"_h-v-g-d option"]={color:"#333"},q["."+U+"_b-v-g-d"]={"align-items":H.data.gridCssInfo.verticalAlign,"background-color":H.data.gridCssInfo.bodyCellBackColor,"border-bottom":H.data.gridCssInfo.horizenBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor,"border-right":H.data.gridCssInfo.verticalBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor,color:H.data.gridCssInfo.bodyCellFontColor},q["."+U+"_f-v-g-d"]={"justify-content":"center","text-align":"center","align-items":H.data.gridCssInfo.verticalAlign,"background-color":H.data.gridCssInfo.footerCellBackColor,"border-top":H.data.gridCssInfo.horizenBorderSize+"px solid "+H.data.gridCssInfo.footerCellBorderColor,color:H.data.gridCssInfo.footerCellFontColor},q["."+U+"_f-v-g-d-value"]={"border-right":H.data.gridCssInfo.verticalBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor},q["."+U+"_b-v-g-d-alter"]={"align-items":H.data.gridCssInfo.verticalAlign,"background-color":H.data.gridCssInfo.alterRowBackColor,"border-bottom":H.data.gridCssInfo.horizenBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor,"border-right":H.data.gridCssInfo.verticalBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor,color:H.data.gridCssInfo.alterRowFontColor},q["."+U+"_b-v-g-d-locked"]={"background-color":H.data.gridCssInfo.lockCellBackColor,"border-bottom":H.data.gridCssInfo.horizenBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor,"border-right":H.data.gridCssInfo.verticalBorderSize+"px solid "+H.data.gridCssInfo.bodyCellBorderColor,color:H.data.gridCssInfo.lockCellFontColor},q["."+U+"_v-g-d"]={"font-size":H.data.gridCssInfo.cellFontSize,display:"flex","min-height":H.data.gridCssInfo.cellMinHeight,overflow:"hidden","white-space":"nowrap","padding-left":"5px","padding-right":"5px"},H.data.gridCssInfo.overflowWrap&&(q["."+U+"_v-g-d"]["overflow-wrap"]=H.data.gridCssInfo.overflowWrap),H.data.gridCssInfo.wordBreak&&(q["."+U+"_v-g-d"]["word-break"]=H.data.gridCssInfo.wordBreak),H.data.gridCssInfo.whiteSpace&&(q["."+U+"_v-g-d"]["white-space"]=H.data.gridCssInfo.whiteSpace),q["."+U+"_editor"]={"font-size":H.data.gridCssInfo.cellFontSize,"background-color":H.data.gridCssInfo.editorBackColor,border:"none",color:H.data.gridCssInfo.editorFontColor,overflow:"hidden",resize:"none","box-sizing":"border-box","font-family":H.data.gridCssInfo.gridFontFamily,"text-align":"inherit"},q["."+U+"_editor:focus"]={outline:"none"},q["."+U+"_mouseover-cell"]={"background-color":H.data.gridCssInfo.mouseoverCellBackColor+" !important",color:H.data.gridCssInfo.mouseoverCellFontColor+" !important"},q["."+U+"_selected-cell"]={"background-color":H.data.gridCssInfo.selectCellBackColor+" !important",color:H.data.gridCssInfo.selectCellFontColor+" !important"},q["."+U+"_selected-col"]={"background-color":H.data.gridCssInfo.selectColBackColor,color:H.data.gridCssInfo.selectColFontColor},q["."+U+"_selected-row"]={"background-color":H.data.gridCssInfo.selectRowBackColor,color:H.data.gridCssInfo.selectRowFontColor},q["."+U+"_filterSpan"]={display:"block","font-size":"0.8em","padding-right":"8px",cursor:"pointer"},q["."+U+"_filterSelect"]={position:"absolute","z-index":"300",margin:"5px"},q["."+U+"_data-value-select"]={"font-size":H.data.gridCssInfo.cellFontSize,cursor:"pointer",border:"none",background:"none",color:"inherit"},q["."+U+"_data-value-select:focus"]={outline:"none"},q["."+U+"_data-value-checkbox"]={cursor:"pointer"},q["."+U+"_data-value-button"]={"min-width":"95%",height:.85*Ie(H.data.gridCssInfo.cellMinHeight).number+"px","line-height":.85*Ie(H.data.gridCssInfo.cellMinHeight).number+"px","font-size":H.data.gridCssInfo.cellFontSize,cursor:"pointer",border:"none",color:H.data.gridCssInfo.buttonFontColor,"background-color":H.data.gridCssInfo.buttonBackColor,"box-shadow":"0.75px 0.75px 1px 0.25px "+H.data.gridCssInfo.buttonBorderColor},q["."+U+"_data-value-button:hover"]={color:H.data.gridCssInfo.buttonHoverFontColor,"background-color":H.data.gridCssInfo.buttonHoverBackColor},q["."+U+"_data-value-button:active"]={color:H.data.gridCssInfo.buttonActiveFontColor,"background-color":H.data.gridCssInfo.buttonActiveBackColor,"box-shadow":"0px 0px 0.5px 0.25px "+H.data.gridCssInfo.buttonBorderColor},q["."+U+"_data-value-button:focus"]={outline:"none"},q["."+U+"_data-value-button:disabled"]={opacity:"0.7"},q["."+U+"_data-value-link"]={color:H.data.gridCssInfo.linkFontColor,"text-decoration":H.data.gridCssInfo.linkHasUnderLine?"underline":"none"},q["."+U+"_data-value-link:visited"]={color:H.data.gridCssInfo.linkVisitedFontColor},q["."+U+"_data-value-link:hover"]={color:H.data.gridCssInfo.linkHoverFontColor+" !important"},q["."+U+"_data-value-link:active"]={color:H.data.gridCssInfo.linkActiveFontColor+" !important"},q["."+U+"_data-value-link:focus"]={color:H.data.gridCssInfo.linkFocusFontColor+" !important"},q}(v),g=Object.keys(x),p=0;p<g.length;p++)A=A+g[p]+" {"+dt(x[g[p]])+`}
31
+ `;var B=document.getElementById(w+"_styles-sheet");B?(Qe(B),B.appendChild(document.createTextNode(A))):((B=document.createElement("style")).setAttribute("id",w+"_styles-sheet"),B.styleSheet?B.styleSheet.cssText=A:B.appendChild(document.createTextNode(A)),document.getElementsByTagName("head")[0].appendChild(B))},Xe=function(v){var w=v.color;if(w||(w="#f3f3f3"),w!=="black"&&w!=="#000"&&w!=="#000000"&&ut(w)==="#000000")throw new Error("Please enter the correct color.");var A=function(p){if(!/^#([0-9a-fA-F]{6})$/.test(p))throw new Error("Invalid HEX color format: ".concat(p));return parseInt(p.slice(1,3),16)+parseInt(p.slice(3,5),16)+parseInt(p.slice(5,7),16)>385?"light":"dark"}(w=ut(w))==="light",x=A?"#333333":"#ffffff",g=function(p){p.startsWith("#")&&(p=p.slice(1));var B=parseInt(p.slice(0,2),16),H=parseInt(p.slice(2,4),16),U=parseInt(p.slice(4,6),16);return B=parseInt(String(210+B/255*50)),H=parseInt(String(210+H/255*50)),U=parseInt(String(210+U/255*50)),"#"+(B<0?0:B>255?248:B).toString(16).padStart(2,"0")+(H<0?0:H>255?248:H).toString(16).padStart(2,"0")+(U<0?0:U>255?248:U).toString(16).padStart(2,"0")}(w);v.gridBorderColor=Ye(w,"-4f"),v.bodyBackColor="#ffffff",v.headerCellBackColor=w,v.headerCellBorderColor=Ye(w,"-4f"),v.headerCellFontColor=x,v.footerCellBackColor=w,v.footerCellBorderColor=Ye(w,"-4f"),v.footerCellFontColor=x,v.bodyCellBackColor="#ffffff",v.bodyCellBorderColor=Ye(w,"-f"),v.bodyCellFontColor="#333333",v.editorBackColor="#fefefe",v.editorFontColor="#333333",v.selectCellBackColor=Ye(w,"-2f"),v.selectCellFontColor=x,v.selectColBackColor=Ye(w,"-2f"),v.selectColFontColor=x,v.selectRowBackColor=Ye(g,A?"-f":"-2f"),v.selectRowFontColor="#333333",v.mouseoverCellBackColor=w,v.mouseoverCellFontColor=x,v.lockCellBackColor=Ye(g,A?"-6":"-1f"),v.lockCellFontColor="#666666",v.alterRowBackColor=g,v.alterRowFontColor="#333333",v.buttonFontColor=x,v.buttonBackColor=w,v.buttonBorderColor=Ye(w,A?"-cf":"-4f"),v.buttonHoverFontColor=x,v.buttonHoverBackColor=Ye(w,"-f"),v.buttonActiveFontColor=x,v.buttonActiveBackColor=Ye(w,"-2f"),v.linkFontColor=Ye(w,A?"-cf":"0"),v.linkHoverFontColor=Ye(w,A?"-4f":"af"),v.linkActiveFontColor=Ye(w,A?"-cf":"0"),v.linkVisitedFontColor=Ye(w,A?"-5f":"2f"),v.linkFocusFontColor=Ye(w,A?"-4f":"bf")},Ut=function(v){v.gridBorderColor=Je(v.gridBorderColor),v.headerCellBackColor=Je(v.headerCellBackColor),v.headerCellBorderColor=Je(v.headerCellBorderColor),v.headerCellFontColor=Je(v.headerCellFontColor),v.footerCellBackColor=Je(v.footerCellBackColor),v.footerCellBorderColor=Je(v.footerCellBorderColor),v.footerCellFontColor=Je(v.footerCellFontColor),v.bodyBackColor=Je(v.bodyBackColor),v.bodyCellBackColor=Je(v.bodyCellBackColor),v.bodyCellBorderColor=Je(v.bodyCellBorderColor),v.bodyCellFontColor=Je(v.bodyCellFontColor),v.editorBackColor=Je(v.editorBackColor),v.editorFontColor=Je(v.editorFontColor),v.selectCellBackColor=Je(v.selectCellBackColor),v.selectCellFontColor=Je(v.selectCellFontColor),v.selectColBackColor=Je(v.selectColBackColor),v.selectColFontColor=Je(v.selectColFontColor),v.selectRowBackColor=Je(v.selectRowBackColor),v.selectRowFontColor=Je(v.selectRowFontColor),v.mouseoverCellBackColor=Je(v.mouseoverCellBackColor),v.mouseoverCellFontColor=Je(v.mouseoverCellFontColor),v.lockCellBackColor=Je(v.lockCellBackColor),v.lockCellFontColor=Je(v.lockCellFontColor),v.alterRowBackColor=Je(v.alterRowBackColor),v.alterRowFontColor=Je(v.alterRowFontColor),v.buttonFontColor=Je(v.buttonFontColor),v.buttonBorderColor=Je(v.buttonBorderColor),v.buttonBackColor=Je(v.buttonBackColor),v.buttonHoverFontColor=Je(v.buttonHoverFontColor),v.buttonHoverBackColor=Je(v.buttonHoverBackColor),v.buttonActiveFontColor=Je(v.buttonActiveFontColor),v.buttonActiveBackColor=Je(v.buttonActiveBackColor),v.linkFontColor=Je(v.linkFontColor),v.linkHoverFontColor=Je(v.linkHoverFontColor),v.linkActiveFontColor=Je(v.linkActiveFontColor),v.linkVisitedFontColor=Je(v.linkVisitedFontColor),v.linkFocusFontColor=Je(v.linkFocusFontColor)};function gn(v){return function(w){if(Array.isArray(w))return Rn(w)}(v)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(v)||yn(v)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function gt(v,w){var A=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!A){if(Array.isArray(v)||(A=yn(v))||w){A&&(v=A);var x=0,g=function(){};return{s:g,n:function(){return x>=v.length?{done:!0}:{done:!1,value:v[x++]}},e:function(U){throw U},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,B=!0,H=!1;return{s:function(){A=A.call(v)},n:function(){var U=A.next();return B=U.done,U},e:function(U){H=!0,p=U},f:function(){try{B||A.return==null||A.return()}finally{if(H)throw p}}}}function yn(v,w){if(v){if(typeof v=="string")return Rn(v,w);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Rn(v,w):void 0}}function Rn(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}function f(v){return function(w){if(Array.isArray(w))return I(w)}(v)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(v)||h(v)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
34
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function h(v,w){if(v){if(typeof v=="string")return I(v,w);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?I(v,w):void 0}}function I(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}var be=function(v,w){var A={width:_e(w.getAttribute("width"),v.attributes.defaultGridCssInfo.width),height:_e(w.getAttribute("height"),v.attributes.defaultGridCssInfo.height),margin:_e(w.getAttribute("margin"),v.attributes.defaultGridCssInfo.margin),padding:_e(w.getAttribute("padding"),v.attributes.defaultGridCssInfo.padding),sizeLevel:_e(Dt("size-level",w),v.attributes.defaultGridCssInfo.sizeLevel),verticalAlign:_e(We(ee,Te(w.getAttribute("vertical-align")))?Te(w.getAttribute("vertical-align")):"",v.attributes.defaultGridCssInfo.verticalAlign),horizenBorderSize:_e(Dt("horizen-border-size",w),v.attributes.defaultGridCssInfo.horizenBorderSize),verticalBorderSize:_e(Dt("vertical-border-size",w),v.attributes.defaultGridCssInfo.verticalBorderSize),gridFontFamily:_e(w.getAttribute("grid-font-family"),v.attributes.defaultGridCssInfo.gridFontFamily),editorFontFamily:_e(w.getAttribute("editor-font-family"),v.attributes.defaultGridCssInfo.editorFontFamily),color:_e(w.getAttribute("color"),v.attributes.defaultGridCssInfo.color),colorSet:_e(w.getAttribute("color-set"),v.attributes.defaultGridCssInfo.colorSet),overflowWrap:_e(w.getAttribute("overflow-wrap"),v.attributes.defaultGridCssInfo.overflowWrap),wordBreak:_e(w.getAttribute("word-break"),v.attributes.defaultGridCssInfo.wordBreak),whiteSpace:_e(w.getAttribute("white-space"),v.attributes.defaultGridCssInfo.whiteSpace),linkHasUnderLine:_e(ft("link-has-under-line",w),v.attributes.defaultGridCssInfo.linkHasUnderLine),invertColor:_e(ft("invert-color",w),v.attributes.defaultGridCssInfo.invertColor),gridBorderColor:_e(w.getAttribute("grid-border-color"),v.attributes.defaultGridCssInfo.gridBorderColor),headerCellBackColor:_e(w.getAttribute("header-cell-back-color"),v.attributes.defaultGridCssInfo.headerCellBackColor),headerCellBorderColor:_e(w.getAttribute("header-cell-border-color"),v.attributes.defaultGridCssInfo.headerCellBorderColor),headerCellFontColor:_e(w.getAttribute("header-cell-font-color"),v.attributes.defaultGridCssInfo.headerCellFontColor),footerCellBackColor:_e(w.getAttribute("footer-cell-back-color"),v.attributes.defaultGridCssInfo.footerCellBackColor),footerCellBorderColor:_e(w.getAttribute("footer-cell-border-color"),v.attributes.defaultGridCssInfo.footerCellBorderColor),footerCellFontColor:_e(w.getAttribute("footer-cell-font-color"),v.attributes.defaultGridCssInfo.footerCellFontColor),bodyBackColor:_e(w.getAttribute("body-back-color"),v.attributes.defaultGridCssInfo.bodyBackColor),bodyCellBackColor:_e(w.getAttribute("body-cell-back-color"),v.attributes.defaultGridCssInfo.bodyCellBackColor),bodyCellBorderColor:_e(w.getAttribute("body-cell-border-color"),v.attributes.defaultGridCssInfo.bodyCellBorderColor),bodyCellFontColor:_e(w.getAttribute("body-cell-font-color"),v.attributes.defaultGridCssInfo.bodyCellFontColor),editorBackColor:_e(w.getAttribute("editor-back-color"),v.attributes.defaultGridCssInfo.editorBackColor),editorFontColor:_e(w.getAttribute("editor-font-color"),v.attributes.defaultGridCssInfo.editorFontColor),selectCellBackColor:_e(w.getAttribute("select-cell-back-color"),v.attributes.defaultGridCssInfo.selectCellBackColor),selectCellFontColor:_e(w.getAttribute("select-cell-font-color"),v.attributes.defaultGridCssInfo.selectCellFontColor),selectColBackColor:_e(w.getAttribute("selectCol-back-color"),v.attributes.defaultGridCssInfo.selectColBackColor),selectColFontColor:_e(w.getAttribute("selectCol-font-color"),v.attributes.defaultGridCssInfo.selectColFontColor),selectRowBackColor:_e(w.getAttribute("selectRow-back-color"),v.attributes.defaultGridCssInfo.selectRowBackColor),selectRowFontColor:_e(w.getAttribute("selectRow-font-color"),v.attributes.defaultGridCssInfo.selectRowFontColor),mouseoverCellBackColor:_e(w.getAttribute("mouseover-cell-back-color"),v.attributes.defaultGridCssInfo.mouseoverCellBackColor),mouseoverCellFontColor:_e(w.getAttribute("mouseover-cell-font-color"),v.attributes.defaultGridCssInfo.mouseoverCellFontColor),lockCellBackColor:_e(w.getAttribute("lock-cell-back-color"),v.attributes.defaultGridCssInfo.lockCellBackColor),lockCellFontColor:_e(w.getAttribute("lock-cell-font-color"),v.attributes.defaultGridCssInfo.lockCellFontColor),alterRowBackColor:_e(w.getAttribute("alter-row-back-color"),v.attributes.defaultGridCssInfo.alterRowBackColor),alterRowFontColor:_e(w.getAttribute("alter-row-font-color"),v.attributes.defaultGridCssInfo.alterRowFontColor),buttonFontColor:_e(w.getAttribute("button-font-color"),v.attributes.defaultGridCssInfo.buttonFontColor),buttonBorderColor:_e(w.getAttribute("buttonBorderColor"),v.attributes.defaultGridCssInfo.buttonBorderColor),buttonBackColor:_e(w.getAttribute("button-back-color"),v.attributes.defaultGridCssInfo.buttonBackColor),buttonHoverFontColor:_e(w.getAttribute("buttonHover-font-color"),v.attributes.defaultGridCssInfo.buttonHoverFontColor),buttonHoverBackColor:_e(w.getAttribute("buttonHover-back-color"),v.attributes.defaultGridCssInfo.buttonHoverBackColor),buttonActiveFontColor:_e(w.getAttribute("buttonActive-font-color"),v.attributes.defaultGridCssInfo.buttonActiveFontColor),buttonActiveBackColor:_e(w.getAttribute("buttonActive-back-color"),v.attributes.defaultGridCssInfo.buttonActiveBackColor),linkFontColor:_e(w.getAttribute("link-font-color"),v.attributes.defaultGridCssInfo.linkFontColor),linkHoverFontColor:_e(w.getAttribute("linkHover-font-color"),v.attributes.defaultGridCssInfo.linkHoverFontColor),linkActiveFontColor:_e(w.getAttribute("linkActive-font-color"),v.attributes.defaultGridCssInfo.linkActiveFontColor),linkVisitedFontColor:_e(w.getAttribute("linkVisited-font-color"),v.attributes.defaultGridCssInfo.linkVisitedFontColor),linkFocusFontColor:_e(w.getAttribute("linkFocus-font-color"),v.attributes.defaultGridCssInfo.linkFocusFontColor),cellFontSize:null,cellMinHeight:null};return A.cellFontSize=_e(w.getAttribute("cell-font-size"),(A.sizeLevel+15)/20*v.attributes.defaultGridCssInfo.cellFontSize+"px"),A.cellMinHeight=_e(w.getAttribute("cell-min-height"),(A.sizeLevel+15)/20*v.attributes.defaultGridCssInfo.cellMinHeight+"px"),A.colorSet&&(A.color=Yn(A.colorSet)),Xe(A),A.invertColor&&Ut(A),A},Be=function(v,w,A,x){var g,p=[],B=0,H=1,U=0;Array.from(w.querySelectorAll("[data-col]")).forEach(function(he){var se=he.getAttribute("header");se||(se=he.getAttribute("id")),H=H>se.split(";").length?H:se.split(";").length,he.getAttribute("footer")&&(U=U>he.getAttribute("footer").split(";").length?U:he.getAttribute("footer").split(";").length),g=he.getAttribute("width")?" "+he.getAttribute("width"):" "+v.attributes.defaultColInfo.originWidth;var me=Ie(g).unit;if(me||(g+="px",me="px"),!We(K,me))throw new Error("Width units can only be pixel or %.")});var q=A.rownumVisible?A.rownumSize+" ":"0px ",oe=A.statusVisible?"60px ":"0px ",de={colId:"v-g-rownum",colIndex:1,name:"rownum",header:Zt(H,""),untarget:!1,rowMerge:!1,colMerge:!1,colVisible:A.rownumVisible,required:!1,resizable:!1,sortable:!1,filterable:!1,originWidth:q,dataType:"text",selectSize:null,locked:!0,lockedColor:A.rownumLockedColor,format:null,codes:null,defaultCode:null,maxLength:null,maxByte:null,maxNumber:null,minNumber:null,roundNumber:null,filterValues:null,filterValue:null,align:"center",verticalAlign:null,overflowWrap:null,wordBreak:null,whiteSpace:null,backColor:null,fontColor:null,fontBold:!1,fontItalic:!1,fontThruline:!1,fontUnderline:!1,footer:null};return p.push(de),de={colId:"v-g-status",colIndex:2,name:"status",header:Zt(H,"status"),untarget:!0,rowMerge:!1,colMerge:!1,colVisible:A.statusVisible,required:!1,resizable:!1,sortable:!1,filterable:!1,originWidth:oe,dataType:"code",selectSize:null,locked:!0,lockedColor:A.statusLockedColor,format:null,codes:["C","U","D"],defaultCode:null,maxLength:null,maxByte:null,maxNumber:null,minNumber:null,roundNumber:null,filterValues:null,filterValue:null,align:"center",verticalAlign:null,overflowWrap:null,wordBreak:null,whiteSpace:null,backColor:null,fontColor:null,fontBold:!1,fontItalic:!1,fontThruline:!1,fontUnderline:!1,footer:null},p.push(de),B=2,Array.from(w.querySelectorAll("[data-col]")).forEach(function(he){B++;var se=he.getAttribute("id");if(!he.getAttribute("id"))throw new Error("Column ID is required.");if(p.some(function(b){return b.colId===se}))throw new Error("Column ID is primary key.");if(de={colId:se,colIndex:B,name:_e(he.getAttribute("name"),se),header:Zt(H,_e(he.getAttribute("header"),se)),footer:null,untarget:null,rowMerge:null,colMerge:null,colVisible:null,required:null,resizable:null,sortable:null,filterable:null,originWidth:null,dataType:null,selectSize:null,locked:null,lockedColor:null,format:null,codes:null,defaultCode:null,maxLength:null,maxByte:null,maxNumber:null,minNumber:null,roundNumber:null,filterValues:null,filterValue:null,align:null,verticalAlign:null,overflowWrap:null,wordBreak:null,whiteSpace:null,backColor:null,fontColor:null,fontBold:null,fontItalic:null,fontThruline:null,fontUnderline:null},he.getAttribute("footer")){de.footer=he.getAttribute("footer").split(";");for(var me=de.footer.length;me<U;me++)de.footer.push("")}var Q=Te(he.getAttribute("data-type"));if(Q||(Q=v.attributes.defaultColInfo.dataType),![].concat(f(Object.keys(W)),f(Object.keys(v.dataType))).includes(Q))throw new Error("Please insert a valid dataType.");de.dataType=Q,de.untarget=_e(ft("untarget",he),A.selectionPolicy==="none"),de.rowMerge=_e(ft("row-merge",he),v.attributes.defaultColInfo.rowMerge),de.colMerge=_e(ft("col-merge",he),v.attributes.defaultColInfo.colMerge),de.colVisible=_e(ft("visible",he),v.attributes.defaultColInfo.colVisible),de.required=_e(ft("required",he),v.attributes.defaultColInfo.required),de.resizable=_e(ft("resizable",he),v.attributes.defaultColInfo.resizable),de.sortable=_e(ft("sortable",he),v.attributes.defaultColInfo.sortable),de.filterable=_e(ft("filterable",he),v.attributes.defaultColInfo.filterable),de.dataType==="checkbox"&&(de.sortable=!1),g=he.getAttribute("width")?he.getAttribute("width"):v.attributes.defaultColInfo.originWidth,Ie(g).unit||(g+="px"),de.originWidth=g,de.selectSize=_e(We(K,Ie(he.getAttribute("select-size")).unit)?he.getAttribute("select-size"):"",v.attributes.defaultColInfo.selectSize),de.locked=_e(ft("locked",he),A.locked),de.lockedColor=_e(ft("locked-color",he),A.lockedColor),de.format=_e(he.getAttribute("format"),v.attributes.defaultColInfo.format),de.codes=he.getAttribute("codes")?he.getAttribute("codes").split(";"):v.attributes.defaultColInfo.codes,de.defaultCode=_e(he.getAttribute("default-code"),v.attributes.defaultColInfo.defaultCode),de.maxLength=_e(Dt("max-length",he),v.attributes.defaultColInfo.maxLength),de.maxByte=_e(Dt("max-byte",he),v.attributes.defaultColInfo.maxByte),de.maxNumber=_e(Re("max-number",he),v.attributes.defaultColInfo.maxNumber),de.minNumber=_e(Re("min-number",he),v.attributes.defaultColInfo.minNumber),de.roundNumber=_e(function(b,_){var R=_.getAttribute("round-number");if(R==null||R==="")return null;var F=Number(R);return Number.isInteger(F)?F:null}(0,he),v.attributes.defaultColInfo.roundNumber),de.filterValues=new Set,de.filterValue=de.filterable?"$$ALL":null;var u=x._getColDefaultAlign(de.dataType);de.align=_e(We(X,Te(he.getAttribute("align")))?Te(he.getAttribute("align")):"",u),de.verticalAlign=_e(We(ee,Te(he.getAttribute("vertical-align")))?Te(he.getAttribute("vertical-align")):"",v.attributes.defaultColInfo.verticalAlign),de.overflowWrap=_e(he.getAttribute("overflow-wrap"),v.attributes.defaultColInfo.overflowWrap),de.wordBreak=_e(he.getAttribute("word-break"),v.attributes.defaultColInfo.wordBreak),de.whiteSpace=_e(he.getAttribute("white-space"),v.attributes.defaultColInfo.whiteSpace),de.backColor=_e(Te(he.getAttribute("back-color")),v.attributes.defaultColInfo.backColor),de.fontColor=_e(Te(he.getAttribute("font-color")),v.attributes.defaultColInfo.fontColor),de.fontBold=_e(ft("font-bold",he),v.attributes.defaultColInfo.fontBold),de.fontItalic=_e(ft("font-italic",he),v.attributes.defaultColInfo.fontItalic),de.fontThruline=_e(ft("font-thruline",he),v.attributes.defaultColInfo.fontThruline),de.fontUnderline=_e(ft("font-underline",he),v.attributes.defaultColInfo.fontUnderline),p.push(de),w.removeChild(he)}),p},tt=function(v,w,A,x){if(!v._initialized)throw new Error("Please initialize vanillagrid");var g,p=function(H){var U=typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(!U){if(Array.isArray(H)||(U=h(H))){U&&(H=U);var q=0,oe=function(){};return{s:oe,n:function(){return q>=H.length?{done:!0}:{done:!1,value:H[q++]}},e:function(me){throw me},f:oe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
35
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var de,he=!0,se=!1;return{s:function(){U=U.call(H)},n:function(){var me=U.next();return he=me.done,me},e:function(me){se=!0,de=me},f:function(){try{he||U.return==null||U.return()}finally{if(se)throw de}}}}((x||document).querySelectorAll("[data-vanillagrid]"));try{var B=function(){var H=g.value,U=function(Q,u){if(u.getAttribute(Q))return u.getAttribute(Q);throw new Error("'"+Q+"' is required.")}("data-id",H);if(w[U])throw new Error("There is a duplicate grid ID.");H.classList.add(U+"_vanillagrid"),H._gridId=U;var q=document.createElement("div");q.classList.add(U+"_v-g"),q._gridId=U;var oe=document.createElement("div");oe._gridId=U,oe._type="gh",oe.classList.add(U+"_v-g-h"),oe._gridHeaderCells=[];var de=document.createElement("div");de._gridId=U,de._type="gb",de.classList.add(U+"_v-g-b"),de._gridBodyCells=[];var he=document.createElement("div");he._gridId=U,he._type="gf",he.classList.add(U+"_v-g-f"),he._gridFooterCells=[];var se=function(Q,u){var b={name:_e(u.getAttribute("name"),u.getAttribute("data-id")),locked:_e(ft("locked",u),Q.attributes.defaultGridInfo.locked),lockedColor:_e(ft("locked-color",u),Q.attributes.defaultGridInfo.lockedColor),resizable:_e(ft("resizable",u),Q.attributes.defaultGridInfo.resizable),redoable:_e(ft("redoable",u),Q.attributes.defaultGridInfo.redoable),redoCount:_e(Dt("redo-count",u),Q.attributes.defaultGridInfo.redoCount),visible:_e(ft("visible",u),Q.attributes.defaultGridInfo.visible),headerVisible:_e(ft("header-visible",u),Q.attributes.defaultGridInfo.headerVisible),rownumVisible:_e(ft("rownum-visible",u),Q.attributes.defaultGridInfo.rownumVisible),rownumSize:_e(u.getAttribute("rownum-size"),Q.attributes.defaultGridInfo.rownumSize),statusVisible:_e(ft("status-visible",u),Q.attributes.defaultGridInfo.statusVisible),selectionPolicy:_e(We(ye,Te(u.getAttribute("selection-policy")))?Te(u.getAttribute("selection-policy")):"",Q.attributes.defaultGridInfo.selectionPolicy),nullValue:_e(u.getAttribute("null-value"),Q.attributes.defaultGridInfo.nullValue),dateFormat:_e(u.getAttribute("date-format"),Q.attributes.defaultGridInfo.dateFormat),monthFormat:_e(u.getAttribute("month-format"),Q.attributes.defaultGridInfo.monthFormat),alterRow:_e(ft("alter-row",u),Q.attributes.defaultGridInfo.alterRow),frozenColCount:_e(Dt("frozen-col-count",u),Q.attributes.defaultGridInfo.frozenColCount),frozenRowCount:_e(Dt("frozen-row-count",u),Q.attributes.defaultGridInfo.frozenRowCount),sortable:_e(ft("sortable",u),Q.attributes.defaultGridInfo.sortable),filterable:_e(ft("filterable",u),Q.attributes.defaultGridInfo.filterable),allCheckable:_e(ft("all-checkable",u),Q.attributes.defaultGridInfo.allCheckable),checkedValue:_e(u.getAttribute("checked-value"),Q.attributes.defaultGridInfo.checkedValue),uncheckedValue:_e(u.getAttribute("unchecked-value"),Q.attributes.defaultGridInfo.uncheckedValue),rownumLockedColor:null,statusLockedColor:null};if(b.rownumLockedColor=_e(ft("rownum-locked-color",u),b.locked),b.statusLockedColor=_e(ft("status-locked-color",u),b.locked),b.checkedValue===b.uncheckedValue)throw new Error("Checked and unchecked values cannot be the same.");return b}(v,H),me={data:{id:U,gridInfo:se,gridCssInfo:be(v,H),colInfos:Be(v,H,se,A),variables:{activeRows:[],activeCols:[],activeCells:[],targetCell:null,records:[],recordseq:0,sortToggle:{},filters:[],isDrawable:!0}},events:{onActiveCell:function(Q,u){return!0},onActiveCells:function(Q,u,b,_){return!0},onActiveRow:function(Q){return!0},onActiveRows:function(Q,u){return!0},onActiveCol:function(Q){return!0},onActiveCols:function(Q,u){return!0},onBeforeChange:function(Q,u,b,_){return!0},onAfterChange:function(Q,u,b,_){},onBeforeClickCell:function(Q,u){return!0},onAfterClickCell:function(Q,u){},onClickSelect:function(Q,u,b){return!0},onClickCheckbox:function(Q,u,b){return!0},onClickButton:function(Q,u,b){return!0},onClickLink:function(Q,u,b){return!0},onBeforeDblClickCell:function(Q,u){return!0},onAfterDblClickCell:function(Q,u){},onBeforeClickHeader:function(Q,u){return!0},onAfterClickHeader:function(Q,u){},onBeforeDblClickHeader:function(Q,u){return!0},onAfterDblClickHeader:function(Q,u){},onBeforeEditEnter:function(Q,u,b){return!0},onAfterEditEnter:function(Q,u,b){},onEditEnding:function(Q,u,b,_){return!0},onClickFilter:function(Q,u,b){return!0},onChooseFilter:function(Q,u,b,_){return!0},onPaste:function(Q,u,b){return!0},onCopy:function(Q,u,b,_){return!0},onResize:function(Q){return!0},onKeydownEditor:function(Q){return!0},onInputEditor:function(Q){return!0},onKeydownGrid:function(Q){return!0}},hendler:{gridHeader_dblclick:function(Q){},gridHeader_click:function(Q){},gridBody_mousemove:function(Q){},gridBody_mouseleave:function(Q){},gridBody_mouseenter:function(Q){},gridBody_dblclick:function(Q){},gridElement_click:function(Q){},gridElement_mousedown:function(Q){},gridElement_mousemove:function(Q){},gridElement_mouseleave:function(Q){}},methods:{},elements:{grid:q,gridHeader:oe,gridBody:de,gridFooter:he},_isMounted:!1};w[U]=me,me.methods=function(Q,u,b){return{getDefualtGridInfo:function(){return Q.attributes.defaultGridInfo},getDefualtGridCssInfo:function(){return Q.attributes.defaultGridCssInfo},getDefualtColInfo:function(){return Q.attributes.defaultColInfo},setOnActiveCell:function(_){u.events.onActiveCell=_},setOnActiveCells:function(_){u.events.onActiveCells=_},setOnActiveRow:function(_){u.events.onActiveRow=_},setOnActiveRows:function(_){u.events.onActiveRows=_},setOnActiveCol:function(_){u.events.onActiveCol=_},setOnActiveCols:function(_){u.events.onActiveCols=_},setOnBeforeChange:function(_){u.events.onBeforeChange=_},setOnAfterChange:function(_){u.events.onAfterChange=_},setOnBeforeClickCell:function(_){u.events.onBeforeClickCell=_},setOnAfterClickCell:function(_){u.events.onAfterClickCell=_},setOnClickSelect:function(_){u.events.onClickSelect=_},setOnClickCheckbox:function(_){u.events.onClickCheckbox=_},setOnClickButton:function(_){u.events.onClickButton=_},setOnClickLink:function(_){u.events.onClickLink=_},setOnBeforeDblClickCell:function(_){u.events.onBeforeDblClickCell=_},setOnAfterDblClickCell:function(_){u.events.onAfterDblClickCell=_},setOnBeforeClickHeader:function(_){u.events.onBeforeClickHeader=_},setOnAfterClickHeader:function(_){u.events.onAfterClickHeader=_},setOnBeforeDblClickHeader:function(_){u.events.onBeforeDblClickHeader=_},setOnAfterDblClickHeader:function(_){u.events.onAfterDblClickHeader=_},setOnBeforeEditEnter:function(_){u.events.onBeforeEditEnter=_},setOnAfterEditEnter:function(_){u.events.onAfterEditEnter=_},setOnEditEnding:function(_){u.events.onEditEnding=_},setOnClickFilter:function(_){u.events.onClickFilter=_},setOnChooseFilter:function(_){u.events.onChooseFilter=_},setOnPaste:function(_){u.events.onPaste=_},setOnCopy:function(_){u.events.onCopy=_},setOnResize:function(_){u.events.onResize=_},setOnKeydownEditor:function(_){u.events.onKeydownEditor=_},setOnInputEditor:function(_){u.events.onInputEditor=_},setOnKeydownGrid:function(_){u.events.onKeydownGrid=_},getHeaderRowCount:function(){var _,R=0,F=gt(u.data.colInfos);try{for(F.s();!(_=F.n()).done;){var P=_.value.header.split(";");P.length>R&&(R=P.length)}}catch(z){F.e(z)}finally{F.f()}return R},getHeaderText:function(_){return b.__getColInfo(u.data.id,_,!0).header},setHeaderText:function(_,R){return b.__getColInfo(u.data.id,_,!0).header=Zt(u.methods.getHeaderRowCount(),R),b.__loadHeader(u.data.id),u.methods.reloadFilterValue(),!0},reloadFilterValue:function(){var _,R=gt(u.data.colInfos);try{for(R.s();!(_=R.n()).done;){var F=_.value;u.methods.reloadColFilter(F.colIndex)}}catch(P){R.e(P)}finally{R.f()}return!0},reloadColFilter:function(_){return b.reloadColFilterValue(u.data.id,_),!0},clearFilterValue:function(){var _=b.getDatasWithClearFilterValue(u.data.id,u.methods.getDatas());return b.__loadHeader(u.data.id),u.methods.load(_),b.__loadFooter(u.data.id),!0},getFooterRowCount:function(){var _,R=0,F=gt(u.data.colInfos);try{for(F.s();!(_=F.n()).done;){var P=_.value;P.footer&&Array.isArray(P.footer)&&P.footer.length>R&&(R=P.footer.length)}}catch(z){F.e(z)}finally{F.f()}return R},reloadFooterValue:function(){return b.reloadFooterValue(u.data.id),!0},setFooterValue:function(_,R,F){var P=b.__getColInfo(u.data.id,R,!0).footer||Array(u.methods.getFooterRowCount()).fill(null);return mt(P,_-1),P[_-1]=F,b.__getColInfo(u.data.id,R,!0).footer=P,b.__loadFooter(u.data.id),!0},getFooterValue:function(_,R){return b._getFooterCell(u.data.id,_,R).value},setFooterFormula:function(_,R){return b.__getColInfo(u.data.id,_,!0).footer=R.split(";"),b.__loadFooter(u.data.id),!0},getFooterFormula:function(_){var R=ot(b.__getColInfo(u.data.id,_,!0).footer);if(R&&Array.isArray(R)){for(var F=0;F<R.length;F++)typeof R[F]=="function"&&(R[F]="$$FUNC");return R.join(";")}return null},setFooterFunction:function(_,R,F){var P=b.__getColInfo(u.data.id,R,!0).footer||Array(u.methods.getFooterRowCount()).fill(null);return mt(P,_-1),P[_-1]=F,b.__getColInfo(u.data.id,R,!0).footer=P,b.__loadFooter(u.data.id),!0},getGridInfo:function(){var _=ot(u.data.gridInfo);return _.id=u.data.id,_.cssInfo=ot(u.data.gridCssInfo),_},load:function(_){if(!_)return!1;if(!Array.isArray(_))throw new Error("Please insert valid datas.");var R=bt(_);if(b.__clear(u.data.id),R)for(var F=_,P=1;P<=F.length;P++){for(var z=[],pe=F[P-1],Se=1;Se<=u.data.colInfos.length;Se++){var ze=b.getGridCell(u.data.id,u.data.colInfos[Se-1],pe,P,Se);z.push(ze)}u.elements.gridBody._gridBodyCells.push(z)}else for(var je=_,Ue=1;Ue<=je.length;Ue++){for(var it=[],rt=je[Ue-1],ct=1;ct<=u.data.colInfos.length;ct++){var Ne=b.getGridCell(u.data.id,u.data.colInfos[ct-1],rt,Ue,ct);it.push(Ne)}u.elements.gridBody._gridBodyCells.push(it)}return b.__mountGridBodyCell(u.data.id),!0},clear:function(){return Qe(u.elements.gridBody),u.data.variables.sortToggle={},u.data.variables.filters=[],b.__clear(u.data.id),b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),!0},clearStatus:function(){for(var _=1;_<=u.methods.getRowCount();_++){var R=b._getCell(u.data.id,_,2);R.value=null,b.reConnectedCallbackElement(R)}return!0},getRowCount:function(){return u.elements.gridBody._gridBodyCells.length},getColCount:function(){return u.data.colInfos.length},getValues:function(){var _,R,F=[],P=gt(u.elements.gridBody._gridBodyCells);try{for(P.s();!(R=P.n()).done;){var z=R.value;_={};var pe,Se=gt(z);try{for(Se.s();!(pe=Se.n()).done;){var ze=pe.value;_[ze.colId]=ot(ze.value)}}catch(je){Se.e(je)}finally{Se.f()}F.push(_)}}catch(je){P.e(je)}finally{P.f()}return F},getDatas:function(){return b.___getDatasWithoutExceptedProperty(u.data.id)},sort:function(_){var R=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],F=arguments.length>2&&arguments[2]!==void 0&&arguments[2],P=u.methods.getDatas(),z=b.sort(u.data.id,P,_,R,F);return b.__loadHeader(u.data.id),u.methods.load(z),!0},checkRequired:function(_){if(_&&typeof _!="function")throw new Error("Please insert a valid function.");var R,F=gt(u.elements.gridBody._gridBodyCells);try{for(F.s();!(R=F.n()).done;){var P,z=gt(R.value);try{for(z.s();!(P=z.n()).done;){var pe=P.value;if(pe.required&&["select","checkbox","button","link"].indexOf(pe.dataType)<0&&(pe.value===""||pe.value===null||pe.value===void 0||pe.value===u.data.gridInfo.nullValue))return _?_(b.__getData(pe)):b.__getData(pe)}}catch(Se){z.e(Se)}finally{z.f()}}}catch(Se){F.e(Se)}finally{F.f()}return null},setGridMount:function(_){return _=_===!0,u.data.variables.isDrawable=_,_&&b.__mountGridBodyCell(u.data.id),!0},getGridFilter:function(){return u.data.variables.filters},setGridWidth:function(_){if(!_)throw new Error("Please insert cssText of width.");return u.data.gridCssInfo.width=_,Lt(u),!0},setGridHeight:function(_){if(!_)throw new Error("Please insert cssText of height.");return u.data.gridCssInfo.height=_,Lt(u),!0},setGridSizeLevel:function(_){if(!(_=Et(_)))throw new Error("Please insert number of size level.");return u.data.gridCssInfo.sizeLevel=_,u.data.gridCssInfo.cellFontSize=(u.data.gridCssInfo.sizeLevel+15)/20*14+"px",u.data.gridCssInfo.cellMinHeight=(u.data.gridCssInfo.sizeLevel+15)/20*21+"px",Lt(u),!0},setGridVerticalAlign:function(_){if(!_)throw new Error("Please insert vertical align.");if(!We(ee,_))throw new Error("Please insert valid vertical align. (top, center, bottom)");var R=function(F){switch(Te(F)){case"top":return"flex-start";case"bottom":return"flex-end";default:return"center"}}(_);return u.data.gridCssInfo.verticalAlign=R,Lt(u),!0},setCellFontSize:function(_){if(!_)throw new Error("Please insert cssText of cell font size.");return u.data.gridCssInfo.cellFontSize=_,Lt(u),!0},setCellMinHeight:function(_){if(!_)throw new Error("Please insert cssText of cell min height.");return u.data.gridCssInfo.cellMinHeight=_,Lt(u),!0},setHorizenBorderSize:function(_){return Me(_),u.data.gridCssInfo.horizenBorderSize=_,Lt(u),!0},setVerticalBorderSize:function(_){return Me(_),u.data.gridCssInfo.verticalBorderSize=_,Lt(u),!0},setGridColor:function(_){if(!/^#[0-9a-fA-F]{6}$/.test(_))throw new Error("Please insert valid cssText of hexadecimal color. (#ffffff)");return u.data.gridCssInfo.color=_,Xe(u.data.gridCssInfo),Lt(u),!0},setGridColorSet:function(_){var R=Yn(_);return u.data.gridCssInfo.color=R,Xe(u.data.gridCssInfo),Lt(u),!0},invertColor:function(_){return(_=_===!0)?Ut(u.data.gridCssInfo):Xe(u.data.gridCssInfo),Lt(u),!0},setGridName:function(_){if(!_)throw new Error("Please insert a gridName.");return u.data.gridInfo.name=String(_),!0},getGridName:function(){return u.data.gridInfo.name},setGridLocked:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");u.data.gridInfo.locked=_,u.data.colInfos.forEach(function(F,P){P>=2&&(F.locked=_)});var R=b.___getDatasWithoutExceptedProperty(u.data.id,["locked"]);return u.methods.load(R),!0},isGridLocked:function(){return u.data.gridInfo.locked},setGridLockedColor:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");u.data.gridInfo.lockedColor=_,u.data.colInfos.forEach(function(F,P){P>=2&&(F.lockedColor=_)});var R=b.___getDatasWithoutExceptedProperty(u.data.id,["lockedColor"]);return u.methods.load(R),!0},setGridResizable:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.resizable=_,!0},isGridResizable:function(){return u.data.gridInfo.resizable},setGridRecordCount:function(_){return _=Me(_),u.data.gridInfo.redoCount=_,!0},getGridRecordCount:function(){return u.data.gridInfo.redoCount},setGridRedoable:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.redoable=_,!0},isGridRedoable:function(){return u.data.gridInfo.redoable},setGridVisible:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.visible=_,Lt(u),!0},isGridVisible:function(){return u.data.gridInfo.visible},setHeaderVisible:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.headerVisible=_,Lt(u),!0},isHeaderVisible:function(){return u.data.gridInfo.headerVisible},setGridRownumLockedColor:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");u.data.gridInfo.rownumLockedColor=_,u.data.colInfos[0].lockedColor=_;var R,F=gt(u.elements.gridBody._gridBodyCells);try{for(F.s();!(R=F.n()).done;){var P=R.value;P[0].lockedColor=_,b.reConnectedCallbackElement(P[0])}}catch(z){F.e(z)}finally{F.f()}return!0},isGridRownumLockedColor:function(){return u.data.gridInfo.rownumLockedColor},setGridRownumSize:function(_){_=Me(_);var R=u.data.colInfos[0];return R.originWidth=String(_)+Ie(R.originWidth).unit,b.changeColSize(u.data.id,R.colIndex,_),R.colVisible=_!==0,b.reloadGridWithModifyCell(u.data.id,R.colIndex),!0},getGridRownumSize:function(){return u.data.colInfos[0].originWidth},setGridStatusLockedColor:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");u.data.gridInfo.statusLockedColor=_,u.data.colInfos[1].lockedColor=_;var R,F=gt(u.elements.gridBody._gridBodyCells);try{for(F.s();!(R=F.n()).done;){var P=R.value;P[1].lockedColor=_,b.reConnectedCallbackElement(P[1])}}catch(z){F.e(z)}finally{F.f()}return!0},isGridStatusLockedColor:function(){return u.data.gridInfo.statusLockedColor},setGridSelectionPolicy:function(_){if(!We(ye,_))throw new Error("Please insert the correct selectionPolicy properties. (single, range, none)");return u.data.gridInfo.selectionPolicy=_,b.resetSelection(u.data.id),!0},getGridSelectionPolicy:function(){return u.data.gridInfo.selectionPolicy},setGridNullValue:function(_){return u.data.gridInfo.nullValue=_,b.__gridBodyCellsReConnected(u.data.id),!0},getGridNullValue:function(){return ot(u.data.gridInfo.nullValue)},setGridDateFormat:function(_){return u.data.gridInfo.dateFormat=_,b.__gridBodyCellsReConnected(u.data.id),!0},getGridDateFormat:function(){return u.data.gridInfo.dateFormat},setGridMonthFormat:function(_){return u.data.gridInfo.monthFormat=_,b.__gridBodyCellsReConnected(u.data.id),!0},getGridMonthFormat:function(){return u.data.gridInfo.monthFormat},setGridAlterRow:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.alterRow=_,b.__gridBodyCellsReConnected(u.data.id),!0},setGridFrozenColCount:function(_){if(_=Me(_),u.elements.gridHeader.style.gridTemplateColumns.includes("%")&&u.data.gridInfo.frozenColCount!==0)throw new Error(u.data.id+" has error. If you set the horizontal size to a percentage, property A is not available.");u.data.gridInfo.frozenColCount=_;var R=u.methods.getDatas();return b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),u.methods.load(R),!0},getGridFrozenColCount:function(){return u.data.gridInfo.frozenColCount},setGridFrozenRowCount:function(_){_=Me(_),u.data.gridInfo.frozenRowCount=_;var R=u.methods.getDatas();return b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),u.methods.load(R),!0},getGridFrozenRowCount:function(){return u.data.gridInfo.frozenRowCount},setGridSortable:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.sortable=_,!0},isGridSortable:function(){return u.data.gridInfo.sortable},setGridFilterable:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");u.data.gridInfo.filterable=_;var R=u.methods.getDatas();return b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),u.methods.load(R),!0},isGridFilterable:function(){return u.data.gridInfo.filterable},setGridAllCheckable:function(_){if(typeof _!="boolean")throw new Error("Please insert a boolean type.");return u.data.gridInfo.allCheckable=_,!0},isGridAllCheckable:function(){return u.data.gridInfo.allCheckable},setGridCheckedValue:function(_){if(typeof _!="string")throw new Error("Please insert a string type.");if(u.data.gridInfo.uncheckedValue===_)throw new Error("Checked and unchecked values cannot be the same.");var R,F=u.methods.getDatas(),P=gt(F);try{for(P.s();!(R=P.n()).done;){var z,pe=gt(R.value);try{for(pe.s();!(z=pe.n()).done;){var Se=z.value;Se.dataType==="checkbox"&&Se.value===u.data.gridInfo.checkedValue&&(Se.value=_)}}catch(ze){pe.e(ze)}finally{pe.f()}}}catch(ze){P.e(ze)}finally{P.f()}return u.data.gridInfo.checkedValue=_,b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),u.methods.load(F),!0},getGridCheckedValue:function(){return u.data.gridInfo.checkedValue},setGridUncheckedValue:function(_){if(typeof _!="string")throw new Error("Please insert a string type.");if(u.data.gridInfo.checkedValue===_)throw new Error("Checked and unchecked values cannot be the same.");var R,F=u.methods.getDatas(),P=gt(F);try{for(P.s();!(R=P.n()).done;){var z,pe=gt(R.value);try{for(pe.s();!(z=pe.n()).done;){var Se=z.value;Se.dataType==="checkbox"&&Se.value!==u.data.gridInfo.checkedValue&&(Se.value=_)}}catch(ze){pe.e(ze)}finally{pe.f()}}}catch(ze){P.e(ze)}finally{P.f()}return u.data.gridInfo.uncheckedValue=_,b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),u.methods.load(F),!0},getGridUncheckedValue:function(){return u.data.gridInfo.uncheckedValue},addCol:function(_,R){var F=b.__getColIndex(u.data.id,_);if(F<2)throw new Error("You cannot add new columns between the row number and status columns.");(!F||F>u.methods.getColCount())&&(F=u.methods.getColCount());var P=b.__getDefaultColInfo(u.data.id,R,!0),z=u.methods.getDatas();u.data.colInfos.splice(F,0,P),u.data.colInfos.forEach(function(ze,je){ze.colIndex=je+1});for(var pe=1;pe<=u.methods.getRowCount();pe++){var Se=b.__getCellData(u.data.colInfos[F],pe);z[pe-1].splice(F,0,Se)}return z=b.getDatasWithClearFilterValue(u.data.id,z),b.__loadHeader(u.data.id),u.methods.load(z),b.__loadFooter(u.data.id),!0},removeCol:function(_){var R=b.__getColIndex(u.data.id,_,!0);if(R<=2)throw new Error("The row number or status columns cannot be removed.");var F=u.methods.getColValues(R);u.data.colInfos.splice(R-1,1),u.data.colInfos.forEach(function(z,pe){z.colIndex=pe+1});var P=u.methods.getDatas();return b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),u.methods.load(P),F},setColInfo:function(_){if(!_)throw new Error("Column info is required.");if(_.constructor!==Object)throw new Error("Please insert a valid column info");var R;if(_.colIndex&&(R=_.colIndex),_.colId&&(R=_.colId),!R)throw new Error("Column id is required.");var F=b.__getColIndex(u.data.id,R,!0);if(F<=2)throw new Error("The row number or status columns are immutable.");var P=u.data.colInfos[F-1];Object.keys(_).forEach(function(pe){Object.prototype.hasOwnProperty.call(P,pe)&&_[pe]!==void 0&&(P[pe]=_[pe])}),P.name||(P.name=P.colId),P.header||(P.header=Zt(u.methods.getHeaderRowCount(),P.colId));var z=u.methods.getDatas();return z.forEach(function(pe){var Se,ze=gt(pe);try{for(ze.s();!(Se=ze.n()).done;){var je=Se.value;je.colId===P.colId&&b.setCellDataFromColInfo(je,P)}}catch(Ue){ze.e(Ue)}finally{ze.f()}}),b.__loadHeader(u.data.id),u.methods.load(z),b.__loadFooter(u.data.id),!0},getColInfo:function(_){var R=b.__getColInfo(u.data.id,_);return{colId:R.colId,colIndex:R.colIndex,name:R.name,header:R.header,footer:R.footer,untarget:R.untarget,colVisible:R.colVisible,required:R.required,resizable:R.resizable,originWidth:R.originWidth,dataType:R.dataType,selectSize:R.selectSize,locked:R.locked,lockedColor:R.lockedColor,format:R.format,codes:ot(R.codes),defaultCode:R.defaultCode,maxLength:R.maxLength,maxByte:R.maxByte,maxNumber:R.maxNumber,minNumber:R.minNumber,roundNumber:R.roundNumber,align:R.align,verticalAlign:R.verticalAlign,overflowWrap:R.overflowWrap,wordBreak:R.wordBreak,whiteSpace:R.whiteSpace,backColor:R.backColor,fontColor:R.fontColor,fontBold:R.fontBold,fontItalic:R.fontItalic,fontThruline:R.fontThruline,fontUnderline:R.fontUnderline,rowMerge:R.rowMerge,colMerge:R.colMerge,sortable:R.sortable,filterable:R.filterable,filterValues:ot(R.filterValues),filterValue:ot(R.filterValue)}},getColDatas:function(_){for(var R=b.__getColIndex(u.data.id,_,!0),F=[],P=1;P<=u.methods.getRowCount();P++)F.push(u.methods.getCellData(P,R));return F},setColSameValue:function(_,R){var F=arguments.length>2&&arguments[2]!==void 0&&arguments[2],P=b.__getColIndex(u.data.id,_,!0);if(b.__checkColRownumOrStatus(P),F){for(var z=[],pe=1;pe<=u.methods.getRowCount();pe++){var Se=b._getCell(u.data.id,pe,P),ze=b.getRecordsWithModifyValue(Se,R,!0);Array.isArray(ze)&&ze.length>0&&z.push(ze[0])}b.recordGridModify(u.data.id,z)}else{for(var je=1;je<=u.methods.getRowCount();je++){var Ue=b._getCell(u.data.id,je,P);Ue.value=b.getValidValue(Ue,R),b.reConnectedCallbackElement(Ue)}b.reloadGridWithModifyCell(u.data.id,P)}return!0},getColValues:function(_){for(var R=b.__getColIndex(u.data.id,_,!0),F=[],P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,R);F.push(ot(z.value))}return F},getColTexts:function(_){for(var R=b.__getColIndex(u.data.id,_,!0),F=[],P=1;P<=u.methods.getRowCount();P++)F.push(u.methods.getCellText(P,R));return F},isColUnique:function(_){for(var R=b.__getColIndex(u.data.id,_,!0),F=[],P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,R);switch(z.dataType){case"select":case"checkbox":case"button":case"link":F.push(b.getTextFromCell(z));break;default:F.push(z.value)}}return F.length===new Set(F).size},openFilter:function(_){return b.__getHeaderFilter(u.data.id,_).style.display="block",!0},closeFilter:function(_){return b.__getHeaderFilter(u.data.id,_).style.display="none",!0},setColFilterValue:function(_,R){var F,P=b.__getColInfo(u.data.id,_,!0);if(!P.filterValues.has(R))throw new Error("Please insert a valid filterValue. "+Array.from(P.filterValues).join(", "));for(var z=1;z<=u.methods.getHeaderRowCount();z++)if((F=b._getHeaderCell(u.data.id,z,P.colIndex).querySelectorAll("."+u.data.id+"_filterSelect")).length>0){F=F[0];break}return F.value=R,F.value!=="$$ALL"&&(F.style.display="block"),b._doFilter(u.data.id),!0},getColFilterValues:function(_){var R=b.__getColInfo(u.data.id,_,!0);return Array.from(R.filterValues)},getColFilterValue:function(_){var R=b.__getColInfo(u.data.id,_,!0);return R.filterValue?R.filterValue:null},getColId:function(_){return b.__getColInfo(u.data.id,_,!0).colId},getColIndex:function(_){return b.__getColIndex(u.data.id,_,!0)},setColName:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(!R)throw new Error("Column Name is required");if(typeof R!="string")throw new Error("Please insert a string type.");b.__getColInfo(u.data.id,F).name=R;for(var P=1;P<=u.methods.getRowCount();P++)b._getCell(u.data.id,P,F).name=R;return!0},getColName:function(_){return b.__getColInfo(u.data.id,_).name},setColUntarget:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).untarget=R;for(var P=1;P<=u.methods.getRowCount();P++)b._getCell(u.data.id,P,F).untarget=R;return b.resetSelection(u.data.id),!0},setColRowMerge:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).rowMerge=R;var P=u.methods.getDatas();return u.methods.load(P),!0},isColRowMerge:function(_){return b.__getColInfo(u.data.id,_,!0).rowMerge},setColColMerge:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).colMerge=R;var P=u.methods.getDatas();return u.methods.load(P),!0},isColColMerge:function(_){return b.__getColInfo(u.data.id,_,!0).colMerge},setColVisible:function(_,R){if(typeof R!="boolean")throw new Error("Please insert a boolean type.");var F=b.__getColInfo(u.data.id,_,!0);return R?b.changeColSize(u.data.id,F.colIndex,Ie(F.originWidth).number):b.changeColSize(u.data.id,F.colIndex,0),F.colVisible=R,b.__loadHeader(u.data.id),b.reloadGridWithModifyCell(u.data.id,F.colIndex),!0},isColVisible:function(_){return b.__getColInfo(u.data.id,_,!0).colVisible},setColRequired:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F,!0).required=R;for(var P=1;P<=u.methods.getRowCount();P++)b._getCell(u.data.id,P,F).required=R;return!0},isColRequired:function(_){return b.__getColInfo(u.data.id,_,!0).required},setColResizable:function(_,R){if(b.__checkColRownumOrStatus(_),typeof R!="boolean")throw new Error("Please insert a boolean type.");return b.__getColInfo(u.data.id,_,!0).resizable=R,b.__loadHeader(u.data.id),!0},isColResizable:function(_){return b.__getColInfo(u.data.id,_,!0).resizable},setColSortable:function(_,R){if(b.__checkColRownumOrStatus(_),typeof R!="boolean")throw new Error("Please insert a boolean type.");return b.__getColInfo(u.data.id,_,!0).sortable=R,!0},isColSortable:function(_){return b.__getColInfo(u.data.id,_,!0).sortable},setColFilterable:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");return b.__getColInfo(u.data.id,F,!0).filterable=R,b.__loadHeader(u.data.id),b.__loadFooter(u.data.id),b.reloadColFilterValue(u.data.id,_),!0},isColFilterable:function(_){return b.__getColInfo(u.data.id,_,!0).filterable},setColOriginWidth:function(_,R){var F=b.__getColInfo(u.data.id,_,!0),P=Ie(R);if(!We(K,P.unit))throw new Error("Width units can only be pixel or %.");return F.originWidth=P.number+P.unit,b.changeColSize(u.data.id,F.colIndex,P.number),P.number===0?F.colVisible=!1:F.colVisible=!0,b.__loadHeader(u.data.id),b.reloadGridWithModifyCell(u.data.id,F.colIndex),!0},getColOriginWidth:function(_){return b.__getColInfo(u.data.id,_,!0).originWidth},setColDataType:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(![].concat(gn(Object.keys(W)),gn(Object.keys(Q.dataType))).includes(R))throw new Error("Please insert a valid dataType.");b.__getColInfo(u.data.id,F).dataType=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.dataType=R,b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColDataType:function(_){return b.__getColInfo(u.data.id,_,!0).dataType},setColSelectSize:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);b.__getColInfo(u.data.id,F).selectSize=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.selectSize=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColSelectSize:function(_){return b.__getColInfo(u.data.id,_,!0).selectSize},setColLocked:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).locked=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.locked=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},isColLocked:function(_){return b.__getColInfo(u.data.id,_,!0).locked},setColLockedColor:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).lockedColor=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.lockedColor=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},isColLockedColor:function(_){return b.__getColInfo(u.data.id,_,!0).lockedColor},setColFormat:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="string")throw new Error("Please insert a string type.");b.__getColInfo(u.data.id,F).format=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.format=R,z.dataType==="mask"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColFormat:function(_){return b.__getColInfo(u.data.id,_,!0).format},setColCodes:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);if(!Array.isArray(R))throw new Error("Please insert a vaild codes. (Array)");b.__getColInfo(u.data.id,F).codes=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.codes=R,z.dataType==="code"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColCodes:function(_){return b.__getColInfo(u.data.id,_,!0).codes},setColDefaultCode:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);b.__getColInfo(u.data.id,F).defaultCode=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.defaultCode=R,z.dataType==="code"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColDefaultCode:function(_){return b.__getColInfo(u.data.id,_,!0).defaultCode},setColMaxLength:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);R=Me(R),b.__getColInfo(u.data.id,F).maxLength=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.maxLength=R,z.dataType==="text"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColMaxLength:function(_){return b.__getColInfo(u.data.id,_,!0).maxLength},setColMaxByte:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);R=Me(R),b.__getColInfo(u.data.id,F).maxByte=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.maxByte=R,z.dataType==="text"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColMaxByte:function(_){return b.__getColInfo(u.data.id,_,!0).maxByte},setColMaxNumber:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);R=ve(R),b.__getColInfo(u.data.id,F).maxNumber=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.maxNumber=R,z.dataType==="number"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColMaxNumber:function(_){return b.__getColInfo(u.data.id,_,!0).maxNumber},setColMinNumber:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);R=ve(R),b.__getColInfo(u.data.id,F).minNumber=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.minNumber=R,z.dataType==="number"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColMinNumber:function(_){return b.__getColInfo(u.data.id,_,!0).minNumber},setColRoundNumber:function(_,R){b.__checkColRownumOrStatus(_);var F=b.__getColIndex(u.data.id,_,!0);R=Ee(R),b.__getColInfo(u.data.id,F).roundNumber=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.roundNumber=R,z.dataType==="number"&&(z.value=b.getValidValue(z,z.value)),b.reConnectedCallbackElement(z)}return b.reloadGridWithModifyCell(u.data.id,F),!0},getColRoundNumber:function(_){return b.__getColInfo(u.data.id,_,!0).roundNumber},setColAlign:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(!We(X,R))throw new Error("Please insert a vaild align. (left, center, right)");b.__getColInfo(u.data.id,F).align=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.align=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColAlign:function(_){return b.__getColInfo(u.data.id,_,!0).align},setColVerticalAlign:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(!We(ee,R))throw new Error("Please insert a vaild align. (top, center, bottom)");b.__getColInfo(u.data.id,F).verticalAlign=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.verticalAlign=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColVerticalAlign:function(_){return b.__getColInfo(u.data.id,_,!0).verticalAlign},setColOverflowWrap:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);b.__getColInfo(u.data.id,F).overflowWrap=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.overflowWrap=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColOverflowWrap:function(_){return b.__getColInfo(u.data.id,_,!0).overflowWrap},setColWordBreak:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);b.__getColInfo(u.data.id,F).wordBreak=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.wordBreak=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColWordBreak:function(_){return b.__getColInfo(u.data.id,_,!0).wordBreak},setColWhiteSpace:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);b.__getColInfo(u.data.id,F).whiteSpace=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.whiteSpace=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColWhiteSpace:function(_){return b.__getColInfo(u.data.id,_,!0).whiteSpace},setColBackColor:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(R!=="#000"&&R!=="#000000"&&ut(R)==="#000000")throw new Error("Please enter the correct hexadecimal color. (#ffffff)");b.__getColInfo(u.data.id,F).backColor=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.backColor=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColBackColor:function(_){return b.__getColInfo(u.data.id,_,!0).backColor},setColFontColor:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(R!=="#000"&&R!=="#000000"&&ut(R)==="#000000")throw new Error("Please enter the correct hexadecimal color. (#ffffff)");b.__getColInfo(u.data.id,F).fontColor=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.fontColor=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},getColFontColor:function(_){return b.__getColInfo(u.data.id,_,!0).fontColor},setColFontBold:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).fontBold=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.fontBold=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},isColFontBold:function(_){return b.__getColInfo(u.data.id,_,!0).fontBold},setColFontItalic:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).fontItalic=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.fontItalic=R,b.__gridCellReConnectedWithControlSpan(z)}return!0},isColFontItalic:function(_){return b.__getColInfo(u.data.id,_,!0).fontItalic},setColFontThruline:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).fontThruline=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.fontThruline=R,z.fontThruline&&(z.fontUnderline=!1),b.__gridCellReConnectedWithControlSpan(z)}return!0},isColFontThruline:function(_){return b.__getColInfo(u.data.id,_,!0).fontThruline},setColFontUnderline:function(_,R){var F=b.__getColIndex(u.data.id,_,!0);if(typeof R!="boolean")throw new Error("Please insert a boolean type.");b.__getColInfo(u.data.id,F).fontUnderline=R;for(var P=1;P<=u.methods.getRowCount();P++){var z=b._getCell(u.data.id,P,F);z.fontUnderline=R,z.fontUnderline&&(z.fontThruline=!1),b.__gridCellReConnectedWithControlSpan(z)}return!0},isColFontUnderline:function(_){return b.__getColInfo(u.data.id,_,!0).fontUnderline},addRow:function(_,R){var F,P;if(_===0&&(_=1),_?typeof _=="number"?(F=_-1,P=R):P=_:P=R,(F==null||F>u.methods.getRowCount())&&(F=u.methods.getRowCount()),(P=P?[P]:[[{}]])===null||!Array.isArray(P))throw new Error("Please insert valid datas.");var z,pe=bt(P),Se=u.methods.getDatas(),ze=0,je=gt(P);try{for(je.s();!(z=je.n()).done;){var Ue=z.value;if(pe){var it=[],rt=void 0;for(var ct in Ue)rt={colId:ct,value:Ue[ct]},it.push(rt);Se.splice(F+ze,0,it)}else Se.splice(F+ze,0,Ue);ze++}}catch(De){je.e(De)}finally{je.f()}u.methods.load(Se);for(var Ne=F;Ne<F+ze;Ne++)u.methods.setRowStatus(Ne+1,"C");return b.focusCell(b._getCell(u.data.id,F+1,"v-g-status")),!0},removeRow:function(_){b.__checkRowIndex(u.data.id,_);var R=u.methods.getRowValues(_);R["v-g-status"]="D";var F=u.methods.getDatas();return F.splice(_-1,1),u.methods.load(F),R},setRowStatus:function(_,R){if(b.__checkRowIndex(u.data.id,_),!We(fe,R))throw new Error("Please insert the correct status code. (C, U, D)");var F=b._getCell(u.data.id,_,"v-g-status");return F.value=R,b.reConnectedCallbackElement(F),!0},getRowStatus:function(_){return b.__checkRowIndex(u.data.id,_),b._getCell(u.data.id,_,"v-g-status").value},setRowDatas:function(_,R){var F,P=gt(R);try{for(P.s();!(F=P.n()).done;){var z=F.value;b.__setCellData(u.data.id,_,z.colId,z,!1)}}catch(pe){P.e(pe)}finally{P.f()}return!0},getRowDatas:function(_){b.__checkRowIndex(u.data.id,_);var R,F=[],P=gt(u.data.colInfos);try{for(P.s();!(R=P.n()).done;){var z=R.value;F.push(u.methods.getCellData(_,z.colIndex))}}catch(pe){P.e(pe)}finally{P.f()}return F},setRowValues:function(_,R){var F=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(_=2,b.__checkRowIndex(u.data.id,_),!R||R.constructor!==Object)throw new Error("Please insert a valid value.");var P=null,z=null;if(F){var pe,Se,ze=[],je=gt(u.data.colInfos);try{for(je.s();!(Se=je.n()).done;){var Ue=Se.value;if(Ue.colId!=="v-g-rownum"&&Ue.colId!=="v-g-status"){for(var it in R)Ue.colId===it&&(P=R[it]);z=b._getCell(u.data.id,_,Ue.colIndex),pe=b.getRecordsWithModifyValue(z,P,!0),Array.isArray(pe)&&pe.length>0&&ze.push(pe[0])}}}catch(lt){je.e(lt)}finally{je.f()}b.recordGridModify(u.data.id,ze)}else{var rt,ct=gt(u.data.colInfos);try{for(ct.s();!(rt=ct.n()).done;){var Ne=rt.value;if(Ne.colId!=="v-g-rownum"&&Ne.colId!=="v-g-status"){for(var De in R)Ne.colId===De&&(P=R[De]);(z=b._getCell(u.data.id,_,Ne.colIndex)).value=b.getValidValue(z,P),b.reConnectedCallbackElement(z),b.reloadGridWithModifyCell(u.data.id,z.colIndex)}}}catch(lt){ct.e(lt)}finally{ct.f()}}return!0},getRowValues:function(_){b.__checkRowIndex(u.data.id,_);var R,F={},P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(R=P.n()).done;){var z=R.value;F[z.colId]=ot(z.value)}}catch(pe){P.e(pe)}finally{P.f()}return F},getRowTexts:function(_){b.__checkRowIndex(u.data.id,_);var R,F={},P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(R=P.n()).done;){var z=R.value;F[z.colId]=b.getTextFromCell(z)}}catch(pe){P.e(pe)}finally{P.f()}return F},setRowVisible:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");for(var F=1;F<=u.methods.getColCount();F++){var P=b._getCell(u.data.id,_,F);P.rowVisible=R,b.__gridCellReConnectedWithControlSpan(P)}return b.reloadGridForMerge(u.data.id),!0},isRowVisible:function(_){return b.__checkRowIndex(u.data.id,_),b._getCell(u.data.id,_,1).rowVisible},setRowDataType:function(_,R){if(b.__checkRowIndex(u.data.id,_),![].concat(gn(Object.keys(W)),gn(Object.keys(Q.dataType))).includes(R))throw new Error("Please insert a valid dataType.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.dataType=R,b.reConnectedCallbackElement(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),u.methods.reloadFilterValue(),u.methods.reloadFooterValue(),!0},setRowLocked:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.locked=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowLockedColor:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.lockedColor=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowAlign:function(_,R){if(b.__checkRowIndex(u.data.id,_),!We(X,R))throw new Error("Please insert a vaild align. (left, center, right)");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.align=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowVerticalAlign:function(_,R){if(b.__checkRowIndex(u.data.id,_),!We(ee,R))throw new Error("Please insert valid vertical align. (top, center, bottom)");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.verticalAlign=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowBackColor:function(_,R){if(b.__checkRowIndex(u.data.id,_),R!=="#000"&&R!=="#000000"&&ut(R)==="#000000")throw new Error("Please enter the correct hexadecimal color. (#ffffff)");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.backColor=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowFontColor:function(_,R){if(b.__checkRowIndex(u.data.id,_),R!=="#000"&&R!=="#000000"&&ut(R)==="#000000")throw new Error("Please enter the correct hexadecimal color. (#ffffff)");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.fontColor=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowFontBold:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.fontBold=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowFontItalic:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.fontItalic=R,b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowFontThruline:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.fontThruline=R,z.fontThruline&&(z.fontUnderline=!1),b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},setRowFontUnderline:function(_,R){if(b.__checkRowIndex(u.data.id,_),typeof R!="boolean")throw new Error("Please insert a boolean type.");var F,P=gt(u.elements.gridBody._gridBodyCells[_-1]);try{for(P.s();!(F=P.n()).done;){var z=F.value;z.colId!=="v-g-rownum"&&z.colId!=="v-g-status"&&(z.fontUnderline=R,z.fontUnderline&&(z.fontThruline=!1),b.__gridCellReConnectedWithControlSpan(z))}}catch(pe){P.e(pe)}finally{P.f()}return b.reloadGridForMerge(u.data.id),!0},searchRowsWithMatched:function(_){if(_.constructor!==Object)throw new Error("Please insert a valid matches. (Object)");var R,F=[];return u.elements.gridBody._gridBodyCells.forEach(function(P,z){R=!0;var pe,Se=gt(P);try{for(Se.s();!(pe=Se.n()).done;)for(var ze=pe.value,je=0,Ue=Object.keys(_);je<Ue.length;je++){var it=Ue[je];if(ze.colId===it&&ze.value!==_[it]){R=!1;break}}}catch(rt){Se.e(rt)}finally{Se.f()}R&&F.push(z+1)}),F},searchRowDatasWithMatched:function(_){var R=u.methods.searchRowsWithMatched(_),F=[];return R.forEach(function(P){F.push(u.methods.getRowDatas(P))}),F},searchRowValuesWithMatched:function(_){var R=u.methods.searchRowsWithMatched(_),F=[];return R.forEach(function(P){F.push(u.methods.getRowValues(P))}),F},searchRowsWithFunction:function(_){if(typeof _!="function")throw new Error("Please insert a valid function.");for(var R=[],F=1;F<=u.methods.getRowCount();F++)_(u.methods.getRowDatas(F))&&R.push(F);return R},searchRowDatasWithFunction:function(_){var R=u.methods.searchRowsWithFunction(_),F=[];return R.forEach(function(P){F.push(u.methods.getRowDatas(P))}),F},searchRowValuesWithFunction:function(_){var R=u.methods.searchRowsWithFunction(_),F=[];return R.forEach(function(P){F.push(u.methods.getRowValues(P))}),F},setCellData:function(_,R,F){return b.__setCellData(u.data.id,_,R,F)},getCellData:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,F);var P=b._getCell(u.data.id,_,F);return b.__getData(P)},setCellValue:function(_,R,F){var P=arguments.length>3&&arguments[3]!==void 0&&arguments[3];b.__checkRowIndex(u.data.id,_);var z=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,z);var pe=b._getCell(u.data.id,_,z);return P?b.recordGridModify(u.data.id,b.getRecordsWithModifyValue(pe,F,!0)):(pe.value=b.getValidValue(pe,F),b.reConnectedCallbackElement(pe),b.reloadGridWithModifyCell(u.data.id,pe.colIndex)),!0},getCellValue:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),ot(b._getCell(u.data.id,_,F).value)},getCellText:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b.getTextFromCell(b._getCell(u.data.id,_,F))},setCellRequired:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.required=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellRequired:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).required},setCellDataType:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),![].concat(gn(Object.keys(W)),gn(Object.keys(Q.dataType))).includes(F))throw new Error("Please insert a valid dataType.");var z=b._getCell(u.data.id,_,P);return z.dataType=F,b.reConnectedCallbackElement(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellDataType:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b.__checkColRownumOrStatus(F),b._getCell(u.data.id,_,F).dataType},setCellLocked:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.locked=F,b.__gridCellReConnectedWithControlSpan(z),!0},isCellLocked:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).locked},setCellLockedColor:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.lockedColor=F,b.__gridCellReConnectedWithControlSpan(z),!0},isCellLockedColor:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).lockedColor},setCellFormat:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),typeof F!="string")throw new Error("Please insert a string type.");var z=b._getCell(u.data.id,_,P);return z.format=F,z.dataType==="mask"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellFormat:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).format},setCellCodes:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),!Array.isArray(F))throw new Error("Please insert a vaild codes. (Array)");var z=b._getCell(u.data.id,_,P);return z.codes=F,z.dataType==="code"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellCodes:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).codes},setCellDefaultCode:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P);var z=b._getCell(u.data.id,_,P);return z.defaultCode=F,z.dataType==="code"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellDefaultCode:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).defaultCode},setCellMaxLength:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),F=Me(F);var z=b._getCell(u.data.id,_,P);return z.maxLength=F,z.dataType==="text"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellMaxLength:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).maxLength},setCellMaxByte:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),F=Me(F);var z=b._getCell(u.data.id,_,P);return z.maxByte=F,z.dataType==="text"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellMaxByte:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).maxByte},setCellMaxNumber:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),F=ve(F);var z=b._getCell(u.data.id,_,P);return z.maxNumber=F,z.dataType==="number"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellMaxNumber:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).maxNumber},setCellMinNumber:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),F=ve(F);var z=b._getCell(u.data.id,_,P);return z.minNumber=F,z.dataType==="number"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellMinNumber:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).minNumber},setCellRoundNumber:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P),b.__checkColRownumOrStatus(P),F=Ee(F);var z=b._getCell(u.data.id,_,P);return z.roundNumber=F,z.dataType==="number"&&(z.value=b.getValidValue(z,z.value)),b.__gridCellReConnectedWithControlSpan(z),b.reloadGridWithModifyCell(u.data.id,P),!0},getCellRoundNumber:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).roundNumber},setCellAlign:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),!We(X,F))throw new Error("Please insert a vaild align. (left, center, right)");var z=b._getCell(u.data.id,_,P);return z.align=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellAlign:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).align},setCellVerticalAlign:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),!We(ee,F))throw new Error("Please insert a vaild align. (top, center, bottom)");var z=b._getCell(u.data.id,_,P);return z.verticalAlign=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellVerticalAlign:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).verticalAlign},setCellOverflowWrap:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P);var z=b._getCell(u.data.id,_,P);return z.overflowWrap=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellOverflowWrap:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).overflowWrap},setCellWordBreak:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P);var z=b._getCell(u.data.id,_,P);return z.wordBreak=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellWordBreak:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).wordBreak},setCellWhiteSpace:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,P);var z=b._getCell(u.data.id,_,P);return z.whiteSpace=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellWhiteSpace:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).whiteSpace},isCellVisible:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).style.display!=="none"},setCellBackColor:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),F!=="#000"&&F!=="#000000"&&ut(F)==="#000000")throw new Error("Please enter the correct hexadecimal color. (#ffffff)");var z=b._getCell(u.data.id,_,P);return z.backColor=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellBackColor:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).backColor},setCellFontColor:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),F!=="#000"&&F!=="#000000"&&ut(F)==="#000000")throw new Error("Please enter the correct hexadecimal color. (#ffffff)");var z=b._getCell(u.data.id,_,P);return z.fontColor=F,b.__gridCellReConnectedWithControlSpan(z),!0},getCellFontColor:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).fontColor},setCellFontBold:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.fontBold=F,b.__gridCellReConnectedWithControlSpan(z),!0},isCellFontBold:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).fontBold},setCellFontItalic:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.fontItalic=F,b.__gridCellReConnectedWithControlSpan(z),!0},isCellFontItalic:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).fontItalic},setCellFontThruline:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.fontThruline=F,z.fontThruline&&(z.fontUnderline=!1),b.__gridCellReConnectedWithControlSpan(z),!0},isCellFontThruline:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).fontThruline},setCellFontUnderline:function(_,R,F){b.__checkRowIndex(u.data.id,_);var P=b.__getColIndex(u.data.id,R,!0);if(b.__checkColIndex(u.data.id,P),typeof F!="boolean")throw new Error("Please insert a boolean type.");var z=b._getCell(u.data.id,_,P);return z.fontUnderline=F,z.fontUnderline&&(z.fontThruline=!1),b.__gridCellReConnectedWithControlSpan(z),!0},isCellFontUnderline:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);return b.__checkColIndex(u.data.id,F),b._getCell(u.data.id,_,F).fontUnderline},setTargetCell:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,F);var P=b._getCell(u.data.id,_,F);return!!b.isCellVisible(P)&&(Q._status.activeGrid=u,b.selectCell(P))},getTargetRow:function(){return u.data.variables.targetCell?u.data.variables.targetCell.rowIndex:null},getTargetCol:function(){return u.data.variables.targetCell?u.data.variables.targetCell.colId:null},setActiveCells:function(_,R,F,P){b.__checkRowIndex(u.data.id,_),b.__checkRowIndex(u.data.id,F);var z=b.__getColIndex(u.data.id,R,!0),pe=b.__getColIndex(u.data.id,P,!0);b.__checkColIndex(u.data.id,z),b.__checkColIndex(u.data.id,pe);var Se=b._getCell(u.data.id,_,z),ze=b._getCell(u.data.id,F,pe);return!!b.isCellVisible(Se)&&!!b.isCellVisible(ze)&&(Q._status.activeGrid=u,u.data.variables.targetCell=Se,b.unselectCells(u.data.id),b.selectCells(Se,ze,Se))},getActiveRows:function(){return u.data.variables.activeRows},getActiveCols:function(){var _=[];return u.data.variables.activeCols.forEach(function(R){_.push(b.__getColInfo(u.data.id,R).colId)}),_},getActiveRange:function(){var _={startRow:null,startColId:null,endRow:null,endColId:null},R=u.data.variables.activeCells;return R.length>0&&(_.startRow=R[0].rowIndex,_.startColId=R[0].colId,_.endRow=R[R.length-1].rowIndex,_.endColId=R[R.length-1].colId),_},editCell:function(_,R){b.__checkRowIndex(u.data.id,_);var F=b.__getColIndex(u.data.id,R,!0);b.__checkColIndex(u.data.id,F),b.__checkColRownumOrStatus(F);var P=b._getCell(u.data.id,_,R);return!(["select","checkbox","button","link"].indexOf(P.dataType)>=0||!u.methods.setTargetCell(_,R)||(b.createGridEditor(P),0))},redo:function(){return b.redoundo(u.data.id)},undo:function(){return b.redoundo(u.data.id,!1)}}}(v,me,A),Lt(me),me.hendler.gridHeader_dblclick=function(Q){if(!v._status.onHeaderDragging){var u;if(Q.target._type==="ghd")u=Q.target;else{if(Q.target._type!=="sort")return;u=Q.target.parentNode}if(me.events.onBeforeDblClickHeader(u.rowIndex,u.colId)===!1)return Q.stopPropagation(),void Q.preventDefault();u.dataType==="checkbox"&&me.data.gridInfo.allCheckable&&u._isLastCell?me.methods.setColSameValue(u.colIndex,!A.getCheckboxCellTrueOrFalse(A._getCell(me.data.id,1,u.colIndex)),!0):me.data.gridInfo.sortable&&A.__getColInfo(me.data.id,u.colId).sortable&&u._isLastCell&&(me.methods.sort(u.colId,!me.data.variables.sortToggle[u.colId]),me.events.onAfterDblClickHeader(u.rowIndex,u.colId))}},oe.addEventListener("dblclick",me.hendler.gridHeader_dblclick),me.hendler.gridHeader_click=function(Q){var u;if(Q.target._type==="ghd"){if(u=Q.target,me.events.onBeforeClickHeader(u.rowIndex,u.colId)===!1)return Q.stopPropagation(),void Q.preventDefault();me.events.onAfterClickHeader(u.rowIndex,u.colId)}else if(Q.target._type==="filter"){if(u=Q.target.parentNode,me.events.onClickFilter(u.rowIndex,u.colId,Q.target)===!1)return Q.stopPropagation(),void Q.preventDefault();var b=u.parentNode.querySelectorAll("."+u._gridId+"_filterSelect"),_=Q.target.querySelectorAll("."+u._gridId+"_filterSelect")[0];b.forEach(function(R){_!==R&&R.value==="ALL"&&(R.style.display="none")}),_.style.display==="none"?_.style.display="block":_.style.display="none"}},oe.addEventListener("click",me.hendler.gridHeader_click),me.hendler.gridBody_mousemove=function(Q){v._status.isDragging&&(v._status.mouseX=Q.clientX,v._status.mouseY=Q.clientY)},de.addEventListener("mousemove",me.hendler.gridBody_mousemove),me.hendler.gridBody_mouseleave=function(Q){if(v._status.isDragging){var u,b=Q.clientX,_=Q.clientY,R=b-b,F=_-_;u=Math.abs(R)>Math.abs(F)?R>0?"right":"left":F>0?"down":"up",A.startScrolling(me.data.id,u)}},de.addEventListener("mouseleave",me.hendler.gridBody_mouseleave),me.hendler.gridBody_mouseenter=function(Q){v._status.scrollInterval&&A.stopScrolling(v)},de.addEventListener("mouseenter",me.hendler.gridBody_mouseenter),me.hendler.gridBody_dblclick=function(Q){var u;(u=Q.target._type==="gbdv"?Q.target.parentNode:Q.target)._type==="gbd"&&me.events.onBeforeDblClickCell(u.rowIndex,u.colId)!==!1&&(["select","checkbox","button","link"].indexOf(u.dataType)>=0||(A.createGridEditor(u),me.events.onAfterDblClickCell(u.rowIndex,u.colId)))},de.addEventListener("dblclick",me.hendler.gridBody_dblclick),me.hendler.gridElement_click=function(Q){var u;if(Q.target._type&&(u=Q.target._type==="gbdv"?Q.target.parentNode:Q.target)&&!u.untarget&&u._type==="gbd"){if(u.firstChild&&u.firstChild.nType!=="select"&&me.events.onBeforeClickCell(u.rowIndex,u.colId)===!1)return Q.stopPropagation(),void Q.preventDefault();if(Q.target.nType)switch(Q.target.nType){case"checkbox":if(me.events.onClickCheckbox(u.rowIndex,u.colId,Q.target)===!1)return Q.stopPropagation(),void Q.preventDefault();v._status.editOldValue=Q.target.parentNode.value;break;case"button":if(me.events.onClickButton(u.rowIndex,u.colId,Q.target)===!1)return Q.stopPropagation(),void Q.preventDefault();break;case"link":if(me.events.onClickLink(u.rowIndex,u.colId,Q.target)===!1)return Q.stopPropagation(),void Q.preventDefault()}Object.keys(v.dataType).forEach(function(b){if(u.dataType===b&&v.dataType[b].onClick){if(typeof v.dataType[b].onClick!="function")throw new Error("onClick must be a function.");if(v.dataType[b].onClick(Q,u._gridId,A.__getData(u))===!1)return}}),me.events.onAfterClickCell(u.rowIndex,u.colId)}},q.addEventListener("click",me.hendler.gridElement_click),me.hendler.gridElement_mousedown=function(Q){var u;if(Q.target._type&&!(u=Q.target._type==="gbdv"?Q.target.parentNode:Q.target).untarget&&u._type==="gbd"){if(Q.target.nType&&Q.target.nType==="select"){if(me.events.onBeforeClickCell(u.rowIndex,u.colId)===!1||me.events.onClickSelect(u.rowIndex,u.colId,Q.target)===!1)return Q.stopPropagation(),void Q.preventDefault();v._status.editOldValue=Q.target.value}Object.keys(v.dataType).forEach(function(b){if(u.dataType===b&&v.dataType[b].onMousedown){if(typeof v.dataType[b].onMousedown!="function")throw new Error("onMousedown must be a function.");if(v.dataType[b].onMousedown(Q,u._gridId,A.__getData(u))===!1)return}}),v._status.activeGrid=me,v._status.isDragging=!0,me.data.gridInfo.selectionPolicy==="range"&&Q.shiftKey&&me.data.variables.targetCell?(A.unselectCells(me.data.id),A.selectCells(me.data.variables.targetCell,u)):A.selectCell(u)}},q.addEventListener("mousedown",me.hendler.gridElement_mousedown),me.hendler.gridElement_mousemove=function(Q){var u;Q.target._type==="gbdv"?u=Q.target.parentNode:Q.target._type==="gbd"&&(u=Q.target),u&&me.data.gridInfo.selectionPolicy==="range"&&v._status.mouseoverCell!==u&&(v._status.mouseoverCell=u,v._status.isDragging&&me.data.variables.targetCell&&(A.unselectCells(me.data.id),A.selectCells(me.data.variables.targetCell,u)))},q.addEventListener("mousemove",me.hendler.gridElement_mousemove),me.hendler.gridElement_mouseleave=function(Q){me.data.gridInfo.selectionPolicy==="range"&&(v._status.mouseoverCell=null,v._status.isDragging&&(v._status.isDragging=!1))},q.addEventListener("mouseleave",me.hendler.gridElement_mouseleave),q.append(oe),q.append(de),q.append(he),H.append(q),A.__setGridColSize(U),A.connectedGridHeader(U),A.connectedGridBody(U),A.connectedGridFooter(U),A.__loadHeader(me.data.id),A.__loadFooter(me.data.id),me._isMounted=!0};for(p.s();!(g=p.n()).done;)B()}catch(H){p.e(H)}finally{p.f()}};function Ge(v){return function(w){if(Array.isArray(w))return s(w)}(v)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(v)||E(v)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
36
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function j(v,w){var A=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!A){if(Array.isArray(v)||(A=E(v))||w){A&&(v=A);var x=0,g=function(){};return{s:g,n:function(){return x>=v.length?{done:!0}:{done:!1,value:v[x++]}},e:function(U){throw U},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,B=!0,H=!1;return{s:function(){A=A.call(v)},n:function(){var U=A.next();return B=U.done,U},e:function(U){H=!0,p=U},f:function(){try{B||A.return==null||A.return()}finally{if(H)throw p}}}}function E(v,w){if(v){if(typeof v=="string")return s(v,w);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?s(v,w):void 0}}function s(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}function l(v){return function(w){if(Array.isArray(w))return J(w)}(v)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(v)||$(v)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
38
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function k(v,w){var A=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!A){if(Array.isArray(v)||(A=$(v))||w){A&&(v=A);var x=0,g=function(){};return{s:g,n:function(){return x>=v.length?{done:!0}:{done:!1,value:v[x++]}},e:function(U){throw U},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
39
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,B=!0,H=!1;return{s:function(){A=A.call(v)},n:function(){var U=A.next();return B=U.done,U},e:function(U){H=!0,p=U},f:function(){try{B||A.return==null||A.return()}finally{if(H)throw p}}}}function $(v,w){if(v){if(typeof v=="string")return J(v,w);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?J(v,w):void 0}}function J(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}function ie(v){return function(w){if(Array.isArray(w))return He(w)}(v)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(v)||Ce(v)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
40
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ge(v,w){var A=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!A){if(Array.isArray(v)||(A=Ce(v))||w){A&&(v=A);var x=0,g=function(){};return{s:g,n:function(){return x>=v.length?{done:!0}:{done:!1,value:v[x++]}},e:function(U){throw U},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,B=!0,H=!1;return{s:function(){A=A.call(v)},n:function(){var U=A.next();return B=U.done,U},e:function(U){H=!0,p=U},f:function(){try{B||A.return==null||A.return()}finally{if(H)throw p}}}}function Ce(v,w){if(v){if(typeof v=="string")return He(v,w);var A={}.toString.call(v).slice(8,-1);return A==="Object"&&v.constructor&&(A=v.constructor.name),A==="Map"||A==="Set"?Array.from(v):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?He(v,w):void 0}}function He(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}function Le(v,w){var A=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!A){if(Array.isArray(v)||(A=function(U,q){if(U){if(typeof U=="string")return Ke(U,q);var oe={}.toString.call(U).slice(8,-1);return oe==="Object"&&U.constructor&&(oe=U.constructor.name),oe==="Map"||oe==="Set"?Array.from(U):oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(oe)?Ke(U,q):void 0}}(v))||w){A&&(v=A);var x=0,g=function(){};return{s:g,n:function(){return x>=v.length?{done:!0}:{done:!1,value:v[x++]}},e:function(U){throw U},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,B=!0,H=!1;return{s:function(){A=A.call(v)},n:function(){var U=A.next();return B=U.done,U},e:function(U){H=!0,p=U},f:function(){try{B||A.return==null||A.return()}finally{if(H)throw p}}}}function Ke(v,w){(w==null||w>v.length)&&(w=v.length);for(var A=0,x=Array(w);A<w;A++)x[A]=v[A];return x}var Ze=null,et={},Ve={reConnectedCallbackElement:function(v){},selectCell:function(v){},focusCell:function(v){},resetSelection:function(v){},unselectCells:function(v){},selectCells:function(v,w,A){},setActiveCol:function(v){},setActiveRow:function(v){},startScrolling:function(v,w){},stopScrolling:function(v){},copyGrid:function(v){},getCopyText:function(v){},pasteGrid:function(v,w){},getRecordsWithModifyValue:function(v,w,A){},getTabCell:function(v,w){},getMoveRowCell:function(v,w){},getMoveColCell:function(v,w){},recordGridModify:function(v,w){},redoundo:function(v,w){},selectAndCheckboxOnChange:function(v){},modifyColSize:function(v,w){},changeColSize:function(v,w,A){},modifyCellValue:function(v,w,A,x){},modifyCell:function(v){},sort:function(v,w,A,x,g){},setFilterOptions:function(v,w){},reloadColFilterValue:function(v,w){},reloadFilter:function(v,w){},getDatasWithClearFilterValue:function(v,w){},reloadColForMerge:function(v,w){},reloadGridWithModifyCell:function(v,w){},reloadGridForMerge:function(v){},reloadFooterValue:function(v){},setGridDataRowCol:function(v,w,A){},setGridDataPosition:function(v){},getGridCell:function(v,w,A,x,g){},setCellDataFromColInfo:function(v,w){},getSortSpan:function(v,w){},__getDefaultColInfo:function(v,w,A){},__getColInfo:function(v,w,A){},__getColIndex:function(v,w,A){},__setGridColSize:function(v){},_getCellChildNode:function(v){},__loadHeader:function(v){},_getHeaderRow:function(v,w){},_getHeaderCell:function(v,w,A){},_getHeaderCells:function(v){},__getHeaderFilter:function(v,w){},__loadFooter:function(v){},_getFooterRow:function(v,w){},_getFooterCell:function(v,w,A){},_getFooterCells:function(v){},_getRow:function(v,w){},_getCell:function(v,w,A){},_getCells:function(v){},__gridBodyCellsReConnected:function(v){},__mountGridBodyCell:function(v){},__clear:function(v){},__checkRowIndex:function(v,w){},__checkColRownumOrStatus:function(v){},__checkColIndex:function(v,w){},___getDatasWithoutExceptedProperty:function(v,w){},_doFilter:function(v){},__gridCellReConnectedWithControlSpan:function(v){},__getData:function(v,w){},__setCellData:function(v,w,A,x,g){},_getDataTypeStyle:function(){},_getFilterSpan:function(){},_getFooterFormula:function(){},_getColDefaultAlign:function(v){},isCellVisible:function(v){},getFirstCellValidNumber:function(v){},removeGridEditor:function(v){},addBagicEventListenerToGridEditor:function(v){},setBagicAttributesToGridEditor:function(v,w){},createGridEditorTextarea:function(v){},createGridEditorNumber:function(v){},createGridEditorDate:function(v){},createGridEditorMonth:function(v){},createGridEditorMask:function(v){},createGridEditorCode:function(v){},createGridEditor:function(v,w){},getValidValue:function(v,w){},getTextFromCell:function(v){},getFormatNumber:function(v,w){},getFormatNumberFromCell:function(v){},getDateWithValueDateFormat:function(v){},getDateWithValueMonthFormat:function(v){},getDateWithInputDateFormat:function(v){},getDateWithInputMonthFormat:function(v){},getDateWithGridDateFormat:function(v){},getDateWithGridMonthFormat:function(v){},getCheckboxCellTrueOrFalse:function(v){},getCodeValue:function(v,w,A){},getMaskValue:function(v,w){},setSelectOptions:function(v,w){},getSelectOptions:function(v){},connectedGridHeader:function(v){},connectedGridBody:function(v){},connectedGridFooter:function(v){},connectedGridData:function(v){}},Mt=function(v){return Ze||(v||(v=Rt()),Ze={elements:{sortAscSpan:v.elements.sortAscSpan,sortDescSpan:v.elements.sortDescSpan,filterSpan:v.elements.filterSpan},footerFormula:v.footerFormula,dataType:v.dataType,attributes:{defaultGridInfo:v.attributes.defaultGridInfo,defaultGridCssInfo:v.attributes.defaultGridCssInfo,defaultColInfo:v.attributes.defaultColInfo},checkByte:v.checkByte,getGrid:function(w){if(!et[w])return null;var A=et[w];return A.methods?A.methods:null},documentEvent:{mousedown:null,mouseup:null,keydown:null,copy:null,paste:null},_status:{isDragging:!1,onHeaderDragging:!1,isHeaderDragging:!1,mouseX:0,mouseY:0,activeGrid:null,activeGridEditor:null,editOldValue:null,editNewValue:null,filterOldValue:null,filterNewValue:null,mouseoverCell:null,scrollInterval:null},init:function(){xt()},mountGrid:function(w){tt(Ze,et,Ve,w)},destroy:function(){Ht()},unmountGrid:function(w){(function(A,x,g){if(!A._initialized)throw new Error("Please initialize vanillagrid");(g||document).querySelectorAll("[data-vanillagrid]").forEach(function(p){var B=x[p._gridId];B._isMounted&&(B.elements.gridHeader.removeEventListener("dblclick",B.hendler.gridHeader_dblclick),B.elements.gridHeader.removeEventListener("click",B.hendler.gridHeader_click),B.elements.gridBody.removeEventListener("mousemove",B.hendler.gridBody_mousemove),B.elements.gridBody.removeEventListener("mouseleave",B.hendler.gridBody_mouseleave),B.elements.gridBody.removeEventListener("mouseenter",B.hendler.gridBody_mouseenter),B.elements.gridBody.removeEventListener("dblclick",B.hendler.gridBody_dblclick),B.elements.grid.removeEventListener("click",B.hendler.gridElement_click),B.elements.grid.removeEventListener("mousedown",B.hendler.gridElement_mousedown),B.elements.grid.removeEventListener("mousemove",B.hendler.gridElement_mousemove),B.elements.grid.removeEventListener("mouseleave",B.hendler.gridElement_mouseleave),Qe(p),delete x[p._gridId])})})(Ze,et,w)},_initialized:!1},Ze)},Rt=function(){return{elements:{sortAscSpan:null,sortDescSpan:null,filterSpan:null},footerFormula:{},dataType:{},attributes:{defaultGridInfo:{locked:!1,lockedColor:!0,resizable:!0,redoable:!0,redoCount:30,visible:!0,headerVisible:!0,rownumVisible:!0,rownumSize:"60px",rownumLockedColor:!0,statusVisible:!0,statusLockedColor:!0,selectionPolicy:a.range,nullValue:null,dateFormat:"yyyy-mm-dd",monthFormat:"yyyy-mm",alterRow:!0,frozenColCount:0,frozenRowCount:0,sortable:!0,filterable:!0,allCheckable:!0,checkedValue:"Y",uncheckedValue:"N"},defaultGridCssInfo:{width:"100%",height:"600px",margin:"0 auto",padding:"0",sizeLevel:5,verticalAlign:i.center,cellFontSize:14,cellMinHeight:21,horizenBorderSize:1,verticalBorderSize:1,gridFontFamily:"Arial",editorFontFamily:"Arial",overflowWrap:null,wordBreak:null,whiteSpace:null,linkHasUnderLine:!0,invertColor:!1,color:null,colorSet:null,gridBorderColor:null,headerCellBackColor:null,headerCellBorderColor:null,headerCellFontColor:null,footerCellBackColor:null,footerCellBorderColor:null,footerCellFontColor:null,bodyBackColor:null,bodyCellBackColor:null,bodyCellBorderColor:null,bodyCellFontColor:null,editorBackColor:null,editorFontColor:null,selectCellBackColor:null,selectCellFontColor:null,selectColBackColor:null,selectColFontColor:null,selectRowBackColor:null,selectRowFontColor:null,mouseoverCellBackColor:null,mouseoverCellFontColor:null,lockCellBackColor:null,lockCellFontColor:null,alterRowBackColor:null,alterRowFontColor:null,buttonFontColor:null,buttonBorderColor:null,buttonBackColor:null,buttonHoverFontColor:null,buttonHoverBackColor:null,buttonActiveFontColor:null,buttonActiveBackColor:null,linkFontColor:null,linkHoverFontColor:null,linkActiveFontColor:null,linkVisitedFontColor:null,linkFocusFontColor:null},defaultColInfo:{untarget:!1,rowMerge:!1,colMerge:!1,colVisible:!0,required:!1,resizable:!0,sortable:!0,filterable:!0,originWidth:"80px",dataType:"text",selectSize:"100%",locked:!1,lockedColor:!0,format:null,codes:null,defaultCode:null,maxLength:null,maxByte:null,maxNumber:null,minNumber:null,roundNumber:null,align:"left",verticalAlign:null,overflowWrap:null,wordBreak:null,whiteSpace:null,backColor:null,fontColor:null,fontBold:!1,fontItalic:!1,fontThruline:!1,fontUnderline:!1}},checkByte:{lessoreq0x7ffByte:2,lessoreq0xffffByte:3,greater0xffffByte:4}}},xt=function(){var v=Ze;v._initialized||(function(w,A,x){x.reConnectedCallbackElement=function(g){["ghd","gbd","gfd"].indexOf(g._type)<0||g.parentNode&&(x.setGridDataPosition(g),x.connectedGridData(g))},x.selectCell=function(g){var p=g._gridId;return A[p].events.onActiveCell(g.rowIndex,g.colId)!==!1&&A[p].events.onActiveRow(g.rowIndex)!==!1&&A[p].events.onActiveCol(g.colId)!==!1&&A[p].data.gridInfo.selectionPolicy!=="none"&&(x.resetSelection(p),A[p].data.variables.targetCell=g,x.selectCells(g,g),x.focusCell(g),!0)},x.focusCell=function(g){var p=g._gridId,B=A[p].elements.grid.getBoundingClientRect(),H=A[p].elements.gridHeader,U=A[p].elements.gridFooter,q=g.getBoundingClientRect(),oe=q.top-B.top-H.clientHeight,de=q.bottom-B.top+U.clientHeight,he=q.left-B.left,se=q.right-B.left;oe<0?A[p].elements.grid.scrollTop+=oe:de>A[p].elements.grid.clientHeight&&(A[p].elements.grid.scrollTop+=de-A[p].elements.grid.clientHeight),he<0?A[p].elements.grid.scrollLeft+=he:se>A[p].elements.grid.clientWidth&&(A[p].elements.grid.scrollLeft+=se-A[p].elements.grid.clientWidth)},x.resetSelection=function(g){A[g]&&(A[g].data.variables.activeRows&&(A[g].data.variables.activeRows=[]),A[g].data.variables.activeCols&&(A[g].data.variables.activeCols=[]),A[g].data.variables.activeCells&&(A[g].data.variables.activeCells=[]),A[g].data.variables.targetCell&&(A[g].data.variables.targetCell=null),x.unselectCells(g))},x.unselectCells=function(g){var p,B=j(A[g].elements.grid.querySelectorAll("."+g+"_selected-cell"));try{var H=function(){var he=p.value;he.classList.remove(g+"_selected-cell"),(he.dataType==="link"||he.dataType==="select")&&he.querySelectorAll("*").forEach(function(se){se.classList.remove(g+"_selected-cell")}),w.dataType&&Object.keys(w.dataType).forEach(function(se){if(he.dataType===se&&w.dataType[se].onUnselected){if(typeof w.dataType[se].onUnselected!="function")throw new Error("onSelected must be a function.");w.dataType[se].onUnselected(he,g,x.__getData(he))}})};for(B.s();!(p=B.n()).done;)H()}catch(he){B.e(he)}finally{B.f()}var U,q=j(A[g].elements.grid.querySelectorAll("."+g+"_selected-col"));try{for(q.s();!(U=q.n()).done;)U.value.classList.remove(g+"_selected-col")}catch(he){q.e(he)}finally{q.f()}var oe,de=j(A[g].elements.grid.querySelectorAll("."+g+"_selected-row"));try{for(de.s();!(oe=de.n()).done;)oe.value.classList.remove(g+"_selected-row")}catch(he){de.e(he)}finally{de.f()}},x.selectCells=function(g,p,B){var H=g._gridId;if(A[H].events.onActiveCells(g.rowIndex,g.colId,p.rowIndex,p.colId)===!1||A[H].events.onActiveRows(g.rowIndex,p.rowIndex)===!1||A[H].events.onActiveCols(g.colId,p.colId)===!1||A[H].data.gridInfo.selectionPolicy!=="range"&&g!==p)return!1;var U,q=g.rowIndex<p.rowIndex?g.rowIndex:p.rowIndex,oe=g.rowIndex>p.rowIndex?g.rowIndex:p.rowIndex,de=g.colIndex<p.colIndex?g.colIndex:p.colIndex,he=g.colIndex>p.colIndex?g.colIndex:p.colIndex;A[H].data.variables.activeCells=[],A[H].data.variables.activeRows=[],A[H].data.variables.activeCols=[];for(var se=q;se<=oe;se++){for(var me=de;me<=he;me++)se===q&&A[H].data.variables.activeCols.push(me),!(U=x._getCell(H,se,me)).untarget&&x.isCellVisible(U)&&(A[H].data.variables.activeCells.push(U),U.classList.add(H+"_selected-cell"),(U.dataType==="link"||U.dataType==="select")&&U.querySelectorAll("*").forEach(function(Q){Q.classList.add(H+"_selected-cell")}),w.dataType&&Object.keys(w.dataType).forEach(function(Q){if(U.dataType===Q&&w.dataType[Q].onSelected){if(typeof w.dataType[Q].onSelected!="function")throw new Error("onSelected must be a function.");w.dataType[Q].onSelected(U,H,x.__getData(U))}}));A[H].data.variables.activeRows.push(se)}return x.setActiveCol(H),x.setActiveRow(H),x.focusCell(B||p),!0},x.setActiveCol=function(g){var p,B=j(A[g].data.variables.activeCols);try{for(B.s();!(p=B.n()).done;)for(var H=p.value,U=1;U<=A[g].methods.getHeaderRowCount();U++)x._getHeaderCell(g,U,H).classList.add(g+"_selected-col")}catch(q){B.e(q)}finally{B.f()}},x.setActiveRow=function(g){var p,B=j(A[g].data.variables.activeRows);try{for(B.s();!(p=B.n()).done;){var H,U=p.value,q=j(x._getRow(g,U));try{for(q.s();!(H=q.n()).done;)H.value.classList.add(g+"_selected-row")}catch(oe){q.e(oe)}finally{q.f()}}}catch(oe){B.e(oe)}finally{B.f()}},x.startScrolling=function(g,p){w._status.scrollInterval||(w._status.scrollInterval=setInterval(function(){if(A[g].data.gridInfo.selectionPolicy==="range"&&!(A[g].data.variables.activeCells.length<=0)){var B,H=A[g].data.variables.activeCells[0],U=A[g].data.variables.activeCells[A[g].data.variables.activeCells.length-1];switch(p){case"up":B=x.getMoveRowCell(H,-1),x.unselectCells(g),x.selectCells(B,U,B);break;case"down":B=x.getMoveRowCell(U,1),x.unselectCells(g),x.selectCells(H,B);break;case"left":B=x.getMoveColCell(H,-1),x.unselectCells(g),x.selectCells(B,U,B);break;case"right":B=x.getMoveColCell(U,1),x.unselectCells(g),x.selectCells(H,B)}}},100))},x.stopScrolling=function(g){g._status.scrollInterval&&clearInterval(g._status.scrollInterval),g._status.scrollInterval=null},x.copyGrid=function(g){var p=g[0]._gridId,B=x.getCopyText(g);A[p].events.onCopy(g[0].rowIndex,g[0].colId,g[g.length-1].rowIndex,g[g.length-1].colId,B)!==!1&&navigator.clipboard.writeText(B).then(function(){},function(){})},x.getCopyText=function(g){var p="",B=null;return g.length<=0?"":(g.forEach(function(H){var U=H.rowIndex,q=String(x.getTextFromCell(H));Object.keys(w.dataType).forEach(function(oe){if(H.dataType===oe&&w.dataType[oe].getCopyValue){if(typeof w.dataType[oe].getCopyValue!="function")throw new Error("getCopyValue must be a function.");q=w.dataType[oe].getCopyValue(H._gridId,H.value)}}),q.includes(`
43
+ `)&&(q='"'+q+'"'),B!==null&&B!==U?p+=`
44
+ `:B===U&&(p+=" "),p+=q,B=U}),p)},x.pasteGrid=function(g,p){var B=g.clipboardData||window.clipboardData;if(!(A[p].data.variables.activeCells.length<=0)){var H=A[p].data.variables.activeCells[0],U=B.getData("text");if(A[p].events.onPaste(H.rowIndex,H.colId,U)===!1)return g.stopPropagation(),void g.preventDefault();for(var q=[],oe=[],de="",he=!1,se=0;se<U.length;se++){var me=U[se],Q=U[se+1];me==='"'&&(he=!he),he||me!==`
45
+ `&&(me!=="\r"||Q!==`
46
+ `)?de+=me:(q.push(de),de="",me==="\r"&&Q===`
47
+ `&&se++)}de&&q.push(de);for(var u=H.rowIndex,b=H.colIndex,_=A[p].methods.getRowCount(),R=A[p].methods.getColCount(),F=0,P=0,z=0;z<q.length;z++){var pe=u+P+F;if(pe>_)return;var Se=x._getRow(p,pe);if(Se[0].rowVisible&&!Se[0].filter){for(var ze=0,je=0,Ue=q[P].split(" "),it=function(){var De=b+je-1+ze;if(De>=R)return 0;var lt=Se[De];if(!lt.colVisible){ze++;for(var ae=1,te=Se[De+ae];te&&!te.colVisible;)ze++,ae++,te=Se[De+ae];return 1}var ht=Ue[je];if(["select","checkbox","button","link"].indexOf(lt.dataType)<0&&!lt.untarget&&!lt.locked){ht=ht.replaceAll('"',"");var d=!0;Object.keys(w.dataType).forEach(function(y){if(lt.dataType===y)if(w.dataType[y].getPasteValue){if(typeof w.dataType[y].getPasteValue!="function")throw new Error("getPasteValue must be a function.");ht=w.dataType[y].getPasteValue(lt._gridId,x.__getData(lt),ht)}else d=!1}),d&&oe.push.apply(oe,Ge(x.getRecordsWithModifyValue(lt,ht)))}je++},rt=0;rt<Ue.length&&it()!==0;rt++);P++}else{F++;for(var ct=1,Ne=x._getCell(p,Se[0].rowIndex+ct,1);Ne&&(!Ne.rowVisible||Ne.filter);)F++,ct++,Ne=x._getCell(p,Se[0].rowIndex+ct,1)}}oe.length>0&&x.recordGridModify(p,oe)}},x.getRecordsWithModifyValue=function(g,p){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],H=[];return x.modifyCellValue(g,p,H,B),H},x.getTabCell=function(g,p){if(!g)return null;for(var B,H=g._gridId,U=g.rowIndex,q=p?g.colIndex-1:g.colIndex+1;!B&&U>=1&&U<=A[H].methods.getRowCount();){for(;!B&&q>=1&&q<=A[H].methods.getColCount();)(B=x._getCell(H,U,q))&&(B.isRowMerge||B.isColMerge||B.untarget?B=null:x.isCellVisible(B)||(B=null)),q=p?q-1:q+1;U=p?U-1:U+1,q=p?A[H].methods.getColCount():1}return B||(B=g),B},x.getMoveRowCell=function(g,p){if(!g)return null;var B,H=g._gridId,U=g.rowIndex,q=g.colIndex;if(!p)return g;for(;!B&&!((U+=p)<1||U>A[H].methods.getRowCount());)(B=x._getCell(H,U,q))&&(B.isRowMerge||B.isColMerge||B.untarget?B=null:x.isCellVisible(B)||(B=null));return B||(B=g),B},x.getMoveColCell=function(g,p){if(!g)return null;var B,H=g._gridId,U=g.rowIndex,q=g.colIndex;if(!p)return g;for(;!B&&!((q+=p)<1||q>A[H].methods.getColCount());)(B=x._getCell(H,U,q))&&(B.isRowMerge||B.isColMerge||B.untarget?B=null:x.isCellVisible(B)||(B=null));return B||(B=g),B},x.recordGridModify=function(g,p){p.length<=0||(A[g].data.variables.recordseq<A[g].data.variables.records.length&&A[g].data.variables.records.splice(A[g].data.variables.recordseq),A[g].data.variables.records.push(p),A[g].data.variables.recordseq=A[g].data.variables.recordseq+1,A[g].data.variables.recordseq>A[g].data.gridInfo.redoCount&&(A[g].data.variables.records.shift(),A[g].data.variables.recordseq=A[g].data.variables.recordseq-1))},x.redoundo=function(g,p){if(!A[g].data.gridInfo.redoable)return!1;var B=p!==!1;if(B&&A[g].data.variables.recordseq<=0||!B&&A[g].data.variables.recordseq+1>A[g].data.variables.records.length)return!1;A[g].data.variables.recordseq=B?A[g].data.variables.recordseq-1:A[g].data.variables.recordseq+1;var H=B?A[g].data.variables.records[A[g].data.variables.recordseq]:A[g].data.variables.records[A[g].data.variables.recordseq-1];if(!H||!Array.isArray(H))return!1;x.selectCell(H[0].cell);var U,q=j(H);try{for(q.s();!(U=q.n()).done;){var oe=U.value;oe.cell.value=B?oe.oldValue:oe.newValue,x.reConnectedCallbackElement(oe.cell),x.reloadGridWithModifyCell(g,oe.cell.colIndex)}}catch(de){q.e(de)}finally{q.f()}return!0},x.selectAndCheckboxOnChange=function(g){if(g.nType){var p=g.parentNode,B=p._gridId,H=!0;if(g.nType==="select"?w._status.editNewValue=g.value:g.nType==="checkbox"&&(w._status.editNewValue=g.checked?A[B].data.gridInfo.checkedValue:A[B].data.gridInfo.uncheckedValue),A[B].events.onBeforeChange(p.rowIndex,p.colId,w._status.editOldValue,w._status.editNewValue)===!1&&(H=!1),!H||p.untarget||p.locked){switch(g.nType){case"select":g.value=w._status.editOldValue;break;case"checkbox":g.checked=!g.checked}return w._status.editOldValue=null,!1}switch(g.nType){case"select":x.recordGridModify(B,x.getRecordsWithModifyValue(p,x.getSelectOptions(g)));break;case"checkbox":x.recordGridModify(B,x.getRecordsWithModifyValue(p,w._status.editNewValue))}A[B].events.onAfterChange(p.rowIndex,p.colId,w._status.editOldValue,w._status.editNewValue)}}}(v,et,Ve),function(w,A,x){x.modifyColSize=function(g,p){if(g&&g.resizable&&g.colId!=="v-g-rownum"&&g.colId!=="v-g-status"){var B=A[g._gridId];if(B.events.onResize(g.colId)!==!1){var H=B.elements.gridHeader.style.gridTemplateColumns.split(" "),U=H[g.colIndex-1];Ie(U).unit==="%"&&(p=p>0?1:p<0?-1:0);var q=Ie(U).number+p+Ie(U).unit;H[g.colIndex-1]=q;var oe=H.join(" ");B.elements.gridHeader.style.gridTemplateColumns=oe,B.elements.gridBody.style.gridTemplateColumns=oe,B.elements.gridFooter.style.gridTemplateColumns=oe}}},x.changeColSize=function(g,p,B){if(typeof B!="number"||B<0)throw new Error("The format of size is only zero or positive integers.");var H=A[g];if(!x._getHeaderCell(g,1,p)._frozenCol){for(var U=B!==0,q=1;q<=H.methods.getHeaderRowCount();q++){var oe=x._getHeaderCell(g,q,p);oe.colVisible=U,x.reConnectedCallbackElement(oe)}for(var de=1;de<=H.methods.getRowCount();de++)x._getCell(g,de,p).colVisible=U;for(var he=1;he<=H.methods.getFooterRowCount();he++){var se=x._getFooterCell(g,he,p);se.colVisible=U,x.reConnectedCallbackElement(se)}var me=H.elements.gridHeader,Q=H.elements.gridBody,u=H.elements.gridFooter,b=me.style.gridTemplateColumns.split(" "),_=b[p-1],R=B+Ie(_).unit;b[p-1]=R;var F=b.join(" ");me.style.gridTemplateColumns=F,Q.style.gridTemplateColumns=F,u.style.gridTemplateColumns=F}},x.modifyCellValue=function(g,p,B){if(!(!(arguments.length>3&&arguments[3]!==void 0&&arguments[3])&&(!x.isCellVisible(g)||g.untarget||g.locked))&&(p=x.getValidValue(g,p),g.value!==p)){var H=g.value,U=p;B&&Array.isArray(B)&&B.push({cell:g,oldValue:H,newValue:U}),A[g._gridId].methods.getRowStatus(g.rowIndex)||A[g._gridId].methods.setRowStatus(g.rowIndex,"U"),g.value=p,x.reConnectedCallbackElement(g),x.reloadGridWithModifyCell(g._gridId,g.colIndex)}},x.modifyCell=function(g){if(g._status.activeGridEditor){var p=g._status.activeGridEditor.parentNode;if(!p.untarget&&!p.locked&&(g._status.editNewValue=g._status.activeGridEditor.value,Object.keys(g.dataType).forEach(function(U){if(p.dataType===U)if(g.dataType[U].getEditedValue){if(typeof g.dataType[U].getEditedValue!="function")throw new Error("getEditedValue must be a function.");g._status.editNewValue=g.dataType[U].getEditedValue(g._status.activeGridEditor,p._gridId,x.__getData(p))}else g._status.editNewValue=g._status.editOldValue}),x.removeGridEditor(),A[p._gridId].events.onBeforeChange(p.rowIndex,p.colId,g._status.editOldValue,g._status.editNewValue)!==!1)){var B=g._status.editNewValue,H=x.getRecordsWithModifyValue(p,B);x.recordGridModify(p._gridId,H),A[p._gridId].events.onAfterChange(p.rowIndex,p.colId,g._status.editOldValue,g._status.editNewValue)}}},x.sort=function(g,p,B){var H=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],U=arguments.length>4&&arguments[4]!==void 0&&arguments[4],q=ot(p),oe=A[g];return q.sort(function(de,he){var se=de.find(function(Se){return Se.colId===B}),me=he.find(function(Se){return Se.colId===B}),Q=se?se.value:null,u=se?se.dataType:null,b=me?me.value:null,_=me?me.dataType:null,R=U;if(typeof Q!="number"&&typeof b!="number"||(R=!0),Q===oe.data.gridInfo.nullValue&&(Q=null),b===oe.data.gridInfo.nullValue&&(b=null),u==="select"&&Q!==null&&Array.isArray(Q)){var F=Q.find(function(Se){return Se.selected});Q=F?F.text:Q.length>0&&Q[0].text!==void 0?Q[0].text:null}else u==="link"&&Q!==null&&Q.constructor===Object&&(Q=Q.text);if(_==="select"&&b!==null&&Array.isArray(b)){var P=b.find(function(Se){return Se.selected});b=P?P.text:b.length>0&&b[0].text!==void 0?b[0].text:null}else _==="link"&&b!==null&&b.constructor===Object&&(b=b.text);if(w.dataType&&Object.keys(w.dataType).forEach(function(Se){if(u===Se)if(w.dataType[Se].getSortValue){if(typeof w.dataType[Se].getSortValue!="function")throw new Error("getSortValue must be a function.");Q=w.dataType[Se].getSortValue(g,Q)}else Q=se.text;if(_===Se)if(w.dataType[Se].getSortValue){if(typeof w.dataType[Se].getSortValue!="function")throw new Error("getSortValue must be a function.");b=w.dataType[Se].getSortValue(g,b)}else b=me.text}),R){var z=Q===null?NaN:Number(Q),pe=b===null?NaN:Number(b);if(!isNaN(z)&&!isNaN(pe))return H!==!1?z-pe:pe-z;isNaN(z)&&(Q=null),isNaN(pe)&&(b=null)}return Q===null&&b===null?0:Q===null?H!==!1?1:-1:b===null?H!==!1?-1:1:Q.localeCompare||b.localeCompare?Q.localeCompare?b.localeCompare?R?H!==!1?Q.localeCompare(b,void 0,{numeric:!0}):b.localeCompare(Q,void 0,{numeric:!0}):H!==!1?Q.localeCompare(b):b.localeCompare(Q):H!==!1?-1:1:H!==!1?1:-1:0}),oe.data.variables.sortToggle={},oe.data.variables.sortToggle[B]=H,q},x.setFilterOptions=function(g,p){var B=g.value;Qe(g),p.forEach(function(H){var U=document.createElement("option");U.value=H.value,U.textContent=H.text,g.appendChild(U)}),B&&(g.value=B)},x.reloadColFilterValue=function(g,p){var B=A[g];if(B&&B.data.gridInfo.filterable){var H=x.__getColInfo(g,p);if(H.filterable){H.filterValues=new Set;for(var U=function(){var oe,de=x._getCell(g,q,H.colIndex);if(!de||!de.rowVisible||!de.colVisible)return 1;oe=x.getTextFromCell(de),Object.keys(w.dataType).forEach(function(he){if(de.dataType===he&&w.dataType[he].getFilterValue){if(typeof w.dataType[he].getFilterValue!="function")throw new Error("getFilterValue must be a function.");oe=w.dataType[he].getFilterValue(g,de.value)}}),oe!==""&&oe!=null&&oe!==B.data.gridInfo.nullValue||(oe="$$NULL"),H.filterValues.add(oe)},q=1;q<=B.methods.getRowCount();q++)U();x.reloadFilter(g,p)}}},x.reloadFilter=function(g,p){var B=x.__getHeaderFilter(g,p);if(B){var H=x.__getColInfo(g,p),U=H.filterValues,q=H.dataType;if(U){var oe=[];oe.push({value:"$$ALL",text:"*"});var de=A[g];U.forEach(function(se){var me={value:se,text:se};se==="$$NULL"&&(me.text=de.data.gridInfo.nullValue),q==="checkbox"&&(me.text=se===de.data.gridInfo.checkedValue?"☑":"☐"),oe.push(me)});var he=B.value;Qe(B),oe.forEach(function(se){var me=document.createElement("option");me.value=se.value,me.textContent=se.text,B.appendChild(me)}),he&&(B.value=he,H.filterValue=he)}}},x.getDatasWithClearFilterValue=function(g,p){return p.forEach(function(B){B.forEach(function(H){H.filter=!1})}),A[g].data.variables.filters=[],p},x.reloadColForMerge=function(g,p){var B=x.__getColInfo(g,p);if(B){var H,U,q,oe,de=A[g];if(B.rowMerge){for(oe=B.colIndex,q=1;q<=de.methods.getRowCount();q++)delete(U=x._getCell(g,q,oe)).rowSpan,delete U.isRowMerge,delete U.colSpan,delete U.isColMerge;for(q=2;q<=de.methods.getRowCount();q++)if(H=x._getCell(g,q-1,oe),U=x._getCell(g,q,oe),H&&x.isCellVisible(H)&&H.dataType===U.dataType&&x.getTextFromCell(H)===x.getTextFromCell(U)){for(var he=H.rowIndex-1;he>0;he--)if((H=x._getCell(g,he,oe)).isRowMerge!==!0){H.rowSpan=_e(H.rowSpan,1)+1;break}U.isRowMerge=!0}for(q=1;q<=de.methods.getRowCount();q++)U=x._getCell(g,q,oe),x.reConnectedCallbackElement(U)}if(B.colMerge&&!x.__getColInfo(g,p-1).rowMerge){var se=x._getCells(g);for(q=1;q<=de.methods.getRowCount();q++)for(oe=B.colIndex-1;oe<=B.colIndex;oe++)delete(U=x._getCell(g,q,oe)).rowSpan,delete U.isRowMerge,delete U.colSpan,delete U.isColMerge;for(oe=B.colIndex,q=1;q<=de.methods.getRowCount();q++)if(H=se[q-1][oe-2],U=se[q-1][oe-1],H&&x.isCellVisible(H)&&H.dataType===U.dataType&&x.getTextFromCell(H)===x.getTextFromCell(U)){for(var me=H.colIndex-1;me>2;me--)if((H=se[q-1][me]).isColMerge!==!0){H.colSpan=_e(H.colSpan,1)+1;break}U.isColMerge=!0}for(q=1;q<=de.methods.getRowCount();q++)for(oe=B.colIndex-1;oe<=B.colIndex;oe++)U=x._getCell(g,q,oe),x.reConnectedCallbackElement(U)}}},x.reloadGridWithModifyCell=function(g,p){x.reloadFooterValue(g),x.reloadColFilterValue(g,p);var B=x.__getColInfo(g,p+1);B&&B.colMerge?x.reloadColForMerge(g,p+1):x.reloadColForMerge(g,p)},x.reloadGridForMerge=function(g){for(var p=A[g],B=3;B<=p.methods.getColCount();B++)x.reloadColForMerge(g,B)},x.reloadFooterValue=function(g){var p,B=k(x._getFooterCells(g));try{for(B.s();!(p=B.n()).done;){var H,U=k(p.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;A[g].data.colInfos[q.colIndex-1]!=null&&x.reConnectedCallbackElement(q)}}catch(oe){U.e(oe)}finally{U.f()}}}catch(oe){B.e(oe)}finally{B.f()}},x.setGridDataRowCol=function(g,p,B){g.rowIndex=p,g.colIndex=B,x.setGridDataPosition(g)},x.setGridDataPosition=function(g){var p=g.rowIndex,B=g.colIndex;g.style.gridRowStart=String(p),g.style.gridRowEnd=String(p+1),g.style.gridColumnStart=String(B),g.style.gridColumnEnd=String(B+1)},x.getGridCell=function(g,p,B,H,U){var q;if(B&&B.constructor===Object)q={value:B[p.colId]};else if(B&&Array.isArray(B)){var oe,de=k(B);try{for(de.s();!(oe=de.n()).done;){var he=oe.value;if(he.colId===p.colId){q=he;break}}}catch(me){de.e(me)}finally{de.f()}}q||(q={value:null});var se=document.createElement("div");if(se._gridId=g,se._type="gbd",x.setCellDataFromColInfo(se,p),se.rowVisible=q.rowVisible===void 0||q.rowVisible,se.filter=q.filter!==void 0&&q.filter,q.colId!==void 0&&(se.colId=q.colId),q.colIndex!==void 0&&(se.colIndex=q.colIndex),q.name!==void 0&&(se.name=q.name),q.untarget!==void 0&&(se.untarget=q.untarget),q.rowMerge!==void 0&&(se.rowMerge=q.rowMerge),q.colMerge!==void 0&&(se.colMerge=q.colMerge),q.colVisible!==void 0&&(se.colVisible=q.colVisible),q.required!==void 0&&(se.required=q.required),q.resizable!==void 0&&(se.resizable=q.resizable),q.sortable!==void 0&&(se.sortable=q.sortable),q.filterable!==void 0&&(se.filterable=q.filterable),q.originWidth!==void 0&&(se.originWidth=q.originWidth),q.dataType!==void 0&&(se.dataType=q.dataType,![].concat(l(Object.keys(W)),l(Object.keys(w.dataType))).includes(se.dataType)))throw new Error("Please insert a valid dataType.");switch(q.selectSize!==void 0&&(se.selectSize=q.selectSize),q.locked!==void 0&&(se.locked=q.locked),q.lockedColor!==void 0&&(se.lockedColor=q.lockedColor),q.format!==void 0&&(se.format=q.format),q.codes!==void 0&&(se.codes=ot(q.codes)),q.defaultCode!==void 0&&(se.defaultCode=q.defaultCode),q.maxLength!==void 0&&(se.maxLength=q.maxLength),q.maxByte!==void 0&&(se.maxByte=q.maxByte),q.maxNumber!==void 0&&(se.maxNumber=q.maxNumber),q.minNumber!==void 0&&(se.minNumber=q.minNumber),q.roundNumber!==void 0&&(se.roundNumber=q.roundNumber),q.align!==void 0&&(se.align=q.align),q.verticalAlign!==void 0&&(se.verticalAlign=q.verticalAlign),q.overflowWrap!==void 0&&(se.overflowWrap=q.overflowWrap),q.wordBreak!==void 0&&(se.wordBreak=q.wordBreak),q.whiteSpace!==void 0&&(se.whiteSpace=q.whiteSpace),q.backColor!==void 0&&(se.backColor=q.backColor),q.fontColor!==void 0&&(se.fontColor=q.fontColor),q.fontBold!==void 0&&(se.fontBold=q.fontBold),q.fontItalic!==void 0&&(se.fontItalic=q.fontItalic),q.fontThruline!==void 0&&(se.fontThruline=q.fontThruline),q.fontUnderline!==void 0&&(se.fontUnderline=q.fontUnderline),se.colId){case"v-g-rownum":se.value=H;break;case"v-g-status":se.value=x.getCodeValue(["C","U","D"],null,q.value);break;default:se.value=x.getValidValue(se,q.value)}return p.filterable&&se.colVisible&&p.filterValues.add(se.textContent),x.setGridDataRowCol(se,H,U),se},x.setCellDataFromColInfo=function(g,p){if(g.colId=p.colId,g.colIndex=p.colIndex,g.name=p.name,g.untarget=p.untarget,g.rowMerge=p.rowMerge,g.colMerge=p.colMerge,g.colVisible=p.colVisible,g.required=p.required,g.resizable=p.resizable,g.sortable=p.sortable,g.filterable=p.filterable,g.originWidth=p.originWidth,g.dataType=p.dataType,![].concat(l(Object.keys(W)),l(Object.keys(w.dataType))).includes(g.dataType))throw new Error("Please insert a valid dataType.");g.selectSize=p.selectSize,g.locked=p.locked,g.lockedColor=p.lockedColor,g.format=p.format,g.codes=ot(p.codes),g.defaultCode=p.defaultCode,g.maxLength=p.maxLength,g.maxByte=p.maxByte,g.maxNumber=p.maxNumber,g.minNumber=p.minNumber,g.roundNumber=p.roundNumber,g.align=p.align,g.verticalAlign=p.verticalAlign,g.overflowWrap=p.overflowWrap,g.wordBreak=p.wordBreak,g.whiteSpace=p.whiteSpace,g.backColor=p.backColor,g.fontColor=p.fontColor,g.fontBold=p.fontBold,g.fontItalic=p.fontItalic,g.fontThruline=p.fontThruline,g.fontUnderline=p.fontUnderline},x.getSortSpan=function(g,p){var B;return A[g].data.variables.sortToggle[p]?w.elements.sortAscSpan&&w.elements.sortAscSpan instanceof HTMLElement&&w.elements.sortAscSpan.nodeType===1?B=w.elements.sortAscSpan.cloneNode(!0):((B=document.createElement("span")).style.fontSize="0.5em",B.style.paddingLeft="5px",B.innerText="▲"):w.elements.sortDescSpan&&w.elements.sortDescSpan instanceof HTMLElement&&w.elements.sortDescSpan.nodeType===1?B=w.elements.sortDescSpan.cloneNode(!0):((B=document.createElement("span")).style.fontSize="0.5em",B.style.paddingLeft="5px",B.innerText="▼"),B._gridId=g,B.isChild=!0,B._type="sort",B.classList.add(g+"_sortSpan"),B.classList.add(A[g].data.variables.sortToggle[p]?g+"_ascSpan":g+"_descSpan"),B}}(v,et,Ve),function(w,A,x){x.__getDefaultColInfo=function(g,p){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!p||!p.colId)throw new Error("Column ID is required. (colId)");var H=A[g];if(B){var U,q=ge(H.data.colInfos);try{for(q.s();!(U=q.n()).done;){var oe=U.value;if(p.colId===oe.colId)throw new Error("Column ID is primary key. (colId)")}}catch(se){q.e(se)}finally{q.f()}}var de=x._getColDefaultAlign(p.dataType?p.dataType:w.attributes.defaultColInfo.dataType),he={colId:p.colId,name:p.name?p.name:p.colId,colIndex:0,header:p.header?Zt(H.methods.getHeaderRowCount(),p.header):Zt(H.methods.getHeaderRowCount(),p.colId),footer:p.footer?p.footer:null,untarget:p.untarget?p.untarget:H.data.gridInfo.selectionPolicy==="none",rowMerge:p.rowMerge?p.rowMerge:w.attributes.defaultColInfo.rowMerge,colMerge:p.colMerge?p.colMerge:w.attributes.defaultColInfo.colMerge,colVisible:p.colVisible?p.colVisible:w.attributes.defaultColInfo.colVisible,required:p.required?p.required:w.attributes.defaultColInfo.required,resizable:p.resizable?p.resizable:w.attributes.defaultColInfo.resizable,sortable:p.sortable?p.sortable:w.attributes.defaultColInfo.sortable,filterable:p.filterable?p.filterable:w.attributes.defaultColInfo.filterable,originWidth:p.originWidth?p.originWidth:w.attributes.defaultColInfo.originWidth,dataType:p.dataType?p.dataType:w.attributes.defaultColInfo.dataType,selectSize:p.selectSize?p.selectSize:w.attributes.defaultColInfo.selectSize,locked:p.locked?p.locked:H.data.gridInfo.locked,lockedColor:p.lockedColor?p.lockedColor:H.data.gridInfo.lockedColor,format:p.format?p.format:w.attributes.defaultColInfo.format,codes:p.codes?p.codes:w.attributes.defaultColInfo.codes,defaultCode:p.defaultCode?p.defaultCode:w.attributes.defaultColInfo.defaultCode,maxLength:p.maxLength?p.maxLength:w.attributes.defaultColInfo.maxLength,maxByte:p.maxByte?p.maxByte:w.attributes.defaultColInfo.maxByte,maxNumber:p.maxNumber?p.maxNumber:w.attributes.defaultColInfo.maxNumber,minNumber:p.minNumber?p.minNumber:w.attributes.defaultColInfo.minNumber,roundNumber:p.roundNumber?p.roundNumber:w.attributes.defaultColInfo.roundNumber,align:p.align?p.align:de,verticalAlign:p.verticalAlign?p.verticalAlign:w.attributes.defaultColInfo.verticalAlign,overflowWrap:p.overflowWrap?p.overflowWrap:w.attributes.defaultColInfo.overflowWrap,wordBreak:p.wordBreak?p.wordBreak:w.attributes.defaultColInfo.wordBreak,whiteSpace:p.whiteSpace?p.whiteSpace:w.attributes.defaultColInfo.whiteSpace,backColor:p.backColor?p.backColor:w.attributes.defaultColInfo.backColor,fontColor:p.fontColor?p.fontColor:w.attributes.defaultColInfo.fontColor,fontBold:p.fontBold?p.fontBold:w.attributes.defaultColInfo.fontBold,fontItalic:p.fontItalic?p.fontItalic:w.attributes.defaultColInfo.fontItalic,fontThruline:p.fontThruline?p.fontThruline:w.attributes.defaultColInfo.fontThruline,fontUnderline:p.fontUnderline?p.fontUnderline:w.attributes.defaultColInfo.fontUnderline,filterValues:new Set,filterValue:null};return he.filterValue=he.filterable?"$$ALL":null,he},x.__getColInfo=function(g,p){var B,H=arguments.length>2&&arguments[2]!==void 0&&arguments[2],U=A[g];if(typeof p=="number")B=U.data.colInfos[p-1];else{var q,oe=ge(U.data.colInfos);try{for(oe.s();!(q=oe.n()).done;){var de=q.value;de.colId===p&&(B=de)}}catch(he){oe.e(he)}finally{oe.f()}}if(!B){if(H)throw new Error("There is no "+(typeof p=="number"?p+"th":p)+" colunm.");return null}return B},x.__getColIndex=function(g,p){var B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],H=A[g];if(typeof p=="number")return B&&x.__checkColIndex(g,p),p;var U,q=ge(H.data.colInfos);try{for(q.s();!(U=q.n()).done;){var oe=U.value;if(oe.colId===p)return oe.colIndex}}catch(de){q.e(de)}finally{q.f()}if(B)throw new Error("There is no "+(typeof p=="number"?p+"th":p)+" colunm.");return null},x.__setGridColSize=function(g){var p,B=[],H=A[g],U=ge(H.data.colInfos);try{for(U.s();!(p=U.n()).done;){var q=p.value;B.push(q.colVisible?q.originWidth:"0px")}}catch(de){U.e(de)}finally{U.f()}var oe=B.join(" ");if(oe.includes("%")&&H.data.gridInfo.frozenColCount!==0)throw new Error(g+" has error. If you set the horizontal size to a percentage, property A is not available.");H.elements.gridHeader.style.gridTemplateColumns=oe,H.elements.gridBody.style.gridTemplateColumns=oe,H.elements.gridFooter.style.gridTemplateColumns=oe},x._getCellChildNode=function(g){if(!g)return null;var p,B=g._gridId,H=A[B];switch(g.dataType){case"text":(p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=g.value,p.nType="text";break;case"number":(p=document.createElement("span")).classList.add(B+"_data-value-number"),g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?p.innerText=H.data.gridInfo.nullValue:p.innerText=x.getFormatNumberFromCell(g),p.nType="number";break;case"mask":(p=document.createElement("span")).classList.add(B+"_data-value-mask"),p.innerText=g.value,p.nType="mask";break;case"date":(p=document.createElement("span")).classList.add(B+"_data-value-date"),g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?p.innerText=H.data.gridInfo.nullValue:p.innerText=x.getDateWithGridDateFormat(g),p.nType="date";break;case"month":(p=document.createElement("span")).classList.add(B+"_data-value-month"),g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?p.innerText=H.data.gridInfo.nullValue:p.innerText=x.getDateWithGridMonthFormat(g),p.nType="month";break;case"select":Array.isArray(g.value)&&g.value.length>0?((p=document.createElement("select")).classList.add(B+"_data-value-select"),p.addEventListener("change",function(U){x.selectAndCheckboxOnChange(U.target)}),x.setSelectOptions(p,g.value),p.nType="select",g.selectSize&&(p.style.width=g.selectSize)):((p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=H.data.gridInfo.nullValue,p.nType="text");break;case"checkbox":(p=document.createElement("input")).classList.add(B+"_data-value-checkbox"),p.addEventListener("change",function(U){x.selectAndCheckboxOnChange(U.target)}),p.type="checkbox",p.nType="checkbox",x.getCheckboxCellTrueOrFalse(g)&&p.setAttribute("checked","");break;case"button":g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?((p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=H.data.gridInfo.nullValue,p.nType="text"):((p=document.createElement("button")).classList.add(B+"_data-value-button"),p.innerText=g.value,p.nType="button",p.addEventListener("touchstart",function(){p.classList.add("active")}),p.addEventListener("touchend",function(){p.classList.remove("active")}));break;case"link":g.value===null||g.value===void 0||g.value===H.data.gridInfo.nullValue?((p=document.createElement("span")).classList.add(B+"_data-value-text"),p.innerText=H.data.gridInfo.nullValue,p.nType="text"):((p=document.createElement("a")).classList.add(B+"_data-value-link"),p.innerText=g.value.text,p.setAttribute("href",g.value.value),p.setAttribute("target",g.value.target?g.value.target:"_blank"),p.nType="link");break;case"code":(p=document.createElement("span")).classList.add(B+"_data-value-code"),p.innerText=g.value,p.nType="code";break;default:w.dataType&&Object.keys(w.dataType).forEach(function(U){if(U===g.dataType){if(w.dataType[U].getChildNode){if(typeof w.dataType[U].getChildNode!="function")throw new Error("getChildNode must be a function.");if(p=w.dataType[U].getChildNode(B,x.__getData(g))){if(!(p instanceof HTMLElement)||p.nodeType!==1)throw new Error("getChildNode must return an html element.")}else(p=document.createElement("span")).innerText=g.value}else(p=document.createElement("span")).innerText=g.value;p.classList.add(B+"_data-value-"+U),p.nType=U}})}return p.classList.add(B+"_data-value"),p._type="gbdv",p},x.__loadHeader=function(g){var p=A[g];x.__setGridColSize(g),Qe(p.elements.gridHeader),p.elements.gridHeader._gridHeaderCells.length=0;for(var B=p.methods.getHeaderRowCount(),H=1;H<=B;H++){var U,q=[],oe=1,de=ge(p.data.colInfos);try{for(de.s();!(U=de.n()).done;){var he=U.value,se=document.createElement("div");se._gridId=g,se._type="ghd",se.rowVisible=!0,se.filter=!1,x.setCellDataFromColInfo(se,he);var me=he.header.split(";");if(se.value=me[H-1]?me[H-1].replaceAll("\\n",`
48
+ `):"",x.setGridDataRowCol(se,H,oe),oe!==1){if(!me[H-1]){for(var Q=H-2;Q>=0;Q--)me[Q]&&(se.isRowMerge=!0);if(!se.isRowMerge)for(var u=oe-2;u>=0;u--)p.data.colInfos[u].header.split(";")[H-1]&&(se.isColMerge=!0)}}else H!==1&&(se.isRowMerge=!0);se.addEventListener("mousemove",function(pe){var Se=pe.target,ze=Se._gridId;if(ze){var je=A[ze];if(je&&(Se.style.cursor&&Se.style.removeProperty("cursor"),je.data.gridInfo.resizable&&Se._type==="ghd")){var Ue,it,rt=Se.getBoundingClientRect(),ct=rt.left,Ne=rt.right,De=pe.clientX;if(De-ct<20){if(Se.colIndex<=3||Se._frozenCol)return;for(var lt=Se.colIndex-1;lt>1&&(it=x._getHeaderCell(ze,1,lt)).colVisible!==!0;lt--);if(!it.resizable)return;Se.style.cursor="ew-resize",w._status.onHeaderDragging=!0,w._status.isHeaderDragging&&(Ue=De-w._status.mouseX,x.modifyColSize(it,Ue),w._status.mouseX=De)}else if(Ne-De<20){if(Se.colIndex<3||Se._frozenCol)return;for(var ae=Se.colIndex;ae>1&&(it=x._getHeaderCell(ze,1,ae)).colVisible!==!0;ae--);if(!it.resizable)return;Se.style.cursor="ew-resize",w._status.onHeaderDragging=!0,w._status.isHeaderDragging&&(Ue=De-w._status.mouseX,x.modifyColSize(it,Ue),w._status.mouseX=De)}else Se.style.cursor="",w._status.onHeaderDragging=!1}}}),se.addEventListener("mousedown",function(pe){w._status.mouseX=pe.clientX,w._status.onHeaderDragging&&(w._status.isHeaderDragging=!0)}),q.push(se),oe++}}catch(pe){de.e(pe)}finally{de.f()}p.elements.gridHeader._gridHeaderCells.push(q)}var b,_=ge(p.elements.gridHeader._gridHeaderCells);try{for(_.s();!(b=_.n()).done;){var R,F=ge(b.value);try{for(F.s();!(R=F.n()).done;){var P=R.value;p.elements.gridHeader.append(P),x.connectedGridData(P)}}catch(pe){F.e(pe)}finally{F.f()}}}catch(pe){_.e(pe)}finally{_.f()}var z=p.elements.gridHeader._gridHeaderCells;z.forEach(function(pe){pe.forEach(function(Se,ze){if(p.data.gridInfo.sortable&&Object.keys(p.data.variables.sortToggle).length>0&&B===Se.rowIndex)for(var je=B;je>0;je--){var Ue=z[je-1][ze];if(!Ue.isRowMerge&&!Ue.isColMerge&&p.data.variables.sortToggle[Ue.colId]!==void 0){var it=x.getSortSpan(p.data.id,Ue.colId);Ue.append(it);break}}p.data.gridInfo.filterable&&p.data.variables.filters.length>0&&Se.filterable&&Se._filterSelector&&p.data.variables.filters.forEach(function(rt){Se.colId===rt.colId&&(Se._filterSelector.style.display="block",requestAnimationFrame(function(){Array.from(Se._filterSelector.options).some(function(ct){return ct.value===rt.value})&&(Se._filterSelector.value=rt.value)}))})})})},x._getHeaderRow=function(g,p){return mt(A[g].elements.gridHeader._gridHeaderCells,p-1)},x._getHeaderCell=function(g,p,B){if(typeof B=="number")return mt(x._getHeaderRow(g,p),B-1);var H,U=ge(x._getHeaderRow(g,p));try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}throw new Error("There is no "+(typeof B=="number"?B+"th":B)+" colunm.")},x._getHeaderCells=function(g){return A[g].elements.gridHeader._gridHeaderCells},x.__getHeaderFilter=function(g,p){var B,H,U=x.__getColIndex(g,p),q=A[g];if(!q.data.colInfos[U-1].filterable)return null;for(var oe=1;oe<=q.methods.getHeaderRowCount();oe++)if((B=x._getHeaderCell(g,oe,U))&&(H=B.querySelectorAll("."+g+"_filterSelect"))[0])return H[0];return null},x.__loadFooter=function(g){var p=A[g];Qe(p.elements.gridFooter),p.elements.gridFooter._gridFooterCells.length=0;for(var B=1;B<=p.methods.getFooterRowCount();B++){var H,U=[],q=1,oe=ge(p.data.colInfos);try{for(oe.s();!(H=oe.n()).done;){var de=H.value,he=document.createElement("div");he._gridId=g,he._type="gfd",he.rowVisible=!0,he.filter=!1,x.setCellDataFromColInfo(he,de),x.setGridDataRowCol(he,B,q),U.push(he),q++}}catch(_){oe.e(_)}finally{oe.f()}p.elements.gridFooter._gridFooterCells.push(U)}var se,me=ge(p.elements.gridFooter._gridFooterCells);try{for(me.s();!(se=me.n()).done;){var Q,u=ge(se.value);try{for(u.s();!(Q=u.n()).done;){var b=Q.value;p.elements.gridFooter.append(b),x.connectedGridData(b)}}catch(_){u.e(_)}finally{u.f()}}}catch(_){me.e(_)}finally{me.f()}},x._getFooterRow=function(g,p){var B=A[g];return mt(B.elements.gridFooter._gridFooterCells,p-1)},x._getFooterCell=function(g,p,B){if(typeof B=="number")return mt(x._getFooterRow(g,p),B-1);var H,U=ge(x._getFooterRow(g,p));try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}throw new Error("There is no "+(typeof B=="number"?B+"th":B)+" colunm.")},x._getFooterCells=function(g){return A[g].elements.gridFooter._gridFooterCells},x._getRow=function(g,p){return A[g].elements.gridBody._gridBodyCells[p-1]},x._getCell=function(g,p,B){try{if(typeof B=="number")return A[g].elements.gridBody._gridBodyCells[p-1][B-1];var H,U=ge(A[g].elements.gridBody._gridBodyCells[p-1]);try{for(U.s();!(H=U.n()).done;){var q=H.value;if(q.colId===B)return q}}catch(oe){U.e(oe)}finally{U.f()}}catch{return null}return null},x._getCells=function(g){return A[g].elements.gridBody._gridBodyCells},x.__gridBodyCellsReConnected=function(g){if(A[g].data.variables.isDrawable){var p,B=ge(A[g].elements.gridBody._gridBodyCells);try{for(B.s();!(p=B.n()).done;){var H,U=ge(p.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;x.reConnectedCallbackElement(q)}}catch(oe){U.e(oe)}finally{U.f()}}}catch(oe){B.e(oe)}finally{B.f()}}},x.__mountGridBodyCell=function(g){var p=A[g];if(p.data.variables.isDrawable){Qe(p.elements.gridBody);var B,H=ge(p.elements.gridBody._gridBodyCells);try{for(H.s();!(B=H.n()).done;){var U,q=ge(B.value);try{for(q.s();!(U=q.n()).done;){var oe=U.value;p.elements.gridBody.append(oe),x.connectedGridData(oe)}}catch(de){q.e(de)}finally{q.f()}}}catch(de){H.e(de)}finally{H.f()}x.reloadGridForMerge(g),p.methods.reloadFilterValue(),p.methods.reloadFooterValue()}},x.__clear=function(g){var p=A[g];p.elements.gridBody._gridBodyCells.length=0,p.data.variables.activeRows=[],p.data.variables.activeCols=[],p.data.variables.activeCells=[],p.data.variables.targetCell=null,p.data.variables.records=[],p.data.variables.recordseq=0},x.__checkRowIndex=function(g,p){if(!(p=Me(p))||p<1||p>A[g].methods.getRowCount())throw new Error("Please insert a row of valid range.")},x.__checkColRownumOrStatus=function(g){if(typeof g=="number"){if(g<=2)throw new Error("The row number or status columns info cannot be modified.")}else if(g==="v-g-rownum"||g==="v-g-status")throw new Error("The row number or status columns info cannot be modified.")},x.__checkColIndex=function(g,p){if(!(p=Me(p))||p<1||p>A[g].methods.getColCount())throw new Error("Please insert a col of valid range.")},x.___getDatasWithoutExceptedProperty=function(g){var p,B,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=[],q=ge(A[g].elements.gridBody._gridBodyCells);try{for(q.s();!(B=q.n()).done;){var oe=B.value;p=[];var de,he=ge(oe);try{for(he.s();!(de=he.n()).done;){var se=de.value,me=x.__getData(se,H);p.push(me)}}catch(Q){he.e(Q)}finally{he.f()}U.push(p)}}catch(Q){q.e(Q)}finally{q.f()}return U},x._doFilter=function(g){var p,B=A[g];if(B.data.variables.filters=[],B.elements.gridHeader.querySelectorAll("."+g+"_filterSelect").forEach(function(U){U.value!=="$$ALL"&&(p={colId:U.colId,value:U.value},x.__getColInfo(g,U.parentNode.parentNode.colIndex).filterValue=U.value,p.value!=="$$NULL"&&p.value!==null&&p.value!==void 0&&p.value!==""||(p.value=B.data.gridInfo.nullValue),B.data.variables.filters.push(p))}),B.data.variables.filters.length===0)x._getCells(g).forEach(function(U){U.forEach(function(q){q.filter=!1})});else{var H=1;x._getCells(g).forEach(function(U){var q=!1;U.forEach(function(oe){B.data.variables.filters.forEach(function(de){if(oe.colId===de.colId){var he=x.getTextFromCell(oe);Object.keys(w.dataType).forEach(function(se){if(oe.dataType===se&&w.dataType[se].getFilterValue){if(typeof w.dataType[se].getFilterValue!="function")throw new Error("getFilterValue must be a function.");he=w.dataType[se].getFilterValue(g,oe.value)}}),he!=de.value&&(q=!0)}})}),x._getRow(g,H).forEach(function(oe){oe.filter=q}),H++})}B.methods.load(B.methods.getDatas())},x.__gridCellReConnectedWithControlSpan=function(g){if(x.reConnectedCallbackElement(g),g.rowSpan)for(var p=g.rowIndex+1;p<g.rowIndex+g.rowSpan;p++)x.__gridCellReConnectedWithControlSpan(x._getCell(g._gridId,p,g.colIndex));if(g.colSpan)for(var B=g.colIndex+1;B<g.colIndex+g.colSpan;B++)x.__gridCellReConnectedWithControlSpan(x._getCell(g._gridId,g.rowIndex,B))},x.__getCellData=function(g,p){var B={};return x.setCellDataFromColInfo(B,g),B.value=null,B.rowIndex=p,B.filter=!1,B.rowVisible=!0,B},x.__getData=function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],B={value:ot(g.value),colId:g.colId,rowIndex:g.rowIndex,colIndex:g.colIndex,name:g.name,untarget:g.untarget,rowMerge:g.rowMerge,colMerge:g.colMerge,colVisible:g.colVisible,required:g.required,resizable:g.resizable,sortable:g.sortable,filterable:g.filterable,originWidth:g.originWidth,dataType:g.dataType,selectSize:g.selectSize,locked:g.locked,lockedColor:g.lockedColor,format:g.format,codes:ot(g.codes),defaultCode:g.defaultCode,maxLength:g.maxLength,maxByte:g.maxByte,maxNumber:g.maxNumber,minNumber:g.minNumber,roundNumber:g.roundNumber,align:g.align,verticalAlign:g.verticalAlign,overflowWrap:g.overflowWrap,wordBreak:g.wordBreak,whiteSpace:g.whiteSpace,backColor:g.backColor,fontColor:g.fontColor,fontBold:g.fontBold,fontItalic:g.fontItalic,fontThruline:g.fontThruline,fontUnderline:g.fontUnderline,filter:g.filter};return B.text=x.getTextFromCell(g),g.rowSpan&&(B.rowSpan=g.rowSpan),g.colSpan&&(B.colSpan=g.colSpan),g.isRowMerge&&(B.isRowMerge=g.isRowMerge),g.isColMerge&&(B.isColMerge=g.isColMerge),g.rowVisible&&(B.rowVisible=g.rowVisible),p&&(p.indexOf("untarget")>=0&&(B.untarget=null),p.indexOf("colVisible")>=0&&(B.colVisible=null),p.indexOf("rowVisible")>=0&&(B.rowVisible=null),p.indexOf("required")>=0&&(B.required=null),p.indexOf("resizable")>=0&&(B.resizable=null),p.indexOf("originWidth")>=0&&(B.originWidth=null),p.indexOf("dataType")>=0&&(B.dataType=null),p.indexOf("selectSize")>=0&&(B.selectSize=null),p.indexOf("locked")>=0&&(B.locked=null),p.indexOf("lockedColor")>=0&&(B.lockedColor=null),p.indexOf("format")>=0&&(B.format=null),p.indexOf("codes")>=0&&(B.codes=null),p.indexOf("defaultCode")>=0&&(B.defaultCode=null),p.indexOf("maxLength")>=0&&(B.maxLength=null),p.indexOf("maxByte")>=0&&(B.maxByte=null),p.indexOf("maxNumber")>=0&&(B.maxNumber=null),p.indexOf("minNumber")>=0&&(B.minNumber=null),p.indexOf("roundNumber")>=0&&(B.roundNumber=null),p.indexOf("align")>=0&&(B.align=null),p.indexOf("verticalAlign")>=0&&(B.verticalAlign=null),p.indexOf("backColor")>=0&&(B.backColor=null),p.indexOf("fontColor")>=0&&(B.fontColor=null),p.indexOf("fontBold")>=0&&(B.fontBold=null),p.indexOf("fontItalic")>=0&&(B.fontItalic=null),p.indexOf("fontThruline")>=0&&(B.fontThruline=null),p.indexOf("fontUnderline")>=0&&(B.fontUnderline=null),p.indexOf("filter")>=0&&(B.filter=null),p.indexOf("value")>=0&&(B.value=null)),B},x.__setCellData=function(g,p,B,H){var U=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];x.__checkRowIndex(g,p);var q=x.__getColIndex(g,B,!0);if(q<=2){if(U)throw new Error("The row number or status columns are immutable.");return!1}var oe=x._getCell(g,p,q);if(H.untarget&&(oe.untarget=H.untarget),H.dataType){if(![].concat(ie(Object.keys(W)),ie(Object.keys(w.dataType))).includes(H.dataType))throw new Error("Please insert a valid dataType.");oe.dataType=H.dataType}return H.selectSize&&(oe.selectSize=H.selectSize),H.locked&&(oe.locked=H.locked),H.lockedColor&&(oe.lockedColor=H.lockedColor),H.format&&(oe.format=H.format),H.codes&&(oe.codes=H.codes),H.defaultCode&&(oe.defaultCode=H.defaultCode),H.maxLength&&(oe.maxLength=H.maxLength),H.maxByte&&(oe.maxByte=H.maxByte),H.maxNumber&&(oe.maxNumber=H.maxNumber),H.minNumber&&(oe.minNumber=H.minNumber),H.roundNumber&&(oe.roundNumber=H.roundNumber),H.align&&(oe.align=H.align),H.verticalAlign&&(oe.verticalAlign=H.verticalAlign),H.overflowWrap&&(oe.overflowWrap=H.overflowWrap),H.wordBreak&&(oe.wordBreak=H.wordBreak),H.whiteSpace&&(oe.whiteSpace=H.whiteSpace),H.backColor&&(oe.backColor=H.backColor),H.fontColor&&(oe.fontColor=H.fontColor),H.fontBold&&(oe.fontBold=H.fontBold),H.fontItalic&&(oe.fontItalic=H.fontItalic),H.fontThruline&&(oe.fontThruline=H.fontThruline),H.fontUnderline&&(oe.fontUnderline=H.fontUnderline),H.value&&(oe.value=H.value),x.reConnectedCallbackElement(oe),x.reloadGridWithModifyCell(g,oe.colIndex),!0},x._getDataTypeStyle=function(){var g={};return Object.keys(w.dataType).forEach(function(p){w.dataType[p].cellStyle&&(g[p]=w.dataType[p].cellStyle)}),g},x._getFilterSpan=function(){return w.elements.filterSpan},x._getFooterFormula=function(){return ot(w.footerFormula)},x._getColDefaultAlign=function(g){switch(g){case"text":case"mask":return r.left;case"number":return r.right;case"date":case"month":case"select":case"checkbox":case"button":case"link":case"code":return r.center;default:return w.attributes.defaultColInfo.align}}}(v,et,Ve),function(w,A,x){x.isCellVisible=function(g){return!!g&&!(g.colVisible===!1||g.rowVisible===!1||g.filter===!0)},x.getFirstCellValidNumber=function(g){for(var p,B,H=g._gridId,U=1;U<A[H].methods.getRowCount();U++)if(B=x._getCell(H,U,g.colIndex),x.isCellVisible(B)&&(p=Et(B.value)))return p;return null},x.removeGridEditor=function(){if(!w._status.activeGridEditor)return!1;var g=w._status.activeGridEditor.targetCell,p=g._gridId;return A[p].events.onEditEnding(g.rowIndex,g.colId,w._status.editOldValue,w._status.editNewValue),g.style.padding="",g.style.fontSize="",w._status.activeGridEditor.parentNode.removeChild(w._status.activeGridEditor),w._status.activeGridEditor=null,!0},x.addBagicEventListenerToGridEditor=function(g){g.addEventListener("keydown",function(p){var B,H=w._status.activeGrid,U=H.data.variables.targetCell;if(H.events.onKeydownEditor(p)===!1)return p.stopPropagation(),void p.preventDefault();switch(p.key){case"Enter":p.shiftKey||(x.modifyCell(w),B=x.getMoveRowCell(U,1),x.selectCell(B),p.stopPropagation(),p.preventDefault());break;case"Escape":w._status.editNewValue=w._status.editOldValue,x.removeGridEditor(),p.stopPropagation(),p.preventDefault();break;case"Tab":x.modifyCell(w),B=x.getTabCell(U,p.shiftKey),x.selectCell(B),p.stopPropagation(),p.preventDefault();break;case"F2":x.modifyCell(w),p.stopPropagation(),p.preventDefault()}}),g.addEventListener("input",function(p){w._status.activeGrid.events.onInputEditor(p)})},x.setBagicAttributesToGridEditor=function(g,p){g._gridId=p._gridId,g.targetCell=p,g.style.width=p.offsetWidth+"px",g.style.height=p.scrollHeight+g.offsetHeight-g.clientHeight+"px",g.classList.add(g._gridId+"_editor")},x.createGridEditorTextarea=function(g){var p=document.createElement("textarea");x.setBagicAttributesToGridEditor(p,g),p.placeholder,p.classList.add(p._gridId+"_editor_textarea");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,p.addEventListener("input",function(H){H.target.style.height=H.target.scrollHeight+p.offsetHeight-p.clientHeight+"px"},!1),p.addEventListener("keyup",function(H){H.target.value&&H.target.parentNode&&H.target.parentNode.maxLength&&(H.target.value=H.target.value.substring(0,H.target.parentNode.maxLength)),H.target.value&&H.target.parentNode&&H.target.parentNode.maxByte&&(H.target.value=Pe(H.target.value,H.target.parentNode.maxByte,w.checkByte))},!1),x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorNumber=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_number"),p.setAttribute("type","number");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorDate=function(g){var p=document.createElement("input");return x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_date"),p.setAttribute("type","date"),w._status.editOldValue=x.getDateWithInputDateFormat(g.value),p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorMonth=function(g){var p=document.createElement("input");return x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_month"),p.setAttribute("type","month"),w._status.editOldValue=x.getDateWithInputMonthFormat(g.value),p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorMask=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_mask"),p.setAttribute("type","text");var B=A[g._gridId].data.gridInfo.nullValue===g.value?null:g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,p.addEventListener("keyup",function(H){H.target.value=x.getMaskValue(H.target.targetCell.format,H.target.value)}),x.addBagicEventListenerToGridEditor(p),p},x.createGridEditorCode=function(g){var p=document.createElement("input");x.setBagicAttributesToGridEditor(p,g),p.classList.add(p._gridId+"_editor_code"),p.setAttribute("type","text");var B=g.value;return w._status.editOldValue=B,p.value=w._status.editOldValue,x.addBagicEventListenerToGridEditor(p),p},x.createGridEditor=function(g){var p=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!(g.locked||g.untarget||["select","checkbox","button","link"].indexOf(g.dataType)>=0)){var B;switch(x.removeGridEditor(),g.dataType){case"text":B=x.createGridEditorTextarea(g);break;case"number":B=x.createGridEditorNumber(g);break;case"date":B=x.createGridEditorDate(g);break;case"month":B=x.createGridEditorMonth(g);break;case"mask":B=x.createGridEditorMask(g);break;case"code":B=x.createGridEditorCode(g);break;default:Object.keys(w.dataType).forEach(function(H){if(g.dataType===H&&w.dataType[H].getEditor){if(typeof w.dataType[H].getEditor!="function")throw new Error("getEditor must be a function.");if(B=w.dataType[H].getEditor(g,g._gridId,x.__getData(g),function(){x.modifyCell(w)},function(){w._status.editNewValue=w._status.editOldValue,x.removeGridEditor()})){if(!(B instanceof HTMLElement)||B.nodeType!==1)throw new Error("getEditor must return an html element.");B._gridId=g._gridId,B.targetCell=g,B.classList.add(B._gridId+"_editor_"+H),B.classList.add(B._gridId+"_editor"),w._status.editOldValue=g.value}}})}A[g._gridId].events.onBeforeEditEnter(g.rowIndex,g.colId,B)!==!1&&B&&(g.style.padding="0",g.style.fontSize="0px",g.appendChild(B),B.focus(),p&&B.select(),w._status.activeGridEditor=B,A[g._gridId].events.onAfterEditEnter(g.rowIndex,g.colId,B))}},x.getValidValue=function(g,p){var B=_e(A[g._gridId].data.gridInfo.nullValue,null);if(!g)return null;if(g.dataType!=="code"&&(p==null||p===""||p===B))return B;switch(g.dataType){case"text":return g.maxLength&&(p=p.substring(0,g.maxLength)),g.maxByte&&(p=Pe(p,g.maxByte,w.checkByte)),p;case"mask":return _e(x.getMaskValue(g.format,p),B);case"date":return _e(x.getDateWithValueDateFormat(p),B);case"month":return _e(x.getDateWithValueMonthFormat(p),B);case"number":if((p=Et(p))===null)return B;var H=g.maxNumber,U=g.minNumber,q=g.roundNumber;H!=null&&typeof H=="number"&&p>H&&(p=H),U!=null&&typeof U=="number"&&p<U&&(p=U);var oe=parseFloat(p);if(q==null||typeof q!="number")return Number(p);if(q>=0){var de=oe.toFixed(q);return de=(de=de.replace(/(\.[0-9]*?)0+$/,"$1")).replace(/\.$/,""),Number(de)}var he=Math.pow(10,-q);return Number((Math.round(oe/he)*he).toFixed(-q));case"select":case"button":case"link":return p;case"checkbox":return typeof p=="boolean"?p:A[g._gridId].data.gridInfo.checkedValue===p;case"code":return x.getCodeValue(g.codes,g.defaultCode,p);default:return w.dataType&&Object.keys(w.dataType).forEach(function(se){if(g.dataType===se&&w.dataType[se].getValue){if(typeof w.dataType[se].getValue!="function")throw new Error("getValue must be a function.");p=w.dataType[se].getValue(g._gridId,p)}}),p}},x.getTextFromCell=function(g){if(!g)return"";var p="",B=_e(g.value,A[g._gridId].data.gridInfo.nullValue);switch(g.dataType){case"number":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getFormatNumberFromCell(g),A[g._gridId].data.gridInfo.nullValue);break;case"date":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getDateWithGridDateFormat(g),A[g._gridId].data.gridInfo.nullValue);break;case"month":p=B===A[g._gridId].data.gridInfo.nullValue?B:_e(x.getDateWithGridMonthFormat(g),A[g._gridId].data.gridInfo.nullValue);break;case"select":if(Array.isArray(g.value)&&g.value.length>0){p=g.value[0].text;var H,U=Le(g.value);try{for(U.s();!(H=U.n()).done;){var q=H.value;q.selected&&(p=q.text)}}catch(oe){U.e(oe)}finally{U.f()}p==null&&(p=A[g._gridId].data.gridInfo.nullValue)}break;case"link":p=g.value&&g.value.text?g.value.text:B;break;default:p=B,w.dataType?Object.keys(w.dataType).forEach(function(oe){if(g.dataType===oe&&w.dataType[oe].getText){if(typeof w.dataType[oe].getText!="function")throw new Error("getText must be a function.");p=w.dataType[oe].getText(g._gridId,p)}}):p=String(B)}return p},x.getFormatNumber=function(g,p){if(!g||p==null)return Number(p);var B=g.match(/^(.*?)([#0,.]+)(.*?)$/);if(!B)return Number(p);var H=function(R){return isNaN(R)||!isFinite(R)?0:Number(R)},U=function(R){return isNaN(R)||!isFinite(R)?0:parseFloat(R)},q=B[1],oe=B[2],de=B[3],he=oe.split(".")[0],se=oe.split(".").length>1?oe.split(".")[1]:"";de!=="%"&&de!==" %"||(p*=100);var me,Q=String(p),u=Q[0]==="-",b=(Q=u?Q.substring(1):Q).split(".")[0],_=Q.split(".").length>1?Q.split(".")[1]:"";switch(_=(_=U("0."+_).toLocaleString("en",{minimumFractionDigits:se.lastIndexOf("0")+1,maximumFractionDigits:se.length}))==="0"?"":_.substring(1),he){case"#,###":me=H(b)===0?_:(b=U(b).toLocaleString("en"))+_;break;case"#,##0":me=(b=U(b).toLocaleString("en"))+_;break;case"#":me=H(b)===0?_:b+_;break;case"0":me=b+_;break;default:return p}return q+(me=u?"-"+me:me)+de},x.getFormatNumberFromCell=function(g){return g.format?g.value===null||g.value===void 0?null:x.getFormatNumber(g.format,g.value):g.value},x.getDateWithValueDateFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]? ?(\d{2})[-/.]? ?(\d{2})$/.exec(g.replace(/\s+/g,""));if(!p)return null;var B=p[1],H=p[2],U=p[3];return nt(B,H,U)?"".concat(B).concat(H).concat(U):null},x.getDateWithValueMonthFormat=function(g){if(!g||typeof g!="string")return null;g=g.replace(/\s+/g,"");var p,B,H=/^(\d{4})[-/.]? ?(\d{2})[-/.]? ?(\d{2})?$/.exec(g),U=/^(\d{4})[-/.]? ?(\d{2})$/.exec(g);if(H)p=H[1],B=H[2];else{if(!U)return null;p=U[1],B=U[2]}return nt(p,B,"01")?"".concat(p).concat(B):null},x.getDateWithInputDateFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]?(\d{2})[-/.]?(\d{2})$/.exec(g);if(!p)return null;var B=p[1],H=p[2],U=p[3];return nt(B,H,U)?"".concat(B,"-").concat(H,"-").concat(U):null},x.getDateWithInputMonthFormat=function(g){if(!g||typeof g!="string")return null;var p=/^(\d{4})[-/.]?(\d{2})$/.exec(g);if(!p)return null;var B=p[1],H=p[2];return nt(B,H,"01")?"".concat(B,"-").concat(H):null},x.getDateWithGridDateFormat=function(g){var p=/^(\d{4})[-/.]?(\d{2})[-/.]?(\d{2})$/.exec(g.value);if(!p)return null;var B=p[1],H=p[2],U=p[3];if(!nt(B,H,U))return null;switch(A[g._gridId].data.gridInfo.dateFormat){case"yyyy-mm-dd":default:return"".concat(B,"-").concat(H,"-").concat(U);case"yyyy/mm/dd":return"".concat(B,"/").concat(H,"/").concat(U);case"yyyy. mm. dd":return"".concat(B,". ").concat(H,". ").concat(U);case"yyyymmdd":return"".concat(B).concat(H).concat(U);case"mm-dd-yyyy":return"".concat(H,"-").concat(U,"-").concat(B);case"mm/dd/yyyy":return"".concat(H,"/").concat(U,"/").concat(B);case"mm. dd. yyyy":return"".concat(H,". ").concat(U,". ").concat(B);case"mmddyyyy":return"".concat(H).concat(U).concat(B);case"dd-mm-yyyy":return"".concat(U,"-").concat(H,"-").concat(B);case"dd/mm/yyyy":return"".concat(U,"/").concat(H,"/").concat(B);case"dd. mm. yyyy":return"".concat(U,". ").concat(H,". ").concat(B);case"ddmmyyyy":return"".concat(U).concat(H).concat(B)}},x.getDateWithGridMonthFormat=function(g){var p=/^(\d{4})[-/.]?(\d{2})$/.exec(g.value);if(!p)return null;var B=p[1],H=p[2];if(!nt(B,H,"01"))return null;switch(A[g._gridId].data.gridInfo.monthFormat){case"yyyy-mm":default:return"".concat(B,"-").concat(H);case"yyyy/mm":return"".concat(B,"/").concat(H);case"yyyy. mm":return"".concat(B,". ").concat(H);case"yyyymm":return"".concat(B).concat(H);case"mm-yyyy":return"".concat(H,"-").concat(B);case"mm/yyyy":return"".concat(H,"/").concat(B);case"mm. yyyy":return"".concat(H,". ").concat(B);case"mmyyyy":return"".concat(H).concat(B)}},x.getCheckboxCellTrueOrFalse=function(g){var p=g.value,B=A[g._gridId].data.gridInfo.checkedValue,H=A[g._gridId].data.gridInfo.uncheckedValue;return typeof p=="boolean"?(g.value=p?B:H,p):p===B||(g.value=H,!1)},x.getCodeValue=function(g,p,B){return g&&Array.isArray(g)&&g.indexOf(B)>=0?B:p},x.getMaskValue=function(g,p){if(typeof g!="string"||typeof p!="string")return null;var B,H=g.split(""),U=p.split(""),q="";return H.every(function(oe,de){switch(B=!1,oe){case"A":/^[A-Z]$/.test(U[de])?(q+=U[de],B=!0):/^[a-z]$/.test(U[de])&&(q+=(he=U[de])&&typeof he=="string"?he.toUpperCase():"",B=!0);break;case"a":/^[a-z]$/.test(U[de])?(q+=U[de],B=!0):/^[A-Z]$/.test(U[de])&&(q+=Te(U[de]),B=!0);break;case"9":/^[0-9]$/.test(U[de])&&(q+=U[de],B=!0);break;default:oe===U[de]&&(q+=U[de],B=!0)}var he;return B}),q},x.setSelectOptions=function(g,p){Array.isArray(p)&&(Qe(g),p.forEach(function(B){var H=document.createElement("option");H.value=B.value,H.textContent=B.text,B.selected&&H.setAttribute("selected",""),B.disabled&&H.setAttribute("disabled",""),B.label&&H.setAttribute("label",B.label),g.appendChild(H)}))},x.getSelectOptions=function(g){if(!g)return null;var p=g.options;if(!p)return null;var B,H=[],U=Le(p);try{for(U.s();!(B=U.n()).done;){var q=B.value,oe={value:q.value,text:q.textContent};q.selected&&(oe.selected=!0),q.disabled&&(oe.disabled=!0),q.label&&(oe.label=q.label),H.push(oe)}}catch(de){U.e(de)}finally{U.f()}return H.length===0?null:H}}(v,et,Ve),function(w,A){A.connectedGridHeader=function(x){var g=w[x];if(g){var p=w[x].elements.gridHeader;if(!p.style.gridTemplateColumns.includes("%")){for(var B=0,H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridBody=function(x){var g=w[x];if(g){var p=w[x].elements.gridBody;if(!p.style.gridTemplateColumns.includes("%")){for(var B=0,H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridFooter=function(x){var g=w[x];if(g){var p=w[x].elements.gridFooter;if(!p.style.gridTemplateColumns.includes("%")){var B=0;if(!A._getFooterCells(x)||A._getFooterCells(x).length<=0)return;for(var H=1;H<g.methods.getColCount();H++)B+=Ie(g.methods.getColOriginWidth(H)).number;p.style.width=B+"px"}}},A.connectedGridData=function(x){var g=x._gridId,p=w[g],B=p.methods.getGridInfo();switch(x.style.removeProperty("display"),x.style.removeProperty("align-items"),x.style.removeProperty("justify-content"),x.style.removeProperty("text-align"),x.style.removeProperty("z-index"),x._type){case"ghd":if(x.innerText=x.value,B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var H,U=0,q=x.colIndex-1;q>0;q--)if(H=A._getHeaderCell(g,x.rowIndex,q))if(H.isRowMerge){for(var oe=x.rowIndex-1,de=A._getHeaderCell(g,oe,q);de&&!(oe<0)&&de.isRowMerge;)oe--,de=A._getHeaderCell(g,oe,q);U+=de.offsetWidth}else U+=A._getHeaderCell(g,x.rowIndex,q).offsetWidth;else U+=0;x.style.position="sticky",x.style.zIndex=String(300+p.methods.getColCount()-x.colIndex),x.style.left=U+"px",x._frozenCol=!0}if(x.isRowMerge){for(var he=x.rowIndex-1,se=A._getHeaderCell(g,he,x.colIndex);se&&!(he<0);){if(!se.isRowMerge){se.style.gridRowEnd=x.style.gridRowEnd,se.rowSpan=se.rowSpan?se.rowSpan+1:1,se.style.zIndex=se.style.zIndex?se.style.zIndex:"250";break}he--,se=A._getHeaderCell(g,he,x.colIndex)}x.style.display="none"}if(x.isColMerge){for(var me=x.colIndex-1,Q=A._getHeaderCell(g,x.rowIndex,me);Q&&!(me<0);){if(!Q.isColMerge){if(Q.colId==="v-g-rownum"||Q.colId==="v-g-status")break;Q.style.gridColumnEnd=x.style.gridColumnEnd,Q.colSpan=Q.colSpan?Q.colSpan+1:1,Q.style.zIndex=Q.style.zIndex?Q.style.zIndex:"250";break}me--,Q=A._getHeaderCell(g,x.rowIndex,me)}x.style.display="none"}if(x.colVisible&&x.rowVisible||(x.style.display="none"),p.methods.getHeaderRowCount()===x.rowIndex){var u=x;if(x.isRowMerge)for(var b=x.rowIndex-1;b>0&&!(u=A._getHeaderCell(g,b,x.colIndex)).rowSpan;b--);u&&(u._isLastCell=!0)}if(B.filterable===!0&&p.methods.getColInfo(x.colId).filterable&&p.methods.getHeaderRowCount()===x.rowIndex&&x.colId!=="v-g-rownum"&&x.colId!=="v-g-status"){var _,R=A._getFilterSpan();R&&R instanceof HTMLElement&&R.nodeType===1?_=R.cloneNode(!0):(_=document.createElement("span")).innerText="σ",_._gridId=x._gridId,_.isChild=!0,_._type="filter",_.classList.add(x._gridId+"_filterSpan");var F=document.createElement("select");F.classList.add(x._gridId+"_filterSelect"),F.style.display="none",F._gridId=x._gridId,F.colId=x.colId,F.addEventListener("mousedown",function(Ct){Ct.target.filterOldValue=Ct.target.value}),F.addEventListener("change",function(Ct){var jt=Ct.target.value,rn=Ct.target._gridId;if(w[rn].events.onChooseFilter(Ct.target.parentNode.parentNode.rowIndex,Ct.target.parentNode.parentNode.colId,Ct.target.filterOldValue,jt)===!1)return Ct.stopPropagation(),void Ct.preventDefault();A._doFilter(rn),jt==="$$ALL"&&(Ct.target.style.display="none")}),_.append(F);var P=x;if(x.isRowMerge)for(var z=x.rowIndex-1;z>0&&!(P=A._getHeaderCell(g,z,x.colIndex)).rowSpan;z--);P&&(P.insertBefore(_,P.firstChild),P._filterSelector=F)}x.classList.add(x._gridId+"_h-v-g-d");break;case"gfd":if(B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var pe,Se=0,ze=x.colIndex-1;ze>0;ze--)if(pe=A._getFooterCell(g,x.rowIndex,ze))if(pe.isRowMerge){for(var je=x.rowIndex-1,Ue=A._getFooterCell(g,je,ze);Ue&&!(je<0)&&Ue.isRowMerge;)je--,Ue=A._getFooterCell(g,je,ze);Se+=Ue.offsetWidth}else Se+=A._getFooterCell(g,x.rowIndex,ze).offsetWidth;else Se+=0;x.style.position="-webkit-sticky",x.style.zIndex="300",x.style.left=Se+"px",x._frozenCol=!0}var it=p.data.colInfos[x.colIndex-1].footer;Array.isArray(it)||(it=null);var rt=it&&it.length>=x.rowIndex-1?it[x.rowIndex-1]:null;if(rt){var ct;x.classList.add(x._gridId+"_f-v-g-d-value");try{ct=A._getFooterCell(g,x.rowIndex,x.colIndex-1)}catch{ct=null}if(ct&&ct.classList.add(x._gridId+"_f-v-g-d-value"),Object.values(re).includes(rt)){var Ne,De,lt;switch(rt){case"$$MAX":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=De=A.getFirstCellValidNumber(x);for(var ae=2;ae<=p.methods.getRowCount();ae++)lt=A._getCell(g,ae,x.colIndex),A.isCellVisible(lt)&&(De=Et(lt.value))!==null&&De>Ne&&(Ne=De)}break;case"$$MIN":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=De=A.getFirstCellValidNumber(x);for(var te=2;te<=p.methods.getRowCount();te++)lt=A._getCell(g,te,x.colIndex),A.isCellVisible(lt)&&(De=Et(lt.value))!==null&&De<Ne&&(Ne=De)}break;case"$$SUM":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=0;for(var ht=1;ht<=p.methods.getRowCount();ht++)lt=A._getCell(g,ht,x.colIndex),A.isCellVisible(lt)&&(Ne=Math.round(1e5*(Ne+nn(lt.value)))/1e5)}break;case"$$AVG":if(x.style.justifyContent="right",x.style.textAlign="right",p.methods.getRowCount()>0){Ne=0,De=0;for(var d=0,y=1;y<=p.methods.getRowCount();y++)lt=A._getCell(g,y,x.colIndex),A.isCellVisible(lt)&&(Ne=Math.round(1e5*(Ne+nn(lt.value)))/1e5,lt.value===null||lt.value===void 0||isNaN(lt.value)||d++);Ne=d===0?null:(Ne/d).toFixed(2)}}Ne=Ne==null?"-":A.getFormatNumber(p.methods.getColFormat(x.colIndex),Ne),x.innerText=Ne,x.value=Ne}else if(typeof rt=="function"){var M=rt(p.methods.getValues());x.innerText=M,x.value=M}else{x.innerText=rt,x.value=rt;var S=A._getFooterFormula();S&&S.constructor===Object&&Object.keys(S).forEach(function(Ct){if(rt===Ct){var jt=S[Ct](p.methods.getColValues(x.colIndex));x.innerText=jt,x.value=jt}})}}x.align&&(x.style.justifyContent=x.align,x.style.textAlign=x.align),x.colIndex===p.methods.getColCount()&&x.classList.add(x._gridId+"_f-v-g-d-value"),x.colVisible&&x.rowVisible||(x.style.display="none"),x.classList.add(x._gridId+"_f-v-g-d");break;case"gbd":switch(x.dataType){case"text":case"mask":x.style.justifyContent="left",x.style.textAlign="left";break;case"number":x.style.justifyContent="right",x.style.textAlign="right";break;case"date":case"month":case"code":case"select":case"checkbox":case"button":case"link":x.style.justifyContent="center",x.style.textAlign="center";break;default:x.style.justifyContent="center",x.style.textAlign="center";var N=A._getDataTypeStyle();Object.keys(N).forEach(function(Ct){if(x.dataType===Ct){if(N[Ct].constructor!==Object)throw new Error("Cellstyle can only be inserted in object type.");Object.keys(N[Ct]).forEach(function(jt){x.style[jt]=N[Ct][jt]})}})}for(;x.firstChild;)x.removeChild(x.firstChild);if(x.append(A._getCellChildNode(x)),x.rowIndex<=B.frozenRowCount){for(var O,T=p.elements.gridHeader.offsetHeight,G=0,V=x.rowIndex-1;V>0;V--)if(O=A._getCell(g,V,x.colIndex))if(O.isColMerge){for(var Z=x.colIndex-1,ne=A._getCell(g,V,Z);ne&&!(Z<0)&&ne.isColMerge;)Z--,ne=A._getCell(g,V,Z);G+=ne.offsetHeight}else G+=A._getCell(g,V,x.colIndex).offsetHeight;else G+=0;x.style.position="sticky",x.style.zIndex="200",x.style.top=T+G+"px",x.rowIndex===B.frozenRowCount&&(x.style.borderBottom=B.cssInfo.verticalBorderSize+"px solid "+B.cssInfo.headerCellBorderColor),x._frozenCol=!0}if(B.frozenRowCount<=0&&x.colIndex<=B.frozenColCount){for(var Y,le=0,qe=x.colIndex-1;qe>0;qe--)if(Y=A._getCell(g,x.rowIndex,qe))if(Y.isRowMerge){for(var _t=x.rowIndex-1,on=A._getCell(g,_t,qe);on&&!(_t<0)&&on.isRowMerge;)_t--,on=A._getCell(g,_t,qe);le+=on.offsetWidth}else le+=A._getCell(g,x.rowIndex,qe).offsetWidth;else le+=0;x.style.position="sticky",x.style.zIndex="200",x.colIndex===B.frozenColCount&&(x.style.borderRight=B.cssInfo.verticalBorderSize+"px solid "+B.cssInfo.headerCellBorderColor),x.style.left=le+"px",x._frozenRow=!0}if(x.isRowMerge){for(var Ft=x.rowIndex-1,Gt=A._getCell(g,Ft,x.colIndex);Gt&&!(Ft<0);){if(!Gt.isRowMerge){Gt.style.gridRowEnd=x.style.gridRowEnd,Gt.verticalAlign||(Gt.style.alignItems="center"),Gt.style.zIndex=Gt.style.zIndex?Gt.style.zIndex:"50";break}Ft--,Gt=A._getCell(g,Ft,x.colIndex)}A.isCellVisible(Gt)&&(x.style.display="none")}if(x.isColMerge){for(var St=x.colIndex-1,At=A._getCell(g,x.rowIndex,St);At&&!(St<0);){if(!At.isColMerge){At.style.gridColumnEnd=x.style.gridColumnEnd,At.align||(At.style.justifyContent="center"),At.align||(At.style.textAlign="center"),At.verticalAlign||(At.style.alignItems="center"),At.style.zIndex=At.style.zIndex?At.style.zIndex:"50";break}St--,At=A._getCell(g,x.rowIndex,St)}x.style.display="none"}if(x.align&&(x.style.justifyContent=x.align,x.style.textAlign=x.align),x.verticalAlign)switch(x.verticalAlign.toLowerCase()){case"top":x.style.alignItems="flex-start";break;case"bottom":x.style.alignItems="flex-end";break;default:x.style.alignItems="center"}x.overflowWrap&&(x.style.overflowWrap=x.overflowWrap),x.wordBreak&&(x.style.wordBreak=x.wordBreak),x.whiteSpace&&(x.style.whiteSpace=x.whiteSpace),x.backColor&&(x.style.backgroundColor=x.backColor),x.fontColor&&(x.firstChild.style.color=x.fontColor),x.fontBold&&(x.firstChild.style.fontWeight="bold"),x.fontItalic&&(x.firstChild.style.fontStyle="italic"),x.fontThruline&&(x.firstChild.style.textDecoration="line-through"),x.fontUnderline&&(x.firstChild.style.textDecoration="underline"),x.colVisible&&x.rowVisible||(x.style.display="none"),x.filter&&(x.style.display="none"),B.alterRow&&x.rowIndex%2==0?(x.classList.add(x._gridId+"_b-v-g-d-alter"),x.classList.remove(x._gridId+"_b-v-g-d")):(x.classList.add(x._gridId+"_b-v-g-d"),x.classList.remove(x._gridId+"_b-v-g-d-alter")),x.locked&&x.lockedColor?x.classList.add(x._gridId+"_b-v-g-d-locked"):x.classList.remove(x._gridId+"_b-v-g-d-locked"),x.locked&&(x.dataType==="select"&&x.firstChild&&x.firstChild.nType=="select"||x.dataType==="checkbox"&&x.firstChild&&x.firstChild.nType=="checkbox")&&(x.firstChild.disabled=!0,x.firstChild.style.pointerEvents="none"),x.untarget&&(x.dataType==="button"&&x.firstChild&&x.firstChild.nType=="button"?(x.firstChild.disabled=!0,x.firstChild.style.pointerEvents="none"):x.dataType==="link"&&x.firstChild&&x.firstChild.nType=="link"&&(x.firstChild.style.opacity="0.8",x.firstChild.style.pointerEvents="none"))}x.classList.add(x._gridId+"_v-g-d"),x.addEventListener("mouseover",function(Ct){x.untarget||x._type!=="gbd"||(x.classList.add(x._gridId+"_mouseover-cell"),x.dataType==="link"&&x.querySelectorAll("*").forEach(function(jt){jt.classList.add(x._gridId+"_mouseover-cell")}))}),x.addEventListener("mouseout",function(Ct){x.untarget||x._type!=="gbd"||(x.classList.remove(x._gridId+"_mouseover-cell"),x.dataType==="link"&&x.querySelectorAll("*").forEach(function(jt){jt.classList.remove(x._gridId+"_mouseover-cell")}))})}}(et,Ve),v.documentEvent.mousedown=function(w){v._status.activeGridEditor&&v._status.activeGridEditor!==w.target&&Ve.modifyCell(v),v._status.activeGrid&&!v._status.activeGrid.elements.grid.contains(w.target)&&(v._status.activeGrid=null)},document.removeEventListener("mousedown",v.documentEvent.mousedown),document.addEventListener("mousedown",v.documentEvent.mousedown),v.documentEvent.mouseup=function(w){v._status.mouseX=0,v._status.mouseY=0,Ve.stopScrolling(v),v._status.isDragging&&(v._status.isDragging=!1),v._status.isHeaderDragging&&(v._status.isHeaderDragging=!1)},document.removeEventListener("mouseup",v.documentEvent.mouseup),document.addEventListener("mouseup",v.documentEvent.mouseup),v.documentEvent.keydown=function(w){if(v._status.activeGrid&&!v._status.activeGridEditor){var A=v._status.activeGrid;if(!A)return;var x=A.data.id;if(A.events.onKeydownGrid(w)===!1)return w.stopPropagation(),void w.preventDefault();if(w.ctrlKey||w.metaKey)switch(w.key){case"z":case"Z":Ve.redoundo(x),w.preventDefault();break;case"y":case"Y":Ve.redoundo(x,!1),w.preventDefault();break;case"a":case"A":A.data.variables.targetCell=Ve._getCell(x,1,3),Ve.selectCells(Ve._getCell(x,1,1),Ve._getCell(x,A.methods.getRowCount(),A.methods.getColCount())),w.preventDefault()}if(A.data.gridInfo.selectionPolicy==="none"||A.data.variables.activeCells.length<=0)return;var g,p=A.data.variables.activeCells[0],B=A.data.variables.activeCells[A.data.variables.activeCells.length-1];switch(Object.keys(v.dataType).forEach(function(H){if(A.data.variables.targetCell.dataType===H&&v.dataType[H].onSelectedAndKeyDown){if(typeof v.dataType[H].onSelectedAndKeyDown!="function")throw new Error("onSelectedAndKeyDown must be a function.");if(v.dataType[H].onSelectedAndKeyDown(w,A.data.id,Ve.__getData(A.data.variables.targetCell))===!1)return}}),w.key){case"Tab":g=Ve.getTabCell(A.data.variables.targetCell,w.shiftKey),Ve.selectCell(g),w.preventDefault();break;case"F2":Ve.createGridEditor(A.data.variables.targetCell),w.preventDefault();break;case"Enter":A.data.variables.targetCell.dataType==="select"?(v._status.editOldValue=A.data.variables.targetCell.firstChild.value,A.data.variables.targetCell.firstChild.focus()):A.data.variables.targetCell.dataType==="checkbox"?(v._status.editOldValue=A.data.variables.targetCell.value,A.data.variables.targetCell.firstChild.checked=!A.data.variables.targetCell.firstChild.checked,Ve.selectAndCheckboxOnChange(A.data.variables.targetCell.firstChild),g=Ve.getMoveRowCell(A.data.variables.targetCell,1),Ve.selectCell(g),w.preventDefault()):["text","number","date","month","mask","code"].indexOf(A.data.variables.targetCell.dataType)>=0&&(Ve.createGridEditor(A.data.variables.targetCell,!0),w.preventDefault());break;case" ":if(A.data.variables.targetCell.dataType==="select"){if(A.data.variables.targetCell.untarget||A.data.variables.targetCell.locked)return void w.preventDefault();v._status.editOldValue=A.data.variables.targetCell.firstChild.value,A.data.variables.targetCell.firstChild.focus()}else if(A.data.variables.targetCell.dataType==="button")A.data.variables.targetCell.firstChild.focus();else if(A.data.variables.targetCell.dataType==="checkbox"){if(A.data.variables.targetCell.untarget||A.data.variables.targetCell.locked)return void w.preventDefault();v._status.editOldValue=A.data.variables.targetCell.value,A.data.variables.targetCell.firstChild.checked=!A.data.variables.targetCell.firstChild.checked,Ve.selectAndCheckboxOnChange(A.data.variables.targetCell.firstChild),w.preventDefault()}else["text","number","date","month","mask","code"].indexOf(A.data.variables.targetCell.dataType)>=0&&(Ve.createGridEditor(A.data.variables.targetCell),w.preventDefault());break;case"ArrowUp":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.rowIndex>=B.rowIndex?(g=Ve.getMoveRowCell(p,-1),Ve.selectCells(g,B,g)):(g=Ve.getMoveRowCell(B,-1),Ve.selectCells(p,g))):(g=Ve.getMoveRowCell(A.data.variables.targetCell,-1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowDown":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.rowIndex<=p.rowIndex?(g=Ve.getMoveRowCell(B,1),Ve.selectCells(p,g)):(g=Ve.getMoveRowCell(p,1),Ve.selectCells(g,B,g))):(g=Ve.getMoveRowCell(A.data.variables.targetCell,1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowLeft":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.colIndex>=B.colIndex?(g=Ve.getMoveColCell(p,-1),Ve.selectCells(g,B,g)):(g=Ve.getMoveColCell(B,-1),Ve.selectCells(p,g))):(g=Ve.getMoveColCell(A.data.variables.targetCell,-1),Ve.selectCell(g)),w.preventDefault();break;case"ArrowRight":A.data.gridInfo.selectionPolicy==="range"&&w.shiftKey?(Ve.unselectCells(x),A.data.variables.targetCell.colIndex<=p.colIndex?(g=Ve.getMoveColCell(B,1),Ve.selectCells(p,g)):(g=Ve.getMoveColCell(p,1),Ve.selectCells(g,B,g))):(g=Ve.getMoveColCell(A.data.variables.targetCell,1),Ve.selectCell(g)),w.preventDefault()}}},document.removeEventListener("keydown",v.documentEvent.keydown),document.addEventListener("keydown",v.documentEvent.keydown),v.documentEvent.copy=function(w){if(v._status.activeGrid&&!v._status.activeGridEditor){var A=v._status.activeGrid.data.variables.activeCells;A.length>0&&(w.preventDefault(),Ve.copyGrid(A))}},document.removeEventListener("copy",v.documentEvent.copy),document.addEventListener("copy",v.documentEvent.copy),v.documentEvent.paste=function(w){v._status.activeGrid&&!v._status.activeGridEditor&&v._status.activeGrid.data.variables.activeCells.length>0&&(w.preventDefault(),Ve.pasteGrid(w,v._status.activeGrid.data.id))},document.removeEventListener("paste",v.documentEvent.paste),document.addEventListener("paste",v.documentEvent.paste),v._initialized=!0)},Ht=function(){Ze&&(Object.values(et).forEach(function(v){var w=document.getElementById(v.data.id),A=document.getElementById(v.data.id+"_styles-sheet");w&&w.parentNode.removeChild(w),A&&A.parentNode.removeChild(A),delete et[v.data.id],v=null}),document.removeEventListener("mousedown",Ze.documentEvent.mousedown),document.removeEventListener("mouseup",Ze.documentEvent.mouseup),document.removeEventListener("keydown",Ze.documentEvent.keydown),document.removeEventListener("copy",Ze.documentEvent.copy),document.removeEventListener("paste",Ze.documentEvent.paste),Ze.unmountGrid(),Ze=null)};return o})())}(fi)),fi.exports}var Na=Yd();const Kd=t=>t==null,Xd=()=>{let t=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(e==="x"?n:n&3|8).toString(16)})},Jd=t=>!t||typeof t!="string"?"":t.toLowerCase(),Zd=t=>!t||typeof t!="string"?"":t.toUpperCase(),Qd=(t,e)=>{if(typeof e!="string"||typeof t!="string")return null;const n=e.split(""),o=t.split("");let r="",i;return n.every((a,c)=>{switch(i=!1,a){case"A":/^[A-Z]$/.test(o[c])?(r+=o[c],i=!0):/^[a-z]$/.test(o[c])&&(r+=Zd(o[c]),i=!0);break;case"a":/^[a-z]$/.test(o[c])?(r+=o[c],i=!0):/^[A-Z]$/.test(o[c])&&(r+=Jd(o[c]),i=!0);break;case"9":/^[0-9]$/.test(o[c])&&(r+=o[c],i=!0);break;default:a===o[c]&&(r+=o[c],i=!0);break}return i}),r},eu=t=>t.replace(/[^0-9]/g,""),tu=t=>t<768?"mb":t<1200?"tb":t<1980?"pc":"wd",nu=(t,e)=>Array.from(t).find(n=>n.startsWith(`hison-${e}-`)),ou=(t,e)=>{const n=nu(t,e);if(n){const o=n.split("-");if(o.length>=3)return o[2]}return null},js=(t,e)=>t.findIndex(n=>n.startsWith(`hison-${e}-`)),Ws=t=>t?typeof t=="string"?t:Array.isArray(t)?t.map(Ws).filter(Boolean).join(" "):typeof t=="object"?Object.keys(t).filter(e=>!!t[e]).join(" "):"":"",ru=(t,e)=>{const n=t.trim().split(/\s+/),o={},r=[];for(const a of n){const c=a.match(/^(hison-(color|size|col|pos|layout-vertical-align)-[\w]+?)(?:-(mb|tb|pc|wd))?$/);if(c){const m=c[1],C=c[2],L=c[3];o[C]||(o[C]={}),L?o[C][L]=m:o[C].default=m}else r.push(a)}const i=[];for(const a of Object.values(o)){const c=a[e]||(e==="mb"?a.tb:void 0)||(e==="tb"?a.mb:void 0)||(e==="pc"?a.wd:void 0)||(e==="wd"?a.pc:void 0)||a.default;c&&i.push(c)}return[...r,...i].filter(Boolean)},iu=(t,e,n)=>{const o=js(t,e);o!==-1?t[o]=t[o]:t.push(`hison-${e}-${n}`)},au=(t,e)=>{if(!t||!e)return[];const n=`hison-${e}-`;return t.trim().split(/\s+/).filter(o=>o.startsWith(n))},Li=t=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t),qs=t=>/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(\s*,\s*(0|1|0?\.\d+))?\s*\)$/.test(t),Sl=t=>typeof t=="number"&&isFinite(t),lu=t=>{let e,n,o;if(t.length===4)e=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16),o=parseInt(t[3]+t[3],16);else if(t.length===7)e=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);else throw new Error(`Invalid hex color format: ${t}`);return`rgba(${e}, ${n}, ${o}, 1)`},su=t=>{const e=t.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?.*\)$/i);if(!e)throw new Error(`Invalid rgba color format: ${t}`);const n=parseInt(e[1],10),o=parseInt(e[2],10),r=parseInt(e[3],10),i=a=>{const c=a.toString(16);return c.length===1?"0"+c:c};return`#${i(n)}${i(o)}${i(r)}`},Vn=t=>{if(Li(t))return t.replace(/\s+/g,"");if(qs(t))return su(t);throw new Error(`Invalid color format: ${t}`)},dn=t=>{if(Li(t))return lu(t);if(qs(t))return t.replace(/\s+/g,"");throw new Error(`Invalid color format: ${t}`)},_o=(t,e,n)=>{if(!Sl(e))throw new Error("add must be valid numbers");if(n&&!Sl(n))throw new Error("newOpacity must be valid numbers");const o=(K,X,ee)=>Math.min(Math.max(K,X),ee),r=t.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i);if(!r)throw new Error("Invalid rgba color format");let[,i,a,c,m]=r;n||(n=Number(m));const C=o(parseInt(i)+e,0,255),L=o(parseInt(a)+e,0,255),D=o(parseInt(c)+e,0,255),W=o(n,0,1);return`rgba(${C},${L},${D},${W})`},hn=t=>{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\)$/);if(!e)throw new Error("Invalid RGBA format.");const[,n,o,r,i]=e.map(Number),a=255-n,c=255-o,m=255-r;return`rgba(${a}, ${c}, ${m}, ${i})`},$s=t=>{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+)\)$/);if(!e)throw new Error("Invalid RGBA format.");const[,n,o,r,i]=e.map(Number);return i<=.5?!1:n+o+r>385},cu=t=>{switch(t){case"primary":return Vn(ce.componentStyle.primaryColor);case"muted":return Vn(ce.componentStyle.mutedColor);case"info":return Vn(ce.componentStyle.infoColor);case"success":return Vn(ce.componentStyle.successColor);case"danger":return Vn(ce.componentStyle.dangerColor);case"warning":return Vn(ce.componentStyle.warningColor)}return null},du=t=>{switch(t){case"primary":return ce.componentStyle.primaryColor;case"muted":return ce.componentStyle.mutedColor;case"info":return ce.componentStyle.infoColor;case"success":return ce.componentStyle.successColor;case"danger":return ce.componentStyle.dangerColor;case"warning":return ce.componentStyle.warningColor}return""},uu=t=>$s(t)?Ja:Za,vo=(t,e)=>{t.buttonColor=e,t.borderColor=_o(e,-31),t.shadowColor=_o(e,-47),t.hoverColor=_o(e,-24),t.activeColor=_o(e,-24),t.rowHoverColor=_o(e,64,.2),t.stripeColor=_o(e,64,.1),t.emptyTextColor=e,t.filledTextColor=uu(e)},fu=(t,e)=>t.replace(/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)/i,(n,o,r,i)=>`rgba(${o},${r},${i},${e})`),Ni=new Map,hu=(t,e)=>{Ni.set(t,e)},mu=t=>{Ni.delete(t)},gu=()=>{for(const t of Ni.values())t()},yu=t=>{const e=Ni.get(t);e&&e()};var lo=(t=>(t.s="s",t.m="m",t.l="l",t.xl="xl",t))(lo||{}),Ys=(t=>(t.primary="primary",t.muted="muted",t.info="info",t.success="success",t.danger="danger",t.warning="warning",t))(Ys||{}),hi={exports:{}},pu=hi.exports,kl;function _u(){return kl||(kl=1,function(t,e){(function(n,o){t.exports=o()})(typeof self<"u"?self:typeof So<"u"?So:pu,()=>(()=>{var n={d:(f,h)=>{for(var I in h)n.o(h,I)&&!n.o(f,I)&&Object.defineProperty(f,I,{enumerable:!0,get:h[I]})},o:(f,h)=>Object.prototype.hasOwnProperty.call(f,h),r:f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})}},o={};n.r(o),n.d(o,{NoteModeByDevice:()=>i,ToolPosition:()=>r,getVanillanote:()=>gn,getVanillanoteConfig:()=>Rn});var r=function(f){return f.top="TOP",f.bottom="BOTTOM",f}({}),i=function(f){return f.adaptive="ADAPTIVE",f.mobile="MOBILE",f.desktop="DESKTOP",f}({}),a=function(f){for(var h=f;!(h instanceof Element);)h=h.parentNode;return h.closest?h.closest("[data-vanillanote]"):null},c=function(f,h,I){return f+"_"+h+"_"+I},m=function(f,h,I){return f+"_"+h+"_"+I},C=function(f){return f+"_eventChildren"},L=function(f){return f+"_eventOnOverCssElement"},D=function(f){return f+"_eventClickCssElement"},W=function(){var f=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(f+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(h){var I=(f+16*Math.random())%16|0;return f=Math.floor(f/16),(h==="x"?I:3&I|8).toString(16)})},K=function(f){if(!f)return null;for(var h,I=f instanceof Element?f:f.parentNode;!I.hasAttribute("data-note-id")&&(I=I.parentNode)&&I.hasAttribute;);return I&&I.hasAttribute&&I.hasAttribute("data-note-id")&&(h=I.getAttribute("data-note-id")),h},X=function(){var f,h=navigator;if(((f=h.userAgentData)===null||f===void 0?void 0:f.mobile)!==void 0)return h.userAgentData.mobile;var I=navigator.userAgent;return/iPhone|iPad|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(I)},ee=function(f){return/^[0-9]+$/.test(f)},re=function(f){return f==="-"||!isNaN(f)},fe=function(f){return/^[0-9A-Fa-f]*$/.test(f)},ye=function(f){var h=f.match(/-?\d+\.?\d*/);return h?Number(parseFloat(h[0])):null},xe=function(f,h){var I=Object.keys(f),be=Object.keys(h);if(I.length!==be.length)return!1;for(var Be=0;Be<I.length;Be++)if(!be.includes(I[Be])||f[I[Be]]!==h[I[Be]])return!1;return!0},ke=function(f,h){var I={};for(var be in f)f.hasOwnProperty(be)&&(I[be]=f[be]);for(var Be in h)h.hasOwnProperty(Be)&&(I[Be]=h[Be]);return I},ve=function(f){var h,I,be=new Object;if(!f)return be;h=f.trim().split(";");for(var Be=0;Be<h.length;Be++)h[Be]&&((I=h[Be].split(":")).length<2||(be[I[0].trim()]=I[1].trim()));return be},Ee=function(f){var h="";if(!f||f.constructor!==Object||Object.keys(f).length===0)return h;for(var I=Object.entries(f),be=0;be<I.length;be++)I[be].length<2||(h+=I[be][0].trim()+":"+I[be][1].trim()+";");return h},Me=function(f,h){if(!h||h.constructor!==Object)return f;for(var I=Object.keys(h),be=0;be<I.length;be++)f.setAttribute(I[be],h[I[be]]);return f},Ie=function(f,h){if(!f||!h||(h=h.toUpperCase(),f[0]!=="#"&&(f="#"+f),!/^#([0-9A-Fa-f]{6})$/.test(f)))return"33";var I=h==="R"?1:h==="G"?3:5;return f.substring(I,I+2)},Te=function(f,h){return"rgba("+parseInt(Ie(f,"R"),16)+","+parseInt(Ie(f,"G"),16)+","+parseInt(Ie(f,"B"),16)+","+h+")"},We=function(f){if(f.startsWith("#"))return f;if(!f.startsWith("rgba"))return null;var h=f.match(/\d+/g).map(Number),I=h[0].toString(16),be=h[1].toString(16),Be=h[2].toString(16);return I.length==1&&(I="0"+I),be.length==1&&(be="0"+be),Be.length==1&&(Be="0"+Be),"#"+I+be+Be},nt=function(f){if(!f||f.startsWith("#"))return null;var h=f.match(/\d+/g);if(!h)return null;var I=h.map(Number);return I.length<4?"1":I[3].toString()},Pe=function(f){if(/^#[0-9a-fA-F]{6}$/.test(f))return f;var h=document.createElement("div");h.style.color=f,document.body.appendChild(h);var I=window.getComputedStyle(h).color;document.body.removeChild(h);var be=I.match(/\d+/g);return"#"+((1<<24)+(+be[0]<<16)+(+be[1]<<8)+ +be[2]).toString(16).slice(1)},ot=function(f,h){f.startsWith("#")&&(f=f.slice(1));var I=parseInt(h,16);h.startsWith("-")&&(I=-parseInt(h.slice(1),16));var be=parseInt(f.slice(0,2),16)+I,Be=parseInt(f.slice(2,4),16)+I,tt=parseInt(f.slice(4,6),16)+I;return"#"+(be=(be<0?0:be>255?255:be).toString(16).padStart(2,"0"))+(Be=(Be<0?0:Be>255?255:Be).toString(16).padStart(2,"0"))+(tt<0?0:tt>255?255:tt).toString(16).padStart(2,"0")},mt=function(f){f.startsWith("#")&&(f=f.slice(1));var h=255-parseInt(f.slice(0,2),16),I=255-parseInt(f.slice(2,4),16),be=255-parseInt(f.slice(4,6),16);return I=I<127.5?I+16:I-16,be=be<127.5?be+16:be-16,"#"+(h=((h=h<127.5?h+16:h-16)<0?0:h>255?255:h).toString(16).padStart(2,"0"))+(I=(I<0?0:I>255?255:I).toString(16).padStart(2,"0"))+(be<0?0:be>255?255:be).toString(16).padStart(2,"0")},Qe=function(f){var h={color1:"",color2:"",color3:"",color4:"",color5:"",color6:"",color7:"",color8:"",color9:"",color10:"",color11:"",color12:"",color13:"",color14:"",color15:"",color16:"",color17:"",color18:"",color19:"",color20:""};return function(I){if(!/^#([0-9a-fA-F]{6})$/.test(I))throw new Error("Invalid HEX color format: ".concat(I));return parseInt(I.slice(1,3),16)+parseInt(I.slice(3,5),16)+parseInt(I.slice(5,7),16)>385?"light":"dark"}(f=Pe(f))==="light"?(h.color1="#333333",h.color2="#ffffff",h.color3=ot(f,"18"),h.color4=f,h.color5=ot(f,"-18"),h.color6=ot(f,"-1f"),h.color7=ot(f,"-2f"),h.color8="#609966",h.color9="#df2e38",h.color10="#333333",h.color11="#666666",h.color12="#333333",h.color13="#ffffff",h.color14="#ff7f7f",h.color15="#ffad66",h.color16="#ffff66",h.color17="#99ff99",h.color18="#99ccff",h.color19="#6699cc",h.color20="#cc99cc"):(h.color1="#ffffff",h.color2="#ffffff",h.color3=ot(f,"18"),h.color4=f,h.color5=ot(f,"-18"),h.color6=ot(f,"-1f"),h.color7=ot(f,"-2f"),h.color8="#609966",h.color9="#df2e38",h.color10="#333333",h.color11="#666666",h.color12="#333333",h.color13="#ffffff",h.color14="#b70404",h.color15="#e55807",h.color16="#f1c93b",h.color17="#1a5d1a",h.color18="#068fff",h.color19="#0c134f",h.color20="#5c469c"),h};function ut(f){return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},ut(f)}function Ye(f,h){return function(I){if(Array.isArray(I))return I}(f)||function(I,be){var Be=I==null?null:typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(Be!=null){var tt,Ge,j,E,s=[],l=!0,k=!1;try{if(j=(Be=Be.call(I)).next,be!==0)for(;!(l=(tt=j.call(Be)).done)&&(s.push(tt.value),s.length!==be);l=!0);}catch($){k=!0,Ge=$}finally{try{if(!l&&Be.return!=null&&(E=Be.return(),Object(E)!==E))return}finally{if(k)throw Ge}}return s}}(f,h)||function(I,be){if(I){if(typeof I=="string")return Je(I,be);var Be={}.toString.call(I).slice(8,-1);return Be==="Object"&&I.constructor&&(Be=I.constructor.name),Be==="Map"||Be==="Set"?Array.from(I):Be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Be)?Je(I,be):void 0}}(f,h)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
49
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Je(f,h){(h==null||h>f.length)&&(h=f.length);for(var I=0,be=Array(h);I<h;I++)be[I]=f[I];return be}function dt(f,h){var I=Object.keys(f);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(f);h&&(be=be.filter(function(Be){return Object.getOwnPropertyDescriptor(f,Be).enumerable})),I.push.apply(I,be)}return I}function Dt(f){for(var h=1;h<arguments.length;h++){var I=arguments[h]!=null?arguments[h]:{};h%2?dt(Object(I),!0).forEach(function(be){Re(f,be,I[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(I)):dt(Object(I)).forEach(function(be){Object.defineProperty(f,be,Object.getOwnPropertyDescriptor(I,be))})}return f}function Re(f,h,I){return(h=function(be){var Be=function(tt){if(ut(tt)!="object"||!tt)return tt;var Ge=tt[Symbol.toPrimitive];if(Ge!==void 0){var j=Ge.call(tt,"string");if(ut(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(tt)}(be);return ut(Be)=="symbol"?Be:Be+""}(h))in f?Object.defineProperty(f,h,{value:I,enumerable:!0,configurable:!0,writable:!0}):f[h]=I,f}var ft=function(f,h,I,be){var Be=null,tt=h.createElement("div",I,f.consts.CLASS_NAMES.template.id,f.consts.CLASS_NAMES.template.className);tt.style.display="none";var Ge=h.createElementBasic(I._noteName+"-textarea",I,f.consts.CLASS_NAMES.textarea.id,f.consts.CLASS_NAMES.textarea.className);Ge.setAttribute("contenteditable","true"),Ge.setAttribute("role","textbox"),Ge.setAttribute("aria-multiline","true"),Ge.setAttribute("spellcheck","true"),Ge.setAttribute("autocorrect","true"),Ge.setAttribute("name",c(I._noteName,I._id,f.consts.CLASS_NAMES.textarea.id)),Ge.setAttribute("title",f.languageSet[I._attributes.language].textareaTooltip),Ge.addEventListener("focus",function(ue){I._elementEvents.textarea_onBeforeFocus(ue)&&(f.events.elementEvents.textarea_onFocus(ue),I._elementEvents.textarea_onAfterFocus(ue),ue.stopImmediatePropagation())}),Ge.addEventListener(typeof navigator<"u"&&/iPhone|iPad|iPod/i.test(navigator.userAgent)?"mouseout":"blur",function(ue){I._elementEvents.textarea_onBeforeBlur(ue)&&(f.events.elementEvents.textarea_onBlur(ue),I._elementEvents.textarea_onAfterBlur(ue),ue.stopImmediatePropagation())}),Ge.addEventListener("keydown",function(ue){f.events.elementEvents.textarea_onKeydown(ue),ue.stopImmediatePropagation()}),Ge.addEventListener("keyup",function(ue){f.events.elementEvents.textarea_onKeyup(ue),ue.stopImmediatePropagation()}),Ge.addEventListener("beforeinput",function(ue){f.events.elementEvents.textarea_onBeforeinput(ue),ue.stopImmediatePropagation()}),f.events.documentEvents.noteObserver.observe(Ge,f.variables.observerOptions),h.initTextarea(Ge);var j=[C(I._noteName),D(I._noteName),L(I._noteName),c(I._noteName,I._id,"icon")],E=h.createElement("div",I,f.consts.CLASS_NAMES.tool.id,f.consts.CLASS_NAMES.tool.className),s=h.createElementButton("span",I,f.consts.CLASS_NAMES.toolToggleButton.id,f.consts.CLASS_NAMES.toolToggleButton.className,{isIcon:!0,text:"arrow_drop_down"});if(f.iconSpanElement.toolToggleButtonIcon&&f.iconSpanElement.toolToggleButtonIcon instanceof HTMLSpanElement){var l=f.iconSpanElement.toolToggleButtonIcon.cloneNode(!0);l.setAttribute("data-note-id",I._id),j.forEach(function(ue){l.classList.contains(ue)||l.classList.add(ue)}),s.replaceChild(l,s.firstChild)}var k=h.createElementSelect("span",I,f.consts.CLASS_NAMES.paragraphStyleSelect.id,f.consts.CLASS_NAMES.paragraphStyleSelect.className,{isIcon:!0,text:"auto_fix_high"});if(k.setAttribute("title",f.languageSet[I._attributes.language].styleTooltip),f.iconSpanElement.paragraphStyleSelectIcon&&f.iconSpanElement.paragraphStyleSelectIcon instanceof HTMLSpanElement){var $=f.iconSpanElement.paragraphStyleSelectIcon.cloneNode(!0);$.setAttribute("data-note-id",I._id),j.forEach(function(ue){$.classList.contains(ue)||$.classList.add(ue)}),k.replaceChild($,k.firstChild)}var J=h.createElement("div",I,f.consts.CLASS_NAMES.paragraphStyleSelectBox.id,f.consts.CLASS_NAMES.paragraphStyleSelectBox.className);k.appendChild(J);var ie=h.createElementButton("div",I,f.consts.CLASS_NAMES.styleNomal.id,f.consts.CLASS_NAMES.styleNomal.className,{isIcon:!1,text:"Normal"});ie.setAttribute("data-tag-name","p"),J.appendChild(ie);var ge=h.createElementButton("h1",I,f.consts.CLASS_NAMES.styleHeader1.id,f.consts.CLASS_NAMES.styleHeader1.className,{isIcon:!1,text:"Header1"});ge.setAttribute("data-tag-name","H1"),J.appendChild(ge);var Ce=h.createElementButton("h2",I,f.consts.CLASS_NAMES.styleHeader2.id,f.consts.CLASS_NAMES.styleHeader2.className,{isIcon:!1,text:"Header2"});Ce.setAttribute("data-tag-name","H2"),J.appendChild(Ce);var He=h.createElementButton("h3",I,f.consts.CLASS_NAMES.styleHeader3.id,f.consts.CLASS_NAMES.styleHeader3.className,{isIcon:!1,text:"Header3"});He.setAttribute("data-tag-name","H3"),J.appendChild(He);var Le=h.createElementButton("h4",I,f.consts.CLASS_NAMES.styleHeader4.id,f.consts.CLASS_NAMES.styleHeader4.className,{isIcon:!1,text:"Header4"});Le.setAttribute("data-tag-name","H4"),J.appendChild(Le);var Ke=h.createElementButton("h5",I,f.consts.CLASS_NAMES.styleHeader5.id,f.consts.CLASS_NAMES.styleHeader5.className,{isIcon:!1,text:"Header5"});Ke.setAttribute("data-tag-name","H5"),J.appendChild(Ke);var Ze=h.createElementButton("h6",I,f.consts.CLASS_NAMES.styleHeader6.id,f.consts.CLASS_NAMES.styleHeader6.className,{isIcon:!1,text:"Header6"});Ze.setAttribute("data-tag-name","H6"),J.appendChild(Ze);var et=h.createElementButton("span",I,f.consts.CLASS_NAMES.boldButton.id,f.consts.CLASS_NAMES.boldButton.className,{isIcon:!0,text:"format_bold"});if(et.setAttribute("title",f.languageSet[I._attributes.language].boldTooltip),f.iconSpanElement.boldButtonIcon&&f.iconSpanElement.boldButtonIcon instanceof HTMLSpanElement){var Ve=f.iconSpanElement.boldButtonIcon.cloneNode(!0);Ve.setAttribute("data-note-id",I._id),j.forEach(function(ue){Ve.classList.contains(ue)||Ve.classList.add(ue)}),et.replaceChild(Ve,et.firstChild)}var Mt=h.createElementButton("span",I,f.consts.CLASS_NAMES.underlineButton.id,f.consts.CLASS_NAMES.underlineButton.className,{isIcon:!0,text:"format_underlined"});if(Mt.setAttribute("title",f.languageSet[I._attributes.language].underlineTooltip),f.iconSpanElement.underlineButtonIcon&&f.iconSpanElement.underlineButtonIcon instanceof HTMLSpanElement){var Rt=f.iconSpanElement.underlineButtonIcon.cloneNode(!0);Rt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Rt.classList.contains(ue)||Rt.classList.add(ue)}),Mt.replaceChild(Rt,Mt.firstChild)}var xt=h.createElementButton("span",I,f.consts.CLASS_NAMES.italicButton.id,f.consts.CLASS_NAMES.italicButton.className,{isIcon:!0,text:"format_italic"});if(xt.setAttribute("title",f.languageSet[I._attributes.language].italicTooltip),f.iconSpanElement.italicButtonIcon&&f.iconSpanElement.italicButtonIcon instanceof HTMLSpanElement){var Ht=f.iconSpanElement.italicButtonIcon.cloneNode(!0);Ht.setAttribute("data-note-id",I._id),j.forEach(function(ue){Ht.classList.contains(ue)||Ht.classList.add(ue)}),xt.replaceChild(Ht,xt.firstChild)}var v=h.createElementButton("span",I,f.consts.CLASS_NAMES.ulButton.id,f.consts.CLASS_NAMES.ulButton.className,{isIcon:!0,text:"format_list_bulleted"});if(v.setAttribute("title",f.languageSet[I._attributes.language].ulTooltip),v.setAttribute("data-tag-name","UL"),f.iconSpanElement.ulButtonIcon&&f.iconSpanElement.ulButtonIcon instanceof HTMLSpanElement){var w=f.iconSpanElement.ulButtonIcon.cloneNode(!0);w.setAttribute("data-note-id",I._id),j.forEach(function(ue){w.classList.contains(ue)||w.classList.add(ue)}),v.replaceChild(w,v.firstChild)}var A=h.createElementButton("span",I,f.consts.CLASS_NAMES.olButton.id,f.consts.CLASS_NAMES.olButton.className,{isIcon:!0,text:"format_list_numbered"});if(A.setAttribute("title",f.languageSet[I._attributes.language].olTooltip),A.setAttribute("data-tag-name","OL"),f.iconSpanElement.olButtonIcon&&f.iconSpanElement.olButtonIcon instanceof HTMLSpanElement){var x=f.iconSpanElement.olButtonIcon.cloneNode(!0);x.setAttribute("data-note-id",I._id),j.forEach(function(ue){x.classList.contains(ue)||x.classList.add(ue)}),A.replaceChild(x,A.firstChild)}var g=h.createElementSelect("span",I,f.consts.CLASS_NAMES.textAlignSelect.id,f.consts.CLASS_NAMES.textAlignSelect.className,{isIcon:!0,text:"notes"});if(g.setAttribute("title",f.languageSet[I._attributes.language].textAlignTooltip),f.iconSpanElement.textAlignSelectIcon&&f.iconSpanElement.textAlignSelectIcon instanceof HTMLSpanElement){var p=f.iconSpanElement.textAlignSelectIcon.cloneNode(!0);p.setAttribute("data-note-id",I._id),j.forEach(function(ue){p.classList.contains(ue)||p.classList.add(ue)}),g.replaceChild(p,g.firstChild)}var B=h.createElement("div",I,f.consts.CLASS_NAMES.textAlignSelectBox.id,f.consts.CLASS_NAMES.textAlignSelectBox.className);g.appendChild(B);var H=h.createElementButton("span",I,f.consts.CLASS_NAMES.textAlignLeft.id,f.consts.CLASS_NAMES.textAlignLeft.className,{isIcon:!0,text:"format_align_left"});if(H.setAttribute("data-tag-style","text-align:left;"),f.iconSpanElement.textAlignLeftButtonIcon&&f.iconSpanElement.textAlignLeftButtonIcon instanceof HTMLSpanElement){var U=f.iconSpanElement.textAlignLeftButtonIcon.cloneNode(!0);U.setAttribute("data-note-id",I._id),j.forEach(function(ue){U.classList.contains(ue)||U.classList.add(ue)}),H.replaceChild(U,H.firstChild)}B.appendChild(H);var q=h.createElementButton("span",I,f.consts.CLASS_NAMES.textAlignCenter.id,f.consts.CLASS_NAMES.textAlignCenter.className,{isIcon:!0,text:"format_align_center"});if(q.setAttribute("data-tag-style","text-align:center;"),f.iconSpanElement.textAlignCenterButtonIcon&&f.iconSpanElement.textAlignCenterButtonIcon instanceof HTMLSpanElement){var oe=f.iconSpanElement.textAlignCenterButtonIcon.cloneNode(!0);oe.setAttribute("data-note-id",I._id),j.forEach(function(ue){oe.classList.contains(ue)||oe.classList.add(ue)}),q.replaceChild(oe,q.firstChild)}B.appendChild(q);var de=h.createElementButton("span",I,f.consts.CLASS_NAMES.textAlignRight.id,f.consts.CLASS_NAMES.textAlignRight.className,{isIcon:!0,text:"format_align_right"});if(de.setAttribute("data-tag-style","text-align:right;"),f.iconSpanElement.textAlignRightButtonIcon&&f.iconSpanElement.textAlignRightButtonIcon instanceof HTMLSpanElement){var he=f.iconSpanElement.textAlignRightButtonIcon.cloneNode(!0);he.setAttribute("data-note-id",I._id),j.forEach(function(ue){he.classList.contains(ue)||he.classList.add(ue)}),de.replaceChild(he,de.firstChild)}B.appendChild(de);var se=h.createElementButton("span",I,f.consts.CLASS_NAMES.attLinkButton.id,f.consts.CLASS_NAMES.attLinkButton.className,{isIcon:!0,text:"link"});if(se.setAttribute("title",f.languageSet[I._attributes.language].attLinkTooltip),f.iconSpanElement.attLinkButtonIcon&&f.iconSpanElement.attLinkButtonIcon instanceof HTMLSpanElement){var me=f.iconSpanElement.attLinkButtonIcon.cloneNode(!0);me.setAttribute("data-note-id",I._id),j.forEach(function(ue){me.classList.contains(ue)||me.classList.add(ue)}),se.replaceChild(me,se.firstChild)}var Q=h.createElementButton("span",I,f.consts.CLASS_NAMES.attFileButton.id,f.consts.CLASS_NAMES.attFileButton.className,{isIcon:!0,text:"attach_file"});if(Q.setAttribute("title",f.languageSet[I._attributes.language].attFileTooltip),f.iconSpanElement.attFileButtonIcon&&f.iconSpanElement.attFileButtonIcon instanceof HTMLSpanElement){var u=f.iconSpanElement.attFileButtonIcon.cloneNode(!0);u.setAttribute("data-note-id",I._id),j.forEach(function(ue){u.classList.contains(ue)||u.classList.add(ue)}),Q.replaceChild(u,Q.firstChild)}var b=h.createElementButton("span",I,f.consts.CLASS_NAMES.attImageButton.id,f.consts.CLASS_NAMES.attImageButton.className,{isIcon:!0,text:"image"});if(b.setAttribute("title",f.languageSet[I._attributes.language].attImageTooltip),f.iconSpanElement.attImageButtonIcon&&f.iconSpanElement.attImageButtonIcon instanceof HTMLSpanElement){var _=f.iconSpanElement.attImageButtonIcon.cloneNode(!0);_.setAttribute("data-note-id",I._id),j.forEach(function(ue){_.classList.contains(ue)||_.classList.add(ue)}),b.replaceChild(_,b.firstChild)}var R=h.createElementButton("span",I,f.consts.CLASS_NAMES.attVideoButton.id,f.consts.CLASS_NAMES.attVideoButton.className,{isIcon:!0,text:"videocam"});if(R.setAttribute("title",f.languageSet[I._attributes.language].attVideoTooltip),f.iconSpanElement.attVideoButtonIcon&&f.iconSpanElement.attVideoButtonIcon instanceof HTMLSpanElement){var F=f.iconSpanElement.attVideoButtonIcon.cloneNode(!0);F.setAttribute("data-note-id",I._id),j.forEach(function(ue){F.classList.contains(ue)||F.classList.add(ue)}),R.replaceChild(F,R.firstChild)}var P=h.createElementButton("span",I,f.consts.CLASS_NAMES.fontSizeInputBox.id,f.consts.CLASS_NAMES.fontSizeInputBox.className,{isIcon:!0,text:"format_size"});if(f.iconSpanElement.fontSizeInputBoxIcon&&f.iconSpanElement.fontSizeInputBoxIcon instanceof HTMLSpanElement){var z=f.iconSpanElement.fontSizeInputBoxIcon.cloneNode(!0);z.setAttribute("data-note-id",I._id),j.forEach(function(ue){z.classList.contains(ue)||z.classList.add(ue)}),P.replaceChild(z,P.firstChild)}var pe=h.createElementInput(I,f.consts.CLASS_NAMES.fontSizeInput.id,f.consts.CLASS_NAMES.fontSizeInput.className);pe.setAttribute("type","number"),pe.setAttribute("title",f.languageSet[I._attributes.language].fontSizeTooltip),h.addClickEvent(pe,f.consts.CLASS_NAMES.fontSizeInput.id,I),P.appendChild(pe);var Se=h.createElementButton("span",I,f.consts.CLASS_NAMES.letterSpacingInputBox.id,f.consts.CLASS_NAMES.letterSpacingInputBox.className,{isIcon:!0,text:"swap_horiz"});if(f.iconSpanElement.letterSpacingInputBoxIcon&&f.iconSpanElement.letterSpacingInputBoxIcon instanceof HTMLSpanElement){var ze=f.iconSpanElement.letterSpacingInputBoxIcon.cloneNode(!0);ze.setAttribute("data-note-id",I._id),j.forEach(function(ue){ze.classList.contains(ue)||ze.classList.add(ue)}),Se.replaceChild(ze,Se.firstChild)}var je=h.createElementInput(I,f.consts.CLASS_NAMES.letterSpacingInput.id,f.consts.CLASS_NAMES.letterSpacingInput.className);je.setAttribute("type","number"),je.setAttribute("title",f.languageSet[I._attributes.language].letterSpacingTooltip),h.addClickEvent(je,f.consts.CLASS_NAMES.letterSpacingInput.id,I),Se.appendChild(je);var Ue=h.createElementButton("span",I,f.consts.CLASS_NAMES.lineHeightInputBox.id,f.consts.CLASS_NAMES.lineHeightInputBox.className,{isIcon:!0,text:"height"});if(f.iconSpanElement.lineHeightInputBoxIcon&&f.iconSpanElement.lineHeightInputBoxIcon instanceof HTMLSpanElement){var it=f.iconSpanElement.lineHeightInputBoxIcon.cloneNode(!0);it.setAttribute("data-note-id",I._id),j.forEach(function(ue){it.classList.contains(ue)||it.classList.add(ue)}),Ue.replaceChild(it,Ue.firstChild)}var rt=h.createElementInput(I,f.consts.CLASS_NAMES.lineHeightInput.id,f.consts.CLASS_NAMES.lineHeightInput.className);rt.setAttribute("type","number"),rt.setAttribute("title",f.languageSet[I._attributes.language].lineHeightTooltip),h.addClickEvent(rt,f.consts.CLASS_NAMES.lineHeightInput.id,I),Ue.appendChild(rt);var ct=h.createElementSelect("span",I,f.consts.CLASS_NAMES.fontFamilySelect.id,f.consts.CLASS_NAMES.fontFamilySelect.className,{isIcon:!1,text:I._attributes.defaultTextareaFontFamily.length>12?I._attributes.defaultTextareaFontFamily.substr(0,12)+"...":I._attributes.defaultTextareaFontFamily});ct.setAttribute("style","font-family:"+I._attributes.defaultTextareaFontFamily+";"),ct.setAttribute("title",f.languageSet[I._attributes.language].fontFamilyTooltip);var Ne=h.createElement("div",I,f.consts.CLASS_NAMES.fontFamilySelectBox.id,f.consts.CLASS_NAMES.fontFamilySelectBox.className);ct.appendChild(Ne);for(var De=0;De<I._attributes.defaultFontFamilies.length;De++){var lt=h.createElementFontFamiliySelect("div",I,f.consts.CLASS_NAMES.fontFamily.id+De,f.consts.CLASS_NAMES.fontFamily.className,{isIcon:!1,text:I._attributes.defaultFontFamilies[De]});lt.setAttribute("data-font-family",I._attributes.defaultFontFamilies[De]),lt.setAttribute("style","font-family:"+I._attributes.defaultFontFamilies[De]+";"),Ne.appendChild(lt)}var ae=h.createElementSelect("span",I,f.consts.CLASS_NAMES.colorTextSelect.id,f.consts.CLASS_NAMES.colorTextSelect.className,{isIcon:!0,text:"format_color_text",iconStyle:"-webkit-text-stroke: 0.5px black; font-size: 1.1em"});if(ae.setAttribute("title",f.languageSet[I._attributes.language].colorTextTooltip),f.iconSpanElement.colorTextSelectIcon&&f.iconSpanElement.colorTextSelectIcon instanceof HTMLSpanElement){var te=f.iconSpanElement.colorTextSelectIcon.cloneNode(!0);te.setAttribute("data-note-id",I._id),j.forEach(function(ue){te.classList.contains(ue)||te.classList.add(ue)}),ae.replaceChild(te,ae.firstChild)}var ht=h.createElement("div",I,f.consts.CLASS_NAMES.colorTextSelectBox.id,f.consts.CLASS_NAMES.colorTextSelectBox.className);ae.appendChild(ht);var d=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextRExplain.id,f.consts.CLASS_NAMES.colorTextRExplain.className,{isIcon:!1,text:"R"});d.style.paddingLeft=8*I._attributes.sizeRate+"px",ht.appendChild(d);var y=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextRInput.id,f.consts.CLASS_NAMES.colorTextRInput.className);y.setAttribute("maxlength","2"),h.addClickEvent(y,f.consts.CLASS_NAMES.colorTextRInput.id,I),ht.appendChild(y);var M=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextGExplain.id,f.consts.CLASS_NAMES.colorTextGExplain.className,{isIcon:!1,text:"G"});ht.appendChild(M);var S=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextGInput.id,f.consts.CLASS_NAMES.colorTextGInput.className);S.setAttribute("maxlength","2"),h.addClickEvent(S,f.consts.CLASS_NAMES.colorTextGInput.id,I),ht.appendChild(S);var N=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextBExplain.id,f.consts.CLASS_NAMES.colorTextBExplain.className,{isIcon:!1,text:"B"});ht.appendChild(N);var O=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextBInput.id,f.consts.CLASS_NAMES.colorTextBInput.className);O.setAttribute("maxlength","2"),h.addClickEvent(O,f.consts.CLASS_NAMES.colorTextBInput.id,I),ht.appendChild(O);var T=h.createElement("span",I,f.consts.CLASS_NAMES.colorTextOpacityExplain.id,f.consts.CLASS_NAMES.colorTextOpacityExplain.className,{isIcon:!1,text:"Opacity"});ht.appendChild(T);var G=h.createElementInput(I,f.consts.CLASS_NAMES.colorTextOpacityInput.id,f.consts.CLASS_NAMES.colorTextOpacityInput.className);G.setAttribute("type","number"),G.setAttribute("maxlength","3"),h.addClickEvent(G,f.consts.CLASS_NAMES.colorTextOpacityInput.id,I),ht.appendChild(G),Be=document.createElement("br"),ht.appendChild(Be);var V=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText0.id,f.consts.CLASS_NAMES.colorText0.className);V.style.backgroundColor=I._colors.color12,ht.appendChild(V);var Z=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText1.id,f.consts.CLASS_NAMES.colorText1.className);Z.style.backgroundColor=I._colors.color14,ht.appendChild(Z);var ne=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText2.id,f.consts.CLASS_NAMES.colorText2.className);ne.style.backgroundColor=I._colors.color15,ht.appendChild(ne);var Y=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText3.id,f.consts.CLASS_NAMES.colorText3.className);Y.style.backgroundColor=I._colors.color16,ht.appendChild(Y);var le=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText4.id,f.consts.CLASS_NAMES.colorText4.className);le.style.backgroundColor=I._colors.color17,ht.appendChild(le);var qe=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText5.id,f.consts.CLASS_NAMES.colorText5.className);qe.style.backgroundColor=I._colors.color18,ht.appendChild(qe);var _t=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText6.id,f.consts.CLASS_NAMES.colorText6.className);_t.style.backgroundColor=I._colors.color19,ht.appendChild(_t);var on=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorText7.id,f.consts.CLASS_NAMES.colorText7.className);on.style.backgroundColor=I._colors.color20,ht.appendChild(on);var Ft=h.createElementSelect("span",I,f.consts.CLASS_NAMES.colorBackSelect.id,f.consts.CLASS_NAMES.colorBackSelect.className,{isIcon:!0,text:"format_color_fill",iconStyle:"font-size: 1.1em; -webkit-text-stroke: 0.5px "+I._colors.color1+";"});if(Ft.setAttribute("title",f.languageSet[I._attributes.language].colorBackTooltip),f.iconSpanElement.colorBackSelectIcon&&f.iconSpanElement.colorBackSelectIcon instanceof HTMLSpanElement){var Gt=f.iconSpanElement.colorBackSelectIcon.cloneNode(!0);Gt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Gt.classList.contains(ue)||Gt.classList.add(ue)}),Ft.replaceChild(Gt,Ft.firstChild)}var St=h.createElement("div",I,f.consts.CLASS_NAMES.colorBackSelectBox.id,f.consts.CLASS_NAMES.colorBackSelectBox.className);Ft.appendChild(St);var At=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackRExplain.id,f.consts.CLASS_NAMES.colorBackRExplain.className,{isIcon:!1,text:"R"});At.style.paddingLeft=8*I._attributes.sizeRate+"px",St.appendChild(At);var Ct=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackRInput.id,f.consts.CLASS_NAMES.colorBackRInput.className);Ct.setAttribute("maxlength","2"),h.addClickEvent(Ct,f.consts.CLASS_NAMES.colorBackRInput.id,I),St.appendChild(Ct);var jt=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackGExplain.id,f.consts.CLASS_NAMES.colorBackGExplain.className,{isIcon:!1,text:"G"});St.appendChild(jt);var rn=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackGInput.id,f.consts.CLASS_NAMES.colorBackGInput.className);rn.setAttribute("maxlength","2"),h.addClickEvent(rn,f.consts.CLASS_NAMES.colorBackGInput.id,I),St.appendChild(rn);var Sn=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackBExplain.id,f.consts.CLASS_NAMES.colorBackBExplain.className,{isIcon:!1,text:"B"});St.appendChild(Sn);var Hn=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackBInput.id,f.consts.CLASS_NAMES.colorBackBInput.className);Hn.setAttribute("maxlength","2"),h.addClickEvent(Hn,f.consts.CLASS_NAMES.colorBackBInput.id,I),St.appendChild(Hn);var Kn=h.createElement("span",I,f.consts.CLASS_NAMES.colorBackOpacityExplain.id,f.consts.CLASS_NAMES.colorBackOpacityExplain.className,{isIcon:!1,text:"Opacity"});St.appendChild(Kn);var Fn=h.createElementInput(I,f.consts.CLASS_NAMES.colorBackOpacityInput.id,f.consts.CLASS_NAMES.colorBackOpacityInput.className);Fn.setAttribute("type","number"),Fn.setAttribute("maxlength","3"),h.addClickEvent(Fn,f.consts.CLASS_NAMES.colorBackOpacityInput.id,I),St.appendChild(Fn),Be=document.createElement("br"),St.appendChild(Be);var ho=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack0.id,f.consts.CLASS_NAMES.colorBack0.className);ho.style.backgroundColor=I._colors.color13,St.appendChild(ho);var To=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack1.id,f.consts.CLASS_NAMES.colorBack1.className);To.style.backgroundColor=I._colors.color14,St.appendChild(To);var Xn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack2.id,f.consts.CLASS_NAMES.colorBack2.className);Xn.style.backgroundColor=I._colors.color15,St.appendChild(Xn);var Jn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack3.id,f.consts.CLASS_NAMES.colorBack3.className);Jn.style.backgroundColor=I._colors.color16,St.appendChild(Jn);var Zn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack4.id,f.consts.CLASS_NAMES.colorBack4.className);Zn.style.backgroundColor=I._colors.color17,St.appendChild(Zn);var Ae=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack5.id,f.consts.CLASS_NAMES.colorBack5.className);Ae.style.backgroundColor=I._colors.color18,St.appendChild(Ae);var we=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack6.id,f.consts.CLASS_NAMES.colorBack6.className);we.style.backgroundColor=I._colors.color19,St.appendChild(we);var Fe=h.createElementBasic("div",I,f.consts.CLASS_NAMES.colorBack7.id,f.consts.CLASS_NAMES.colorBack7.className);Fe.style.backgroundColor=I._colors.color20,St.appendChild(Fe);var at=h.createElementButton("span",I,f.consts.CLASS_NAMES.formatClearButton.id,f.consts.CLASS_NAMES.formatClearButton.className,{isIcon:!0,text:"format_clear"});if(at.setAttribute("title",f.languageSet[I._attributes.language].formatClearButtonTooltip),f.iconSpanElement.formatClearButtonIcon&&f.iconSpanElement.formatClearButtonIcon instanceof HTMLSpanElement){var $e=f.iconSpanElement.formatClearButtonIcon.cloneNode(!0);$e.setAttribute("data-note-id",I._id),j.forEach(function(ue){$e.classList.contains(ue)||$e.classList.add(ue)}),at.replaceChild($e,at.firstChild)}var pt=h.createElementButton("span",I,f.consts.CLASS_NAMES.undoButton.id,f.consts.CLASS_NAMES.undoButton.className,{isIcon:!0,text:"undo"});if(pt.setAttribute("title",f.languageSet[I._attributes.language].undoTooltip),f.iconSpanElement.undoButtonIcon&&f.iconSpanElement.undoButtonIcon instanceof HTMLSpanElement){var Nt=f.iconSpanElement.undoButtonIcon.cloneNode(!0);Nt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Nt.classList.contains(ue)||Nt.classList.add(ue)}),pt.replaceChild(Nt,pt.firstChild)}var zt=h.createElementButton("span",I,f.consts.CLASS_NAMES.redoButton.id,f.consts.CLASS_NAMES.redoButton.className,{isIcon:!0,text:"redo"});if(zt.setAttribute("title",f.languageSet[I._attributes.language].redoTooltip),f.iconSpanElement.redoButtonIcon&&f.iconSpanElement.redoButtonIcon instanceof HTMLSpanElement){var Wt=f.iconSpanElement.redoButtonIcon.cloneNode(!0);Wt.setAttribute("data-note-id",I._id),j.forEach(function(ue){Wt.classList.contains(ue)||Wt.classList.add(ue)}),zt.replaceChild(Wt,zt.firstChild)}var an=h.createElementButton("span",I,f.consts.CLASS_NAMES.helpButton.id,f.consts.CLASS_NAMES.helpButton.className,{isIcon:!0,text:"help"});if(an.setAttribute("title",f.languageSet[I._attributes.language].helpTooltip),f.iconSpanElement.helpButtonIcon&&f.iconSpanElement.helpButtonIcon instanceof HTMLSpanElement){var pn=f.iconSpanElement.helpButtonIcon.cloneNode(!0);pn.setAttribute("data-note-id",I._id),j.forEach(function(ue){pn.classList.contains(ue)||pn.classList.add(ue)}),an.replaceChild(pn,an.firstChild)}var Xt=h.createElementBasic("div",I,f.consts.CLASS_NAMES.modalBack.id,f.consts.CLASS_NAMES.modalBack.className),kn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attLinkModal.id,f.consts.CLASS_NAMES.attLinkModal.className),Qa=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkHeader.id,f.consts.CLASS_NAMES.attLinkHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkModalTitle});kn.appendChild(Qa);var el=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkExplain1.id,f.consts.CLASS_NAMES.attLinkExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkInTextExplain});kn.appendChild(el);var Di=h.createElementInput(I,f.consts.CLASS_NAMES.attLinkText.id,f.consts.CLASS_NAMES.attLinkText.className);Di.setAttribute("title",f.languageSet[I._attributes.language].attLinkInTextTooltip),kn.appendChild(Di);var tl=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkExplain2.id,f.consts.CLASS_NAMES.attLinkExplain2.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkInLinkExplain});kn.appendChild(tl);var zi=h.createElementInput(I,f.consts.CLASS_NAMES.attLinkHref.id,f.consts.CLASS_NAMES.attLinkHref.className);zi.setAttribute("title",f.languageSet[I._attributes.language].attLinkInLinkTooltip),kn.appendChild(zi);var Ui=h.createElementInputCheckbox(I,f.consts.CLASS_NAMES.attLinkIsBlankCheckbox.id,f.consts.CLASS_NAMES.attLinkIsBlankCheckbox.className);Ui.setAttribute("title",f.languageSet[I._attributes.language].attLinkIsOpenTooltip);var dr=h.createElement("label",I,f.consts.CLASS_NAMES.attLinkIsBlankLabel.id,f.consts.CLASS_NAMES.attLinkIsBlankLabel.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attLinkIsOpenExplain});dr.insertBefore(Ui,dr.firstChild),kn.appendChild(dr);var nl=h.createElement("span",I,f.consts.CLASS_NAMES.attLinkValidCheckText.id,f.consts.CLASS_NAMES.attLinkValidCheckText.className),Gi=h.createElementInputCheckbox(I,f.consts.CLASS_NAMES.attLinkValidCheckbox.id,f.consts.CLASS_NAMES.attLinkValidCheckbox.className);Gi.style.display="none";var Bo=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkFooter.id,f.consts.CLASS_NAMES.attLinkFooter.className),ur=h.createElementButton("button",I,f.consts.CLASS_NAMES.attLinkInsertButton.id,f.consts.CLASS_NAMES.attLinkInsertButton.className,{isIcon:!0,text:"add_link"});if(f.iconSpanElement.attLinkInsertButtonIcon&&f.iconSpanElement.attLinkInsertButtonIcon instanceof HTMLSpanElement){var fr=f.iconSpanElement.attLinkInsertButtonIcon.cloneNode(!0);fr.setAttribute("data-note-id",I._id),j.forEach(function(ue){fr.classList.contains(ue)||fr.classList.add(ue)}),ur.replaceChild(fr,ur.firstChild)}Bo.appendChild(nl),Bo.appendChild(Gi),Bo.appendChild(ur),kn.appendChild(Bo);var Lo=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attFileModal.id,f.consts.CLASS_NAMES.attFileModal.className),ol=h.createElement("div",I,f.consts.CLASS_NAMES.attFileHeader.id,f.consts.CLASS_NAMES.attFileHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileModalTitle});Lo.appendChild(ol);var Qn=h.createElement("div",I,f.consts.CLASS_NAMES.attFilelayout.id,f.consts.CLASS_NAMES.attFilelayout.className),rl=h.createElement("div",I,f.consts.CLASS_NAMES.attFileExplain1.id,f.consts.CLASS_NAMES.attFileExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileExplain1});Qn.appendChild(rl),Be=document.createElement("br"),Qn.appendChild(Be);var hr=document.createElement("div");hr.setAttribute("style","width:90%;text-align:center;margin:0 auto;");var mr=h.createElementButton("div",I,f.consts.CLASS_NAMES.attFileUploadDiv.id,f.consts.CLASS_NAMES.attFileUploadDiv.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileUploadDiv});mr.addEventListener("dragover",function(ue){I._elementEvents.attFileUploadDiv_onBeforeDragover(ue)&&(f.events.elementEvents.attFileUploadDiv_onDragover(ue),I._elementEvents.attFileUploadDiv_onAfterDragover(ue),ue.stopImmediatePropagation())}),mr.addEventListener("drop",function(ue){I._elementEvents.attFileUploadDiv_onBeforeDrop(ue)&&(f.events.elementEvents.attFileUploadDiv_onDrop(ue),I._elementEvents.attFileUploadDiv_onAfterDrop(ue),ue.stopImmediatePropagation())}),hr.appendChild(mr),Qn.appendChild(hr);var gr=document.createElement("div");gr.setAttribute("style","width:90%;text-align:right;margin:5px auto 20px auto;");var il=h.createElementButton("button",I,f.consts.CLASS_NAMES.attFileUploadButton.id,f.consts.CLASS_NAMES.attFileUploadButton.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attFileUploadButton});gr.appendChild(il),Qn.appendChild(gr);var yr=h.createElementInput(I,f.consts.CLASS_NAMES.attFileUpload.id,f.consts.CLASS_NAMES.attFileUpload.className);yr.setAttribute("type","file"),yr.setAttribute("multiple",""),Qn.appendChild(yr),Lo.appendChild(Qn);var ji=h.createElement("div",I,f.consts.CLASS_NAMES.attFileFooter.id,f.consts.CLASS_NAMES.attFileFooter.className),pr=h.createElementButton("button",I,f.consts.CLASS_NAMES.attFileInsertButton.id,f.consts.CLASS_NAMES.attFileInsertButton.className,{isIcon:!0,text:"attach_file"});if(f.iconSpanElement.attFileInsertButtonIcon&&f.iconSpanElement.attFileInsertButtonIcon instanceof HTMLSpanElement){var _r=f.iconSpanElement.attFileInsertButtonIcon.cloneNode(!0);_r.setAttribute("data-note-id",I._id),j.forEach(function(ue){_r.classList.contains(ue)||_r.classList.add(ue)}),pr.replaceChild(_r,pr.firstChild)}ji.appendChild(pr),Lo.appendChild(ji);var fn=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attImageModal.id,f.consts.CLASS_NAMES.attImageModal.className),al=h.createElement("div",I,f.consts.CLASS_NAMES.attImageHeader.id,f.consts.CLASS_NAMES.attImageHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageModalTitle});fn.appendChild(al);var ll=h.createElement("div",I,f.consts.CLASS_NAMES.attImageExplain1.id,f.consts.CLASS_NAMES.attImageExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageExplain1});fn.appendChild(ll),Be=document.createElement("br"),fn.appendChild(Be);var mo=document.createElement("div");mo.setAttribute("style","width:90%;text-align:center;margin:0 auto;position:relative;");var No=h.createElementButton("button",I,f.consts.CLASS_NAMES.attImageViewPreButton.id,f.consts.CLASS_NAMES.attImageViewPreButton.className,{isIcon:!0,text:"navigate_before"});if(f.iconSpanElement.attImageViewPreButtonIcon&&f.iconSpanElement.attImageViewPreButtonIcon instanceof HTMLSpanElement){var vr=f.iconSpanElement.attImageViewPreButtonIcon.cloneNode(!0);vr.setAttribute("data-note-id",I._id),j.forEach(function(ue){vr.classList.contains(ue)||vr.classList.add(ue)}),No.replaceChild(vr,No.firstChild)}No.setAttribute("style","position:absolute;top:50%;transform:translateY(-50%) translateX(1%);"),mo.appendChild(No);var br=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attImageUploadButtonAndView.id,f.consts.CLASS_NAMES.attImageUploadButtonAndView.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageUploadButtonAndView});br.addEventListener("dragover",function(ue){I._elementEvents.attImageUploadButtonAndView_onBeforeDragover(ue)&&(f.events.elementEvents.attImageUploadButtonAndView_onDragover(ue),I._elementEvents.attImageUploadButtonAndView_onAfterDragover(ue),ue.stopImmediatePropagation())}),br.addEventListener("drop",function(ue){I._elementEvents.attImageUploadButtonAndView_onBeforeDrop(ue)&&(f.events.elementEvents.attImageUploadButtonAndView_onDrop(ue),I._elementEvents.attImageUploadButtonAndView_onAfterDrop(ue),ue.stopImmediatePropagation())}),mo.appendChild(br);var Ro=h.createElementButton("button",I,f.consts.CLASS_NAMES.attImageViewNextButton.id,f.consts.CLASS_NAMES.attImageViewNextButton.className,{isIcon:!0,text:"navigate_next"});if(f.iconSpanElement.attImageViewNextButtonIcon&&f.iconSpanElement.attImageViewNextButtonIcon instanceof HTMLSpanElement){var Cr=f.iconSpanElement.attImageViewNextButtonIcon.cloneNode(!0);Cr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Cr.classList.contains(ue)||Cr.classList.add(ue)}),Ro.replaceChild(Cr,Ro.firstChild)}Ro.setAttribute("style","position:absolute;top:50%;transform:translateY(-50%) translateX(-101%);"),mo.appendChild(Ro),fn.appendChild(mo);var Ho=h.createElementInput(I,f.consts.CLASS_NAMES.attImageUpload.id,f.consts.CLASS_NAMES.attImageUpload.className);Ho.setAttribute("type","file"),Ho.setAttribute("multiple","");var zd=function(ue){for(var eo="",On=0;On<ue.length;On++)ue[On]&&(eo+=ue[On].trim(),On!==ue.length-1&&(eo+=", "));return eo}(I._attributes.attImageAcceptTypes);Ho.setAttribute("accept",zd),fn.appendChild(Ho);var sl=h.createElement("div",I,f.consts.CLASS_NAMES.attImageExplain2.id,f.consts.CLASS_NAMES.attImageExplain2.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attImageExplain2});fn.appendChild(sl),Be=document.createElement("br"),fn.appendChild(Be);var Wi=h.createElementInput(I,f.consts.CLASS_NAMES.attImageURL.id,f.consts.CLASS_NAMES.attImageURL.className);Wi.setAttribute("title",f.languageSet[I._attributes.language].attImageURLTooltip),fn.appendChild(Wi);var qi=h.createElement("div",I,f.consts.CLASS_NAMES.attImageFooter.id,f.consts.CLASS_NAMES.attImageFooter.className),Mr=h.createElementButton("button",I,f.consts.CLASS_NAMES.attImageInsertButton.id,f.consts.CLASS_NAMES.attImageInsertButton.className,{isIcon:!0,text:"image"});if(f.iconSpanElement.attImageInsertButtonIcon&&f.iconSpanElement.attImageInsertButtonIcon instanceof HTMLSpanElement){var xr=f.iconSpanElement.attImageInsertButtonIcon.cloneNode(!0);xr.setAttribute("data-note-id",I._id),j.forEach(function(ue){xr.classList.contains(ue)||xr.classList.add(ue)}),Mr.replaceChild(xr,Mr.firstChild)}qi.appendChild(Mr),fn.appendChild(qi);var In=h.createElementBasic("div",I,f.consts.CLASS_NAMES.attVideoModal.id,f.consts.CLASS_NAMES.attVideoModal.className),cl=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoHeader.id,f.consts.CLASS_NAMES.attVideoHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attVideoModalTitle});In.appendChild(cl);var dl=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoExplain1.id,f.consts.CLASS_NAMES.attVideoExplain1.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attVideoExplain1});In.appendChild(dl);var $i=h.createElementInput(I,f.consts.CLASS_NAMES.attVideoEmbedId.id,f.consts.CLASS_NAMES.attVideoEmbedId.className);$i.setAttribute("title",f.languageSet[I._attributes.language].attVideoEmbedIdTooltip),In.appendChild($i);var ul=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoExplain2.id,f.consts.CLASS_NAMES.attVideoExplain2.className,{isIcon:!1,text:f.languageSet[I._attributes.language].attVideoExplain2});In.appendChild(ul);var go=document.createElement("div");go.setAttribute("style","padding-left:20px;color:"+I._colors.color10);var Sr=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!0,text:"width",iconStyle:"color:"+I._colors.color10});if(f.iconSpanElement.attVideoWidthTextIcon&&f.iconSpanElement.attVideoWidthTextIcon instanceof HTMLSpanElement){var kr=f.iconSpanElement.attVideoWidthTextIcon.cloneNode(!0);kr.setAttribute("data-note-id",I._id),j.forEach(function(ue){kr.classList.contains(ue)||kr.classList.add(ue)}),Sr.replaceChild(kr,Sr.firstChild)}go.appendChild(Sr);var Fo=h.createElementInput(I,f.consts.CLASS_NAMES.attVideoWidth.id,f.consts.CLASS_NAMES.attVideoWidth.className);Fo.setAttribute("title",f.languageSet[I._attributes.language].attVideoWidthTooltip),Fo.setAttribute("type","number"),Fo.setAttribute("style","text-align:right;"),go.appendChild(Fo);var Yi=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!1,text:"%"});Yi.setAttribute("style","padding-left:10px;font-size:0.8em"),go.appendChild(Yi),In.appendChild(go);var yo=document.createElement("div");yo.setAttribute("style","padding-left:20px;color:"+I._colors.color10);var Ir=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!0,text:"height",iconStyle:"color:"+I._colors.color10});if(f.iconSpanElement.attVideoHeightTextIcon&&f.iconSpanElement.attVideoHeightTextIcon instanceof HTMLSpanElement){var Er=f.iconSpanElement.attVideoHeightTextIcon.cloneNode(!0);Er.setAttribute("data-note-id",I._id),j.forEach(function(ue){Er.classList.contains(ue)||Er.classList.add(ue)}),Ir.replaceChild(Er,Ir.firstChild)}yo.appendChild(Ir);var Oo=h.createElementInput(I,f.consts.CLASS_NAMES.attVideoHeight.id,f.consts.CLASS_NAMES.attVideoHeight.className);Oo.setAttribute("title",f.languageSet[I._attributes.language].attVideoHeightTooltip),Oo.setAttribute("type","number"),Oo.setAttribute("style","text-align:right;"),yo.appendChild(Oo);var Ki=h.createElement("span",I,"","modal_att_video_icon",{isIcon:!1,text:"px"});Ki.setAttribute("style","padding-left:10px;font-size:0.8em"),yo.appendChild(Ki),In.appendChild(yo);var fl=h.createElement("span",I,f.consts.CLASS_NAMES.attVideoValidCheckText.id,f.consts.CLASS_NAMES.attVideoValidCheckText.className),Xi=h.createElementInputCheckbox(I,f.consts.CLASS_NAMES.attVideoValidCheckbox.id,f.consts.CLASS_NAMES.attVideoValidCheckbox.className);Xi.style.display="none";var wr=h.createElementButton("button",I,f.consts.CLASS_NAMES.attVideoInsertButton.id,f.consts.CLASS_NAMES.attVideoInsertButton.className,{isIcon:!0,text:"videocam"});if(f.iconSpanElement.attVideoInsertButtonIcon&&f.iconSpanElement.attVideoInsertButtonIcon instanceof HTMLSpanElement){var Ar=f.iconSpanElement.attVideoInsertButtonIcon.cloneNode(!0);Ar.setAttribute("data-note-id",I._id),j.forEach(function(ue){Ar.classList.contains(ue)||Ar.classList.add(ue)}),wr.replaceChild(Ar,wr.firstChild)}var Vo=h.createElement("div",I,f.consts.CLASS_NAMES.attVideoFooter.id,f.consts.CLASS_NAMES.attVideoFooter.className);Vo.appendChild(fl),Vo.appendChild(Xi),Vo.appendChild(wr),In.appendChild(Vo);var po=h.createElement("div",I,f.consts.CLASS_NAMES.attLinkTooltip.id,f.consts.CLASS_NAMES.attLinkTooltip.className),Ji=h.createElement("a",I,f.consts.CLASS_NAMES.attLinkTooltipHref.id,f.consts.CLASS_NAMES.attLinkTooltipHref.className);Ji.setAttribute("target","_blank");var Tr=h.createElementButton("span",I,f.consts.CLASS_NAMES.attLinkTooltipEditButton.id,f.consts.CLASS_NAMES.attLinkTooltipEditButton.className,{isIcon:!0,text:"add_link",iconStyle:"font-size:0.9em"});if(f.iconSpanElement.attLinkTooltipEditButtonIcon&&f.iconSpanElement.attLinkTooltipEditButtonIcon instanceof HTMLSpanElement){var Br=f.iconSpanElement.attLinkTooltipEditButtonIcon.cloneNode(!0);Br.setAttribute("data-note-id",I._id),j.forEach(function(ue){Br.classList.contains(ue)||Br.classList.add(ue)}),Tr.replaceChild(Br,Tr.firstChild)}var Lr=h.createElementButton("span",I,f.consts.CLASS_NAMES.attLinkTooltipUnlinkButton.id,f.consts.CLASS_NAMES.attLinkTooltipUnlinkButton.className,{isIcon:!0,text:"link_off",iconStyle:"font-size:0.9em"});if(f.iconSpanElement.attLinkTooltipUnlinkButtonIcon&&f.iconSpanElement.attLinkTooltipUnlinkButtonIcon instanceof HTMLSpanElement){var Nr=f.iconSpanElement.attLinkTooltipUnlinkButtonIcon.cloneNode(!0);Nr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Nr.classList.contains(ue)||Nr.classList.add(ue)}),Lr.replaceChild(Nr,Lr.firstChild)}po.appendChild(Tr),po.appendChild(Lr),po.appendChild(Ji);var Po=h.createElement("div",I,f.consts.CLASS_NAMES.attImageAndVideoTooltip.id,f.consts.CLASS_NAMES.attImageAndVideoTooltip.className),sn=document.createElement("div"),Do=document.createElement("span");Do.setAttribute("class",m(I._noteName,I.id,"small_text_box")),Do.setAttribute("style","padding: 0 0 0 10px;"),Do.textContent=f.languageSet[I._attributes.language].attImageAndVideoTooltipWidthInput,sn.appendChild(Do);var Rr=h.createElementInput(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipWidthInput.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipWidthInput.className);Rr.addEventListener("keyup",function(ue){I._elementEvents.attImageAndVideoTooltipWidthInput_onBeforeKeyup(ue)&&(f.events.elementEvents.attImageAndVideoTooltipWidthInput_onKeyup(ue),I._elementEvents.attImageAndVideoTooltipWidthInput_onAfterKeyup(ue),ue.stopImmediatePropagation())}),Rr.setAttribute("type","number"),sn.appendChild(Rr);var zo=document.createElement("span");zo.setAttribute("class",m(I._noteName,I.id,"small_text_box")),zo.setAttribute("style","padding: 0;"),zo.textContent="%",sn.appendChild(zo);var Hr=document.createElement("span");Hr.setAttribute("class",m(I._noteName,I.id,"small_text_box")),Hr.textContent=f.languageSet[I._attributes.language].attImageAndVideoTooltipFloatRadio,sn.appendChild(Hr);var hl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioNone.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioNone.className,c(I._noteName,I.id,"attImageAndVideoTooltipFloatRadio"));sn.appendChild(hl);var Fr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioNone.id),"close");if(f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon instanceof HTMLSpanElement){var Or=f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon.cloneNode(!0);Or.setAttribute("data-note-id",I._id),j.forEach(function(ue){Or.classList.contains(ue)||Or.classList.add(ue)}),Fr.replaceChild(Or,Fr.firstChild)}sn.appendChild(Fr);var ml=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioLeft.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioLeft.className,c(I._noteName,I.id,"attImageAndVideoTooltipFloatRadio"));sn.appendChild(ml);var Vr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioLeft.id),"art_track");if(f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon instanceof HTMLSpanElement){var Pr=f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon.cloneNode(!0);Pr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Pr.classList.contains(ue)||Pr.classList.add(ue)}),Vr.replaceChild(Pr,Vr.firstChild)}sn.appendChild(Vr);var gl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioRight.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioRight.className,c(I._noteName,I.id,"attImageAndVideoTooltipFloatRadio"));sn.appendChild(gl);var Dr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipFloatRadioRight.id),"burst_mode");if(f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon instanceof HTMLSpanElement){var zr=f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon.cloneNode(!0);zr.setAttribute("data-note-id",I._id),j.forEach(function(ue){zr.classList.contains(ue)||zr.classList.add(ue)}),Dr.replaceChild(zr,Dr.firstChild)}sn.appendChild(Dr),Po.appendChild(sn);var En=document.createElement("div"),Ur=document.createElement("span");Ur.setAttribute("class",m(I._noteName,I.id,"small_text_box")),Ur.textContent=f.languageSet[I._attributes.language].attImageAndVideoTooltipShapeRadio,En.appendChild(Ur);var yl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioSquare.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioSquare.className,c(I._noteName,I.id,"attImageAndVideoTooltipShapeRadio"));En.appendChild(yl);var Gr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioSquare.id),"crop_5_4");if(f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon instanceof HTMLSpanElement){var jr=f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon.cloneNode(!0);jr.setAttribute("data-note-id",I._id),j.forEach(function(ue){jr.classList.contains(ue)||jr.classList.add(ue)}),Gr.replaceChild(jr,Gr.firstChild)}En.appendChild(Gr);var pl=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioRadius.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioRadius.className,c(I._noteName,I.id,"attImageAndVideoTooltipShapeRadio"));En.appendChild(pl);var Wr=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioRadius.id),"aspect_ratio");if(f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon instanceof HTMLSpanElement){var qr=f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon.cloneNode(!0);qr.setAttribute("data-note-id",I._id),j.forEach(function(ue){qr.classList.contains(ue)||qr.classList.add(ue)}),Wr.replaceChild(qr,Wr.firstChild)}En.appendChild(Wr);var _l=h.createElementInputRadio(I,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioCircle.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioCircle.className,c(I._noteName,I.id,"attImageAndVideoTooltipShapeRadio"));En.appendChild(_l);var $r=h.createElementRadioLabel(I,c(I._noteName,I.id,f.consts.CLASS_NAMES.attImageAndVideoTooltipShapeRadioCircle.id),"circle");if(f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon&&f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon instanceof HTMLSpanElement){var Yr=f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon.cloneNode(!0);Yr.setAttribute("data-note-id",I._id),j.forEach(function(ue){Yr.classList.contains(ue)||Yr.classList.add(ue)}),$r.replaceChild(Yr,$r.firstChild)}En.appendChild($r),Po.appendChild(En);var Uo=h.createElementBasic("div",I,f.consts.CLASS_NAMES.helpModal.id,f.consts.CLASS_NAMES.helpModal.className),vl=h.createElement("div",I,f.consts.CLASS_NAMES.helpHeader.id,f.consts.CLASS_NAMES.helpHeader.className,{isIcon:!1,text:f.languageSet[I._attributes.language].helpModalTitle});Uo.appendChild(vl);var Zi=h.createElement("div",I,f.consts.CLASS_NAMES.helpMain.id,f.consts.CLASS_NAMES.helpMain.className),Qi=document.createElement("table");f.languageSet[I._attributes.language].helpContent.forEach(function(ue){var eo=document.createElement("tr");Object.keys(ue).forEach(function(On){var ta=document.createElement("td");ta.textContent=On,ta.setAttribute("style","width:30%;padding:0 0 6px 12px;border:none;"),eo.appendChild(ta);var na=document.createElement("td");na.setAttribute("style","width:70%;padding:0 12px 6px 12px;border:none;"),na.textContent=ue[On],eo.appendChild(na)}),Qi.appendChild(eo)}),Zi.appendChild(Qi),Uo.appendChild(Zi);var ea=h.createElement("div",I,f.consts.CLASS_NAMES.helpFooter.id,f.consts.CLASS_NAMES.helpFooter.className);ea.setAttribute("style","height:25px;"),Uo.appendChild(ea);var Kr=h.createElementBasic("div",I,f.consts.CLASS_NAMES.placeholder.id,f.consts.CLASS_NAMES.placeholder.className);if(I._attributes.placeholderTitle){var bl=document.createElement("h5");bl.innerText=I._attributes.placeholderTitle,Kr.appendChild(bl)}if(I._attributes.placeholderTextContent){var Cl=document.createElement("p");Cl.innerText=I._attributes.placeholderTextContent,Kr.appendChild(Cl)}Xt.appendChild(kn),Xt.appendChild(Lo),Xt.appendChild(fn),Xt.appendChild(In),Xt.appendChild(Uo),tt.appendChild(Xt),tt.appendChild(Kr),I._attributes.toolToggleUsing&&E.appendChild(s),E.appendChild(k),E.appendChild(et),E.appendChild(Mt),E.appendChild(xt),E.appendChild(v),E.appendChild(A),E.appendChild(g),E.appendChild(se),E.appendChild(Q),E.appendChild(b),E.appendChild(R),E.appendChild(P),E.appendChild(Se),E.appendChild(Ue),E.appendChild(ct),E.appendChild(ae),E.appendChild(Ft),E.appendChild(at),E.appendChild(pt),E.appendChild(zt),E.appendChild(an),I._attributes.toolPosition===r.bottom?(tt.appendChild(Ge),tt.appendChild(po),tt.appendChild(Po),tt.appendChild(E)):(tt.appendChild(E),tt.appendChild(po),tt.appendChild(Po),tt.appendChild(Ge)),I.appendChild(tt),pe.value=String(I._status.fontSize),je.value=String(I._status.letterSpacing),rt.value=String(I._status.lineHeight),y.value=I._status.colorTextR,S.value=I._status.colorTextG,O.value=I._status.colorTextB,G.value=I._status.colorTextO,Ct.value=I._status.colorBackR,rn.value=I._status.colorBackG,Hn.value=I._status.colorBackB,Fn.value=I._status.colorBackO,be.usingParagraphStyle||(k.style.display="none"),be.usingBold||(et.style.display="none"),be.usingUnderline||(Mt.style.display="none"),be.usingItalic||(xt.style.display="none"),be.usingUl||(v.style.display="none"),be.usingOl||(A.style.display="none"),be.usingTextAlign||(g.style.display="none"),be.usingAttLink||(se.style.display="none"),be.usingAttFile||(Q.style.display="none"),be.usingAttImage||(b.style.display="none"),be.usingAttVideo||(R.style.display="none"),be.usingFontSize||(P.style.display="none"),be.usingLetterSpacing||(Se.style.display="none"),be.usingLineHeight||(Ue.style.display="none"),be.usingFontFamily||(ct.style.display="none"),be.usingColorText||(ae.style.display="none"),be.usingColorBack||(Ft.style.display="none"),be.usingFormatClear||(at.style.display="none"),be.usingUndo||(pt.style.display="none"),be.usingRedo||(zt.style.display="none"),be.usingHelp||(an.style.display="none"),I._elements={template:tt,textarea:Ge,tool:E,toolToggleButton:s,paragraphStyleSelect:k,paragraphStyleSelectBox:J,paragraphStyleNormalButton:ie,paragraphStyleHeader1Button:ge,paragraphStyleHeader2Button:Ce,paragraphStyleHeader3Button:He,paragraphStyleHeader4Button:Le,paragraphStyleHeader5Button:Ke,paragraphStyleHeader6Button:Ze,boldButton:et,underlineButton:Mt,italicButton:xt,ulButton:v,olButton:A,textAlignSelect:g,textAlignSelectBox:B,textAlignLeftButton:H,textAlignCenterButton:q,textAlignRightButton:de,attLinkButton:se,attFileButton:Q,attImageButton:b,attVideoButton:R,fontSizeInputBox:P,fontSizeInput:pe,letterSpacingInputBox:Se,letterSpacingInput:je,lineHeightInputBox:Ue,lineHeightInput:rt,fontFamilySelect:ct,fontFamilySelectBox:Ne,colorTextSelect:ae,colorTextSelectBox:ht,colorTextRIcon:d,colorTextRInput:y,colorTextGIcon:M,colorTextGInput:S,colorTextBIcon:N,colorTextBInput:O,colorTextOpacityIcon:T,colorTextOpacityInput:G,colorText0:V,colorText1:Z,colorText2:ne,colorText3:Y,colorText4:le,colorText5:qe,colorText6:_t,colorText7:on,colorBackSelect:Ft,colorBackSelectBox:St,colorBackRIcon:At,colorBackRInput:Ct,colorBackGIcon:jt,colorBackGInput:rn,colorBackBIcon:Sn,colorBackBInput:Hn,colorBackOpacityIcon:Kn,colorBackOpacityInput:Fn,colorBack0:ho,colorBack1:To,colorBack2:Xn,colorBack3:Jn,colorBack4:Zn,colorBack5:Ae,colorBack6:we,colorBack7:Fe,formatClearButton:at,undoButton:pt,redoButton:zt,helpButton:an,modalBack:Xt,attLinkModal:kn,attLinkModalTitle:Qa,attLinkInTextExplain:el,attLinkText:Di,attLinkInLinkExplain:tl,attLinkHref:zi,attLinkIsBlankCheckbox:Ui,attLinkIsOpenExplain:dr,attLinkValidCheckText:nl,attLinkValidCheckbox:Gi,attModalBox:Bo,attLinkInsertButton:ur,attFileModal:Lo,attFileModalTitle:ol,attFilelayout:Qn,attFileExplain1:rl,attFileUploadDivBox:hr,attFileUploadDiv:mr,attFileUploadButtonBox:gr,attFileUploadButton:il,attFileUpload:yr,attFileInsertButtonBox:ji,attFileInsertButton:pr,attImageModal:fn,attImageModalTitle:al,attImageExplain1:ll,attImageUploadButtonAndViewBox:mo,attImageViewPreButton:No,attImageUploadButtonAndView:br,attImageViewNextButton:Ro,attImageUpload:Ho,attImageExplain2:sl,attImageURL:Wi,attImageInsertButtonBox:qi,attImageInsertButton:Mr,attVideoModal:In,attVideoModalTitle:cl,attVideoExplain1:dl,attVideoEmbedId:$i,attVideoExplain2:ul,attVideoWidthTextBox:go,attVideoWidthText:Sr,attVideoWidth:Fo,attVideoWidthUnit:Yi,attVideoHeightTextBox:yo,attVideoHeightText:Ir,attVideoHeight:Oo,attVideoHeightUnit:Ki,attVideoFooter:Vo,attVideoValidCheckText:fl,attVideoValidCheckbox:Xi,attVideoInsertButton:wr,attLinkTooltip:po,attLinkTooltipHref:Ji,attLinkTooltipEditButton:Tr,attLinkTooltipUnlinkButton:Lr,attImageAndVideoTooltip:Po,attImageAndVideoTooltipWidthAndFloatBox:sn,attImageAndVideoTooltipWidthText:Do,attImageAndVideoTooltipWidthInput:Rr,attImageAndVideoTooltipWidthUnit:zo,attImageAndVideoTooltipFloatRadioBox:Hr,attImageAndVideoTooltipFloatRadioNone:hl,attImageAndVideoTooltipFloatRadioNoneLabel:Fr,attImageAndVideoTooltipFloatRadioLeft:ml,attImageAndVideoTooltipFloatRadioLeftLabel:Vr,attImageAndVideoTooltipFloatRadioRight:gl,attImageAndVideoTooltipFloatRadioRightLabel:Dr,attImageAndVideoTooltipShapeBox:En,attImageAndVideoTooltipShapeRadioBox:Ur,attImageAndVideoTooltipShapeRadioSquare:yl,attImageAndVideoTooltipShapeRadioSquareLabel:Gr,attImageAndVideoTooltipShapeRadioRadius:pl,attImageAndVideoTooltipShapeRadioRadiusLabel:Wr,attImageAndVideoTooltipShapeRadioCircle:_l,attImageAndVideoTooltipShapeRadioCircleLabel:$r,helpModal:Uo,helpHeader:vl,helpMain:Zi,helpMainTable:Qi,helpFooter:ea,placeholder:Kr}},nn=function(f,h){for(var I,be=h.getAttribute("note-mode-by-device")&&["ADAPTIVE","MOBILE","DESKTOP"].indexOf(h.getAttribute("note-mode-by-device"))?h.getAttribute("note-mode-by-device").toUpperCase():f.attributes.noteModeByDevice,Be=be==="MOBILE"||be!=="DESKTOP"&&X(),tt=h.getAttribute("tool-position")&&["BOTTOM","TOP"].indexOf(h.getAttribute("tool-position"))>=0?h.getAttribute("tool-position"):Be?r.bottom:r.top,Ge=ee(h.getAttribute("tool-default-line"))?Number(h.getAttribute("tool-default-line")):Be?2:1,j=h.getAttribute("tool-toggle")?h.getAttribute("tool-toggle").toLowerCase()==="true":!!Be,E=h.getAttribute("textarea-width")?h.getAttribute("textarea-width"):f.attributes.textareaOriginWidth,s=h.getAttribute("textarea-height")?h.getAttribute("textarea-height"):f.attributes.textareaOriginHeight,l=h.getAttribute("textarea-max-width")?h.getAttribute("textarea-max-width"):f.attributes.textareaMaxWidth,k=h.getAttribute("textarea-max-height")?h.getAttribute("textarea-max-height"):f.attributes.textareaMaxHeight,$=h.getAttribute("textarea-height-isModify")?h.getAttribute("textarea-height-isModify").toLowerCase()==="true":f.attributes.textareaHeightIsModify,J=h.getAttribute("placeholder-is-visible")?h.getAttribute("placeholder-is-visible").toLowerCase()==="true":f.attributes.placeholderIsVisible,ie=re(h.getAttribute("placeholder-add-top"))?Number(h.getAttribute("placeholder-add-top")):f.attributes.placeholderAddTop,ge=re(h.getAttribute("placeholder-add-left"))?Number(h.getAttribute("placeholder-add-left")):f.attributes.placeholderAddLeft,Ce=h.getAttribute("placeholder-width")?h.getAttribute("placeholder-width"):f.attributes.placeholderWidth,He=h.getAttribute("placeholder-color")?h.getAttribute("placeholder-color"):f.attributes.placeholderColor,Le=h.getAttribute("placeholder-background-color")?h.getAttribute("placeholder-background-color"):f.attributes.placeholderBackgroundColor,Ke=h.getAttribute("placeholder-title")?h.getAttribute("placeholder-title"):f.attributes.placeholderTitle,Ze=h.getAttribute("placeholder-text-content")?h.getAttribute("placeholder-text-content"):f.attributes.placeholderTextContent,et=h.getAttribute("att-file-prevent-types")?h.getAttribute("att-file-prevent-types").split(","):f.attributes.attFilePreventTypes,Ve=h.getAttribute("att-file-accept-types")?h.getAttribute("att-file-accept-types").split(","):f.attributes.attFileAcceptTypes,Mt=ee(h.getAttribute("att-file-max-size"))?Number(h.getAttribute("att-file-max-size")):f.attributes.attFileMaxSize,Rt=h.getAttribute("att-image-prevent-types")?h.getAttribute("att-image-prevent-types").split(","):f.attributes.attImagePreventTypes,xt=h.getAttribute("att-image-accept-types")?h.getAttribute("att-image-accept-types").split(","):f.attributes.attImageAcceptTypes,Ht=ee(h.getAttribute("att-image-max-size"))?Number(h.getAttribute("att-image-max-size")):f.attributes.attImageMaxSize,v=f.attributes.defaultFontFamilies,w=h.getAttribute("add-font-family")?h.getAttribute("add-font-family").split(","):[],A=h.getAttribute("remove-font-family")?h.getAttribute("remove-font-family").split(","):[],x=0;x<w.length;x++)w[x],w[x]&&(v.includes(w[x])||(I=w[x],/^[A-Za-z0-9]+$/.test(I)?v.splice(7+x,0,w[x]):v.push(w[x])));for(var g=function(S){if(!A[S])return 1;v=v.filter(function(N){return N!==A[S]})},p=0;p<A.length;p++)g(p);var B=h.getAttribute("default-font-family")?h.getAttribute("default-font-family"):f.attributes.defaultTextareaFontFamily;v.includes(B)||v.splice(0,0,B);var H=h.getAttribute("default-tool-font-family")?h.getAttribute("default-tool-font-family"):f.attributes.defaultToolFontFamily,U=ee(h.getAttribute("default-font-size"))?Number(h.getAttribute("default-font-size")):f.attributes.defaultTextareaFontSize,q=ee(h.getAttribute("default-line-height"))?Number(h.getAttribute("default-line-height")):f.attributes.defaultTextareaLineHeight,oe=ee(h.getAttribute("size-level-desktop"))?Number(h.getAttribute("size-level-desktop")):3,de=ee(h.getAttribute("size-level-mobile"))?Number(h.getAttribute("size-level-mobile")):7,he=Be?de:oe;he<1&&(he=1),he>9&&(he=9);var se=(he+11)/20,me=h.getAttribute("main-color")?Pe(h.getAttribute("main-color")):f.attributes.mainColor,Q=h.getAttribute("color-set")?h.getAttribute("color-set").toLowerCase():f.attributes.colorSet,u=h.getAttribute("invert-color")?h.getAttribute("invert-color").toLowerCase()==="true":f.attributes.invertColor,b=(!h.getAttribute("using-paragraph-style")||h.getAttribute("using-paragraph-style").toLowerCase()!=="false")&&f.attributes.usingParagraphStyle,_=(!h.getAttribute("using-bold")||h.getAttribute("using-bold").toLowerCase()!=="false")&&f.attributes.usingBold,R=(!h.getAttribute("using-underline")||h.getAttribute("using-underline").toLowerCase()!=="false")&&f.attributes.usingUnderline,F=(!h.getAttribute("using-italic")||h.getAttribute("using-italic").toLowerCase()!=="false")&&f.attributes.usingItalic,P=(!h.getAttribute("using-ul")||h.getAttribute("using-ul").toLowerCase()!=="false")&&f.attributes.usingUl,z=(!h.getAttribute("using-ol")||h.getAttribute("using-ol").toLowerCase()!=="false")&&f.attributes.usingOl,pe=(!h.getAttribute("using-text-align")||h.getAttribute("using-text-align").toLowerCase()!=="false")&&f.attributes.usingTextAlign,Se=(!h.getAttribute("using-att-link")||h.getAttribute("using-att-link").toLowerCase()!=="false")&&f.attributes.usingAttLink,ze=(!h.getAttribute("using-att-file")||h.getAttribute("using-att-file").toLowerCase()!=="false")&&f.attributes.usingAttFile,je=(!h.getAttribute("using-att-image")||h.getAttribute("using-att-image").toLowerCase()!=="false")&&f.attributes.usingAttImage,Ue=(!h.getAttribute("using-att-video")||h.getAttribute("using-att-video").toLowerCase()!=="false")&&f.attributes.usingAttVideo,it=(!h.getAttribute("using-font-size")||h.getAttribute("using-font-size").toLowerCase()!=="false")&&f.attributes.usingFontSize,rt=(!h.getAttribute("using-letter-spacing")||h.getAttribute("using-letter-spacing").toLowerCase()!=="false")&&f.attributes.usingLetterSpacing,ct=(!h.getAttribute("using-line-height")||h.getAttribute("using-line-height").toLowerCase()!=="false")&&f.attributes.usingLineHeight,Ne=(!h.getAttribute("using-font-family")||h.getAttribute("using-font-family").toLowerCase()!=="false")&&f.attributes.usingFontFamily,De=(!h.getAttribute("using-color-text")||h.getAttribute("using-color-text").toLowerCase()!=="false")&&f.attributes.usingColorText,lt=(!h.getAttribute("using-color-back")||h.getAttribute("using-color-back").toLowerCase()!=="false")&&f.attributes.usingColorBack,ae=(!h.getAttribute("using-format-clear")||h.getAttribute("using-format-clear").toLowerCase()!=="false")&&f.attributes.usingFormatClear,te=(!h.getAttribute("using-undo")||h.getAttribute("using-undo").toLowerCase()!=="false")&&f.attributes.usingUndo,ht=(!h.getAttribute("using-redo")||h.getAttribute("using-redo").toLowerCase()!=="false")&&f.attributes.usingRedo,d=(!h.getAttribute("using-help")||h.getAttribute("using-help").toLowerCase()!=="false")&&f.attributes.usingHelp;h.getAttribute("using-paragraph-all-style")&&h.getAttribute("using-paragraph-all-style").toLowerCase()==="false"&&(b=!1,P=!1,z=!1,pe=!1),h.getAttribute("using-character-style")&&h.getAttribute("using-character-style").toLowerCase()==="false"&&(_=!1,R=!1,F=!1,Ne=!1,De=!1,lt=!1,ae=!1),h.getAttribute("using-character-size")&&h.getAttribute("using-character-size").toLowerCase()==="false"&&(it=!1,rt=!1,ct=!1),h.getAttribute("using-attach-file")&&h.getAttribute("using-attach-file").toLowerCase()==="false"&&(Se=!1,ze=!1,je=!1,Ue=!1),h.getAttribute("using-do")&&h.getAttribute("using-do").toLowerCase()==="false"&&(te=!1,ht=!1);var y=h.getAttribute("language")&&f.languageSet.hasOwnProperty(h.getAttribute("language"))?h.getAttribute("language"):f.attributes.language,M=ee(h.getAttribute("recode-limit"))?Number(h.getAttribute("recode-limit")):f.attributes.recodeLimit;return{isNoteByMobile:Be,toolPosition:tt,toolDefaultLine:Ge,toolToggleUsing:j,sizeRate:se,noteModeByDevice:be,textareaOriginWidth:E,textareaOriginHeight:s,textareaMaxWidth:l,textareaMaxHeight:k,textareaHeightIsModify:$,placeholderIsVisible:J,placeholderAddTop:ie,placeholderAddLeft:ge,placeholderWidth:Ce,placeholderColor:He,placeholderBackgroundColor:Le,placeholderTitle:Ke,placeholderTextContent:Ze,attFilePreventTypes:et,attFileAcceptTypes:Ve,attFileMaxSize:Mt,attImagePreventTypes:Rt,attImageAcceptTypes:xt,attImageMaxSize:Ht,defaultFontFamilies:v,defaultTextareaFontFamily:B,defaultToolFontFamily:H,defaultTextareaFontSize:U,defaultTextareaLineHeight:q,mainColor:me,colorSet:Q,invertColor:u,usingParagraphStyle:b,usingBold:_,usingUnderline:R,usingItalic:F,usingUl:P,usingOl:z,usingTextAlign:pe,usingAttLink:Se,usingAttFile:ze,usingAttImage:je,usingAttVideo:Ue,usingFontSize:it,usingLetterSpacing:rt,usingLineHeight:ct,usingFontFamily:Ne,usingColorText:De,usingColorBack:lt,usingFormatClear:ae,usingUndo:te,usingRedo:ht,usingHelp:d,language:y,recodeLimit:M}},Et=function(f,h){var I={color1:f.colors.color1,color2:f.colors.color2,color3:f.colors.color3,color4:f.colors.color4,color5:f.colors.color5,color6:f.colors.color6,color7:f.colors.color7,color8:f.colors.color8,color9:f.colors.color9,color10:f.colors.color10,color11:f.colors.color11,color12:f.colors.color12,color13:f.colors.color13,color14:f.colors.color14,color15:f.colors.color15,color16:f.colors.color16,color17:f.colors.color17,color18:f.colors.color18,color19:f.colors.color19,color20:f.colors.color20};if(h.mainColor)I=Qe(h.mainColor);else switch(h.colorSet){case"skyblue":I=Qe("#91c8e4");break;case"blue":I=Qe("#4682a9");break;case"light-red":I=Qe("#fdd2bf");break;case"red":I=Qe("#b61919");break;case"light-green":I=Qe("#a4be7b");break;case"green":I=Qe("#285430");break;case"orange":I=Qe("#f79327");break;case"yellow":I=Qe("#ffe569");break;case"purple":I=Qe("#804674");break;case"brown":I=Qe("#675d50");break;case"black":I=Qe("#272829")}return h.invertColor&&(I.color1=mt(I.color1),I.color2=mt(I.color2),I.color3=mt(I.color3),I.color4=mt(I.color4),I.color5=mt(I.color5),I.color6=mt(I.color6),I.color7=mt(I.color7),I.color10=mt(I.color10),I.color11=mt(I.color11),I.color12=mt(I.color12),I.color13=mt(I.color13)),I},_e=function(f,h,I){if(!h)throw new Error("Please insert variables object in VanillanoteConfig.");if(!I)throw new Error("Please insert colors object in VanillanoteConfig.");return{"template h1":{display:"block","font-size":"2em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h2":{display:"block","font-size":"1.8em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h3":{display:"block","font-size":"1.6em","line-height":"1.2em","font-weight":"bold","margin-top":"1em","margin-bottom":"1em",padding:"0 10px"},"template h4":{display:"block","font-size":"1.4em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h5":{display:"block","font-size":"1.2em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"template h6":{display:"block","font-size":"1em","line-height":"1.2em","font-weight":"bold",margin:"1em 0",padding:"0 10px"},"textarea ul":{display:"block","list-style-type":"disc","padding-left":"40px",margin:"1em 0"},"textarea ol":{display:"block","list-style-type":"decimal","padding-left":"40px",margin:"1em 0"},"textarea li":{display:"list-item","margin-top":"0.5em","margin-bottom":"0.5em",padding:"0 10px"},"textarea p":{display:"block","margin-top":"1em","margin-bottom":"1em",padding:"0 10px"},"textarea div":{display:"block","margin-top":"1em","margin-bottom":"1em",padding:"0 10px"},"textarea span":{display:"inline"},"textarea a":{display:"inline",color:I.color11,"text-decoration":"underline"},template:{width:"100%",height:"100%",position:"relative"},textarea:{width:h.textareaOriginWidth,height:h.textareaOriginHeight,display:"block",margin:"0 auto",outline:"none",cursor:"text","text-align":"left",overflow:"auto","word-wrap":"break-word",resize:h.textareaHeightIsModify===!0?"vertical":"none","max-width":h.textareaMaxWidth,"max-height":h.textareaMaxHeight,"box-shadow":"0 0.5px 1px 0.5px "+I.color7,"background-color":I.color2,"font-size":h.defaultTextareaFontSize+"px","line-height":h.defaultTextareaLineHeight+"px","font-family":h.defaultTextareaFontFamily,color:I.color12,transition:"height 0.5s"},tool:{width:h.textareaOriginWidth,height:h.toolDefaultLine*(50*h.sizeRate)+"px",padding:"2px 0","max-width":h.textareaMaxWidth,display:"block","line-height":50*h.sizeRate+"px",margin:"0 auto","text-align":"left","vertical-align":"middle","box-shadow":"0.25px 0.25px 1px 0.5px "+I.color7,"font-size":16*h.sizeRate+"px","background-color":I.color3,"font-family":h.defaultToolFontFamily},icon:{"font-size":"1.3em","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",color:I.color1},button:{width:50*h.sizeRate+"px",height:45*h.sizeRate+"px",float:"left",display:"inline-block",cursor:"pointer","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,"background-color":I.color4,"font-family":h.defaultToolFontFamily,position:"relative"},select:{width:150*h.sizeRate+"px",height:45*h.sizeRate+"px","background-color":I.color4,float:"left",display:"inline-block",cursor:"pointer","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,color:I.color1,position:"relative"},select_box_a:{"min-width":150*h.sizeRate+"px","background-color":I.color4,display:"none",float:"left",position:"absolute",cursor:"pointer","border-radius":"5px","box-shadow":"0.25px 0.25px 0.1em "+I.color7,opacity:"0.85","z-index":"200"},select_box_b:{width:50*h.sizeRate+"px",display:" none",float:"left",position:"absolute",cursor:"pointer","border-radius":"5px","z-index":"200"},select_box_c:{width:220*h.sizeRate+30+"px",display:"none",padding:"0 "+10*h.sizeRate+"px",float:"left",position:"absolute","border-radius":"5px","box-shadow":"0.25px 0.25px 0.1em "+I.color7,"background-color":I.color4,opacity:"0.95",cursor:"text","text-align":"left","z-index":"200"},select_list:{display:"block",height:45*h.sizeRate+"px",margin:"0 !important","line-height":45*h.sizeRate+"px !important",padding:"3px 5px",cursor:"pointer","text-align":"left",overflow:"hidden"},select_list_button:{width:50*h.sizeRate+"px",height:45*h.sizeRate+"px","background-color":I.color4,display:"inline-block",cursor:"pointer","border-radius":"5px","box-shadow":"0px 0.25px 0.1em "+I.color7},small_input_box:{width:120*h.sizeRate+"px",height:45*h.sizeRate+"px","background-color":I.color4,float:"left",overflow:"hidden",cursor:"pointer",display:"inline-block","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7},small_input:{width:"30%","background-color":"rgba(0,0,0,0)",color:I.color1,border:"none","border-radius":"0","text-align":"right",display:"inline-block",position:"relative",top:"-4px","margin-left":"5px","font-family":h.defaultToolFontFamily,cursor:"text","font-size":"0.8em!important"},"small_input:focus":{outline:"none"},"small_input::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:"0"},"small_input::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"},"small_input[type=number]":{"-moz-appearance":"textfield"},normal_button:{"min-width":50*h.sizeRate+"px",height:45*h.sizeRate+"px","font-size":"0.8em",padding:"0 15px",display:"inline-block",cursor:"pointer","text-align":"center","border-radius":"5px",border:"none","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,color:I.color1,"font-family":h.defaultToolFontFamily,"background-color":I.color4},opacity_button:{"min-width":40*h.sizeRate+"px",height:40*h.sizeRate+"px","font-size":"0.7em",display:"inline-block",cursor:"pointer","text-align":"center","border-radius":"5px",border:"none",color:I.color1,"font-family":h.defaultToolFontFamily,"background-color":Te(I.color4,.5)},small_text_box:{display:"inline-block",padding:"0 10px","font-size":"0.8em",color:I.color1},modal_back:{"background-color":"rgba(0,0,0,0.5)",display:"none",position:"absolute","z-index":"300","font-family":h.defaultToolFontFamily,color:I.color1,"font-size":16*h.sizeRate+"px"},modal_body:{width:"80%",margin:"0 auto",display:"none","text-align":"left",border:"solid 1px "+I.color6,"border-radius":"20px","background-color":I.color2},modal_header:{"text-align":"left","padding-top":20*h.sizeRate+"px","padding-right":10*h.sizeRate+"px","padding-bottom":20*h.sizeRate+"px","padding-left":20*h.sizeRate+"px","margin-bottom":10*h.sizeRate+"px","background-color":I.color4,"border-radius":"20px 20px 0 0","font-weight":"bold","font-size":"1.05em"},modal_footer:{"text-align":"right","margin-top":10*h.sizeRate+"px","padding-top":10*h.sizeRate+"px","padding-right":10*h.sizeRate+"px","padding-bottom":10*h.sizeRate+"px","padding-left":10*h.sizeRate+"px","border-top":"1px solid "+I.color6},modal_explain:{"font-size":"0.95em","text-align":"left","padding-top":20*h.sizeRate+"px","padding-bottom":10*h.sizeRate+"px","padding-left":20*h.sizeRate+"px",display:"inline-block",color:I.color10,"font-family":h.defaultToolFontFamily},modal_input:{display:"block",width:"80%","background-color":"rgba(0,0,0,0)","font-family":h.defaultToolFontFamily,color:I.color10,border:"none","border-radius":"0","border-bottom":"1px solid "+I.color6,"margin-bottom":10*h.sizeRate+"px","margin-left":20*h.sizeRate+"px","font-size":"1.05em",animation:f+"-modal-input 0.7s forwards"},"modal_input:focus":{outline:"none"},"modal_input[readonly]":{"background-color":"rgba(0,0,0,0.1)"},modal_small_input:{display:"inline-block",width:"20%","background-color":"rgba(0,0,0,0)","font-family":h.defaultToolFontFamily,color:I.color10,border:"none","border-radius":"0","border-bottom":"1px solid "+I.color6,"margin-bottom":10*h.sizeRate+"px","margin-left":20*h.sizeRate+"px","font-size":"1.05em",animation:f+"-modal-small-input 1s forwards"},"modal_small_input:focus":{outline:"none"},"modal_small_input::-webkit-inner-spin-button":{appearance:"none","-moz-appearance":"none","-webkit-appearance":"none"},"modal_small_input::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"},"modal_small_input[type=number]":{"-moz-appearance":"textfield"},"modal_small_input[readonly]":{"background-color":I.color4},modal_input_file:{display:"none!important"},att_valid_checktext:{"padding-right":"10px","font-size":"0.7em"},att_link_is_blank_label:{"font-size":"0.95em","text-align":"left",display:"inline-block",height:"25px",cursor:"pointer","margin-top":10*h.sizeRate+"px","margin-bottom":10*h.sizeRate+"px","margin-left":15*h.sizeRate+"px",color:I.color10},input_checkbox:{cursor:"pointer",display:"inline-block",width:"12px",height:"12px","border-radius":"3px",border:"solid "+I.color6,"border-width":"1px 2px 2px 1px",transform:"rotate(0deg)",transition:"transform 0.3s"},"input_checkbox:focus":{outline:"none!important"},"input_checkbox[disabled]":{"background-color":I.color4},smallpx_input:{width:"40px","background-color":"rgba(0,0,0,0)",color:I.color1,border:"none","border-radius":"5px","text-align":"right","font-size":"0.9em!important",display:"inline-block","margin-left":"5px","font-family":h.defaultToolFontFamily},"smallpx_input:focus":{outline:"none"},"smallpx_input::-webkit-inner-spin-button":{appearance:"none","-moz-appearance":"none","-webkit-appearance":"none"},input_radio:{cursor:"pointer",display:"inline-block",width:"12px",height:"12px","border-radius":"50%",border:"solid 1px "+I.color6,transition:"transform 0.4s, background-color 0.6s;"},"input_radio:focus":{outline:"none!important"},"input_radio:checked":{"background-color":I.color5,transform:"rotateY( 180deg )",transition:"transform 0.3s, background-color 0.5s;"},"input_radio[disabled]":{"background-color":I.color4},drag_drop_div:{width:"100%",height:120*h.sizeRate+"px",display:"inline-block","margin-top":"10px","border-radius":"5px","background-color":I.color4,border:"solid 1px"+I.color6,"line-height":130*h.sizeRate+"px","font-size":"0.8em",color:Te(I.color1,.8),"overflow-y":"scroll",cursor:"pointer"},image_view_div:{width:"80%",height:120*h.sizeRate+"px",display:"inline-block","margin-top":"10px","border-radius":"5px","background-color":I.color4,border:"solid 1px"+I.color6,"line-height":130*h.sizeRate+"px","font-size":"0.8em",color:Te(I.color1,.8),cursor:"pointer",overflow:"hidden","white-space":"nowrap","scroll-behavior":"smooth"},color_button:{width:50*h.sizeRate*.5+"px",height:45*h.sizeRate*.5+"px",float:"left",display:"inline-block",cursor:"pointer","text-align":"center","border-radius":"5px","margin-right":"3px","margin-bottom":"5%",border:"1px solid "+I.color1,"box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,position:"relative"},color_input:{display:"inline-block","background-color":"rgba(0,0,0,0)",width:25*h.sizeRate+"px",height:40*h.sizeRate+"px","font-size":"0.7em!important",color:I.color1,border:"none","border-radius":"5px","text-align":"right","margin-right":8*h.sizeRate+"px","margin-left":2*h.sizeRate+"px","font-family":h.defaultToolFontFamily},"color_input:focus":{outline:"none"},"color_input::-webkit-inner-spin-button":{appearance:"none","-moz-appearance":"none","-webkit-appearance":"none"},color_explain:{display:"inline-block",height:25*h.sizeRate+"px",color:I.color1,"font-family":h.defaultToolFontFamily,"font-size":"0.7em"},tooltip:{width:h.textareaOriginWidth,"max-width":h.textareaMaxWidth,margin:"0 auto",padding:"2px 0","background-color":I.color3,border:"solid 1px "+I.color5,height:"0",overflow:"hidden",opacity:"0",transition:"opacity 0.6s, height 0.6s",position:"absolute",left:"50%",transform:"translateX(-50%)","z-index":"100","text-align":"left","font-family":h.defaultToolFontFamily,"font-size":"0.9em"},tooltip_button:{width:50*h.sizeRate*.7+"px",height:45*h.sizeRate*.7+"px",float:"left",display:"inline-block",cursor:"pointer","text-align":"center",margin:"2px 2px","border-radius":"5px","box-shadow":"0.25px 0.25px 2px 0.25px "+I.color7,"background-color":I.color4,position:"relative"},att_link_tooltip_href:{cursor:"pointer",float:"left",padding:"0 10px",color:I.color11,"text-decoration":"underline","font-size":"0.9em","line-height":45*h.sizeRate*.8+"px"},help_main:{"max-height":h.textareaOriginHeight,color:I.color10,"overflow-y":"auto"},placeholder:{width:h.textareaOriginWidth,padding:"10px","background-color":Te(I.color3,.8),color:I.color1,display:"none",position:"absolute","z-index":"100","font-family":h.defaultToolFontFamily},on_button_on:{"background-color":I.color5+"!important","box-shadow":"0.25px 0.25px 0.25px 0.25px "+I.color7},on_active:{"background-color":I.color5+"!important","box-shadow":"0.25px 0.25px 0.25px 0.25px "+I.color7},on_mouseover:{"background-color":I.color5+"!important"},on_mouseout:{"background-color":I.color4+"!important"},on_display_inline:{display:"inline"},on_display_inline_block:{display:"inline-block"},on_display_block:{display:"block"},on_display_none:{display:"none"}}},bt=function(f){f._cssEvents={target_onBeforeClick:function(h){return!0},target_onAfterClick:function(h){},target_onBeforeMouseover:function(h){return!0},target_onAfterMouseover:function(h){},target_onBeforeMouseout:function(h){return!0},target_onAfterMouseout:function(h){},target_onBeforeTouchstart:function(h){return!0},target_onAfterTouchstart:function(h){},target_onBeforeTouchend:function(h){return!0},target_onAfterTouchend:function(h){}},f._elementEvents={textarea_onBeforeClick:function(h){return!0},textarea_onAfterClick:function(h){},textarea_onBeforeFocus:function(h){return!0},textarea_onAfterFocus:function(h){},textarea_onBeforeBlur:function(h){return!0},textarea_onAfterBlur:function(h){},paragraphStyleSelect_onBeforeClick:function(h){return!0},paragraphStyleSelect_onAfterClick:function(h){},toolToggleButton_onBeforeClick:function(h){return!0},toolToggleButton_onAfterClick:function(h){},styleNomal_onBeforeClick:function(h){return!0},styleNomal_onAfterClick:function(h){},styleHeader1_onBeforeClick:function(h){return!0},styleHeader1_onAfterClick:function(h){},styleHeader2_onBeforeClick:function(h){return!0},styleHeader2_onAfterClick:function(h){},styleHeader3_onBeforeClick:function(h){return!0},styleHeader3_onAfterClick:function(h){},styleHeader4_onBeforeClick:function(h){return!0},styleHeader4_onAfterClick:function(h){},styleHeader5_onBeforeClick:function(h){return!0},styleHeader5_onAfterClick:function(h){},styleHeader6_onBeforeClick:function(h){return!0},styleHeader6_onAfterClick:function(h){},boldButton_onBeforeClick:function(h){return!0},boldButton_onAfterClick:function(h){},underlineButton_onBeforeClick:function(h){return!0},underlineButton_onAfterClick:function(h){},italicButton_onBeforeClick:function(h){return!0},italicButton_onAfterClick:function(h){},ulButton_onBeforeClick:function(h){return!0},ulButton_onAfterClick:function(h){},olButton_onBeforeClick:function(h){return!0},olButton_onAfterClick:function(h){},textAlignSelect_onBeforeClick:function(h){return!0},textAlignSelect_onAfterClick:function(h){},textAlignLeft_onBeforeClick:function(h){return!0},textAlignLeft_onAfterClick:function(h){},textAlignCenter_onBeforeClick:function(h){return!0},textAlignCenter_onAfterClick:function(h){},textAlignRight_onBeforeClick:function(h){return!0},textAlignRight_onAfterClick:function(h){},attLinkButton_onBeforeClick:function(h){return!0},attLinkButton_onAfterClick:function(h){},attFileButton_onBeforeClick:function(h){return!0},attFileButton_onAfterClick:function(h){},attImageButton_onBeforeClick:function(h){return!0},attImageButton_onAfterClick:function(h){},attVideoButton_onBeforeClick:function(h){return!0},attVideoButton_onAfterClick:function(h){},fontSizeInputBox_onBeforeClick:function(h){return!0},fontSizeInputBox_onAfterClick:function(h){},fontSizeInput_onBeforeClick:function(h){return!0},fontSizeInput_onAfterClick:function(h){},fontSizeInput_onBeforeInput:function(h){return!0},fontSizeInput_onAfterInput:function(h){},fontSizeInput_onBeforeBlur:function(h){return!0},fontSizeInput_onAfterBlur:function(h){},letterSpacingInputBox_onBeforeClick:function(h){return!0},letterSpacingInputBox_onAfterClick:function(h){},letterSpacingInput_onBeforeClick:function(h){return!0},letterSpacingInput_onAfterClick:function(h){},letterSpacingInput_onBeforeInput:function(h){return!0},letterSpacingInput_onAfterInput:function(h){},letterSpacingInput_onBeforeBlur:function(h){return!0},letterSpacingInput_onAfterBlur:function(h){},lineHeightInputBox_onBeforeClick:function(h){return!0},lineHeightInputBox_onAfterClick:function(h){},lineHeightInput_onBeforeClick:function(h){return!0},lineHeightInput_onAfterClick:function(h){},lineHeightInput_onBeforeInput:function(h){return!0},lineHeightInput_onAfterInput:function(h){},lineHeightInput_onBeforeBlur:function(h){return!0},lineHeightInput_onAfterBlur:function(h){},fontFamilySelect_onBeforeClick:function(h){return!0},fontFamilySelect_onAfterClick:function(h){},colorTextSelect_onBeforeClick:function(h){return!0},colorTextSelect_onAfterClick:function(h){},colorTextSelectBox_onBeforeClick:function(h){return!0},colorTextSelectBox_onAfterClick:function(h){},colorText0_onBeforeClick:function(h){return!0},colorText0_onAfterClick:function(h){},colorText1_onBeforeClick:function(h){return!0},colorText1_onAfterClick:function(h){},colorText2_onBeforeClick:function(h){return!0},colorText2_onAfterClick:function(h){},colorText3_onBeforeClick:function(h){return!0},colorText3_onAfterClick:function(h){},colorText4_onBeforeClick:function(h){return!0},colorText4_onAfterClick:function(h){},colorText5_onBeforeClick:function(h){return!0},colorText5_onAfterClick:function(h){},colorText6_onBeforeClick:function(h){return!0},colorText6_onAfterClick:function(h){},colorText7_onBeforeClick:function(h){return!0},colorText7_onAfterClick:function(h){},colorTextRInput_onBeforeClick:function(h){return!0},colorTextRInput_onAfterClick:function(h){},colorTextRInput_onBeforeInput:function(h){return!0},colorTextRInput_onAfterInput:function(h){},colorTextRInput_onBeforeBlur:function(h){return!0},colorTextRInput_onAfterBlur:function(h){},colorTextGInput_onBeforeClick:function(h){return!0},colorTextGInput_onAfterClick:function(h){},colorTextGInput_onBeforeInput:function(h){return!0},colorTextGInput_onAfterInput:function(h){},colorTextGInput_onBeforeBlur:function(h){return!0},colorTextGInput_onAfterBlur:function(h){},colorTextBInput_onBeforeClick:function(h){return!0},colorTextBInput_onAfterClick:function(h){},colorTextBInput_onBeforeInput:function(h){return!0},colorTextBInput_onAfterInput:function(h){},colorTextBInput_onBeforeBlur:function(h){return!0},colorTextBInput_onAfterBlur:function(h){},colorTextOpacityInput_onBeforeClick:function(h){return!0},colorTextOpacityInput_onAfterClick:function(h){},colorTextOpacityInput_onBeforeInput:function(h){return!0},colorTextOpacityInput_onAfterInput:function(h){},colorTextOpacityInput_onBeforeBlur:function(h){return!0},colorTextOpacityInput_onAfterBlur:function(h){},colorBackSelect_onBeforeClick:function(h){return!0},colorBackSelect_onAfterClick:function(h){},colorBackSelectBox_onBeforeClick:function(h){return!0},colorBackSelectBox_onAfterClick:function(h){},colorBack0_onBeforeClick:function(h){return!0},colorBack0_onAfterClick:function(h){},colorBack1_onBeforeClick:function(h){return!0},colorBack1_onAfterClick:function(h){},colorBack2_onBeforeClick:function(h){return!0},colorBack2_onAfterClick:function(h){},colorBack3_onBeforeClick:function(h){return!0},colorBack3_onAfterClick:function(h){},colorBack4_onBeforeClick:function(h){return!0},colorBack4_onAfterClick:function(h){},colorBack5_onBeforeClick:function(h){return!0},colorBack5_onAfterClick:function(h){},colorBack6_onBeforeClick:function(h){return!0},colorBack6_onAfterClick:function(h){},colorBack7_onBeforeClick:function(h){return!0},colorBack7_onAfterClick:function(h){},colorBackRInput_onBeforeClick:function(h){return!0},colorBackRInput_onAfterClick:function(h){},colorBackRInput_onBeforeInput:function(h){return!0},colorBackRInput_onAfterInput:function(h){},colorBackRInput_onBeforeBlur:function(h){return!0},colorBackRInput_onAfterBlur:function(h){},colorBackGInput_onBeforeClick:function(h){return!0},colorBackGInput_onAfterClick:function(h){},colorBackGInput_onBeforeInput:function(h){return!0},colorBackGInput_onAfterInput:function(h){},colorBackGInput_onBeforeBlur:function(h){return!0},colorBackGInput_onAfterBlur:function(h){},colorBackBInput_onBeforeClick:function(h){return!0},colorBackBInput_onAfterClick:function(h){},colorBackBInput_onBeforeInput:function(h){return!0},colorBackBInput_onAfterInput:function(h){},colorBackBInput_onBeforeBlur:function(h){return!0},colorBackBInput_onAfterBlur:function(h){},colorBackOpacityInput_onBeforeClick:function(h){return!0},colorBackOpacityInput_onAfterClick:function(h){},colorBackOpacityInput_onBeforeInput:function(h){return!0},colorBackOpacityInput_onAfterInput:function(h){},colorBackOpacityInput_onBeforeBlur:function(h){return!0},colorBackOpacityInput_onAfterBlur:function(h){},formatClearButton_onBeforeClick:function(h){return!0},formatClearButton_onAfterClick:function(h){},undoButton_onBeforeClick:function(h){return!0},undoButton_onAfterClick:function(h){},redoButton_onBeforeClick:function(h){return!0},redoButton_onAfterClick:function(h){},helpButton_onBeforeClick:function(h){return!0},helpButton_onAfterClick:function(h){},modalBack_onBeforeClick:function(h){return!0},modalBack_onAfterClick:function(h){},attLinkModal_onBeforeClick:function(h){return!0},attLinkModal_onAfterClick:function(h){},attLinkText_onBeforeInput:function(h){return!0},attLinkText_onAfterInput:function(h){},attLinkText_onBeforeBlur:function(h){return!0},attLinkText_onAfterBlur:function(h){},attLinkHref_onBeforeInput:function(h){return!0},attLinkHref_onAfterInput:function(h){},attLinkHref_onBeforeBlur:function(h){return!0},attLinkHref_onAfterBlur:function(h){},attLinkInsertButton_onBeforeClick:function(h){return!0},attLinkInsertButton_onAfterClick:function(h){},attFileModal_onBeforeClick:function(h){return!0},attFileModal_onAfterClick:function(h){},attFileUploadButton_onBeforeClick:function(h){return!0},attFileUploadButton_onAfterClick:function(h){},attFileUploadDiv_onBeforeDragover:function(h){return!0},attFileUploadDiv_onAfterDragover:function(h){},attFileUploadDiv_onBeforeDrop:function(h){return!0},attFileUploadDiv_onAfterDrop:function(h){},attFileUploadDiv_onBeforeClick:function(h){return!0},attFileUploadDiv_onAfterClick:function(h){},attFileUpload_onBeforeInput:function(h){return!0},attFileUpload_onAfterInput:function(h){},attFileUpload_onBeforeBlur:function(h){return!0},attFileUpload_onAfterBlur:function(h){},attFileInsertButton_onBeforeClick:function(h){return!0},attFileInsertButton_onAfterClick:function(h){},attLinkTooltipEditButton_onBeforeClick:function(h){return!0},attLinkTooltipEditButton_onAfterClick:function(h){},attLinkTooltipUnlinkButton_onBeforeClick:function(h){return!0},attLinkTooltipUnlinkButton_onAfterClick:function(h){},attImageModal_onBeforeClick:function(h){return!0},attImageModal_onAfterClick:function(h){},attImageUploadButtonAndView_onBeforeDragover:function(h){return!0},attImageUploadButtonAndView_onAfterDragover:function(h){},attImageUploadButtonAndView_onBeforeDrop:function(h){return!0},attImageUploadButtonAndView_onAfterDrop:function(h){},attImageUploadButtonAndView_onBeforeClick:function(h){return!0},attImageUploadButtonAndView_onAfterClick:function(h){},attImageViewPreButton_onBeforeClick:function(h){return!0},attImageViewPreButton_onAfterClick:function(h){},attImageViewNextButton_onBeforeClick:function(h){return!0},attImageViewNextButton_onAfterClick:function(h){},attImageUpload_onBeforeInput:function(h){return!0},attImageUpload_onAfterInput:function(h){},attImageUpload_onBeforeBlur:function(h){return!0},attImageUpload_onAfterBlur:function(h){},attImageURL_onBeforeInput:function(h){return!0},attImageURL_onAfterInput:function(h){},attImageURL_onBeforeBlur:function(h){return!0},attImageURL_onAfterBlur:function(h){},attImageInsertButton_onBeforeClick:function(h){return!0},attImageInsertButton_onAfterClick:function(h){},attVideoModal_onBeforeClick:function(h){return!0},attVideoModal_onAfterClick:function(h){},attVideoEmbedId_onBeforeInput:function(h){return!0},attVideoEmbedId_onAfterInput:function(h){},attVideoEmbedId_onBeforeBlur:function(h){return!0},attVideoEmbedId_onAfterBlur:function(h){},attVideoWidth_onBeforeInput:function(h){return!0},attVideoWidth_onAfterInput:function(h){},attVideoWidth_onBeforeBlur:function(h){return!0},attVideoWidth_onAfterBlur:function(h){},attVideoHeight_onBeforeInput:function(h){return!0},attVideoHeight_onAfterInput:function(h){},attVideoHeight_onBeforeBlur:function(h){return!0},attVideoHeight_onAfterBlur:function(h){},attVideoInsertButton_onBeforeClick:function(h){return!0},attVideoInsertButton_onAfterClick:function(h){},attImageAndVideoTooltipWidthInput_onBeforeInput:function(h){return!0},attImageAndVideoTooltipWidthInput_onAfterInput:function(h){},attImageAndVideoTooltipWidthInput_onBeforeBlur:function(h){return!0},attImageAndVideoTooltipWidthInput_onAfterBlur:function(h){},attImageAndVideoTooltipWidthInput_onBeforeKeyup:function(h){return!0},attImageAndVideoTooltipWidthInput_onAfterKeyup:function(h){},attImageAndVideoTooltipFloatRadioNone_onBeforeClick:function(h){return!0},attImageAndVideoTooltipFloatRadioNone_onAfterClick:function(h){},attImageAndVideoTooltipFloatRadioLeft_onBeforeClick:function(h){return!0},attImageAndVideoTooltipFloatRadioLeft_onAfterClick:function(h){},attImageAndVideoTooltipFloatRadioRight_onBeforeClick:function(h){return!0},attImageAndVideoTooltipFloatRadioRight_onAfterClick:function(h){},attImageAndVideoTooltipShapeRadioSquare_onBeforeClick:function(h){return!0},attImageAndVideoTooltipShapeRadioSquare_onAfterClick:function(h){},attImageAndVideoTooltipShapeRadioRadius_onBeforeClick:function(h){return!0},attImageAndVideoTooltipShapeRadioRadius_onAfterClick:function(h){},attImageAndVideoTooltipShapeRadioCircle_onBeforeClick:function(h){return!0},attImageAndVideoTooltipShapeRadioCircle_onAfterClick:function(h){},helpModal_onBeforeClick:function(h){return!0},helpModal_onAfterClick:function(h){},placeholder_onBeforeClick:function(h){return!0},placeholder_onAfterClick:function(h){}}},Yn=function(f,h){(h||document).querySelectorAll("[data-vanillanote]").forEach(function(I){var be,Be=document.getElementById("".concat(I._noteName,"_").concat(I._id,"_styles-sheet"));Be==null||(be=Be.parentElement)===null||be===void 0||be.removeChild(Be),delete f.vanillanoteElements[I._id],function(tt){for(;tt.firstChild;)tt.removeChild(tt.firstChild)}(I)})};function Zt(f){return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},Zt(f)}function Lt(f){return Lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},Lt(f)}var Xe=null,Ut={setAttTempFileValid:function(f){},setAttFileUploadDiv:function(f){},setAttTempImageValid:function(f){},setAttImageUploadAndView:function(f){},createElement:function(f,h,I,be,Be){},createElementBasic:function(f,h,I,be,Be){},createElementButton:function(f,h,I,be,Be){},createElementSelect:function(f,h,I,be,Be){},createElementInput:function(f,h,I){},createElementInputCheckbox:function(f,h,I){},createElementInputRadio:function(f,h,I,be){},createElementRadioLabel:function(f,h,I){},createElementFontFamiliySelect:function(f,h,I,be,Be){},addClickEvent:function(f,h,I){},addMouseoverEvent:function(f,h){},addMouseoutEvent:function(f,h){},addTouchstartEvent:function(f,h){},addTouchendEvent:function(f,h){},onEventDisable:function(f,h){},replaceDifferentBetweenElements:function(f,h,I){},compareAttributesBetweenEl:function(f,h){},compareStylesBetweenEl:function(f,h){},getAttributesObjectFromElement:function(f){},getSpecialTag:function(f,h){},getParentUnitTagElemnt:function(f,h){},getParentTagName:function(f,h){},getObjectEditElementAttributes:function(f,h){},getObjectEditElementCss:function(f,h){},getEditElementTag:function(f){},getPreviousElementsUntilNotTag:function(f,h,I){},getNextElementsUntilNotTag:function(f,h,I){},setTagToggle:function(f,h){},initToggleButtonVariables:function(f){},isInNote:function(f){},getElementReplaceTag:function(f,h){},removeDoubleTag:function(f,h){},getElement:function(f,h,I,be,Be){},setEditNodeAndElement:function(f,h,I){},removeEmptyElment:function(f,h){},editUnitCheck:function(f){},doEditUnitCheck:function(f){},connectObserver:function(f){},isElementInParentBounds:function(f,h){},validCheckAttLink:function(f){},validCheckAttVideo:function(f){},initAttLink:function(f){},initAttFile:function(f){},initAttImage:function(f){},getObjectNoteCss:function(f){},showAlert:function(f,h){},recodeNote:function(f){},closeAllTooltip:function(f){},setVariableButtonTogle:function(f,h){},button_onToggle:function(f,h){},allButtonToggle:function(f){},selectToggle:function(f,h){},closeAllSelectBoxes:function(f){},fontFamilySelectList_onClick:function(f,h){},setEditStyleTag:function(f){},setElementScroll:function(f,h,I){},getCheckSelectBoxesOpened:function(f){},closeAllModal:function(f){},openAttLinkModal:function(f){},openPlaceholder:function(f){},closePlaceholder:function(f){},setAllModalSize:function(f){},setPlaceholderSize:function(f){},setAllToolTipPosition:function(f){},appearAttLinkToolTip:function(f){},appearAttImageAndVideoTooltip:function(f){},setImageAndVideoWidth:function(f){},setAllToolSize:function(f){},doDecreaseTextareaHeight:function(f){},doIncreaseTextareaHeight:function(f){},modifyTextareaScroll:function(f,h){},initTextarea:function(f){},setNewSelection:function(f,h,I,be){},handleSpecialTagSelection:function(f){},setOriginEditSelection:function(f){},setEditSelection:function(f,h){},isValidSelection:function(f){},modifySeletedElements:function(f){},modifySelectedUnitElementTag:function(f,h){},modifySelectedUnitElementStyle:function(f,h){},modifySelectedSingleElement:function(f,h,I,be){},textarea_onBeforeinputSpelling:function(f){},textarea_onKeydownEnter:function(f){}},gn=function(f){var h,I,be,Be,tt,Ge,j,E,s,l,k,$,J,ie,ge,Ce,He,Le,Ke,Ze,et,Ve,Mt,Rt,xt,Ht,v,w,A,x,g,p,B,H,U,q,oe,de,he,se;if(Xe)return Xe;var me=function(P){return Object.freeze(P),Object.getOwnPropertyNames(P).forEach(function(z){var pe=P[z];pe&&Lt(pe)==="object"&&!Object.isFrozen(pe)&&me(pe)}),P},Q=me({START_POSSIBLE_TAG:["P","H1","H2","H3","H4","H5","H6","OL","UL","BR","DIV","PRE","BLOCKQUOTE","TABLE"],UNIT_TAG:["P","H1","H2","H3","H4","H5","H6","LI","DIV","PRE","BLOCKQUOTE","TH","TD"],DOUBLE_TAG:["UL","OL"],NOT_SINGLE_TAG:["P","H1","H2","H3","H4","H5","H6","OL","UL","LI","DIV","PRE","BLOCKQUOTE"],SPECIAL_TAG:["A","IMG","IFRAME"],AUTO_MODIFY_TAG:["B","U"],EMPTY_ABLE_TAG:["BR","IMG","IFRAME","INPUT","I"],CLASS_NAMES:{template:{id:"template",className:"template"},textarea:{id:"textarea",className:"textarea"},tool:{id:"tool",className:"tool"},toolToggleButton:{id:"toolToggleButton",className:"button"},paragraphStyleSelect:{id:"paragraphStyleSelect",className:"select"},paragraphStyleSelectBox:{id:"paragraphStyleSelectBox",className:"select_box_a"},styleNomal:{id:"styleNomal",className:"select_list"},styleHeader1:{id:"styleHeader1",className:"select_list"},styleHeader2:{id:"styleHeader2",className:"select_list"},styleHeader3:{id:"styleHeader3",className:"select_list"},styleHeader4:{id:"styleHeader4",className:"select_list"},styleHeader5:{id:"styleHeader5",className:"select_list"},styleHeader6:{id:"styleHeader6",className:"select_list"},boldButton:{id:"boldButton",className:"button"},underlineButton:{id:"underlineButton",className:"button"},italicButton:{id:"italicButton",className:"button"},ulButton:{id:"ulButton",className:"button"},olButton:{id:"olButton",className:"button"},textAlignSelect:{id:"textAlignSelect",className:"button"},textAlignSelectBox:{id:"textAlignSelectBox",className:"select_box_b"},textAlignLeft:{id:"textAlignLeft",className:"select_list_button"},textAlignCenter:{id:"textAlignCenter",className:"select_list_button"},textAlignRight:{id:"textAlignRight",className:"select_list_button"},attLinkButton:{id:"attLinkButton",className:"button"},attFileButton:{id:"attFileButton",className:"button"},attImageButton:{id:"attImageButton",className:"button"},attVideoButton:{id:"attVideoButton",className:"button"},fontSizeInputBox:{id:"fontSizeInputBox",className:"small_input_box"},fontSizeInput:{id:"fontSizeInput",className:"small_input"},letterSpacingInputBox:{id:"letterSpacingInputBox",className:"small_input_box"},letterSpacingInput:{id:"letterSpacingInput",className:"small_input"},lineHeightInputBox:{id:"lineHeightInputBox",className:"small_input_box"},lineHeightInput:{id:"lineHeightInput",className:"small_input"},fontFamilySelect:{id:"fontFamilySelect",className:"select"},fontFamilySelectBox:{id:"fontFamilySelectBox",className:"select_box_a"},fontFamily:{id:"fontFamily_",className:"select_list"},colorTextSelect:{id:"colorTextSelect",className:"button"},colorTextSelectBox:{id:"colorTextSelectBox",className:"select_box_c"},colorText0:{id:"colorText0",className:"color_button"},colorText1:{id:"colorText1",className:"color_button"},colorText2:{id:"colorText2",className:"color_button"},colorText3:{id:"colorText3",className:"color_button"},colorText4:{id:"colorText4",className:"color_button"},colorText5:{id:"colorText5",className:"color_button"},colorText6:{id:"colorText6",className:"color_button"},colorText7:{id:"colorText7",className:"color_button"},colorTextRInput:{id:"colorTextRInput",className:"color_input"},colorTextRExplain:{id:"colorTextRExplain",className:"color_explain"},colorTextGInput:{id:"colorTextGInput",className:"color_input"},colorTextGExplain:{id:"colorTextGExplain",className:"color_explain"},colorTextBInput:{id:"colorTextBInput",className:"color_input"},colorTextBExplain:{id:"colorTextBExplain",className:"color_explain"},colorTextOpacityInput:{id:"colorTextOpacityInput",className:"color_input"},colorTextOpacityExplain:{id:"colorTextOpacityExplain",className:"color_explain"},colorBackSelect:{id:"colorBackSelect",className:"button"},colorBackSelectBox:{id:"colorTextSelectBox",className:"select_box_c"},colorBack0:{id:"colorBack0",className:"color_button"},colorBack1:{id:"colorBack1",className:"color_button"},colorBack2:{id:"colorBack2",className:"color_button"},colorBack3:{id:"colorBack3",className:"color_button"},colorBack4:{id:"colorBack4",className:"color_button"},colorBack5:{id:"colorBack5",className:"color_button"},colorBack6:{id:"colorBack6",className:"color_button"},colorBack7:{id:"colorBack7",className:"color_button"},colorBackRInput:{id:"colorBackRInput",className:"color_input"},colorBackRExplain:{id:"colorBackRExplain",className:"color_explain"},colorBackGInput:{id:"colorBackGInput",className:"color_input"},colorBackGExplain:{id:"colorBackGExplain",className:"color_explain"},colorBackBInput:{id:"colorBackBInput",className:"color_input"},colorBackBExplain:{id:"colorBackBExplain",className:"color_explain"},colorBackOpacityInput:{id:"colorBackOpacityInput",className:"color_input"},colorBackOpacityExplain:{id:"colorBackOpacityExplain",className:"color_explain"},formatClearButton:{id:"formatClearButton",className:"button"},undoButton:{id:"undoButton",className:"button"},redoButton:{id:"redoButton",className:"button"},helpButton:{id:"helpButton",className:"button"},modalBack:{id:"modalBack",className:"modal_back"},attLinkModal:{id:"attLinkModal",className:"modal_body"},attLinkHeader:{id:"attLinkHeader",className:"modal_header"},attLinkFooter:{id:"attLinkFooter",className:"modal_footer"},attLinkExplain1:{id:"attLinkExplain1",className:"modal_explain"},attLinkText:{id:"attLinkText",className:"modal_input"},attLinkExplain2:{id:"attLinkExplain2",className:"modal_explain"},attLinkHref:{id:"attLinkHref",className:"modal_input"},attLinkIsBlankLabel:{id:"attLinkIsBlankLabel",className:"att_link_is_blank_label"},attLinkIsBlankCheckbox:{id:"attLinkIsBlankCheckbox",className:"input_checkbox"},attLinkValidCheckText:{id:"attLinkValidChecktext",className:"att_valid_checktext"},attLinkValidCheckbox:{id:"attLinkValidCheckbox",className:"input_checkbox"},attLinkInsertButton:{id:"attLinkInsertButton",className:"normal_button"},attLinkTooltip:{id:"attLinkTooltip",className:"tooltip"},attLinkTooltipHref:{id:"attLinkTooltipHref",className:"att_link_tooltip_href"},attLinkTooltipEditButton:{id:"attLinkTooltipEditButton",className:"tooltip_button"},attLinkTooltipUnlinkButton:{id:"attLinkTooltipUnlinkButton",className:"tooltip_button"},attFileModal:{id:"attFileModal",className:"modal_body"},attFileHeader:{id:"attFileHeader",className:"modal_header"},attFilelayout:{id:"attFilelayout",className:"modal_layout"},attFileExplain1:{id:"attFileExplain1",className:"modal_explain"},attFileUploadButton:{id:"attFileUploadButton",className:"normal_button"},attFileUploadDiv:{id:"attFileUploadDiv",className:"drag_drop_div"},attFileUpload:{id:"attFileUpload",className:"modal_input_file"},attFileInsertButton:{id:"attFileInsertButton",className:"normal_button"},attFileFooter:{id:"attFileFooter",className:"modal_footer"},attImageModal:{id:"attImageModal",className:"modal_body"},attImageHeader:{id:"attImageHeader",className:"modal_header"},attImageExplain1:{id:"attImageExplain1",className:"modal_explain"},attImageExplain2:{id:"attImageExplain2",className:"modal_explain"},attImageUploadButtonAndView:{id:"attImageUploadButtonAndView",className:"image_view_div"},attImageViewPreButton:{id:"attImageViewPreButton",className:"opacity_button"},attImageViewNextButton:{id:"attImageViewNextButton",className:"opacity_button"},attImageUpload:{id:"attImageUpload",className:"modal_input_file"},attImageURL:{id:"attImageURL",className:"modal_input"},attImageInsertButton:{id:"attImageInsertButton",className:"normal_button"},attImageFooter:{id:"attImageFooter",className:"modal_footer"},attVideoModal:{id:"attVideoModal",className:"modal_body"},attVideoHeader:{id:"attVideoHeader",className:"modal_header"},attVideoExplain1:{id:"attVideoExplain1",className:"modal_explain"},attVideoEmbedId:{id:"attVideoEmbedId",className:"modal_input"},attVideoExplain2:{id:"attVideoExplain2",className:"modal_explain"},attVideoWidth:{id:"attVideoWidth",className:"modal_small_input"},attVideoHeight:{id:"attVideoHeight",className:"modal_small_input"},attVideoValidCheckText:{id:"attVideoValidCheckText",className:"att_valid_checktext"},attVideoValidCheckbox:{id:"attVideoValidCheckbox",className:"input_checkbox"},attVideoInsertButton:{id:"attVideoInsertButton",className:"normal_button"},attVideoFooter:{id:"attVideoFooter",className:"modal_footer"},attImageAndVideoTooltip:{id:"attImageAndVideoTooltip",className:"tooltip"},attImageAndVideoTooltipWidthInput:{id:"attImageAndVideoTooltipWidthInput",className:"smallpx_input"},attImageAndVideoTooltipFloatRadioNone:{id:"attImageAndVideoTooltipFloatRadioNone",className:"input_radio"},attImageAndVideoTooltipFloatRadioLeft:{id:"attImageAndVideoTooltipFloatRadioLeft",className:"input_radio"},attImageAndVideoTooltipFloatRadioRight:{id:"attImageAndVideoTooltipFloatRadioRight",className:"input_radio"},attImageAndVideoTooltipShapeRadioSquare:{id:"attImageAndVideoTooltipShapeRadioSquare",className:"input_radio"},attImageAndVideoTooltipShapeRadioRadius:{id:"attImageAndVideoTooltipShapeRadioRadius",className:"input_radio"},attImageAndVideoTooltipShapeRadioCircle:{id:"attImageAndVideoTooltipShapeRadioCircle",className:"input_radio"},helpModal:{id:"helpModal",className:"modal_body"},helpMain:{id:"helpMain",className:"help_main"},helpHeader:{id:"helpHeader",className:"modal_header"},helpFooter:{id:"helpFooter",className:"modal_footer"},placeholder:{id:"placeholder",className:"placeholder"}}});f||(f=Rn());var u=f.colors,b=f.attributes,_=f.variables,R=f.languageSet,F=f.useGoogleIcon;return(Xe={consts:Q,colors:u,attributes:b,variables:_,languageSet:R,iconSpanElement:{toolToggleButtonIcon:(h=f.iconSpanElement.toolToggleButtonIcon)!==null&&h!==void 0?h:null,paragraphStyleSelectIcon:(I=f.iconSpanElement.paragraphStyleSelectIcon)!==null&&I!==void 0?I:null,boldButtonIcon:(be=f.iconSpanElement.boldButtonIcon)!==null&&be!==void 0?be:null,underlineButtonIcon:(Be=f.iconSpanElement.underlineButtonIcon)!==null&&Be!==void 0?Be:null,italicButtonIcon:(tt=f.iconSpanElement.italicButtonIcon)!==null&&tt!==void 0?tt:null,ulButtonIcon:(Ge=f.iconSpanElement.ulButtonIcon)!==null&&Ge!==void 0?Ge:null,olButtonIcon:(j=f.iconSpanElement.olButtonIcon)!==null&&j!==void 0?j:null,textAlignSelectIcon:(E=f.iconSpanElement.textAlignSelectIcon)!==null&&E!==void 0?E:null,textAlignLeftButtonIcon:(s=f.iconSpanElement.textAlignLeftButtonIcon)!==null&&s!==void 0?s:null,textAlignCenterButtonIcon:(l=f.iconSpanElement.textAlignCenterButtonIcon)!==null&&l!==void 0?l:null,textAlignRightButtonIcon:(k=f.iconSpanElement.textAlignRightButtonIcon)!==null&&k!==void 0?k:null,attLinkButtonIcon:($=f.iconSpanElement.attLinkButtonIcon)!==null&&$!==void 0?$:null,attLinkInsertButtonIcon:(J=f.iconSpanElement.attLinkInsertButtonIcon)!==null&&J!==void 0?J:null,attLinkTooltipEditButtonIcon:(ie=f.iconSpanElement.attLinkTooltipEditButtonIcon)!==null&&ie!==void 0?ie:null,attLinkTooltipUnlinkButtonIcon:(ge=f.iconSpanElement.attLinkTooltipUnlinkButtonIcon)!==null&&ge!==void 0?ge:null,attFileButtonIcon:(Ce=f.iconSpanElement.attFileButtonIcon)!==null&&Ce!==void 0?Ce:null,attFileInsertButtonIcon:(He=f.iconSpanElement.attFileInsertButtonIcon)!==null&&He!==void 0?He:null,attImageButtonIcon:(Le=f.iconSpanElement.attImageButtonIcon)!==null&&Le!==void 0?Le:null,attImageViewPreButtonIcon:(Ke=f.iconSpanElement.attImageViewPreButtonIcon)!==null&&Ke!==void 0?Ke:null,attImageViewNextButtonIcon:(Ze=f.iconSpanElement.attImageViewNextButtonIcon)!==null&&Ze!==void 0?Ze:null,attImageInsertButtonIcon:(et=f.iconSpanElement.attImageInsertButtonIcon)!==null&&et!==void 0?et:null,attVideoButtonIcon:(Ve=f.iconSpanElement.attVideoButtonIcon)!==null&&Ve!==void 0?Ve:null,attVideoWidthTextIcon:(Mt=f.iconSpanElement.attVideoWidthTextIcon)!==null&&Mt!==void 0?Mt:null,attVideoHeightTextIcon:(Rt=f.iconSpanElement.attVideoHeightTextIcon)!==null&&Rt!==void 0?Rt:null,attVideoInsertButtonIcon:(xt=f.iconSpanElement.attVideoInsertButtonIcon)!==null&&xt!==void 0?xt:null,attImageAndVideoTooltipFloatRadioNoneLabelIcon:(Ht=f.iconSpanElement.attImageAndVideoTooltipFloatRadioNoneLabelIcon)!==null&&Ht!==void 0?Ht:null,attImageAndVideoTooltipFloatRadioLeftLabelIcon:(v=f.iconSpanElement.attImageAndVideoTooltipFloatRadioLeftLabelIcon)!==null&&v!==void 0?v:null,attImageAndVideoTooltipFloatRadioRightLabelIcon:(w=f.iconSpanElement.attImageAndVideoTooltipFloatRadioRightLabelIcon)!==null&&w!==void 0?w:null,attImageAndVideoTooltipShapeRadioSquareLabelIcon:(A=f.iconSpanElement.attImageAndVideoTooltipShapeRadioSquareLabelIcon)!==null&&A!==void 0?A:null,attImageAndVideoTooltipShapeRadioRadiusLabelIcon:(x=f.iconSpanElement.attImageAndVideoTooltipShapeRadioRadiusLabelIcon)!==null&&x!==void 0?x:null,attImageAndVideoTooltipShapeRadioCircleLabelIcon:(g=f.iconSpanElement.attImageAndVideoTooltipShapeRadioCircleLabelIcon)!==null&&g!==void 0?g:null,fontSizeInputBoxIcon:(p=f.iconSpanElement.fontSizeInputBoxIcon)!==null&&p!==void 0?p:null,letterSpacingInputBoxIcon:(B=f.iconSpanElement.letterSpacingInputBoxIcon)!==null&&B!==void 0?B:null,lineHeightInputBoxIcon:(H=f.iconSpanElement.lineHeightInputBoxIcon)!==null&&H!==void 0?H:null,colorTextSelectIcon:(U=f.iconSpanElement.colorTextSelectIcon)!==null&&U!==void 0?U:null,colorBackSelectIcon:(q=f.iconSpanElement.colorBackSelectIcon)!==null&&q!==void 0?q:null,formatClearButtonIcon:(oe=f.iconSpanElement.formatClearButtonIcon)!==null&&oe!==void 0?oe:null,undoButtonIcon:(de=f.iconSpanElement.undoButtonIcon)!==null&&de!==void 0?de:null,redoButtonIcon:(he=f.iconSpanElement.redoButtonIcon)!==null&&he!==void 0?he:null,helpButtonIcon:(se=f.iconSpanElement.helpButtonIcon)!==null&&se!==void 0?se:null},useGoogleIcon:F===!0,events:{documentEvents:{noteObserver:null,selectionchange:null,keydown:null,resize:null,resizeViewport:null},cssEvents:{target_onClick:null,target_onMouseover:null,target_onMouseout:null,target_onTouchstart:null,target_onTouchend:null},elementEvents:{toolToggleButton_onClick:null,paragraphStyleSelect_onClick:null,styleNomal_onClick:null,styleHeader1_onClick:null,styleHeader2_onClick:null,styleHeader3_onClick:null,styleHeader4_onClick:null,styleHeader5_onClick:null,styleHeader6_onClick:null,boldButton_onClick:null,underlineButton_onClick:null,italicButton_onClick:null,ulButton_onClick:null,olButton_onClick:null,textAlignSelect_onClick:null,textAlignLeft_onClick:null,textAlignCenter_onClick:null,textAlignRight_onClick:null,attLinkButton_onClick:null,attLinkModal_onClick:null,attLinkText_onInput:null,attLinkText_onBlur:null,attLinkHref_onInput:null,attLinkHref_onBlur:null,attLinkInsertButton_onClick:null,attLinkTooltipEditButton_onClick:null,attLinkTooltipUnlinkButton_onClick:null,attFileButton_onClick:null,attFileModal_onClick:null,attFileUploadButton_onClick:null,attFileUploadDiv_onDragover:null,attFileUploadDiv_onDrop:null,attFileUploadDiv_onClick:null,attFileUpload_onInput:null,attFileUpload_onBlur:null,attFileInsertButton_onClick:null,attImageButton_onClick:null,attImageModal_onClick:null,attImageUploadButtonAndView_onDragover:null,attImageUploadButtonAndView_onDrop:null,attImageUploadButtonAndView_onClick:null,attImageViewPreButton_onClick:null,attImageViewNextButton_onClick:null,attImageUpload_onInput:null,attImageUpload_onBlur:null,attImageURL_onInput:null,attImageURL_onBlur:null,attImageInsertButton_onClick:null,attVideoButton_onClick:null,attVideoModal_onClick:null,attVideoEmbedId_onInput:null,attVideoEmbedId_onBlur:null,attVideoWidth_onInput:null,attVideoWidth_onBlur:null,attVideoHeight_onInput:null,attVideoHeight_onBlur:null,attVideoInsertButton_onClick:null,attImageAndVideoTooltipWidthInput_onInput:null,attImageAndVideoTooltipWidthInput_onBlur:null,attImageAndVideoTooltipWidthInput_onKeyup:null,attImageAndVideoTooltipFloatRadioNone_onClick:null,attImageAndVideoTooltipFloatRadioLeft_onClick:null,attImageAndVideoTooltipFloatRadioRight_onClick:null,attImageAndVideoTooltipShapeRadioSquare_onClick:null,attImageAndVideoTooltipShapeRadioRadius_onClick:null,attImageAndVideoTooltipShapeRadioCircle_onClick:null,fontSizeInputBox_onClick:null,fontSizeInput_onClick:null,fontSizeInput_onInput:null,fontSizeInput_onBlur:null,letterSpacingInputBox_onClick:null,letterSpacingInput_onClick:null,letterSpacingInput_onInput:null,letterSpacingInput_onBlur:null,lineHeightInputBox_onClick:null,lineHeightInputBox_onInput:null,lineHeightInput_onClick:null,lineHeightInput_onInput:null,lineHeightInput_onBlur:null,fontFamilySelect_onClick:null,colorTextSelect_onClick:null,colorTextSelectBox_onClick:null,colorTextRInput_onClick:null,colorTextRInput_onInput:null,colorTextRInput_onBlur:null,colorTextGInput_onClick:null,colorTextGInput_onInput:null,colorTextGInput_onBlur:null,colorTextBInput_onClick:null,colorTextBInput_onInput:null,colorTextBInput_onBlur:null,colorTextOpacityInput_onClick:null,colorTextOpacityInput_onInput:null,colorTextOpacityInput_onBlur:null,colorText0_onClick:null,colorText1_onClick:null,colorText2_onClick:null,colorText3_onClick:null,colorText4_onClick:null,colorText5_onClick:null,colorText6_onClick:null,colorText7_onClick:null,colorBackSelect_onClick:null,colorBackSelectBox_onClick:null,colorBackRInput_onClick:null,colorBackRInput_onInput:null,colorBackRInput_onBlur:null,colorBackGInput_onClick:null,colorBackGInput_onInput:null,colorBackGInput_onBlur:null,colorBackBInput_onClick:null,colorBackBInput_onInput:null,colorBackBInput_onBlur:null,colorBackOpacityInput_onClick:null,colorBackOpacityInput_onInput:null,colorBackOpacityInput_onBlur:null,colorBack0_onClick:null,colorBack1_onClick:null,colorBack2_onClick:null,colorBack3_onClick:null,colorBack4_onClick:null,colorBack5_onClick:null,colorBack6_onClick:null,colorBack7_onClick:null,formatClearButton_onClick:null,undoButton_onClick:null,redoButton_onClick:null,helpButton_onClick:null,helpModal_onClick:null,modalBack_onClick:null,placeholder_onClick:null,textarea_onClick:null,textarea_onFocus:null,textarea_onBlur:null,textarea_onKeydown:null,textarea_onKeyup:null,textarea_onBeforeinput:null}},vanillanoteElements:{},getNote:function(P){return null},beforeAlert:function(P){return!0},init:function(){gt()},mountNote:function(P){},destroy:function(){yn()},unmountNote:function(P){},_initialized:!1}).mountNote=function(P){(function(z,pe,Se){var ze=(Se||document).querySelectorAll("[data-vanillanote]");ze.length<=0||(ze.forEach(function(je){var Ue=je.getAttribute("data-id");if(!Ue)throw new Error("The data-id attribute of vanillanote is required.");if(Ue&&Object.keys(z.vanillanoteElements).includes(Ue))throw new Error("".concat(Ue," is a note that has already been created."))}),ze.forEach(function(je){var Ue=je.getAttribute("data-id");if(Object.keys(z.vanillanoteElements).includes(Ue))throw new Error("Duplicate vanillanote id detected: ".concat(Ue));var it=je;it.setAttribute("id",c(z.variables.noteName,Ue,"note")),it.setAttribute("class",m(z.variables.noteName,Ue,"note")),it.setAttribute("data-note-id",Ue),it._noteName=z.variables.noteName,it._id=Ue,z.vanillanoteElements[Ue]=function(rt,ct,Ne){var De=nn(rt,Ne);Ne._colors=Et(rt,De);var lt=_e(Ne._noteName,De,Ne._colors),ae="".concat(Ne._noteName,"_").concat(Ne._id,"_styles-sheet");if(!document.getElementById(ae)){var te="";Object.keys(lt).forEach(function(d){te=te+function(y,M,S,N){return"."+c(y,M,S)+" {"+Ee(N)+"}"}(Ne._noteName,Ne._id,d,lt[d])+`
50
+ `});var ht=document.createElement("style");ht.id=ae,ht.textContent=te.trim(),document.head.appendChild(ht)}return Ne._selection={editSelection:null,editRange:null,startOffset:null,endOffset:null,editStartNode:null,editEndNode:null,editStartElement:null,editEndElement:null,editStartUnitElement:null,editEndUnitElement:null,editDragUnitElement:[],setEditStyleTagToggle:0},Ne._attributes={isNoteByMobile:De.isNoteByMobile,language:De.language,sizeRate:De.sizeRate,toolPosition:De.toolPosition,toolToggleUsing:De.toolToggleUsing,toolDefaultLine:De.toolDefaultLine,textareaOriginHeight:De.textareaOriginHeight,defaultTextareaFontSize:De.defaultTextareaFontSize,defaultTextareaLineHeight:De.defaultTextareaLineHeight,defaultTextareaFontFamily:De.defaultTextareaFontFamily,defaultFontFamilies:De.defaultFontFamilies,attFilePreventTypes:De.attFilePreventTypes,attFileAcceptTypes:De.attFileAcceptTypes,attFileMaxSize:De.attFileMaxSize,attImagePreventTypes:De.attImagePreventTypes,attImageAcceptTypes:De.attImageAcceptTypes,attImageMaxSize:De.attImageMaxSize,placeholderIsVisible:De.placeholderIsVisible,placeholderWidth:De.placeholderWidth,placeholderAddTop:De.placeholderAddTop,placeholderAddLeft:De.placeholderAddLeft,placeholderTitle:De.placeholderTitle,placeholderTextContent:De.placeholderTextContent},Ne._status={toolToggle:!1,boldToggle:!1,underlineToggle:!1,italicToggle:!1,ulToggle:!1,olToggle:!1,fontSize:De.defaultTextareaFontSize,letterSpacing:0,lineHeight:De.defaultTextareaLineHeight,fontFamily:De.defaultTextareaFontFamily,colorTextR:Ie(Ne._colors.color12,"R"),colorTextG:Ie(Ne._colors.color12,"G"),colorTextB:Ie(Ne._colors.color12,"B"),colorTextO:"1",colorTextRGB:Ne._colors.color12,colorTextOpacity:"1",colorBackR:Ie(Ne._colors.color13,"R"),colorBackG:Ie(Ne._colors.color13,"G"),colorBackB:Ie(Ne._colors.color13,"B"),colorBackO:"0",colorBackRGB:Ne._colors.color13,colorBackOpacity:"0"},Ne._recodes={recodeNotes:[],recodeCount:-1,recodeLimit:De.recodeLimit},Ne._attTempFiles={},Ne._attFiles={},Ne._attTempImages={},Ne._attImages={},bt(Ne),ft(rt,ct,Ne,De),Ne.getNoteData=function(){var d=Ne._elements.textarea,y=d.querySelectorAll("[uuid]"),M=d.querySelectorAll("img[data-note-id]"),S=d.querySelectorAll("a[data-note-id]"),N=d.querySelectorAll("iframe[data-note-id]"),O=Dt(Dt({},Ne._attFiles),Ne._attImages),T={},G={};Object.keys(O).forEach(function(le){Array.from(y).some(function(qe){return qe.getAttribute("uuid")===le})&&(T[le]=O[le]),Array.from(M).some(function(qe){return qe.getAttribute("uuid")===le})&&(G[le]=O[le])});var V=[];S.forEach(function(le){V.push({text:le.textContent||"",href:le.getAttribute("href")||"",target:le.getAttribute("target")||void 0})});var Z=[];M.forEach(function(le){Z.push({src:le.getAttribute("src")||"",uuid:le.getAttribute("uuid")||void 0})});var ne=[];Object.keys(T).forEach(function(le){ne.push({uuid:le,name:T[le].name})});var Y=[];return N.forEach(function(le){var qe=le.getAttribute("src")||"";qe.includes("youtube.com/embed")&&Y.push({src:qe,width:le.style.width||le.getAttribute("width")||void 0,height:le.style.height||le.getAttribute("height")||void 0})}),{html:d.innerHTML,plainText:d.textContent||"",links:V,files:ne,images:Z,videos:Y,fileObjects:T,imageObjects:G}},Ne.setNoteData=function(d){if(d){var y=Ne._elements.textarea;y&&(y.innerHTML="",Ne._attFiles={},Ne._attImages={},y.innerHTML=d.html,Object.entries(d.fileObjects).forEach(function(M){var S=Ye(M,2),N=S[0],O=S[1];Ne._attFiles[N]=O,y.querySelectorAll('a[uuid="'.concat(N,'"]')).forEach(function(T){T.setAttribute("href",URL.createObjectURL(O)),T.setAttribute("download",O.name)})}),Object.entries(d.imageObjects).forEach(function(M){var S=Ye(M,2),N=S[0],O=S[1];Ne._attImages[N]=O,y.querySelectorAll('img[uuid="'.concat(N,'"]')).forEach(function(T){T.setAttribute("src",URL.createObjectURL(O))})}))}},Ne}(z,pe,it)}),setTimeout(function(){Object.keys(z.vanillanoteElements).forEach(function(je){z.vanillanoteElements[je]._elements.template.removeAttribute("style")}),z.events.documentEvents.resize()},z.variables.loadInterval))})(Xe,Ut,P)},Xe.unmountNote=function(P){Yn(Xe,P)},Xe},gt=function(){if(Xe&&!Xe._initialized){Xe._initialized=!0,function(j,E){E.setAttTempFileValid=function(s){for(var l=new Object,k=Object.keys(s._attTempFiles),$=0;$<k.length;$++)s._attributes.attFileAcceptTypes.length>0?s._attributes.attFileAcceptTypes.includes(s._attTempFiles[k[$]].type)&&(l[k[$]]=s._attTempFiles[k[$]]):l[k[$]]=s._attTempFiles[k[$]],l[k[$]]&&(s._attributes.attFilePreventTypes.includes(l[k[$]].type)?(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attPreventType,j.beforeAlert),delete l[k[$]]):l[k[$]].size>=s._attributes.attFileMaxSize&&(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attOverSize,j.beforeAlert),delete l[k[$]]));s._attTempFiles=l},E.setAttFileUploadDiv=function(s){if(s._attTempFiles.length<=0)return s._elements.attFileUploadDiv.style.removeProperty("line-height"),void(s._elements.attFileUploadDiv.textContent=j.languageSet[s._attributes.language].attFileUploadDiv);s._elements.attFileUploadDiv.style.lineHeight="unset",s._elements.attFileUploadDiv.replaceChildren();for(var l,k=Object.keys(s._attTempFiles),$=0;$<k.length;$++)l=E.getElement(s._attTempFiles[k[$]].name,"P","display:block;padding:0.5em 0;",{title:j.languageSet[s._attributes.language].attFileListTooltip,uuid:k[$]},s),s._elements.attFileUploadDiv.appendChild(l)},E.setAttTempImageValid=function(s){for(var l=new Object,k=Object.keys(s._attTempImages),$=0;$<k.length;$++)s._attributes.attImageAcceptTypes.length>0?s._attributes.attImageAcceptTypes.includes(s._attTempImages[k[$]].type)&&(l[k[$]]=s._attTempImages[k[$]]):l[k[$]]=s._attTempImages[k[$]],l[k[$]]&&(s._attributes.attImagePreventTypes.includes(l[k[$]].type)?(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attPreventType,j.beforeAlert),delete l[k[$]]):l[k[$]].size>=s._attributes.attImageMaxSize&&(E.showAlert("["+l[k[$]].name+"] "+j.languageSet[s._attributes.language].attOverSize,j.beforeAlert),delete l[k[$]]));s._attTempImages=l},E.setAttImageUploadAndView=function(s){var l=Object.keys(s._attTempImages);if(!(l.length<=0)){var k,$;s._elements.attImageUploadButtonAndView.replaceChildren();for(var J=0;J<l.length;J++)k=s._attTempImages[l[J]],($=document.createElement("img")).src=URL.createObjectURL(k),$.style.width="auto",$.style.height="100%",$.style.display="inline-block",$.style.margin="0 5px",s._elements.attImageUploadButtonAndView.appendChild($);s._elements.attImageURL.value="",s._elements.attImageURL.setAttribute("readonly","true")}},E.createElement=function(s,l,k,$,J){var ie,ge=document.createElement(s);if(k!==""&&ge.setAttribute("id",c(l._noteName,l._id,k)),ge.setAttribute("data-note-id",l._id),ge.setAttribute("class",m(l._noteName,l._id,$)),J&&Zt(J)==="object"&&Object.keys(J).length!==0)if(J.isIcon){var Ce=document.createElement("span");Ce.setAttribute("class","material-symbols-rounded "+C(l._noteName)+" "+D(l._noteName)+" "+L(l._noteName)+" "+c(l._noteName,l._id,"icon")),ie=document.createTextNode(J.text),Ce.appendChild(ie),J.iconStyle&&Ce.setAttribute("style",J.iconStyle),Ce.setAttribute("data-note-id",l._id),ge.appendChild(Ce)}else ie=document.createTextNode(J.text),ge.appendChild(ie);return ge},E.createElementBasic=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return E.addClickEvent(ie,k,l),ie},E.createElementButton=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return ie.classList.add(D(l._noteName)),ie.classList.add(L(l._noteName)),E.addClickEvent(ie,k,l),E.addMouseoverEvent(ie,l),E.addMouseoutEvent(ie,l),E.addTouchstartEvent(ie,l),E.addTouchendEvent(ie,l),ie},E.createElementSelect=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return ie.classList.add(D(l._noteName)),ie.classList.add(L(l._noteName)),ie.setAttribute("type","select"),E.addClickEvent(ie,k,l),E.addMouseoverEvent(ie,l),E.addMouseoutEvent(ie,l),E.addTouchstartEvent(ie,l),E.addTouchendEvent(ie,l),ie},E.createElementInput=function(s,l,k){var $=E.createElement("input",s,l,k);return $.setAttribute("name",c(s._noteName,s._id,l)),$.setAttribute("autocapitalize","none"),$.setAttribute("placeholder",""),$.addEventListener("input",function(J){s._elementEvents[l+"_onBeforeInput"](J)&&(j.events.elementEvents[l+"_onInput"](J),s._elementEvents[l+"_onAfterInput"](J),J.stopImmediatePropagation())}),$.addEventListener("blur",function(J){s._elementEvents[l+"_onBeforeBlur"](J)&&(j.events.elementEvents[l+"_onBlur"](J),s._elementEvents[l+"_onAfterBlur"](J),J.stopImmediatePropagation())}),$},E.createElementInputCheckbox=function(s,l,k){var $=E.createElement("input",s,l,k);return $.setAttribute("name",c(s._noteName,s._id,l)),$.setAttribute("placeholder",""),$.setAttribute("type","checkbox"),$},E.createElementInputRadio=function(s,l,k,$){var J=E.createElement("input",s,l,k);return J.setAttribute("name",$),J.setAttribute("placeholder",""),J.setAttribute("type","radio"),E.addClickEvent(J,l,s),J},E.createElementRadioLabel=function(s,l,k){var $=document.createElement("label");$.setAttribute("for",l),$.setAttribute("style","display:inline-block;width:30px;position:relative;margin-left:3px;;margin-left:3px;");var J=document.createElement("span");return J.setAttribute("class","material-symbols-rounded"),J.setAttribute("style","font-size:1.3em;position:absolute;bottom:-6px;cursor:pointer;color:"+Pe(s._colors.color1)),J.textContent=k,$.appendChild(J),$},E.createElementFontFamiliySelect=function(s,l,k,$,J){var ie=E.createElement(s,l,k,$,J);return ie.classList.add(D(l._noteName)),ie.classList.add(L(l._noteName)),l._elementEvents[k+"_onBeforeClick"]=function(ge){return!0},j.events.elementEvents[l._id+"_"+k+"_onClick"]=function(ge){E.fontFamilySelectList_onClick(ge,l),E.selectToggle(ge.target,l),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):E.modifySelectedSingleElement(l,E.getObjectNoteCss(l))},l._elementEvents[k+"_onAfterClick"]=function(ge){},ie.addEventListener("click",function(ge){l._cssEvents.target_onBeforeClick(ge)&&ge.target.classList.contains(D(l._noteName))&&(j.events.cssEvents.target_onClick(ge),l._cssEvents.target_onAfterClick(ge)),l._elementEvents[k+"_onBeforeClick"](ge)&&(j.events.elementEvents[l._id+"_"+k+"_onClick"](ge),l._elementEvents[k+"_onAfterClick"](ge),ge.stopImmediatePropagation())}),E.addMouseoverEvent(ie,l),E.addMouseoutEvent(ie,l),E.addTouchstartEvent(ie,l),E.addTouchendEvent(ie,l),ie},E.addClickEvent=function(s,l,k){l==="textarea"?s.addEventListener("click",function($){k._elementEvents[l+"_onBeforeClick"]($)&&(j.events.elementEvents[l+"_onClick"]($),k._elementEvents[l+"_onAfterClick"]($),$.stopImmediatePropagation())}):s.addEventListener("click",function($){k._cssEvents.target_onBeforeClick($)&&$.target.classList.contains(D(k._noteName))&&(j.events.cssEvents.target_onClick($),k._cssEvents.target_onAfterClick($)),k._elementEvents[l+"_onBeforeClick"]($)&&(j.events.elementEvents[l+"_onClick"]($),k._elementEvents[l+"_onAfterClick"]($),$.stopImmediatePropagation())})},E.addMouseoverEvent=function(s,l){s.addEventListener("mouseover",function(k){l._cssEvents.target_onBeforeMouseover(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onMouseover(k),l._cssEvents.target_onAfterMouseover(k),k.stopImmediatePropagation())})},E.addMouseoutEvent=function(s,l){s.addEventListener("mouseout",function(k){l._cssEvents.target_onBeforeMouseout(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onMouseout(k),l._cssEvents.target_onAfterMouseout(k),k.stopImmediatePropagation())})},E.addTouchstartEvent=function(s,l){s.addEventListener("touchstart",function(k){l._cssEvents.target_onBeforeTouchstart(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onTouchstart(k),l._cssEvents.target_onAfterTouchstart(k),k.stopImmediatePropagation())})},E.addTouchendEvent=function(s,l){s.addEventListener("touchend",function(k){l._cssEvents.target_onBeforeTouchend(k)&&k.target.classList.contains(L(l._noteName))&&(j.events.cssEvents.target_onTouchend(k),l._cssEvents.target_onAfterTouchend(k),k.stopImmediatePropagation())})}}(Xe,Ut),function(j,E){E.onEventDisable=function(s,l){var k;k=l==="resize"?s.variables.resizeInterval:s.variables.inputInterval,s.variables.canEvent=!1,setTimeout(function(){s.variables.canEvent=!0},k)},E.replaceDifferentBetweenElements=function(s,l,k){var $,J,ie,ge,Ce=function(He,Le,Ke){if(!(Le.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&Ke.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&He.consts.NOT_SINGLE_TAG.indexOf(Le.tagName)>=0&&He.consts.NOT_SINGLE_TAG.indexOf(Ke.tagName)>=0)||Le.nodeType===Ke.nodeType&&Le.tagName===Ke.tagName&&E.compareAttributesBetweenEl(Le,Ke)&&E.compareStylesBetweenEl(Le,Ke))if(!(Le.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&Ke.tagName!==(He.variables.noteName+"-textarea").toUpperCase()&&He.consts.NOT_SINGLE_TAG.indexOf(Le.tagName)<0&&He.consts.NOT_SINGLE_TAG.indexOf(Ke.tagName)<0)||Le.nodeType===Ke.nodeType&&Le.tagName===Ke.tagName&&Le.textContent===Ke.textContent&&E.compareAttributesBetweenEl(Le,Ke)&&E.compareStylesBetweenEl(Le,Ke))for(var Ze=Array.prototype.slice.call(Le.childNodes),et=Array.prototype.slice.call(Ke.childNodes),Ve=Math.max(Ze.length,et.length),Mt=0;Mt<Ve;Mt++){var Rt=Ze[Mt],xt=et[Mt];!Rt&&xt?(ie=xt.cloneNode(!0),Le.appendChild(ie),$||($=ie),J=ie):Rt&&!xt?Le.removeChild(Rt):Ce(He,Rt,xt)}else ie=Ke.cloneNode(!0),Le.parentNode.replaceChild(ie,Le),$||($=ie),J=ie;else ie=Ke.cloneNode(!0),Le.parentNode.replaceChild(ie,Le),$||($=ie),J=ie};Ce(s,l,k),$&&(J||(J=$),ge=J instanceof Element?J.childNodes.length:J.nodeType===3?J.textContent.length:0,E.setNewSelection($,0,J,ge))},E.compareAttributesBetweenEl=function(s,l){var k=E.getAttributesObjectFromElement(s),$=E.getAttributesObjectFromElement(l);return xe(k,$)},E.compareStylesBetweenEl=function(s,l){var k=s.cssText,$=l.cssText;return xe(ve(k),ve($))},E.getAttributesObjectFromElement=function(s){var l=new Object;if(!s.attributes)return l;for(var k=0;k<s.attributes.length;k++)l[s.attributes[k].nodeName]=s.attributes[k].nodeValue;return l},E.getSpecialTag=function(s,l){for(var k=s,$=k.tagName;k&&j.consts.UNIT_TAG.indexOf($)<0;){if(j.consts.SPECIAL_TAG.indexOf($)>=0)return $;if(!(k=k.parentNode))break;$=k.tagName}return"SPAN"},E.getParentUnitTagElemnt=function(s,l){for(var k=s;k&&!(j.consts.UNIT_TAG.indexOf(k.tagName)>=0);){if(j.consts.DOUBLE_TAG.indexOf(k.tagName)>=0){k=k.lastElementChild;break}if(k.tagName===(l._noteName+"-textarea").toUpperCase())return null;k=k.parentNode}return k},E.getParentTagName=function(s,l){var k="span";return s&&s.parentNode&&s.parentNode.tagName?j.consts.UNIT_TAG.indexOf(s.parentNode.tagName)>=0||j.consts.AUTO_MODIFY_TAG.indexOf(s.parentNode.tagName)>=0?k:s.parentNode.tagName:k},E.getObjectEditElementAttributes=function(s,l){for(var k=E.getAttributesObjectFromElement(s),$=function(J){if(J.getAttribute)for(var ie=E.getAttributesObjectFromElement(J),ge=Object.keys(ie),Ce=0;Ce<ge.length;Ce++)ie[ge[Ce]]&&ge[Ce]!=="style"&&!k[ge[Ce]]&&(k[ge[Ce]]=ie[ge[Ce]])};s&&!(j.consts.UNIT_TAG.indexOf(s.tagName)>=0);)$(s),s=s.parentNode;return k},E.getObjectEditElementCss=function(s,l){for(var k=ve(document.contains(s)&&s.getAttribute?s.getAttribute("style"):""),$=function(J){if(J.getAttribute)for(var ie=ve(J.getAttribute("style")),ge=Object.keys(ie),Ce=0;Ce<ge.length;Ce++)k[ge[Ce]]||(k[ge[Ce]]=ie[ge[Ce]])};s&&!(j.consts.UNIT_TAG.indexOf(s.tagName)>=0);){switch(s.tagName){case"B":case"STRONG":k["font-weight"]="bold";break;case"U":k["text-decoration"]="underline";break;case"I":k["font-style"]="italic"}$(s),s=s.parentNode}return k},E.getEditElementTag=function(s){for(var l="",k="",$=0;$<s._selection.editDragUnitElement.length;$++){if(k=s._selection.editDragUnitElement[$].tagName==="LI"?s._selection.editDragUnitElement[$].parentNode.tagName:s._selection.editDragUnitElement[$].tagName,l&&l!==k)return"";l=k}return l},E.getPreviousElementsUntilNotTag=function(s,l,k){var $=[],J=s,ie=E.getAttributesObjectFromElement(s);for($.push(J);J;){for(;J.previousSibling;){if((J=J.previousSibling).tagName&&k.DOUBLE_TAG.indexOf(J.tagName)>0)for(;J.lastChild;)J=J.lastChild;else if(J.tagName&&k.UNIT_TAG.indexOf(J.tagName)>0)for(;J.lastChild;)J=J.lastChild;if(J.nodeType===3&&(J=J.parentNode),k.UNIT_TAG.indexOf(J.tagName)>0||!J.tagName||J.tagName!==l.toUpperCase()||!xe(ie,E.getAttributesObjectFromElement(J)))return $;$.push(J)}J=J.parentNode}return $},E.getNextElementsUntilNotTag=function(s,l,k){var $=[],J=s,ie=E.getAttributesObjectFromElement(s);for($.push(J);J;){for(;J.nextSibling;){if((J=J.nextSibling).tagName&&k.DOUBLE_TAG.indexOf(J.tagName)>0)for(;J.firstChild;)J=J.firstChild;else if(J.tagName&&k.UNIT_TAG.indexOf(J.tagName)>0)for(;J.firstChild;)J=J.firstChild;if(J.nodeType===3&&(J=J.parentNode),k.UNIT_TAG.indexOf(J.tagName)>0||!J.tagName||J.tagName!==l.toUpperCase()||!xe(ie,E.getAttributesObjectFromElement(J)))return $;$.push(J)}J=J.parentNode}return $},E.setTagToggle=function(s,l){s._status.ulToggle=l==="UL",s._status.olToggle=l==="OL"},E.initToggleButtonVariables=function(s){s._status.boldToggle=!1,s._status.underlineToggle=!1,s._status.italicToggle=!1,s._status.ulToggle=!1,s._status.olToggle=!1,E.button_onToggle(s._elements.boldButton,s._status.boldToggle),E.button_onToggle(s._elements.underlineButton,s._status.underlineToggle),E.button_onToggle(s._elements.italicButton,s._status.italicToggle),E.button_onToggle(s._elements.ulButton,s._status.ulToggle),E.button_onToggle(s._elements.olButton,s._status.olToggle)},E.isInNote=function(s){for(;s;){if(s&&s instanceof Element&&s.hasAttribute("data-vanillanote"))return!0;s=s.parentNode}return!1},E.getElementReplaceTag=function(s,l){for(var k,$,J=document.createElement(l),ie=s.childNodes;ie[0];)ie[0].getAttribute&&(k=ve(ie[0].getAttribute("style")),J&&J.tagName.substring(0,1)==="H"&&(delete k["font-size"],delete k["letter-spacing"],delete k["line-height"]),$=Ee(k)),$&&ie[0].setAttribute&&ie[0].setAttribute("style",$),J.append(ie[0]);return Me(J,E.getAttributesObjectFromElement(s))},E.removeDoubleTag=function(s,l){if(!(j.consts.DOUBLE_TAG.indexOf(l.tagName)<0)){for(var k,$=l.childNodes,J=0;J<$.length;J++){k=E.getElementReplaceTag($[J],"P"),l.insertAdjacentElement("beforebegin",k);for(var ie=0;ie<s._selection.editDragUnitElement.length;ie++)if(s._selection.editDragUnitElement[ie]===$[J]){s._selection.editDragUnitElement[ie]=k;break}}l.remove()}},E.getElement=function(s,l,k,$,J){s=s.replace(/<br\s*\/?>/gm,`
51
+ `),(!l||j.consts.UNIT_TAG.indexOf(l)>=0||j.consts.AUTO_MODIFY_TAG.indexOf(l)>=0)&&(l="span");var ie=document.createElement(l);return ie.innerText=s,$&&(ie=Me(ie,$)),k&&ie.setAttribute("style",k),ie},E.setEditNodeAndElement=function(s,l,k){var $=!1;return s._selection.editStartNode===k&&(s._selection.editStartNode=l,$=!0),s._selection.editEndNode===k&&(s._selection.editEndNode=l,$=!0),s._selection.editStartElement===k&&(s._selection.editStartElement=l,$=!0),s._selection.editEndElement===k&&(s._selection.editEndElement=l,$=!0),s._selection.editStartUnitElement===k&&(s._selection.editStartUnitElement=l,$=!0),s._selection.editEndUnitElement===k&&(s._selection.editEndUnitElement=l,$=!0),$},E.removeEmptyElment=function(s,l){for(var k=s.querySelectorAll("*"),$=k.length-1;$>=0;$--)!k[$].hasChildNodes()&&j.consts.EMPTY_ABLE_TAG.indexOf(k[$].tagName)<0&&k[$].remove()},E.doEditUnitCheck=function(s){j.events.documentEvents.noteObserver.disconnect(),function(l){for(var k=l._elements.textarea,$=k.childNodes,J=document.createElement("P"),ie=[],ge=!0,Ce=0;Ce<$.length;Ce++)j.consts.UNIT_TAG.indexOf($[Ce].tagName)<0&&j.consts.DOUBLE_TAG.indexOf($[Ce].tagName)<0?ge?(k.insertBefore(J,$[Ce]),ge=!1):(J.append($[Ce].cloneNode(!0)),ie.push($[Ce])):(J=document.createElement("P"),ge=!0);for(var He=0;He<ie.length;He++)ie[He].remove()}(s),E.connectObserver(j)},E.connectObserver=function(s){Object.keys(s.vanillanoteElements).forEach(function(l){s.events.documentEvents.noteObserver.observe(s.vanillanoteElements[l]._elements.textarea,s.variables.observerOptions)})},E.isElementInParentBounds=function(s,l){if(s.offsetParent===null)return!1;var k=s.getBoundingClientRect();if(l.offsetParent===null)return!1;var $=l.getBoundingClientRect(),J=$.top+window.pageYOffset,ie=$.bottom+window.pageYOffset,ge=k.top+window.pageYOffset,Ce=k.bottom+window.pageYOffset;return J>=ge&&ie<=Ce},E.validCheckAttLink=function(s){return s._elements.attLinkText.value?s._elements.attLinkHref.value?(s._elements.attLinkValidCheckbox.checked=!0,s._elements.attLinkValidCheckText.style.color=Pe(s._colors.color8),void(s._elements.attLinkValidCheckText.textContent=j.languageSet[s._attributes.language].thanks)):(s._elements.attLinkValidCheckbox.checked=!1,s._elements.attLinkValidCheckText.style.color=Pe(s._colors.color9),void(s._elements.attLinkValidCheckText.textContent=j.languageSet[s._attributes.language].attLinkInLinkTooltip)):(s._elements.attLinkValidCheckbox.checked=!1,s._elements.attLinkValidCheckText.style.color=Pe(s._colors.color9),void(s._elements.attLinkValidCheckText.textContent=j.languageSet[s._attributes.language].attLinkInTextTooltip))},E.validCheckAttVideo=function(s){if(!s._elements.attVideoEmbedId.value)return s._elements.attVideoValidCheckbox.checked=!1,s._elements.attVideoValidCheckText.style.color=Pe(s._colors.color9),void(s._elements.attVideoValidCheckText.textContent=j.languageSet[s._attributes.language].attVideoEmbedIdTooltip);s._elements.attVideoValidCheckbox.checked=!0,s._elements.attVideoValidCheckText.style.color=Pe(s._colors.color8),s._elements.attVideoValidCheckText.textContent=j.languageSet[s._attributes.language].thanks},E.initAttLink=function(s){s._elements.attLinkText.value="",s._elements.attLinkHref.value="",s._elements.attLinkIsBlankCheckbox.checked=!1},E.initAttFile=function(s){delete s._attTempFiles,s._attTempFiles={},s._elements.attFileUploadDiv.replaceChildren(),s._elements.attFileUploadDiv.textContent=j.languageSet[s._attributes.language].attFileUploadDiv,s._elements.attFileUploadDiv.style.lineHeight=130*s._attributes.sizeRate+"px",s._elements.attFileUpload.value=""},E.initAttImage=function(s){delete s._attTempImages,s._attTempImages={},s._elements.attImageUploadButtonAndView.replaceChildren(),s._elements.attImageUploadButtonAndView.textContent=j.languageSet[s._attributes.language].attImageUploadButtonAndView,s._elements.attImageUpload.value="",s._elements.attImageURL.value="",s._elements.attImageURL.removeAttribute("readonly")},E.getObjectNoteCss=function(s){var l=new Object;return s._status.boldToggle&&(l["font-weight"]="bold"),s._status.underlineToggle&&(l["text-decoration"]="underline"),s._status.italicToggle&&(l["font-style"]="italic"),l["font-size"]=s._status.fontSize+"px",l["line-height"]=s._status.lineHeight+"px",s._status.letterSpacing&&re(s._status.letterSpacing)&&(l["letter-spacing"]=s._status.letterSpacing+"px"),s._status.fontFamily&&(l["font-family"]=s._status.fontFamily),Pe(s._colors.color12)===s._status.colorTextRGB&&s._status.colorTextOpacity==="1"||(l.color=Te(s._status.colorTextRGB,s._status.colorTextOpacity)),Pe(s._colors.color13)===s._status.colorBackRGB&&s._status.colorBackOpacity==="0"||(l["background-color"]=Te(s._status.colorBackRGB,s._status.colorBackOpacity)),l},E.showAlert=function(s,l){l(s)&&alert(s)},E.recodeNote=function(s){s._recodes.recodeNotes.length>=s._recodes.recodeLimit?(s._recodes.recodeNotes.shift(),s._recodes.recodeNotes.push(s._elements.textarea.cloneNode(!0))):(s._recodes.recodeCount=s._recodes.recodeCount+1,s._recodes.recodeCount<s._recodes.recodeNotes.length&&s._recodes.recodeNotes.splice(s._recodes.recodeCount),s._recodes.recodeNotes.push(s._elements.textarea.cloneNode(!0)))}}(Xe,Ut),function(j,E){E.closeAllTooltip=function(s){s._elements.attLinkTooltip.style.opacity="0",s._elements.attLinkTooltip.style.height="0",s._elements.attImageAndVideoTooltip.style.opacity="0",s._elements.attImageAndVideoTooltip.style.height="0"},E.setVariableButtonTogle=function(s,l){l["font-weight"]==="bold"?s._status.boldToggle=!0:s._status.boldToggle=!1,l["text-decoration"]==="underline"||l["text-decoration-line"]==="underline"?s._status.underlineToggle=!0:s._status.underlineToggle=!1,l["font-style"]==="italic"?s._status.italicToggle=!0:s._status.italicToggle=!1,l.color?(s._status.colorTextRGB=We(l.color),s._status.colorTextOpacity=nt(l.color),s._status.colorTextRGB?s._status.colorTextOpacity||(l.opacity?s._status.colorTextOpacity=l.opacity:s._status.colorTextOpacity="1"):(s._status.colorTextRGB=Pe(s._colors.color12),s._status.colorTextOpacity="1")):(s._status.colorTextRGB=Pe(s._colors.color12),s._status.colorTextOpacity="1"),l["background-color"]?(s._status.colorBackRGB=We(l["background-color"]),s._status.colorBackOpacity=nt(l["background-color"]),s._status.colorTextRGB?s._status.colorBackOpacity||(l.opacity?s._status.colorBackOpacity=l.opacity:s._status.colorBackOpacity="0"):(s._status.colorTextRGB=Pe(s._colors.color12),s._status.colorTextOpacity="1")):(s._status.colorBackRGB=Pe(s._colors.color13),s._status.colorBackOpacity="0")},E.button_onToggle=function(s,l){var k=a(s);k&&(s.classList.contains(C(k._noteName))&&(s=s.parentNode),l?s.classList.add(c(k._noteName,k._id,"on_button_on")):s.classList.remove(c(k._noteName,k._id,"on_button_on")))},E.allButtonToggle=function(s){E.button_onToggle(s._elements.boldButton,s._status.boldToggle),E.button_onToggle(s._elements.underlineButton,s._status.underlineToggle),E.button_onToggle(s._elements.italicButton,s._status.italicToggle),E.button_onToggle(s._elements.ulButton,s._status.ulToggle),E.button_onToggle(s._elements.olButton,s._status.olToggle),s._elements.colorTextSelect.querySelector("."+C(s._noteName)).style.color=Te(s._status.colorTextRGB,s._status.colorTextOpacity==="0"?"1":s._status.colorTextOpacity),s._elements.colorBackSelect.querySelector("."+C(s._noteName)).style.color=Te(s._status.colorBackRGB,s._status.colorBackOpacity==="0"?"1":s._status.colorBackOpacity)},E.selectToggle=function(s,l){var k=l||a(s);if(k){s.classList.contains(C(k._noteName))&&(s=s.parentNode);for(var $=s,J=!1;$&&$.getAttribute("type")!=="select";)J=!0,$=$.parentNode;if($.getAttribute("data-note-id")){var ie,ge=$.getAttribute("id");if(ge.includes("paragraphStyleSelect"))ie=k._elements.paragraphStyleSelectBox;else if(ge.includes("textAlignSelect"))ie=k._elements.textAlignSelectBox;else if(ge.includes("fontFamilySelect"))ie=k._elements.fontFamilySelectBox;else if(ge.includes("colorTextSelect")){if(J)return;ie=k._elements.colorTextSelectBox}else if(ge.includes("colorBackSelect")){if(J)return;ie=k._elements.colorBackSelectBox}var Ce=c(k._noteName,k._id,"on_display_block"),He=c(k._noteName,k._id,"on_display_none"),Le=ie.classList.contains(Ce);if(E.closeAllSelectBoxes(k),Le?(ie.classList.remove(Ce),ie.classList.add(He)):(ie.classList.remove(He),ie.classList.add(Ce)),function(Ve){if(Ve.offsetParent===null)return!1;var Mt=Ve.getBoundingClientRect();return window.innerWidth/2<Mt.left}($)){if(ie.style.removeProperty("left"),ie.style.right="0%",ie.offsetParent===null)return;var Ke=ie.getBoundingClientRect();if(Ke.top===0||k._elements.tool.offsetParent===null)return;k._elements.tool.getBoundingClientRect().left>Ke.left&&(ie.style.right=Ke.left-1+"px")}else{if(ie.style.removeProperty("right"),ie.style.left="0%",ie.offsetParent===null)return;var Ze=ie.getBoundingClientRect();if(Ze.top===0||k._elements.tool.offsetParent===null)return;var et=k._elements.tool.getBoundingClientRect();et.right<Ze.right&&(ie.style.left=et.right-(Ze.right+1)+"px")}}}},E.closeAllSelectBoxes=function(s){var l=c(s._noteName,s._id,"on_display_block"),k=c(s._noteName,s._id,"on_display_none");s._elements.paragraphStyleSelectBox.classList.remove(l),s._elements.paragraphStyleSelectBox.classList.add(k),s._elements.textAlignSelectBox.classList.remove(l),s._elements.textAlignSelectBox.classList.add(k),s._elements.fontFamilySelectBox.classList.remove(l),s._elements.fontFamilySelectBox.classList.add(k),s._elements.colorTextSelectBox.classList.remove(l),s._elements.colorTextSelectBox.classList.add(k),s._elements.colorBackSelectBox.classList.remove(l),s._elements.colorBackSelectBox.classList.add(k)},E.fontFamilySelectList_onClick=function(s,l){if(s.target){var k=s.target,$=l||a(s.target);if($){var J=k.getAttribute("data-font-family");ve($._elements.fontFamilySelect.getAttribute("style"))["font-family"]=J,$._status.fontFamily=J,$._elements.fontFamilySelect.firstChild.textContent=J.length>12?J.substr(0,12)+"...":J,$._elements.fontFamilySelect.style.fontFamily=J}}},E.setEditStyleTag=function(s){if(s._selection.setEditStyleTagToggle>0)s._selection.setEditStyleTagToggle--;else{for(var l=s._selection.editStartUnitElement,k=l;l;){if(l.tagName===(s._noteName+"-textarea").toUpperCase()){k=l;break}l=l.parentNode}if(k){var $=E.getObjectEditElementCss(s._selection.editStartElement,s);if(s._selection.editStartNode!==s._selection.editEndNode)for(var J=$,ie=!1,ge=!1,Ce=function(Ke){for(var Ze=0;Ze<Ke.childNodes.length&&!ge;Ze++)s._selection.editStartNode===Ke.childNodes[Ze]&&(ie=!0),ie&&Ke.childNodes[Ze].nodeType===3&&Ke.childNodes[Ze].textContent&&(J=E.getObjectEditElementCss(Ke.childNodes[Ze],s)),xe($,J)||($={},ge=!0),s._selection.editEndNode===Ke.childNodes[Ze]&&(ge=!0),Ke.childNodes[Ze].childNodes&&Ce(Ke.childNodes[Ze])},He=0;He<s._selection.editDragUnitElement.length;He++)Ce(s._selection.editDragUnitElement[He]);E.setVariableButtonTogle(s,$);var Le=E.getEditElementTag(s);E.setTagToggle(s,Le),E.allButtonToggle(s)}else Object.keys(j.vanillanoteElements).forEach(function(Ke){E.initToggleButtonVariables(j.vanillanoteElements[Ke])})}},E.setElementScroll=function(s,l,k){if(s&&l){l.nodeType===3&&(l=l.parentNode);var $=null,J=l.offsetTop-Math.round(k/2)+Math.round(l.offsetHeight/2),ie=s.scrollTop,ge=J-ie;window.requestAnimationFrame(function Ce(He){$||($=He);var Le=He-$,Ke=Math.min(Le/500,1);s.scrollTop=ie+ge*Ke,Le<500&&window.requestAnimationFrame(Ce)})}},E.getCheckSelectBoxesOpened=function(s){var l=c(s._noteName,s._id,"on_display_block");return!!(s._elements.paragraphStyleSelectBox.classList.contains(l)||s._elements.textAlignSelectBox.classList.contains(l)||s._elements.fontFamilySelectBox.classList.contains(l)||s._elements.colorTextSelectBox.classList.contains(l)||s._elements.colorBackSelectBox.classList.contains(l))},E.closeAllModal=function(s){var l=c(s._noteName,s._id,"on_display_block"),k=c(s._noteName,s._id,"on_display_none");s._elements.modalBack.classList.remove(l),s._elements.modalBack.classList.add(k),s._elements.attLinkModal.classList.remove(l),s._elements.attLinkModal.classList.add(k),s._elements.attFileModal.classList.remove(l),s._elements.attFileModal.classList.add(k),s._elements.attImageModal.classList.remove(l),s._elements.attImageModal.classList.add(k),s._elements.attVideoModal.classList.remove(l),s._elements.attVideoModal.classList.add(k),s._elements.helpModal.classList.remove(l),s._elements.helpModal.classList.add(k),E.initAttLink(s),E.initAttFile(s),E.initAttImage(s)},E.openAttLinkModal=function(s){E.doIncreaseTextareaHeight(j),E.closeAllModal(s),E.closeAllSelectBoxes(s),E.setAllModalSize(s);var l=c(s._noteName,s._id,"on_display_block"),k=c(s._noteName,s._id,"on_display_none");if(s._elements.modalBack.classList.remove(k),s._elements.modalBack.classList.add(l),s._elements.attLinkModal.classList.remove(k),s._elements.attLinkModal.classList.add(l),E.isValidSelection(s)){var $=s._elements.attLinkText,J=s._elements.attLinkHref;$.value=s._selection.editRange.toString(),J.value="",s._selection.editRange.collapsed?($.removeAttribute("readonly"),$.focus()):($.setAttribute("readonly","true"),J.focus()),E.validCheckAttLink(s)}else E.validCheckAttLink(s)},E.openPlaceholder=function(s){s._attributes.placeholderIsVisible&&s._elements.textarea.innerText.length<=1&&s._elements.textarea.textContent.length<1&&s._elements.textarea.childNodes.length<=1&&s._elements.textarea.childNodes[0]&&s._elements.textarea.childNodes[0].childNodes.length<=1&&s._elements.textarea.childNodes[0].childNodes[0]&&s._elements.textarea.childNodes[0].childNodes[0].tagName==="BR"&&(s._elements.placeholder.classList.remove(c(s._noteName,s._id,"on_display_none")),s._elements.placeholder.classList.add(c(s._noteName,s._id,"on_display_block")))},E.closePlaceholder=function(s){s._attributes.placeholderIsVisible&&(s._elements.placeholder.classList.remove(c(s._noteName,s._id,"on_display_block")),s._elements.placeholder.classList.add(c(s._noteName,s._id,"on_display_none")))},E.setAllModalSize=function(s){s._elements.template.offsetParent!==null&&setTimeout(function(){s._elements.modalBack.style.width=s._elements.template.clientWidth+"px",s._elements.modalBack.style.height=s._elements.template.clientHeight+"px",s._elements.attLinkModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attLinkModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.attFileModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attFileModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.attImageModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attImageModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.attVideoModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.attVideoModal.style.marginTop=.1*s._elements.template.clientHeight+"px",s._elements.helpModal.style.width=.8*s._elements.textarea.clientWidth+"px",s._elements.helpModal.style.marginTop=.1*s._elements.template.clientHeight+"px"},500)},E.setPlaceholderSize=function(s){setTimeout(function(){s._attributes.placeholderIsVisible&&(E.closePlaceholder(s),s._elements.textarea.offsetParent!==null&&(s._elements.placeholder.style.top=s._elements.textarea.offsetTop+s._attributes.placeholderAddTop+"px",s._elements.placeholder.style.left=s._elements.textarea.offsetLeft+s._attributes.placeholderAddLeft+"px",s._elements.placeholder.style.width=s._attributes.placeholderWidth?s._attributes.placeholderWidth:s._elements.textarea.clientWidth+"px",E.openPlaceholder(s)))},100)},E.setAllToolTipPosition=function(s){s._attributes.toolPosition===r.bottom&&(s._elements.attLinkTooltip.style.bottom=s._elements.tool.style.height,s._elements.attImageAndVideoTooltip.style.bottom=s._elements.tool.style.height)},E.appearAttLinkToolTip=function(s){var l=s._selection.editStartNode.parentElement,k=l.getAttribute("href"),$=l.getAttribute("download"),J=c(s._noteName,s._id,"on_display_inline_block"),ie=c(s._noteName,s._id,"on_display_none");s._elements.attLinkTooltipEditButton.classList.remove(ie),s._elements.attLinkTooltipUnlinkButton.classList.remove(ie),s._elements.attLinkTooltipEditButton.classList.add(J),s._elements.attLinkTooltipUnlinkButton.classList.add(J),k&&(s._elements.attLinkTooltipHref.setAttribute("href",k),s._elements.attLinkTooltipHref.textContent=k.length>25?k.substr(0,25)+"...":k),$&&(s._elements.attLinkTooltipHref.setAttribute("download",$),s._elements.attLinkTooltipHref.textContent="download : "+$,s._elements.attLinkTooltipEditButton.classList.remove(J),s._elements.attLinkTooltipUnlinkButton.classList.remove(J),s._elements.attLinkTooltipEditButton.classList.add(ie),s._elements.attLinkTooltipUnlinkButton.classList.add(ie)),s._elements.attLinkTooltip.style.opacity="0.95",s._elements.attLinkTooltip.style.height=54*s._attributes.sizeRate*.8+"px",s._elements.attLinkTooltip.style.lineHeight=54*s._attributes.sizeRate*.8+"px"},E.appearAttImageAndVideoTooltip=function(s){var l=s._selection.editStartNode,k=ve(E.getAttributesObjectFromElement(l).style);switch(k.width&&(s._elements.attImageAndVideoTooltipWidthInput.value=ye(k.width)),k.float){case"left":s._elements.attImageAndVideoTooltipFloatRadioLeft.checked=!0;break;case"right":s._elements.attImageAndVideoTooltipFloatRadioRight.checked=!0;break;default:s._elements.attImageAndVideoTooltipFloatRadioNone.checked=!0}if(s._elements.attImageAndVideoTooltipShapeRadioSquare.checked=!0,k["border-radius"]){var $=ye(k["border-radius"]);$>0?s._elements.attImageAndVideoTooltipShapeRadioRadius.checked=!0:$>=50&&(s._elements.attImageAndVideoTooltipShapeRadioCircle.checked=!0)}s._elements.attImageAndVideoTooltip.style.opacity="0.9",s._elements.attImageAndVideoTooltip.style.height=54*s._attributes.sizeRate*.8*2+"px",s._elements.attImageAndVideoTooltip.style.lineHeight=54*s._attributes.sizeRate*.7+"px"},E.setImageAndVideoWidth=function(s){s.value||(s.value=100);var l=s.value,k=a(s);if(k){var $=k._selection.editStartNode;$.tagName!=="IMG"&&$.tagName!=="IFRAME"||(l<10&&(l=10),l>100&&(l=100),s.value=l,$.style.width=l+"%",k._selection.editStartNode.parentNode.replaceChild($,k._selection.editStartNode),k._selection.editStartNode=$)}},E.setAllToolSize=function(s){for(var l=s._elements.tool.childNodes,k=c(s._noteName,s._id,"on_display_inline_block"),$=c(s._noteName,s._id,"on_display_none"),J=l.length-1;J>=0;J--)l[J].classList.add(k),l[J].classList.remove($);if(s._elements.tool.offsetParent!==null)if(s._status.toolToggle){s._elements.tool.style.height=s._attributes.toolDefaultLine*(52*s._attributes.sizeRate)+"px";for(var ie=l.length-1;ie>=0;ie--)E.isElementInParentBounds(s._elements.tool,l[ie])||(l[ie].classList.remove(k),l[ie].classList.add($))}else{for(var ge,Ce,He,Le=l.length-1;Le>=0;Le--)if(l[Le].offsetParent!==null){Ce=l[Le];break}if(s._elements.tool.offsetParent===null)return;ge=window.pageYOffset+s._elements.tool.getBoundingClientRect().top,He=window.pageYOffset+Ce.getBoundingClientRect().top-ge+52*s._attributes.sizeRate,s._elements.tool.style.height=He+"px"}},E.doDecreaseTextareaHeight=function(s){s._attributes.isNoteByMobile&&(s._elements.textarea.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(function(){(s._attributes.textareaOriginHeight.replace(/[-+]?[0-9]*\.?[0-9]+/g,"")||null)==="px"&&j.variables.mobileKeyboardExceptHeight<ye(s._attributes.textareaOriginHeight)&&j.variables.mobileKeyboardExceptHeight<s._elements.textarea.offsetHeight&&(s._elements.textarea.style.height=j.variables.mobileKeyboardExceptHeight+"px")},100))},E.doIncreaseTextareaHeight=function(s){for(var l=Object.keys(s.vanillanoteElements),k=0;k<l.length;k++){var $=s.vanillanoteElements[l[k]];$._attributes.isNoteByMobile&&($._elements.textarea.style.height=$._attributes.textareaOriginHeight)}},E.modifyTextareaScroll=function(s,l){l._attributes.isNoteByMobile&&(j.variables.preventChangeScroll>0?j.variables.preventChangeScroll--:j.variables.isSelectionProgress||(j.variables.isSelectionProgress=!0,setTimeout(function(){if(j.variables.isSelectionProgress=!1,E.isValidSelection(l)){var k=ee(l._selection.editDragUnitElement.length/2)?l._selection.editDragUnitElement.length/2-1:Math.floor(l._selection.editDragUnitElement.length/2);l._selection.editDragUnitElement[l._selection.editDragUnitElement.length-1].offsetTop-l._selection.editDragUnitElement[0].offsetTop+l._selection.editDragUnitElement[l._selection.editDragUnitElement.length-1].offsetHeight>s.offsetHeight-30||E.getCheckSelectBoxesOpened(l)||(l._selection.editRange.collapsed?E.setElementScroll(s,l._selection.editStartElement,j.variables.mobileKeyboardExceptHeight):E.setElementScroll(s,l._selection.editDragUnitElement[k],j.variables.mobileKeyboardExceptHeight))}},50)))},E.initTextarea=function(s){for(;s.firstChild;)s.removeChild(s.firstChild);var l=document.createElement("P"),k=document.createElement("BR");l.appendChild(k),s.appendChild(l),E.setNewSelection(l,0,l,0)}}(Xe,Ut),function(j,E){E.setNewSelection=function(s,l,k,$){if(document.contains(s)&&document.contains(k)){var J=document.createRange(),ie=window.getSelection();return J.setStart(s,l),J.setEnd(k,$),ie.removeAllRanges(),ie.addRange(J),ie}},E.handleSpecialTagSelection=function(s){if(E.closeAllTooltip(s),s._selection.editRange.collapsed)switch(E.getSpecialTag(s._selection.editStartNode,s)){case"A":E.appearAttLinkToolTip(s);break;case"IMG":case"IFRAME":E.appearAttImageAndVideoTooltip(s);break;default:return}},E.setOriginEditSelection=function(s){if(s._selection.editRange){s._selection.setEditStyleTagToggle=2;var l=window.getSelection();l.removeAllRanges(),l.addRange(s._selection.editRange)}},E.setEditSelection=function(s,l){if(l.rangeCount<1||!function(ie){var ge=window.getSelection();if(!ge||ge.rangeCount<1)return!1;for(var Ce=ge.getRangeAt(0).startContainer.parentNode,He=!1;Ce;){if(Ce.tagName===(ie+"-textarea").toUpperCase()){He=!0;break}Ce=Ce.parentNode}return He}(s._noteName))return!1;if(s._selection.editSelection=l,s._selection.editRange=s._selection.editSelection.getRangeAt(0),s._selection.startOffset=s._selection.editRange.startOffset,s._selection.endOffset=s._selection.editRange.endOffset,s._selection.editStartNode=s._selection.editRange.startContainer,s._selection.editEndNode=s._selection.editRange.endContainer,s._selection.editStartNode instanceof Element){for(;s._selection.editStartNode instanceof Element&&s._selection.editStartNode.firstChild&&s._selection.editStartNode.firstChild.tagName!=="BR"&&(s._selection.editStartNode=s._selection.editStartNode.firstChild,s._selection.editStartNode.nodeType!==3););s._selection.startOffset=0}if(s._selection.editEndNode instanceof Element){for(;s._selection.editEndNode instanceof Element&&s._selection.editEndNode.firstChild&&s._selection.editEndNode.firstChild.tagName!=="BR"&&(s._selection.editEndNode=s._selection.editEndNode.firstChild,s._selection.editEndNode.nodeType!==3););s._selection.endOffset=0}if(s._selection.editStartElement=s._selection.editRange.startContainer instanceof Element?s._selection.editRange.startContainer:s._selection.editRange.startContainer.parentNode,s._selection.editEndElement=s._selection.editRange.endContainer instanceof Element?s._selection.editRange.endContainer:s._selection.editRange.endContainer.parentNode,j.consts.UNIT_TAG.indexOf(s._selection.editStartElement.tagName)>0)for(;j.consts.UNIT_TAG.indexOf(s._selection.editStartElement.tagName)>0;)s._selection.editStartElement=s._selection.editStartElement.firstChild;if(j.consts.UNIT_TAG.indexOf(s._selection.editEndElement.tagName)>0)for(;j.consts.UNIT_TAG.indexOf(s._selection.editEndElement.tagName)>0;)s._selection.editEndElement=s._selection.editEndElement.lastChild;s._selection.editStartElement instanceof Element&&s._selection.editStartElement.tagName==="BR"&&(s._selection.editStartElement=s._selection.editStartElement.parentNode),s._selection.editEndElement instanceof Element&&s._selection.editEndElement.tagName==="BR"&&(s._selection.editEndElement=s._selection.editEndElement.parentNode),s._selection.editStartElement.tagName===(s._noteName+"-textarea").toUpperCase()&&(s._selection.editStartElement=null),s._selection.editEndElement.tagName===(s._noteName+"-textarea").toUpperCase()&&(s._selection.editEndElement=null),s._selection.editStartUnitElement=E.getParentUnitTagElemnt(s._selection.editStartElement,s),s._selection.editEndUnitElement=E.getParentUnitTagElemnt(s._selection.editEndElement,s),s._selection.editDragUnitElement.splice(0,s._selection.editDragUnitElement.length);for(var k,$=E.modifySeletedElements(s),J=0;J<$.length;J++)k=E.getParentUnitTagElemnt($[J],s),s._selection.editDragUnitElement.includes(k)||s._selection.editDragUnitElement.push(k);return E.setEditStyleTag(s),E.handleSpecialTagSelection(s),!0},E.isValidSelection=function(s){return!!s._selection.editRange&&!!s._selection.editStartElement&&!!s._selection.editStartUnitElement},E.modifySeletedElements=function(s){var l=!1,k=s._selection.editStartNode,$=[];if(!s._selection.editStartUnitElement||!s._selection.editEndUnitElement)return $;for(var J=s._selection.editEndUnitElement.lastChild;J&&J.lastChild;)J=J.lastChild;for(var ie=function(ge){if(ge===J&&($.push(ge),l=!0),!l&&((j.consts.UNIT_TAG.indexOf(ge.tagName)>=0||j.consts.EMPTY_ABLE_TAG.indexOf(ge.tagName)>=0||ge.nodeType===3)&&$.push(ge),ge&&ge.childNodes&&ge.childNodes.length))for(var Ce=0;Ce<ge.childNodes.length;Ce++)ie(ge.childNodes[Ce])};k&&!l;)if(ie(k),k.nextSibling)k=k.nextSibling;else{for(;k&&!k.nextSibling;)k=k.parentNode;k&&(k=k.nextSibling)}return $},E.modifySelectedUnitElementTag=function(s,l){var k=l||a(s);if(k&&E.isValidSelection(k)){var $,J=s.getAttribute("data-tag-name");if(j.consts.DOUBLE_TAG.indexOf(J)>=0)for(var ie=document.createElement(J),ge=0;ge<k._selection.editDragUnitElement.length&&(k._selection.editDragUnitElement[ge].tagName==="LI"&&E.removeDoubleTag(k,k._selection.editDragUnitElement[ge].parentNode),J!=="UL"||!k._status.ulToggle)&&(J!=="OL"||!k._status.olToggle);ge++)ge===0&&k._selection.editDragUnitElement[0].insertAdjacentElement("beforebegin",ie),$=E.getElementReplaceTag(k._selection.editDragUnitElement[ge],"LI"),E.setEditNodeAndElement(k,$,k._selection.editDragUnitElement[ge]),k._selection.editDragUnitElement[ge].remove(),k._selection.editDragUnitElement[ge]=$,ie.append($);else for(var Ce=0;Ce<k._selection.editDragUnitElement.length;Ce++)k._selection.editDragUnitElement[Ce].tagName==="LI"&&E.removeDoubleTag(k,k._selection.editDragUnitElement[Ce].parentNode),$=E.getElementReplaceTag(k._selection.editDragUnitElement[Ce],J),E.setEditNodeAndElement(k,$,k._selection.editDragUnitElement[Ce]),k._selection.editDragUnitElement[Ce].replaceWith($),k._selection.editDragUnitElement[Ce]=$;var He=0,Le=k._selection.editEndElement?k._selection.editEndElement.textContent.length:0;k._selection.editStartElement===k._selection.editEndElement&&(He=Le),E.setNewSelection(k._selection.editStartNode,He,k._selection.editEndNode,Le)}},E.modifySelectedUnitElementStyle=function(s,l){var k=l||a(s);if(k&&E.isValidSelection(k)){for(var $,J,ie,ge,Ce=s.getAttribute("data-tag-style"),He=ve(Ce),Le=0;Le<k._selection.editDragUnitElement.length;Le++)$=k._selection.editDragUnitElement[Le].getAttribute("style"),ie=ve($),J=Ee(ke(ie,He)),(ge=k._selection.editDragUnitElement[Le].cloneNode(!0)).setAttribute("style",J),k._selection.editDragUnitElement[Le].parentNode.replaceChild(ge,k._selection.editDragUnitElement[Le]),k._selection.editDragUnitElement[Le]=ge;k._selection.editEndElement.childNodes&&k._selection.editEndElement.childNodes.length,E.setNewSelection(k._selection.editDragUnitElement[0],0,k._selection.editDragUnitElement[k._selection.editDragUnitElement.length-1],1)}},E.modifySelectedSingleElement=function(s,l,k,$){if(E.isValidSelection(s)){var J,ie,ge,Ce,He,Le,Ke,Ze,et;Ce=l?Ee(l):"",ge=k||"",He=$||null,Le=E.modifySeletedElements(s);for(var Ve=s._selection.editStartNode.textContent.slice(0,s._selection.startOffset),Mt=s._selection.editStartNode.textContent.slice(s._selection.startOffset,s._selection.editStartNode.textContent.length),Rt=s._selection.editEndNode.textContent.slice(0,s._selection.endOffset),xt=s._selection.editEndNode.textContent.slice(s._selection.endOffset,s._selection.editEndNode.textContent.length),Ht=function(g,p){g&&(p?p.insertBefore(g,null):s._selection.editStartUnitElement.insertBefore(g,null))},v=!1,w=s._selection.editStartNode===s._selection.editEndNode,A=0;A<Le.length;A++)Le[A].nodeType===3?($||(He=E.getObjectEditElementAttributes(Le[A],s)),k||(ge=E.getSpecialTag(Le[A],s)),l||(Ce=Ee(E.getObjectEditElementCss(Le[A],s))),(J=E.getParentUnitTagElemnt(Le[A],s))&&J.tagName.substring(0,1)==="H"&&(delete(l=ve(Ce))["font-size"],delete l["letter-spacing"],delete l["line-height"],Ce=Ee(l)),Le[A]===s._selection.editStartNode?(w&&(Mt=Mt.slice(0,Mt.length-xt.length)),Ht(J=E.getElement(Ve,E.getParentTagName(s._selection.editStartNode,s),Ee(E.getObjectEditElementCss(s._selection.editStartNode,s)),E.getObjectEditElementAttributes(s._selection.editStartNode,s),s),ie),Ht(J=E.getElement(Mt,ge,Ce,He,s),ie),Ke=J.firstChild,w&&(Ze=J.firstChild,Ht(J=E.getElement(xt,E.getParentTagName(s._selection.editEndNode,s),Ee(E.getObjectEditElementCss(s._selection.editEndNode,s)),E.getObjectEditElementAttributes(s._selection.editEndNode,s),s),ie),v=!0),Le[A].remove()):w||Le[A]!==s._selection.editEndNode?(Ht(J=v?E.getElement(Le[A].textContent,E.getParentTagName(Le[A],s),Ee(E.getObjectEditElementCss(Le[A],s)),E.getObjectEditElementAttributes(Le[A],s),s):E.getElement(Le[A].textContent,ge,Ce,He,s),ie),Le[A].remove()):(Ht(J=E.getElement(Rt,ge,Ce,He,s),ie),Ze=J.firstChild,Ht(J=E.getElement(xt,E.getParentTagName(s._selection.editEndNode,s),Ee(E.getObjectEditElementCss(s._selection.editEndNode,s)),E.getObjectEditElementAttributes(s._selection.editEndNode,s),s),ie),v=!0,Le[A].remove())):j.consts.EMPTY_ABLE_TAG.indexOf(Le[A].tagName)>=0?(Ht(J=Le[A].cloneNode(),ie),Le[A].remove()):j.consts.UNIT_TAG.indexOf(Le[A].tagName)>=0&&(ie=Le[A]);for(var x=0;x<s._selection.editDragUnitElement.length;x++)E.removeEmptyElment(s._selection.editDragUnitElement[x],s);Ke||(Ke=s._selection.editStartUnitElement),Ze?et=Ze.textContent.length:(Ze=s._selection.editEndUnitElement,et=0),E.setNewSelection(Ke,0,Ze,et)}},E.textarea_onBeforeinputSpelling=function(s){var l=a(s.target);if(l&&j.variables.canEvent&&(E.onEventDisable(j,"input"),E.isValidSelection(l))){var k="",$=E.getObjectNoteCss(l),J=E.getObjectEditElementCss(l._selection.editStartElement,l);if(l._selection.editStartUnitElement.tagName.substring(0,1)==="H"?(delete $["font-size"],delete $["letter-spacing"],delete $["line-height"]):!(l._selection.editStartElement instanceof Element&&j.consts.UNIT_TAG.indexOf(l._selection.editStartElement.tagName)<0)||J["font-size"]&&J["line-height"]||(J=$,Me(l._selection.editStartElement,{style:Ee(J)})),!xe($,J)){k=Ee($);var ie=document.createElement("span");if(ie.setAttribute("class",l._noteName+"-point"),ie.appendChild(document.createTextNode("!")),l._selection.editRange.collapsed){l._selection.editRange.insertNode(ie);try{E.modifySelectedSingleElement(l,E.getObjectNoteCss(l))}catch{}var ge=document.getElementsByClassName(l._noteName+"-point"),Ce=ge[0];k?Ce.setAttribute("style",k):Ce.removeAttribute("style");for(var He=0;He<ge.length;He++)ge[He].removeAttribute("class");E.setNewSelection(Ce.firstChild,0,Ce.firstChild,Ce.firstChild.length)}else E.modifySelectedSingleElement(l,E.getObjectNoteCss(l))}}},E.textarea_onKeydownEnter=function(s){var l=a(s);if(l&&E.isValidSelection(l)&&!(l._selection.editStartUnitElement&&l._selection.editStartUnitElement.textContent||l._selection.editStartNode instanceof Element&&j.consts.EMPTY_ABLE_TAG.indexOf(l._selection.editStartNode.tagName)>=0&&l._selection.editStartNode.tagName!=="BR")){var k,$,J=l._selection.editStartUnitElement.tagName;k=document.createElement(J),$=document.createElement("BR"),k.appendChild($),k=Me(k,E.getAttributesObjectFromElement(l._selection.editStartUnitElement)),l._selection.editStartUnitElement.replaceWith(k),E.setNewSelection(k,0,k,0)}}}(Xe,Ut),Xe.variables.lastScreenHeight=typeof window<"u"&&window.visualViewport?window.visualViewport.height:null,Xe.getNote=function(j){return Xe.vanillanoteElements[j]?Xe.vanillanoteElements[j]:null};var f,h="".concat(Xe.variables.noteName,"_animation_styles-sheet");if(!document.getElementById(h)){var I=`
52
+ @keyframes `.concat(Xe.variables.noteName,`-modal-input {
53
+ 0% { width: 30%; }
54
+ 100% { width: 80%; }
55
+ }
56
+ @keyframes `).concat(Xe.variables.noteName,`-modal-small-input {
57
+ 0% { width: 0%; }
58
+ 100% { width: 20%; }
59
+ }
60
+ `),be=document.createElement("style");be.id=h,be.textContent=I.trim(),document.head.appendChild(be)}if(Xe.useGoogleIcon){var Be="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded",tt=Xe.variables.noteName+"_icons-link";if(!Array.from(document.head.querySelectorAll('link[rel="stylesheet"]')).some(function(j){var E=j.getAttribute("href");return E&&E.startsWith(Be)})&&!document.getElementById(tt)){var Ge=document.createElement("link");Ge.setAttribute("id",tt),Ge.setAttribute("rel","stylesheet"),Ge.setAttribute("href",Be+":opsz,wght,FILL,GRAD@48,400,0,0"),document.head.appendChild(Ge)}}(function(j,E){j.events.documentEvents.noteObserver=new MutationObserver(function(s){var l;if(s.forEach(function($){l=$.target}),l){var k=a(l);k&&(j.variables.lastActiveNoteId=k._id,E.recodeNote(k))}}),j.events.documentEvents.selectionchange=function(s){(function(){var l=window.getSelection();if(l&&!(l.rangeCount<1)){for(var k=l.getRangeAt(0),$=k.startContainer,J=k.startContainer,ie=!1,ge=!1;J;){if($.tagName===(j.variables.noteName+"-textarea").toUpperCase()?ie=!0:$=$.parentNode,J instanceof Element&&J.hasAttribute("data-vanillanote")){ge=!0;break}J=J.parentNode}if(ge)ie&&E.setEditSelection(J,l)&&E.modifyTextareaScroll($,J);else for(var Ce=Object.keys(j.vanillanoteElements),He=0;He<Ce.length;He++)E.initToggleButtonVariables(j.vanillanoteElements[Ce[He]])}})()},j.events.documentEvents.keydown=function(s){!s.ctrlKey&&!s.metaKey||s.key!=="z"&&s.key!=="Z"||(s.preventDefault(),E.isInNote(s.target)&&j.events.elementEvents.undoButton_onClick(s,j)),!s.ctrlKey&&!s.metaKey||s.key!=="y"&&s.key!=="Y"||(s.preventDefault(),E.isInNote(s.target)&&j.events.elementEvents.redoButton_onClick(s,j))},j.events.documentEvents.resize=function(s){j.variables.canEvent&&(E.onEventDisable(j,"resize"),Object.keys(j.vanillanoteElements).forEach(function(l){E.setAllToolSize(j.vanillanoteElements[l]),E.setAllToolTipPosition(j.vanillanoteElements[l]),E.setAllModalSize(j.vanillanoteElements[l]),E.setPlaceholderSize(j.vanillanoteElements[l])}))},j.events.documentEvents.resizeViewport=function(s){(function(){if(window.visualViewport&&j.variables.lastScreenHeight!==window.visualViewport.height){for(var l=document.activeElement,k=!1;l;){if(l.tagName===(j.variables.noteName+"-textarea").toUpperCase()){k=!0;break}l=l.parentNode}if(k&&j.variables.lastScreenHeight>window.visualViewport.height){var $=a(l);if(!$)return;var J=ye($._elements.tool.style.height)?ye($._elements.tool.style.height):93.6;j.variables.mobileKeyboardExceptHeight=window.visualViewport.height-J/2,E.doDecreaseTextareaHeight($)}j.variables.lastScreenHeight<window.visualViewport.height&&E.doIncreaseTextareaHeight(j),j.variables.lastScreenHeight=window.visualViewport.height}})()},document.addEventListener("selectionchange",j.events.documentEvents.selectionchange),document.addEventListener("keydown",j.events.documentEvents.keydown),window.addEventListener("resize",j.events.documentEvents.resize),window.visualViewport&&window.visualViewport.addEventListener("resize",j.events.documentEvents.resizeViewport)})(Xe,Ut),(f=Xe).events.cssEvents.target_onClick=function(j){var E=j.target;E.classList.contains(f.variables.noteName+"_eventChildren")&&(E=E.parentNode);var s=K(E);E.classList.add(f.variables.noteName+"_"+s+"_on_active"),setTimeout(function(){E.classList.remove(f.variables.noteName+"_"+s+"_on_active")},100)},f.events.cssEvents.target_onMouseover=function(j){var E=j.target;E.classList.contains(f.variables.noteName+"_eventChildren")&&(E=E.parentNode);var s=K(E);E.classList.add(f.variables.noteName+"_"+s+"_on_mouseover")},f.events.cssEvents.target_onMouseout=function(j){var E=j.target;E.classList.contains(f.variables.noteName+"_eventChildren")&&(E=E.parentNode);var s=K(E);E.classList.remove(f.variables.noteName+"_"+s+"_on_mouseover")},f.events.cssEvents.target_onTouchstart=function(j){var E=j.target;E.classList.contains(f.variables.noteName+"_eventChildren")&&(E=E.parentNode);var s=K(E);E.classList.add(f.variables.noteName+"_"+s+"_on_mouseover"),E.classList.remove(f.variables.noteName+"_"+s+"_on_mouseout")},f.events.cssEvents.target_onTouchend=function(j){var E=j.target;E.classList.contains(f.variables.noteName+"_eventChildren")&&(E=E.parentNode);var s=K(E);E.classList.add(f.variables.noteName+"_"+s+"_on_mouseout"),E.classList.remove(f.variables.noteName+"_"+s+"_on_mouseover")},function(j,E){j.events.elementEvents.toolToggleButton_onClick=function(s){var l=a(s.target);if(l){var k=l._elements.toolToggleButton.firstChild;l._status.toolToggle=!l._status.toolToggle,l._status.toolToggle?(k.textContent="arrow_drop_down",E.setAllToolSize(l),E.setAllToolTipPosition(l)):(k.textContent="arrow_drop_up",E.setAllToolSize(l),E.setAllToolTipPosition(l)),j.variables.preventChangeScroll=2,X()||E.setOriginEditSelection(l)}},j.events.elementEvents.paragraphStyleSelect_onClick=function(s){var l=a(s.target);l&&(E.selectToggle(s.target,l),X()||E.setOriginEditSelection(l))},j.events.elementEvents.styleNomal_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.styleHeader1_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.styleHeader2_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.styleHeader3_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.styleHeader4_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.styleHeader5_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.styleHeader6_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l),E.selectToggle(k,l)}},j.events.elementEvents.boldButton_onClick=function(s){var l=a(s.target);l&&(l._status.boldToggle=!l._status.boldToggle,X()||E.button_onToggle(l._elements.boldButton,l._status.boldToggle),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.underlineButton_onClick=function(s){var l=a(s.target);l&&(l._status.underlineToggle=!l._status.underlineToggle,X()||E.button_onToggle(l._elements.underlineButton,l._status.underlineToggle),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.italicButton_onClick=function(s){var l=a(s.target);l&&(l._status.italicToggle=!l._status.italicToggle,X()||E.button_onToggle(l._elements.italicButton,l._status.italicToggle),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.ulButton_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l)}},j.events.elementEvents.olButton_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementTag(k,l),E.recodeNote(l)}},j.events.elementEvents.textAlignSelect_onClick=function(s){var l=a(s.target);l&&(E.selectToggle(s.target),X()||E.setOriginEditSelection(l))},j.events.elementEvents.textAlignLeft_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementStyle(k,l),E.selectToggle(k,l),E.recodeNote(l)}},j.events.elementEvents.textAlignCenter_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementStyle(k,l),E.selectToggle(k,l),E.recodeNote(l)}},j.events.elementEvents.textAlignRight_onClick=function(s){var l=a(s.target);if(l){var k=s.target;k.classList.contains(C(l._noteName))&&(k=k.parentNode),E.modifySelectedUnitElementStyle(k,l),E.selectToggle(k,l),E.recodeNote(l)}},j.events.elementEvents.attLinkButton_onClick=function(s){var l=a(s.target);l&&E.openAttLinkModal(l)},j.events.elementEvents.attLinkModal_onClick=function(s){},j.events.elementEvents.attLinkText_onInput=function(s){var l=a(s.target);l&&E.validCheckAttLink(l)},j.events.elementEvents.attLinkText_onBlur=function(s){var l=a(s.target);l&&E.validCheckAttLink(l)},j.events.elementEvents.attLinkHref_onInput=function(s){var l=a(s.target);l&&E.validCheckAttLink(l)},j.events.elementEvents.attLinkHref_onBlur=function(s){var l=a(s.target);l&&E.validCheckAttLink(l)},j.events.elementEvents.attLinkInsertButton_onClick=function(s){var l=a(s.target);if(l)if(E.isValidSelection(l)){if(l._elements.attLinkValidCheckbox.checked){var k=l._elements.attLinkText,$=l._elements.attLinkHref,J=l._elements.attLinkIsBlankCheckbox;if(l._selection.editRange.collapsed){var ie=document.createElement("A"),ge=document.createTextNode(k.value);ie.append(ge),ie.setAttribute("href",$.value),ie.setAttribute("class",m(l._noteName,l._id,"linker")),ie.setAttribute("style",Ee(E.getObjectNoteCss(l))),J.checked&&ie.setAttribute("target","_blank"),l._selection.editRange.insertNode(ie),E.setNewSelection(ie,1,ie,1)}else{var Ce=new Object;Ce.href=$.value,Ce.class=m(l._noteName,l._id,"linker"),J.checked&&(Ce.target="_blank"),E.modifySelectedSingleElement(l,null,"a",Ce)}E.recodeNote(l),E.closeAllModal(l)}}else E.closeAllModal(l)},j.events.elementEvents.attLinkTooltipEditButton_onClick=function(s){var l=a(s.target);if(l){var k=E.getPreviousElementsUntilNotTag(l._selection.editStartElement,"A",j.consts),$=E.getNextElementsUntilNotTag(l._selection.editStartElement,"A",j.consts),J=k[k.length-1],ie=$[$.length-1];E.recodeNote(l);var ge=E.setNewSelection(J.firstChild,0,ie.firstChild,ie.firstChild.length);E.setEditSelection(l,ge),E.openAttLinkModal(l)}},j.events.elementEvents.attLinkTooltipUnlinkButton_onClick=function(s){var l=a(s.target);if(l){var k=E.getPreviousElementsUntilNotTag(l._selection.editStartElement,"A",j.consts),$=E.getNextElementsUntilNotTag(l._selection.editStartElement,"A",j.consts),J=k[k.length-1],ie=$[$.length-1];E.recodeNote(l);var ge=E.setNewSelection(J.firstChild,0,ie.firstChild,ie.firstChild.length);E.setEditSelection(l,ge),E.modifySelectedSingleElement(l,null,"SPAN",{})}},j.events.elementEvents.attFileButton_onClick=function(s){var l=a(s.target);if(l){E.doIncreaseTextareaHeight(j),E.closeAllModal(l),E.closeAllSelectBoxes(l),E.setAllModalSize(l);var k=c(l._noteName,l._id,"on_display_block"),$=c(l._noteName,l._id,"on_display_none");l._elements.modalBack.classList.remove($),l._elements.modalBack.classList.add(k),l._elements.attFileModal.classList.remove($),l._elements.attFileModal.classList.add(k)}},j.events.elementEvents.attFileModal_onClick=function(s){},j.events.elementEvents.attFileUploadButton_onClick=function(s){var l=a(s.target);l&&l._elements.attFileUpload.click()},j.events.elementEvents.attFileUploadDiv_onDragover=function(s){s.stopPropagation(),s.preventDefault(),s.dataTransfer.dropEffect="copy"},j.events.elementEvents.attFileUploadDiv_onDrop=function(s){s.preventDefault();var l=a(s.target);if(l){var k=Array.from(s.dataTransfer.files);k.sort(function(J,ie){return J.name<ie.name?-1:J.name>ie.name?1:0});for(var $=0;$<k.length;$++)l._attTempFiles[W()]=k[$];E.setAttTempFileValid(l),E.setAttFileUploadDiv(l)}},j.events.elementEvents.attFileUploadDiv_onClick=function(s){var l=s.target.getAttribute("uuid");if(l){var k=a(s.target);k&&(delete k._attTempFiles[l],s.target.remove(),k._elements.attFileUploadDiv.childNodes.length<=0&&(k._elements.attFileUploadDiv.textContent=j.languageSet[k._attributes.language].attFileUploadDiv,k._elements.attFileUploadDiv.style.lineHeight=130*k._attributes.sizeRate+"px"))}},j.events.elementEvents.attFileUpload_onInput=function(s){var l=a(s.target);if(l){var k=Array.from(s.target.files);k.sort(function(J,ie){return J.name<ie.name?-1:J.name>ie.name?1:0});for(var $=0;$<k.length;$++)l._attTempFiles[W()]=k[$];E.setAttTempFileValid(l),E.setAttFileUploadDiv(l)}},j.events.elementEvents.attFileUpload_onBlur=function(s){a(s.target)},j.events.elementEvents.attFileInsertButton_onClick=function(s){var l=a(s.target);if(l)if(E.isValidSelection(l))if(l._selection.editStartUnitElement){var k=Object.keys(l._attTempFiles);if(k.length<=0)E.closeAllModal(l);else{for(var $,J,ie,ge=l._selection.editStartUnitElement,Ce=k.length-1;Ce>=0;Ce--)$=document.createElement(ge.tagName),(J=E.getElement("","a","",{class:m(l._noteName,l._id,"downloader"),uuid:k[Ce],"data-note-id":l._id,href:URL.createObjectURL(l._attTempFiles[k[Ce]]),download:l._attTempFiles[k[Ce]].name,style:Ee(E.getObjectNoteCss(l))},l)).innerText="download : "+l._attTempFiles[k[Ce]].name,$.appendChild(J),ge.parentNode.insertBefore($,ge.nextSibling),l._attFiles[k[Ce]]=l._attTempFiles[k[Ce]],Ce===k.length-1&&(ie=$);E.closeAllModal(l),E.recodeNote(l),E.setNewSelection(ie,1,ie,1)}}else E.closeAllModal(l);else E.closeAllModal(l)},j.events.elementEvents.attImageButton_onClick=function(s){var l=a(s.target);if(l){E.doIncreaseTextareaHeight(j),E.closeAllModal(l),E.closeAllSelectBoxes(l),E.setAllModalSize(l);var k=c(l._noteName,l._id,"on_display_block"),$=c(l._noteName,l._id,"on_display_none");l._elements.modalBack.classList.remove($),l._elements.modalBack.classList.add(k),l._elements.attImageModal.classList.remove($),l._elements.attImageModal.classList.add(k)}},j.events.elementEvents.attImageModal_onClick=function(s){},j.events.elementEvents.attImageUploadButtonAndView_onDragover=function(s){s.stopPropagation(),s.preventDefault(),s.dataTransfer.dropEffect="copy"},j.events.elementEvents.attImageUploadButtonAndView_onDrop=function(s){s.preventDefault();var l=a(s.target);if(l){for(var k=Array.from(s.dataTransfer.files),$=0;$<k.length;$++)l._attTempImages[W()]=k[$];E.setAttTempImageValid(l),E.setAttImageUploadAndView(l)}},j.events.elementEvents.attImageUploadButtonAndView_onClick=function(s){var l=a(s.target);l&&l._elements.attImageUpload.click()},j.events.elementEvents.attImageViewPreButton_onClick=function(s){var l=a(s.target);if(l){var k=l._elements.attImageUploadButtonAndView.offsetWidth/1.5+10;l._elements.attImageUploadButtonAndView.scrollLeft-=k}},j.events.elementEvents.attImageViewNextButton_onClick=function(s){var l=a(s.target);if(l){var k=l._elements.attImageUploadButtonAndView.offsetWidth/1.5+10;l._elements.attImageUploadButtonAndView.scrollLeft+=k}},j.events.elementEvents.attImageUpload_onInput=function(s){var l=a(s.target);if(l){for(var k=Array.from(s.target.files),$=0;$<k.length;$++)l._attTempImages[W()]=k[$];E.setAttTempImageValid(l),E.setAttImageUploadAndView(l)}},j.events.elementEvents.attImageUpload_onBlur=function(s){a(s.target)},j.events.elementEvents.attImageURL_onInput=function(s){var l=a(s.target);if(l){var k=s.target.value;if(k){l._elements.attImageUploadButtonAndView.replaceChildren();var $=document.createElement("img");$.src=k,$.style.width="auto",$.style.height="100%",$.style.display="inline-block",$.style.margin="0 5px",l._elements.attImageUploadButtonAndView.appendChild($)}else l._elements.attImageUploadButtonAndView.textContent=j.languageSet[l._attributes.language].attImageUploadButtonAndView}},j.events.elementEvents.attImageURL_onBlur=function(s){a(s.target)},j.events.elementEvents.attImageInsertButton_onClick=function(s){var l=!1,k=a(s.target);if(k)if(E.isValidSelection(k))if(k._selection.editStartUnitElement){if(k._elements.attImageURL.value){var $=k._elements.attImageURL.value,J=k._selection.editStartUnitElement,ie=document.createElement(J.tagName),ge=E.getElement("","img","",{class:m(k._noteName,k._id,"image_viewer"),"data-note-id":k._id,src:$,style:"width: 100%; overflow:hidden;",title:""},k);return ie.appendChild(ge),J.parentNode.insertBefore(ie,J.nextSibling),E.closeAllModal(k),l=!0,void E.setNewSelection(ie,0,ie,0)}var Ce=Object.keys(k._attTempImages);if(Ce.length>0){for(var He,Le,Ke,Ze=k._selection.editStartUnitElement,et=Ce.length-1;et>=0;et--)k._attImages[Ce[et]]=k._attTempImages[Ce[et]],He=document.createElement(Ze.tagName),Le=E.getElement("","img","",{class:m(k._noteName,k._id,"image_viewer"),uuid:Ce[et],"data-note-id":k._id,src:URL.createObjectURL(k._attImages[Ce[et]]),style:"width: 100%; overflow:hidden;",title:""},k),He.appendChild(Le),Ze.parentNode.insertBefore(He,Ze.nextSibling),et===0&&(Ke=He);return E.closeAllModal(k),l=!0,void E.setNewSelection(Ke,0,Ke,0)}l&&E.recodeNote(k),E.closeAllModal(k)}else E.closeAllModal(k);else E.closeAllModal(k)},j.events.elementEvents.attVideoButton_onClick=function(s){var l=a(s.target);if(l){E.doIncreaseTextareaHeight(j),E.closeAllModal(l);var k=c(l._noteName,l._id,"on_display_block"),$=c(l._noteName,l._id,"on_display_none");l._elements.modalBack.classList.remove($),l._elements.modalBack.classList.add(k),l._elements.attVideoModal.classList.remove($),l._elements.attVideoModal.classList.add(k),l._elements.attVideoEmbedId.value="",l._elements.attVideoWidth.value=100,l._elements.attVideoHeight.value=500,E.validCheckAttVideo(l)}},j.events.elementEvents.attVideoModal_onClick=function(s){},j.events.elementEvents.attVideoEmbedId_onInput=function(s){var l=a(s.target);l&&E.validCheckAttVideo(l)},j.events.elementEvents.attVideoEmbedId_onBlur=function(s){var l=a(s.target);l&&E.validCheckAttVideo(l)},j.events.elementEvents.attVideoWidth_onInput=function(s){if(s.target.value){var l=s.target.value;ee(l)||(s.target.value="")}},j.events.elementEvents.attVideoWidth_onBlur=function(s){s.target.value||(s.target.value=100);var l=s.target.value;l<10&&(l=10),l>100&&(l=100),s.target.value=l;var k=a(s.target);k&&E.recodeNote(k)},j.events.elementEvents.attVideoHeight_onInput=function(s){if(s.target.value){var l=s.target.value;ee(l)||(s.target.value="")}},j.events.elementEvents.attVideoHeight_onBlur=function(s){s.target.value||(s.target.value=500);var l=s.target.value;l<50&&(l=50),l>1e3&&(l=1e3),s.target.value=l;var k=a(s.target);k&&E.recodeNote(k)},j.events.elementEvents.attVideoInsertButton_onClick=function(s){var l=a(s.target);if(l)if(E.isValidSelection(l)){if(l._elements.attVideoValidCheckbox.checked)if(l._selection.editStartUnitElement){if(l._elements.attVideoEmbedId.value){var k,$,J="https://www.youtube.com/embed/"+l._elements.attVideoEmbedId.value,ie=l._selection.editStartUnitElement,ge="overflow:hidden;width:"+l._elements.attVideoWidth.value+"%;height:"+l._elements.attVideoHeight.value+"px;";return k=document.createElement(ie.tagName),$=E.getElement("","iframe","",{class:m(l._noteName,l._id,"video_viewer"),"data-note-id":l._id,src:J,title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:"",style:ge},l),k.appendChild($),ie.parentNode.insertBefore(k,ie.nextSibling),E.closeAllModal(l),E.recodeNote(l),void E.setNewSelection(k,0,k,0)}E.closeAllModal(l)}else E.closeAllModal(l)}else E.closeAllModal(l)},j.events.elementEvents.attImageAndVideoTooltipWidthInput_onInput=function(s){if(s.target.value){var l=s.target.value;ee(l)||(s.target.value="")}},j.events.elementEvents.attImageAndVideoTooltipWidthInput_onBlur=function(s){E.setImageAndVideoWidth(s.target)},j.events.elementEvents.attImageAndVideoTooltipWidthInput_onKeyup=function(s){s.key==="Enter"&&E.setImageAndVideoWidth(s.target)},j.events.elementEvents.attImageAndVideoTooltipFloatRadioNone_onClick=function(s){var l=a(s.target);if(l){var k=l._selection.editStartNode.cloneNode(!0);k.tagName!=="IMG"&&k.tagName!=="IFRAME"||(k.style.float="none",l._selection.editStartNode.parentNode.replaceChild(k,l._selection.editStartNode),l._selection.editStartNode=k,E.recodeNote(l))}},j.events.elementEvents.attImageAndVideoTooltipFloatRadioLeft_onClick=function(s){var l=a(s.target);if(l){var k=l._selection.editStartNode.cloneNode(!0);k.tagName!=="IMG"&&k.tagName!=="IFRAME"||(k.style.float="left",l._selection.editStartNode.parentNode.replaceChild(k,l._selection.editStartNode),l._selection.editStartNode=k,E.recodeNote(l))}},j.events.elementEvents.attImageAndVideoTooltipFloatRadioRight_onClick=function(s){var l=a(s.target);if(l){var k=l._selection.editStartNode.cloneNode(!0);k.tagName!=="IMG"&&k.tagName!=="IFRAME"||(k.style.float="right",l._selection.editStartNode.parentNode.replaceChild(k,l._selection.editStartNode),l._selection.editStartNode=k,E.recodeNote(l))}},j.events.elementEvents.attImageAndVideoTooltipShapeRadioSquare_onClick=function(s){var l=a(s.target);if(l){var k=l._selection.editStartNode;k.tagName!=="IMG"&&k.tagName!=="IFRAME"||(k.style.removeProperty("border-radius"),l._selection.editStartNode.parentNode.replaceChild(k,l._selection.editStartNode),l._selection.editStartNode=k,E.recodeNote(l))}},j.events.elementEvents.attImageAndVideoTooltipShapeRadioRadius_onClick=function(s){var l=a(s.target);if(l){var k=l._selection.editStartNode;k.tagName!=="IMG"&&k.tagName!=="IFRAME"||(k.style.borderRadius="5%",l._selection.editStartNode.parentNode.replaceChild(k,l._selection.editStartNode),l._selection.editStartNode=k,E.recodeNote(l))}},j.events.elementEvents.attImageAndVideoTooltipShapeRadioCircle_onClick=function(s){var l=a(s.target);if(l){var k=l._selection.editStartNode;k.tagName!=="IMG"&&k.tagName!=="IFRAME"||(k.style.borderRadius="50%",l._selection.editStartNode.parentNode.replaceChild(k,l._selection.editStartNode),l._selection.editStartNode=k,E.recodeNote(l))}},j.events.elementEvents.fontSizeInputBox_onClick=function(s){var l=a(s.target);l&&(l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.fontSizeInput_onClick=function(s){},j.events.elementEvents.fontSizeInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);k&&(ee(l)?k._status.fontSize=l:s.target.value="")}},j.events.elementEvents.fontSizeInput_onBlur=function(s){var l=a(s.target);if(l){s.target.value||(s.target.value=l._status.fontSize);var k=Number(s.target.value);return k>120?(s.target.value="120",void(l._status.fontSize=s.target.value)):(k<6&&(s.target.value="6"),void(l._status.fontSize=s.target.value))}},j.events.elementEvents.letterSpacingInputBox_onClick=function(s){var l=a(s.target);l&&(l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.letterSpacingInput_onClick=function(s){},j.events.elementEvents.letterSpacingInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);k&&(re(l)?k._status.letterSpacing=l:s.target.value="")}},j.events.elementEvents.letterSpacingInput_onBlur=function(s){var l=a(s.target);if(l){if(!s.target.value)return s.target.value="0",void(l._status.letterSpacing=s.target.value);var k=Number(s.target.value);return k>30?(s.target.value="30",void(l._status.letterSpacing=s.target.value)):(k<-5&&(s.target.value="-5"),void(l._status.letterSpacing=s.target.value))}},j.events.elementEvents.lineHeightInputBox_onClick=function(s){var l=a(s.target);l&&(l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.lineHeightInput_onClick=function(s){},j.events.elementEvents.lineHeightInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);k&&(ee(l)?k._status.lineHeight=s.target.value:s.target.value="")}},j.events.elementEvents.lineHeightInput_onBlur=function(s){var l=a(s.target);if(l){s.target.value||(s.target.value=l._status.lineHeight);var k=Number(s.target.value);return k>150?(s.target.value="150",void(l._status.lineHeight=s.target.value)):(k<6&&(s.target.value="6"),void(l._status.lineHeight=s.target.value))}},j.events.elementEvents.fontFamilySelect_onClick=function(s){var l=a(s.target);l&&(E.selectToggle(s.target),X()||E.setOriginEditSelection(l))},j.events.elementEvents.colorTextSelect_onClick=function(s){var l=a(s.target);l&&(E.selectToggle(s.target),X()||E.setOriginEditSelection(l))},j.events.elementEvents.colorTextSelectBox_onClick=function(s){},j.events.elementEvents.colorTextRInput_onClick=function(s){},j.events.elementEvents.colorTextRInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);if(k)return fe(l)?void(l.length===2&&(k._status.colorTextR=l,k._elements.colorText0.style.backgroundColor="#"+k._status.colorTextR+k._status.colorTextG+k._status.colorTextB)):(l=k._status.colorTextR,void(s.target.value=l))}},j.events.elementEvents.colorTextRInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(fe(l)?l.length!==2&&(s.target.value=k._status.colorTextR):s.target.value=k._status.colorTextR)},j.events.elementEvents.colorTextGInput_onClick=function(s){},j.events.elementEvents.colorTextGInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);if(k)return fe(l)?void(l.length===2&&(k._status.colorTextG=l,k._elements.colorText0.style.backgroundColor="#"+k._status.colorTextR+k._status.colorTextG+k._status.colorTextB)):(l=k._status.colorTextG,void(s.target.value=l))}},j.events.elementEvents.colorTextGInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(fe(l)?l.length!==2&&(s.target.value=k._status.colorTextG):s.target.value=k._status.colorTextG)},j.events.elementEvents.colorTextBInput_onClick=function(s){},j.events.elementEvents.colorTextBInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);if(k)return fe(l)?void(l.length===2&&(k._status.colorTextB=l,k._elements.colorText0.style.backgroundColor="#"+k._status.colorTextR+k._status.colorTextG+k._status.colorTextB)):(l=k._status.colorTextB,void(s.target.value=l))}},j.events.elementEvents.colorTextBInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(fe(l)?l.length!==2&&(s.target.value=k._status.colorTextB):s.target.value=k._status.colorTextB)},j.events.elementEvents.colorTextOpacityInput_onClick=function(s){},j.events.elementEvents.colorTextOpacityInput_onInput=function(s){if(s.target.value!=="01"&&s.target.value!=="10"||(s.target.value=s.data),s.target.value){var l=s.target.value,k=a(s.target);if(k){if(!re(l))return l=k._status.colorTextO,void(s.target.value=l);l.length>=3&&l<.1&&(l=.1),l>1&&(l=1),l>=.1&&l<=1&&(s.target.value=Math.round(10*l)/10),k._status.colorTextO=l,k._elements.colorText0.style.opacity=k._status.colorTextO}}},j.events.elementEvents.colorTextOpacityInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(re(l)||(s.target.value=k._status.colorTextO))},j.events.elementEvents.colorText0_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB="#"+l._status.colorTextR+l._status.colorTextG+l._status.colorTextB,l._status.colorTextOpacity=l._status.colorTextO,X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity==="0"?1:l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText1_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color14),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText2_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color15),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText3_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color16),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText4_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color17),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText5_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color18),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText6_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color19),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorText7_onClick=function(s){var l=a(s.target);l&&(l._status.colorTextRGB=Pe(j.colors.color20),l._status.colorTextOpacity="1",X()||(l._elements.colorTextSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorTextRGB,l._status.colorTextOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBackSelect_onClick=function(s){var l=a(s.target);l&&(E.selectToggle(s.target),X()||E.setOriginEditSelection(l))},j.events.elementEvents.colorBackSelectBox_onClick=function(s){},j.events.elementEvents.colorBackRInput_onClick=function(s){},j.events.elementEvents.colorBackRInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);if(k)return fe(l)?void(l.length===2&&(k._status.colorBackR=l,k._elements.colorBack0.style.backgroundColor="#"+k._status.colorBackR+k._status.colorBackG+k._status.colorBackB)):(l=k._status.colorBackR,void(s.target.value=l))}},j.events.elementEvents.colorBackRInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(fe(l)?l.length!==2&&(s.target.value=k._status.colorBackR):s.target.value=k._status.colorBackR)},j.events.elementEvents.colorBackGInput_onClick=function(s){},j.events.elementEvents.colorBackGInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);if(k)return fe(l)?void(l.length===2&&(k._status.colorBackG=l,k._elements.colorBack0.style.backgroundColor="#"+k._status.colorBackR+k._status.colorBackG+k._status.colorBackB)):(l=k._status.colorBackG,void(s.target.value=l))}},j.events.elementEvents.colorBackGInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(fe(l)?l.length!==2&&(s.target.value=k._status.colorBackG):s.target.value=k._status.colorBackG)},j.events.elementEvents.colorBackBInput_onClick=function(s){},j.events.elementEvents.colorBackBInput_onInput=function(s){if(s.target.value){var l=s.target.value,k=a(s.target);if(k)return fe(l)?void(l.length===2&&(k._status.colorBackB=l,k._elements.colorBack0.style.backgroundColor="#"+k._status.colorBackR+k._status.colorBackG+k._status.colorBackB)):(l=k._status.colorBackB,void(s.target.value=l))}},j.events.elementEvents.colorBackBInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(fe(l)?l.length!==2&&(s.target.value=k._status.colorBackB):s.target.value=k._status.colorBackB)},j.events.elementEvents.colorBackOpacityInput_onClick=function(s){},j.events.elementEvents.colorBackOpacityInput_onInput=function(s){if(s.target.value!=="01"&&s.target.value!=="10"||(s.target.value=s.data),s.target.value){var l=s.target.value,k=a(s.target);if(k){if(!re(l))return l=k._status.colorBackO,void(s.target.value=l);l.length>=3&&l<.1&&(l=.1),l>1&&(l=1),l>=.1&&l<=1&&(s.target.value=Math.round(10*l)/10),k._status.colorBackO=l,k._elements.colorBack0.style.opacity=k._status.colorBackO}}},j.events.elementEvents.colorBackOpacityInput_onBlur=function(s){var l=s.target.value,k=a(s.target);k&&(re(l)||(s.target.value=k._status.colorBackO))},j.events.elementEvents.colorBack0_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB="#"+l._status.colorBackR+l._status.colorBackG+l._status.colorBackB,l._status.colorBackOpacity=l._status.colorBackO,X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity==="0"?1:l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack1_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color14),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack2_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color15),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack3_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color16),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack4_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color17),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack5_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color18),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack6_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color19),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.colorBack7_onClick=function(s){var l=a(s.target);l&&(l._status.colorBackRGB=Pe(j.colors.color20),l._status.colorBackOpacity="1",X()||(l._elements.colorBackSelect.querySelector("."+C(l._noteName)).style.color=Te(l._status.colorBackRGB,l._status.colorBackOpacity)),l._selection.editRange&&l._selection.editRange.collapsed?E.setOriginEditSelection(l):(E.modifySelectedSingleElement(l,E.getObjectNoteCss(l)),E.recodeNote(l)))},j.events.elementEvents.formatClearButton_onClick=function(s){var l=a(s.target);l&&(l._selection.editRange&&l._selection.editRange.collapsed?(E.initToggleButtonVariables(l),E.setOriginEditSelection(l)):(E.modifySelectedSingleElement(l,{"font-size":l._attributes.defaultTextareaFontSize+"px","line-height":l._attributes.defaultTextareaLineHeight+"px","font-family":l._attributes.defaultTextareaFontFamily}),E.recodeNote(l)))},j.events.elementEvents.undoButton_onClick=function(s){var l=a(s.target);!l&&j&&(l=j.vanillanoteElements[j.variables.lastActiveNoteId]),l&&(j.events.documentEvents.noteObserver.disconnect(),l._recodes.recodeCount<=0||(l._recodes.recodeCount=l._recodes.recodeCount-1,E.replaceDifferentBetweenElements(j,l._elements.textarea,l._recodes.recodeNotes[l._recodes.recodeCount]),E.connectObserver(j)))},j.events.elementEvents.redoButton_onClick=function(s){var l=a(s.target);!l&&j&&(l=j.vanillanoteElements[j.variables.lastActiveNoteId]),l&&(j.events.documentEvents.noteObserver.disconnect(),l._recodes.recodeCount>=l._recodes.recodeNotes.length-1||(l._recodes.recodeCount=l._recodes.recodeCount+1,E.replaceDifferentBetweenElements(j,l._elements.textarea,l._recodes.recodeNotes[l._recodes.recodeCount]),E.connectObserver(j)))},j.events.elementEvents.helpButton_onClick=function(s){var l=a(s.target);if(l){E.doIncreaseTextareaHeight(j),E.closeAllModal(l),E.closeAllSelectBoxes(l),E.setAllModalSize(l);var k=c(l._noteName,l._id,"on_display_block"),$=c(l._noteName,l._id,"on_display_none");l._elements.modalBack.classList.remove($),l._elements.modalBack.classList.add(k),l._elements.helpModal.classList.remove($),l._elements.helpModal.classList.add(k)}},j.events.elementEvents.helpModal_onClick=function(s){},j.events.elementEvents.modalBack_onClick=function(s){var l=a(s.target);l&&E.closeAllModal(l)},j.events.elementEvents.placeholder_onClick=function(s){var l=a(s.target);l&&(E.closePlaceholder(l),l._elements.textarea.focus())},j.events.elementEvents.textarea_onClick=function(s){var l=a(s.target);l&&E.closeAllSelectBoxes(l)},j.events.elementEvents.textarea_onFocus=function(s){var l=a(s.target);l&&(E.closePlaceholder(l),E.doEditUnitCheck(l))},j.events.elementEvents.textarea_onBlur=function(s){var l=a(s.target);l&&(E.openPlaceholder(l),j.events.documentEvents.noteObserver.disconnect(),E.removeEmptyElment(s.target,l),E.connectObserver(j))},j.events.elementEvents.textarea_onKeydown=function(s){var l=s.target;s.key==="Enter"&&(s.shiftKey||E.textarea_onKeydownEnter(l)),!s.ctrlKey&&!s.metaKey||s.key!=="z"&&s.key!=="Z"||(s.preventDefault(),j.events.elementEvents.undoButton_onClick(s)),!s.ctrlKey&&!s.metaKey||s.key!=="y"&&s.key!=="Y"||(s.preventDefault(),j.events.elementEvents.redoButton_onClick(s))},j.events.elementEvents.textarea_onKeyup=function(s){var l=s.target,k=a(l);k&&(E.closePlaceholder(k),j.events.documentEvents.noteObserver.disconnect(),l.firstChild?(!s.ctrlKey&&!s.metaKey||s.key!=="v"&&s.key!=="V"||(s.preventDefault(),E.doEditUnitCheck(k)),E.connectObserver(j)):E.initTextarea(l))},j.events.elementEvents.textarea_onBeforeinput=function(s){!X()&&s.data&&(j.events.documentEvents.noteObserver.disconnect(),E.textarea_onBeforeinputSpelling(s),E.connectObserver(j))}}(Xe,Ut)}},yn=function(){if(Xe){var f=Xe.variables.noteName,h=document.getElementById("".concat(f,"_animation_styles-sheet"));h&&h.remove();var I=document.getElementById("".concat(f,"_icons-link"));I&&I.remove();var be=Xe.events.documentEvents;be.selectionchange&&document.removeEventListener("selectionchange",be.selectionchange),be.keydown&&document.removeEventListener("keydown",be.keydown),be.resize&&window.removeEventListener("resize",be.resize),be.resizeViewport&&window.visualViewport&&window.visualViewport.removeEventListener("resize",be.resizeViewport),Object.keys(Xe.vanillanoteElements).forEach(function(Be){Xe.vanillanoteElements[Be],Yn(Xe),delete Xe.vanillanoteElements[Be]}),Xe.colors={},Xe.languageSet={},Xe.attributes={},Xe.variables={},Xe.vanillanoteElements={},Xe.events.documentEvents={noteObserver:null,selectionchange:null,keydown:null,resize:null,resizeViewport:null},Xe.events.cssEvents={target_onClick:null,target_onMouseover:null,target_onMouseout:null,target_onTouchstart:null,target_onTouchend:null},Object.keys(Xe.events.elementEvents).forEach(function(Be){Xe.events.elementEvents[Be]=null}),Xe.getNote=function(){return null},Xe.init=function(){},Xe.mountNote=function(){},Xe.unmountNote=function(){},Xe.destroy=function(){},Xe=null}},Rn=function(){return{colors:{color1:"#333333",color2:"#ffffff",color3:"#f8f8f8",color4:"#f4f4f4",color5:"#cbcbcb",color6:"#cfcfcf",color7:"#6f6f6f",color8:"#609966",color9:"#ea5455",color10:"#333333",color11:"#666666",color12:"#333333",color13:"#ffffff",color14:"#ff7f7f",color15:"#ffad66",color16:"#ffff66",color17:"#99ff99",color18:"#99ccff",color19:"#6699cc",color20:"#cc99cc"},languageSet:{ENG:{textareaTooltip:"HELLO VANILLANOTE!",thanks:"Thank you!",styleTooltip:"Please let me know your style.",boldTooltip:"This is a bold button.",underlineTooltip:"This is a under line button.",italicTooltip:"This is a italic button.",ulTooltip:"This is a ul button.",olTooltip:"This is a ol button.",textAlignTooltip:"Select your text align.",attLinkTooltip:"This is a attach link button.",attFileTooltip:"This is a attach file button.",attImageTooltip:"This is a attach image button.",attVideoTooltip:"This is a attach video button.",fontSizeTooltip:"Please let me know the font size.",letterSpacingTooltip:"Please let me know the letter spacing.",lineHeightTooltip:"Please let me know the line height.",fontFamilyTooltip:"Please let me know your font family.",colorTextTooltip:"This is a text color button.",colorBackTooltip:"This is a background color button.",formatClearButtonTooltip:"clear your format.",undoTooltip:"undo",redoTooltip:"redo",helpTooltip:"What can i help you.",attLinkModalTitle:"INSERT LINK",attLinkInTextExplain:"Text to display",attLinkInLinkExplain:"To what URL should this link go?",attLinkIsOpenExplain:" Open in new window",attLinkInTextTooltip:"Please let me know the text.",attLinkInLinkTooltip:"Please let me know the link.",attLinkIsOpenTooltip:"Does it open in a new window?",attFileModalTitle:"INSERT FILE",attFileExplain1:"Please upload your file",attFileUploadButton:"file upload",attFileUploadDiv:"drop your files!",attFileListTooltip:"remove",attImageModalTitle:"INSERT IMAGE",attImageUploadButtonAndView:"Image upload",attImageExplain1:"Please upload your image",attImageExplain2:"URL",attImageURLTooltip:"Please let me know the URL.",attOverSize:"The file exceeds the allowed size.",attPreventType:"The file is not of an allowed type.",attVideoModalTitle:"INSERT YOUTUBE",attVideoExplain1:"Youtube Embed Id",attVideoExplain2:"Check your size",attVideoEmbedIdTooltip:"Please let me know the embed id.",attVideoWidthTooltip:"Please let me know the width percent.",attVideoHeightTooltip:"Please let me know the height pixel.",attImageAndVideoTooltipWidthInput:"width",attImageAndVideoTooltipFloatRadio:"float",attImageAndVideoTooltipShapeRadio:"Shape",helpModalTitle:"Help",helpContent:[{"ctrl + z":"Undo the last command"},{"ctrl + y":"Redo the last command"},{"ctrl + b":"Set a bold style"},{"ctrl + u":"Set a underline style"},{"ctrl + i":"Set a italic style"},{enter:"Add new line as new block"},{"shift + enter":"Add new line in now block"},{etc1:"On mobile, you can only change the style after dragging."},{etc2:"Uploading a video requires using the YouTube embed id."}]},KOR:{textareaTooltip:"",thanks:"감사합니다!",styleTooltip:"문단 스타일",boldTooltip:"굵게",underlineTooltip:"밑줄",italicTooltip:"기울게",ulTooltip:"목록",olTooltip:"번호 목록",textAlignTooltip:"수평 정렬",attLinkTooltip:"링크 첨부",attFileTooltip:"파일 첨부",attImageTooltip:"이미지 첨부",attVideoTooltip:"동영상 첨부",fontSizeTooltip:"글자 크기",letterSpacingTooltip:"자간",lineHeightTooltip:"수직 넓기",fontFamilyTooltip:"글씨체",colorTextTooltip:"글자 색상",colorBackTooltip:"배경 색상",formatClearButtonTooltip:"효과 제거",undoTooltip:"실행 취소",redoTooltip:"다시 실행",helpTooltip:"도움말",attLinkModalTitle:"링크 삽입",attLinkInTextExplain:"보여질 문장을 넣어주세요.",attLinkInLinkExplain:"이동할 링크를 넣어주세요.",attLinkIsOpenExplain:" 새창열기?",attLinkInTextTooltip:"문장을 넣어주세요.",attLinkInLinkTooltip:"링크를 넣어주세요.",attLinkIsOpenTooltip:"클릭 시 새로운 창에서 열립니다.",attFileModalTitle:"파일 삽입",attFileExplain1:"파일을 업로드 해주세요.",attFileUploadButton:"파일 선택",attFileUploadDiv:"파일을 떨궈 주세요.",attFileListTooltip:"삭제",attImageModalTitle:"이미지 삽입",attImageUploadButtonAndView:"이미지 선택",attImageExplain1:"이미지를 업로드 해주세요.",attImageExplain2:"URL",attImageURLTooltip:"URL을 지정 해주세요.",attOverSize:"파일은 허용 용량을 초과했습니다.",attPreventType:"파일은 허용된 유형이 아닙니다.",attVideoModalTitle:"유튜브 삽입",attVideoExplain1:"Youtube Embed Id",attVideoExplain2:"프레임 크기",attVideoEmbedIdTooltip:"유튜브 embed id를 알려주세요.",attVideoWidthTooltip:"%",attVideoHeightTooltip:"PX",attImageAndVideoTooltipWidthInput:"가로",attImageAndVideoTooltipFloatRadio:"띄우기",attImageAndVideoTooltipShapeRadio:"모양",helpModalTitle:"질문",helpContent:[{"ctrl + z":"실행취소"},{"ctrl + y":"다시실행"},{"ctrl + b":"굵게"},{"ctrl + u":"밑줄"},{"ctrl + i":"기울게"},{enter:"새로운 블럭에 새로운 라인은 추가합니다."},{"shift + enter":"기존 블럭에 새로운 라인을 추가합니다."},{etc1:"모바일에서는 드래그 후 스타일 적용만 가능합니다."},{etc2:"동영상 업로드는 YouTube embed id를 활용해야 합니다."}]}},attributes:{noteModeByDevice:i.adaptive,textareaOriginWidth:"100%",textareaOriginHeight:"500px",textareaMaxWidth:"100%",textareaMaxHeight:"900px",textareaHeightIsModify:!1,placeholderIsVisible:!1,placeholderAddTop:0,placeholderAddLeft:0,placeholderWidth:"",attFilePreventTypes:[],attFileAcceptTypes:[],attFileMaxSize:52428800,attImagePreventTypes:[],attImageAcceptTypes:["image/png","image/jpeg","image/bmp","image/gif","image/svg+xml","image/tiff","image/x-icon","image/vnd.microsoft.icon","image/webp","image/heif","image/heic","image/jp2","image/avif","video/mp4","video/webm","video/ogg","video/avi","video/mpeg","video/quicktime","video/x-ms-wmv","video/x-flv","video/3gpp","video/3gpp2","video/x-matroska"],attImageMaxSize:52428800,defaultTextareaFontSize:16,defaultTextareaLineHeight:16,defaultTextareaFontFamily:"Georgia",defaultToolFontFamily:"Georgia",language:"ENG",placeholderColor:"",placeholderBackgroundColor:"",placeholderTitle:"",placeholderTextContent:"",defaultFontFamilies:["Arial","Arial Black","Arial Narrow","Comic Sans MS","Courier","Georgia","Impact"],recodeLimit:100,mainColor:"",colorSet:"",invertColor:!1,usingParagraphStyle:!0,usingBold:!0,usingUnderline:!0,usingItalic:!0,usingUl:!0,usingOl:!0,usingTextAlign:!0,usingAttLink:!0,usingAttFile:!0,usingAttImage:!0,usingAttVideo:!0,usingFontSize:!0,usingLetterSpacing:!0,usingLineHeight:!0,usingFontFamily:!0,usingColorText:!0,usingColorBack:!0,usingFormatClear:!0,usingUndo:!0,usingRedo:!0,usingHelp:!0},variables:{noteName:"vanillanote",observerOptions:{characterData:!0,childList:!0,subtree:!0},lastActiveNoteId:"",lastScreenHeight:null,mobileKeyboardExceptHeight:null,isSelectionProgress:!1,preventChangeScroll:0,resizeInterval:50,inputInterval:50,loadInterval:100,canEvent:!0},iconSpanElement:{toolToggleButtonIcon:null,paragraphStyleSelectIcon:null,boldButtonIcon:null,underlineButtonIcon:null,italicButtonIcon:null,ulButtonIcon:null,olButtonIcon:null,textAlignSelectIcon:null,textAlignLeftButtonIcon:null,textAlignCenterButtonIcon:null,textAlignRightButtonIcon:null,attLinkButtonIcon:null,attLinkInsertButtonIcon:null,attLinkTooltipEditButtonIcon:null,attLinkTooltipUnlinkButtonIcon:null,attFileButtonIcon:null,attFileInsertButtonIcon:null,attImageButtonIcon:null,attImageViewPreButtonIcon:null,attImageViewNextButtonIcon:null,attImageInsertButtonIcon:null,attVideoButtonIcon:null,attVideoWidthTextIcon:null,attVideoHeightTextIcon:null,attVideoInsertButtonIcon:null,attImageAndVideoTooltipFloatRadioNoneLabelIcon:null,attImageAndVideoTooltipFloatRadioLeftLabelIcon:null,attImageAndVideoTooltipFloatRadioRightLabelIcon:null,attImageAndVideoTooltipShapeRadioSquareLabelIcon:null,attImageAndVideoTooltipShapeRadioRadiusLabelIcon:null,attImageAndVideoTooltipShapeRadioCircleLabelIcon:null,fontSizeInputBoxIcon:null,letterSpacingInputBoxIcon:null,lineHeightInputBoxIcon:null,colorTextSelectIcon:null,colorBackSelectIcon:null,formatClearButtonIcon:null,undoButtonIcon:null,redoButtonIcon:null,helpButtonIcon:null},useGoogleIcon:!0,beforeAlert:function(f){return!0}}};return o})())}(hi)),hi.exports}var Ra=_u();const vu=["left","center","right"];var Ks=(t=>(t.left="left",t.center="center",t.right="right",t))(Ks||{});const bu=["top","center","bottom"];var Xs=(t=>(t.top="top",t.center="center",t.bottom="bottom",t))(Xs||{});const Cu=["repeat","no-repeat","cover","contain"];var Js=(t=>(t.repeat="repeat",t.no_repeat="no-repeat",t.cover="cover",t.contain="contain",t))(Js||{});const Mu=["filled","empty","transparent"];var Zs=(t=>(t.filled="filled",t.empty="empty",t.transparent="transparent",t))(Zs||{});const xu=["header-left","header-center","header-right","footer-left","footer-center","footer-right"];var Qs=(t=>(t.headerLeft="header-left",t.headerCenter="header-center",t.headerRight="header-right",t.footerLeft="footer-left",t.footerCenter="footer-center",t.footerRight="footer-right",t))(Qs||{});const Su=["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"];var ec=(t=>(t.topLeft="top-left",t.topCenter="top-center",t.topRight="top-right",t.middleLeft="middle-left",t.middleCenter="middle-center",t.middleRight="middle-right",t.bottomLeft="bottom-left",t.bottomCenter="bottom-center",t.bottomRight="bottom-right",t))(ec||{});const ku=["ring","dots","bars","pulse"];var tc=(t=>(t.ring="ring",t.dots="dots",t.bars="bars",t.pulse="pulse",t))(tc||{});const Iu=["top","middle","bottom"];var nc=(t=>(t.top="top",t.middle="middle",t.bottom="bottom",t))(nc||{});const Eu=["normal","pre","pre-wrap","pre-line","break-spaces"];var oc=(t=>(t.normal="normal",t.pre="pre",t.preWrap="pre-wrap",t.preLine="pre-line",t.breakSpaces="break-spaces",t))(oc||{});const wu=["none","horizontal","vertical"];var rc=(t=>(t.none="none",t.horizontal="horizontal",t.vertical="vertical",t))(rc||{});const Au=["solid","dashed","dotted","double","groove","ridge","inset","outset"];var ic=(t=>(t.solid="solid",t.dashed="dashed",t.dotted="dotted",t.double="double",t.groove="groove",t.ridge="ridge",t.inset="inset",t.outset="outset",t))(ic||{});const Tu=["text","mask","number","digit","date","month","time","email","password","checkbox","range","color","textarea","select","radio"];var ac=(t=>(t.text="text",t.mask="mask",t.number="number",t.digit="digit",t.date="date",t.month="month",t.time="time",t.email="email",t.password="password",t.checkbox="checkbox",t.range="range",t.color="color",t.textarea="textarea",t.select="select",t.radio="radio",t))(ac||{});const Bu=["editable","disable","readonly"];var lc=(t=>(t.editable="editable",t.disable="disable",t.readonly="readonly",t))(lc||{});const Lu=["click","hover"];var sc=(t=>(t.click="click",t.hover="hover",t))(sc||{});const Nu=["left","center","right"];var cc=(t=>(t.left="left",t.center="center",t.right="right",t))(cc||{});const Ru=["single","range","none"],Hu=["yyyy-mm-dd","yyyy/mm/dd","yyyy. mm. dd","yyyymmdd","mm-dd-yyyy","mm/dd/yyyy","mm. dd. yyyy","mmddyyyy","dd-mm-yyyy","dd/mm/yyyy","dd. mm. yyyy","ddmmyyyy"],Fu=["yyyymm","yyyy-mm","yyyy/mm","yyyy. mm","mmyyyy","mm-yyyy","mm/yyyy","mm. yyyy"],Ou=["left","center","right"],Vu=["top","center","bottom"],Pu=["skyblue","blue","light_red","red","light_green","green","orange","yellow","purple","brown","black"],dc=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,uc=/^var\(--[a-z0-9\-]+\)$/i,Du=t=>typeof t=="string"&&(dc.test(t)||uc.test(t)||t.length>0),zu=["C","R","U","D"];var fc=(t=>(t.R="R",t.C="C",t.U="U",t.D="D",t))(fc||{}),hc=(t=>(t[t.sun=0]="sun",t[t.mon=1]="mon",t[t.tue=2]="tue",t[t.wed=3]="wed",t[t.thu=4]="thu",t[t.fri=5]="fri",t[t.sat=6]="sat",t))(hc||{});const Uu=["day","week","month","year","years"];var mc=(t=>(t.day="day",t.week="week",t.month="month",t.year="year",t.years="years",t))(mc||{});const Gu=["H","HH","h","hh","m","mm","H:m","H:mm","HH:m","HH:mm","h:m","h:mm","hh:m","hh:mm","H{am}","HH{am}","h{am}","hh{am}","m{am}","mm{am}","H:m{am}","H:mm{am}","HH:m{am}","HH:mm{am}","h:m{am}","h:mm{am}","hh:m{am}","hh:mm{am}"];var gc=(t=>(t.h24="H",t.hh24="HH",t.h="h",t.hh="hh",t.m="m",t.mm="mm",t["h24:m"]="H:m",t["h24:mm"]="H:mm",t["hh24:m"]="HH:m",t["hh24:mm"]="HH:mm",t["h:m"]="h:m",t["h:mm"]="h:mm",t["hh:m"]="hh:m",t["hh:mm"]="hh:mm",t["h24{am}"]="H{am}",t["hh24{am}"]="HH{am}",t["h{am}"]="h{am}",t["hh{am}"]="hh{am}",t["m{am}"]="m{am}",t["mm{am}"]="mm{am}",t["h24:m{am}"]="H:m{am}",t["h24:mm{am}"]="H:mm{am}",t["hh24:m{am}"]="HH:m{am}",t["hh24:mm{am}"]="HH:mm{am}",t["h:m{am}"]="h:m{am}",t["h:mm{am}"]="h:mm{am}",t["hh:m{am}"]="hh:m{am}",t["hh:mm{am}"]="hh:mm{am}",t))(gc||{});const ju=["ADAPTIVE","MOBILE","DESKTOP"],Wu=["TOP","BOTTOM"],qu=t=>($u(t),Na.getVanillagrid(t.component.grid)),$u=t=>{if(ce.componentStyle.primaryColor){const e=Vn(ce.componentStyle.primaryColor);Li(e)||console.warn(`[Hisonvue] Invalid mainColor: '${ce.componentStyle.primaryColor}'. Must be a valid hex color (e.g., '#ffffff').`),t.component.grid.attributes.defaultGridCssInfo.color=e}if(ce.componentStyle.size)switch(ce.componentStyle.size){case lo.s:t.component.grid.attributes.defaultGridCssInfo.sizeLevel=3;break;case lo.m:t.component.grid.attributes.defaultGridCssInfo.sizeLevel=5;break;case lo.l:t.component.grid.attributes.defaultGridCssInfo.sizeLevel=7;break;case lo.xl:t.component.grid.attributes.defaultGridCssInfo.sizeLevel=9;break}},Yu=t=>(Ku(t),Ra.getVanillanote(t.component.note)),Ku=t=>{if(ce.componentStyle.primaryColor){const e=Vn(ce.componentStyle.primaryColor);Li(e)||console.warn(`[Hisonvue] Invalid mainColor: '${ce.componentStyle.primaryColor}'. Must be a valid hex color (e.g., '#ffffff').`),t.component.note.attributes.mainColor=e}};/*!
61
+ * @kurkle/color v0.3.4
62
+ * https://github.com/kurkle/color#readme
63
+ * (c) 2024 Jukka Kurkela
64
+ * Released under the MIT License
65
+ */function cr(t){return t+.5|0}const Pn=(t,e,n)=>Math.max(Math.min(t,n),e);function Yo(t){return Pn(cr(t*2.55),0,255)}function Gn(t){return Pn(cr(t*255),0,255)}function Bn(t){return Pn(cr(t/2.55)/100,0,1)}function Il(t){return Pn(cr(t*100),0,100)}const cn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},pa=[..."0123456789ABCDEF"],Xu=t=>pa[t&15],Ju=t=>pa[(t&240)>>4]+pa[t&15],Xr=t=>(t&240)>>4===(t&15),Zu=t=>Xr(t.r)&&Xr(t.g)&&Xr(t.b)&&Xr(t.a);function Qu(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&cn[t[1]]*17,g:255&cn[t[2]]*17,b:255&cn[t[3]]*17,a:e===5?cn[t[4]]*17:255}:(e===7||e===9)&&(n={r:cn[t[1]]<<4|cn[t[2]],g:cn[t[3]]<<4|cn[t[4]],b:cn[t[5]]<<4|cn[t[6]],a:e===9?cn[t[7]]<<4|cn[t[8]]:255})),n}const ef=(t,e)=>t<255?e(t):"";function tf(t){var e=Zu(t)?Xu:Ju;return t?"#"+e(t.r)+e(t.g)+e(t.b)+ef(t.a,e):void 0}const nf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function yc(t,e,n){const o=e*Math.min(n,1-n),r=(i,a=(i+t/30)%12)=>n-o*Math.max(Math.min(a-3,9-a,1),-1);return[r(0),r(8),r(4)]}function of(t,e,n){const o=(r,i=(r+t/60)%6)=>n-n*e*Math.max(Math.min(i,4-i,1),0);return[o(5),o(3),o(1)]}function rf(t,e,n){const o=yc(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)o[r]*=1-e-n,o[r]+=e;return o}function af(t,e,n,o,r){return t===r?(e-n)/o+(e<n?6:0):e===r?(n-t)/o+2:(t-e)/o+4}function Ha(t){const n=t.r/255,o=t.g/255,r=t.b/255,i=Math.max(n,o,r),a=Math.min(n,o,r),c=(i+a)/2;let m,C,L;return i!==a&&(L=i-a,C=c>.5?L/(2-i-a):L/(i+a),m=af(n,o,r,L,i),m=m*60+.5),[m|0,C||0,c]}function Fa(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(Gn)}function Oa(t,e,n){return Fa(yc,t,e,n)}function lf(t,e,n){return Fa(rf,t,e,n)}function sf(t,e,n){return Fa(of,t,e,n)}function pc(t){return(t%360+360)%360}function cf(t){const e=nf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?Yo(+e[5]):Gn(+e[5]));const r=pc(+e[2]),i=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?o=lf(r,i,a):e[1]==="hsv"?o=sf(r,i,a):o=Oa(r,i,a),{r:o[0],g:o[1],b:o[2],a:n}}function df(t,e){var n=Ha(t);n[0]=pc(n[0]+e),n=Oa(n),t.r=n[0],t.g=n[1],t.b=n[2]}function uf(t){if(!t)return;const e=Ha(t),n=e[0],o=Il(e[1]),r=Il(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${r}%, ${Bn(t.a)})`:`hsl(${n}, ${o}%, ${r}%)`}const El={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},wl={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ff(){const t={},e=Object.keys(wl),n=Object.keys(El);let o,r,i,a,c;for(o=0;o<e.length;o++){for(a=c=e[o],r=0;r<n.length;r++)i=n[r],c=c.replace(i,El[i]);i=parseInt(wl[a],16),t[c]=[i>>16&255,i>>8&255,i&255]}return t}let Jr;function hf(t){Jr||(Jr=ff(),Jr.transparent=[0,0,0,0]);const e=Jr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const mf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function gf(t){const e=mf.exec(t);let n=255,o,r,i;if(e){if(e[7]!==o){const a=+e[7];n=e[8]?Yo(a):Pn(a*255,0,255)}return o=+e[1],r=+e[3],i=+e[5],o=255&(e[2]?Yo(o):Pn(o,0,255)),r=255&(e[4]?Yo(r):Pn(r,0,255)),i=255&(e[6]?Yo(i):Pn(i,0,255)),{r:o,g:r,b:i,a:n}}}function yf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Bn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const oa=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,bo=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function pf(t,e,n){const o=bo(Bn(t.r)),r=bo(Bn(t.g)),i=bo(Bn(t.b));return{r:Gn(oa(o+n*(bo(Bn(e.r))-o))),g:Gn(oa(r+n*(bo(Bn(e.g))-r))),b:Gn(oa(i+n*(bo(Bn(e.b))-i))),a:t.a+n*(e.a-t.a)}}function Zr(t,e,n){if(t){let o=Ha(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Oa(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function _c(t,e){return t&&Object.assign(e||{},t)}function Al(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Gn(t[3]))):(e=_c(t,{r:0,g:0,b:0,a:1}),e.a=Gn(e.a)),e}function _f(t){return t.charAt(0)==="r"?gf(t):cf(t)}class or{constructor(e){if(e instanceof or)return e;const n=typeof e;let o;n==="object"?o=Al(e):n==="string"&&(o=Qu(e)||hf(e)||_f(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=_c(this._rgb);return e&&(e.a=Bn(e.a)),e}set rgb(e){this._rgb=Al(e)}rgbString(){return this._valid?yf(this._rgb):void 0}hexString(){return this._valid?tf(this._rgb):void 0}hslString(){return this._valid?uf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,r=e.rgb;let i;const a=n===i?.5:n,c=2*a-1,m=o.a-r.a,C=((c*m===-1?c:(c+m)/(1+c*m))+1)/2;i=1-C,o.r=255&C*o.r+i*r.r+.5,o.g=255&C*o.g+i*r.g+.5,o.b=255&C*o.b+i*r.b+.5,o.a=a*o.a+(1-a)*r.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=pf(this._rgb,e._rgb,n)),this}clone(){return new or(this.rgb)}alpha(e){return this._rgb.a=Gn(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=cr(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Zr(this._rgb,2,e),this}darken(e){return Zr(this._rgb,2,-e),this}saturate(e){return Zr(this._rgb,1,e),this}desaturate(e){return Zr(this._rgb,1,-e),this}rotate(e){return df(this._rgb,e),this}}/*!
66
+ * Chart.js v4.5.0
67
+ * https://www.chartjs.org
68
+ * (c) 2025 Chart.js Contributors
69
+ * Released under the MIT License
70
+ */function wn(){}const vf=(()=>{let t=0;return()=>t++})();function vt(t){return t==null}function Ot(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function yt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function qt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function _n(t,e){return qt(t)?t:e}function st(t,e){return typeof t>"u"?e:t}const bf=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,vc=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function wt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function kt(t,e,n,o){let r,i,a;if(Ot(t))for(i=t.length,r=0;r<i;r++)e.call(n,t[r],r);else if(yt(t))for(a=Object.keys(t),i=a.length,r=0;r<i;r++)e.call(n,t[a[r]],a[r])}function xi(t,e){let n,o,r,i;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(r=t[n],i=e[n],r.datasetIndex!==i.datasetIndex||r.index!==i.index)return!1;return!0}function Si(t){if(Ot(t))return t.map(Si);if(yt(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let r=0;for(;r<o;++r)e[n[r]]=Si(t[n[r]]);return e}return t}function bc(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Cf(t,e,n,o){if(!bc(t))return;const r=e[t],i=n[t];yt(r)&&yt(i)?rr(r,i,o):e[t]=Si(i)}function rr(t,e,n){const o=Ot(e)?e:[e],r=o.length;if(!yt(t))return t;n=n||{};const i=n.merger||Cf;let a;for(let c=0;c<r;++c){if(a=o[c],!yt(a))continue;const m=Object.keys(a);for(let C=0,L=m.length;C<L;++C)i(m[C],t,a,n)}return t}function Qo(t,e){return rr(t,e,{merger:Mf})}function Mf(t,e,n){if(!bc(t))return;const o=e[t],r=n[t];yt(o)&&yt(r)?Qo(o,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Si(r))}const Tl={"":t=>t,x:t=>t.x,y:t=>t.y};function xf(t){const e=t.split("."),n=[];let o="";for(const r of e)o+=r,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function Sf(t){const e=xf(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function jn(t,e){return(Tl[e]||(Tl[e]=Sf(e)))(t)}function Va(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ir=t=>typeof t<"u",Wn=t=>typeof t=="function",Bl=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function kf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const It=Math.PI,Tt=2*It,If=Tt+It,ki=Number.POSITIVE_INFINITY,Ef=It/180,Pt=It/2,to=It/4,Ll=It*2/3,Cc=Math.log10,Mn=Math.sign;function er(t,e,n){return Math.abs(t-e)<n}function Nl(t){const e=Math.round(t);t=er(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Cc(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function wf(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((r,i)=>r-i).pop(),e}function Af(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function ko(t){return!Af(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Tf(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Bf(t,e,n){let o,r,i;for(o=0,r=t.length;o<r;o++)i=t[o][n],isNaN(i)||(e.min=Math.min(e.min,i),e.max=Math.max(e.max,i))}function Cn(t){return t*(It/180)}function Pa(t){return t*(180/It)}function Rl(t){if(!qt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Mc(t,e){const n=e.x-t.x,o=e.y-t.y,r=Math.sqrt(n*n+o*o);let i=Math.atan2(o,n);return i<-.5*It&&(i+=Tt),{angle:i,distance:r}}function _a(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Lf(t,e){return(t-e+If)%Tt-It}function Yt(t){return(t%Tt+Tt)%Tt}function ar(t,e,n,o){const r=Yt(t),i=Yt(e),a=Yt(n),c=Yt(i-r),m=Yt(a-r),C=Yt(r-i),L=Yt(r-a);return r===i||r===a||o&&i===a||c>m&&C<L}function Kt(t,e,n){return Math.max(e,Math.min(n,t))}function Nf(t){return Kt(t,-32768,32767)}function Ln(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Da(t,e,n){n=n||(a=>t[a]<e);let o=t.length-1,r=0,i;for(;o-r>1;)i=r+o>>1,n(i)?r=i:o=i;return{lo:r,hi:o}}const so=(t,e,n,o)=>Da(t,n,o?r=>{const i=t[r][e];return i<n||i===n&&t[r+1][e]===n}:r=>t[r][e]<n),Rf=(t,e,n)=>Da(t,n,o=>t[o][e]>=n);function Hf(t,e,n){let o=0,r=t.length;for(;o<r&&t[o]<e;)o++;for(;r>o&&t[r-1]>n;)r--;return o>0||r<t.length?t.slice(o,r):t}const xc=["push","pop","shift","splice","unshift"];function Ff(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),xc.forEach(n=>{const o="_onData"+Va(n),r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...i){const a=r.apply(this,i);return t._chartjs.listeners.forEach(c=>{typeof c[o]=="function"&&c[o](...i)}),a}})})}function Hl(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,r=o.indexOf(e);r!==-1&&o.splice(r,1),!(o.length>0)&&(xc.forEach(i=>{delete t[i]}),delete t._chartjs)}function Sc(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const kc=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Ic(t,e){let n=[],o=!1;return function(...r){n=r,o||(o=!0,kc.call(window,()=>{o=!1,t.apply(e,n)}))}}function Of(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Ec=t=>t==="start"?"left":t==="end"?"right":"center",ln=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Vf=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function wc(t,e,n){const o=e.length;let r=0,i=o;if(t._sorted){const{iScale:a,vScale:c,_parsed:m}=t,C=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,L=a.axis,{min:D,max:W,minDefined:K,maxDefined:X}=a.getUserBounds();if(K){if(r=Math.min(so(m,L,D).lo,n?o:so(e,L,a.getPixelForValue(D)).lo),C){const ee=m.slice(0,r+1).reverse().findIndex(re=>!vt(re[c.axis]));r-=Math.max(0,ee)}r=Kt(r,0,o-1)}if(X){let ee=Math.max(so(m,a.axis,W,!0).hi+1,n?0:so(e,L,a.getPixelForValue(W),!0).hi+1);if(C){const re=m.slice(ee-1).findIndex(fe=>!vt(fe[c.axis]));ee+=Math.max(0,re)}i=Kt(ee,r,o)-r}else i=o-r}return{start:r,count:i}}function Ac(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=r,!0;const i=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,r),i}const Qr=t=>t===0||t===1,Fl=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Tt/n)),Ol=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Tt/n)+1,tr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Pt)+1,easeOutSine:t=>Math.sin(t*Pt),easeInOutSine:t=>-.5*(Math.cos(It*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Qr(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Qr(t)?t:Fl(t,.075,.3),easeOutElastic:t=>Qr(t)?t:Ol(t,.075,.3),easeInOutElastic(t){return Qr(t)?t:t<.5?.5*Fl(t*2,.1125,.45):.5+.5*Ol(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-tr.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?tr.easeInBounce(t*2)*.5:tr.easeOutBounce(t*2-1)*.5+.5};function za(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Vl(t){return za(t)?t:new or(t)}function ra(t){return za(t)?t:new or(t).saturate(.5).darken(.1).hexString()}const Pf=["x","y","borderWidth","radius","tension"],Df=["color","borderColor","backgroundColor"];function zf(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Df},numbers:{type:"number",properties:Pf}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Uf(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Pl=new Map;function Gf(t,e){e=e||{};const n=t+JSON.stringify(e);let o=Pl.get(n);return o||(o=new Intl.NumberFormat(t,e),Pl.set(n,o)),o}function Ua(t,e,n){return Gf(e,n).format(t)}const jf={values(t){return Ot(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let r,i=t;if(n.length>1){const C=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(C<1e-4||C>1e15)&&(r="scientific"),i=Wf(t,n)}const a=Cc(Math.abs(i)),c=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),m={notation:r,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(m,this.options.ticks.format),Ua(t,o,m)}};function Wf(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Ga={formatters:jf};function qf(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ga.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const fo=Object.create(null),va=Object.create(null);function nr(t,e){if(!e)return t;const n=e.split(".");for(let o=0,r=n.length;o<r;++o){const i=n[o];t=t[i]||(t[i]=Object.create(null))}return t}function ia(t,e,n){return typeof e=="string"?rr(nr(t,e),n):rr(nr(t,""),e)}class $f{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,r)=>ra(r.backgroundColor),this.hoverBorderColor=(o,r)=>ra(r.borderColor),this.hoverColor=(o,r)=>ra(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return ia(this,e,n)}get(e){return nr(this,e)}describe(e,n){return ia(va,e,n)}override(e,n){return ia(fo,e,n)}route(e,n,o,r){const i=nr(this,e),a=nr(this,o),c="_"+n;Object.defineProperties(i,{[c]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const m=this[c],C=a[r];return yt(m)?Object.assign({},C,m):st(m,C)},set(m){this[c]=m}}})}apply(e){e.forEach(n=>n(this))}}var Vt=new $f({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zf,Uf,qf]);function Yf(t){return!t||vt(t.size)||vt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ii(t,e,n,o,r){let i=e[r];return i||(i=e[r]=t.measureText(r).width,n.push(r)),i>o&&(o=i),o}function Kf(t,e,n,o){o=o||{};let r=o.data=o.data||{},i=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(r=o.data={},i=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let a=0;const c=n.length;let m,C,L,D,W;for(m=0;m<c;m++)if(D=n[m],D!=null&&!Ot(D))a=Ii(t,r,i,a,D);else if(Ot(D))for(C=0,L=D.length;C<L;C++)W=D[C],W!=null&&!Ot(W)&&(a=Ii(t,r,i,a,W));t.restore();const K=i.length/2;if(K>n.length){for(m=0;m<K;m++)delete r[i[m]];i.splice(0,K)}return a}function no(t,e,n){const o=t.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((e-r)*o)/o+r}function Dl(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ba(t,e,n,o){Tc(t,e,n,o,null)}function Tc(t,e,n,o,r){let i,a,c,m,C,L,D,W;const K=e.pointStyle,X=e.rotation,ee=e.radius;let re=(X||0)*Ef;if(K&&typeof K=="object"&&(i=K.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(re),t.drawImage(K,-K.width/2,-K.height/2,K.width,K.height),t.restore();return}if(!(isNaN(ee)||ee<=0)){switch(t.beginPath(),K){default:r?t.ellipse(n,o,r/2,ee,0,0,Tt):t.arc(n,o,ee,0,Tt),t.closePath();break;case"triangle":L=r?r/2:ee,t.moveTo(n+Math.sin(re)*L,o-Math.cos(re)*ee),re+=Ll,t.lineTo(n+Math.sin(re)*L,o-Math.cos(re)*ee),re+=Ll,t.lineTo(n+Math.sin(re)*L,o-Math.cos(re)*ee),t.closePath();break;case"rectRounded":C=ee*.516,m=ee-C,a=Math.cos(re+to)*m,D=Math.cos(re+to)*(r?r/2-C:m),c=Math.sin(re+to)*m,W=Math.sin(re+to)*(r?r/2-C:m),t.arc(n-D,o-c,C,re-It,re-Pt),t.arc(n+W,o-a,C,re-Pt,re),t.arc(n+D,o+c,C,re,re+Pt),t.arc(n-W,o+a,C,re+Pt,re+It),t.closePath();break;case"rect":if(!X){m=Math.SQRT1_2*ee,L=r?r/2:m,t.rect(n-L,o-m,2*L,2*m);break}re+=to;case"rectRot":D=Math.cos(re)*(r?r/2:ee),a=Math.cos(re)*ee,c=Math.sin(re)*ee,W=Math.sin(re)*(r?r/2:ee),t.moveTo(n-D,o-c),t.lineTo(n+W,o-a),t.lineTo(n+D,o+c),t.lineTo(n-W,o+a),t.closePath();break;case"crossRot":re+=to;case"cross":D=Math.cos(re)*(r?r/2:ee),a=Math.cos(re)*ee,c=Math.sin(re)*ee,W=Math.sin(re)*(r?r/2:ee),t.moveTo(n-D,o-c),t.lineTo(n+D,o+c),t.moveTo(n+W,o-a),t.lineTo(n-W,o+a);break;case"star":D=Math.cos(re)*(r?r/2:ee),a=Math.cos(re)*ee,c=Math.sin(re)*ee,W=Math.sin(re)*(r?r/2:ee),t.moveTo(n-D,o-c),t.lineTo(n+D,o+c),t.moveTo(n+W,o-a),t.lineTo(n-W,o+a),re+=to,D=Math.cos(re)*(r?r/2:ee),a=Math.cos(re)*ee,c=Math.sin(re)*ee,W=Math.sin(re)*(r?r/2:ee),t.moveTo(n-D,o-c),t.lineTo(n+D,o+c),t.moveTo(n+W,o-a),t.lineTo(n-W,o+a);break;case"line":a=r?r/2:Math.cos(re)*ee,c=Math.sin(re)*ee,t.moveTo(n-a,o-c),t.lineTo(n+a,o+c);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(re)*(r?r/2:ee),o+Math.sin(re)*ee);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Nn(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Ri(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Hi(t){t.restore()}function Xf(t,e,n,o,r){if(!e)return t.lineTo(n.x,n.y);if(r==="middle"){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else r==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Jf(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function Zf(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),vt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Qf(t,e,n,o,r){if(r.strikethrough||r.underline){const i=t.measureText(o),a=e-i.actualBoundingBoxLeft,c=e+i.actualBoundingBoxRight,m=n-i.actualBoundingBoxAscent,C=n+i.actualBoundingBoxDescent,L=r.strikethrough?(m+C)/2:C;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(a,L),t.lineTo(c,L),t.stroke()}}function eh(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Io(t,e,n,o,r,i={}){const a=Ot(e)?e:[e],c=i.strokeWidth>0&&i.strokeColor!=="";let m,C;for(t.save(),t.font=r.string,Zf(t,i),m=0;m<a.length;++m)C=a[m],i.backdrop&&eh(t,i.backdrop),c&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),vt(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(C,n,o,i.maxWidth)),t.fillText(C,n,o,i.maxWidth),Qf(t,n,o,C,i),o+=Number(r.lineHeight);t.restore()}function lr(t,e){const{x:n,y:o,w:r,h:i,radius:a}=e;t.arc(n+a.topLeft,o+a.topLeft,a.topLeft,1.5*It,It,!0),t.lineTo(n,o+i-a.bottomLeft),t.arc(n+a.bottomLeft,o+i-a.bottomLeft,a.bottomLeft,It,Pt,!0),t.lineTo(n+r-a.bottomRight,o+i),t.arc(n+r-a.bottomRight,o+i-a.bottomRight,a.bottomRight,Pt,0,!0),t.lineTo(n+r,o+a.topRight),t.arc(n+r-a.topRight,o+a.topRight,a.topRight,0,-Pt,!0),t.lineTo(n+a.topLeft,o)}const th=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,nh=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function oh(t,e){const n=(""+t).match(th);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const rh=t=>+t||0;function ja(t,e){const n={},o=yt(e),r=o?Object.keys(e):e,i=yt(t)?o?a=>st(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of r)n[a]=rh(i(a));return n}function Bc(t){return ja(t,{top:"y",right:"x",bottom:"y",left:"x"})}function co(t){return ja(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Jt(t){const e=Bc(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function $t(t,e){t=t||{},e=e||Vt.font;let n=st(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=st(t.style,e.style);o&&!(""+o).match(nh)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const r={family:st(t.family,e.family),lineHeight:oh(st(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:st(t.weight,e.weight),string:""};return r.string=Yf(r),r}function ei(t,e,n,o){let r,i,a;for(r=0,i=t.length;r<i;++r)if(a=t[r],a!==void 0&&a!==void 0)return a}function ih(t,e,n){const{min:o,max:r}=t,i=vc(e,(r-o)/2),a=(c,m)=>n&&c===0?0:c+m;return{min:a(o,-Math.abs(i)),max:a(r,i)}}function qn(t,e){return Object.assign(Object.create(t),e)}function Wa(t,e=[""],n,o,r=()=>t[0]){const i=n||t;typeof o>"u"&&(o=Hc("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:o,_getTarget:r,override:c=>Wa([c,...t],e,i,o)};return new Proxy(a,{deleteProperty(c,m){return delete c[m],delete c._keys,delete t[0][m],!0},get(c,m){return Nc(c,m,()=>hh(m,e,t,c))},getOwnPropertyDescriptor(c,m){return Reflect.getOwnPropertyDescriptor(c._scopes[0],m)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,m){return Ul(c).includes(m)},ownKeys(c){return Ul(c)},set(c,m,C){const L=c._storage||(c._storage=r());return c[m]=L[m]=C,delete c._keys,!0}})}function Eo(t,e,n,o){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Lc(t,o),setContext:i=>Eo(t,i,n,o),override:i=>Eo(t.override(i),e,n,o)};return new Proxy(r,{deleteProperty(i,a){return delete i[a],delete t[a],!0},get(i,a,c){return Nc(i,a,()=>lh(i,a,c))},getOwnPropertyDescriptor(i,a){return i._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(i,a,c){return t[a]=c,delete i[a],!0}})}function Lc(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:o,isScriptable:Wn(n)?n:()=>n,isIndexable:Wn(o)?o:()=>o}}const ah=(t,e)=>t?t+Va(e):e,qa=(t,e)=>yt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Nc(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const o=n();return t[e]=o,o}function lh(t,e,n){const{_proxy:o,_context:r,_subProxy:i,_descriptors:a}=t;let c=o[e];return Wn(c)&&a.isScriptable(e)&&(c=sh(e,c,t,n)),Ot(c)&&c.length&&(c=ch(e,c,t,a.isIndexable)),qa(e,c)&&(c=Eo(c,r,i&&i[e],a)),c}function sh(t,e,n,o){const{_proxy:r,_context:i,_subProxy:a,_stack:c}=n;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);c.add(t);let m=e(i,a||o);return c.delete(t),qa(t,m)&&(m=$a(r._scopes,r,t,m)),m}function ch(t,e,n,o){const{_proxy:r,_context:i,_subProxy:a,_descriptors:c}=n;if(typeof i.index<"u"&&o(t))return e[i.index%e.length];if(yt(e[0])){const m=e,C=r._scopes.filter(L=>L!==m);e=[];for(const L of m){const D=$a(C,r,t,L);e.push(Eo(D,i,a&&a[t],c))}}return e}function Rc(t,e,n){return Wn(t)?t(e,n):t}const dh=(t,e)=>t===!0?e:typeof t=="string"?jn(e,t):void 0;function uh(t,e,n,o,r){for(const i of e){const a=dh(n,i);if(a){t.add(a);const c=Rc(a._fallback,n,r);if(typeof c<"u"&&c!==n&&c!==o)return c}else if(a===!1&&typeof o<"u"&&n!==o)return null}return!1}function $a(t,e,n,o){const r=e._rootScopes,i=Rc(e._fallback,n,o),a=[...t,...r],c=new Set;c.add(o);let m=zl(c,a,n,i||n,o);return m===null||typeof i<"u"&&i!==n&&(m=zl(c,a,i,m,o),m===null)?!1:Wa(Array.from(c),[""],r,i,()=>fh(e,n,o))}function zl(t,e,n,o,r){for(;n;)n=uh(t,e,n,o,r);return n}function fh(t,e,n){const o=t._getTarget();e in o||(o[e]={});const r=o[e];return Ot(r)&&yt(n)?n:r||{}}function hh(t,e,n,o){let r;for(const i of e)if(r=Hc(ah(i,t),n),typeof r<"u")return qa(t,r)?$a(n,o,t,r):r}function Hc(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function Ul(t){let e=t._keys;return e||(e=t._keys=mh(t._scopes)),e}function mh(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(r=>!r.startsWith("_")))e.add(o);return Array.from(e)}function gh(t,e,n,o){const{iScale:r}=t,{key:i="r"}=this._parsing,a=new Array(o);let c,m,C,L;for(c=0,m=o;c<m;++c)C=c+n,L=e[C],a[c]={r:r.parse(jn(L,i),C)};return a}const yh=Number.EPSILON||1e-14,wo=(t,e)=>e<t.length&&!t[e].skip&&t[e],Fc=t=>t==="x"?"y":"x";function ph(t,e,n,o){const r=t.skip?e:t,i=e,a=n.skip?e:n,c=_a(i,r),m=_a(a,i);let C=c/(c+m),L=m/(c+m);C=isNaN(C)?0:C,L=isNaN(L)?0:L;const D=o*C,W=o*L;return{previous:{x:i.x-D*(a.x-r.x),y:i.y-D*(a.y-r.y)},next:{x:i.x+W*(a.x-r.x),y:i.y+W*(a.y-r.y)}}}function _h(t,e,n){const o=t.length;let r,i,a,c,m,C=wo(t,0);for(let L=0;L<o-1;++L)if(m=C,C=wo(t,L+1),!(!m||!C)){if(er(e[L],0,yh)){n[L]=n[L+1]=0;continue}r=n[L]/e[L],i=n[L+1]/e[L],c=Math.pow(r,2)+Math.pow(i,2),!(c<=9)&&(a=3/Math.sqrt(c),n[L]=r*a*e[L],n[L+1]=i*a*e[L])}}function vh(t,e,n="x"){const o=Fc(n),r=t.length;let i,a,c,m=wo(t,0);for(let C=0;C<r;++C){if(a=c,c=m,m=wo(t,C+1),!c)continue;const L=c[n],D=c[o];a&&(i=(L-a[n])/3,c[`cp1${n}`]=L-i,c[`cp1${o}`]=D-i*e[C]),m&&(i=(m[n]-L)/3,c[`cp2${n}`]=L+i,c[`cp2${o}`]=D+i*e[C])}}function bh(t,e="x"){const n=Fc(e),o=t.length,r=Array(o).fill(0),i=Array(o);let a,c,m,C=wo(t,0);for(a=0;a<o;++a)if(c=m,m=C,C=wo(t,a+1),!!m){if(C){const L=C[e]-m[e];r[a]=L!==0?(C[n]-m[n])/L:0}i[a]=c?C?Mn(r[a-1])!==Mn(r[a])?0:(r[a-1]+r[a])/2:r[a-1]:r[a]}_h(t,r,i),vh(t,i,e)}function ti(t,e,n){return Math.max(Math.min(t,n),e)}function Ch(t,e){let n,o,r,i,a,c=Nn(t[0],e);for(n=0,o=t.length;n<o;++n)a=i,i=c,c=n<o-1&&Nn(t[n+1],e),i&&(r=t[n],a&&(r.cp1x=ti(r.cp1x,e.left,e.right),r.cp1y=ti(r.cp1y,e.top,e.bottom)),c&&(r.cp2x=ti(r.cp2x,e.left,e.right),r.cp2y=ti(r.cp2y,e.top,e.bottom)))}function Mh(t,e,n,o,r){let i,a,c,m;if(e.spanGaps&&(t=t.filter(C=>!C.skip)),e.cubicInterpolationMode==="monotone")bh(t,r);else{let C=o?t[t.length-1]:t[0];for(i=0,a=t.length;i<a;++i)c=t[i],m=ph(C,c,t[Math.min(i+1,a-(o?0:1))%a],e.tension),c.cp1x=m.previous.x,c.cp1y=m.previous.y,c.cp2x=m.next.x,c.cp2y=m.next.y,C=c}e.capBezierPoints&&Ch(t,n)}function Ya(){return typeof window<"u"&&typeof document<"u"}function Ka(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ei(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const Fi=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function xh(t,e){return Fi(t).getPropertyValue(e)}const Sh=["top","right","bottom","left"];function uo(t,e,n){const o={};n=n?"-"+n:"";for(let r=0;r<4;r++){const i=Sh[r];o[i]=parseFloat(t[e+"-"+i+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const kh=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Ih(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:r,offsetY:i}=o;let a=!1,c,m;if(kh(r,i,t.target))c=r,m=i;else{const C=e.getBoundingClientRect();c=o.clientX-C.left,m=o.clientY-C.top,a=!0}return{x:c,y:m,box:a}}function ro(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,r=Fi(n),i=r.boxSizing==="border-box",a=uo(r,"padding"),c=uo(r,"border","width"),{x:m,y:C,box:L}=Ih(t,n),D=a.left+(L&&c.left),W=a.top+(L&&c.top);let{width:K,height:X}=e;return i&&(K-=a.width+c.width,X-=a.height+c.height),{x:Math.round((m-D)/K*n.width/o),y:Math.round((C-W)/X*n.height/o)}}function Eh(t,e,n){let o,r;if(e===void 0||n===void 0){const i=t&&Ka(t);if(!i)e=t.clientWidth,n=t.clientHeight;else{const a=i.getBoundingClientRect(),c=Fi(i),m=uo(c,"border","width"),C=uo(c,"padding");e=a.width-C.width-m.width,n=a.height-C.height-m.height,o=Ei(c.maxWidth,i,"clientWidth"),r=Ei(c.maxHeight,i,"clientHeight")}}return{width:e,height:n,maxWidth:o||ki,maxHeight:r||ki}}const ni=t=>Math.round(t*10)/10;function wh(t,e,n,o){const r=Fi(t),i=uo(r,"margin"),a=Ei(r.maxWidth,t,"clientWidth")||ki,c=Ei(r.maxHeight,t,"clientHeight")||ki,m=Eh(t,e,n);let{width:C,height:L}=m;if(r.boxSizing==="content-box"){const W=uo(r,"border","width"),K=uo(r,"padding");C-=K.width+W.width,L-=K.height+W.height}return C=Math.max(0,C-i.width),L=Math.max(0,o?C/o:L-i.height),C=ni(Math.min(C,a,m.maxWidth)),L=ni(Math.min(L,c,m.maxHeight)),C&&!L&&(L=ni(C/2)),(e!==void 0||n!==void 0)&&o&&m.height&&L>m.height&&(L=m.height,C=ni(Math.floor(L*o))),{width:C,height:L}}function Gl(t,e,n){const o=e||1,r=Math.floor(t.height*o),i=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||a.height!==r||a.width!==i?(t.currentDevicePixelRatio=o,a.height=r,a.width=i,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const Ah=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ya()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function jl(t,e){const n=xh(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function io(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Th(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Bh(t,e,n,o){const r={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},a=io(t,r,n),c=io(r,i,n),m=io(i,e,n),C=io(a,c,n),L=io(c,m,n);return io(C,L,n)}const Lh=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Nh=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function xo(t,e,n){return t?Lh(e,n):Nh()}function Oc(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Vc(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Pc(t){return t==="angle"?{between:ar,compare:Lf,normalize:Yt}:{between:Ln,compare:(e,n)=>e-n,normalize:e=>e}}function Wl({start:t,end:e,count:n,loop:o,style:r}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:r}}function Rh(t,e,n){const{property:o,start:r,end:i}=n,{between:a,normalize:c}=Pc(o),m=e.length;let{start:C,end:L,loop:D}=t,W,K;if(D){for(C+=m,L+=m,W=0,K=m;W<K&&a(c(e[C%m][o]),r,i);++W)C--,L--;C%=m,L%=m}return L<C&&(L+=m),{start:C,end:L,loop:D,style:t.style}}function Dc(t,e,n){if(!n)return[t];const{property:o,start:r,end:i}=n,a=e.length,{compare:c,between:m,normalize:C}=Pc(o),{start:L,end:D,loop:W,style:K}=Rh(t,e,n),X=[];let ee=!1,re=null,fe,ye,xe;const ke=()=>m(r,xe,fe)&&c(r,xe)!==0,ve=()=>c(i,fe)===0||m(i,xe,fe),Ee=()=>ee||ke(),Me=()=>!ee||ve();for(let Ie=L,Te=L;Ie<=D;++Ie)ye=e[Ie%a],!ye.skip&&(fe=C(ye[o]),fe!==xe&&(ee=m(fe,r,i),re===null&&Ee()&&(re=c(fe,r)===0?Ie:Te),re!==null&&Me()&&(X.push(Wl({start:re,end:Ie,loop:W,count:a,style:K})),re=null),Te=Ie,xe=fe));return re!==null&&X.push(Wl({start:re,end:D,loop:W,count:a,style:K})),X}function zc(t,e){const n=[],o=t.segments;for(let r=0;r<o.length;r++){const i=Dc(o[r],t.points,e);i.length&&n.push(...i)}return n}function Hh(t,e,n,o){let r=0,i=e-1;if(n&&!o)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(i+=r);i>r&&t[i%e].skip;)i--;return i%=e,{start:r,end:i}}function Fh(t,e,n,o){const r=t.length,i=[];let a=e,c=t[e],m;for(m=e+1;m<=n;++m){const C=t[m%r];C.skip||C.stop?c.skip||(o=!1,i.push({start:e%r,end:(m-1)%r,loop:o}),e=a=C.stop?m:null):(a=m,c.skip&&(e=m)),c=C}return a!==null&&i.push({start:e%r,end:a%r,loop:o}),i}function Oh(t,e){const n=t.points,o=t.options.spanGaps,r=n.length;if(!r)return[];const i=!!t._loop,{start:a,end:c}=Hh(n,r,i,o);if(o===!0)return ql(t,[{start:a,end:c,loop:i}],n,e);const m=c<a?c+r:c,C=!!t._fullLoop&&a===0&&c===r-1;return ql(t,Fh(n,a,m,C),n,e)}function ql(t,e,n,o){return!o||!o.setContext||!n?e:Vh(t,e,n,o)}function Vh(t,e,n,o){const r=t._chart.getContext(),i=$l(t.options),{_datasetIndex:a,options:{spanGaps:c}}=t,m=n.length,C=[];let L=i,D=e[0].start,W=D;function K(X,ee,re,fe){const ye=c?-1:1;if(X!==ee){for(X+=m;n[X%m].skip;)X-=ye;for(;n[ee%m].skip;)ee+=ye;X%m!==ee%m&&(C.push({start:X%m,end:ee%m,loop:re,style:fe}),L=fe,D=ee%m)}}for(const X of e){D=c?D:X.start;let ee=n[D%m],re;for(W=D+1;W<=X.end;W++){const fe=n[W%m];re=$l(o.setContext(qn(r,{type:"segment",p0:ee,p1:fe,p0DataIndex:(W-1)%m,p1DataIndex:W%m,datasetIndex:a}))),Ph(re,L)&&K(D,W-1,X.loop,L),ee=fe,L=re}D<W-1&&K(D,W-1,X.loop,L)}return C}function $l(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ph(t,e){if(!e)return!1;const n=[],o=function(r,i){return za(i)?(n.includes(i)||n.push(i),n.indexOf(i)):i};return JSON.stringify(t,o)!==JSON.stringify(e,o)}function oi(t,e,n){return t.options.clip?t[n]:e[n]}function Dh(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:oi(n,e,"left"),right:oi(n,e,"right"),top:oi(o,e,"top"),bottom:oi(o,e,"bottom")}:e}function Uc(t,e){const n=e._clip;if(n.disabled)return!1;const o=Dh(e,t.chartArea);return{left:n.left===!1?0:o.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:o.right+(n.right===!0?0:n.right),top:n.top===!1?0:o.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:o.bottom+(n.bottom===!0?0:n.bottom)}}/*!
71
+ * Chart.js v4.5.0
72
+ * https://www.chartjs.org
73
+ * (c) 2025 Chart.js Contributors
74
+ * Released under the MIT License
75
+ */class zh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,r){const i=n.listeners[r],a=n.duration;i.forEach(c=>c({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=kc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,r)=>{if(!o.running||!o.items.length)return;const i=o.items;let a=i.length-1,c=!1,m;for(;a>=0;--a)m=i[a],m._active?(m._total>o.duration&&(o.duration=m._total),m.tick(e),c=!0):(i[a]=i[i.length-1],i.pop());c&&(r.draw(),this._notify(r,o,e,"progress")),i.length||(o.running=!1,this._notify(r,o,e,"complete"),o.initial=!1),n+=i.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,r)=>Math.max(o,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let r=o.length-1;for(;r>=0;--r)o[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var An=new zh;const Yl="transparent",Uh={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Vl(t||Yl),r=o.valid&&Vl(e||Yl);return r&&r.valid?r.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Gh{constructor(e,n,o,r){const i=n[o];r=ei([e.to,r,i,e.from]);const a=ei([e.from,i,r]);this._active=!0,this._fn=e.fn||Uh[e.type||typeof a],this._easing=tr[e.easing]||tr.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const r=this._target[this._prop],i=o-this._start,a=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=ei([e.to,n,r,e.from]),this._from=ei([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,r=this._prop,i=this._from,a=this._loop,c=this._to;let m;if(this._active=i!==c&&(a||n<o),!this._active){this._target[r]=c,this._notify(!0);return}if(n<0){this._target[r]=i;return}m=n/o%2,m=a&&m>1?2-m:m,m=this._easing(Math.min(1,Math.max(0,m))),this._target[r]=this._fn(i,c,m)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let r=0;r<o.length;r++)o[r][n]()}}class Gc{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!yt(e))return;const n=Object.keys(Vt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const i=e[r];if(!yt(i))return;const a={};for(const c of n)a[c]=i[c];(Ot(i.properties)&&i.properties||[r]).forEach(c=>{(c===r||!o.has(c))&&o.set(c,a)})})}_animateOptions(e,n){const o=n.options,r=Wh(e,o);if(!r)return[];const i=this._createAnimations(r,o);return o.$shared&&jh(e.options.$animations,o).then(()=>{e.options=o},()=>{}),i}_createAnimations(e,n){const o=this._properties,r=[],i=e.$animations||(e.$animations={}),a=Object.keys(n),c=Date.now();let m;for(m=a.length-1;m>=0;--m){const C=a[m];if(C.charAt(0)==="$")continue;if(C==="options"){r.push(...this._animateOptions(e,n));continue}const L=n[C];let D=i[C];const W=o.get(C);if(D)if(W&&D.active()){D.update(W,L,c);continue}else D.cancel();if(!W||!W.duration){e[C]=L;continue}i[C]=D=new Gh(W,e,C,L),r.push(D)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return An.add(this._chart,o),!0}}function jh(t,e){const n=[],o=Object.keys(e);for(let r=0;r<o.length;r++){const i=t[o[r]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function Wh(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Kl(t,e){const n=t&&t.options||{},o=n.reverse,r=n.min===void 0?e:0,i=n.max===void 0?e:0;return{start:o?i:r,end:o?r:i}}function qh(t,e,n){if(n===!1)return!1;const o=Kl(t,n),r=Kl(e,n);return{top:r.end,right:o.end,bottom:r.start,left:o.start}}function $h(t){let e,n,o,r;return yt(t)?(e=t.top,n=t.right,o=t.bottom,r=t.left):e=n=o=r=t,{top:e,right:n,bottom:o,left:r,disabled:t===!1}}function jc(t,e){const n=[],o=t._getSortedDatasetMetas(e);let r,i;for(r=0,i=o.length;r<i;++r)n.push(o[r].index);return n}function Xl(t,e,n,o={}){const r=t.keys,i=o.mode==="single";let a,c,m,C;if(e===null)return;let L=!1;for(a=0,c=r.length;a<c;++a){if(m=+r[a],m===n){if(L=!0,o.all)continue;break}C=t.values[m],qt(C)&&(i||e===0||Mn(e)===Mn(C))&&(e+=C)}return!L&&!o.all?0:e}function Yh(t,e){const{iScale:n,vScale:o}=e,r=n.axis==="x"?"x":"y",i=o.axis==="x"?"x":"y",a=Object.keys(t),c=new Array(a.length);let m,C,L;for(m=0,C=a.length;m<C;++m)L=a[m],c[m]={[r]:L,[i]:t[L]};return c}function aa(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Kh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Xh(t){const{min:e,max:n,minDefined:o,maxDefined:r}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Jh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Jl(t,e,n,o){for(const r of e.getMatchingVisibleMetas(o).reverse()){const i=t[r.index];if(n&&i>0||!n&&i<0)return r.index}return null}function Zl(t,e){const{chart:n,_cachedMeta:o}=t,r=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:c}=o,m=i.axis,C=a.axis,L=Kh(i,a,o),D=e.length;let W;for(let K=0;K<D;++K){const X=e[K],{[m]:ee,[C]:re}=X,fe=X._stacks||(X._stacks={});W=fe[C]=Jh(r,L,ee),W[c]=re,W._top=Jl(W,a,!0,o.type),W._bottom=Jl(W,a,!1,o.type);const ye=W._visualValues||(W._visualValues={});ye[c]=re}}function la(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Zh(t,e){return qn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Qh(t,e,n){return qn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Go(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const r of e){const i=r._stacks;if(!i||i[o]===void 0||i[o][n]===void 0)return;delete i[o][n],i[o]._visualValues!==void 0&&i[o]._visualValues[n]!==void 0&&delete i[o]._visualValues[n]}}}const sa=t=>t==="reset"||t==="none",Ql=(t,e)=>e?t:Object.assign({},t),em=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:jc(n,!0),values:null};class xn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=aa(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Go(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),r=(D,W,K,X)=>D==="x"?W:D==="r"?X:K,i=n.xAxisID=st(o.xAxisID,la(e,"x")),a=n.yAxisID=st(o.yAxisID,la(e,"y")),c=n.rAxisID=st(o.rAxisID,la(e,"r")),m=n.indexAxis,C=n.iAxisID=r(m,i,a,c),L=n.vAxisID=r(m,a,i,c);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(C),n.vScale=this.getScaleForId(L)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Hl(this._data,this),e._stacked&&Go(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(yt(n)){const r=this._cachedMeta;this._data=Yh(n,r)}else if(o!==n){if(o){Hl(o,this);const r=this._cachedMeta;Go(r),r._parsed=[]}n&&Object.isExtensible(n)&&Ff(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let r=!1;this._dataCheck();const i=n._stacked;n._stacked=aa(n.vScale,n),n.stack!==o.stack&&(r=!0,Go(n),n.stack=o.stack),this._resyncElements(e),(r||i!==n._stacked)&&(Zl(this,n._parsed),n._stacked=aa(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:r}=this,{iScale:i,_stacked:a}=o,c=i.axis;let m=e===0&&n===r.length?!0:o._sorted,C=e>0&&o._parsed[e-1],L,D,W;if(this._parsing===!1)o._parsed=r,o._sorted=!0,W=r;else{Ot(r[e])?W=this.parseArrayData(o,r,e,n):yt(r[e])?W=this.parseObjectData(o,r,e,n):W=this.parsePrimitiveData(o,r,e,n);const K=()=>D[c]===null||C&&D[c]<C[c];for(L=0;L<n;++L)o._parsed[L+e]=D=W[L],m&&(K()&&(m=!1),C=D);o._sorted=m}a&&Zl(this,W)}parsePrimitiveData(e,n,o,r){const{iScale:i,vScale:a}=e,c=i.axis,m=a.axis,C=i.getLabels(),L=i===a,D=new Array(r);let W,K,X;for(W=0,K=r;W<K;++W)X=W+o,D[W]={[c]:L||i.parse(C[X],X),[m]:a.parse(n[X],X)};return D}parseArrayData(e,n,o,r){const{xScale:i,yScale:a}=e,c=new Array(r);let m,C,L,D;for(m=0,C=r;m<C;++m)L=m+o,D=n[L],c[m]={x:i.parse(D[0],L),y:a.parse(D[1],L)};return c}parseObjectData(e,n,o,r){const{xScale:i,yScale:a}=e,{xAxisKey:c="x",yAxisKey:m="y"}=this._parsing,C=new Array(r);let L,D,W,K;for(L=0,D=r;L<D;++L)W=L+o,K=n[W],C[L]={x:i.parse(jn(K,c),W),y:a.parse(jn(K,m),W)};return C}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const r=this.chart,i=this._cachedMeta,a=n[e.axis],c={keys:jc(r,!0),values:n._stacks[e.axis]._visualValues};return Xl(c,a,i.index,{mode:o})}updateRangeFromParsed(e,n,o,r){const i=o[n.axis];let a=i===null?NaN:i;const c=r&&o._stacks[n.axis];r&&c&&(r.values=c,a=Xl(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const o=this._cachedMeta,r=o._parsed,i=o._sorted&&e===o.iScale,a=r.length,c=this._getOtherScale(e),m=em(n,o,this.chart),C={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:L,max:D}=Xh(c);let W,K;function X(){K=r[W];const ee=K[c.axis];return!qt(K[e.axis])||L>ee||D<ee}for(W=0;W<a&&!(!X()&&(this.updateRangeFromParsed(C,e,K,m),i));++W);if(i){for(W=a-1;W>=0;--W)if(!X()){this.updateRangeFromParsed(C,e,K,m);break}}return C}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let r,i,a;for(r=0,i=n.length;r<i;++r)a=n[r][e.axis],qt(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,r=n.vScale,i=this.getParsed(e);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=$h(st(this.options.clip,qh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,r=o.data||[],i=n.chartArea,a=[],c=this._drawStart||0,m=this._drawCount||r.length-c,C=this.options.drawActiveElementsOnTop;let L;for(o.dataset&&o.dataset.draw(e,i,c,m),L=c;L<c+m;++L){const D=r[L];D.hidden||(D.active&&C?a.push(D):D.draw(e,i))}for(L=0;L<a.length;++L)a[L].draw(e,i)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];i=a.$context||(a.$context=Qh(this.getContext(),e,a)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=Zh(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=o,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const r=n==="active",i=this._cachedDataOpts,a=e+"-"+n,c=i[a],m=this.enableOptionSharing&&ir(o);if(c)return Ql(c,m);const C=this.chart.config,L=C.datasetElementScopeKeys(this._type,e),D=r?[`${e}Hover`,"hover",e,""]:[e,""],W=C.getOptionScopes(this.getDataset(),L),K=Object.keys(Vt.elements[e]),X=()=>this.getContext(o,r,n),ee=C.resolveNamedOptions(W,K,X,D);return ee.$shared&&(ee.$shared=m,i[a]=Object.freeze(Ql(ee,m))),ee}_resolveAnimations(e,n,o){const r=this.chart,i=this._cachedDataOpts,a=`animation-${n}`,c=i[a];if(c)return c;let m;if(r.options.animation!==!1){const L=this.chart.config,D=L.datasetAnimationScopeKeys(this._type,n),W=L.getOptionScopes(this.getDataset(),D);m=L.createResolver(W,this.getContext(e,o,n))}const C=new Gc(r,m&&m.animations);return m&&m._cacheable&&(i[a]=Object.freeze(C)),C}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||sa(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),r=this._sharedOptions,i=this.getSharedOptions(o),a=this.includeOptions(n,i)||i!==r;return this.updateSharedOptions(i,n,o),{sharedOptions:i,includeOptions:a}}updateElement(e,n,o,r){sa(r)?Object.assign(e,o):this._resolveAnimations(n,r).update(e,o)}updateSharedOptions(e,n,o){e&&!sa(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,r){e.active=r;const i=this.getStyle(n,r);this._resolveAnimations(n,o,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[c,m,C]of this._syncList)this[c](m,C);this._syncList=[];const r=o.length,i=n.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,n,o=!0){const r=this._cachedMeta,i=r.data,a=e+n;let c;const m=C=>{for(C.length+=n,c=C.length-1;c>=a;c--)C[c]=C[c-n]};for(m(i),c=e;c<a;++c)i[c]=new this.dataElementType;this._parsing&&m(r._parsed),this.parse(e,n),o&&this.updateElements(i,e,n,"reset")}updateElements(e,n,o,r){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const r=o._parsed.splice(e,n);o._stacked&&Go(o,r)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,r]=e;this[n](o,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Oe(xn,"defaults",{}),Oe(xn,"datasetElementType",null),Oe(xn,"dataElementType",null);function tm(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let r=0,i=n.length;r<i;r++)o=o.concat(n[r].controller.getAllParsedValues(t));t._cache.$bar=Sc(o.sort((r,i)=>r-i))}return t._cache.$bar}function nm(t){const e=t.iScale,n=tm(e,t.type);let o=e._length,r,i,a,c;const m=()=>{a===32767||a===-32768||(ir(c)&&(o=Math.min(o,Math.abs(a-c)||o)),c=a)};for(r=0,i=n.length;r<i;++r)a=e.getPixelForValue(n[r]),m();for(c=void 0,r=0,i=e.ticks.length;r<i;++r)a=e.getPixelForTick(r),m();return o}function om(t,e,n,o){const r=n.barThickness;let i,a;return vt(r)?(i=e.min*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:e.pixels[t]-i/2}}function rm(t,e,n,o){const r=e.pixels,i=r[t];let a=t>0?r[t-1]:null,c=t<r.length-1?r[t+1]:null;const m=n.categoryPercentage;a===null&&(a=i-(c===null?e.end-e.start:c-i)),c===null&&(c=i+i-a);const C=i-(i-Math.min(a,c))/2*m;return{chunk:Math.abs(c-a)/2*m/o,ratio:n.barPercentage,start:C}}function im(t,e,n,o){const r=n.parse(t[0],o),i=n.parse(t[1],o),a=Math.min(r,i),c=Math.max(r,i);let m=a,C=c;Math.abs(a)>Math.abs(c)&&(m=c,C=a),e[n.axis]=C,e._custom={barStart:m,barEnd:C,start:r,end:i,min:a,max:c}}function Wc(t,e,n,o){return Ot(t)?im(t,e,n,o):e[n.axis]=n.parse(t,o),e}function es(t,e,n,o){const r=t.iScale,i=t.vScale,a=r.getLabels(),c=r===i,m=[];let C,L,D,W;for(C=n,L=n+o;C<L;++C)W=e[C],D={},D[r.axis]=c||r.parse(a[C],C),m.push(Wc(W,D,i,C));return m}function ca(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function am(t,e,n){return t!==0?Mn(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function lm(t){let e,n,o,r,i;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(r="end",i="start"):(r="start",i="end"),{start:n,end:o,reverse:e,top:r,bottom:i}}function sm(t,e,n,o){let r=e.borderSkipped;const i={};if(!r){t.borderSkipped=i;return}if(r===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:c,reverse:m,top:C,bottom:L}=lm(t);r==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?r=C:(n._bottom||0)===o?r=L:(i[ts(L,a,c,m)]=!0,r=C)),i[ts(r,a,c,m)]=!0,t.borderSkipped=i}function ts(t,e,n,o){return o?(t=cm(t,e,n),t=ns(t,n,e)):t=ns(t,e,n),t}function cm(t,e,n){return t===e?n:t===n?e:t}function ns(t,e,n){return t==="start"?e:t==="end"?n:t}function dm(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class mi extends xn{parsePrimitiveData(e,n,o,r){return es(e,n,o,r)}parseArrayData(e,n,o,r){return es(e,n,o,r)}parseObjectData(e,n,o,r){const{iScale:i,vScale:a}=e,{xAxisKey:c="x",yAxisKey:m="y"}=this._parsing,C=i.axis==="x"?c:m,L=a.axis==="x"?c:m,D=[];let W,K,X,ee;for(W=o,K=o+r;W<K;++W)ee=n[W],X={},X[i.axis]=i.parse(jn(ee,C),W),D.push(Wc(jn(ee,L),X,a,W));return D}updateRangeFromParsed(e,n,o,r){super.updateRangeFromParsed(e,n,o,r);const i=o._custom;i&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:r}=n,i=this.getParsed(e),a=i._custom,c=ca(a)?"["+a.start+", "+a.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+o.getLabelForValue(i[o.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,r){const i=r==="reset",{index:a,_cachedMeta:{vScale:c}}=this,m=c.getBasePixel(),C=c.isHorizontal(),L=this._getRuler(),{sharedOptions:D,includeOptions:W}=this._getSharedOptions(n,r);for(let K=n;K<n+o;K++){const X=this.getParsed(K),ee=i||vt(X[c.axis])?{base:m,head:m}:this._calculateBarValuePixels(K),re=this._calculateBarIndexPixels(K,L),fe=(X._stacks||{})[c.axis],ye={horizontal:C,base:ee.base,enableBorderRadius:!fe||ca(X._custom)||a===fe._top||a===fe._bottom,x:C?ee.head:re.center,y:C?re.center:ee.head,height:C?re.size:Math.abs(ee.size),width:C?Math.abs(ee.size):re.size};W&&(ye.options=D||this.resolveDataElementOptions(K,e[K].active?"active":r));const xe=ye.options||e[K].options;sm(ye,xe,fe,a),dm(ye,xe,L.ratio),this.updateElement(e[K],K,ye,r)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,r=o.getMatchingVisibleMetas(this._type).filter(L=>L.controller.options.grouped),i=o.options.stacked,a=[],c=this._cachedMeta.controller.getParsed(n),m=c&&c[o.axis],C=L=>{const D=L._parsed.find(K=>K[o.axis]===m),W=D&&D[L.vScale.axis];if(vt(W)||isNaN(W))return!0};for(const L of r)if(!(n!==void 0&&C(L))&&((i===!1||a.indexOf(L.stack)===-1||i===void 0&&L.stack===void 0)&&a.push(L.stack),L.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(o=>e[o].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const o of this.chart.data.datasets)e[st(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,o){const r=this._getStacks(e,o),i=n!==void 0?r.indexOf(n):-1;return i===-1?r.length-1:i}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,r=[];let i,a;for(i=0,a=n.data.length;i<a;++i)r.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const c=e.barThickness;return{min:c||nm(n),pixels:r,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:r},options:{base:i,minBarLength:a}}=this,c=i||0,m=this.getParsed(e),C=m._custom,L=ca(C);let D=m[n.axis],W=0,K=o?this.applyStack(n,m,o):D,X,ee;K!==D&&(W=K-D,K=D),L&&(D=C.barStart,K=C.barEnd-C.barStart,D!==0&&Mn(D)!==Mn(C.barEnd)&&(W=0),W+=D);const re=!vt(i)&&!L?i:W;let fe=n.getPixelForValue(re);if(this.chart.getDataVisibility(e)?X=n.getPixelForValue(W+K):X=fe,ee=X-fe,Math.abs(ee)<a){ee=am(ee,n,c)*a,D===c&&(fe-=ee/2);const ye=n.getPixelForDecimal(0),xe=n.getPixelForDecimal(1),ke=Math.min(ye,xe),ve=Math.max(ye,xe);fe=Math.max(Math.min(fe,ve),ke),X=fe+ee,o&&!L&&(m._stacks[n.axis]._visualValues[r]=n.getValueForPixel(X)-n.getValueForPixel(fe))}if(fe===n.getPixelForValue(c)){const ye=Mn(ee)*n.getLineWidthForValue(c)/2;fe+=ye,ee-=ye}return{size:ee,base:fe,head:X,center:X+ee/2}}_calculateBarIndexPixels(e,n){const o=n.scale,r=this.options,i=r.skipNull,a=st(r.maxBarThickness,1/0);let c,m;const C=this._getAxisCount();if(n.grouped){const L=i?this._getStackCount(e):n.stackCount,D=r.barThickness==="flex"?rm(e,n,r,L*C):om(e,n,r,L*C),W=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,K=this._getAxis().indexOf(st(W,this.getFirstScaleIdForIndexAxis())),X=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0)+K;c=D.start+D.chunk*X+D.chunk/2,m=Math.min(a,D.chunk*D.ratio)}else c=o.getPixelForValue(this.getParsed(e)[o.axis],e),m=Math.min(a,n.min*n.ratio);return{base:c-m/2,head:c+m/2,center:c,size:m}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,r=o.length;let i=0;for(;i<r;++i)this.getParsed(i)[n.axis]!==null&&!o[i].hidden&&o[i].draw(this._ctx)}}Oe(mi,"id","bar"),Oe(mi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Oe(mi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class gi extends xn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,r){const i=super.parsePrimitiveData(e,n,o,r);for(let a=0;a<i.length;a++)i[a]._custom=this.resolveDataElementOptions(a+o).radius;return i}parseArrayData(e,n,o,r){const i=super.parseArrayData(e,n,o,r);for(let a=0;a<i.length;a++){const c=n[o+a];i[a]._custom=st(c[2],this.resolveDataElementOptions(a+o).radius)}return i}parseObjectData(e,n,o,r){const i=super.parseObjectData(e,n,o,r);for(let a=0;a<i.length;a++){const c=n[o+a];i[a]._custom=st(c&&c.r&&+c.r,this.resolveDataElementOptions(a+o).radius)}return i}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:i}=n,a=this.getParsed(e),c=r.getLabelForValue(a.x),m=i.getLabelForValue(a.y),C=a._custom;return{label:o[e]||"",value:"("+c+", "+m+(C?", "+C:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c}=this._cachedMeta,{sharedOptions:m,includeOptions:C}=this._getSharedOptions(n,r),L=a.axis,D=c.axis;for(let W=n;W<n+o;W++){const K=e[W],X=!i&&this.getParsed(W),ee={},re=ee[L]=i?a.getPixelForDecimal(.5):a.getPixelForValue(X[L]),fe=ee[D]=i?c.getBasePixel():c.getPixelForValue(X[D]);ee.skip=isNaN(re)||isNaN(fe),C&&(ee.options=m||this.resolveDataElementOptions(W,K.active?"active":r),i&&(ee.options.radius=0)),this.updateElement(K,W,ee,r)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let r=super.resolveDataElementOptions(e,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const i=r.radius;return n!=="active"&&(r.radius=0),r.radius+=st(o&&o._custom,i),r}}Oe(gi,"id","bubble"),Oe(gi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Oe(gi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function um(t,e,n){let o=1,r=1,i=0,a=0;if(e<Tt){const c=t,m=c+e,C=Math.cos(c),L=Math.sin(c),D=Math.cos(m),W=Math.sin(m),K=(xe,ke,ve)=>ar(xe,c,m,!0)?1:Math.max(ke,ke*n,ve,ve*n),X=(xe,ke,ve)=>ar(xe,c,m,!0)?-1:Math.min(ke,ke*n,ve,ve*n),ee=K(0,C,D),re=K(Pt,L,W),fe=X(It,C,D),ye=X(It+Pt,L,W);o=(ee-fe)/2,r=(re-ye)/2,i=-(ee+fe)/2,a=-(re+ye)/2}return{ratioX:o,ratioY:r,offsetX:i,offsetY:a}}class Mo extends xn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=o;else{let i=m=>+o[m];if(yt(o[e])){const{key:m="value"}=this._parsing;i=C=>+jn(o[C],m)}let a,c;for(a=e,c=e+n;a<c;++a)r._parsed[a]=i(a)}}_getRotation(){return Cn(this.options.rotation-90)}_getCircumference(){return Cn(this.options.circumference)}_getRotationExtents(){let e=Tt,n=-Tt;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const r=this.chart.getDatasetMeta(o).controller,i=r._getRotation(),a=r._getCircumference();e=Math.min(e,i),n=Math.max(n,i+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,r=this._cachedMeta,i=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,c=Math.max((Math.min(o.width,o.height)-a)/2,0),m=Math.min(bf(this.options.cutout,c),1),C=this._getRingWeight(this.index),{circumference:L,rotation:D}=this._getRotationExtents(),{ratioX:W,ratioY:K,offsetX:X,offsetY:ee}=um(D,L,m),re=(o.width-a)/W,fe=(o.height-a)/K,ye=Math.max(Math.min(re,fe)/2,0),xe=vc(this.options.radius,ye),ke=Math.max(xe*m,0),ve=(xe-ke)/this._getVisibleDatasetWeightTotal();this.offsetX=X*xe,this.offsetY=ee*xe,r.total=this.calculateTotal(),this.outerRadius=xe-ve*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-ve*C,0),this.updateElements(i,0,i.length,e)}_circumference(e,n){const o=this.options,r=this._cachedMeta,i=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/Tt)}updateElements(e,n,o,r){const i=r==="reset",a=this.chart,c=a.chartArea,C=a.options.animation,L=(c.left+c.right)/2,D=(c.top+c.bottom)/2,W=i&&C.animateScale,K=W?0:this.innerRadius,X=W?0:this.outerRadius,{sharedOptions:ee,includeOptions:re}=this._getSharedOptions(n,r);let fe=this._getRotation(),ye;for(ye=0;ye<n;++ye)fe+=this._circumference(ye,i);for(ye=n;ye<n+o;++ye){const xe=this._circumference(ye,i),ke=e[ye],ve={x:L+this.offsetX,y:D+this.offsetY,startAngle:fe,endAngle:fe+xe,circumference:xe,outerRadius:X,innerRadius:K};re&&(ve.options=ee||this.resolveDataElementOptions(ye,ke.active?"active":r)),fe+=xe,this.updateElement(ke,ye,ve,r)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,r;for(r=0;r<n.length;r++){const i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?Tt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,r=o.data.labels||[],i=Ua(n._parsed[e],o.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){let n=0;const o=this.chart;let r,i,a,c,m;if(!e){for(r=0,i=o.data.datasets.length;r<i;++r)if(o.isDatasetVisible(r)){a=o.getDatasetMeta(r),e=a.data,c=a.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)m=c.resolveDataElementOptions(r),m.borderAlign!=="inner"&&(n=Math.max(n,m.borderWidth||0,m.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,r=e.length;o<r;++o){const i=this.resolveDataElementOptions(o);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(st(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Oe(Mo,"id","doughnut"),Oe(Mo,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Oe(Mo,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Oe(Mo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:r}}=e.legend.options;return n.labels.map((i,a)=>{const m=e.getDatasetMeta(0).controller.getStyle(a);return{text:i,fillStyle:m.backgroundColor,strokeStyle:m.borderColor,fontColor:r,lineWidth:m.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class yi extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:r=[],_dataset:i}=n,a=this.chart._animationsDisabled;let{start:c,count:m}=wc(n,r,a);this._drawStart=c,this._drawCount=m,Ac(n)&&(c=0,m=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=r;const C=this.resolveDatasetElementOptions(e);this.options.showLine||(C.borderWidth=0),C.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:C},e),this.updateElements(r,c,m,e)}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c,_stacked:m,_dataset:C}=this._cachedMeta,{sharedOptions:L,includeOptions:D}=this._getSharedOptions(n,r),W=a.axis,K=c.axis,{spanGaps:X,segment:ee}=this.options,re=ko(X)?X:Number.POSITIVE_INFINITY,fe=this.chart._animationsDisabled||i||r==="none",ye=n+o,xe=e.length;let ke=n>0&&this.getParsed(n-1);for(let ve=0;ve<xe;++ve){const Ee=e[ve],Me=fe?Ee:{};if(ve<n||ve>=ye){Me.skip=!0;continue}const Ie=this.getParsed(ve),Te=vt(Ie[K]),We=Me[W]=a.getPixelForValue(Ie[W],ve),nt=Me[K]=i||Te?c.getBasePixel():c.getPixelForValue(m?this.applyStack(c,Ie,m):Ie[K],ve);Me.skip=isNaN(We)||isNaN(nt)||Te,Me.stop=ve>0&&Math.abs(Ie[W]-ke[W])>re,ee&&(Me.parsed=Ie,Me.raw=C.data[ve]),D&&(Me.options=L||this.resolveDataElementOptions(ve,Ee.active?"active":r)),fe||this.updateElement(Ee,ve,Me,r),ke=Ie}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,r=e.data||[];if(!r.length)return o;const i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,i,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Oe(yi,"id","line"),Oe(yi,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Oe(yi,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ca extends Mo{}Oe(Ca,"id","pie"),Oe(Ca,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class pi extends xn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,r){return gh.bind(this)(e,n,o,r)}update(e){const n=this._cachedMeta,o=n.dataset,r=n.data||[],i=n.iScale.getLabels();if(o.points=r,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const c={_loop:!0,_fullLoop:i.length===r.length,options:a};this.updateElement(o,void 0,c,e)}this.updateElements(r,0,r.length,e)}updateElements(e,n,o,r){const i=this._cachedMeta.rScale,a=r==="reset";for(let c=n;c<n+o;c++){const m=e[c],C=this.resolveDataElementOptions(c,m.active?"active":r),L=i.getPointPositionForValue(c,this.getParsed(c).r),D=a?i.xCenter:L.x,W=a?i.yCenter:L.y,K={x:D,y:W,angle:L.angle,skip:isNaN(D)||isNaN(W),options:C};this.updateElement(m,c,K,r)}}}Oe(pi,"id","radar"),Oe(pi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Oe(pi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class _i extends xn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:i}=n,a=this.getParsed(e),c=r.getLabelForValue(a.x),m=i.getLabelForValue(a.y);return{label:o[e]||"",value:"("+c+", "+m+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,r=this.chart._animationsDisabled;let{start:i,count:a}=wc(n,o,r);if(this._drawStart=i,this._drawCount=a,Ac(n)&&(i=0,a=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:m}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!m._decimated,c.points=o;const C=this.resolveDatasetElementOptions(e);C.segment=this.options.segment,this.updateElement(c,void 0,{animated:!r,options:C},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,i,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,r){const i=r==="reset",{iScale:a,vScale:c,_stacked:m,_dataset:C}=this._cachedMeta,L=this.resolveDataElementOptions(n,r),D=this.getSharedOptions(L),W=this.includeOptions(r,D),K=a.axis,X=c.axis,{spanGaps:ee,segment:re}=this.options,fe=ko(ee)?ee:Number.POSITIVE_INFINITY,ye=this.chart._animationsDisabled||i||r==="none";let xe=n>0&&this.getParsed(n-1);for(let ke=n;ke<n+o;++ke){const ve=e[ke],Ee=this.getParsed(ke),Me=ye?ve:{},Ie=vt(Ee[X]),Te=Me[K]=a.getPixelForValue(Ee[K],ke),We=Me[X]=i||Ie?c.getBasePixel():c.getPixelForValue(m?this.applyStack(c,Ee,m):Ee[X],ke);Me.skip=isNaN(Te)||isNaN(We)||Ie,Me.stop=ke>0&&Math.abs(Ee[K]-xe[K])>fe,re&&(Me.parsed=Ee,Me.raw=C.data[ke]),W&&(Me.options=D||this.resolveDataElementOptions(ke,ve.active?"active":r)),ye||this.updateElement(ve,ke,Me,r),xe=Ee}this.updateSharedOptions(D,r,L)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let m=n.length-1;m>=0;--m)c=Math.max(c,n[m].size(this.resolveDataElementOptions(m))/2);return c>0&&c}const o=e.dataset,r=o.options&&o.options.borderWidth||0;if(!n.length)return r;const i=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,i,a)/2}}Oe(_i,"id","scatter"),Oe(_i,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Oe(_i,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function oo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Xa{constructor(e){Oe(this,"options");this.options=e||{}}static override(e){Object.assign(Xa.prototype,e)}init(){}formats(){return oo()}parse(){return oo()}format(){return oo()}add(){return oo()}diff(){return oo()}startOf(){return oo()}endOf(){return oo()}}var fm={_date:Xa};function hm(t,e,n,o){const{controller:r,data:i,_sorted:a}=t,c=r._cachedMeta.iScale,m=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&a&&i.length){const C=c._reversePixels?Rf:so;if(o){if(r._sharedOptions){const L=i[0],D=typeof L.getRange=="function"&&L.getRange(e);if(D){const W=C(i,e,n-D),K=C(i,e,n+D);return{lo:W.lo,hi:K.hi}}}}else{const L=C(i,e,n);if(m){const{vScale:D}=r._cachedMeta,{_parsed:W}=t,K=W.slice(0,L.lo+1).reverse().findIndex(ee=>!vt(ee[D.axis]));L.lo-=Math.max(0,K);const X=W.slice(L.hi).findIndex(ee=>!vt(ee[D.axis]));L.hi+=Math.max(0,X)}return L}}return{lo:0,hi:i.length-1}}function Oi(t,e,n,o,r){const i=t.getSortedVisibleDatasetMetas(),a=n[e];for(let c=0,m=i.length;c<m;++c){const{index:C,data:L}=i[c],{lo:D,hi:W}=hm(i[c],e,a,r);for(let K=D;K<=W;++K){const X=L[K];X.skip||o(X,C,K)}}}function mm(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,r){const i=e?Math.abs(o.x-r.x):0,a=n?Math.abs(o.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))}}function da(t,e,n,o,r){const i=[];return!r&&!t.isPointInArea(e)||Oi(t,n,e,function(c,m,C){!r&&!Nn(c,t.chartArea,0)||c.inRange(e.x,e.y,o)&&i.push({element:c,datasetIndex:m,index:C})},!0),i}function gm(t,e,n,o){let r=[];function i(a,c,m){const{startAngle:C,endAngle:L}=a.getProps(["startAngle","endAngle"],o),{angle:D}=Mc(a,{x:e.x,y:e.y});ar(D,C,L)&&r.push({element:a,datasetIndex:c,index:m})}return Oi(t,n,e,i),r}function ym(t,e,n,o,r,i){let a=[];const c=mm(n);let m=Number.POSITIVE_INFINITY;function C(L,D,W){const K=L.inRange(e.x,e.y,r);if(o&&!K)return;const X=L.getCenterPoint(r);if(!(!!i||t.isPointInArea(X))&&!K)return;const re=c(e,X);re<m?(a=[{element:L,datasetIndex:D,index:W}],m=re):re===m&&a.push({element:L,datasetIndex:D,index:W})}return Oi(t,n,e,C),a}function ua(t,e,n,o,r,i){return!i&&!t.isPointInArea(e)?[]:n==="r"&&!o?gm(t,e,n,r):ym(t,e,n,o,r,i)}function os(t,e,n,o,r){const i=[],a=n==="x"?"inXRange":"inYRange";let c=!1;return Oi(t,n,e,(m,C,L)=>{m[a]&&m[a](e[n],r)&&(i.push({element:m,datasetIndex:C,index:L}),c=c||m.inRange(e.x,e.y,r))}),o&&!c?[]:i}var pm={modes:{index(t,e,n,o){const r=ro(e,t),i=n.axis||"x",a=n.includeInvisible||!1,c=n.intersect?da(t,r,i,o,a):ua(t,r,i,!1,o,a),m=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(C=>{const L=c[0].index,D=C.data[L];D&&!D.skip&&m.push({element:D,datasetIndex:C.index,index:L})}),m):[]},dataset(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;let c=n.intersect?da(t,r,i,o,a):ua(t,r,i,!1,o,a);if(c.length>0){const m=c[0].datasetIndex,C=t.getDatasetMeta(m).data;c=[];for(let L=0;L<C.length;++L)c.push({element:C[L],datasetIndex:m,index:L})}return c},point(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return da(t,r,i,o,a)},nearest(t,e,n,o){const r=ro(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return ua(t,r,i,n.intersect,o,a)},x(t,e,n,o){const r=ro(e,t);return os(t,r,"x",n.intersect,o)},y(t,e,n,o){const r=ro(e,t);return os(t,r,"y",n.intersect,o)}}};const qc=["left","top","right","bottom"];function jo(t,e){return t.filter(n=>n.pos===e)}function rs(t,e){return t.filter(n=>qc.indexOf(n.pos)===-1&&n.box.axis===e)}function Wo(t,e){return t.sort((n,o)=>{const r=e?o:n,i=e?n:o;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function _m(t){const e=[];let n,o,r,i,a,c;for(n=0,o=(t||[]).length;n<o;++n)r=t[n],{position:i,options:{stack:a,stackWeight:c=1}}=r,e.push({index:n,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:a&&i+a,stackWeight:c});return e}function vm(t){const e={};for(const n of t){const{stack:o,pos:r,stackWeight:i}=n;if(!o||!qc.includes(r))continue;const a=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return e}function bm(t,e){const n=vm(t),{vBoxMaxWidth:o,hBoxMaxHeight:r}=e;let i,a,c;for(i=0,a=t.length;i<a;++i){c=t[i];const{fullSize:m}=c.box,C=n[c.stack],L=C&&c.stackWeight/C.weight;c.horizontal?(c.width=L?L*o:m&&e.availableWidth,c.height=r):(c.width=o,c.height=L?L*r:m&&e.availableHeight)}return n}function Cm(t){const e=_m(t),n=Wo(e.filter(C=>C.box.fullSize),!0),o=Wo(jo(e,"left"),!0),r=Wo(jo(e,"right")),i=Wo(jo(e,"top"),!0),a=Wo(jo(e,"bottom")),c=rs(e,"x"),m=rs(e,"y");return{fullSize:n,leftAndTop:o.concat(i),rightAndBottom:r.concat(m).concat(a).concat(c),chartArea:jo(e,"chartArea"),vertical:o.concat(r).concat(m),horizontal:i.concat(a).concat(c)}}function is(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function $c(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Mm(t,e,n,o){const{pos:r,box:i}=n,a=t.maxPadding;if(!yt(r)){n.size&&(t[r]-=n.size);const D=o[n.stack]||{size:0,count:1};D.size=Math.max(D.size,n.horizontal?i.height:i.width),n.size=D.size/D.count,t[r]+=n.size}i.getPadding&&$c(a,i.getPadding());const c=Math.max(0,e.outerWidth-is(a,t,"left","right")),m=Math.max(0,e.outerHeight-is(a,t,"top","bottom")),C=c!==t.w,L=m!==t.h;return t.w=c,t.h=m,n.horizontal?{same:C,other:L}:{same:L,other:C}}function xm(t){const e=t.maxPadding;function n(o){const r=Math.max(e[o]-t[o],0);return t[o]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Sm(t,e){const n=e.maxPadding;function o(r){const i={left:0,top:0,right:0,bottom:0};return r.forEach(a=>{i[a]=Math.max(e[a],n[a])}),i}return o(t?["left","right"]:["top","bottom"])}function Ko(t,e,n,o){const r=[];let i,a,c,m,C,L;for(i=0,a=t.length,C=0;i<a;++i){c=t[i],m=c.box,m.update(c.width||e.w,c.height||e.h,Sm(c.horizontal,e));const{same:D,other:W}=Mm(e,n,c,o);C|=D&&r.length,L=L||W,m.fullSize||r.push(c)}return C&&Ko(r,e,n,o)||L}function ri(t,e,n,o,r){t.top=n,t.left=e,t.right=e+o,t.bottom=n+r,t.width=o,t.height=r}function as(t,e,n,o){const r=n.padding;let{x:i,y:a}=e;for(const c of t){const m=c.box,C=o[c.stack]||{placed:0,weight:1},L=c.stackWeight/C.weight||1;if(c.horizontal){const D=e.w*L,W=C.size||m.height;ir(C.start)&&(a=C.start),m.fullSize?ri(m,r.left,a,n.outerWidth-r.right-r.left,W):ri(m,e.left+C.placed,a,D,W),C.start=a,C.placed+=D,a=m.bottom}else{const D=e.h*L,W=C.size||m.width;ir(C.start)&&(i=C.start),m.fullSize?ri(m,i,r.top,W,n.outerHeight-r.bottom-r.top):ri(m,i,e.top+C.placed,W,D),C.start=i,C.placed+=D,i=m.right}}e.x=i,e.y=a}var Dn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const r=Jt(t.options.layout.padding),i=Math.max(e-r.width,0),a=Math.max(n-r.height,0),c=Cm(t.boxes),m=c.vertical,C=c.horizontal;kt(t.boxes,ee=>{typeof ee.beforeLayout=="function"&&ee.beforeLayout()});const L=m.reduce((ee,re)=>re.box.options&&re.box.options.display===!1?ee:ee+1,0)||1,D=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/L,hBoxMaxHeight:a/2}),W=Object.assign({},r);$c(W,Jt(o));const K=Object.assign({maxPadding:W,w:i,h:a,x:r.left,y:r.top},r),X=bm(m.concat(C),D);Ko(c.fullSize,K,D,X),Ko(m,K,D,X),Ko(C,K,D,X)&&Ko(m,K,D,X),xm(K),as(c.leftAndTop,K,D,X),K.x+=K.w,K.y+=K.h,as(c.rightAndBottom,K,D,X),t.chartArea={left:K.left,top:K.top,right:K.left+K.w,bottom:K.top+K.h,height:K.h,width:K.w},kt(c.chartArea,ee=>{const re=ee.box;Object.assign(re,t.chartArea),re.update(K.w,K.h,{left:0,top:0,right:0,bottom:0})})}};class Yc{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,r){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):o)}}isAttached(e){return!0}updateConfig(e){}}class km extends Yc{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const vi="$chartjs",Im={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ls=t=>t===null||t==="";function Em(t,e){const n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t[vi]={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ls(r)){const i=jl(t,"width");i!==void 0&&(t.width=i)}if(ls(o))if(t.style.height==="")t.height=t.width/(e||2);else{const i=jl(t,"height");i!==void 0&&(t.height=i)}return t}const Kc=Ah?{passive:!0}:!1;function wm(t,e,n){t&&t.addEventListener(e,n,Kc)}function Am(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Kc)}function Tm(t,e){const n=Im[t.type]||t.type,{x:o,y:r}=ro(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:r!==void 0?r:null}}function wi(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Bm(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let a=!1;for(const c of i)a=a||wi(c.addedNodes,o),a=a&&!wi(c.removedNodes,o);a&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function Lm(t,e,n){const o=t.canvas,r=new MutationObserver(i=>{let a=!1;for(const c of i)a=a||wi(c.removedNodes,o),a=a&&!wi(c.addedNodes,o);a&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const sr=new Map;let ss=0;function Xc(){const t=window.devicePixelRatio;t!==ss&&(ss=t,sr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Nm(t,e){sr.size||window.addEventListener("resize",Xc),sr.set(t,e)}function Rm(t){sr.delete(t),sr.size||window.removeEventListener("resize",Xc)}function Hm(t,e,n){const o=t.canvas,r=o&&Ka(o);if(!r)return;const i=Ic((c,m)=>{const C=r.clientWidth;n(c,m),C<r.clientWidth&&n()},window),a=new ResizeObserver(c=>{const m=c[0],C=m.contentRect.width,L=m.contentRect.height;C===0&&L===0||i(C,L)});return a.observe(r),Nm(t,i),a}function fa(t,e,n){n&&n.disconnect(),e==="resize"&&Rm(t)}function Fm(t,e,n){const o=t.canvas,r=Ic(i=>{t.ctx!==null&&n(Tm(i,t))},t);return wm(o,e,r),r}class Om extends Yc{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Em(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[vi])return!1;const o=n[vi].initial;["height","width"].forEach(i=>{const a=o[i];vt(a)?n.removeAttribute(i):n.setAttribute(i,a)});const r=o.style||{};return Object.keys(r).forEach(i=>{n.style[i]=r[i]}),n.width=n.width,delete n[vi],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),a={attach:Bm,detach:Lm,resize:Hm}[n]||Fm;r[n]=a(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),r=o[n];if(!r)return;({attach:fa,detach:fa,resize:fa}[n]||Am)(e,n,r),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,r){return wh(e,n,o,r)}isAttached(e){const n=e&&Ka(e);return!!(n&&n.isConnected)}}function Vm(t){return!Ya()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?km:Om}var di;let $n=(di=class{constructor(){Oe(this,"x");Oe(this,"y");Oe(this,"active",!1);Oe(this,"options");Oe(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return ko(this.x)&&ko(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const r={};return e.forEach(i=>{r[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),r}},Oe(di,"defaults",{}),Oe(di,"defaultRoutes"),di);function Pm(t,e){const n=t.options.ticks,o=Dm(t),r=Math.min(n.maxTicksLimit||o,o),i=n.major.enabled?Um(e):[],a=i.length,c=i[0],m=i[a-1],C=[];if(a>r)return Gm(e,C,i,a/r),C;const L=zm(i,e,r);if(a>0){let D,W;const K=a>1?Math.round((m-c)/(a-1)):null;for(ii(e,C,L,vt(K)?0:c-K,c),D=0,W=a-1;D<W;D++)ii(e,C,L,i[D],i[D+1]);return ii(e,C,L,m,vt(K)?e.length:m+K),C}return ii(e,C,L),C}function Dm(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(o,r))}function zm(t,e,n){const o=jm(t),r=e.length/n;if(!o)return Math.max(r,1);const i=wf(o);for(let a=0,c=i.length-1;a<c;a++){const m=i[a];if(m>r)return m}return Math.max(r,1)}function Um(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function Gm(t,e,n,o){let r=0,i=n[0],a;for(o=Math.ceil(o),a=0;a<t.length;a++)a===i&&(e.push(t[a]),r++,i=n[r*o])}function ii(t,e,n,o,r){const i=st(o,0),a=Math.min(st(r,t.length),t.length);let c=0,m,C,L;for(n=Math.ceil(n),r&&(m=r-o,n=m/Math.floor(m/n)),L=i;L<0;)c++,L=Math.round(i+c*n);for(C=Math.max(i,0);C<a;C++)C===L&&(e.push(t[C]),c++,L=Math.round(i+c*n))}function jm(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const Wm=t=>t==="left"?"right":t==="right"?"left":t,cs=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,ds=(t,e)=>Math.min(e||t,t);function us(t,e){const n=[],o=t.length/e,r=t.length;let i=0;for(;i<r;i+=o)n.push(t[Math.floor(i)]);return n}function qm(t,e,n){const o=t.ticks.length,r=Math.min(e,o-1),i=t._startPixel,a=t._endPixel,c=1e-6;let m=t.getPixelForTick(r),C;if(!(n&&(o===1?C=Math.max(m-i,a-m):e===0?C=(t.getPixelForTick(1)-m)/2:C=(m-t.getPixelForTick(r-1))/2,m+=r<e?C:-C,m<i-c||m>a+c)))return m}function $m(t,e){kt(t,n=>{const o=n.gc,r=o.length/2;let i;if(r>e){for(i=0;i<r;++i)delete n.data[o[i]];o.splice(0,r)}})}function qo(t){return t.drawTicks?t.tickLength:0}function fs(t,e){if(!t.display)return 0;const n=$t(t.font,e),o=Jt(t.padding);return(Ot(t.text)?t.text.length:1)*n.lineHeight+o.height}function Ym(t,e){return qn(t,{scale:e,type:"scale"})}function Km(t,e,n){return qn(t,{tick:n,index:e,type:"tick"})}function Xm(t,e,n){let o=Ec(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Wm(o)),o}function Jm(t,e,n,o){const{top:r,left:i,bottom:a,right:c,chart:m}=t,{chartArea:C,scales:L}=m;let D=0,W,K,X;const ee=a-r,re=c-i;if(t.isHorizontal()){if(K=ln(o,i,c),yt(n)){const fe=Object.keys(n)[0],ye=n[fe];X=L[fe].getPixelForValue(ye)+ee-e}else n==="center"?X=(C.bottom+C.top)/2+ee-e:X=cs(t,n,e);W=c-i}else{if(yt(n)){const fe=Object.keys(n)[0],ye=n[fe];K=L[fe].getPixelForValue(ye)-re+e}else n==="center"?K=(C.left+C.right)/2-re+e:K=cs(t,n,e);X=ln(o,a,r),D=n==="left"?-Pt:Pt}return{titleX:K,titleY:X,maxWidth:W,rotation:D}}class Ao extends $n{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:r}=this;return e=_n(e,Number.POSITIVE_INFINITY),n=_n(n,Number.NEGATIVE_INFINITY),o=_n(o,Number.POSITIVE_INFINITY),r=_n(r,Number.NEGATIVE_INFINITY),{min:_n(e,o),max:_n(n,r),minDefined:qt(e),maxDefined:qt(n)}}getMinMax(e){let{min:n,max:o,minDefined:r,maxDefined:i}=this.getUserBounds(),a;if(r&&i)return{min:n,max:o};const c=this.getMatchingVisibleMetas();for(let m=0,C=c.length;m<C;++m)a=c[m].controller.getMinMax(this,e),r||(n=Math.min(n,a.min)),i||(o=Math.max(o,a.max));return n=i&&n>o?o:n,o=r&&n>o?n:o,{min:_n(n,_n(o,n)),max:_n(o,_n(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){wt(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:r,grace:i,ticks:a}=this.options,c=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ih(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const m=c<this.ticks.length;this._convertTicksToLabels(m?us(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Pm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),m&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){wt(this.options.afterUpdate,[this])}beforeSetDimensions(){wt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){wt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),wt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){wt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,r,i;for(o=0,r=e.length;o<r;o++)i=e[o],i.label=wt(n.callback,[i.value,o,e],this)}afterTickToLabelConversion(){wt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){wt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=ds(this.ticks.length,e.ticks.maxTicksLimit),r=n.minRotation||0,i=n.maxRotation;let a=r,c,m,C;if(!this._isVisible()||!n.display||r>=i||o<=1||!this.isHorizontal()){this.labelRotation=r;return}const L=this._getLabelSizes(),D=L.widest.width,W=L.highest.height,K=Kt(this.chart.width-D,0,this.maxWidth);c=e.offset?this.maxWidth/o:K/(o-1),D+6>c&&(c=K/(o-(e.offset?.5:1)),m=this.maxHeight-qo(e.grid)-n.padding-fs(e.title,this.chart.options.font),C=Math.sqrt(D*D+W*W),a=Pa(Math.min(Math.asin(Kt((L.highest.height+6)/c,-1,1)),Math.asin(Kt(m/C,-1,1))-Math.asin(Kt(W/C,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){wt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){wt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:r,grid:i}}=this,a=this._isVisible(),c=this.isHorizontal();if(a){const m=fs(r,n.options.font);if(c?(e.width=this.maxWidth,e.height=qo(i)+m):(e.height=this.maxHeight,e.width=qo(i)+m),o.display&&this.ticks.length){const{first:C,last:L,widest:D,highest:W}=this._getLabelSizes(),K=o.padding*2,X=Cn(this.labelRotation),ee=Math.cos(X),re=Math.sin(X);if(c){const fe=o.mirror?0:re*D.width+ee*W.height;e.height=Math.min(this.maxHeight,e.height+fe+K)}else{const fe=o.mirror?0:ee*D.width+re*W.height;e.width=Math.min(this.maxWidth,e.width+fe+K)}this._calculatePadding(C,L,re,ee)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,r){const{ticks:{align:i,padding:a},position:c}=this.options,m=this.labelRotation!==0,C=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const L=this.getPixelForTick(0)-this.left,D=this.right-this.getPixelForTick(this.ticks.length-1);let W=0,K=0;m?C?(W=r*e.width,K=o*n.height):(W=o*e.height,K=r*n.width):i==="start"?K=n.width:i==="end"?W=e.width:i!=="inner"&&(W=e.width/2,K=n.width/2),this.paddingLeft=Math.max((W-L+a)*this.width/(this.width-L),0),this.paddingRight=Math.max((K-D+a)*this.width/(this.width-D),0)}else{let L=n.height/2,D=e.height/2;i==="start"?(L=0,D=e.height):i==="end"&&(L=n.height,D=0),this.paddingTop=L+a,this.paddingBottom=D+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){wt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)vt(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=us(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:r,_longestTextCache:i}=this,a=[],c=[],m=Math.floor(n/ds(n,o));let C=0,L=0,D,W,K,X,ee,re,fe,ye,xe,ke,ve;for(D=0;D<n;D+=m){if(X=e[D].label,ee=this._resolveTickFontOptions(D),r.font=re=ee.string,fe=i[re]=i[re]||{data:{},gc:[]},ye=ee.lineHeight,xe=ke=0,!vt(X)&&!Ot(X))xe=Ii(r,fe.data,fe.gc,xe,X),ke=ye;else if(Ot(X))for(W=0,K=X.length;W<K;++W)ve=X[W],!vt(ve)&&!Ot(ve)&&(xe=Ii(r,fe.data,fe.gc,xe,ve),ke+=ye);a.push(xe),c.push(ke),C=Math.max(xe,C),L=Math.max(ke,L)}$m(i,n);const Ee=a.indexOf(C),Me=c.indexOf(L),Ie=Te=>({width:a[Te]||0,height:c[Te]||0});return{first:Ie(0),last:Ie(n-1),widest:Ie(Ee),highest:Ie(Me),widths:a,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Nf(this._alignToPixels?no(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Km(this.getContext(),e,o))}return this.$context||(this.$context=Ym(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Cn(this.labelRotation),o=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,c=i?i.widest.width+a:0,m=i?i.highest.height+a:0;return this.isHorizontal()?m*o>c*r?c/o:m/r:m*r<c*o?m/o:c/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,r=this.options,{grid:i,position:a,border:c}=r,m=i.offset,C=this.isHorizontal(),D=this.ticks.length+(m?1:0),W=qo(i),K=[],X=c.setContext(this.getContext()),ee=X.display?X.width:0,re=ee/2,fe=function(ut){return no(o,ut,ee)};let ye,xe,ke,ve,Ee,Me,Ie,Te,We,nt,Pe,ot;if(a==="top")ye=fe(this.bottom),Me=this.bottom-W,Te=ye-re,nt=fe(e.top)+re,ot=e.bottom;else if(a==="bottom")ye=fe(this.top),nt=e.top,ot=fe(e.bottom)-re,Me=ye+re,Te=this.top+W;else if(a==="left")ye=fe(this.right),Ee=this.right-W,Ie=ye-re,We=fe(e.left)+re,Pe=e.right;else if(a==="right")ye=fe(this.left),We=e.left,Pe=fe(e.right)-re,Ee=ye+re,Ie=this.left+W;else if(n==="x"){if(a==="center")ye=fe((e.top+e.bottom)/2+.5);else if(yt(a)){const ut=Object.keys(a)[0],Ye=a[ut];ye=fe(this.chart.scales[ut].getPixelForValue(Ye))}nt=e.top,ot=e.bottom,Me=ye+re,Te=Me+W}else if(n==="y"){if(a==="center")ye=fe((e.left+e.right)/2);else if(yt(a)){const ut=Object.keys(a)[0],Ye=a[ut];ye=fe(this.chart.scales[ut].getPixelForValue(Ye))}Ee=ye-re,Ie=Ee-W,We=e.left,Pe=e.right}const mt=st(r.ticks.maxTicksLimit,D),Qe=Math.max(1,Math.ceil(D/mt));for(xe=0;xe<D;xe+=Qe){const ut=this.getContext(xe),Ye=i.setContext(ut),Je=c.setContext(ut),dt=Ye.lineWidth,Dt=Ye.color,Re=Je.dash||[],ft=Je.dashOffset,nn=Ye.tickWidth,Et=Ye.tickColor,_e=Ye.tickBorderDash||[],bt=Ye.tickBorderDashOffset;ke=qm(this,xe,m),ke!==void 0&&(ve=no(o,ke,dt),C?Ee=Ie=We=Pe=ve:Me=Te=nt=ot=ve,K.push({tx1:Ee,ty1:Me,tx2:Ie,ty2:Te,x1:We,y1:nt,x2:Pe,y2:ot,width:dt,color:Dt,borderDash:Re,borderDashOffset:ft,tickWidth:nn,tickColor:Et,tickBorderDash:_e,tickBorderDashOffset:bt}))}return this._ticksLength=D,this._borderValue=ye,K}_computeLabelItems(e){const n=this.axis,o=this.options,{position:r,ticks:i}=o,a=this.isHorizontal(),c=this.ticks,{align:m,crossAlign:C,padding:L,mirror:D}=i,W=qo(o.grid),K=W+L,X=D?-L:K,ee=-Cn(this.labelRotation),re=[];let fe,ye,xe,ke,ve,Ee,Me,Ie,Te,We,nt,Pe,ot="middle";if(r==="top")Ee=this.bottom-X,Me=this._getXAxisLabelAlignment();else if(r==="bottom")Ee=this.top+X,Me=this._getXAxisLabelAlignment();else if(r==="left"){const Qe=this._getYAxisLabelAlignment(W);Me=Qe.textAlign,ve=Qe.x}else if(r==="right"){const Qe=this._getYAxisLabelAlignment(W);Me=Qe.textAlign,ve=Qe.x}else if(n==="x"){if(r==="center")Ee=(e.top+e.bottom)/2+K;else if(yt(r)){const Qe=Object.keys(r)[0],ut=r[Qe];Ee=this.chart.scales[Qe].getPixelForValue(ut)+K}Me=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")ve=(e.left+e.right)/2-K;else if(yt(r)){const Qe=Object.keys(r)[0],ut=r[Qe];ve=this.chart.scales[Qe].getPixelForValue(ut)}Me=this._getYAxisLabelAlignment(W).textAlign}n==="y"&&(m==="start"?ot="top":m==="end"&&(ot="bottom"));const mt=this._getLabelSizes();for(fe=0,ye=c.length;fe<ye;++fe){xe=c[fe],ke=xe.label;const Qe=i.setContext(this.getContext(fe));Ie=this.getPixelForTick(fe)+i.labelOffset,Te=this._resolveTickFontOptions(fe),We=Te.lineHeight,nt=Ot(ke)?ke.length:1;const ut=nt/2,Ye=Qe.color,Je=Qe.textStrokeColor,dt=Qe.textStrokeWidth;let Dt=Me;a?(ve=Ie,Me==="inner"&&(fe===ye-1?Dt=this.options.reverse?"left":"right":fe===0?Dt=this.options.reverse?"right":"left":Dt="center"),r==="top"?C==="near"||ee!==0?Pe=-nt*We+We/2:C==="center"?Pe=-mt.highest.height/2-ut*We+We:Pe=-mt.highest.height+We/2:C==="near"||ee!==0?Pe=We/2:C==="center"?Pe=mt.highest.height/2-ut*We:Pe=mt.highest.height-nt*We,D&&(Pe*=-1),ee!==0&&!Qe.showLabelBackdrop&&(ve+=We/2*Math.sin(ee))):(Ee=Ie,Pe=(1-nt)*We/2);let Re;if(Qe.showLabelBackdrop){const ft=Jt(Qe.backdropPadding),nn=mt.heights[fe],Et=mt.widths[fe];let _e=Pe-ft.top,bt=0-ft.left;switch(ot){case"middle":_e-=nn/2;break;case"bottom":_e-=nn;break}switch(Me){case"center":bt-=Et/2;break;case"right":bt-=Et;break;case"inner":fe===ye-1?bt-=Et:fe>0&&(bt-=Et/2);break}Re={left:bt,top:_e,width:Et+ft.width,height:nn+ft.height,color:Qe.backdropColor}}re.push({label:ke,font:Te,textOffset:Pe,options:{rotation:ee,color:Ye,strokeColor:Je,strokeWidth:dt,textAlign:Dt,textBaseline:ot,translation:[ve,Ee],backdrop:Re}})}return re}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Cn(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),c=e+i,m=a.widest.width;let C,L;return n==="left"?r?(L=this.right+i,o==="near"?C="left":o==="center"?(C="center",L+=m/2):(C="right",L+=m)):(L=this.right-c,o==="near"?C="right":o==="center"?(C="center",L-=m/2):(C="left",L=this.left)):n==="right"?r?(L=this.left+i,o==="near"?C="right":o==="center"?(C="center",L-=m/2):(C="left",L-=m)):(L=this.left+c,o==="near"?C="left":o==="center"?(C="center",L+=m/2):(C="right",L=this.right)):C="right",{textAlign:C,x:L}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:r,width:i,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,r,i,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(i=>i.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,a;const c=(m,C,L)=>{!L.width||!L.color||(o.save(),o.lineWidth=L.width,o.strokeStyle=L.color,o.setLineDash(L.borderDash||[]),o.lineDashOffset=L.borderDashOffset,o.beginPath(),o.moveTo(m.x,m.y),o.lineTo(C.x,C.y),o.stroke(),o.restore())};if(n.display)for(i=0,a=r.length;i<a;++i){const m=r[i];n.drawOnChartArea&&c({x:m.x1,y:m.y1},{x:m.x2,y:m.y2},m),n.drawTicks&&c({x:m.tx1,y:m.ty1},{x:m.tx2,y:m.ty2},{color:m.tickColor,width:m.tickWidth,borderDash:m.tickBorderDash,borderDashOffset:m.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:r}}=this,i=o.setContext(this.getContext()),a=o.display?i.width:0;if(!a)return;const c=r.setContext(this.getContext(0)).lineWidth,m=this._borderValue;let C,L,D,W;this.isHorizontal()?(C=no(e,this.left,a)-a/2,L=no(e,this.right,c)+c/2,D=W=m):(D=no(e,this.top,a)-a/2,W=no(e,this.bottom,c)+c/2,C=L=m),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(C,D),n.lineTo(L,W),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,r=this._computeLabelArea();r&&Ri(o,r);const i=this.getLabelItems(e);for(const a of i){const c=a.options,m=a.font,C=a.label,L=a.textOffset;Io(o,C,0,L,m,c)}r&&Hi(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:r}}=this;if(!o.display)return;const i=$t(o.font),a=Jt(o.padding),c=o.align;let m=i.lineHeight/2;n==="bottom"||n==="center"||yt(n)?(m+=a.bottom,Ot(o.text)&&(m+=i.lineHeight*(o.text.length-1))):m+=a.top;const{titleX:C,titleY:L,maxWidth:D,rotation:W}=Jm(this,m,n,c);Io(e,o.text,0,0,i,{color:o.color,maxWidth:D,rotation:W,textAlign:Xm(c,n,r),textBaseline:"middle",translation:[C,L]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=st(e.grid&&e.grid.z,-1),r=st(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ao.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:o,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",r=[];let i,a;for(i=0,a=n.length;i<a;++i){const c=n[i];c[o]===this.id&&(!e||c.type===e)&&r.push(c)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return $t(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ai{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;eg(n)&&(o=this.register(n));const r=this.items,i=e.id,a=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,Zm(e,a,o),this.override&&Vt.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,r=this.scope;o in n&&delete n[o],r&&o in Vt[r]&&(delete Vt[r][o],this.override&&delete fo[o])}}function Zm(t,e,n){const o=rr(Object.create(null),[n?Vt.get(n):{},Vt.get(e),t.defaults]);Vt.set(e,o),t.defaultRoutes&&Qm(e,t.defaultRoutes),t.descriptors&&Vt.describe(e,t.descriptors)}function Qm(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),r=o.pop(),i=[t].concat(o).join("."),a=e[n].split("."),c=a.pop(),m=a.join(".");Vt.route(i,r,m,c)})}function eg(t){return"id"in t&&"defaults"in t}class tg{constructor(){this.controllers=new ai(xn,"datasets",!0),this.elements=new ai($n,"elements"),this.plugins=new ai(Object,"plugins"),this.scales=new ai(Ao,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(r=>{const i=o||this._getRegistryForType(r);o||i.isForType(r)||i===this.plugins&&r.id?this._exec(e,i,r):kt(r,a=>{const c=o||this._getRegistryForType(a);this._exec(e,c,a)})})}_exec(e,n,o){const r=Va(e);wt(o["before"+r],[],o),n[e](o),wt(o["after"+r],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return r}}var bn=new tg;class ng{constructor(){this._init=[]}notify(e,n,o,r){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(i,e,n,o);return n==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,o,r){r=r||{};for(const i of e){const a=i.plugin,c=a[o],m=[n,r,i.options];if(wt(c,m,a)===!1&&r.cancelable)return!1}return!0}invalidate(){vt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,r=st(o.options&&o.options.plugins,{}),i=og(o);return r===!1&&!n?[]:ig(e,i,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,r=(i,a)=>i.filter(c=>!a.some(m=>c.plugin.id===m.plugin.id));this._notify(r(n,o),e,"stop"),this._notify(r(o,n),e,"start")}}function og(t){const e={},n=[],o=Object.keys(bn.plugins.items);for(let i=0;i<o.length;i++)n.push(bn.getPlugin(o[i]));const r=t.plugins||[];for(let i=0;i<r.length;i++){const a=r[i];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function rg(t,e){return!e&&t===!1?null:t===!0?{}:t}function ig(t,{plugins:e,localIds:n},o,r){const i=[],a=t.getContext();for(const c of e){const m=c.id,C=rg(o[m],r);C!==null&&i.push({plugin:c,options:ag(t.config,{plugin:c,local:n[m]},C,a)})}return i}function ag(t,{plugin:e,local:n},o,r){const i=t.pluginScopeKeys(e),a=t.getOptionScopes(o,i);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ma(t,e){const n=Vt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function lg(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function sg(t,e){return t===e?"_index_":"_value_"}function hs(t){if(t==="x"||t==="y"||t==="r")return t}function cg(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function xa(t,...e){if(hs(t))return t;for(const n of e){const o=n.axis||cg(n.position)||t.length>1&&hs(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function ms(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function dg(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return ms(t,"x",n[0])||ms(t,"y",n[0])}return{}}function ug(t,e){const n=fo[t.type]||{scales:{}},o=e.scales||{},r=Ma(t.type,e),i=Object.create(null);return Object.keys(o).forEach(a=>{const c=o[a];if(!yt(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const m=xa(a,c,dg(a,t),Vt.scales[c.type]),C=sg(m,r),L=n.scales||{};i[a]=Qo(Object.create(null),[{axis:m},c,L[m],L[C]])}),t.data.datasets.forEach(a=>{const c=a.type||t.type,m=a.indexAxis||Ma(c,e),L=(fo[c]||{}).scales||{};Object.keys(L).forEach(D=>{const W=lg(D,m),K=a[W+"AxisID"]||W;i[K]=i[K]||Object.create(null),Qo(i[K],[{axis:W},o[K],L[D]])})}),Object.keys(i).forEach(a=>{const c=i[a];Qo(c,[Vt.scales[c.type],Vt.scale])}),i}function Jc(t){const e=t.options||(t.options={});e.plugins=st(e.plugins,{}),e.scales=ug(t,e)}function Zc(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function fg(t){return t=t||{},t.data=Zc(t.data),Jc(t),t}const gs=new Map,Qc=new Set;function li(t,e){let n=gs.get(t);return n||(n=e(),gs.set(t,n),Qc.add(n)),n}const $o=(t,e,n)=>{const o=jn(e,n);o!==void 0&&t.add(o)};class hg{constructor(e){this._config=fg(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Zc(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Jc(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return li(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return li(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return li(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return li(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let r=o.get(e);return(!r||n)&&(r=new Map,o.set(e,r)),r}getOptionScopes(e,n,o){const{options:r,type:i}=this,a=this._cachedScopes(e,o),c=a.get(n);if(c)return c;const m=new Set;n.forEach(L=>{e&&(m.add(e),L.forEach(D=>$o(m,e,D))),L.forEach(D=>$o(m,r,D)),L.forEach(D=>$o(m,fo[i]||{},D)),L.forEach(D=>$o(m,Vt,D)),L.forEach(D=>$o(m,va,D))});const C=Array.from(m);return C.length===0&&C.push(Object.create(null)),Qc.has(n)&&a.set(n,C),C}chartOptionScopes(){const{options:e,type:n}=this;return[e,fo[n]||{},Vt.datasets[n]||{},{type:n},Vt,va]}resolveNamedOptions(e,n,o,r=[""]){const i={$shared:!0},{resolver:a,subPrefixes:c}=ys(this._resolverCache,e,r);let m=a;if(gg(a,n)){i.$shared=!1,o=Wn(o)?o():o;const C=this.createResolver(e,o,c);m=Eo(a,o,C)}for(const C of n)i[C]=m[C];return i}createResolver(e,n,o=[""],r){const{resolver:i}=ys(this._resolverCache,e,o);return yt(n)?Eo(i,n,void 0,r):i}}function ys(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const r=n.join();let i=o.get(r);return i||(i={resolver:Wa(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},o.set(r,i)),i}const mg=t=>yt(t)&&Object.getOwnPropertyNames(t).some(e=>Wn(t[e]));function gg(t,e){const{isScriptable:n,isIndexable:o}=Lc(t);for(const r of e){const i=n(r),a=o(r),c=(a||i)&&t[r];if(i&&(Wn(c)||mg(c))||a&&Ot(c))return!0}return!1}var yg="4.5.0";const pg=["top","bottom","left","right","chartArea"];function ps(t,e){return t==="top"||t==="bottom"||pg.indexOf(t)===-1&&e==="x"}function _s(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function vs(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),wt(n&&n.onComplete,[t],e)}function _g(t){const e=t.chart,n=e.options.animation;wt(n&&n.onProgress,[t],e)}function ed(t){return Ya()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const bi={},bs=t=>{const e=ed(t);return Object.values(bi).filter(n=>n.canvas===e).pop()};function vg(t,e,n){const o=Object.keys(t);for(const r of o){const i=+r;if(i>=e){const a=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=a)}}}function bg(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}class mn{static register(...e){bn.add(...e),Cs()}static unregister(...e){bn.remove(...e),Cs()}constructor(e,n){const o=this.config=new hg(n),r=ed(e),i=bs(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Vm(r)),this.platform.updateConfig(o);const c=this.platform.acquireContext(r,a.aspectRatio),m=c&&c.canvas,C=m&&m.height,L=m&&m.width;if(this.id=vf(),this.ctx=c,this.canvas=m,this.width=L,this.height=C,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ng,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Of(D=>this.update(D),a.resizeDelay||0),this._dataChanges=[],bi[this.id]=this,!c||!m){console.error("Failed to create chart: can't acquire context from the given item");return}An.listen(this,"complete",vs),An.listen(this,"progress",_g),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:r,_aspectRatio:i}=this;return vt(e)?n&&i?i:r?o/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Dl(this.canvas,this.ctx),this}stop(){return An.stop(this),this}resize(e,n){An.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,r=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,n,i),c=o.devicePixelRatio||this.platform.getDevicePixelRatio(),m=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Gl(this,c,!0)&&(this.notifyPlugins("resize",{size:a}),wt(o.onResize,[this,a],this),this.attached&&this._doResize(m)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};kt(n,(o,r)=>{o.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,r=Object.keys(o).reduce((a,c)=>(a[c]=!1,a),{});let i=[];n&&(i=i.concat(Object.keys(n).map(a=>{const c=n[a],m=xa(a,c),C=m==="r",L=m==="x";return{options:c,dposition:C?"chartArea":L?"bottom":"left",dtype:C?"radialLinear":L?"category":"linear"}}))),kt(i,a=>{const c=a.options,m=c.id,C=xa(m,c),L=st(c.type,a.dtype);(c.position===void 0||ps(c.position,C)!==ps(a.dposition))&&(c.position=a.dposition),r[m]=!0;let D=null;if(m in o&&o[m].type===L)D=o[m];else{const W=bn.getScale(L);D=new W({id:m,type:L,ctx:this.ctx,chart:this}),o[D.id]=D}D.init(c,e)}),kt(r,(a,c)=>{a||delete o[c]}),kt(o,a=>{Dn.configure(this,a,a.options),Dn.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((r,i)=>r.index-i.index),o>n){for(let r=n;r<o;++r)this._destroyDatasetMeta(r);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(_s("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,r)=>{n.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,r;for(this._removeUnreferencedMetasets(),o=0,r=n.length;o<r;o++){const i=n[o];let a=this.getDatasetMeta(o);const c=i.type||this.config.type;if(a.type&&a.type!==c&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=c,a.indexAxis=i.indexAxis||Ma(c,this.options),a.order=i.order||0,a.index=o,a.label=""+i.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const m=bn.getController(c),{datasetElementType:C,dataElementType:L}=Vt.datasets[c];Object.assign(m,{dataElementType:bn.getElement(L),datasetElementType:C&&bn.getElement(C)}),a.controller=new m(this,o),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){kt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let C=0,L=this.data.datasets.length;C<L;C++){const{controller:D}=this.getDatasetMeta(C),W=!r&&i.indexOf(D)===-1;D.buildOrUpdateElements(W),a=Math.max(+D.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),r||kt(i,C=>{C.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(_s("z","_idx"));const{_active:c,_lastEvent:m}=this;m?this._eventHandler(m,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){kt(this.scales,e=>{Dn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Bl(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:r,count:i}of n){const a=o==="_removeElements"?-i:i;vg(e,r,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=i=>new Set(e.filter(a=>a[0]===i).map((a,c)=>c+","+a.splice(1).join(","))),r=o(0);for(let i=1;i<n;i++)if(!Bl(r,o(i)))return;return Array.from(r).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Dn.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],kt(this.boxes,r=>{o&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,i)=>{r._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Wn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),r={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(o.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(An.has(this)?this.attached&&!An.running(this)&&An.start(this):(this.draw(),vs({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(o,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let r,i;for(r=0,i=n.length;r<i;++r){const a=n[r];(!e||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o={meta:e,index:e.index,cancelable:!0},r=Uc(this,e);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Ri(n,r),e.controller.draw(),r&&Hi(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Nn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,r){const i=pm.modes[n];return typeof i=="function"?i(this,e,o,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let r=o.filter(i=>i&&i._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(r)),r}getContext(){return this.$context||(this.$context=qn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const r=o?"show":"hide",i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);ir(n)?(i.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),a.update(i,{visible:o}),this.update(c=>c.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),An.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Dl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete bi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(i,a)=>{n.addEventListener(this,i,a),e[i]=a},r=(i,a,c)=>{i.offsetX=a,i.offsetY=c,this._eventHandler(i)};kt(this.options.events,i=>o(i,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(m,C)=>{n.addEventListener(this,m,C),e[m]=C},r=(m,C)=>{e[m]&&(n.removeEventListener(this,m,C),delete e[m])},i=(m,C)=>{this.canvas&&this.resize(m,C)};let a;const c=()=>{r("attach",c),this.attached=!0,this.resize(),o("resize",i),o("detach",a)};a=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),o("attach",c)},n.isAttached(this.canvas)?c():a()}unbindEvents(){kt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},kt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const r=o?"set":"remove";let i,a,c,m;for(n==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),c=0,m=e.length;c<m;++c){a=e[c];const C=a&&this.getDatasetMeta(a.datasetIndex).controller;C&&C[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:i,index:a})=>{const c=this.getDatasetMeta(i);if(!c)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:c.data[a],index:a}});!xi(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const r=this.options.hover,i=(m,C)=>m.filter(L=>!C.some(D=>L.datasetIndex===D.datasetIndex&&L.index===D.index)),a=i(n,e),c=o?e:i(e,n);a.length&&this.updateHoverStyle(a,r.mode,!1),c.length&&r.mode&&this.updateHoverStyle(c,r.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,r)===!1)return;const i=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,r),(i||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:r=[],options:i}=this,a=n,c=this._getActiveElements(e,r,o,a),m=kf(e),C=bg(e,this._lastEvent,o,m);o&&(this._lastEvent=null,wt(i.onHover,[e,c,this],this),m&&wt(i.onClick,[e,c,this],this));const L=!xi(c,r);return(L||n)&&(this._active=c,this._updateHoverStyles(c,r,n)),this._lastEvent=C,L}_getActiveElements(e,n,o,r){if(e.type==="mouseout")return[];if(!o)return n;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}Oe(mn,"defaults",Vt),Oe(mn,"instances",bi),Oe(mn,"overrides",fo),Oe(mn,"registry",bn),Oe(mn,"version",yg),Oe(mn,"getChart",bs);function Cs(){return kt(mn.instances,t=>t._plugins.invalidate())}function Cg(t,e,n){const{startAngle:o,x:r,y:i,outerRadius:a,innerRadius:c,options:m}=e,{borderWidth:C,borderJoinStyle:L}=m,D=Math.min(C/a,Yt(o-n));if(t.beginPath(),t.arc(r,i,a-C/2,o+D/2,n-D/2),c>0){const W=Math.min(C/c,Yt(o-n));t.arc(r,i,c+C/2,n-W/2,o+W/2,!0)}else{const W=Math.min(C/2,a*Yt(o-n));if(L==="round")t.arc(r,i,W,n-It/2,o+It/2,!0);else if(L==="bevel"){const K=2*W*W,X=-K*Math.cos(n+It/2)+r,ee=-K*Math.sin(n+It/2)+i,re=K*Math.cos(o+It/2)+r,fe=K*Math.sin(o+It/2)+i;t.lineTo(X,ee),t.lineTo(re,fe)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function Mg(t,e,n){const{startAngle:o,pixelMargin:r,x:i,y:a,outerRadius:c,innerRadius:m}=e;let C=r/c;t.beginPath(),t.arc(i,a,c,o-C,n+C),m>r?(C=r/m,t.arc(i,a,m,n+C,o-C,!0)):t.arc(i,a,r,n+Pt,o-Pt),t.closePath(),t.clip()}function xg(t){return ja(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Sg(t,e,n,o){const r=xg(t.options.borderRadius),i=(n-e)/2,a=Math.min(i,o*e/2),c=m=>{const C=(n-Math.min(i,m))*o/2;return Kt(m,0,Math.min(i,C))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:Kt(r.innerStart,0,a),innerEnd:Kt(r.innerEnd,0,a)}}function Co(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Ai(t,e,n,o,r,i){const{x:a,y:c,startAngle:m,pixelMargin:C,innerRadius:L}=e,D=Math.max(e.outerRadius+o+n-C,0),W=L>0?L+o+n+C:0;let K=0;const X=r-m;if(o){const Qe=L>0?L-o:0,ut=D>0?D-o:0,Ye=(Qe+ut)/2,Je=Ye!==0?X*Ye/(Ye+o):X;K=(X-Je)/2}const ee=Math.max(.001,X*D-n/It)/D,re=(X-ee)/2,fe=m+re+K,ye=r-re-K,{outerStart:xe,outerEnd:ke,innerStart:ve,innerEnd:Ee}=Sg(e,W,D,ye-fe),Me=D-xe,Ie=D-ke,Te=fe+xe/Me,We=ye-ke/Ie,nt=W+ve,Pe=W+Ee,ot=fe+ve/nt,mt=ye-Ee/Pe;if(t.beginPath(),i){const Qe=(Te+We)/2;if(t.arc(a,c,D,Te,Qe),t.arc(a,c,D,Qe,We),ke>0){const dt=Co(Ie,We,a,c);t.arc(dt.x,dt.y,ke,We,ye+Pt)}const ut=Co(Pe,ye,a,c);if(t.lineTo(ut.x,ut.y),Ee>0){const dt=Co(Pe,mt,a,c);t.arc(dt.x,dt.y,Ee,ye+Pt,mt+Math.PI)}const Ye=(ye-Ee/W+(fe+ve/W))/2;if(t.arc(a,c,W,ye-Ee/W,Ye,!0),t.arc(a,c,W,Ye,fe+ve/W,!0),ve>0){const dt=Co(nt,ot,a,c);t.arc(dt.x,dt.y,ve,ot+Math.PI,fe-Pt)}const Je=Co(Me,fe,a,c);if(t.lineTo(Je.x,Je.y),xe>0){const dt=Co(Me,Te,a,c);t.arc(dt.x,dt.y,xe,fe-Pt,Te)}}else{t.moveTo(a,c);const Qe=Math.cos(Te)*D+a,ut=Math.sin(Te)*D+c;t.lineTo(Qe,ut);const Ye=Math.cos(We)*D+a,Je=Math.sin(We)*D+c;t.lineTo(Ye,Je)}t.closePath()}function kg(t,e,n,o,r){const{fullCircles:i,startAngle:a,circumference:c}=e;let m=e.endAngle;if(i){Ai(t,e,n,o,m,r);for(let C=0;C<i;++C)t.fill();isNaN(c)||(m=a+(c%Tt||Tt))}return Ai(t,e,n,o,m,r),t.fill(),m}function Ig(t,e,n,o,r){const{fullCircles:i,startAngle:a,circumference:c,options:m}=e,{borderWidth:C,borderJoinStyle:L,borderDash:D,borderDashOffset:W,borderRadius:K}=m,X=m.borderAlign==="inner";if(!C)return;t.setLineDash(D||[]),t.lineDashOffset=W,X?(t.lineWidth=C*2,t.lineJoin=L||"round"):(t.lineWidth=C,t.lineJoin=L||"bevel");let ee=e.endAngle;if(i){Ai(t,e,n,o,ee,r);for(let re=0;re<i;++re)t.stroke();isNaN(c)||(ee=a+(c%Tt||Tt))}X&&Mg(t,e,ee),m.selfJoin&&ee-a>=It&&K===0&&L!=="miter"&&Cg(t,e,ee),i||(Ai(t,e,n,o,ee,r),t.stroke())}class Xo extends $n{constructor(n){super();Oe(this,"circumference");Oe(this,"endAngle");Oe(this,"fullCircles");Oe(this,"innerRadius");Oe(this,"outerRadius");Oe(this,"pixelMargin");Oe(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,r){const i=this.getProps(["x","y"],r),{angle:a,distance:c}=Mc(i,{x:n,y:o}),{startAngle:m,endAngle:C,innerRadius:L,outerRadius:D,circumference:W}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),K=(this.options.spacing+this.options.borderWidth)/2,X=st(W,C-m),ee=ar(a,m,C)&&m!==C,re=X>=Tt||ee,fe=Ln(c,L+K,D+K);return re&&fe}getCenterPoint(n){const{x:o,y:r,startAngle:i,endAngle:a,innerRadius:c,outerRadius:m}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:C,spacing:L}=this.options,D=(i+a)/2,W=(c+m+L+C)/2;return{x:o+Math.cos(D)*W,y:r+Math.sin(D)*W}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:r}=this,i=(o.offset||0)/4,a=(o.spacing||0)/2,c=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=r>Tt?Math.floor(r/Tt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const m=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(m)*i,Math.sin(m)*i);const C=1-Math.sin(Math.min(It,r||0)),L=i*C;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,kg(n,this,L,a,c),Ig(n,this,L,a,c),n.restore()}}Oe(Xo,"id","arc"),Oe(Xo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Oe(Xo,"defaultRoutes",{backgroundColor:"backgroundColor"}),Oe(Xo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function td(t,e,n=e){t.lineCap=st(n.borderCapStyle,e.borderCapStyle),t.setLineDash(st(n.borderDash,e.borderDash)),t.lineDashOffset=st(n.borderDashOffset,e.borderDashOffset),t.lineJoin=st(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=st(n.borderWidth,e.borderWidth),t.strokeStyle=st(n.borderColor,e.borderColor)}function Eg(t,e,n){t.lineTo(n.x,n.y)}function wg(t){return t.stepped?Xf:t.tension||t.cubicInterpolationMode==="monotone"?Jf:Eg}function nd(t,e,n={}){const o=t.length,{start:r=0,end:i=o-1}=n,{start:a,end:c}=e,m=Math.max(r,a),C=Math.min(i,c),L=r<a&&i<a||r>c&&i>c;return{count:o,start:m,loop:e.loop,ilen:C<m&&!L?o+C-m:C-m}}function Ag(t,e,n,o){const{points:r,options:i}=e,{count:a,start:c,loop:m,ilen:C}=nd(r,n,o),L=wg(i);let{move:D=!0,reverse:W}=o||{},K,X,ee;for(K=0;K<=C;++K)X=r[(c+(W?C-K:K))%a],!X.skip&&(D?(t.moveTo(X.x,X.y),D=!1):L(t,ee,X,W,i.stepped),ee=X);return m&&(X=r[(c+(W?C:0))%a],L(t,ee,X,W,i.stepped)),!!m}function Tg(t,e,n,o){const r=e.points,{count:i,start:a,ilen:c}=nd(r,n,o),{move:m=!0,reverse:C}=o||{};let L=0,D=0,W,K,X,ee,re,fe;const ye=ke=>(a+(C?c-ke:ke))%i,xe=()=>{ee!==re&&(t.lineTo(L,re),t.lineTo(L,ee),t.lineTo(L,fe))};for(m&&(K=r[ye(0)],t.moveTo(K.x,K.y)),W=0;W<=c;++W){if(K=r[ye(W)],K.skip)continue;const ke=K.x,ve=K.y,Ee=ke|0;Ee===X?(ve<ee?ee=ve:ve>re&&(re=ve),L=(D*L+ke)/++D):(xe(),t.lineTo(ke,ve),X=Ee,D=0,ee=re=ve),fe=ve}xe()}function Sa(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Tg:Ag}function Bg(t){return t.stepped?Th:t.tension||t.cubicInterpolationMode==="monotone"?Bh:io}function Lg(t,e,n,o){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,o)&&r.closePath()),td(t,e.options),t.stroke(r)}function Ng(t,e,n,o){const{segments:r,options:i}=e,a=Sa(e);for(const c of r)td(t,i,c.style),t.beginPath(),a(t,e,c,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Rg=typeof Path2D=="function";function Hg(t,e,n,o){Rg&&!e.options.segment?Lg(t,e,n,o):Ng(t,e,n,o)}class zn extends $n{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const r=o.spanGaps?this._loop:this._fullLoop;Mh(this._points,o,e,r,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Oh(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,r=e[n],i=this.points,a=zc(this,{property:n,start:r,end:r});if(!a.length)return;const c=[],m=Bg(o);let C,L;for(C=0,L=a.length;C<L;++C){const{start:D,end:W}=a[C],K=i[D],X=i[W];if(K===X){c.push(K);continue}const ee=Math.abs((r-K[n])/(X[n]-K[n])),re=m(K,X,ee,o.stepped);re[n]=e[n],c.push(re)}return c.length===1?c[0]:c}pathSegment(e,n,o){return Sa(this)(e,this,n,o)}path(e,n,o){const r=this.segments,i=Sa(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const c of r)a&=i(e,this,c,{start:n,end:n+o-1});return!!a}draw(e,n,o,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),Hg(e,this,o,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Oe(zn,"id","line"),Oe(zn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Oe(zn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Oe(zn,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Ms(t,e,n,o){const r=t.options,{[n]:i}=t.getProps([n],o);return Math.abs(e-i)<r.radius+r.hitRadius}class Ci extends $n{constructor(n){super();Oe(this,"parsed");Oe(this,"skip");Oe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,r){const i=this.options,{x:a,y:c}=this.getProps(["x","y"],r);return Math.pow(n-a,2)+Math.pow(o-c,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(n,o){return Ms(this,n,"x",o)}inYRange(n,o){return Ms(this,n,"y",o)}getCenterPoint(n){const{x:o,y:r}=this.getProps(["x","y"],n);return{x:o,y:r}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const r=o&&n.borderWidth||0;return(o+r)*2}draw(n,o){const r=this.options;this.skip||r.radius<.1||!Nn(this,o,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,ba(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Oe(Ci,"id","point"),Oe(Ci,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Oe(Ci,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function od(t,e){const{x:n,y:o,base:r,width:i,height:a}=t.getProps(["x","y","base","width","height"],e);let c,m,C,L,D;return t.horizontal?(D=a/2,c=Math.min(n,r),m=Math.max(n,r),C=o-D,L=o+D):(D=i/2,c=n-D,m=n+D,C=Math.min(o,r),L=Math.max(o,r)),{left:c,top:C,right:m,bottom:L}}function Un(t,e,n,o){return t?0:Kt(e,n,o)}function Fg(t,e,n){const o=t.options.borderWidth,r=t.borderSkipped,i=Bc(o);return{t:Un(r.top,i.top,0,n),r:Un(r.right,i.right,0,e),b:Un(r.bottom,i.bottom,0,n),l:Un(r.left,i.left,0,e)}}function Og(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,i=co(r),a=Math.min(e,n),c=t.borderSkipped,m=o||yt(r);return{topLeft:Un(!m||c.top||c.left,i.topLeft,0,a),topRight:Un(!m||c.top||c.right,i.topRight,0,a),bottomLeft:Un(!m||c.bottom||c.left,i.bottomLeft,0,a),bottomRight:Un(!m||c.bottom||c.right,i.bottomRight,0,a)}}function Vg(t){const e=od(t),n=e.right-e.left,o=e.bottom-e.top,r=Fg(t,n/2,o/2),i=Og(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:o-r.t-r.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,i.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(r.b,r.r))}}}}function ha(t,e,n,o){const r=e===null,i=n===null,c=t&&!(r&&i)&&od(t,o);return c&&(r||Ln(e,c.left,c.right))&&(i||Ln(n,c.top,c.bottom))}function Pg(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Dg(t,e){t.rect(e.x,e.y,e.w,e.h)}function ma(t,e,n={}){const o=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,i=(t.x+t.w!==n.x+n.w?e:0)-o,a=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+o,y:t.y+r,w:t.w+i,h:t.h+a,radius:t.radius}}class Mi extends $n{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:r}}=this,{inner:i,outer:a}=Vg(this),c=Pg(a.radius)?lr:Dg;e.save(),(a.w!==i.w||a.h!==i.h)&&(e.beginPath(),c(e,ma(a,n,i)),e.clip(),c(e,ma(i,-n,a)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),c(e,ma(i,n)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,n,o){return ha(this,e,n,o)}inXRange(e,n){return ha(this,e,null,n)}inYRange(e,n){return ha(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(n+r)/2:n,y:i?o:(o+r)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Oe(Mi,"id","bar"),Oe(Mi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Oe(Mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zg(t,e,n){const o=t.segments,r=t.points,i=e.points,a=[];for(const c of o){let{start:m,end:C}=c;C=Vi(m,C,r);const L=ka(n,r[m],r[C],c.loop);if(!e.segments){a.push({source:c,target:L,start:r[m],end:r[C]});continue}const D=zc(e,L);for(const W of D){const K=ka(n,i[W.start],i[W.end],W.loop),X=Dc(c,r,K);for(const ee of X)a.push({source:ee,target:W,start:{[n]:xs(L,K,"start",Math.max)},end:{[n]:xs(L,K,"end",Math.min)}})}}return a}function ka(t,e,n,o){if(o)return;let r=e[t],i=n[t];return t==="angle"&&(r=Yt(r),i=Yt(i)),{property:t,start:r,end:i}}function Ug(t,e){const{x:n=null,y:o=null}=t||{},r=e.points,i=[];return e.segments.forEach(({start:a,end:c})=>{c=Vi(a,c,r);const m=r[a],C=r[c];o!==null?(i.push({x:m.x,y:o}),i.push({x:C.x,y:o})):n!==null&&(i.push({x:n,y:m.y}),i.push({x:n,y:C.y}))}),i}function Vi(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function xs(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function rd(t,e){let n=[],o=!1;return Ot(t)?(o=!0,n=t):n=Ug(t,e),n.length?new zn({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Ss(t){return t&&t.fill!==!1}function Gg(t,e,n){let r=t[e].fill;const i=[e];let a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!qt(r))return r;if(a=t[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function jg(t,e,n){const o=Yg(t);if(yt(o))return isNaN(o.value)?!1:o;let r=parseFloat(o);return qt(r)&&Math.floor(r)===r?Wg(o[0],e,r,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Wg(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function qg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:yt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function $g(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:yt(t)?o=t.value:o=e.getBaseValue(),o}function Yg(t){const e=t.options,n=e.fill;let o=st(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function Kg(t){const{scale:e,index:n,line:o}=t,r=[],i=o.segments,a=o.points,c=Xg(e,n);c.push(rd({x:null,y:e.bottom},o));for(let m=0;m<i.length;m++){const C=i[m];for(let L=C.start;L<=C.end;L++)Jg(r,a[L],c)}return new zn({points:r,options:{}})}function Xg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let r=0;r<o.length;r++){const i=o[r];if(i.index===e)break;i.hidden||n.unshift(i.dataset)}return n}function Jg(t,e,n){const o=[];for(let r=0;r<n.length;r++){const i=n[r],{first:a,last:c,point:m}=Zg(i,e,"x");if(!(!m||a&&c)){if(a)o.unshift(m);else if(t.push(m),!c)break}}t.push(...o)}function Zg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const r=o[n],i=t.segments,a=t.points;let c=!1,m=!1;for(let C=0;C<i.length;C++){const L=i[C],D=a[L.start][n],W=a[L.end][n];if(Ln(r,D,W)){c=r===D,m=r===W;break}}return{first:c,last:m,point:o}}class id{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:r,y:i,radius:a}=this;return n=n||{start:0,end:Tt},e.arc(r,i,a,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:r}=this,i=e.angle;return{x:n+Math.cos(i)*r,y:o+Math.sin(i)*r,angle:i}}}function Qg(t){const{chart:e,fill:n,line:o}=t;if(qt(n))return ey(e,n);if(n==="stack")return Kg(t);if(n==="shape")return!0;const r=ty(t);return r instanceof id?r:rd(r,o)}function ey(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function ty(t){return(t.scale||{}).getPointPositionForValue?oy(t):ny(t)}function ny(t){const{scale:e={},fill:n}=t,o=qg(n,e);if(qt(o)){const r=e.isHorizontal();return{x:r?o:null,y:r?null:o}}return null}function oy(t){const{scale:e,fill:n}=t,o=e.options,r=e.getLabels().length,i=o.reverse?e.max:e.min,a=$g(n,e,i),c=[];if(o.grid.circular){const m=e.getPointPositionForValue(0,i);return new id({x:m.x,y:m.y,radius:e.getDistanceFromCenterForValue(a)})}for(let m=0;m<r;++m)c.push(e.getPointPositionForValue(m,a));return c}function ga(t,e,n){const o=Qg(e),{chart:r,index:i,line:a,scale:c,axis:m}=e,C=a.options,L=C.fill,D=C.backgroundColor,{above:W=D,below:K=D}=L||{},X=r.getDatasetMeta(i),ee=Uc(r,X);o&&a.points.length&&(Ri(t,n),ry(t,{line:a,target:o,above:W,below:K,area:n,scale:c,axis:m,clip:ee}),Hi(t))}function ry(t,e){const{line:n,target:o,above:r,below:i,area:a,scale:c,clip:m}=e,C=n._loop?"angle":e.axis;t.save();let L=i;i!==r&&(C==="x"?(ks(t,o,a.top),ya(t,{line:n,target:o,color:r,scale:c,property:C,clip:m}),t.restore(),t.save(),ks(t,o,a.bottom)):C==="y"&&(Is(t,o,a.left),ya(t,{line:n,target:o,color:i,scale:c,property:C,clip:m}),t.restore(),t.save(),Is(t,o,a.right),L=r)),ya(t,{line:n,target:o,color:L,scale:c,property:C,clip:m}),t.restore()}function ks(t,e,n){const{segments:o,points:r}=e;let i=!0,a=!1;t.beginPath();for(const c of o){const{start:m,end:C}=c,L=r[m],D=r[Vi(m,C,r)];i?(t.moveTo(L.x,L.y),i=!1):(t.lineTo(L.x,n),t.lineTo(L.x,L.y)),a=!!e.pathSegment(t,c,{move:a}),a?t.closePath():t.lineTo(D.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Is(t,e,n){const{segments:o,points:r}=e;let i=!0,a=!1;t.beginPath();for(const c of o){const{start:m,end:C}=c,L=r[m],D=r[Vi(m,C,r)];i?(t.moveTo(L.x,L.y),i=!1):(t.lineTo(n,L.y),t.lineTo(L.x,L.y)),a=!!e.pathSegment(t,c,{move:a}),a?t.closePath():t.lineTo(n,D.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function ya(t,e){const{line:n,target:o,property:r,color:i,scale:a,clip:c}=e,m=zg(n,o,r);for(const{source:C,target:L,start:D,end:W}of m){const{style:{backgroundColor:K=i}={}}=C,X=o!==!0;t.save(),t.fillStyle=K,iy(t,a,c,X&&ka(r,D,W)),t.beginPath();const ee=!!n.pathSegment(t,C);let re;if(X){ee?t.closePath():Es(t,o,W,r);const fe=!!o.pathSegment(t,L,{move:ee,reverse:!0});re=ee&&fe,re||Es(t,o,D,r)}t.closePath(),t.fill(re?"evenodd":"nonzero"),t.restore()}}function iy(t,e,n,o){const r=e.chart.chartArea,{property:i,start:a,end:c}=o||{};if(i==="x"||i==="y"){let m,C,L,D;i==="x"?(m=a,C=r.top,L=c,D=r.bottom):(m=r.left,C=a,L=r.right,D=c),t.beginPath(),n&&(m=Math.max(m,n.left),L=Math.min(L,n.right),C=Math.max(C,n.top),D=Math.min(D,n.bottom)),t.rect(m,C,L-m,D-C),t.clip()}}function Es(t,e,n,o){const r=e.interpolate(n,o);r&&t.lineTo(r.x,r.y)}var ay={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,r=[];let i,a,c,m;for(a=0;a<o;++a)i=t.getDatasetMeta(a),c=i.dataset,m=null,c&&c.options&&c instanceof zn&&(m={visible:t.isDatasetVisible(a),index:a,fill:jg(c,a,o),chart:t,axis:i.controller.options.indexAxis,scale:i.vScale,line:c}),i.$filler=m,r.push(m);for(a=0;a<o;++a)m=r[a],!(!m||m.fill===!1)&&(m.fill=Gg(r,a,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",r=t.getSortedVisibleDatasetMetas(),i=t.chartArea;for(let a=r.length-1;a>=0;--a){const c=r[a].$filler;c&&(c.line.updateControlPoints(i,c.axis),o&&c.fill&&ga(t.ctx,c,i))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let r=o.length-1;r>=0;--r){const i=o[r].$filler;Ss(i)&&ga(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Ss(o)||n.drawTime!=="beforeDatasetDraw"||ga(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ws=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},ly=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class As extends $n{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=wt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,r)=>e.sort(o,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,r=$t(o.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:c,itemHeight:m}=ws(o,i);let C,L;n.font=r.string,this.isHorizontal()?(C=this.maxWidth,L=this._fitRows(a,i,c,m)+10):(L=this.maxHeight,C=this._fitCols(a,r,c,m)+10),this.width=Math.min(C,e.maxWidth||this.maxWidth),this.height=Math.min(L,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,r){const{ctx:i,maxWidth:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],C=this.lineWidths=[0],L=r+c;let D=e;i.textAlign="left",i.textBaseline="middle";let W=-1,K=-L;return this.legendItems.forEach((X,ee)=>{const re=o+n/2+i.measureText(X.text).width;(ee===0||C[C.length-1]+re+2*c>a)&&(D+=L,C[C.length-(ee>0?0:1)]=0,K+=L,W++),m[ee]={left:0,top:K,row:W,width:re,height:r},C[C.length-1]+=re+c}),D}_fitCols(e,n,o,r){const{ctx:i,maxHeight:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],C=this.columnSizes=[],L=a-e;let D=c,W=0,K=0,X=0,ee=0;return this.legendItems.forEach((re,fe)=>{const{itemWidth:ye,itemHeight:xe}=sy(o,n,i,re,r);fe>0&&K+xe+2*c>L&&(D+=W+c,C.push({width:W,height:K}),X+=W+c,ee++,W=K=0),m[fe]={left:X,top:K,col:ee,width:ye,height:xe},W=Math.max(W,ye),K+=xe+c}),D+=W,C.push({width:W,height:K}),D}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:r},rtl:i}}=this,a=xo(i,this.left,this.width);if(this.isHorizontal()){let c=0,m=ln(o,this.left+r,this.right-this.lineWidths[c]);for(const C of n)c!==C.row&&(c=C.row,m=ln(o,this.left+r,this.right-this.lineWidths[c])),C.top+=this.top+e+r,C.left=a.leftForLtr(a.x(m),C.width),m+=C.width+r}else{let c=0,m=ln(o,this.top+e+r,this.bottom-this.columnSizes[c].height);for(const C of n)C.col!==c&&(c=C.col,m=ln(o,this.top+e+r,this.bottom-this.columnSizes[c].height)),C.top=m,C.left+=this.left+r,C.left=a.leftForLtr(a.x(C.left),C.width),m+=C.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ri(e,this),this._draw(),Hi(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:r}=this,{align:i,labels:a}=e,c=Vt.color,m=xo(e.rtl,this.left,this.width),C=$t(a.font),{padding:L}=a,D=C.size,W=D/2;let K;this.drawTitle(),r.textAlign=m.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=C.string;const{boxWidth:X,boxHeight:ee,itemHeight:re}=ws(a,D),fe=function(Ee,Me,Ie){if(isNaN(X)||X<=0||isNaN(ee)||ee<0)return;r.save();const Te=st(Ie.lineWidth,1);if(r.fillStyle=st(Ie.fillStyle,c),r.lineCap=st(Ie.lineCap,"butt"),r.lineDashOffset=st(Ie.lineDashOffset,0),r.lineJoin=st(Ie.lineJoin,"miter"),r.lineWidth=Te,r.strokeStyle=st(Ie.strokeStyle,c),r.setLineDash(st(Ie.lineDash,[])),a.usePointStyle){const We={radius:ee*Math.SQRT2/2,pointStyle:Ie.pointStyle,rotation:Ie.rotation,borderWidth:Te},nt=m.xPlus(Ee,X/2),Pe=Me+W;Tc(r,We,nt,Pe,a.pointStyleWidth&&X)}else{const We=Me+Math.max((D-ee)/2,0),nt=m.leftForLtr(Ee,X),Pe=co(Ie.borderRadius);r.beginPath(),Object.values(Pe).some(ot=>ot!==0)?lr(r,{x:nt,y:We,w:X,h:ee,radius:Pe}):r.rect(nt,We,X,ee),r.fill(),Te!==0&&r.stroke()}r.restore()},ye=function(Ee,Me,Ie){Io(r,Ie.text,Ee,Me+re/2,C,{strikethrough:Ie.hidden,textAlign:m.textAlign(Ie.textAlign)})},xe=this.isHorizontal(),ke=this._computeTitleHeight();xe?K={x:ln(i,this.left+L,this.right-o[0]),y:this.top+L+ke,line:0}:K={x:this.left+L,y:ln(i,this.top+ke+L,this.bottom-n[0].height),line:0},Oc(this.ctx,e.textDirection);const ve=re+L;this.legendItems.forEach((Ee,Me)=>{r.strokeStyle=Ee.fontColor,r.fillStyle=Ee.fontColor;const Ie=r.measureText(Ee.text).width,Te=m.textAlign(Ee.textAlign||(Ee.textAlign=a.textAlign)),We=X+W+Ie;let nt=K.x,Pe=K.y;m.setWidth(this.width),xe?Me>0&&nt+We+L>this.right&&(Pe=K.y+=ve,K.line++,nt=K.x=ln(i,this.left+L,this.right-o[K.line])):Me>0&&Pe+ve>this.bottom&&(nt=K.x=nt+n[K.line].width+L,K.line++,Pe=K.y=ln(i,this.top+ke+L,this.bottom-n[K.line].height));const ot=m.x(nt);if(fe(ot,Pe,Ee),nt=Vf(Te,nt+X+W,xe?nt+We:this.right,e.rtl),ye(m.x(nt),Pe,Ee),xe)K.x+=We+L;else if(typeof Ee.text!="string"){const mt=C.lineHeight;K.y+=ad(Ee,mt)+L}else K.y+=ve}),Vc(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=$t(n.font),r=Jt(n.padding);if(!n.display)return;const i=xo(e.rtl,this.left,this.width),a=this.ctx,c=n.position,m=o.size/2,C=r.top+m;let L,D=this.left,W=this.width;if(this.isHorizontal())W=Math.max(...this.lineWidths),L=this.top+C,D=ln(e.align,D,this.right-W);else{const X=this.columnSizes.reduce((ee,re)=>Math.max(ee,re.height),0);L=C+ln(e.align,this.top,this.bottom-X-e.labels.padding-this._computeTitleHeight())}const K=ln(c,D,D+W);a.textAlign=i.textAlign(Ec(c)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,Io(a,n.text,K,L,o)}_computeTitleHeight(){const e=this.options.title,n=$t(e.font),o=Jt(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,r,i;if(Ln(e,this.left,this.right)&&Ln(n,this.top,this.bottom)){for(i=this.legendHitBoxes,o=0;o<i.length;++o)if(r=i[o],Ln(e,r.left,r.left+r.width)&&Ln(n,r.top,r.top+r.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!uy(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const r=this._hoveredItem,i=ly(r,o);r&&!i&&wt(n.onLeave,[e,r,this],this),this._hoveredItem=o,o&&!i&&wt(n.onHover,[e,o,this],this)}else o&&wt(n.onClick,[e,o,this],this)}}function sy(t,e,n,o,r){const i=cy(o,t,e,n),a=dy(r,o,e.lineHeight);return{itemWidth:i,itemHeight:a}}function cy(t,e,n,o){let r=t.text;return r&&typeof r!="string"&&(r=r.reduce((i,a)=>i.length>a.length?i:a)),e+n.size/2+o.measureText(r).width}function dy(t,e,n){let o=t;return typeof e.text!="string"&&(o=ad(e,n)),o}function ad(t,e){const n=t.text?t.text.length:0;return e*n}function uy(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var fy={id:"legend",_element:As,start(t,e,n){const o=t.legend=new As({ctx:t.ctx,options:n,chart:t});Dn.configure(t,o,n),Dn.addBox(t,o)},stop(t){Dn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;Dn.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,r=n.chart;r.isDatasetVisible(o)?(r.hide(o),e.hidden=!0):(r.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:r,color:i,useBorderRadius:a,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(m=>{const C=m.controller.getStyle(n?0:void 0),L=Jt(C.borderWidth);return{text:e[m.index].label,fillStyle:C.backgroundColor,fontColor:i,hidden:!m.visible,lineCap:C.borderCapStyle,lineDash:C.borderDash,lineDashOffset:C.borderDashOffset,lineJoin:C.borderJoinStyle,lineWidth:(L.width+L.height)/4,strokeStyle:C.borderColor,pointStyle:o||C.pointStyle,rotation:C.rotation,textAlign:r||C.textAlign,borderRadius:a&&(c||C.borderRadius),datasetIndex:m.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const Jo={average(t){if(!t.length)return!1;let e,n,o=new Set,r=0,i=0;for(e=0,n=t.length;e<n;++e){const c=t[e].element;if(c&&c.hasValue()){const m=c.tooltipPosition();o.add(m.x),r+=m.y,++i}}return i===0||o.size===0?!1:{x:[...o].reduce((c,m)=>c+m)/o.size,y:r/i}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,r=Number.POSITIVE_INFINITY,i,a,c;for(i=0,a=t.length;i<a;++i){const m=t[i].element;if(m&&m.hasValue()){const C=m.getCenterPoint(),L=_a(e,C);L<r&&(r=L,c=m)}}if(c){const m=c.tooltipPosition();n=m.x,o=m.y}return{x:n,y:o}}};function vn(t,e){return e&&(Ot(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Tn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
76
+ `)>-1?t.split(`
77
+ `):t}function hy(t,e){const{element:n,datasetIndex:o,index:r}=e,i=t.getDatasetMeta(o).controller,{label:a,value:c}=i.getLabelAndValue(r);return{chart:t,label:a,parsed:i.getParsed(r),raw:t.data.datasets[o].data[r],formattedValue:c,dataset:i.getDataset(),dataIndex:r,datasetIndex:o,element:n}}function Ts(t,e){const n=t.chart.ctx,{body:o,footer:r,title:i}=t,{boxWidth:a,boxHeight:c}=e,m=$t(e.bodyFont),C=$t(e.titleFont),L=$t(e.footerFont),D=i.length,W=r.length,K=o.length,X=Jt(e.padding);let ee=X.height,re=0,fe=o.reduce((ke,ve)=>ke+ve.before.length+ve.lines.length+ve.after.length,0);if(fe+=t.beforeBody.length+t.afterBody.length,D&&(ee+=D*C.lineHeight+(D-1)*e.titleSpacing+e.titleMarginBottom),fe){const ke=e.displayColors?Math.max(c,m.lineHeight):m.lineHeight;ee+=K*ke+(fe-K)*m.lineHeight+(fe-1)*e.bodySpacing}W&&(ee+=e.footerMarginTop+W*L.lineHeight+(W-1)*e.footerSpacing);let ye=0;const xe=function(ke){re=Math.max(re,n.measureText(ke).width+ye)};return n.save(),n.font=C.string,kt(t.title,xe),n.font=m.string,kt(t.beforeBody.concat(t.afterBody),xe),ye=e.displayColors?a+2+e.boxPadding:0,kt(o,ke=>{kt(ke.before,xe),kt(ke.lines,xe),kt(ke.after,xe)}),ye=0,n.font=L.string,kt(t.footer,xe),n.restore(),re+=X.width,{width:re,height:ee}}function my(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function gy(t,e,n,o){const{x:r,width:i}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&r+i+a>e.width||t==="right"&&r-i-a<0)return!0}function yy(t,e,n,o){const{x:r,width:i}=n,{width:a,chartArea:{left:c,right:m}}=t;let C="center";return o==="center"?C=r<=(c+m)/2?"left":"right":r<=i/2?C="left":r>=a-i/2&&(C="right"),gy(C,t,e,n)&&(C="center"),C}function Bs(t,e,n){const o=n.yAlign||e.yAlign||my(t,n);return{xAlign:n.xAlign||e.xAlign||yy(t,e,n,o),yAlign:o}}function py(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function _y(t,e,n){let{y:o,height:r}=t;return e==="top"?o+=n:e==="bottom"?o-=r+n:o-=r/2,o}function Ls(t,e,n,o){const{caretSize:r,caretPadding:i,cornerRadius:a}=t,{xAlign:c,yAlign:m}=n,C=r+i,{topLeft:L,topRight:D,bottomLeft:W,bottomRight:K}=co(a);let X=py(e,c);const ee=_y(e,m,C);return m==="center"?c==="left"?X+=C:c==="right"&&(X-=C):c==="left"?X-=Math.max(L,W)+r:c==="right"&&(X+=Math.max(D,K)+r),{x:Kt(X,0,o.width-e.width),y:Kt(ee,0,o.height-e.height)}}function si(t,e,n){const o=Jt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ns(t){return vn([],Tn(t))}function vy(t,e,n){return qn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Rs(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const ld={beforeTitle:wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:wn,beforeBody:wn,beforeLabel:wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return vt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:wn,afterBody:wn,beforeFooter:wn,footer:wn,afterFooter:wn};function Qt(t,e,n,o){const r=t[e].call(n,o);return typeof r>"u"?ld[e].call(n,o):r}class Ia extends $n{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&n.options.animation&&o.animations,i=new Gc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=vy(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,r=Qt(o,"beforeTitle",this,e),i=Qt(o,"title",this,e),a=Qt(o,"afterTitle",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}getBeforeBody(e,n){return Ns(Qt(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,r=[];return kt(e,i=>{const a={before:[],lines:[],after:[]},c=Rs(o,i);vn(a.before,Tn(Qt(c,"beforeLabel",this,i))),vn(a.lines,Qt(c,"label",this,i)),vn(a.after,Tn(Qt(c,"afterLabel",this,i))),r.push(a)}),r}getAfterBody(e,n){return Ns(Qt(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,r=Qt(o,"beforeFooter",this,e),i=Qt(o,"footer",this,e),a=Qt(o,"afterFooter",this,e);let c=[];return c=vn(c,Tn(r)),c=vn(c,Tn(i)),c=vn(c,Tn(a)),c}_createItems(e){const n=this._active,o=this.chart.data,r=[],i=[],a=[];let c=[],m,C;for(m=0,C=n.length;m<C;++m)c.push(hy(this.chart,n[m]));return e.filter&&(c=c.filter((L,D,W)=>e.filter(L,D,W,o))),e.itemSort&&(c=c.sort((L,D)=>e.itemSort(L,D,o))),kt(c,L=>{const D=Rs(e.callbacks,L);r.push(Qt(D,"labelColor",this,L)),i.push(Qt(D,"labelPointStyle",this,L)),a.push(Qt(D,"labelTextColor",this,L))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const o=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{const c=Jo[o.position].call(this,r,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const m=this._size=Ts(this,o),C=Object.assign({},c,m),L=Bs(this.chart,o,C),D=Ls(o,C,L,this.chart);this.xAlign=L.xAlign,this.yAlign=L.yAlign,i={opacity:1,x:D.x,y:D.y,width:m.width,height:m.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,r){const i=this.getCaretPosition(e,o,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,o){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:c}=o,{topLeft:m,topRight:C,bottomLeft:L,bottomRight:D}=co(c),{x:W,y:K}=e,{width:X,height:ee}=n;let re,fe,ye,xe,ke,ve;return i==="center"?(ke=K+ee/2,r==="left"?(re=W,fe=re-a,xe=ke+a,ve=ke-a):(re=W+X,fe=re+a,xe=ke-a,ve=ke+a),ye=re):(r==="left"?fe=W+Math.max(m,L)+a:r==="right"?fe=W+X-Math.max(C,D)-a:fe=this.caretX,i==="top"?(xe=K,ke=xe-a,re=fe-a,ye=fe+a):(xe=K+ee,ke=xe+a,re=fe+a,ye=fe-a),ve=xe),{x1:re,x2:fe,x3:ye,y1:xe,y2:ke,y3:ve}}drawTitle(e,n,o){const r=this.title,i=r.length;let a,c,m;if(i){const C=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.titleAlign,o),n.textAlign=C.textAlign(o.titleAlign),n.textBaseline="middle",a=$t(o.titleFont),c=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,m=0;m<i;++m)n.fillText(r[m],C.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,m+1===i&&(e.y+=o.titleMarginBottom-c)}}_drawColorBox(e,n,o,r,i){const a=this.labelColors[o],c=this.labelPointStyles[o],{boxHeight:m,boxWidth:C}=i,L=$t(i.bodyFont),D=si(this,"left",i),W=r.x(D),K=m<L.lineHeight?(L.lineHeight-m)/2:0,X=n.y+K;if(i.usePointStyle){const ee={radius:Math.min(C,m)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},re=r.leftForLtr(W,C)+C/2,fe=X+m/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,ba(e,ee,re,fe),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,ba(e,ee,re,fe)}else{e.lineWidth=yt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const ee=r.leftForLtr(W,C),re=r.leftForLtr(r.xPlus(W,1),C-2),fe=co(a.borderRadius);Object.values(fe).some(ye=>ye!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,lr(e,{x:ee,y:X,w:C,h:m,radius:fe}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),lr(e,{x:re,y:X+1,w:C-2,h:m-2,radius:fe}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(ee,X,C,m),e.strokeRect(ee,X,C,m),e.fillStyle=a.backgroundColor,e.fillRect(re,X+1,C-2,m-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:c,boxHeight:m,boxWidth:C,boxPadding:L}=o,D=$t(o.bodyFont);let W=D.lineHeight,K=0;const X=xo(o.rtl,this.x,this.width),ee=function(Ie){n.fillText(Ie,X.x(e.x+K),e.y+W/2),e.y+=W+i},re=X.textAlign(a);let fe,ye,xe,ke,ve,Ee,Me;for(n.textAlign=a,n.textBaseline="middle",n.font=D.string,e.x=si(this,re,o),n.fillStyle=o.bodyColor,kt(this.beforeBody,ee),K=c&&re!=="right"?a==="center"?C/2+L:C+2+L:0,ke=0,Ee=r.length;ke<Ee;++ke){for(fe=r[ke],ye=this.labelTextColors[ke],n.fillStyle=ye,kt(fe.before,ee),xe=fe.lines,c&&xe.length&&(this._drawColorBox(n,e,ke,X,o),W=Math.max(D.lineHeight,m)),ve=0,Me=xe.length;ve<Me;++ve)ee(xe[ve]),W=D.lineHeight;kt(fe.after,ee)}K=0,W=D.lineHeight,kt(this.afterBody,ee),e.y-=i}drawFooter(e,n,o){const r=this.footer,i=r.length;let a,c;if(i){const m=xo(o.rtl,this.x,this.width);for(e.x=si(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=m.textAlign(o.footerAlign),n.textBaseline="middle",a=$t(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,c=0;c<i;++c)n.fillText(r[c],m.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,r){const{xAlign:i,yAlign:a}=this,{x:c,y:m}=e,{width:C,height:L}=o,{topLeft:D,topRight:W,bottomLeft:K,bottomRight:X}=co(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(c+D,m),a==="top"&&this.drawCaret(e,n,o,r),n.lineTo(c+C-W,m),n.quadraticCurveTo(c+C,m,c+C,m+W),a==="center"&&i==="right"&&this.drawCaret(e,n,o,r),n.lineTo(c+C,m+L-X),n.quadraticCurveTo(c+C,m+L,c+C-X,m+L),a==="bottom"&&this.drawCaret(e,n,o,r),n.lineTo(c+K,m+L),n.quadraticCurveTo(c,m+L,c,m+L-K),a==="center"&&i==="left"&&this.drawCaret(e,n,o,r),n.lineTo(c,m+D),n.quadraticCurveTo(c,m,c+D,m),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,r=o&&o.x,i=o&&o.y;if(r||i){const a=Jo[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Ts(this,e),m=Object.assign({},a,this._size),C=Bs(n,e,m),L=Ls(e,m,C,n);(r._to!==L.x||i._to!==L.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,L))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Jt(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=o,this.drawBackground(i,e,r,n),Oc(e,n.textDirection),i.y+=a.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),Vc(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,r=e.map(({datasetIndex:c,index:m})=>{const C=this.chart.getDatasetMeta(c);if(!C)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:C.data[m],index:m}}),i=!xi(o,r),a=this._positionChanged(r,n);(i||a)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,n,o),c=this._positionChanged(a,e),m=n||!xi(a,i)||c;return m&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),m}_getActiveElements(e,n,o,r){const i=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:r,options:i}=this,a=Jo[i.position].call(this,e,n);return a!==!1&&(o!==a.x||r!==a.y)}}Oe(Ia,"positioners",Jo);var by={id:"tooltip",_element:Ia,positioners:Jo,afterInit(t,e,n){n&&(t.tooltip=new Ia({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ld},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Cy=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function My(t,e,n,o){const r=t.indexOf(e);if(r===-1)return Cy(t,e,n,o);const i=t.lastIndexOf(e);return r!==i?n:r}const xy=(t,e)=>t===null?null:Kt(Math.round(t),0,e);function Hs(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ea extends Ao{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:r,label:i}of n)o[r]===i&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(vt(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:My(o,e,st(n,e),this._addedLabels),xy(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,r=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)r.push({value:a});return r}getLabelForValue(e){return Hs.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Oe(Ea,"id","category"),Oe(Ea,"defaults",{ticks:{callback:Hs}});function Sy(t,e){const n=[],{bounds:r,step:i,min:a,max:c,precision:m,count:C,maxTicks:L,maxDigits:D,includeBounds:W}=t,K=i||1,X=L-1,{min:ee,max:re}=e,fe=!vt(a),ye=!vt(c),xe=!vt(C),ke=(re-ee)/(D+1);let ve=Nl((re-ee)/X/K)*K,Ee,Me,Ie,Te;if(ve<1e-14&&!fe&&!ye)return[{value:ee},{value:re}];Te=Math.ceil(re/ve)-Math.floor(ee/ve),Te>X&&(ve=Nl(Te*ve/X/K)*K),vt(m)||(Ee=Math.pow(10,m),ve=Math.ceil(ve*Ee)/Ee),r==="ticks"?(Me=Math.floor(ee/ve)*ve,Ie=Math.ceil(re/ve)*ve):(Me=ee,Ie=re),fe&&ye&&i&&Tf((c-a)/i,ve/1e3)?(Te=Math.round(Math.min((c-a)/ve,L)),ve=(c-a)/Te,Me=a,Ie=c):xe?(Me=fe?a:Me,Ie=ye?c:Ie,Te=C-1,ve=(Ie-Me)/Te):(Te=(Ie-Me)/ve,er(Te,Math.round(Te),ve/1e3)?Te=Math.round(Te):Te=Math.ceil(Te));const We=Math.max(Rl(ve),Rl(Me));Ee=Math.pow(10,vt(m)?We:m),Me=Math.round(Me*Ee)/Ee,Ie=Math.round(Ie*Ee)/Ee;let nt=0;for(fe&&(W&&Me!==a?(n.push({value:a}),Me<a&&nt++,er(Math.round((Me+nt*ve)*Ee)/Ee,a,Fs(a,ke,t))&&nt++):Me<a&&nt++);nt<Te;++nt){const Pe=Math.round((Me+nt*ve)*Ee)/Ee;if(ye&&Pe>c)break;n.push({value:Pe})}return ye&&W&&Ie!==c?n.length&&er(n[n.length-1].value,c,Fs(c,ke,t))?n[n.length-1].value=c:n.push({value:c}):(!ye||Ie===c)&&n.push({value:Ie}),n}function Fs(t,e,{horizontal:n,minRotation:o}){const r=Cn(o),i=(n?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/i,a)}class wa extends Ao{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return vt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:r,max:i}=this;const a=m=>r=n?r:m,c=m=>i=o?i:m;if(e){const m=Mn(r),C=Mn(i);m<0&&C<0?c(0):m>0&&C>0&&a(0)}if(r===i){let m=i===0?1:Math.abs(i*.05);c(i+m),e||a(r-m)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,r;return o?(r=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const r={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,a=Sy(r,i);return e.bounds==="ticks"&&Bf(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const r=(o-n)/Math.max(e.length-1,1)/2;n-=r,o+=r}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ua(e,this.chart.options.locale,this.options.ticks.format)}}class Aa extends wa{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Cn(this.options.ticks.minRotation),r=(e?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Oe(Aa,"id","linear"),Oe(Aa,"defaults",{ticks:{callback:Ga.formatters.numeric}});function Ta(t){const e=t.ticks;if(e.display&&t.display){const n=Jt(e.backdropPadding);return st(e.font&&e.font.size,Vt.font.size)+n.height}return 0}function ky(t,e,n){return n=Ot(n)?n:[n],{w:Kf(t,e.string,n),h:n.length*e.lineHeight}}function Os(t,e,n,o,r){return t===o||t===r?{start:e-n/2,end:e+n/2}:t<o||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Iy(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],r=[],i=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?It/i:0;for(let m=0;m<i;m++){const C=a.setContext(t.getPointLabelContext(m));r[m]=C.padding;const L=t.getPointPosition(m,t.drawingArea+r[m],c),D=$t(C.font),W=ky(t.ctx,D,t._pointLabels[m]);o[m]=W;const K=Yt(t.getIndexAngle(m)+c),X=Math.round(Pa(K)),ee=Os(X,L.x,W.w,0,180),re=Os(X,L.y,W.h,90,270);Ey(n,e,K,ee,re)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Ty(t,o,r)}function Ey(t,e,n,o,r){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let c=0,m=0;o.start<e.l?(c=(e.l-o.start)/i,t.l=Math.min(t.l,e.l-c)):o.end>e.r&&(c=(o.end-e.r)/i,t.r=Math.max(t.r,e.r+c)),r.start<e.t?(m=(e.t-r.start)/a,t.t=Math.min(t.t,e.t-m)):r.end>e.b&&(m=(r.end-e.b)/a,t.b=Math.max(t.b,e.b+m))}function wy(t,e,n){const o=t.drawingArea,{extra:r,additionalAngle:i,padding:a,size:c}=n,m=t.getPointPosition(e,o+r+a,i),C=Math.round(Pa(Yt(m.angle+Pt))),L=Ny(m.y,c.h,C),D=By(C),W=Ly(m.x,c.w,D);return{visible:!0,x:m.x,y:L,textAlign:D,left:W,top:L,right:W+c.w,bottom:L+c.h}}function Ay(t,e){if(!e)return!0;const{left:n,top:o,right:r,bottom:i}=t;return!(Nn({x:n,y:o},e)||Nn({x:n,y:i},e)||Nn({x:r,y:o},e)||Nn({x:r,y:i},e))}function Ty(t,e,n){const o=[],r=t._pointLabels.length,i=t.options,{centerPointLabels:a,display:c}=i.pointLabels,m={extra:Ta(i)/2,additionalAngle:a?It/r:0};let C;for(let L=0;L<r;L++){m.padding=n[L],m.size=e[L];const D=wy(t,L,m);o.push(D),c==="auto"&&(D.visible=Ay(D,C),D.visible&&(C=D))}return o}function By(t){return t===0||t===180?"center":t<180?"left":"right"}function Ly(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Ny(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ry(t,e,n){const{left:o,top:r,right:i,bottom:a}=n,{backdropColor:c}=e;if(!vt(c)){const m=co(e.borderRadius),C=Jt(e.backdropPadding);t.fillStyle=c;const L=o-C.left,D=r-C.top,W=i-o+C.width,K=a-r+C.height;Object.values(m).some(X=>X!==0)?(t.beginPath(),lr(t,{x:L,y:D,w:W,h:K,radius:m}),t.fill()):t.fillRect(L,D,W,K)}}function Hy(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let r=e-1;r>=0;r--){const i=t._pointLabelItems[r];if(!i.visible)continue;const a=o.setContext(t.getPointLabelContext(r));Ry(n,a,i);const c=$t(a.font),{x:m,y:C,textAlign:L}=i;Io(n,t._pointLabels[r],m,C+c.lineHeight/2,c,{color:a.color,textAlign:L,textBaseline:"middle"})}}function sd(t,e,n,o){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,Tt);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=t.getPointPosition(a,e),r.lineTo(i.x,i.y)}}function Fy(t,e,n,o,r){const i=t.ctx,a=e.circular,{color:c,lineWidth:m}=e;!a&&!o||!c||!m||n<0||(i.save(),i.strokeStyle=c,i.lineWidth=m,i.setLineDash(r.dash||[]),i.lineDashOffset=r.dashOffset,i.beginPath(),sd(t,n,a,o),i.closePath(),i.stroke(),i.restore())}function Oy(t,e,n){return qn(t,{label:n,index:e,type:"pointLabel"})}class Zo extends wa{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Jt(Ta(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=qt(e)&&!isNaN(e)?e:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ta(this.options))}generateTickLabels(e){wa.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const r=wt(this.options.pointLabels.callback,[n,o],this);return r||r===0?r:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Iy(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,r))}getIndexAngle(e){const n=Tt/(this._pointLabels.length||1),o=this.options.startAngle||0;return Yt(e*n+Cn(o))}getDistanceFromCenterForValue(e){if(vt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(vt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return Oy(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const r=this.getIndexAngle(e)-Pt+o;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:r,bottom:i}=this._pointLabelItems[e];return{left:n,top:o,right:r,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),sd(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:r,border:i}=n,a=this._pointLabels.length;let c,m,C;if(n.pointLabels.display&&Hy(this,a),r.display&&this.ticks.forEach((L,D)=>{if(D!==0||D===0&&this.min<0){m=this.getDistanceFromCenterForValue(L.value);const W=this.getContext(D),K=r.setContext(W),X=i.setContext(W);Fy(this,K,m,a,X)}}),o.display){for(e.save(),c=a-1;c>=0;c--){const L=o.setContext(this.getPointLabelContext(c)),{color:D,lineWidth:W}=L;!W||!D||(e.lineWidth=W,e.strokeStyle=D,e.setLineDash(L.borderDash),e.lineDashOffset=L.borderDashOffset,m=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),C=this.getPointPosition(c,m),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(C.x,C.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const r=this.getIndexAngle(0);let i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,m)=>{if(m===0&&this.min>=0&&!n.reverse)return;const C=o.setContext(this.getContext(m)),L=$t(C.font);if(i=this.getDistanceFromCenterForValue(this.ticks[m].value),C.showLabelBackdrop){e.font=L.string,a=e.measureText(c.label).width,e.fillStyle=C.backdropColor;const D=Jt(C.backdropPadding);e.fillRect(-a/2-D.left,-i-L.size/2-D.top,a+D.width,L.size+D.height)}Io(e,c.label,0,-i,L,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),e.restore()}drawTitle(){}}Oe(Zo,"id","radialLinear"),Oe(Zo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ga.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Oe(Zo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Oe(Zo,"descriptors",{angleLines:{_fallback:"grid"}});const Pi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},tn=Object.keys(Pi);function Vs(t,e){return t-e}function Ps(t,e){if(vt(e))return null;const n=t._adapter,{parser:o,round:r,isoWeekday:i}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),qt(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(r&&(a=r==="week"&&(ko(i)||i===!0)?n.startOf(a,"isoWeek",i):n.startOf(a,r)),+a)}function Ds(t,e,n,o){const r=tn.length;for(let i=tn.indexOf(t);i<r-1;++i){const a=Pi[tn[i]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=o)return tn[i]}return tn[r-1]}function Vy(t,e,n,o,r){for(let i=tn.length-1;i>=tn.indexOf(n);i--){const a=tn[i];if(Pi[a].common&&t._adapter.diff(r,o,a)>=e-1)return a}return tn[n?tn.indexOf(n):0]}function Py(t){for(let e=tn.indexOf(t)+1,n=tn.length;e<n;++e)if(Pi[tn[e]].common)return tn[e]}function zs(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:r}=Da(n,e),i=n[o]>=e?n[o]:n[r];t[i]=!0}}function Dy(t,e,n,o){const r=t._adapter,i=+r.startOf(e[0].value,o),a=e[e.length-1].value;let c,m;for(c=i;c<=a;c=+r.add(c,1,o))m=n[c],m>=0&&(e[m].major=!0);return e}function Us(t,e,n){const o=[],r={},i=e.length;let a,c;for(a=0;a<i;++a)c=e[a],r[c]=a,o.push({value:c,major:!1});return i===0||!n?o:Dy(t,o,r,n)}class Ti extends Ao{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),r=this._adapter=new fm._date(e.adapters.date);r.init(n),Qo(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ps(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:c}=this.getUserBounds();function m(C){!a&&!isNaN(C.min)&&(r=Math.min(r,C.min)),!c&&!isNaN(C.max)&&(i=Math.max(i,C.max))}(!a||!c)&&(m(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&m(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),o),i=qt(i)&&!isNaN(i)?i:+n.endOf(Date.now(),o)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=this.max,c=Hf(r,i,a);return this._unit=n.unit||(o.autoSkip?Ds(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Vy(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Py(this._unit),this.initOffsets(r),e.reverse&&c.reverse(),Us(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?o=i:o=(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Kt(n,0,a),o=Kt(o,0,a),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,r=this.options,i=r.time,a=i.unit||Ds(i.minUnit,n,o,this._getLabelCapacity(n)),c=st(r.ticks.stepSize,1),m=a==="week"?i.isoWeekday:!1,C=ko(m)||m===!0,L={};let D=n,W,K;if(C&&(D=+e.startOf(D,"isoWeek",m)),D=+e.startOf(D,C?"day":a),e.diff(o,n,a)>1e5*c)throw new Error(n+" and "+o+" are too far apart with stepSize of "+c+" "+a);const X=r.ticks.source==="data"&&this.getDataTimestamps();for(W=D,K=0;W<o;W=+e.add(W,c,a),K++)zs(L,W,X);return(W===o||r.bounds==="ticks"||K===1)&&zs(L,W,X),Object.keys(L).sort(Vs).map(ee=>+ee)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,i=this._unit,a=n||r[i];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,r){const i=this.options,a=i.ticks.callback;if(a)return wt(a,[e,n,o],this);const c=i.time.displayFormats,m=this._unit,C=this._majorUnit,L=m&&c[m],D=C&&c[C],W=o[n],K=C&&D&&W&&W.major;return this._adapter.format(e,r||(K?D:L))}generateTickLabels(e){let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,r=Cn(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(r),a=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:o*i+c*a,h:o*a+c*i}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,r=o[n.unit]||o.millisecond,i=this._tickFormatFunction(e,0,Us(this,[e],this._majorUnit),r),a=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,o=r.length;n<o;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const r=this.getLabels();for(n=0,o=r.length;n<o;++n)e.push(Ps(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Sc(e.sort(Vs))}}Oe(Ti,"id","time"),Oe(Ti,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ci(t,e,n){let o=0,r=t.length-1,i,a,c,m;n?(e>=t[o].pos&&e<=t[r].pos&&({lo:o,hi:r}=so(t,"pos",e)),{pos:i,time:c}=t[o],{pos:a,time:m}=t[r]):(e>=t[o].time&&e<=t[r].time&&({lo:o,hi:r}=so(t,"time",e)),{time:i,pos:c}=t[o],{time:a,pos:m}=t[r]);const C=a-i;return C?c+(m-c)*(e-i)/C:c}class Gs extends Ti{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=ci(n,this.min),this._tableRange=ci(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,r=[],i=[];let a,c,m,C,L;for(a=0,c=e.length;a<c;++a)C=e[a],C>=n&&C<=o&&r.push(C);if(r.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,c=r.length;a<c;++a)L=r[a+1],m=r[a-1],C=r[a],Math.round((L+m)/2)!==C&&i.push({time:C,pos:a/(c-1)});return i}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((r,i)=>r-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(ci(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return ci(this._table,o*this._tableRange+this._minPos,!0)}}Oe(Gs,"id","timeseries"),Oe(Gs,"defaults",Ti.defaults);mn.register(mi,yi,pi,Ca,Mo,gi,_i,Xo,zn,Mi,Ci,Ea,Aa,Zo,by,fy,ay);const zy=t=>{const e=t.component.chart;e&&Object.assign(mn.defaults,e)},Uy=t=>{t.event.cssEvent.textbox_onBeforeFocus&&(ce.event.cssEvent.textbox_onBeforeFocus=t.event.cssEvent.textbox_onBeforeFocus),t.event.cssEvent.textbox_onAfterFocus&&(ce.event.cssEvent.textbox_onAfterFocus=t.event.cssEvent.textbox_onAfterFocus),t.event.cssEvent.textbox_onBeforeBlur&&(ce.event.cssEvent.textbox_onBeforeBlur=t.event.cssEvent.textbox_onBeforeBlur),t.event.cssEvent.textbox_onAfterBlur&&(ce.event.cssEvent.textbox_onAfterBlur=t.event.cssEvent.textbox_onAfterBlur),t.event.cssEvent.textbox_onBeforeClick&&(ce.event.cssEvent.textbox_onBeforeClick=t.event.cssEvent.textbox_onBeforeClick),t.event.cssEvent.textbox_onAfterClick&&(ce.event.cssEvent.textbox_onAfterClick=t.event.cssEvent.textbox_onAfterClick),t.event.cssEvent.textbox_onBeforeMouseover&&(ce.event.cssEvent.textbox_onBeforeMouseover=t.event.cssEvent.textbox_onBeforeMouseover),t.event.cssEvent.textbox_onAfterMouseover&&(ce.event.cssEvent.textbox_onAfterMouseover=t.event.cssEvent.textbox_onAfterMouseover),t.event.cssEvent.textbox_onBeforeMouseout&&(ce.event.cssEvent.textbox_onBeforeMouseout=t.event.cssEvent.textbox_onBeforeMouseout),t.event.cssEvent.textbox_onAfterMouseout&&(ce.event.cssEvent.textbox_onAfterMouseout=t.event.cssEvent.textbox_onAfterMouseout),t.event.cssEvent.textbox_onBeforeTouchstart&&(ce.event.cssEvent.textbox_onBeforeTouchstart=t.event.cssEvent.textbox_onBeforeTouchstart),t.event.cssEvent.textbox_onAfterTouchstart&&(ce.event.cssEvent.textbox_onAfterTouchstart=t.event.cssEvent.textbox_onAfterTouchstart),t.event.cssEvent.textbox_onBeforeTouchend&&(ce.event.cssEvent.textbox_onBeforeTouchend=t.event.cssEvent.textbox_onBeforeTouchend),t.event.cssEvent.textbox_onAfterTouchend&&(ce.event.cssEvent.textbox_onAfterTouchend=t.event.cssEvent.textbox_onAfterTouchend),t.event.cssEvent.button_onBeforeFocus&&(ce.event.cssEvent.button_onBeforeFocus=t.event.cssEvent.button_onBeforeFocus),t.event.cssEvent.button_onAfterFocus&&(ce.event.cssEvent.button_onAfterFocus=t.event.cssEvent.button_onAfterFocus),t.event.cssEvent.button_onBeforeBlur&&(ce.event.cssEvent.button_onBeforeBlur=t.event.cssEvent.button_onBeforeBlur),t.event.cssEvent.button_onAfterBlur&&(ce.event.cssEvent.button_onAfterBlur=t.event.cssEvent.button_onAfterBlur),t.event.cssEvent.button_onBeforeClick&&(ce.event.cssEvent.button_onBeforeClick=t.event.cssEvent.button_onBeforeClick),t.event.cssEvent.button_onAfterClick&&(ce.event.cssEvent.button_onAfterClick=t.event.cssEvent.button_onAfterClick),t.event.cssEvent.button_onBeforeMouseover&&(ce.event.cssEvent.button_onBeforeMouseover=t.event.cssEvent.button_onBeforeMouseover),t.event.cssEvent.button_onAfterMouseover&&(ce.event.cssEvent.button_onAfterMouseover=t.event.cssEvent.button_onAfterMouseover),t.event.cssEvent.button_onBeforeMouseout&&(ce.event.cssEvent.button_onBeforeMouseout=t.event.cssEvent.button_onBeforeMouseout),t.event.cssEvent.button_onAfterMouseout&&(ce.event.cssEvent.button_onAfterMouseout=t.event.cssEvent.button_onAfterMouseout),t.event.cssEvent.button_onBeforeTouchstart&&(ce.event.cssEvent.button_onBeforeTouchstart=t.event.cssEvent.button_onBeforeTouchstart),t.event.cssEvent.button_onAfterTouchstart&&(ce.event.cssEvent.button_onAfterTouchstart=t.event.cssEvent.button_onAfterTouchstart),t.event.cssEvent.button_onBeforeTouchend&&(ce.event.cssEvent.button_onBeforeTouchend=t.event.cssEvent.button_onBeforeTouchend),t.event.cssEvent.button_onAfterTouchend&&(ce.event.cssEvent.button_onAfterTouchend=t.event.cssEvent.button_onAfterTouchend),t.event.cssEvent.input_onBeforeFocus&&(ce.event.cssEvent.input_onBeforeFocus=t.event.cssEvent.input_onBeforeFocus),t.event.cssEvent.input_onAfterFocus&&(ce.event.cssEvent.input_onAfterFocus=t.event.cssEvent.input_onAfterFocus),t.event.cssEvent.input_onBeforeBlur&&(ce.event.cssEvent.input_onBeforeBlur=t.event.cssEvent.input_onBeforeBlur),t.event.cssEvent.input_onAfterBlur&&(ce.event.cssEvent.input_onAfterBlur=t.event.cssEvent.input_onAfterBlur),t.event.cssEvent.input_onBeforeMouseover&&(ce.event.cssEvent.input_onBeforeMouseover=t.event.cssEvent.input_onBeforeMouseover),t.event.cssEvent.input_onAfterMouseover&&(ce.event.cssEvent.input_onAfterMouseover=t.event.cssEvent.input_onAfterMouseover),t.event.cssEvent.input_onBeforeMouseout&&(ce.event.cssEvent.input_onBeforeMouseout=t.event.cssEvent.input_onBeforeMouseout),t.event.cssEvent.input_onAfterMouseout&&(ce.event.cssEvent.input_onAfterMouseout=t.event.cssEvent.input_onAfterMouseout),t.event.cssEvent.input_onBeforeTouchstart&&(ce.event.cssEvent.input_onBeforeTouchstart=t.event.cssEvent.input_onBeforeTouchstart),t.event.cssEvent.input_onAfterTouchstart&&(ce.event.cssEvent.input_onAfterTouchstart=t.event.cssEvent.input_onAfterTouchstart),t.event.cssEvent.input_onBeforeTouchend&&(ce.event.cssEvent.input_onBeforeTouchend=t.event.cssEvent.input_onBeforeTouchend),t.event.cssEvent.input_onAfterTouchend&&(ce.event.cssEvent.input_onAfterTouchend=t.event.cssEvent.input_onAfterTouchend),ce.componentStyle={size:t.componentStyle.size,filledColor:t.componentStyle.filledColor,emptyColor:t.componentStyle.emptyColor,filledTextColor:t.componentStyle.filledTextColor,emptyTextColor:t.componentStyle.emptyTextColor,primaryColor:t.componentStyle.primaryColor,mutedColor:t.componentStyle.mutedColor,infoColor:t.componentStyle.infoColor,successColor:t.componentStyle.successColor,dangerColor:t.componentStyle.dangerColor,warningColor:t.componentStyle.warningColor,invertColor:t.componentStyle.invertColor,minHeightS:t.componentStyle.minHeightS,minHeightM:t.componentStyle.minHeightM,minHeightL:t.componentStyle.minHeightL,minHeightXL:t.componentStyle.minHeightXL,fontSizeS:t.componentStyle.fontSizeS,fontSizeM:t.componentStyle.fontSizeM,fontSizeL:t.componentStyle.fontSizeL,fontSizeXL:t.componentStyle.fontSizeXL,primaryInvertColor:null,mutedInvertColor:null,infoInvertColor:null,successInvertColor:null,dangerInvertColor:null,warningInvertColor:null,filledInvertColor:null,emptyInvertColor:null,filledTextInvertColor:null,emptyTextInvertColor:null,componentColor:{primary:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},muted:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},info:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},success:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},danger:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null},warning:{buttonColor:null,borderColor:null,shadowColor:null,hoverColor:null,activeColor:null,emptyTextColor:null,filledTextColor:null}}},ce.componentConfig={filesetSize:t.component.filesetSize??1/0,filesetTotalSize:t.component.filesetTotalSize??1/0};const e=Yu(t),n=qu(t);ce.note=e,ce.grid=n,zy(t),ce.component={accordionList:{},baggieList:{},bannerList:{},buttonList:{},calendarList:{},captionList:{},chartList:{},drawerList:{},dropdownList:{},filesetList:{},gapList:{},imageboxList:{},inputList:{},inputGroupList:{},labelList:{},layoutList:{},listList:{},modalList:{},paginationList:{},paragraphList:{},popupList:{},spinnerList:{},tableList:{}}};function Bt(t,e){return ao.defineComponent({name:`${e}SSRWrapper`,setup(n,{slots:o,attrs:r}){const i=ao.ref(null);return ao.onMounted(async()=>{const a=await t();i.value=ao.markRaw(a.default)}),()=>i.value?ao.h(i.value,{...r},o):null}})}const Ba=ao.ref("pc"),Gy=()=>ao.readonly(Ba),jy=()=>{if(typeof window>"u")return;const t=()=>{const e=tu(window.innerWidth);Ba.value!==e&&(Ba.value=e)};t(),window.addEventListener("resize",()=>{requestAnimationFrame(t)})},Bi="rgba(147,191,207,1)",cd="rgba(158,158,158,1)",dd="rgba(96,150,180,1)",ud="rgba(95,141,78,1)",fd="rgba(247,113,109,1)",hd="rgba(255,193,98,1)",Ja="rgba(48,48,48,1)",Za="rgba(255,255,255,1)",md="rgba(255,255,255,1)",La=()=>{const t=Ra.getVanillanoteConfig(),e=Na.getVanillagridConfig();e.footerFormula={$$COUNT_CHECK:function(r){let i=0;return r.forEach(a=>{a==="Y"&&(i=i+1)}),String(i)}},e.dataType={img:{cellStyle:{justifyContent:"center",textAlign:"center",padding:"0"},onSelected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.setProperty("opacity","0.2")},onUnselected:function(r){r.firstChild.children[0]&&r.firstChild.children[0].style.removeProperty("opacity")},getValue:function(r,i){return i||null},getText:function(r,i){return i?i.alt:null},getChildNode:function(r,i){const a=document.createElement("span");if(!i||!i.value)return a;a.style.display="flex",a.style.alignItems="center",a.style.position="relative",a.style.overflow="hidden",a.style.width="100%";const c=document.createElement("img"),m=document.createElement("span");return c.style.width="100%",c.style.zIndex="1",c.src=i.value.src,c.alt=i.text,m.style.position="absolute",m.style.fontSize="12px",$s(dn(un.component.getGrid(r).getGridInfo().cssInfo.selectCellBackColor))?m.style.color="black":m.style.color="white",m.style.textAlign="left",m.style.display="inline-block",m.style.width="100%",m.style.whiteSpace="normal",m.style.wordBreak="break-all",m.textContent=i.text,c.gridId=r,c.cellRow=i.rowIndex,c.cellCol=i.colIndex,a.append(c),a.append(m),a.addEventListener("click",function(C){un.component.getGrid(r).setTargetCell(C.target.cellRow,C.target.cellCol)}),a.addEventListener("dblclick",function(C){un.component.getGrid(r).editCell(C.target.cellRow,C.target.cellCol)}),a},getEditor:function(r,i,a,c,m){if(!a.value)return null;const C=document.createElement("input");return C.setAttribute("type","text"),C.style.width=r.offsetWidth+"px",C.style.height=r.scrollHeight+C.offsetHeight-C.clientHeight+"px",C.style.position="absolute",C.style.zIndex="200",C.value=a.text,C.addEventListener("keydown",function(L){switch(L.key){case"Enter":c(),L.stopPropagation(),L.preventDefault();break;case"Escape":m(),L.stopPropagation(),L.preventDefault();break;case"Tab":c(),L.stopPropagation(),L.preventDefault();break;case"F2":c(),L.stopPropagation(),L.preventDefault();break}}),C},getEditedValue:function(r,i,a){if(!a.value)return null;const c=a.value;return c.alt=r.value,c},getFilterValue:function(r,i){return i?"title : "+i.alt:null},getSortValue:function(r,i){return i?i.alt:null},getCopyValue:function(r,i){return i?i.alt:null},getPasteValue:function(r,i,a){if(!i.value)return null;const c=i.value;return c.alt=a,c}},radio:{cellStyle:{justifyContent:"center",textAlign:"center"},onSelectedAndKeyDown:function(r,i,a){return(r.key==="Enter"||r.key===" ")&&(un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0),r.stopPropagation(),r.preventDefault()),!1},onClick:function(r,i,a){un.component.getGrid(i).setColSameValue(a.colIndex,"N",!0),un.component.getGrid(i).setCellValue(a.rowIndex,a.colIndex,"Y",!0)},getValue:function(r,i){return i},getText:function(r,i){return i==="Y"?"true":"false"},getChildNode:function(r,i){const a=document.createElement("input");return a.setAttribute("type","radio"),a.setAttribute("name",i.name?i.name:i.colIndex),a.setAttribute("value",""+i.rowIndex),a._gridId=r,a.rowIndex=i.rowIndex,a.colIndex=i.colIndex,a.checked=i.value==="Y",a},getFilterValue:function(r,i){return i==="Y"?"●":"○"}},tree:{cellStyle:{justifyContent:"left",textAlign:"left"},getValue:function(r,i){return i.constructor===Object?i:{title:i,toggle:!1}},getText:function(r,i){return i?i.title:null},getChildNode:function(r,i){if(!i.value)return document.createElement("span");const a=document.createElement("div");a.style.width="100%";const c=document.createElement("span");c.textContent=i.text,c.style.display="inline-block",c.style.marginLeft="10px",c.style.maxWidth="90%",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.addEventListener("click",D=>{L(D,r,i)});const m=document.createElement("span");m.classList.add("far"),i.value.toggle?m.textContent="-":m.textContent="+",m.style.fontSize="0.85em",m.addEventListener("click",D=>{L(D,r,i)});const C=un.component.getGrid(r);i.colIndex+1<=C.getColCount()&&C.getCellDataType(i.rowIndex,i.colIndex+1)!=="tree"&&(i.value.toggle?C.setCellDataType(i.rowIndex,i.colIndex+1,C.getColDataType(i.colIndex+1)):C.setCellDataType(i.rowIndex,i.colIndex+1,"none"));for(let D=i.colIndex;D>3;D--)if(C.getCellDataType(i.rowIndex,D)==="tree"){const W=C.getCellValue(i.rowIndex,D-1);W&&!W.toggle&&(c.textContent="...");break}(i.rowIndex===1||i.rowIndex>1&&C.getCellText(i.rowIndex-1,i.colIndex)!==i.text)&&(a.append(m),a.append(c));function L(D,W,K){const X=un.component.getGrid(W),ee=!K.value.toggle;function re(ye,xe){let ke;const ve=X.getCellText(ye,xe);if(ye===1)ke=ye;else for(let Me=ye;Me>1;Me--)if(X.getCellText(Me,xe)===ve){ke=Me;break}const Ee={title:ve,toggle:!0};for(let Me=ke;Me<=X.getRowCount()&&ve===X.getCellText(Me,xe);Me++)if(X.setCellValue(Me,xe,Ee),Me!==ke)X.getCellDataType(Me,xe+1)==="tree"?(Me===1||X.getCellText(Me,xe+1)!==X.getCellText(Me-1,xe+1))&&X.setRowVisible(Me,!0):X.setRowVisible(Me,!0);else for(let Ie=xe+1;Ie<=X.getColCount();Ie++)if(X.getCellDataType(Me,Ie)==="tree"){X.setCellValue(Me,Ie,X.getCellValue(Me,Ie));break}}function fe(ye,xe){let ke=ye;const ve=X.getCellText(ye,xe);if(ve)for(let Ee=ke;Ee<=X.getRowCount()&&ve===X.getCellText(Ee,xe);Ee++){Ee!==ke&&X.setRowVisible(Ee,!1);for(let Me=xe;Me<=X.getColCount();Me++)if(X.getCellDataType(Ee,Me)==="tree"){const Ie=X.getCellValue(Ee,Me);Ie&&(Ie.toggle=!1,X.setCellValue(Ee,Me,Ie))}}}if(ee)for(let ye=K.colIndex;ye>2;ye--)re(K.rowIndex,ye);else fe(K.rowIndex,K.colIndex)}return a}},none:{getChildNode:function(r,i){return document.createElement("span")}}};const n=mn.defaults;return{dateFormat:en.DateFormat["yyyy-MM-dd"],timeFormat:en.TimeFormat["HH:mm:ss"],datetimeFormat:en.DateTimeFormat["yyyy-MM-dd HH:mm:ss"],yearFormat:en.YearFormat.yyyy,monthFormat:en.MonthFormat.M,yearMonthFormat:en.YearMonthFormat["yyyy-MM"],dayFormat:en.DayFormat.d,dayOfWeekFormat:en.DayOfWeekFormat.d,hourFormat:en.HourFormat.h,hourMinuteFormat:en.HourMinuteFormat["hh:mm"],minuteFormat:en.MinuteFormat.m,secondFormat:en.SecondFormat.s,numberFormat:"#,##0.##",LESSOREQ_0X7FF_BYTE:2,LESSOREQ_0XFFFF_BYTE:3,GREATER_0XFFFF_BYTE:4,shieldURL:"",exposeIpList:["0:0:0:0:0:0:0:1"],isFreeze:!0,isPossibleGoBack:!1,isPossibleOpenDevTool:!1,doDetectDevTool(){},convertValue(r){return r},protocol:"http://",domain:"localhost:8080",controllerPath:"/hison-api-link",timeout:1e4,webSocketProtocol:"ws://",webSocketEndPoint:"/hison-websocket-endpoint",cachingLimit:10,beforeGetRequest(r,i){return!0},beforePostRequest(r,i){return!0},beforePutRequest(r,i){return!0},beforePatchRequest(r,i){return!0},beforeDeleteRequest(r,i){return!0},afterGetRequest(r){return!0},afterPostRequest(r){return!0},afterPutRequest(r){return!0},afterPatchRequest(r){return!0},afterDeleteRequest(r){return!0},beforeGetUrlRequest(r,i){return!0},beforePostUrlRequest(r,i,a){return!0},beforePutUrlRequest(r,i,a){return!0},beforePatchUrlRequest(r,i,a){return!0},beforeDeleteUrlRequest(r,i,a){return!0},afterGetUrlRequest(r){return!0},afterPostUrlRequest(r){return!0},afterPutUrlRequest(r){return!0},afterPatchUrlRequest(r){return!0},afterDeleteUrlRequest(r){return!0},interceptApiResult(r,i){return!0},interceptApiError(r){return!0},component:{note:t,grid:e,chart:n,filesetTotalSize:1/0,filesetSize:1/0},componentStyle:{size:lo.m,filledColor:Bi,emptyColor:md,filledTextColor:Za,emptyTextColor:Ja,primaryColor:Bi,mutedColor:cd,infoColor:dd,successColor:ud,dangerColor:fd,warningColor:hd,invertColor:!1,minHeightS:1.7,minHeightM:1.95,minHeightL:2.25,minHeightXL:2.55,fontSizeS:.7,fontSizeM:.75,fontSizeL:.85,fontSizeXL:1},event:{cssEvent:{textbox_onBeforeFocus:r=>!0,textbox_onAfterFocus:r=>{},textbox_onBeforeBlur:r=>!0,textbox_onAfterBlur:r=>{},textbox_onBeforeClick:r=>!0,textbox_onAfterClick:r=>{},textbox_onBeforeMouseover:r=>!0,textbox_onAfterMouseover:r=>{},textbox_onBeforeMouseout:r=>!0,textbox_onAfterMouseout:r=>{},textbox_onBeforeTouchstart:r=>!0,textbox_onAfterTouchstart:r=>{},textbox_onBeforeTouchend:r=>!0,textbox_onAfterTouchend:r=>{},button_onBeforeFocus:r=>!0,button_onAfterFocus:r=>{},button_onBeforeBlur:r=>!0,button_onAfterBlur:r=>{},button_onBeforeClick:r=>!0,button_onAfterClick:r=>{},button_onBeforeMouseover:r=>!0,button_onAfterMouseover:r=>{},button_onBeforeMouseout:r=>!0,button_onAfterMouseout:r=>{},button_onBeforeTouchstart:r=>!0,button_onAfterTouchstart:r=>{},button_onBeforeTouchend:r=>!0,button_onAfterTouchend:r=>{},input_onBeforeFocus:r=>!0,input_onAfterFocus:r=>{},input_onBeforeBlur:r=>!0,input_onAfterBlur:r=>{},input_onBeforeMouseover:r=>!0,input_onAfterMouseover:r=>{},input_onBeforeMouseout:r=>!0,input_onAfterMouseout:r=>{},input_onBeforeTouchstart:r=>!0,input_onAfterTouchstart:r=>{},input_onBeforeTouchend:r=>!0,input_onAfterTouchend:r=>{}}}}},gd=()=>{const t=ce.componentStyle;t.primaryColor=t.primaryColor?dn(t.primaryColor):Bi,t.mutedColor=t.mutedColor?dn(t.mutedColor):cd,t.infoColor=t.infoColor?dn(t.infoColor):dd,t.successColor=t.successColor?dn(t.successColor):ud,t.dangerColor=t.dangerColor?dn(t.dangerColor):fd,t.warningColor=t.warningColor?dn(t.warningColor):hd,t.filledColor=t.filledColor?dn(t.filledColor):Bi,t.emptyColor=t.emptyColor?dn(t.emptyColor):md,t.filledTextColor=t.filledTextColor?dn(t.filledTextColor):Za,t.emptyTextColor=t.emptyTextColor?dn(t.emptyTextColor):Ja,t.primaryInvertColor=hn(t.primaryColor),t.mutedInvertColor=hn(t.mutedColor),t.infoInvertColor=hn(t.infoColor),t.successInvertColor=hn(t.successColor),t.dangerInvertColor=hn(t.dangerColor),t.warningInvertColor=hn(t.warningColor),t.filledInvertColor=hn(t.filledColor),t.emptyInvertColor=hn(t.emptyColor),t.filledTextInvertColor=hn(t.filledTextColor),t.emptyTextInvertColor=hn(t.emptyTextColor);const e=t.componentColor;vo(e.primary,t.invertColor?t.primaryInvertColor:t.primaryColor),vo(e.muted,t.invertColor?t.mutedInvertColor:t.mutedColor),vo(e.info,t.invertColor?t.infoInvertColor:t.infoColor),vo(e.success,t.invertColor?t.successInvertColor:t.successColor),vo(e.danger,t.invertColor?t.dangerInvertColor:t.dangerColor),vo(e.warning,t.invertColor?t.warningInvertColor:t.warningColor);const n=`
78
+ :root {
79
+ --hison-filledColor: ${t.invertColor?t.filledInvertColor:t.filledColor};
80
+ --hison-emptyColor: ${t.invertColor?t.emptyInvertColor:t.emptyColor};
81
+ --hison-filledTextColor: ${t.invertColor?t.filledTextInvertColor:t.filledTextColor};
82
+ --hison-emptyTextColor: ${t.invertColor?t.emptyTextInvertColor:t.emptyTextColor};
83
+ --hison-primary-buttonColor: ${e.primary.buttonColor};
84
+ --hison-primary-borderColor: ${e.primary.borderColor};
85
+ --hison-primary-shadowColor: ${e.primary.shadowColor};
86
+ --hison-primary-hoverColor: ${e.primary.hoverColor};
87
+ --hison-primary-activeColor: ${e.primary.activeColor};
88
+ --hison-primary-rowHoverColor: ${e.primary.rowHoverColor};
89
+ --hison-primary-stripeColor: ${e.primary.stripeColor};
90
+ --hison-primary-emptyTextColor: ${e.primary.emptyTextColor};
91
+ --hison-primary-filledTextColor: ${e.primary.filledTextColor};
92
+
93
+ --hison-muted-buttonColor: ${e.muted.buttonColor};
94
+ --hison-muted-borderColor: ${e.muted.borderColor};
95
+ --hison-muted-shadowColor: ${e.muted.shadowColor};
96
+ --hison-muted-hoverColor: ${e.muted.hoverColor};
97
+ --hison-muted-activeColor: ${e.muted.activeColor};
98
+ --hison-muted-rowHoverColor: ${e.muted.rowHoverColor};
99
+ --hison-muted-stripeColor: ${e.muted.stripeColor};
100
+ --hison-muted-emptyTextColor: ${e.muted.emptyTextColor};
101
+ --hison-muted-filledTextColor: ${e.muted.filledTextColor};
102
+
103
+ --hison-info-buttonColor: ${e.info.buttonColor};
104
+ --hison-info-borderColor: ${e.info.borderColor};
105
+ --hison-info-shadowColor: ${e.info.shadowColor};
106
+ --hison-info-hoverColor: ${e.info.hoverColor};
107
+ --hison-info-activeColor: ${e.info.activeColor};
108
+ --hison-info-rowHoverColor: ${e.info.rowHoverColor};
109
+ --hison-info-stripeColor: ${e.info.stripeColor};
110
+ --hison-info-emptyTextColor: ${e.info.emptyTextColor};
111
+ --hison-info-filledTextColor: ${e.info.filledTextColor};
112
+
113
+ --hison-success-buttonColor: ${e.success.buttonColor};
114
+ --hison-success-borderColor: ${e.success.borderColor};
115
+ --hison-success-shadowColor: ${e.success.shadowColor};
116
+ --hison-success-hoverColor: ${e.success.hoverColor};
117
+ --hison-success-activeColor: ${e.success.activeColor};
118
+ --hison-success-rowHoverColor: ${e.success.rowHoverColor};
119
+ --hison-success-stripeColor: ${e.success.stripeColor};
120
+ --hison-success-emptyTextColor: ${e.success.emptyTextColor};
121
+ --hison-success-filledTextColor: ${e.success.filledTextColor};
122
+
123
+ --hison-danger-buttonColor: ${e.danger.buttonColor};
124
+ --hison-danger-borderColor: ${e.danger.borderColor};
125
+ --hison-danger-shadowColor: ${e.danger.shadowColor};
126
+ --hison-danger-hoverColor: ${e.danger.hoverColor};
127
+ --hison-danger-activeColor: ${e.danger.activeColor};
128
+ --hison-danger-rowHoverColor: ${e.danger.rowHoverColor};
129
+ --hison-danger-stripeColor: ${e.danger.stripeColor};
130
+ --hison-danger-emptyTextColor: ${e.danger.emptyTextColor};
131
+ --hison-danger-filledTextColor: ${e.danger.filledTextColor};
132
+
133
+ --hison-warning-buttonColor: ${e.warning.buttonColor};
134
+ --hison-warning-borderColor: ${e.warning.borderColor};
135
+ --hison-warning-shadowColor: ${e.warning.shadowColor};
136
+ --hison-warning-hoverColor: ${e.warning.hoverColor};
137
+ --hison-warning-activeColor: ${e.warning.activeColor};
138
+ --hison-warning-rowHoverColor: ${e.warning.rowHoverColor};
139
+ --hison-warning-stripeColor: ${e.warning.stripeColor};
140
+ --hison-warning-emptyTextColor: ${e.warning.emptyTextColor};
141
+ --hison-warning-filledTextColor: ${e.warning.filledTextColor};
142
+
143
+ --hison-font-family: 'Arial, sans-serif';
144
+ --hison-s-min-height: ${t.minHeightS};
145
+ --hison-m-min-height: ${t.minHeightM};
146
+ --hison-l-min-height: ${t.minHeightL};
147
+ --hison-xl-min-height: ${t.minHeightXL};
148
+ --hison-s-font-size: ${t.fontSizeS};
149
+ --hison-m-font-size: ${t.fontSizeM};
150
+ --hison-l-font-size: ${t.fontSizeL};
151
+ --hison-xl-font-size: ${t.fontSizeXL};
152
+ }
153
+ `.trim(),o="hisonvue-css-variables";let r=document.getElementById(o);r&&r.remove(),r=document.createElement("style"),r.id=o,r.textContent=n,document.head.appendChild(r)},Wy=(t,e)=>{qd(t,e),t.setMaxFilesetSize=o=>{ce.componentConfig.filesetSize=o},t.setMaxFilesetTotalSize=o=>{ce.componentConfig.filesetTotalSize=o},t.getMaxFilesetSize=()=>ce.componentConfig.filesetSize,t.getMaxFilesetTotalSize=()=>ce.componentConfig.filesetTotalSize,t.cssEvent={setButtonOnBefoerFocus(o){ce.event.cssEvent.button_onBeforeFocus=o},setButtonOnAfterFocus(o){ce.event.cssEvent.button_onAfterFocus=o},setButtonOnBefoerBlur(o){ce.event.cssEvent.button_onBeforeBlur=o},setButtonOnAfterBlur(o){ce.event.cssEvent.button_onAfterBlur=o},setButtonOnBefoerClick(o){ce.event.cssEvent.button_onBeforeClick=o},setButtonOnAfterClick(o){ce.event.cssEvent.button_onAfterClick=o},setButtonOnBeforeMouseover(o){ce.event.cssEvent.button_onBeforeMouseover=o},setButtonOnAfterMouseover(o){ce.event.cssEvent.button_onAfterMouseover=o},setButtonOnBeforeMouseout(o){ce.event.cssEvent.button_onBeforeMouseout=o},setButtonOnAfterMouseout(o){ce.event.cssEvent.button_onAfterMouseout=o},setButtonOnBeforeTouchstart(o){ce.event.cssEvent.button_onBeforeTouchstart=o},setButtonOnAfterTouchstart(o){ce.event.cssEvent.button_onAfterTouchstart=o},setButtonOnBeforeTouchend(o){ce.event.cssEvent.button_onBeforeTouchend=o},setButtonOnAfterTouchend(o){ce.event.cssEvent.button_onAfterTouchend=o},setInputOnBefoerFocus(o){ce.event.cssEvent.input_onBeforeFocus=o},setInputOnAfterFocus(o){ce.event.cssEvent.input_onAfterFocus=o},setInputOnBefoerBlur(o){ce.event.cssEvent.input_onBeforeBlur=o},setInputOnAfterBlur(o){ce.event.cssEvent.input_onAfterBlur=o},setInputOnBeforeMouseover(o){ce.event.cssEvent.input_onBeforeMouseover=o},setInputOnAfterMouseover(o){ce.event.cssEvent.input_onAfterMouseover=o},setInputOnBeforeMouseout(o){ce.event.cssEvent.input_onBeforeMouseout=o},setInputOnAfterMouseout(o){ce.event.cssEvent.input_onAfterMouseout=o},setInputOnBeforeTouchstart(o){ce.event.cssEvent.input_onBeforeTouchstart=o},setInputOnAfterTouchstart(o){ce.event.cssEvent.input_onAfterTouchstart=o},setInputOnBeforeTouchend(o){ce.event.cssEvent.input_onBeforeTouchend=o},setInputOnAfterTouchend(o){ce.event.cssEvent.input_onAfterTouchend=o}};const n=()=>{typeof window<"u"&&(gd(),gu())};t.style={setSize(o){ce.componentStyle.size=o,n()},setFilledColor(o){ce.componentStyle.filledColor=o,n()},setEmptyColor(o){ce.componentStyle.emptyColor=o,n()},setFilledTextColor(o){ce.componentStyle.filledTextColor=o,n()},setEmptyTextColor(o){ce.componentStyle.emptyTextColor=o,n()},setPrimaryColor(o){ce.componentStyle.primaryColor=o,n()},setMutedColor(o){ce.componentStyle.mutedColor=o,n()},setInfoColor(o){ce.componentStyle.infoColor=o,n()},setSuccessColor(o){ce.componentStyle.successColor=o,n()},setDangerColor(o){ce.componentStyle.dangerColor=o,n()},setWarningColor(o){ce.componentStyle.warningColor=o,n()},setInvertColor(o){ce.componentStyle.invertColor=o,n()},getFilledColor(){return ce.componentStyle.filledColor},getEmptyColor(){return ce.componentStyle.emptyColor},getFilledTextColor(){return ce.componentStyle.filledTextColor},getEmptyTextColor(){return ce.componentStyle.emptyTextColor},getPrimaryColor(){return ce.componentStyle.primaryColor},getPrimaryButtonColor(){return ce.componentStyle.componentColor.primary.buttonColor},getPrimaryBorderColor(){return ce.componentStyle.componentColor.primary.borderColor},getPrimaryShadowColor(){return ce.componentStyle.componentColor.primary.shadowColor},getPrimaryHoverColor(){return ce.componentStyle.componentColor.primary.hoverColor},getPrimaryActiveColor(){return ce.componentStyle.componentColor.primary.activeColor},getPrimaryRowHoverColor(){return ce.componentStyle.componentColor.primary.rowHoverColor},getPrimaryStripeColor(){return ce.componentStyle.componentColor.primary.stripeColor},getMutedColor(){return ce.componentStyle.mutedColor},getMutedButtonColor(){return ce.componentStyle.componentColor.muted.buttonColor},getMutedBorderColor(){return ce.componentStyle.componentColor.muted.borderColor},getMutedShadowColor(){return ce.componentStyle.componentColor.muted.shadowColor},getMutedHoverColor(){return ce.componentStyle.componentColor.muted.hoverColor},getMutedActiveColor(){return ce.componentStyle.componentColor.muted.activeColor},getMutedRowHoverColor(){return ce.componentStyle.componentColor.muted.rowHoverColor},getMutedStripeColor(){return ce.componentStyle.componentColor.muted.stripeColor},getInfoColor(){return ce.componentStyle.infoColor},getInfoButtonColor(){return ce.componentStyle.componentColor.info.buttonColor},getInfoBorderColor(){return ce.componentStyle.componentColor.info.borderColor},getInfoShadowColor(){return ce.componentStyle.componentColor.info.shadowColor},getInfoHoverColor(){return ce.componentStyle.componentColor.info.hoverColor},getInfoActiveColor(){return ce.componentStyle.componentColor.info.activeColor},getInfoRowHoverColor(){return ce.componentStyle.componentColor.info.rowHoverColor},getInfoStripeColor(){return ce.componentStyle.componentColor.info.stripeColor},getSuccessColor(){return ce.componentStyle.successColor},getSuccessButtonColor(){return ce.componentStyle.componentColor.success.buttonColor},getSuccessBorderColor(){return ce.componentStyle.componentColor.success.borderColor},getSuccessShadowColor(){return ce.componentStyle.componentColor.success.shadowColor},getSuccessHoverColor(){return ce.componentStyle.componentColor.success.hoverColor},getSuccessActiveColor(){return ce.componentStyle.componentColor.success.activeColor},getSuccessRowHoverColor(){return ce.componentStyle.componentColor.success.rowHoverColor},getSuccessStripeColor(){return ce.componentStyle.componentColor.success.stripeColor},getDangerColor(){return ce.componentStyle.dangerColor},getDangerButtonColor(){return ce.componentStyle.componentColor.danger.buttonColor},getDangerBorderColor(){return ce.componentStyle.componentColor.danger.borderColor},getDangerShadowColor(){return ce.componentStyle.componentColor.danger.shadowColor},getDangerHoverColor(){return ce.componentStyle.componentColor.danger.hoverColor},getDangerActiveColor(){return ce.componentStyle.componentColor.danger.activeColor},getDangerRowHoverColor(){return ce.componentStyle.componentColor.danger.rowHoverColor},getDangerStripeColor(){return ce.componentStyle.componentColor.danger.stripeColor},getWarningColor(){return ce.componentStyle.warningColor},getWarningButtonColor(){return ce.componentStyle.componentColor.warning.buttonColor},getWarningBorderColor(){return ce.componentStyle.componentColor.warning.borderColor},getWarningShadowColor(){return ce.componentStyle.componentColor.warning.shadowColor},getWarningHoverColor(){return ce.componentStyle.componentColor.warning.hoverColor},getWarningActiveColor(){return ce.componentStyle.componentColor.warning.activeColor},getWarningRowHoverColor(){return ce.componentStyle.componentColor.warning.rowHoverColor},getWarningStripeColor(){return ce.componentStyle.componentColor.warning.stripeColor},isInvertColor(){return ce.componentStyle.invertColor}},t.component={},t.component.getAccordion=o=>ce.component.accordionList[o],t.component.getBaggie=o=>ce.component.baggieList[o],t.component.getBanner=o=>ce.component.bannerList[o],t.component.getButton=o=>ce.component.buttonList[o],t.component.getCalendar=o=>ce.component.calendarList[o],t.component.getCaption=o=>ce.component.captionList[o],t.component.getChart=o=>ce.component.chartList[o],t.component.getDrawer=o=>ce.component.drawerList[o],t.component.getDropdown=o=>ce.component.dropdownList[o],t.component.getGap=o=>ce.component.gapList[o],t.component.getFileset=o=>ce.component.filesetList[o],t.component.getGrid=o=>ce.grid.getGrid(o),t.component.getImagebox=o=>ce.component.imageboxList[o],t.component.getInput=o=>ce.component.inputList[o],t.component.getInputGroup=o=>ce.component.inputGroupList[o],t.component.getLabel=o=>ce.component.labelList[o],t.component.getLayout=o=>ce.component.layoutList[o],t.component.getList=o=>ce.component.listList[o],t.component.getModal=o=>ce.component.modalList[o],t.component.getNote=o=>ce.note.getNote(o),t.component.getPagination=o=>ce.component.paginationList[o],t.component.getParagraph=o=>ce.component.paragraphList[o],t.component.getPopup=o=>ce.component.popupList[o],t.component.getSpinner=o=>ce.component.spinnerList[o],t.component.getTable=o=>ce.component.tableList[o]},yd=Bt(()=>Promise.resolve().then(()=>require("./HAccordion-CPtgQUK0.js")),"HAccordion"),pd=Bt(()=>Promise.resolve().then(()=>require("./HBaggie-D6omQoFh.js")),"HBaggie"),_d=Bt(()=>Promise.resolve().then(()=>require("./HBanner-Io4SdGGs.js")),"HBanner"),vd=Bt(()=>Promise.resolve().then(()=>require("./HButton-DAVuDmOQ.js")),"HButton"),bd=Bt(()=>Promise.resolve().then(()=>require("./HCalendar-DKwGatUk.js")),"HCalendar"),Cd=Bt(()=>Promise.resolve().then(()=>require("./HCaption-6CbSqRA7.js")),"HCaption"),Md=Bt(()=>Promise.resolve().then(()=>require("./HChart-C86JXUyW.js")),"HChart"),xd=Bt(()=>Promise.resolve().then(()=>require("./HDrawer-U5VC_okK.js")),"HDrawer"),Sd=Bt(()=>Promise.resolve().then(()=>require("./HDropdown-D4RAGmjE.js")),"HDropdown"),kd=Bt(()=>Promise.resolve().then(()=>require("./HFileset-CuPR6Hwf.js")),"HFileset"),Id=Bt(()=>Promise.resolve().then(()=>require("./HGap-BPAdnOQz.js")),"HGap"),Ed=Bt(()=>Promise.resolve().then(()=>require("./HGrid-C3EV_pgM.js")),"HGrid"),wd=Bt(()=>Promise.resolve().then(()=>require("./HImagebox-t_UdFjQO.js")),"HImagebox"),Ad=Bt(()=>Promise.resolve().then(()=>require("./HInput-DMGLY473.js")),"HInput"),Td=Bt(()=>Promise.resolve().then(()=>require("./HInputGroup-Dcfr23sZ.js")),"HInputGroup"),Bd=Bt(()=>Promise.resolve().then(()=>require("./HLabel-Dm48mSwn.js")),"HLabel"),Ld=Bt(()=>Promise.resolve().then(()=>require("./HLayout-C1e4BZ_K.js")),"HLayout"),Nd=Bt(()=>Promise.resolve().then(()=>require("./HList-eNXmMf27.js")),"HList"),Rd=Bt(()=>Promise.resolve().then(()=>require("./HModal-GODLq3wH.js")),"HModal"),Hd=Bt(()=>Promise.resolve().then(()=>require("./HNote-D_Xwu9oL.js")),"HNote"),Fd=Bt(()=>Promise.resolve().then(()=>require("./HPagination-Db_L9wv-.js")),"HPagination"),Od=Bt(()=>Promise.resolve().then(()=>require("./HParagraph-BRuSeOMU.js")),"HParagraph"),Vd=Bt(()=>Promise.resolve().then(()=>require("./HPopup-ChkoI3xm.js")),"HPopup"),Pd=Bt(()=>Promise.resolve().then(()=>require("./HSpinner-DDtU9PL_.js")),"HSpinner"),Dd=Bt(()=>Promise.resolve().then(()=>require("./HTable-DGFnzD4u.js")),"HTable"),ce={event:{cssEvent:{}}},un=en.createHison(),qy={install(t,e){const n=La();e?Object.keys(n).forEach(o=>{o in e||(e[o]=n[o])}):e=La(),Uy(e),Wy(un,e),typeof window<"u"&&gd(),jy(),t.provide("hison",un),t.component("HAccordion",yd),t.component("HBaggie",pd),t.component("HBanner",_d),t.component("HButton",vd),t.component("HCalendar",bd),t.component("HCaption",Cd),t.component("HChart",Md),t.component("HDrawer",xd),t.component("HDropdown",Sd),t.component("HFileset",kd),t.component("HGap",Id),t.component("HGrid",Ed),t.component("HImagebox",wd),t.component("HInput",Ad),t.component("HInputGroup",Td),t.component("HLabel",Bd),t.component("HLayout",Ld),t.component("HList",Nd),t.component("HModal",Rd),t.component("HNote",Hd),t.component("HPagination",Fd),t.component("HParagraph",Od),t.component("HPopup",Vd),t.component("HSpinner",Pd),t.component("HTable",Dd)}};exports.BACKGROUND_TYPE_VALUES=Mu;exports.BACK_IMAGE_ALIGN_VALUES=vu;exports.BACK_IMAGE_STYLE_VALUES=Cu;exports.BACK_IMAGE_VERTICAL_ALIGN_VALUES=bu;exports.BackImageAlign=Ks;exports.BackImageRepeat=Js;exports.BackImageVerticalAlign=Xs;exports.BackgroundType=Zs;exports.COLOR_SET_VALUES=Pu;exports.CSS_VAR_RE=uc;exports.Chart=mn;exports.Color=Ys;exports.DATA_STATUS_VALUES=zu;exports.DROPDOWN_TRIGGER_VALUES=Lu;exports.DataStatus=fc;exports.DayOfWeek=hc;exports.DropdownTrigger=sc;exports.EDIT_MODE_VALUES=Bu;exports.EditMode=lc;exports.GRID_ALIGN_VALUES=Ou;exports.GRID_DATE_FORMAT_VALUES=Hu;exports.GRID_MONTH_FORMAT_VALUES=Fu;exports.GRID_VERTICAL_ALIGN_VALUES=Vu;exports.HAccordionClientOnly=yd;exports.HBaggieClientOnly=pd;exports.HBannerClientOnly=_d;exports.HButtonClientOnly=vd;exports.HCalendarClientOnly=bd;exports.HCalendarTimeFormat=gc;exports.HCalendarView=mc;exports.HCaptionClientOnly=Cd;exports.HChartClientOnly=Md;exports.HDrawerClientOnly=xd;exports.HDropdownClientOnly=Sd;exports.HEX_COLOR_RE=dc;exports.HFilesetClientOnly=kd;exports.HGapClientOnly=Id;exports.HGapLine=rc;exports.HGapLineStyle=ic;exports.HGridClientOnly=Ed;exports.HImageboxClientOnly=wd;exports.HInputClientOnly=Ad;exports.HInputGroupClientOnly=Td;exports.HLabelClientOnly=Bd;exports.HLayoutClientOnly=Ld;exports.HListClientOnly=Nd;exports.HModalClientOnly=Rd;exports.HNoteClientOnly=Hd;exports.HPaginationClientOnly=Fd;exports.HParagraphClientOnly=Od;exports.HPopupClientOnly=Vd;exports.HSpinnerClientOnly=Pd;exports.HTableClientOnly=Dd;exports.H_CALENDAR_TIME_FORMAT_VALUES=Gu;exports.H_CALENDAR_VIEW_VALUES=Uu;exports.H_GAP_LINE_STYLE_VALUES=Au;exports.H_GAP_RULE_VALUES=wu;exports.Hisonjs_bundleExports=en;exports.INPUT_TYPE_VALUES=Tu;exports.InputType=ac;exports.MODAL_PLACEMENT_VALUES=xu;exports.ModalPlacement=Qs;exports.NOTE_MODE_BY_DEVICE_VALUES=ju;exports.SCREEN_POSITION_VALUES=Su;exports.SELECTION_POLICY_VALUES=Ru;exports.SPINNER_TYPE_VALUES=ku;exports.ScreenPosition=ec;exports.Size=lo;exports.SpinnerType=tc;exports.TEXT_ALIGN_VALUES=Nu;exports.TOOL_POSITION_VALUES=Wu;exports.TextAlign=cc;exports.VERTICAL_ALIGN_VALUES=Iu;exports.Vanillagrid2_bundleExports=Na;exports.Vanillanote2_bundleExports=Ra;exports.VerticalAlign=nc;exports.WHITE_SPACE_VALUES=Eu;exports.WhiteSpace=oc;exports.addComponentNameToClass=iu;exports.applyOpacityToRgba=fu;exports.extractPrefixedClasses=au;exports.extractResponsiveClasses=ru;exports.getDefaultHisonConfig=La;exports.getDigitsOnly=eu;exports.getHexCodeFromColorText=cu;exports.getIndexSpecificClassNameFromClassList=js;exports.getInvertColor=hn;exports.getMaskValue=Qd;exports.getRGBAFromColorText=du;exports.getSpecificClassValueFromClassList=ou;exports.getUUID=Xd;exports.hison=un;exports.hisonCloser=ce;exports.hisonvue=qy;exports.isCssColorLike=Du;exports.isNullOrUndefined=Kd;exports.normalizeToRgba=dn;exports.registerReloadable=hu;exports.reloadHisonComponent=yu;exports.toClassString=Ws;exports.unregisterReloadable=mu;exports.useDevice=Gy;