@authing/react-ui-components 3.0.2-beta.5 → 3.1.1-rc.1

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 (249) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/LICENSE +21 -0
  3. package/config/env.js +26 -24
  4. package/config/paths.js +3 -3
  5. package/config/webpack.config.js +29 -7
  6. package/lib/index.d.ts +211 -1252
  7. package/lib/index.min.css +1 -2
  8. package/lib/index.min.js +1 -1
  9. package/lib/index.min.js.LICENSE.txt +0 -32
  10. package/package.json +14 -20
  11. package/scripts/build.js +83 -79
  12. package/scripts/start.js +73 -69
  13. package/scripts/test.js +23 -19
  14. package/{components → src/common}/AuthingDropdown/index.tsx +1 -1
  15. package/{components → src/common}/AuthingDropdown/style.less +0 -0
  16. package/{components → src/common}/AuthingTabs/index.tsx +1 -1
  17. package/{components → src/common}/AuthingTabs/style.less +0 -0
  18. package/{components → src/common}/CopyAbleText/index.tsx +1 -1
  19. package/{components → src/common}/CopyAbleText/style.less +0 -0
  20. package/{components → src/common}/VerifyCodeInput/index.tsx +0 -0
  21. package/{components → src/common}/VerifyCodeInput/style.less +0 -0
  22. package/{components → src/components}/AuthingGuard/AppMFALayout/index.tsx +2 -2
  23. package/{components → src/components}/AuthingGuard/AppMFALayout/style.less +0 -0
  24. package/{components → src/components}/AuthingGuard/CompleteUserInfoLayout/index.tsx +1 -1
  25. package/{components → src/components}/AuthingGuard/CompleteUserInfoLayout/style.less +0 -0
  26. package/{components → src/components}/AuthingGuard/Forms/ADLoginForm/index.tsx +2 -2
  27. package/{components → src/components}/AuthingGuard/Forms/Agreements/index.tsx +1 -1
  28. package/{components → src/components}/AuthingGuard/Forms/Agreements/style.less +0 -0
  29. package/{components → src/components}/AuthingGuard/Forms/CompleteUserInfoForm/index.tsx +3 -3
  30. package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/CheckEmailForm.tsx +4 -2
  31. package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/VerifyCodeForm.tsx +2 -2
  32. package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/index.tsx +1 -1
  33. package/{components → src/components}/AuthingGuard/Forms/EmailMfaVerifyForm/style.less +0 -0
  34. package/{components → src/components}/AuthingGuard/Forms/EmailRegisterForm/index.tsx +2 -2
  35. package/{components → src/components}/AuthingGuard/Forms/EmailRegisterForm/style.less +0 -0
  36. package/{components → src/components}/AuthingGuard/Forms/LdapLoginForm/index.tsx +4 -9
  37. package/{components → src/components}/AuthingGuard/Forms/LdapLoginForm/style.less +0 -0
  38. package/{components → src/components}/AuthingGuard/Forms/LoginFormFooter/index.tsx +1 -1
  39. package/{components → src/components}/AuthingGuard/Forms/LoginFormFooter/style.less +0 -0
  40. package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/Step1.tsx +2 -2
  41. package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/Step2.tsx +1 -1
  42. package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/index.tsx +1 -1
  43. package/{components → src/components}/AuthingGuard/Forms/MfaResetCodeForm/style.less +0 -0
  44. package/{components → src/components}/AuthingGuard/Forms/MfaVerifyForm/index.tsx +2 -2
  45. package/{components → src/components}/AuthingGuard/Forms/MfaVerifyForm/style.less +0 -0
  46. package/{components → src/components}/AuthingGuard/Forms/PasswordLoginForm/index.tsx +3 -3
  47. package/{components → src/components}/AuthingGuard/Forms/PhoneCodeLoginForm/index.tsx +2 -2
  48. package/{components → src/components}/AuthingGuard/Forms/PhoneRegisterForm/index.tsx +2 -2
  49. package/{components → src/components}/AuthingGuard/Forms/QrCodeLoginForm/index.tsx +4 -2
  50. package/{components → src/components}/AuthingGuard/Forms/QrCodeLoginForm/style.less +0 -0
  51. package/{components → src/components}/AuthingGuard/Forms/RegisterFormFooter/index.tsx +1 -1
  52. package/{components → src/components}/AuthingGuard/Forms/RegisterFormFooter/style.less +0 -0
  53. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Footer.tsx +1 -1
  54. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step1.tsx +2 -2
  55. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step2.tsx +2 -2
  56. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step3.tsx +2 -2
  57. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/Step4.tsx +1 -1
  58. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/index.tsx +1 -1
  59. package/{components → src/components}/AuthingGuard/Forms/ResetPwdForm/style.less +0 -0
  60. package/{components → src/components}/AuthingGuard/Forms/SendPhoneCode/SendCodeBtn.tsx +0 -0
  61. package/{components → src/components}/AuthingGuard/Forms/SendPhoneCode/index.tsx +2 -2
  62. package/{components → src/components}/AuthingGuard/Forms/SendPhoneCode/style.less +0 -0
  63. package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/CheckPhoneForm.tsx +2 -2
  64. package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/VerifyCodeForm.tsx +2 -2
  65. package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/index.tsx +1 -1
  66. package/{components → src/components}/AuthingGuard/Forms/SmsMfaVerifyForm/style.less +0 -0
  67. package/{components → src/components}/AuthingGuard/Forms/SocialAndIdpLogin/index.tsx +7 -7
  68. package/{components → src/components}/AuthingGuard/Forms/SocialAndIdpLogin/style.less +0 -0
  69. package/{components → src/components}/AuthingGuard/Forms/UploadImage/index.tsx +1 -1
  70. package/{components → src/components}/AuthingGuard/Forms/index.ts +0 -0
  71. package/{components → src/components}/AuthingGuard/GuardLayout/index.tsx +17 -3
  72. package/{components → src/components}/AuthingGuard/GuardLayout/style.less +0 -0
  73. package/{components → src/components}/AuthingGuard/Header/index.tsx +6 -3
  74. package/{components → src/components}/AuthingGuard/Header/style.less +23 -11
  75. package/{components → src/components}/AuthingGuard/IconFont/iconfont.js +0 -0
  76. package/{components → src/components}/AuthingGuard/IconFont/index.tsx +1 -1
  77. package/{components → src/components}/AuthingGuard/IconFont/style.less +0 -0
  78. package/{components → src/components}/AuthingGuard/IconFont/svg.js +0 -0
  79. package/{components → src/components}/AuthingGuard/LoginLayout/index.tsx +69 -25
  80. package/{components → src/components}/AuthingGuard/LoginLayout/style.less +0 -0
  81. package/{components → src/components}/AuthingGuard/MfaLayout/Steps.ts +0 -0
  82. package/{components → src/components}/AuthingGuard/MfaLayout/index.tsx +1 -1
  83. package/{components → src/components}/AuthingGuard/MfaLayout/style.less +0 -0
  84. package/{components → src/components}/AuthingGuard/RegisterLayout/index.tsx +2 -2
  85. package/{components → src/components}/AuthingGuard/RegisterLayout/style.less +0 -0
  86. package/{components → src/components}/AuthingGuard/ResetPwdLayout/index.tsx +1 -1
  87. package/{components → src/components}/AuthingGuard/ToggleLang/index.tsx +2 -2
  88. package/{components → src/components}/AuthingGuard/api/appConfig.ts +22 -14
  89. package/{components/_utils → src/components/AuthingGuard/api}/http.ts +33 -30
  90. package/{components → src/components}/AuthingGuard/api/index.ts +0 -0
  91. package/{components → src/components}/AuthingGuard/api/sso.ts +1 -1
  92. package/{components → src/components}/AuthingGuard/api/userPoolConfig.ts +3 -2
  93. package/{components → src/components}/AuthingGuard/constants.ts +2 -2
  94. package/{components → src/components}/AuthingGuard/hooks/index.tsx +0 -0
  95. package/{components → src/components}/AuthingGuard/hooks/useScreenSize.tsx +0 -0
  96. package/{components → src/components}/AuthingGuard/index.tsx +11 -3
  97. package/{components/_utils → src/components/AuthingGuard}/locales/en/common.json +26 -70
  98. package/{components/_utils → src/components/AuthingGuard}/locales/en/index.ts +0 -0
  99. package/{components/_utils → src/components/AuthingGuard}/locales/en/login.json +19 -21
  100. package/{components/_utils → src/components/AuthingGuard}/locales/en/map.json +0 -0
  101. package/{components/_utils → src/components/AuthingGuard}/locales/en/user.json +3 -4
  102. package/{components/_utils → src/components/AuthingGuard}/locales/index.ts +2 -2
  103. package/{components/_utils → src/components/AuthingGuard}/locales/zh/common.json +9 -53
  104. package/{components/_utils → src/components/AuthingGuard}/locales/zh/index.ts +0 -0
  105. package/{components/_utils → src/components/AuthingGuard}/locales/zh/login.json +4 -6
  106. package/{components/_utils → src/components/AuthingGuard}/locales/zh/map.json +0 -0
  107. package/{components/_utils → src/components/AuthingGuard}/locales/zh/user.json +1 -3
  108. package/{components → src/components}/AuthingGuard/style.less +5 -0
  109. package/{components → src/components}/AuthingGuard/types/Forms.ts +2 -1
  110. package/{components → src/components}/AuthingGuard/types/GuardConfig.ts +5 -1
  111. package/{components → src/components}/AuthingGuard/types/GuardState.ts +1 -1
  112. package/{components → src/components}/AuthingGuard/types/Locales.ts +0 -0
  113. package/{components → src/components}/AuthingGuard/types/index.ts +0 -0
  114. package/src/components/index.ts +7 -0
  115. package/{components → src}/context/base.tsx +0 -0
  116. package/{components → src}/context/global/context.tsx +0 -0
  117. package/{components → src}/context/global/reducer.tsx +2 -2
  118. package/src/index.tsx +142 -0
  119. package/{logo.svg → src/logo.svg} +0 -0
  120. package/{react-app-env.d.ts → src/react-app-env.d.ts} +0 -0
  121. package/{reportWebVitals.ts → src/reportWebVitals.ts} +0 -0
  122. package/{setupTests.ts → src/setupTests.ts} +0 -0
  123. package/{components/_utils → src/utils}/clipboard.ts +1 -1
  124. package/{components/_utils → src/utils}/index.ts +3 -149
  125. package/{components/_utils → src/utils}/popupCenter.ts +0 -0
  126. package/tsconfig.json +2 -8
  127. package/build/asset-manifest.json +0 -26
  128. package/build/favicon.ico +0 -0
  129. package/build/index.html +0 -1
  130. package/build/logo192.png +0 -0
  131. package/build/logo512.png +0 -0
  132. package/build/manifest.json +0 -25
  133. package/build/robots.txt +0 -3
  134. package/build/static/css/2.51c07e65.chunk.css +0 -3
  135. package/build/static/css/2.51c07e65.chunk.css.map +0 -1
  136. package/build/static/css/main.779f221a.chunk.css +0 -2
  137. package/build/static/css/main.779f221a.chunk.css.map +0 -1
  138. package/build/static/js/2.bbae9fdb.chunk.js +0 -3
  139. package/build/static/js/2.bbae9fdb.chunk.js.LICENSE.txt +0 -102
  140. package/build/static/js/2.bbae9fdb.chunk.js.map +0 -1
  141. package/build/static/js/3.fd17f196.chunk.js +0 -2
  142. package/build/static/js/3.fd17f196.chunk.js.map +0 -1
  143. package/build/static/js/main.5f341531.chunk.js +0 -2
  144. package/build/static/js/main.5f341531.chunk.js.map +0 -1
  145. package/build/static/js/runtime-main.ef138021.js +0 -2
  146. package/build/static/js/runtime-main.ef138021.js.map +0 -1
  147. package/build/static/media/loading.4a67a5f3.svg +0 -29
  148. package/components/BindTotp/core/bindSuccess.tsx +0 -72
  149. package/components/BindTotp/core/securityCode.tsx +0 -108
  150. package/components/BindTotp/index.tsx +0 -134
  151. package/components/BindTotp/interface.ts +0 -30
  152. package/components/BindTotp/styles.less +0 -57
  153. package/components/ChangeLanguage/index.tsx +0 -35
  154. package/components/ChangePassword/core/firstLoginReset.tsx +0 -111
  155. package/components/ChangePassword/core/rotateReset.tsx +0 -114
  156. package/components/ChangePassword/index.tsx +0 -72
  157. package/components/CompleteInfo/core/completeInfo.tsx +0 -155
  158. package/components/CompleteInfo/index.tsx +0 -45
  159. package/components/CompleteInfo/interface.ts +0 -40
  160. package/components/CompleteInfo/styles.less +0 -7
  161. package/components/DownloadAuthenticator/index.tsx +0 -97
  162. package/components/DownloadAuthenticator/interface.ts +0 -22
  163. package/components/DownloadAuthenticator/styles.less +0 -52
  164. package/components/Error/index.tsx +0 -21
  165. package/components/Error/interface.ts +0 -9
  166. package/components/Error/styles.less +0 -12
  167. package/components/ForgetPassword/core/resetPassword.tsx +0 -162
  168. package/components/ForgetPassword/index.tsx +0 -78
  169. package/components/ForgetPassword/interface.ts +0 -32
  170. package/components/Guard/Guard.tsx +0 -295
  171. package/components/Guard/authClient.ts +0 -44
  172. package/components/Guard/config.ts +0 -19
  173. package/components/Guard/event.ts +0 -52
  174. package/components/Guard/index.tsx +0 -4
  175. package/components/Guard/module.ts +0 -20
  176. package/components/Guard/stateMachine.ts +0 -152
  177. package/components/Guard/styles.less +0 -461
  178. package/components/IconFont/iconfont.js +0 -74
  179. package/components/IconFont/index.tsx +0 -16
  180. package/components/IconFont/style.less +0 -6
  181. package/components/IconFont/svg.js +0 -2
  182. package/components/ImagePro/index.tsx +0 -53
  183. package/components/ImagePro/styles.less +0 -40
  184. package/components/InputNumber/index.tsx +0 -33
  185. package/components/Login/codemap.ts +0 -49
  186. package/components/Login/core/withAD.tsx +0 -9
  187. package/components/Login/core/withAppQrcode.tsx +0 -49
  188. package/components/Login/core/withLDAP.tsx +0 -146
  189. package/components/Login/core/withPassword/FormItemAccount.tsx +0 -42
  190. package/components/Login/core/withPassword/GraphicVerifyCode.tsx +0 -30
  191. package/components/Login/core/withPassword/InputAccount.tsx +0 -64
  192. package/components/Login/core/withPassword/index.tsx +0 -173
  193. package/components/Login/core/withPhonecode.tsx +0 -122
  194. package/components/Login/core/withWechatMiniQrcode.tsx +0 -60
  195. package/components/Login/core/withWechatmpQrcode.tsx +0 -53
  196. package/components/Login/index.tsx +0 -374
  197. package/components/Login/props.ts +0 -74
  198. package/components/Login/socialLogin/index.tsx +0 -407
  199. package/components/Login/socialLogin/style.less +0 -69
  200. package/components/Login/styles.less +0 -53
  201. package/components/MFA/VerifyCodeInput/VerifyCodeFormItem.tsx +0 -41
  202. package/components/MFA/VerifyCodeInput/index.tsx +0 -145
  203. package/components/MFA/VerifyCodeInput/style.less +0 -35
  204. package/components/MFA/codemap.ts +0 -24
  205. package/components/MFA/core/email.tsx +0 -203
  206. package/components/MFA/core/face.tsx +0 -297
  207. package/components/MFA/core/face_deps.tsx +0 -37
  208. package/components/MFA/core/sms.tsx +0 -203
  209. package/components/MFA/core/totp.tsx +0 -122
  210. package/components/MFA/index.tsx +0 -143
  211. package/components/MFA/mfaMethods/index.tsx +0 -88
  212. package/components/MFA/mfaMethods/style.less +0 -39
  213. package/components/MFA/props.ts +0 -51
  214. package/components/MFA/styles.less +0 -100
  215. package/components/NeedHelpView/core/describeQuestions.tsx +0 -245
  216. package/components/NeedHelpView/index.tsx +0 -47
  217. package/components/RecoveryCode/core/useCode.tsx +0 -71
  218. package/components/RecoveryCode/index.tsx +0 -27
  219. package/components/RecoveryCode/interface.ts +0 -31
  220. package/components/RecoveryCode/style.less +0 -13
  221. package/components/Register/codemap.ts +0 -12
  222. package/components/Register/components/Agreements/index.tsx +0 -81
  223. package/components/Register/components/Agreements/style.less +0 -44
  224. package/components/Register/core/WithEmail.tsx +0 -242
  225. package/components/Register/core/WithPhone.tsx +0 -184
  226. package/components/Register/index.tsx +0 -139
  227. package/components/Register/props.ts +0 -50
  228. package/components/SendCode/SendCodeBtn.tsx +0 -96
  229. package/components/SendCode/index.tsx +0 -94
  230. package/components/SendCode/style.less +0 -31
  231. package/components/ShieldSpin/index.tsx +0 -27
  232. package/components/ShieldSpin/loading.svg +0 -29
  233. package/components/SubmitButton/index.tsx +0 -50
  234. package/components/SubmitSuccess/index.tsx +0 -66
  235. package/components/SubmitSuccess/interface.ts +0 -17
  236. package/components/Type/index.ts +0 -52
  237. package/components/ValidatorRules/ValidatorFormItem.tsx +0 -139
  238. package/components/ValidatorRules/index.ts +0 -20
  239. package/components/_utils/GuardErrorCode.ts +0 -9
  240. package/components/_utils/config.ts +0 -116
  241. package/components/_utils/guradHttp.ts +0 -101
  242. package/components/_utils/hooks/index.ts +0 -64
  243. package/components/assets/images/error.png +0 -0
  244. package/components/context/module/context.tsx +0 -23
  245. package/components/index.ts +0 -12
  246. package/examples.tsx +0 -87
  247. package/index.js +0 -1
  248. package/lib/static/media/loading.4a67a5f3.svg +0 -29
  249. package/scripts/publish.js +0 -57
@@ -1,3 +0,0 @@
1
- /*! For license information please see 2.bbae9fdb.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@authing/react-ui-components"]=this["webpackJsonp@authing/react-ui-components"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(275)},function(e,t,n){"use strict";(function(e,r,o){n.d(t,"a",(function(){return ye})),n.d(t,"b",(function(){return Oe})),n.d(t,"c",(function(){return tu})),n.d(t,"d",(function(){return cc})),n.d(t,"e",(function(){return $s})),n.d(t,"f",(function(){return Gf})),n.d(t,"g",(function(){return cs})),n.d(t,"h",(function(){return En})),n.d(t,"i",(function(){return Vu})),n.d(t,"j",(function(){return qu})),n.d(t,"k",(function(){return iu})),n.d(t,"l",(function(){return ps})),n.d(t,"m",(function(){return Kn})),n.d(t,"n",(function(){return yn})),n.d(t,"o",(function(){return Tl})),n.d(t,"p",(function(){return $f})),n.d(t,"q",(function(){return Qu})),n.d(t,"r",(function(){return kc})),n.d(t,"s",(function(){return uc})),n.d(t,"t",(function(){return vu})),n.d(t,"u",(function(){return bs})),n.d(t,"v",(function(){return Jn})),n.d(t,"w",(function(){return Nc})),n.d(t,"x",(function(){return ar})),n.d(t,"y",(function(){return fn})),n.d(t,"z",(function(){return Xu})),n.d(t,"A",(function(){return Cs})),n.d(t,"B",(function(){return pc})),n.d(t,"C",(function(){return mc})),n.d(t,"D",(function(){return Ar})),n.d(t,"E",(function(){return cr})),n.d(t,"F",(function(){return wu})),n.d(t,"G",(function(){return cn})),n.d(t,"H",(function(){return dn})),n.d(t,"I",(function(){return pn})),n.d(t,"J",(function(){return hn})),n.d(t,"K",(function(){return vn})),n.d(t,"L",(function(){return zt})),n.d(t,"M",(function(){return lr})),n.d(t,"N",(function(){return Dc})),n.d(t,"O",(function(){return dr})),n.d(t,"P",(function(){return gn}));var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var c=function(){function e(e){this.global=e,this.flags={},this.flagRegistry={},this.urlFlags={},this.populateURLFlags()}return e.prototype.setPlatform=function(e,t){null!=this.platform&&console.warn("Platform "+this.platformName+" has already been set. Overwriting the platform with "+t+"."),this.platformName=e,this.platform=t},e.prototype.registerFlag=function(e,t,n){if(this.flagRegistry[e]={evaluationFn:t,setHook:n},null!=this.urlFlags[e]){var r=this.urlFlags[e];console.warn("Setting feature override from URL "+e+": "+r+"."),this.set(e,r)}},e.prototype.get=function(e){return e in this.flags||(this.flags[e]=this.evaluateFlag(e)),this.flags[e]},e.prototype.getNumber=function(e){return this.get(e)},e.prototype.getBool=function(e){return this.get(e)},e.prototype.getFlags=function(){return this.flags},Object.defineProperty(e.prototype,"features",{get:function(){return this.flags},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(null==this.flagRegistry[e])throw new Error("Cannot set flag "+e+" as it has not been registered.");this.flags[e]=t,null!=this.flagRegistry[e].setHook&&this.flagRegistry[e].setHook(t)},e.prototype.evaluateFlag=function(e){if(null==this.flagRegistry[e])throw new Error("Cannot evaluate flag '"+e+"': no evaluation function found.");return this.flagRegistry[e].evaluationFn()},e.prototype.setFlags=function(e){this.flags=Object.assign({},e)},e.prototype.reset=function(){this.flags={},this.urlFlags={},this.populateURLFlags()},e.prototype.populateURLFlags=function(){var e=this;if(void 0!==this.global&&void 0!==this.global.location&&void 0!==this.global.location.search){var t,n,r=(t=this.global.location.search,n={},t.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,(function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return l(n,t[0],t[1]),t.join("=")})),n);"tfjsflags"in r&&r.tfjsflags.split(",").forEach((function(t){var n=t.split(":"),r=n[0],o=n[1];e.urlFlags[r]=function(e,t){if("true"===(t=t.toLowerCase())||"false"===t)return"true"===t;if(""+ +t===t)return+t;throw new Error("Could not parse value flag value "+t+" for flag "+e+".")}(r,o)}))}},e}();function l(e,t,n){e[decodeURIComponent(t)]=decodeURIComponent(n||"")}function f(){return d}var d=null,p=new Map,h=new Map;function v(e,t){var n=b(e,t);return p.get(n)}function m(e){for(var t=p.entries(),n=[];;){var r=t.next(),o=r.done,i=r.value;if(o)break;var a=i[0],s=i[1];a.split("_")[0]===e&&n.push(s)}return n}function g(e){var t=e.kernelName,n=e.backendName,r=b(t,n);if(p.has(r))throw new Error("The kernel '"+t+"' for backend '"+n+"' is already registered");p.set(r,e)}function y(e){var t=e.kernelName;h.has(t)&&console.warn("Overriding the gradient for '"+t+"'"),h.set(t,e)}function b(e,t){return t+"_"+e}function w(e){for(var t=e.length,n=0,r=0;t>0;)r=Math.random()*t|0,n=e[--t],e[t]=e[r],e[r]=n}function x(e,t,n){return Math.max(e,Math.min(t,n))}function E(e){return e%2==0?e:e+1}function C(e){for(var t=0,n=0;n<e.length;n++)t+=e[n];return t}function k(e,t){if(!e)throw new Error("string"==typeof t?t:t())}function O(e,t,n){void 0===n&&(n=""),k(I(e,t),(function(){return n+" Shapes "+e+" and "+t+" must match"}))}function S(e){k(null!=e,(function(){return"The input to the tensor constructor must be a non-null value."}))}function _(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=!1),null==t&&(t=[]),Array.isArray(e)||W(e)&&!n)for(var r=0;r<e.length;++r)_(e[r],t,n);else t.push(e);return t}function T(e){if(0===e.length)return 1;for(var t=e[0],n=1;n<e.length;n++)t*=e[n];return t}function I(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function P(e){return e%1==0}function A(e){if(null!=Math.tanh)return Math.tanh(e);if(e===1/0)return 1;if(e===-1/0)return-1;var t=Math.exp(2*e);return(t-1)/(t+1)}function R(e){var t=Math.ceil(Math.sqrt(e));return[t,Math.ceil(e/t)]}function N(e,t){return t<=e.length?e:e+" ".repeat(t-e.length)}function M(e,t,n){return void 0===t&&(t=function(e){return 0}),new Promise((function(r,o){var i=0;!function a(){if(e())r();else{i++;var s=t(i);null!=n&&i>=n?o():setTimeout(a,s)}}()}))}function j(e,t){for(var n=1,r=-1,o=0;o<e.length;++o)if(e[o]>=0)n*=e[o];else if(-1===e[o]){if(-1!==r)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+o);r=o}else if(e[o]<0)throw Error("Shapes can not be < 0. Found "+e[o]+" at dim "+o);if(-1===r){if(t>0&&t!==n)throw Error("Size("+t+") must match the product of shape "+e);return e}if(0===n)throw Error("Cannot infer the missing size in ["+e+"] when there are 0 elements");if(t%n!=0)throw Error("The implicit shape can't be a fractional number. Got "+t+" / "+n);var i=e.slice();return i[r]=t/n,i}function D(e,t){var n=t.length;return k((e=null==e?t.map((function(e,t){return t})):[].concat(e)).every((function(e){return e>=-n&&e<n})),(function(){return"All values in axis param must be in range [-"+n+", "+n+") but got axis "+e})),k(e.every((function(e){return P(e)})),(function(){return"All values in axis param must be integers but got axis "+e})),e.map((function(e){return e<0?n+e:e}))}function F(e,t){for(var n=[],r=[],o=null!=t&&Array.isArray(t)&&0===t.length,i=null==t||o?null:D(t,e).sort(),a=0,s=0;s<e.length;++s){if(null!=i){if(i[a]===s&&1!==e[s])throw new Error("Can't squeeze axis "+s+" since its dim '"+e[s]+"' is not 1");(null==i[a]||i[a]>s)&&1===e[s]&&(n.push(e[s]),r.push(s)),i[a]<=s&&a++}1!==e[s]&&(n.push(e[s]),r.push(s))}return{newShape:n,keptDims:r}}function L(e,t){var n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else{if("bool"!==e)throw new Error("Unknown data type "+e);n=new Uint8Array(t)}return n}function B(e,t){var n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else if("bool"===e)n=new Uint8Array(t);else{if("string"!==e)throw new Error("Unknown data type "+e);n=new Array(t)}return n}function U(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+t+" being uploaded contains "+r+".")}}function z(e){return"bool"===e||"complex64"===e||"float32"===e||"int32"===e||"string"===e}function V(e,t){return"complex64"!==t&&("float32"!==t||"complex64"===e)&&("int32"!==t||"float32"===e||"complex64"===e)&&("bool"!==t||"bool"!==e)}function W(e){return e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array}function H(e){if("float32"===e||"int32"===e)return 4;if("complex64"===e)return 8;if("bool"===e)return 1;throw new Error("Unknown dtype "+e)}function $(e){if(null==e)return 0;var t=0;return e.forEach((function(e){return t+=e.length})),t}function q(e){return"string"==typeof e||e instanceof String}function K(e){return"boolean"==typeof e}function G(e){return"number"==typeof e}function X(e){return Array.isArray(e)?X(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array?"int32":G(e)?"float32":q(e)?"string":K(e)?"bool":"float32"}function Y(e){return!!(e&&e.constructor&&e.call&&e.apply)}function J(e,t){for(var n=t;n<e;++n)if(e%n==0)return n;return e}function Q(e){var t=e.length;if(t<2)return[];var n=new Array(t-1);n[t-2]=e[t-1];for(var r=t-3;r>=0;--r)n[r]=n[r+1]*e[r+1];return n}function Z(e,t,n){if("string"===t)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=_(e)),n&&U(e,t),function(e,t){return e instanceof Float32Array&&"float32"===t||e instanceof Int32Array&&"int32"===t||e instanceof Uint8Array&&"bool"===t}(e,t))return e;if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t){for(var r=new Uint8Array(e.length),o=0;o<r.length;++o)0!==Math.round(e[o])&&(r[o]=1);return r}throw new Error("Unknown data type "+t)}function ee(e,t){if(0===e.length)return t[0];var n=e.reduce((function(e,t){return e*t}));if(0===n)return[];if(n!==t.length)throw new Error("["+e+"] does not match the input size.");return function e(t,n,r){var o=new Array;if(1===n.length)for(var i=n[0],a=0;a<i;a++)o[a]=r[t+a];else{i=n[0];var s=n.slice(1),u=s.reduce((function(e,t){return e*t}));for(a=0;a<i;a++)o[a]=e(t+a*u,s,r)}return o}(0,e,t)}function te(e,t){for(var n=ne(e,t),r=0;r<n.length;r++)n[r]=1;return n}function ne(e,t){if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t)return new Uint8Array(e);throw new Error("Unknown data type "+t)}function re(){return f().platform.now()}function oe(e){e.forEach((function(t){k(Number.isInteger(t)&&t>=0,(function(){return"Tensor must have a shape comprised of positive integers but got shape ["+e+"]."}))}))}function ie(e,t){return void 0===t&&(t="utf-8"),t=t||"utf-8",f().platform.encode(e,t)}function ae(e,t){return void 0===t&&(t="utf-8"),t=t||"utf-8",f().platform.decode(e,t)}function se(e,t,n){if(0===t)return 0;if(1===t)return e[0];for(var r=e[e.length-1],o=0;o<e.length-1;++o)r+=n[o]*e[o];return r}function ue(e,t,n){if(0===t)return[];if(1===t)return[e];for(var r=new Array(t),o=0;o<r.length-1;++o)r[o]=Math.floor(e/n[o]),e-=r[o]*n[o];return r[r.length-1]=e,r}Object.freeze({shuffle:w,clamp:x,nearestLargerEven:E,sum:C,randUniform:function(e,t){var n=Math.random();return t*n+(1-n)*e},distSquared:function(e,t){for(var n=0,r=0;r<e.length;r++){var o=Number(e[r])-Number(t[r]);n+=o*o}return n},assert:k,assertShapesMatch:O,assertNonNull:S,flatten:_,sizeFromShape:T,isScalarShape:function(e){return 0===e.length},arraysEqual:I,isInt:P,tanh:A,sizeToSquarishShape:R,createShuffledIndices:function(e){for(var t=new Uint32Array(e),n=0;n<e;++n)t[n]=n;return w(t),t},rightPad:N,repeatedTry:M,inferFromImplicitShape:j,parseAxisParam:D,squeezeShape:F,getTypedArrayFromDType:L,getArrayFromDType:B,checkConversionForErrors:U,isValidDtype:z,hasEncodingLoss:V,isTypedArray:W,bytesPerElement:H,bytesFromStringArray:$,isString:q,isBoolean:K,isNumber:G,inferDtype:X,isFunction:Y,nearestDivisor:J,computeStrides:Q,toTypedArray:Z,toNestedArray:ee,makeOnesTypedArray:te,makeZerosTypedArray:ne,now:re,assertNonNegativeIntegerDimensions:oe,fetch:function(e,t){return f().platform.fetch(e,t)},encodeString:ie,decodeString:ae,locToIndex:se,indexToLoc:ue});var ce=function(){function e(e,t){this.backendTimer=e,this.logger=t,null==t&&(this.logger=new le)}return e.prototype.profileKernel=function(e,t,n){var r,o=this,i=this.backendTimer.time((function(){r=n()}));return r.forEach((function(n){n.data().then((function(r){!function(e,t,n){if("float32"!==t)return!1;for(var r=0;r<e.length;r++){var o=e[r];if(isNaN(o)||!isFinite(o))return console.warn("Found "+o+" in the result of '"+n+"'"),!0}}(r,n.dtype,e),i.then((function(i){var a="";null!=i.getExtraProfileInfo&&(a=i.getExtraProfileInfo()),o.logger.logKernelProfile(e,n,r,i.kernelMs,t,a)}))}))})),r},e}(),le=function(){function e(){}return e.prototype.logKernelProfile=function(e,t,n,r,o,i){var a="number"==typeof r?N(r+"ms",9):r.error,s=N(e,25),u=t.rank,c=t.size,l=N(t.shape.toString(),14),f="";for(var d in o){var p=o[d].shape||t.shape,h=p.length;f+=d+": "+h+"D "+(h>0?p:"")+" "}console.log("%c"+s+"\t%c"+a+"\t%c"+u+"D "+l+"\t%c"+c+"\t%c"+f+"\t%c"+i,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},e}();function fe(e,t,n){return N(Array.isArray(e)?parseFloat(e[0].toFixed(7))+" + "+parseFloat(e[1].toFixed(7))+"j":q(e)?"'"+e+"'":"bool"===n?de(e):parseFloat(e.toFixed(7)).toString(),t)}function de(e){return 0===e?"false":"true"}function pe(e){for(var t=[],n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}var he=function(){function e(e,t,n){var r=this;if(this.dtype=t,this.shape=e.slice(),this.size=T(e),null!=n){var o=n.length;k(o===this.size,(function(){return"Length of values '"+o+"' does not match the size inferred by the shape '"+r.size+"'."}))}if("complex64"===t)throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||B(t,this.size),this.strides=Q(e)}return e.prototype.set=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];0===n.length&&(n=[0]),k(n.length===this.rank,(function(){return"The number of provided coordinates ("+n.length+") must match the rank ("+t.rank+")"}));var o=this.locToIndex(n);this.values[o]=e},e.prototype.get=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];0===e.length&&(e=[0]);for(var n=0,r=0,o=e;r<o.length;r++){var i=o[r];if(i<0||i>=this.shape[n]){var a="Requested out of range element at "+e+". Buffer shape="+this.shape;throw new Error(a)}n++}for(var s=e[e.length-1],u=0;u<e.length-1;++u)s+=this.strides[u]*e[u];return this.values[s]},e.prototype.locToIndex=function(e){if(0===this.rank)return 0;if(1===this.rank)return e[0];for(var t=e[e.length-1],n=0;n<e.length-1;++n)t+=this.strides[n]*e[n];return t},e.prototype.indexToLoc=function(e){if(0===this.rank)return[];if(1===this.rank)return[e];for(var t=new Array(this.shape.length),n=0;n<t.length-1;++n)t[n]=Math.floor(e/this.strides[n]),e-=t[n]*this.strides[n];return t[t.length-1]=e,t},Object.defineProperty(e.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),e.prototype.toTensor=function(){return ve().makeTensor(this.values,this.shape,this.dtype)},e}(),ve=null,me=null,ge=null,ye=function(){function e(e,t,n,r){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=T(e),this.strides=Q(e),this.dataId=n,this.id=r,this.rankType=this.rank<5?this.rank.toString():"higher"}return e.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},e.prototype.asScalar=function(){return this.throwIfDisposed(),k(1===this.size,(function(){return"The array must have only 1 element."})),this.reshape([])},e.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},e.prototype.as2D=function(e,t){return this.throwIfDisposed(),this.reshape([e,t])},e.prototype.as3D=function(e,t,n){return this.throwIfDisposed(),this.reshape([e,t,n])},e.prototype.as4D=function(e,t,n,r){return this.throwIfDisposed(),this.reshape([e,t,n,r])},e.prototype.as5D=function(e,t,n,r,o){return this.throwIfDisposed(),this.reshape([e,t,n,r,o])},e.prototype.asType=function(e){return this.throwIfDisposed(),me.cast(this,e)},Object.defineProperty(e.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),e.prototype.buffer=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return[4,this.data()];case 1:return e=t.sent(),[2,me.buffer(this.shape,this.dtype,e)]}}))}))},e.prototype.bufferSync=function(){return me.buffer(this.shape,this.dtype,this.dataSync())},e.prototype.array=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return[4,this.data()];case 1:return e=t.sent(),[2,ee(this.shape,e)]}}))}))},e.prototype.arraySync=function(){return ee(this.shape,this.dataSync())},e.prototype.data=function(){return s(this,void 0,void 0,(function(){var e,t;return u(this,(function(n){switch(n.label){case 0:return this.throwIfDisposed(),e=ve().read(this.dataId),"string"!==this.dtype?[3,2]:[4,e];case 1:t=n.sent();try{return[2,t.map((function(e){return ae(e)}))]}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}n.label=2;case 2:return[2,e]}}))}))},e.prototype.dataSync=function(){this.throwIfDisposed();var e=ve().readSync(this.dataId);if("string"===this.dtype)try{return e.map((function(e){return ae(e)}))}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e},e.prototype.bytes=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return this.throwIfDisposed(),[4,ve().read(this.dataId)];case 1:return e=t.sent(),"string"===this.dtype?[2,e]:[2,new Uint8Array(e.buffer)]}}))}))},e.prototype.dispose=function(){this.isDisposed||(ve().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),e.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},e.prototype.toFloat=function(){return this.asType("float32")},e.prototype.toInt=function(){return this.asType("int32")},e.prototype.toBool=function(){return this.asType("bool")},e.prototype.print=function(e){return void 0===e&&(e=!1),me.print(this,e)},e.prototype.reshape=function(e){return this.throwIfDisposed(),me.reshape(this,e)},e.prototype.reshapeAs=function(e){return this.throwIfDisposed(),this.reshape(e.shape)},e.prototype.expandDims=function(e){return void 0===e&&(e=0),me.expandDims(this,e)},e.prototype.cumsum=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=!1),void 0===n&&(n=!1),me.cumsum(this,e,t,n)},e.prototype.squeeze=function(e){return this.throwIfDisposed(),me.squeeze(this,e)},e.prototype.clone=function(){return this.throwIfDisposed(),me.clone(this)},e.prototype.oneHot=function(e,t,n){return this.throwIfDisposed(),me.oneHot(this,e,t,n)},e.prototype.toString=function(e){return void 0===e&&(e=!1),function(e,t,n,r){var o=Q(t),i=function(e,t,n,r){var o=T(t),i=r[r.length-1],a=new Array(i).fill(0),s=t.length,u="complex64"===n?pe(e):e;if(s>1)for(var c=0;c<o/i;c++)for(var l=c*i,f=0;f<i;f++)a[f]=Math.max(a[f],fe(u[l+f],0,n).length);return a}(e,t,n,o),a=t.length,s=function e(t,n,r,o,i,a){void 0===a&&(a=!0);var s="complex64"===r?2:1,u=n[0],c=n.length;if(0===c)return"complex64"===r?[fe(pe(t)[0],0,r)]:"bool"===r?[de(t[0])]:[t[0].toString()];if(1===c){if(u>20){var l=3*s,f=Array.from(t.slice(0,l)),d=Array.from(t.slice((u-3)*s,u*s));return"complex64"===r&&(f=pe(f),d=pe(d)),["["+f.map((function(e,t){return fe(e,i[t],r)})).join(", ")+", ..., "+d.map((function(e,t){return fe(e,i[u-3+t],r)})).join(", ")+"]"]}return["["+("complex64"===r?pe(t):Array.from(t)).map((function(e,t){return fe(e,i[t],r)})).join(", ")+"]"]}var p=n.slice(1),h=o.slice(1),v=o[0]*s,m=[];if(u>20){for(var g=0;g<3;g++){var y=(b=g*v)+v;m.push.apply(m,e(t.slice(b,y),p,r,h,i,!1))}for(m.push("..."),g=u-3;g<u;g++)y=(b=g*v)+v,m.push.apply(m,e(t.slice(b,y),p,r,h,i,g===u-1))}else for(g=0;g<u;g++){var b;y=(b=g*v)+v,m.push.apply(m,e(t.slice(b,y),p,r,h,i,g===u-1))}var w=2===c?",":"";for(m[0]="["+m[0]+w,g=1;g<m.length-1;g++)m[g]=" "+m[g]+w;var x=",\n";for(g=2;g<c;g++)x+="\n";return m[m.length-1]=" "+m[m.length-1]+"]"+(a?"":x),m}(e,t,n,o,i),u=["Tensor"];return r&&(u.push(" dtype: "+n),u.push(" rank: "+a),u.push(" shape: ["+t+"]"),u.push(" values:")),u.push(s.map((function(e){return" "+e})).join("\n")),u.join("\n")}(this.dataSync(),this.shape,this.dtype,e)},e.prototype.tile=function(e){return this.throwIfDisposed(),me.tile(this,e)},e.prototype.gather=function(e,t){return void 0===t&&(t=0),this.throwIfDisposed(),me.gather(this,e,t)},e.prototype.matMul=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!1),this.throwIfDisposed(),me.matMul(this,e,t,n)},e.prototype.dot=function(e){return this.throwIfDisposed(),me.dot(this,e)},e.prototype.norm=function(e,t,n){return void 0===e&&(e="euclidean"),void 0===t&&(t=null),void 0===n&&(n=!1),this.throwIfDisposed(),me.norm(this,e,t,n)},e.prototype.slice=function(e,t){return this.throwIfDisposed(),me.slice(this,e,t)},e.prototype.reverse=function(e){return this.throwIfDisposed(),me.reverse(this,e)},e.prototype.concat=function(t,n){return void 0===n&&(n=0),this.throwIfDisposed(),t instanceof e&&(t=[t]),me.concat([this].concat(t),n)},e.prototype.split=function(e,t){return void 0===t&&(t=0),this.throwIfDisposed(),me.split(this,e,t)},e.prototype.stack=function(e,t){return void 0===t&&(t=0),me.stack([this,e],t)},e.prototype.unstack=function(e){return void 0===e&&(e=0),me.unstack(this,e)},e.prototype.pad=function(e,t){return void 0===t&&(t=0),me.pad(this,e,t)},e.prototype.batchNormalization=function(e,t,n,r,o){return void 0===n&&(n=.001),ge("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(e,t,o,r,n)},e.prototype.batchNorm=function(e,t,n,r,o){return void 0===o&&(o=.001),this.throwIfDisposed(),me.batchNorm(this,e,t,n,r,o)},e.prototype.all=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.all(this,e,t)},e.prototype.any=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.any(this,e,t)},e.prototype.logSumExp=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.logSumExp(this,e,t)},e.prototype.sum=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.sum(this,e,t)},e.prototype.prod=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.prod(this,e,t)},e.prototype.mean=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.mean(this,e,t)},e.prototype.min=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.min(this,e,t)},e.prototype.max=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.throwIfDisposed(),me.max(this,e,t)},e.prototype.argMin=function(e){return void 0===e&&(e=null),this.throwIfDisposed(),me.argMin(this,e)},e.prototype.argMax=function(e){return void 0===e&&(e=null),this.throwIfDisposed(),me.argMax(this,e)},e.prototype.cast=function(e){return this.throwIfDisposed(),me.cast(this,e)},e.prototype.add=function(e){return this.throwIfDisposed(),me.add(this,e)},e.prototype.addStrict=function(e){return this.throwIfDisposed(),me.addStrict(this,e)},e.prototype.atan2=function(e){return this.throwIfDisposed(),me.atan2(this,e)},e.prototype.sub=function(e){return this.throwIfDisposed(),me.sub(this,e)},e.prototype.subStrict=function(e){return this.throwIfDisposed(),me.subStrict(this,e)},e.prototype.pow=function(e){return this.throwIfDisposed(),me.pow(this,e)},e.prototype.powStrict=function(e){return this.throwIfDisposed(),me.powStrict(this,e)},e.prototype.mul=function(e){return this.throwIfDisposed(),me.mul(this,e)},e.prototype.mulStrict=function(e){return this.throwIfDisposed(),me.mulStrict(this,e)},e.prototype.div=function(e){return this.throwIfDisposed(),me.div(this,e)},e.prototype.divNoNan=function(e){return this.throwIfDisposed(),me.divNoNan(this,e)},e.prototype.floorDiv=function(e){return this.throwIfDisposed(),me.floorDiv(this,e)},e.prototype.divStrict=function(e){return this.throwIfDisposed(),me.divStrict(this,e)},e.prototype.minimum=function(e){return this.throwIfDisposed(),me.minimum(this,e)},e.prototype.minimumStrict=function(e){return this.throwIfDisposed(),me.minimumStrict(this,e)},e.prototype.maximum=function(e){return this.throwIfDisposed(),me.maximum(this,e)},e.prototype.maximumStrict=function(e){return this.throwIfDisposed(),me.maximumStrict(this,e)},e.prototype.mod=function(e){return this.throwIfDisposed(),me.mod(this,e)},e.prototype.modStrict=function(e){return this.throwIfDisposed(),me.modStrict(this,e)},e.prototype.squaredDifferenceStrict=function(e){return this.throwIfDisposed(),me.squaredDifferenceStrict(this,e)},e.prototype.transpose=function(e){return this.throwIfDisposed(),me.transpose(this,e)},e.prototype.notEqual=function(e){return this.throwIfDisposed(),me.notEqual(this,e)},e.prototype.notEqualStrict=function(e){return this.throwIfDisposed(),me.notEqualStrict(this,e)},e.prototype.less=function(e){return this.throwIfDisposed(),me.less(this,e)},e.prototype.lessStrict=function(e){return this.throwIfDisposed(),me.lessStrict(this,e)},e.prototype.equal=function(e){return this.throwIfDisposed(),me.equal(this,e)},e.prototype.equalStrict=function(e){return this.throwIfDisposed(),me.equalStrict(this,e)},e.prototype.lessEqual=function(e){return this.throwIfDisposed(),me.lessEqual(this,e)},e.prototype.lessEqualStrict=function(e){return this.throwIfDisposed(),me.lessEqualStrict(this,e)},e.prototype.greater=function(e){return this.throwIfDisposed(),me.greater(this,e)},e.prototype.greaterStrict=function(e){return this.throwIfDisposed(),me.greaterStrict(this,e)},e.prototype.greaterEqual=function(e){return this.throwIfDisposed(),me.greaterEqual(this,e)},e.prototype.greaterEqualStrict=function(e){return this.throwIfDisposed(),me.greaterEqualStrict(this,e)},e.prototype.logicalAnd=function(e){return this.throwIfDisposed(),me.logicalAnd(this,e)},e.prototype.logicalOr=function(e){return this.throwIfDisposed(),me.logicalOr(this,e)},e.prototype.logicalNot=function(){return this.throwIfDisposed(),me.logicalNot(this)},e.prototype.logicalXor=function(e){return this.throwIfDisposed(),me.logicalXor(this,e)},e.prototype.where=function(e,t){return this.throwIfDisposed(),me.where(e,this,t)},e.prototype.neg=function(){return this.throwIfDisposed(),me.neg(this)},e.prototype.ceil=function(){return this.throwIfDisposed(),me.ceil(this)},e.prototype.floor=function(){return this.throwIfDisposed(),me.floor(this)},e.prototype.sign=function(){return this.throwIfDisposed(),me.sign(this)},e.prototype.isNaN=function(){return this.throwIfDisposed(),me.isNaN(this)},e.prototype.isInf=function(){return this.throwIfDisposed(),me.isInf(this)},e.prototype.isFinite=function(){return this.throwIfDisposed(),me.isFinite(this)},e.prototype.exp=function(){return this.throwIfDisposed(),me.exp(this)},e.prototype.expm1=function(){return this.throwIfDisposed(),me.expm1(this)},e.prototype.log=function(){return this.throwIfDisposed(),me.log(this)},e.prototype.log1p=function(){return this.throwIfDisposed(),me.log1p(this)},e.prototype.sqrt=function(){return this.throwIfDisposed(),me.sqrt(this)},e.prototype.rsqrt=function(){return this.throwIfDisposed(),me.rsqrt(this)},e.prototype.square=function(){return this.throwIfDisposed(),me.square(this)},e.prototype.reciprocal=function(){return this.throwIfDisposed(),me.reciprocal(this)},e.prototype.abs=function(){return this.throwIfDisposed(),me.abs(this)},e.prototype.clipByValue=function(e,t){return this.throwIfDisposed(),me.clipByValue(this,e,t)},e.prototype.relu=function(){return this.throwIfDisposed(),me.relu(this)},e.prototype.relu6=function(){return this.throwIfDisposed(),me.relu6(this)},e.prototype.elu=function(){return this.throwIfDisposed(),me.elu(this)},e.prototype.selu=function(){return this.throwIfDisposed(),me.selu(this)},e.prototype.leakyRelu=function(e){return void 0===e&&(e=.2),this.throwIfDisposed(),me.leakyRelu(this,e)},e.prototype.prelu=function(e){return this.throwIfDisposed(),me.prelu(this,e)},e.prototype.sigmoid=function(){return this.throwIfDisposed(),me.sigmoid(this)},e.prototype.logSigmoid=function(){return this.throwIfDisposed(),me.logSigmoid(this)},e.prototype.softplus=function(){return this.throwIfDisposed(),me.softplus(this)},e.prototype.zerosLike=function(){return this.throwIfDisposed(),me.zerosLike(this)},e.prototype.onesLike=function(){return this.throwIfDisposed(),me.onesLike(this)},e.prototype.sin=function(){return this.throwIfDisposed(),me.sin(this)},e.prototype.cos=function(){return this.throwIfDisposed(),me.cos(this)},e.prototype.tan=function(){return this.throwIfDisposed(),me.tan(this)},e.prototype.asin=function(){return this.throwIfDisposed(),me.asin(this)},e.prototype.acos=function(){return this.throwIfDisposed(),me.acos(this)},e.prototype.atan=function(){return this.throwIfDisposed(),me.atan(this)},e.prototype.sinh=function(){return this.throwIfDisposed(),me.sinh(this)},e.prototype.cosh=function(){return this.throwIfDisposed(),me.cosh(this)},e.prototype.tanh=function(){return this.throwIfDisposed(),me.tanh(this)},e.prototype.asinh=function(){return this.throwIfDisposed(),me.asinh(this)},e.prototype.acosh=function(){return this.throwIfDisposed(),me.acosh(this)},e.prototype.atanh=function(){return this.throwIfDisposed(),me.atanh(this)},e.prototype.erf=function(){return this.throwIfDisposed(),me.erf(this)},e.prototype.round=function(){return this.throwIfDisposed(),me.round(this)},e.prototype.step=function(e){return void 0===e&&(e=0),this.throwIfDisposed(),me.step(this,e)},e.prototype.softmax=function(e){return void 0===e&&(e=-1),this.throwIfDisposed(),me.softmax(this,e)},e.prototype.logSoftmax=function(e){return void 0===e&&(e=-1),this.throwIfDisposed(),me.logSoftmax(this,e)},e.prototype.resizeBilinear=function(e,t){return void 0===t&&(t=!1),this.throwIfDisposed(),me.image.resizeBilinear(this,e,t)},e.prototype.resizeNearestNeighbor=function(e,t){return void 0===t&&(t=!1),this.throwIfDisposed(),me.image.resizeNearestNeighbor(this,e,t)},e.prototype.conv1d=function(e,t,n,r,o,i){return void 0===r&&(r="NWC"),void 0===o&&(o=1),this.throwIfDisposed(),me.conv1d(this,e,t,n,r,o,i)},e.prototype.conv2d=function(e,t,n,r,o,i){return void 0===r&&(r="NHWC"),void 0===o&&(o=[1,1]),this.throwIfDisposed(),me.conv2d(this,e,t,n,r,o,i)},e.prototype.conv2dTranspose=function(e,t,n,r,o){return this.throwIfDisposed(),me.conv2dTranspose(this,e,t,n,r,o)},e.prototype.depthwiseConv2D=function(e,t,n,r,o,i){return void 0===r&&(r="NHWC"),void 0===o&&(o=[1,1]),this.throwIfDisposed(),me.depthwiseConv2d(this,e,t,n,r,o,i)},e.prototype.separableConv2d=function(e,t,n,r,o,i){return void 0===o&&(o=[1,1]),void 0===i&&(i="NHWC"),this.throwIfDisposed(),me.separableConv2d(this,e,t,n,r,o,i)},e.prototype.avgPool=function(e,t,n,r){return this.throwIfDisposed(),me.avgPool(this,e,t,n,r)},e.prototype.maxPool=function(e,t,n,r){return this.throwIfDisposed(),me.maxPool(this,e,t,n,r)},e.prototype.localResponseNormalization=function(e,t,n,r){return void 0===e&&(e=5),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=.5),me.localResponseNormalization(this,e,t,n,r)},e.prototype.pool=function(e,t,n,r,o){return this.throwIfDisposed(),me.pool(this,e,t,n,r,o)},e.prototype.variable=function(e,t,n){return void 0===e&&(e=!0),this.throwIfDisposed(),ve().makeVariable(this,e,t,n)},e.prototype.unsortedSegmentSum=function(e,t){return this.throwIfDisposed(),me.unsortedSegmentSum(this,e,t)},e.prototype.batchToSpaceND=function(e,t){return this.throwIfDisposed(),me.batchToSpaceND(this,e,t)},e.prototype.spaceToBatchND=function(e,t){return this.throwIfDisposed(),me.spaceToBatchND(this,e,t)},e.prototype.topk=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=!0),this.throwIfDisposed(),me.topk(this,e,t)},e.prototype.stridedSlice=function(e,t,n,r,o,i,a,s){return void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=0),this.throwIfDisposed(),me.stridedSlice(this,e,t,n,r,o,i,a,s)},e.prototype.depthToSpace=function(e,t){return this.throwIfDisposed(),me.depthToSpace(this,e,t)},e.prototype.fft=function(){return this.throwIfDisposed(),me.spectral.fft(this)},e.prototype.ifft=function(){return this.throwIfDisposed(),me.spectral.ifft(this)},e.prototype.rfft=function(){return this.throwIfDisposed(),me.spectral.rfft(this)},e.prototype.irfft=function(){return this.throwIfDisposed(),me.spectral.irfft(this)},e}();Object.defineProperty(ye,Symbol.hasInstance,{value:function(e){return!!e&&null!=e.dataId&&null!=e.shape&&null!=e.dtype}});var be,we,xe,Ee,Ce,ke,Oe=function(e){function t(t,n,r,o){var i=e.call(this,t.shape,t.dtype,t.dataId,o)||this;return i.trainable=n,i.name=r,i}return a(t,e),t.prototype.assign=function(e){if(e.dtype!==this.dtype)throw new Error("dtype of the new value ("+e.dtype+") and previous value ("+this.dtype+") must match");if(!I(e.shape,this.shape))throw new Error("shape of the new value ("+e.shape+") and previous value ("+this.shape+") must match");ve().disposeTensor(this),this.dataId=e.dataId,ve().incRef(this,null)},t.prototype.dispose=function(){ve().disposeVariable(this),this.isDisposedInternal=!0},t}(ye);Object.defineProperty(Oe,Symbol.hasInstance,{value:function(e){return e instanceof ye&&null!=e.assign&&e.assign instanceof Function}}),(ke=be||(be={})).R0="R0",ke.R1="R1",ke.R2="R2",ke.R3="R3",ke.R4="R4",ke.R5="R5",ke.R6="R6",function(e){e.float32="float32",e.int32="int32",e.bool="int32",e.complex64="complex64"}(we||(we={})),function(e){e.float32="float32",e.int32="int32",e.bool="bool",e.complex64="complex64"}(xe||(xe={})),function(e){e.float32="float32",e.int32="float32",e.bool="float32",e.complex64="complex64"}(Ee||(Ee={})),function(e){e.float32="complex64",e.int32="complex64",e.bool="complex64",e.complex64="complex64"}(Ce||(Ce={}));var Se={float32:Ee,int32:we,bool:xe,complex64:Ce};function _e(e,t){if("string"===e||"string"===t){if("string"===e&&"string"===t)return"string";throw new Error("Can not upcast "+e+" with "+t)}return Se[e][t]}function Te(e){return _e(e,"int32")}function Ie(e,t){if(e.dtype===t.dtype)return[e,t];var n=_e(e.dtype,t.dtype);return[e.cast(n),t.cast(n)]}function Pe(e,t){k(e.dtype===t.dtype,(function(){return"The dtypes of the first("+e.dtype+") and second("+t.dtype+") input must match"}))}function Ae(e){var t=[];return function e(t,n,r){if(null!=t)if(t instanceof ye)n.push(t);else if(o=t,Array.isArray(o)||"object"==typeof o){var o,i=t;for(var a in i){var s=i[a];r.has(s)||(r.add(s),e(s,n,r))}}}(e,t,new Set),t}Object.freeze({makeTypesMatch:Ie,assertTypesMatch:Pe,isTensorInList:function(e,t){return t.some((function(t){return t.id===e.id}))},getTensorsInContainer:Ae});var Re,Ne=function(){function e(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return e.prototype.dispose=function(){for(var e in this.registeredVariables)this.registeredVariables[e].dispose()},e}(),Me=function(){function e(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new Ne}return e.prototype.ready=function(){return s(this,void 0,void 0,(function(){var e,t,n;return u(this,(function(r){switch(r.label){case 0:if(null!=this.pendingBackendInit)return[2,this.pendingBackendInit.then((function(){}))];if(null!=this.backendInstance)return[2];e=this.getSortedBackends(),t=0,r.label=1;case 1:return t<e.length?(n=e[t],[4,this.initializeBackend(n).success]):[3,5];case 2:return r.sent()?[4,this.setBackend(n)]:[3,4];case 3:return r.sent(),[2];case 4:return t++,[3,1];case 5:throw new Error("Could not initialize any backends, all backend initializations failed.")}}))}))},Object.defineProperty(e.prototype,"backend",{get:function(){if(null!=this.pendingBackendInit)throw new Error("Backend '"+this.backendName+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");if(null==this.backendInstance){var e=this.initializeBackendsAndReturnBest(),t=e.name;if(e.asyncInit)throw new Error("The highest priority backend '"+t+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");this.setBackend(t)}return this.backendInstance},enumerable:!0,configurable:!0}),e.prototype.backendNames=function(){return Object.keys(this.registryFactory)},e.prototype.findBackend=function(e){if(!(e in this.registry)){if(!(e in this.registryFactory))return null;if(this.initializeBackend(e).asyncInit)return null}return this.registry[e]},e.prototype.findBackendFactory=function(e){return e in this.registryFactory?this.registryFactory[e].factory:null},e.prototype.registerBackend=function(e,t,n){return void 0===n&&(n=1),e in this.registryFactory?(console.warn(e+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[e]={factory:t,priority:n},!0)},e.prototype.setBackend=function(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){switch(o.label){case 0:if(null==this.registryFactory[e])throw new Error("Backend name '"+e+"' not found in registry");return this.backendName=e,null!=this.registry[e]?[3,4]:(this.backendInstance=null,t=this.initializeBackend(e),n=t.success,t.asyncInit?[4,n]:[3,2]);case 1:return r=o.sent(),[3,3];case 2:r=n,o.label=3;case 3:if(!r)return[2,!1];o.label=4;case 4:return this.backendInstance=this.registry[e],this.setupRegisteredKernels(),this.profiler=new ce(this.backendInstance),[2,!0]}}))}))},e.prototype.setupRegisteredKernels=function(){var e=this;m(this.backendName).forEach((function(t){null!=t.setupFunc&&t.setupFunc(e.backendInstance)}))},e.prototype.disposeRegisteredKernels=function(e){var t=this;m(e).forEach((function(n){null!=n.disposeFunc&&n.disposeFunc(t.registry[e])}))},e.prototype.initializeBackend=function(e){var t=this,n=this.registryFactory[e];if(null==n)throw new Error("Cannot initialize backend "+e+", no registration found.");try{var r=n.factory();if(Promise.resolve(r)===r){var o=++this.pendingBackendInitId,i=r.then((function(n){return!(o<t.pendingBackendInitId)&&(t.registry[e]=n,t.pendingBackendInit=null,!0)})).catch((function(n){return!(o<t.pendingBackendInitId)&&(t.pendingBackendInit=null,console.warn("Initialization of backend "+e+" failed"),console.warn(n.stack||n.message),!1)}));return this.pendingBackendInit=i,{success:i,asyncInit:!0}}return this.registry[e]=r,{success:!0,asyncInit:!1}}catch(t){return console.warn("Initialization of backend "+e+" failed"),console.warn(t.stack||t.message),{success:!1,asyncInit:!1}}},e.prototype.removeBackend=function(e){if(!(e in this.registryFactory))throw new Error(e+" backend not found in registry");this.backendName===e&&null!=this.pendingBackendInit&&this.pendingBackendInitId++,e in this.registry&&(this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e]),delete this.registryFactory[e],this.backendName===e&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)},e.prototype.getSortedBackends=function(){var e=this;if(0===Object.keys(this.registryFactory).length)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort((function(t,n){return e.registryFactory[n].priority-e.registryFactory[t].priority}))},e.prototype.initializeBackendsAndReturnBest=function(){for(var e=this.getSortedBackends(),t=0;t<e.length;t++){var n=e[t],r=this.initializeBackend(n),o=r.success,i=r.asyncInit;if(i||o)return{name:n,asyncInit:i}}throw new Error("Could not initialize any backends, all backend initializations failed.")},e.prototype.moveData=function(e,t){var n=this.state.tensorInfo.get(t),r=n.backend,o=this.readSync(t);r.disposeData(t),n.backend=e,e.move(t,o,n.shape,n.dtype),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++},e.prototype.tidy=function(e,t){var n,r=this,o=null;if(null==t){if("function"!=typeof e)throw new Error("Please provide a function to tidy()");t=e}else{if("string"!=typeof e&&!(e instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if("function"!=typeof t)throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");o=e}return this.scopedRun((function(){return r.startScope(o)}),(function(){return r.endScope(n)}),(function(){return(n=t())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n}))},e.prototype.scopedRun=function(e,t,n){e();try{var r=n();return t(),r}catch(e){throw t(),e}},e.prototype.nextTensorId=function(){return e.nextTensorId++},e.prototype.nextVariableId=function(){return e.nextVariableId++},e.prototype.clone=function(e){var t=this.makeTensorFromDataId(e.dataId,e.shape,e.dtype),n={x:e};return this.addTapeNode(this.state.activeScope.name,n,[t],(function(e){return{x:function(){return e.toFloat()}}}),[]),t},e.prototype.runKernel=function(e,t,n,r,o){return this.runKernelFunc(null,t,null,e,n,r,o)},e.prototype.shouldCheckForMemLeaks=function(){return this.ENV.getBool("IS_TEST")},e.prototype.checkKernelForMemLeak=function(e,t,n){var r=this.backend.numDataIds(),o=0;n.forEach((function(e){o+="complex64"===e.dtype?3:1}));var i=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],a=r-t-o-i;if(a>0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+a+" data ids) after running '"+e+"'")},e.prototype.runKernelFunc=function(e,t,n,r,o,i,a){var s,u=this;void 0===i&&(i=[]),void 0===a&&(a=[]);var c=[],l=this.isTapeOn();null==r&&(r=null!=this.state.activeScope?this.state.activeScope.name:"");var f,d=function(e){l&&(c=e.map((function(e){return u.keep(u.clone(e))})))},p=this.state.numBytes,h=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var m,g=v(r,this.backendName);return f=null!=g?function(){var e=u.backend.numDataIds();m=g.kernelFunc({inputs:t,attrs:o,backend:u.backend});var n=Array.isArray(m)?m:[m];u.shouldCheckForMemLeaks()&&u.checkKernelForMemLeak(r,e,n);var s=n.map((function(e){var t=e.dataId,n=e.shape,r=e.dtype;return u.makeTensorFromDataId(t,n,r)})),c=s.filter((function(e,t){return a[t]}));return d((i||[]).slice().concat(c)),s}:function(){var t=u.backend.numDataIds();m=u.tidy((function(){return e(u.backend,d)}));var n=Array.isArray(m)?m:[m];return u.shouldCheckForMemLeaks()&&u.checkKernelForMemLeak(r,t,n),n},this.scopedRun((function(){return u.state.kernelDepth++}),(function(){return u.state.kernelDepth--}),(function(){s=u.ENV.getBool("DEBUG")?u.profiler.profileKernel(r,t,(function(){return f()})):f()})),l&&this.addTapeNode(r,t,s,n,c),this.state.profiling&&this.state.activeProfile.kernels.push({name:r,bytesAdded:this.state.numBytes-p,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-h,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(t).map((function(e){return t[e].shape})),outputShapes:s.map((function(e){return e.shape}))}),Array.isArray(m)?s:s[0]},e.prototype.makeTensor=function(e,t,n,r){if(null==e)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",r=r||this.backend;var o=e;"string"===n&&q(e[0])&&(o=e.map((function(e){return ie(e)})));var i=r.write(o,t,n),a=new ye(t,n,i,this.nextTensorId());if(this.incRef(a,r),"string"===n){var s=this.state.tensorInfo.get(i),u=$(o);this.state.numBytes+=u-s.bytes,s.bytes=u}return a},e.prototype.makeTensorFromDataId=function(e,t,n,r){var o=new ye(t,n=n||"float32",e,this.nextTensorId());return this.incRef(o,r),o},e.prototype.makeVariable=function(e,t,n,r){void 0===t&&(t=!0),n=n||this.nextVariableId().toString(),null!=r&&r!==e.dtype&&(e=e.asType(r));var o=new Oe(e,t,n,this.nextTensorId());if(null!=this.state.registeredVariables[o.name])throw new Error("Variable with name "+o.name+" was already registered");return this.state.registeredVariables[o.name]=o,this.incRef(o,this.backend),o},e.prototype.incRef=function(e,t){var n=this.state.tensorInfo.has(e.dataId)?this.state.tensorInfo.get(e.dataId).refCount:0;if(this.state.numTensors++,"string"===e.dtype&&this.state.numStringTensors++,0===n){this.state.numDataBuffers++;var r=0;"complex64"!==e.dtype&&"string"!==e.dtype&&(r=e.size*H(e.dtype)),this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:r,refCount:0}),this.state.numBytes+=r}this.state.tensorInfo.get(e.dataId).refCount++,e instanceof Oe||this.track(e)},e.prototype.disposeTensor=function(e){if(this.state.tensorInfo.has(e.dataId)){this.state.numTensors--,"string"===e.dtype&&this.state.numStringTensors--;var t=this.state.tensorInfo.get(e.dataId);t.refCount<=1?("complex64"!==e.dtype&&(this.state.numBytes-=t.bytes),this.state.numDataBuffers--,t.backend.disposeData(e.dataId),this.state.tensorInfo.delete(e.dataId)):this.state.tensorInfo.get(e.dataId).refCount--}},e.prototype.disposeVariables=function(){for(var e in this.state.registeredVariables){var t=this.state.registeredVariables[e];this.disposeVariable(t)}},e.prototype.disposeVariable=function(e){this.disposeTensor(e),null!=this.state.registeredVariables[e.name]&&delete this.state.registeredVariables[e.name]},e.prototype.memory=function(){var e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(e.unreliable=!0,null==e.reasons&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e},e.prototype.profile=function(e){return s(this,void 0,void 0,(function(){var t,n;return u(this,(function(r){return this.state.profiling=!0,t=this.state.numBytes,n=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map((function(e){return e.totalBytesSnapshot}))),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n,[2,this.state.activeProfile]}))}))},e.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&0===this.state.kernelDepth},e.prototype.addTapeNode=function(e,t,n,r,o){var i=this,a={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:o},s=function(e){return h.get(e)}(e);null!=s&&(r=s.gradFunc),null!=r&&(a.gradient=function(e){return e=e.map((function(e,t){if(null==e){var r=n[t],o=ne(r.size,r.dtype);return i.makeTensor(o,r.shape,r.dtype)}return e})),r(e.length>1?e:e[0],o)}),this.state.activeTape.push(a)},e.prototype.keep=function(e){return e.kept=!0,e},e.prototype.startTape=function(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++},e.prototype.endTape=function(){this.state.gradientDepth--},e.prototype.startScope=function(e){var t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t},e.prototype.endScope=function(e){for(var t=this,n=Ae(e),r=new Set(n.map((function(e){return e.id}))),o=0;o<this.state.activeScope.track.length;o++){var i=this.state.activeScope.track[o];i.kept||r.has(i.id)||i.dispose()}var a=this.state.scopeStack.pop();this.state.activeScope=0===this.state.scopeStack.length?null:this.state.scopeStack[this.state.scopeStack.length-1],n.forEach((function(e){e.kept||e.scopeId!==a.id||t.track(e)}))},e.prototype.gradients=function(e,t,n,r){var o=this;if(void 0===r&&(r=!1),k(t.length>0,(function(){return"gradients() received an empty list of xs."})),null!=n&&"float32"!==n.dtype)throw new Error("dy must have 'float32' dtype, but has '"+n.dtype+"'");var i=this.scopedRun((function(){return o.startTape()}),(function(){return o.endTape()}),(function(){return o.tidy("forward",e)}));k(i instanceof ye,(function(){return"The result y returned by f() must be a tensor."}));var a=function(e,t,n){for(var r={},o={},i=0;i<t.length;i++)r[t[i].id]=!0;for(i=0;i<e.length;i++){var a=(h=e[i]).inputs;for(var s in a){for(var u=a[s],c=!1,l=0;l<t.length;l++)if(r[u.id]){h.outputs.forEach((function(e){return r[e.id]=!0})),c=!0,o[h.id]=!0;break}if(c)break}}var f={};f[n.id]=!0;var d={};for(i=e.length-1;i>=0;i--)for(a=(h=e[i]).inputs,l=0;l<h.outputs.length;l++)if(f[h.outputs[l].id]){for(var s in a)f[a[s].id]=!0,d[h.id]=!0;break}var p=[];for(i=0;i<e.length;i++){var h;if(o[(h=e[i]).id]&&d[h.id]){var v={};for(var s in h.inputs){var m=h.inputs[s];r[m.id]&&(v[s]=m)}var g=Object.assign({},h);g.inputs=v,g.outputs=h.outputs,p.push(g)}}return p}(this.state.activeTape,t,i);if(!r&&0===a.length&&t.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",(function(){var e,r,s={};s[i.id]=null==n?(r=te(T(e=i.shape),"float32"),je.makeTensor(r,e,"float32")):n,function(e,t,n){for(var r=function(r){var o=t[r],i=[];if(o.outputs.forEach((function(t){var n=e[t.id];null!=n?i.push(n):i.push(null)})),null==o.gradient)throw new Error("Cannot compute gradient: gradient function not found for "+o.kernelName+".");var a=o.gradient(i),s=function(t){if(!(t in a))throw new Error("Cannot backprop through input "+t+". Available gradients found: "+Object.keys(a)+".");var r=n((function(){return a[t]()}));if("float32"!==r.dtype)throw new Error("Error in gradient for op "+o.kernelName+". The gradient of input "+t+" must have 'float32' dtype, but has '"+r.dtype+"'");var i=o.inputs[t];if(!I(r.shape,i.shape))throw new Error("Error in gradient for op "+o.kernelName+". The gradient of input '"+t+"' has shape '"+r.shape+"', which does not match the shape of the input '"+i.shape+"'");if(null==e[i.id])e[i.id]=r;else{var s=e[i.id];e[i.id]=s.add(r),s.dispose()}};for(var u in o.inputs)s(u)},o=t.length-1;o>=0;o--)r(o)}(s,a,(function(e){return o.tidy(e)}));var u=t.map((function(e){return s[e.id]}));return 0===o.state.gradientDepth&&(o.state.activeTape.forEach((function(e){for(var t=0,n=e.saved;t<n.length;t++)n[t].dispose()})),o.state.activeTape=null),{value:i,grads:u}}))},e.prototype.customGrad=function(e){var t=this;return k(Y(e),(function(){return"The f passed in customGrad(f) must be a function."})),function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];k(r.every((function(e){return e instanceof ye})),(function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"}));var i={};return r.forEach((function(e,t){i[t]=e})),t.runKernelFunc((function(t,o){return k((n=e.apply(void 0,r.concat([o]))).value instanceof ye,(function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"})),k(Y(n.gradFunc),(function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."})),n.value}),i,(function(e,t){var o=n.gradFunc(e,t),i=Array.isArray(o)?o:[o];k(i.length===r.length,(function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."})),k(i.every((function(e){return e instanceof ye})),(function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."}));var a={};return i.forEach((function(e,t){a[t]=function(){return e}})),a}))}},e.prototype.readSync=function(e){return this.state.tensorInfo.get(e).backend.readSync(e)},e.prototype.read=function(e){return this.state.tensorInfo.get(e).backend.read(e)},e.prototype.time=function(e){return s(this,void 0,void 0,(function(){var t,n;return u(this,(function(r){switch(r.label){case 0:return t=re(),[4,this.backend.time(e)];case 1:return(n=r.sent()).wallMs=re()-t,[2,n]}}))}))},e.prototype.track=function(e){return null!=this.state.activeScope&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e},Object.defineProperty(e.prototype,"registeredVariables",{get:function(){return this.state.registeredVariables},enumerable:!0,configurable:!0}),e.prototype.reset=function(){for(var e in this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new Ne,this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null},e.nextTensorId=0,e.nextVariableId=0,e}(),je=function(){var t=function(){if(null==Re){var t=void 0;if("undefined"!=typeof window)t=window;else if("undefined"!=typeof e)t=e;else if("undefined"!=typeof r)t=r;else{if("undefined"==typeof self)throw new Error("Could not find a global object");t=self}Re=t}return Re}();if(null==t._tfengine){var n=new c(t);t._tfengine=new Me(n)}return function(e){d=e}(t._tfengine.ENV),ve=function(){return t._tfengine},t._tfengine}();function De(){return"undefined"!=typeof window&&null!=window.document||"undefined"!=typeof WorkerGlobalScope}var Fe=f();Fe.registerFlag("DEBUG",(function(){return!1}),(function(e){e&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")})),Fe.registerFlag("IS_BROWSER",(function(){return De()})),Fe.registerFlag("IS_NODE",(function(){return"undefined"!=typeof r&&void 0!==r.versions&&void 0!==r.versions.node})),Fe.registerFlag("IS_CHROME",(function(){return"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)})),Fe.registerFlag("PROD",(function(){return!1})),Fe.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",(function(){return Fe.getBool("DEBUG")})),Fe.registerFlag("DEPRECATION_WARNINGS_ENABLED",(function(){return!0})),Fe.registerFlag("IS_TEST",(function(){return!1}));var Le,Be,Ue,ze={},Ve={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function We(e,t){ze[e]=t}function He(e){e in ze||(ze[e]=function(e){if(1!==e&&2!==e)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var t=function(e){if("undefined"!=typeof OffscreenCanvas&&2===e)return new OffscreenCanvas(300,150);if("undefined"!=typeof document)return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return t.addEventListener("webglcontextlost",(function(t){t.preventDefault(),delete ze[e]}),!1),1===e?t.getContext("webgl",Ve)||t.getContext("experimental-webgl",Ve):t.getContext("webgl2",Ve)}(e));var t=ze[e];return t.isContextLost()?(delete ze[e],He(e)):(t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.disable(t.BLEND),t.disable(t.DITHER),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SAMPLE_COVERAGE),t.enable(t.SCISSOR_TEST),t.enable(t.CULL_FACE),t.cullFace(t.BACK),ze[e])}function $e(e,t){return[t,e]}function qe(e){var t=T(e);return R(Math.ceil(t/4))}function Ke(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function Ge(e,t){var n,r,o,i,a,s,u,c,l,d=e;return 2===f().getNumber("WEBGL_VERSION")?(n=d.R32F,r=d.R16F,o=d.RGBA16F,i=d.RGBA32F,a=d.RED,s=4,u=1,c=d.HALF_FLOAT,l=d.FLOAT):(n=e.RGBA,r=e.RGBA,o=e.RGBA,i=d.RGBA,a=e.RGBA,s=4,u=4,c=null!=t?t.HALF_FLOAT_OES:null,l=e.FLOAT),{internalFormatFloat:n,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:o,internalFormatPackedFloat:i,textureFormatFloat:a,downloadTextureFormat:e.RGBA,downloadUnpackNumChannels:s,defaultNumChannels:u,textureTypeHalfFloat:c,textureTypeFloat:l}}function Xe(e,t,n){var r=n();return t&&function(e){var t=e.getError();if(t!==e.NO_ERROR)throw new Error("WebGL Error: "+Je(e,t))}(e),r}!function(e){e[e.DENSE=0]="DENSE",e[e.SHARED_BATCH=1]="SHARED_BATCH"}(Le||(Le={})),function(e){e[e.RENDER=0]="RENDER",e[e.UPLOAD=1]="UPLOAD",e[e.PIXELS=2]="PIXELS",e[e.DOWNLOAD=3]="DOWNLOAD"}(Be||(Be={})),function(e){e[e.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",e[e.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",e[e.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",e[e.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",e[e.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(Ue||(Ue={}));function Ye(e){return!!(f().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===e||5.96e-8<Math.abs(e)&&Math.abs(e)<65504)}function Je(e,t){switch(t){case e.NO_ERROR:return"NO_ERROR";case e.INVALID_ENUM:return"INVALID_ENUM";case e.INVALID_VALUE:return"INVALID_VALUE";case e.INVALID_OPERATION:return"INVALID_OPERATION";case e.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case e.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case e.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}function Qe(e,t,n){return xt(e,t,(function(){return e.getExtension(n)}),'Extension "'+n+'" not supported on this browser.')}function Ze(e,t,n){var r=xt(e,t,(function(){return e.createShader(e.VERTEX_SHADER)}),"Unable to create vertex WebGLShader.");if(Xe(e,t,(function(){return e.shaderSource(r,n)})),Xe(e,t,(function(){return e.compileShader(r)})),!1===e.getShaderParameter(r,e.COMPILE_STATUS))throw console.log(e.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function et(e,t,n){var r=xt(e,t,(function(){return e.createShader(e.FRAGMENT_SHADER)}),"Unable to create fragment WebGLShader.");if(Xe(e,t,(function(){return e.shaderSource(r,n)})),Xe(e,t,(function(){return e.compileShader(r)})),!1===e.getShaderParameter(r,e.COMPILE_STATUS))throw function(e,t){var n=rt.exec(t);if(null==n)return console.log("Couldn't parse line number in error: "+t),void console.log(e);for(var r=+n[1],o=e.split("\n"),i=o.length.toString().length+2,a=o.map((function(e,t){return N((t+1).toString(),i)+e})),s=0,u=0;u<a.length;u++)s=Math.max(a[u].length,s);var c=a.slice(0,r-1),l=a.slice(r-1,r),f=a.slice(r);console.log(c.join("\n")),console.log(t.split("\n")[0]),console.log("%c "+N(l[0],s),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(f.join("\n"))}(n,e.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var tt,nt,rt=/ERROR: [0-9]+:([0-9]+):/g;function ot(e,t){return xt(e,t,(function(){return e.createProgram()}),"Unable to create WebGLProgram.")}function it(e,t,n){if(Xe(e,t,(function(){return e.linkProgram(n)})),!1===e.getProgramParameter(n,e.LINK_STATUS))throw console.log(e.getProgramInfoLog(n)),new Error("Failed to link vertex and fragment shaders.")}function at(e,t,n){if(Xe(e,t,(function(){return e.validateProgram(n)})),!1===e.getProgramParameter(n,e.VALIDATE_STATUS))throw console.log(e.getProgramInfoLog(n)),new Error("Shader program validation failed.")}function st(e,t,n){var r=xt(e,t,(function(){return e.createBuffer()}),"Unable to create WebGLBuffer");return Xe(e,t,(function(){return e.bindBuffer(e.ARRAY_BUFFER,r)})),Xe(e,t,(function(){return e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW)})),r}function ut(e,t,n){var r=xt(e,t,(function(){return e.createBuffer()}),"Unable to create WebGLBuffer");return Xe(e,t,(function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,r)})),Xe(e,t,(function(){return e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW)})),r}function ct(e,t){return xt(e,t,(function(){return e.createTexture()}),"Unable to create WebGLTexture.")}function lt(e,t){var n=f().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(e<=0||t<=0){var r="["+e+"x"+t+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(e>n||t>n)throw r="["+e+"x"+t+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU ["+n+"x"+n+"].")}function ft(e,t){return xt(e,t,(function(){return e.createFramebuffer()}),"Unable to create WebGLFramebuffer.")}function dt(e,t,n,r,o,i,a,s){var u=e.getAttribLocation(n,r);return-1!==u&&(Xe(e,t,(function(){return e.bindBuffer(e.ARRAY_BUFFER,o)})),Xe(e,t,(function(){return e.vertexAttribPointer(u,i,e.FLOAT,!1,a,s)})),Xe(e,t,(function(){return e.enableVertexAttribArray(u)})),!0)}function pt(e,t,n,r){Et(e,r),Xe(e,t,(function(){return e.activeTexture(e.TEXTURE0+r)})),Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,n)}))}function ht(e,t,n,r){return xt(e,t,(function(){return e.getUniformLocation(n,r)}),'uniform "'+r+'" not present in program.')}function vt(e,t,n){return e.getUniformLocation(t,n)}function mt(e,t,n,r,o,i){Xe(e,t,(function(){return pt(e,t,r,i)})),Xe(e,t,(function(){return e.uniform1i(o,i)}))}function gt(e,t,n,r){Xe(e,t,(function(){return e.bindFramebuffer(e.FRAMEBUFFER,r)})),Xe(e,t,(function(){return e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}))}function yt(e,t,n){Xe(e,t,(function(){return e.bindFramebuffer(e.FRAMEBUFFER,n)})),Xe(e,t,(function(){return e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0)}))}function bt(e){var t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+wt(e,t))}function wt(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}function xt(e,t,n,r){var o=Xe(e,t,(function(){return n()}));if(null==o)throw new Error(r);return o}function Et(e,t){var n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+e.TEXTURE0;if(r<e.TEXTURE0||r>n)throw new Error("textureUnit must be in [gl.TEXTURE0, gl.TEXTURE"+n+"].")}function Ct(e,t){return void 0===t&&(t=2),T(e.slice(0,e.length-t))}function kt(e){if(0===e.length)throw Error("Cannot get rows and columns of an empty shape array.");return[e.length>1?e[e.length-2]:1,e[e.length-1]]}function Ot(e){var t=[1,1,1];return 0===e.length||1===e.length&&1===e[0]||(t=[Ct(e)].concat(kt(e))),t}function St(e,t){var n;void 0===t&&(t=!1);var r=f().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(r*=2,1===(e=e.map((function(t,n){return n>=e.length-2?E(e[n]):e[n]}))).length&&(e=[2,e[0]])),2!==e.length){var o=F(e);e=o.newShape}var i=T(e);if(e.length<=1&&i<=r)return[1,i];if(2===e.length&&e[0]<=r&&e[1]<=r)return e;if(3===e.length&&e[0]*e[1]<=r&&e[2]<=r)return[e[0]*e[1],e[2]];if(3===e.length&&e[0]<=r&&e[1]*e[2]<=r)return[e[0],e[1]*e[2]];if(4===e.length&&e[0]*e[1]*e[2]<=r&&e[3]<=r)return[e[0]*e[1]*e[2],e[3]];if(4===e.length&&e[0]<=r&&e[1]*e[2]*e[3]<=r)return[e[0],e[1]*e[2]*e[3]];if(t){var a=Ct(e),s=2,u=2;return e.length&&(s=(n=kt(e))[0],u=n[1]),R(i=a*(s/2)*(u/2)).map((function(e){return 2*e}))}return R(i)}function _t(e){return e%2==0}function Tt(e,t){if(I(e=e.slice(-2),t=t.slice(-2)))return!0;if(!e.length||!t.length)return!0;if(0===e[0]||0===e[1]||0===t[0]||0===t[1])return!0;if(e.length!==t.length){var n=e.slice(-1)[0],r=t.slice(-1)[0];if(n===r)return!0;if(_t(n)&&_t(r)&&(1===e[0]||1===t[0]))return!0}return e[1]===t[1]&&_t(e[0])&&_t(t[0])}function It(e){if(null==tt){var t=He(e);tt=t.getParameter(t.MAX_TEXTURE_SIZE)}return tt}function Pt(e){if(null==nt){var t=He(e);nt=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,nt)}function At(e){if(0===e)return 0;var t=He(e);return Rt(t,"EXT_disjoint_timer_query_webgl2")&&2===e?2:Rt(t,"EXT_disjoint_timer_query")?1:0}function Rt(e,t){return null!=e.getExtension(t)}function Nt(e){try{if(null!=He(e))return!0}catch(e){return!1}return!1}function Mt(e){if(0===e)return!1;var t=He(e);if(1===e){if(!Rt(t,"OES_texture_float"))return!1}else if(!Rt(t,"EXT_color_buffer_float"))return!1;return Dt(t)}function jt(e){if(0===e)return!1;var t=He(e);if(1!==e){if(Rt(t,"EXT_color_buffer_float"))return Dt(t);if(Rt(t,"EXT_color_buffer_half_float")){var n=t.getExtension("EXT_color_buffer_half_float");return function(e,t){var n=Ge(e,t),r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,n.internalFormatHalfFloat,1,1,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);var o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);var i=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(r),e.deleteFramebuffer(o),i}(t,n)}return!1}return!!Rt(t,"OES_texture_float")&&!!Rt(t,"WEBGL_color_buffer_float")&&Dt(t)}function Dt(e){var t=Ge(e),n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);var r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(r),o}function Ft(e){return 2===e&&null!=He(e).fenceSync}var Lt=Object.freeze({callAndCheck:Xe,canBeRepresented:Ye,getWebGLErrorMessage:Je,getExtensionOrThrow:Qe,createVertexShader:Ze,createFragmentShader:et,createProgram:ot,linkProgram:it,validateProgram:at,createStaticVertexBuffer:st,createStaticIndexBuffer:ut,getNumChannels:function(){return 2===f().getNumber("WEBGL_VERSION")?1:4},createTexture:ct,validateTextureSize:lt,createFramebuffer:ft,bindVertexBufferToProgramAttribute:dt,bindTextureUnit:pt,unbindTextureUnit:function(e,t,n){Et(e,n),Xe(e,t,(function(){return e.activeTexture(e.TEXTURE0+n)})),Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)}))},getProgramUniformLocationOrThrow:ht,getProgramUniformLocation:vt,bindTextureToProgramUniformSampler:mt,bindCanvasToFramebuffer:function(e,t){Xe(e,t,(function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)})),Xe(e,t,(function(){return e.viewport(0,0,e.canvas.width,e.canvas.height)})),Xe(e,t,(function(){return e.scissor(0,0,e.canvas.width,e.canvas.height)}))},bindColorTextureToFramebuffer:gt,unbindColorTextureFromFramebuffer:yt,validateFramebuffer:bt,getFramebufferErrorMessage:wt,getBatchDim:Ct,getRowsCols:kt,getShapeAs3D:Ot,getTextureShapeFromLogicalShape:St,isReshapeFree:Tt,getWebGLMaxTextureSize:It,resetMaxTextureSize:function(){tt=null},resetMaxTexturesInShader:function(){nt=null},getMaxTexturesInShader:Pt,getWebGLDisjointQueryTimerVersion:At,hasExtension:Rt,isWebGLVersionEnabled:Nt,isCapableOfRenderingToFloatTexture:Mt,isDownloadFloatTextureEnabled:jt,isWebGLFenceEnabled:Ft}),Bt=f();function Ut(e){f().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(e+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function zt(e,t){return je.tidy(e,t)}function Vt(e){Ae(e).forEach((function(e){return e.dispose()}))}function Wt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];f().getBool("IS_TEST")||console.warn.apply(console,e)}function Ht(e,t){var n=e;if(W(e))return"string"===t?[]:[e.length];if(!Array.isArray(e))return[];for(var r=[];Array.isArray(n)||W(n)&&"string"!==t;)r.push(n.length),n=n[0];return Array.isArray(e)&&f().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function e(t,n,r){if(r=r||[],Array.isArray(t)||W(t)){k(n.length>0,(function(){return"Element arr["+r.join("][")+"] should be a primitive, but is an array of "+t.length+" elements"})),k(t.length===n[0],(function(){return"Element arr["+r.join("][")+"] should have "+n[0]+" elements, but has "+t.length+" elements"}));for(var o=n.slice(1),i=0;i<t.length;++i)e(t[i],o,r.concat(i))}else k(0===n.length,(function(){return"Element arr["+r.join("][")+"] is a primitive, but should be an array/TypedArray of "+n[0]+" elements"}))}(e,r,[]),r}function $t(e,t,n,r){if(null!=e&&("numeric"!==e&&e!==t||"numeric"===e&&"string"===t))throw new Error("Argument '"+n+"' passed to '"+r+"' must be "+e+" tensor, but got "+t+" tensor")}function qt(e,t,n,r){if(void 0===r&&(r="numeric"),e instanceof ye)return $t(r,e.dtype,t,n),e;var o=X(e);if("string"!==o&&["bool","int32","float32"].indexOf(r)>=0&&(o=r),$t(r,o,t,n),null==e||!W(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e){var i=null==e?"null":e.constructor.name;throw new Error("Argument '"+t+"' passed to '"+n+"' must be a Tensor or TensorLike, but got '"+i+"'")}var a=Ht(e,o);W(e)||Array.isArray(e)||(e=[e]);var s="string"!==o?Z(e,o,f().getBool("DEBUG")):_(e,[],!0);return je.makeTensor(s,a,o)}function Kt(e,t,n,r){if(void 0===r&&(r="numeric"),!Array.isArray(e))throw new Error("Argument "+t+" passed to "+n+" must be a `Tensor[]` or `TensorLike[]`");return e.map((function(e,r){return qt(e,t+"["+r+"]",n)}),r)}function Gt(e,t){for(var n=0;n<e.length;++n)if(e[e.length-n-1]!==t-1-n)return!1;return!0}function Xt(e,t,n){for(var r=e.length+t.length,o=[],i=0,a=0,s=0;s<r;s++)-1===n.indexOf(s)?o.push(e[i++]):o.push(t[a++]);return o}function Yt(e,t){for(var n=[],r=e.length,o=0;o<r;o++)-1===t.indexOf(o)&&n.push(e[o]);return[n,t.map((function(t){return e[t]}))]}function Jt(e,t){return Xt(e,t.map((function(e){return 1})),t)}function Qt(e,t,n){k(Gt(t,n),(function(){return e+" supports only inner-most axes for now. Got axes "+t+" and rank-"+n+" input."}))}function Zt(e,t){if(Gt(e,t))return null;for(var n=[],r=0;r<t;++r)-1===e.indexOf(r)&&n.push(r);return e.forEach((function(e){return n.push(e)})),n}function en(e){return e.map((function(e,t){return[t,e]})).sort((function(e,t){return e[1]-t[1]})).map((function(e){return e[0]}))}function tn(e,t){for(var n=[],r=t-e;r<t;++r)n.push(r);return n}function nn(e,t){var n=e[0].length;e.forEach((function(e,t){k(e.length===n,(function(){return"Error in concat"+n+"D: rank of tensors["+t+"] must be the same as the rank of the rest ("+n+")"}))})),k(t>=0&&t<n,(function(){return"Error in concat"+n+"D: axis must be between 0 and "+(n-1)+"."}));var r=e[0];e.forEach((function(e,o){for(var i=0;i<n;i++)k(i===t||e[i]===r[i],(function(){return"Error in concat"+n+"D: Shape of tensors["+o+"] ("+e+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+o+"."}))}))}function rn(e,t){for(var n=e[0].slice(),r=1;r<e.length;r++)n[t]+=e[r][t];return n}function on(e){var t=Object.keys(e);if(1!==t.length)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");var n=t[0],r=e[n];n.endsWith("_")&&(n=n.substring(0,n.length-1));var o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];je.startScope(n);try{var o=r.apply(void 0,e);return o instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),je.endScope(o),o}catch(e){throw je.endScope(null),e}};return Object.defineProperty(o,"name",{value:n,configurable:!0}),o}Bt.registerFlag("HAS_WEBGL",(function(){return Bt.getNumber("WEBGL_VERSION")>0})),Bt.registerFlag("WEBGL_VERSION",(function(){return Nt(2)?2:Nt(1)?1:0})),Bt.registerFlag("WEBGL_BUFFER_SUPPORTED",(function(){return 2===Bt.get("WEBGL_VERSION")})),Bt.registerFlag("WEBGL_CPU_FORWARD",(function(){return!0})),Bt.registerFlag("WEBGL_FORCE_F16_TEXTURES",(function(){return!1})),Bt.registerFlag("WEBGL_PACK",(function(){return Bt.getBool("HAS_WEBGL")})),Bt.registerFlag("WEBGL_PACK_NORMALIZATION",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_PACK_CLIP",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_PACK_DEPTHWISECONV",(function(){return!1})),Bt.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_PACK_REDUCE",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_LAZILY_UNPACK",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_CONV_IM2COL",(function(){return Bt.getBool("WEBGL_PACK")})),Bt.registerFlag("WEBGL_MAX_TEXTURE_SIZE",(function(){return It(Bt.getNumber("WEBGL_VERSION"))})),Bt.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",(function(){return Pt(Bt.getNumber("WEBGL_VERSION"))})),Bt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",(function(){var e=Bt.getNumber("WEBGL_VERSION");return 0===e?0:At(e)})),Bt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",(function(){return Bt.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(e=navigator.userAgent||navigator.vendor||window.opera,!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))));var e})),Bt.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",(function(){return Mt(Bt.getNumber("WEBGL_VERSION"))})),Bt.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",(function(){return!Bt.getBool("WEBGL_FORCE_F16_TEXTURES")&&Bt.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")})),Bt.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",(function(){return jt(Bt.getNumber("WEBGL_VERSION"))})),Bt.registerFlag("WEBGL_FENCE_API_ENABLED",(function(){return Ft(Bt.getNumber("WEBGL_VERSION"))})),Bt.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",(function(){return Bt.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0})),ge=Ut;var an=on({complex_:function(e,t){var n=qt(e,"real","complex"),r=qt(t,"imag","complex");return O(n.shape,r.shape,"real and imag shapes, "+n.shape+" and "+r.shape+", must match in call to tf.complex()."),je.runKernelFunc((function(e){return e.complex(n,r)}),{$real:n,$imag:r})}}),sn=on({real_:function(e){var t=qt(e,"input","real");return je.runKernelFunc((function(e){return e.real(t)}),{$input:t})}}),un=on({imag_:function(e){var t=qt(e,"input","imag");return je.runKernelFunc((function(e){return e.imag(t)}),{$input:t})}});function cn(e,t,n){return ln(e,t,Ht(e,n),n)}function ln(e,t,n,r){if(null==r&&(r=X(e)),"complex64"===r)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!W(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(null!=t){oe(t);var o=T(t),i=T(n);k(o===i,(function(){return"Based on the provided shape, ["+t+"], the tensor should have "+o+" values but has "+i}));for(var a=0;a<n.length;++a){var s=n[a],u=a!==n.length-1||s!==T(t.slice(a));k(n[a]===t[a]||!u,(function(){return"Error creating a new Tensor. Inferred shape ("+n+") does not match the provided shape ("+t+"). "}))}}return W(e)||Array.isArray(e)||(e=[e]),t=t||n,e="string"!==r?Z(e,r,f().getBool("DEBUG")):_(e,[],!0),je.makeTensor(e,t,r)}function fn(e,t){if((W(e)&&"string"!==t||Array.isArray(e))&&"complex64"!==t)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if("string"===t&&W(e)&&!(e instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return ln(e,[],[],t)}function dn(e,t){S(e);var n=Ht(e,t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return ln(e,null,n,t)}function pn(e,t,n){if(S(e),null!=t&&2!==t.length)throw new Error("tensor2d() requires shape to have two numbers");var r=Ht(e,n);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return ln(e,t,r,n)}function hn(e,t,n){if(S(e),null!=t&&3!==t.length)throw new Error("tensor3d() requires shape to have three numbers");var r=Ht(e,n);if(3!==r.length&&1!==r.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return ln(e,t,r,n)}function vn(e,t,n){if(S(e),null!=t&&4!==t.length)throw new Error("tensor4d() requires shape to have four numbers");var r=Ht(e,n);if(4!==r.length&&1!==r.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return ln(e,t,r,n)}function mn(e,t){if(void 0===t&&(t="float32"),"complex64"===t){var n=mn(e,"float32"),r=gn(e,"float32");return an(n,r)}var o=te(T(e),t);return je.makeTensor(o,e,t)}function gn(e,t){if(void 0===t&&(t="float32"),"complex64"===t){var n=gn(e,"float32"),r=gn(e,"float32");return an(n,r)}var o=ne(T(e),t);return je.makeTensor(o,e,t)}function yn(e,t,n){return je.runKernelFunc((function(r){return r.fill(e,t,n)}),{})}function bn(e,t,n,r){if(void 0===n&&(n=1),void 0===r&&(r="float32"),0===n)throw new Error("Cannot have a step of zero");if(e===t||e<t&&n<0||t<e&&n>1)return gn([0],r);var o=ne(Math.abs(Math.ceil((t-e)/n)),r);t<e&&1===n&&(n=-1),o[0]=e;for(var i=1;i<o.length;i++)o[i]=o[i-1]+n;return dn(o,r)}var wn=on({onesLike_:function(e){var t=qt(e,"x","onesLike");if("complex64"===t.dtype){var n=wn(sn(t)),r=xn(un(t));return an(n,r)}return je.runKernelFunc((function(e){return e.onesLike(t)}),{$x:t},(function(e,t){return{$x:function(){return xn(e)}}}))}}),xn=on({zerosLike_:function(e){var t=qt(e,"x","zerosLike");return je.runKernelFunc((function(e){return e.zerosLike(t)}),{$x:t},(function(e,t){return{$x:function(){return xn(e)}}}))}}),En=on({concat_:function(e,t){void 0===t&&(t=0),k(e.length>=1,(function(){return"Pass at least one tensor to concat"}));var n=Kt(e,"tensors","concat");"complex64"===n[0].dtype&&n.forEach((function(e){if("complex64"!==e.dtype)throw new Error("Cannot concatenate complex64 tensors with a tensor\n with dtype "+e.dtype+". ")})),t=D(t,n[0].shape)[0];var r=rn(n.map((function(e){return e.shape})),t);if(0===T(r))return cn([],r);if(1===(n=n.filter((function(e){return e.size>0}))).length)return n[0];var o=n.map((function(e){return e.shape}));nn(o,t);var i=n,a={axis:t};return je.runKernelFunc((function(e){return e.concat(n,t)}),i,(function(e){var n=o.map((function(e){return e[t]}));return _n(e,n,t).map((function(e){return function(){return e}}))}),"Concat",a)}}),Cn=on({concat1d_:function(e){return En(e,0)}}),kn=on({concat2d_:function(e,t){return En(e,t)}}),On=on({concat3d_:function(e,t){return En(e,t)}}),Sn=on({concat4d_:function(e,t){return En(e,t)}}),_n=on({split_:function(e,t,n){void 0===n&&(n=0);var r,o=qt(e,"x","split");return n=D(n,o.shape)[0],"number"==typeof t?(k(o.shape[n]%t==0,(function(){return"Number of splits must evenly divide the axis."})),r=new Array(t).fill(o.shape[n]/t)):(k(o.shape[n]===t.reduce((function(e,t){return e+t})),(function(){return"The sum of sizes must match the size of the axis dimension."})),r=t),je.runKernelFunc((function(e){return e.split(o,r,n)}),{$x:o},(function(e){return{$x:function(){return En(e,n)}}}))}});function Tn(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e||"undefined"!=typeof self&&self;var In=Tn((function(e){!function(e,t,n){function r(e){var t,n=this,r=(t=4022871197,function(e){e=e.toString();for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function o(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function i(e,t){var n=new r(e),i=t&&t.state,a=n.next;return a.int32=function(){return 4294967296*n.next()|0},a.double=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.alea=i}(0,e)})),Pn=Tn((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function i(e,t){var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xor128=i}(0,e)})),An=Tn((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function i(e,t){var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xorwow=i}(0,e)})),Rn=Tn((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function o(e,t){return t.x=e.x.slice(),t.i=e.i,t}function i(e,t){null==e&&(e=+new Date);var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&(i.x&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xorshift7=i}(0,e)})),Nn=Tn((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,i=t.i;return t.w=r=r+1640531527|0,n=o[i+34&127],e=o[i=i+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[i]=n^e,t.i=i,n+(r^r>>>16)|0},function(e,t){var n,r,o,i,a,s=[],u=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,u=Math.max(u,t.length)),o=0,i=-32;i<u;++i)t&&(r^=t.charCodeAt((i+32)%t.length)),0===i&&(a=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,i>=0&&(a=a+1640531527|0,o=0==(n=s[127&i]^=r+a)?o+1:0);for(o>=128&&(s[127&(t&&t.length||0)]=-1),o=127,i=512;i>0;--i)r=s[o+34&127],n=s[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[o]=r^n;e.w=a,e.X=s,e.i=o}(t,e)}function o(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function i(e,t){null==e&&(e=+new Date);var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&(i.X&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.xor4096=i}(0,e)})),Mn=Tn((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function o(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function i(e,t){var n=new r(e),i=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&o(i,n),a.state=function(){return o(n,{})}),a}t&&t.exports?t.exports=i:this.tychei=i}(0,e)})),jn=Tn((function(e){!function(t,r){var o,i=this,a=256,s="random",u=r.pow(a,6),c=r.pow(2,52),l=2*c,f=255;function d(e,n,f){var d=[],g=v(function e(t,n){var r,o=[],i=typeof t;if(n&&"object"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(e){}return o.length?o:"string"==i?t:t+"\0"}((n=1==n?{entropy:!0}:n||{}).entropy?[e,m(t)]:null==e?function(){try{var e;return o&&(e=o.randomBytes)?e=e(a):(e=new Uint8Array(a),(i.crypto||i.msCrypto).getRandomValues(e)),m(e)}catch(e){var n=i.navigator,r=n&&n.plugins;return[+new Date,i,r,i.screen,m(t)]}}():e,3),d),y=new p(d),b=function(){for(var e=y.g(6),t=u,n=0;e<c;)e=(e+n)*a,t*=a,n=y.g(1);for(;e>=l;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return 0|y.g(4)},b.quick=function(){return y.g(4)/4294967296},b.double=b,v(m(y.S),t),(n.pass||f||function(e,t,n,o){return o&&(o.S&&h(o,y),e.state=function(){return h(y,{})}),n?(r[s]=e,t):e})(b,g,"global"in n?n.global:this==r,n.state)}function p(e){var t,n=e.length,r=this,o=0,i=r.i=r.j=0,s=r.S=[];for(n||(e=[n++]);o<a;)s[o]=o++;for(o=0;o<a;o++)s[o]=s[i=f&i+e[o%n]+(t=s[o])],s[i]=t;(r.g=function(e){for(var t,n=0,o=r.i,i=r.j,s=r.S;e--;)t=s[o=f&o+1],n=n*a+s[f&(s[o]=s[i=f&i+t])+(s[i]=t)];return r.i=o,r.j=i,n})(a)}function h(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function v(e,t){for(var n,r=e+"",o=0;o<r.length;)t[f&o]=f&(n^=19*t[f&o])+r.charCodeAt(o++);return m(t)}function m(e){return String.fromCharCode.apply(0,e)}if(r["seed"+s]=d,v(r.random(),t),e.exports){e.exports=d;try{o=n(513)}catch(e){}}}([],Math)}));jn.alea=In,jn.xor128=Pn,jn.xorwow=An,jn.xorshift7=Rn,jn.xor4096=Nn,jn.tychei=Mn;var Dn=jn.alea,Fn=function(){function e(e,t,n,r,o){this.mean=e,this.stdDev=t,this.dtype=n,this.nextVal=NaN,this.truncated=r,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var i=o||Math.random();this.random=Dn(i.toString())}return e.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var e=this.nextVal;return this.nextVal=NaN,e}for(var t,n,r=!1;!r;){var o=void 0,i=void 0,a=void 0;do{a=(o=2*this.random()-1)*o+(i=2*this.random()-1)*i}while(a>=1||0===a);var s=Math.sqrt(-2*Math.log(a)/a);t=this.mean+this.stdDev*o*s,n=this.mean+this.stdDev*i*s,this.truncated&&!this.isValidTruncated(t)||(r=!0)}return this.truncated&&!this.isValidTruncated(n)||(this.nextVal=this.convertValue(n)),this.convertValue(t)},e.prototype.convertValue=function(e){return null==this.dtype||"float32"===this.dtype?e:Math.round(e)},e.prototype.isValidTruncated=function(e){return e<=this.upper&&e>=this.lower},e}(),Ln=function(){function e(e,t,n,r){this.alpha=e,this.beta=1/t,this.dtype=n;var o=r||Math.random();this.randu=Dn(o.toString()),this.randn=new Fn(0,1,n,!1,this.randu()),this.d=e<1?e+2/3:e-1/3,this.c=1/Math.sqrt(9*this.d)}return e.prototype.nextValue=function(){for(var e,t,n,r,o,i;;){do{r=this.randn.nextValue(),i=1+this.c*r}while(i<=0);if(i*=i*i,t=1-.331*(e=r*r)*e,n=.5*e+this.d*(1-i+Math.log(i)),(o=this.randu())<t||Math.log(o)<n)break}return i=1/this.beta*this.d*i,this.alpha<1&&(i*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(i)},e.prototype.convertValue=function(e){return"float32"===this.dtype?e:Math.round(e)},e}(),Bn=function(){function e(e,t,n,r){var o=this;if(void 0===e&&(e=0),void 0===t&&(t=1),this.canReturnFloat=function(){return null==o.dtype||"float32"===o.dtype},this.min=e,this.range=t-e,this.dtype=n,null==r&&(r=Math.random()),"number"==typeof r&&(r=r.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error("The difference between "+e+" - "+t+" <= 1 and dtype is not float");this.random=Dn(r)}return e.prototype.convertValue=function(e){return this.canReturnFloat()?e:Math.round(e)},e.prototype.nextValue=function(){return this.convertValue(this.min+this.range*this.random())},e}();function Un(e,t,n){return void 0===t&&(t="float32"),t=t||"float32",oe(e),new he(e,t,n)}var zn=on({batchToSpaceND_:function(e,t,n){var r=qt(e,"x","batchToSpaceND"),o=t.reduce((function(e,t){return e*t}));return k(r.rank>=1+t.length,(function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+t.length})),k(n.length===t.length,(function(){return"crops.length is "+n.length+" but should be equal to blockShape.length "+t.length})),k(r.shape[0]%o==0,(function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+t.join(" * ")+" === "+o})),je.runKernelFunc((function(e){return e.batchToSpaceND(r,t,n)}),{$x:r},(function(e){return{$x:function(){return e.spaceToBatchND(t,n)}}}))}}),Vn=on({broadcastTo_:function(e,t){var n=qt(e,"broadcastTo","x"),r=n.shape;if(t.some((function(e){return!(e>0)||e%1!=0})))throw new Error("broadcastTo(): Invalid broadcast shape ["+t+"].");if(t.length<n.rank)throw new Error("broadcastTo(): shape.length="+t.length+" < input.rank="+n.rank+".");if(t.length>n.rank){for(var o=n.shape.slice();o.length<t.length;)o.unshift(1);n=n.reshape(o)}for(var i=Array.from(t),a=t.length-1;a>=0;a--)if(n.shape[a]===t[a])i[a]=1;else if(1!==n.shape[a])throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+t+"].");var s=i.map((function(e,t){return e>1?t:-1})).filter((function(e){return e>=0}));return 0===s.length?n.clone():je.runKernelFunc((function(e){return e.tile(n,i)}),{input:n},(function(e){return{input:function(){return e.sum(s,!0)}}}))}}),Wn=on({cast_:function(e,t){var n=qt(e,"x","cast");if(!z(t))throw new Error("Failed to cast to unknown dtype "+t);if("string"===t&&"string"!==n.dtype||"string"!==t&&"string"===n.dtype)throw new Error("Only strings can be casted to strings");var r={dtype:t};return je.runKernelFunc((function(e){return e.cast(n,t)}),{x:n},(function(e){return{x:function(){return e.clone()}}}),"Cast",r)}}),Hn=on({clone_:function(e){var t=qt(e,"x","clone",null);return je.runKernelFunc((function(){return je.makeTensorFromDataId(t.dataId,t.shape,t.dtype)}),{$x:t},(function(e){return{$x:function(){return e.toFloat()}}}))}}),$n=on({cumsum_:function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=!1),void 0===r&&(r=!1);var o=qt(e,"x","cumsum"),i=Zt([t|=0],o.rank),a=o;null!=i&&(a=o.transpose(i));var s=tn(1,o.rank)[0],u=je.runKernelFunc((function(e){return e.cumsum(a,s,n,r)}),{permutedX:a},(function(e){return{permutedX:function(){return e.cumsum(t,n,!r)}}}));return null!=i&&(u=u.transpose(i)),u}}),qn=on({depthToSpace_:function(e,t,n){void 0===n&&(n="NHWC");var r=qt(e,"x","depthToSpace"),o="NHWC"===n?r.shape[1]:r.shape[2],i="NHWC"===n?r.shape[2]:r.shape[3],a="NHWC"===n?r.shape[3]:r.shape[1];return k(o*t>=0,(function(){return"Negative dimension size caused by overflow when multiplying\n "+o+" and "+t+" for depthToSpace with input shape\n "+r.shape})),k(i*t>=0,(function(){return"Negative dimension size caused by overflow when multiplying\n "+i+" and "+t+" for depthToSpace with input shape\n "+r.shape})),k(a%(t*t)==0,(function(){return"Dimension size must be evenly divisible by "+t*t+" but is "+a+" for depthToSpace with input shape "+r.shape})),je.runKernelFunc((function(e){return e.depthToSpace(r,t,n)}),{$x:r})}}),Kn=on({expandDims_:function(e,t){void 0===t&&(t=0);var n=qt(e,"x","expandDims",null);k(t<=n.rank,(function(){return"Axis must be <= rank of the tensor"}));var r=n.shape.slice();return t<0&&(k(-(n.rank+1)<=t,(function(){return"Axis must be in the interval ["+-(n.rank+1)+", "+n.rank+"]"})),t=n.rank+t+1),r.splice(t,0,1),ar(n,r)}}),Gn=on({eye_:function(e,t,n,r){void 0===r&&(r="float32"),null==t&&(t=e);for(var o=Un([e,t],r),i=e<=t?e:t,a=0;a<i;++a)o.set(1,a,a);var s=o.toTensor().as2D(e,t);if(null==n)return s;if(1===n.length)return lr(Kn(s,0),[n[0],1,1]);if(2===n.length)return lr(Kn(Kn(s,0),0),[n[0],n[1],1,1]);if(3===n.length)return lr(Kn(Kn(Kn(s,0),0),0),[n[0],n[1],n[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+n.length+"D.")}}),Xn=on({multinomial_:function(e,t,n,r){void 0===r&&(r=!1);var o=qt(e,"logits","multinomial"),i=o.size,a=o.rank;if(i<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+i+".");if(a>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+a);n=n||Math.random();var s=1===a?o.as2D(1,-1):o,u=je.runKernelFunc((function(e){return e.multinomial(s,r,t,n)}),{logits2D:s});return 1===a?u.as1D():u}}),Yn=on({oneHot_:function(e,t,n,r){if(void 0===n&&(n=1),void 0===r&&(r=0),t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);var o=qt(e,"indices","oneHot","int32"),i=o.shape.concat([t]);return o=o.flatten(),je.runKernelFunc((function(e){return e.oneHot(o,t,n,r)}),{$indices:o},(function(e){return{$indices:function(){return gn(o.shape,"float32")}}})).reshape(i)}}),Jn=on({pad_:function(e,t,n){void 0===n&&(n=0);var r=qt(e,"x","pad");if(0===r.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var o={paddings:t,constantValue:n};return je.runKernelFunc((function(e){return e.pad(r,t,n)}),{x:r},(function(e){var n=t.map((function(e){return e[0]}));return{x:function(){return e.slice(n,r.shape)}}}),"PadV2",o)}}),Qn=on({pad1d_:function(e,t,n){return void 0===n&&(n=0),k(2===t.length,(function(){return"Invalid number of paddings. Must be length of 2."})),Jn(e,[t],n)}}),Zn=on({pad2d_:function(e,t,n){return void 0===n&&(n=0),k(2===t.length&&2===t[0].length&&2===t[1].length,(function(){return"Invalid number of paddings. Must be length of 2 each."})),Jn(e,t,n)}}),er=on({pad3d_:function(e,t,n){return void 0===n&&(n=0),k(3===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length,(function(){return"Invalid number of paddings. Must be length of 2 each."})),Jn(e,t,n)}}),tr=on({pad4d_:function(e,t,n){return void 0===n&&(n=0),k(4===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length&&2===t[3].length,(function(){return"Invalid number of paddings. Must be length of 2 each."})),Jn(e,t,n)}}),nr=on({rand_:function(e,t,n){var r=T(e),o=null;if(null==n||"float32"===n)o=new Float32Array(r);else if("int32"===n)o=new Int32Array(r);else{if("bool"!==n)throw new Error("Unknown data type "+n);o=new Uint8Array(r)}for(var i=0;i<r;i++)o[i]=t();return je.makeTensor(o,e,n)}}),rr=on({randomNormal_:function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var i=new Fn(t,n,r,!1,o),a=Un(e,r),s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}}),or=on({randomGamma_:function(e,t,n,r,o){if(void 0===n&&(n=1),void 0===r&&(r="float32"),null==n&&(n=1),null==r&&(r="float32"),"float32"!==r&&"int32"!==r)throw new Error("Unsupported data type "+r);for(var i=new Ln(t,n,r,o),a=Un(e,r),s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}}),ir=on({randomUniform_:function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r="float32");for(var i=Un(e,r),a=new Bn(t,n,null,o),s=0;s<i.values.length;s++)i.values[s]=a.nextValue();return i.toTensor()}}),ar=on({reshape_:function(e,t){var n=qt(e,"x","reshape",null);t=j(t,n.size),k(n.size===T(t),(function(){return"new shape and old shape must have the same number of elements."}));var r={shape:t};return je.runKernelFunc((function(e){return e.reshape(n,t)}),{x:n},(function(e){return{x:function(){return e.reshape(n.shape)}}}),"Reshape",r)}}),sr=on({spaceToBatchND_:function(e,t,n){var r=qt(e,"x","spaceToBatchND");return k(r.rank>=1+t.length,(function(){return"input rank "+r.rank+" should be > than [blockShape] "+t.length})),k(n.length===t.length,(function(){return"paddings.shape[0] "+n.length+" must be equal to [blockShape] "+t.length})),k(r.shape.reduce((function(e,r,o){return o>0&&o<=t.length?e&&(r+n[o-1][0]+n[o-1][1])%t[o-1]==0:e}),!0),(function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+n.toString()+" must be divisible by blockShapes "+t.toString()})),je.runKernelFunc((function(e){return e.spaceToBatchND(r,t,n)}),{$x:r},(function(e){return{$x:function(){return e.batchToSpaceND(t,n)}}}))}}),ur=on({squeeze_:function(e,t){var n=qt(e,"x","squeeze");return ar(n,F(n.shape,t).newShape)}}),cr=on({stack_:function(e,t){void 0===t&&(t=0);var n=Kt(e,"tensors","stack");if(k(n.length>=1,(function(){return"Pass at least one tensor to tf.stack"})),1===n.length)return n[0].expandDims(t);var r=n[0].rank,o=n[0].shape,i=n[0].dtype;k(t<=r,(function(){return"Axis must be <= rank of the tensor"})),n.forEach((function(e){O(o,e.shape,"All tensors passed to stack must have matching shapes")})),n.forEach((function(e){k(i===e.dtype,(function(){return"All tensors passed to stack must have matching dtypes"}))}));var a=n.map((function(e){return e.expandDims(t)}));return En(a,t)}}),lr=on({tile_:function(e,t){var n=qt(e,"x","tile",null);k(n.rank===t.length,(function(){return"Error in transpose: rank of input "+n.rank+" must match length of reps "+t+"."}));var r=[n],o={reps:t};return je.runKernelFunc((function(e,r){var o=e.tile(n,t);return r([n]),o}),{x:n},(function(e,n){var r=n[0];return{x:function(){var n=xn(r);if(1===r.rank)for(var o=0;o<t[0];++o)n=n.add(e.slice([o*r.shape[0]],[r.shape[0]]));else if(2===r.rank)for(o=0;o<t[0];++o)for(var i=0;i<t[1];++i)n=n.add(e.slice([o*r.shape[0],i*r.shape[1]],[r.shape[0],r.shape[1]]));else if(3===r.rank)for(o=0;o<t[0];++o)for(i=0;i<t[1];++i)for(var a=0;a<t[2];++a)n=n.add(e.slice([o*r.shape[0],i*r.shape[1],a*r.shape[2]],[r.shape[0],r.shape[1],r.shape[2]]));else{if(4!==r.rank)throw new Error("Gradient for tile operation is not implemented for rank-"+r.rank+" tensors yet.");for(o=0;o<t[0];++o)for(i=0;i<t[1];++i)for(a=0;a<t[2];++a)for(var s=0;s<t[3];++s)n=n.add(e.slice([o*r.shape[0],i*r.shape[1],a*r.shape[2],s*r.shape[3]],[r.shape[0],r.shape[1],r.shape[2],r.shape[3]]))}return n}}}),"Tile",o,r)}}),fr=on({truncatedNormal_:function(e,t,n,r,o){if(void 0===t&&(t=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var i=new Fn(t,n,r,!0,o),a=Un(e,r),s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}}),dr=on({unstack_:function(e,t){void 0===t&&(t=0),t=t||0;var n=qt(e,"x","unstack");k(t>=-n.shape.length&&t<n.shape.length,(function(){return"Axis = "+t+" is not in [-"+n.shape.length+", "+n.shape.length+")"})),t<0&&(t+=n.shape.length);var r={axis:t};return je.runKernelFunc((function(e){return e.unstack(n,t)}),{x:n},(function(e){return{x:function(){return cr(e,t)}}}),"Unpack",r)}});function pr(e,t,n,r){void 0===r&&(r=!0);var o=[];if(r)(o=o.concat(t.slice(0))).push(e[0]/n),o=o.concat(e.slice(1));else{o=o.concat(e[0]);for(var i=t.length,a=0;a<i;++a)o=o.concat([e[a+1]/t[a],t[a]]);o=o.concat(e.slice(i+1))}return o}function hr(e,t,n){void 0===n&&(n=!0);var r=[];if(n){r.push(t);for(var o=t+1;o<e;++o)o<=2*t?(r.push(o),r.push(o-(t+1))):r.push(o)}else{var i=[],a=[];for(o=1;o<e;++o)o>=2*t+1||o%2==1?a.push(o):i.push(o);r.push.apply(r,i),r.push(0),r.push.apply(r,a)}return r}function vr(e,t,n,r){void 0===r&&(r=!0);var o=[];r?o.push(e[0]/n):o.push(e[0]*n);for(var i=1;i<e.length;++i)i<=t.length?r?o.push(t[i-1]*e[i]):o.push(e[i]/t[i-1]):o.push(e[i]);return o}function mr(e,t){for(var n=[0],r=0;r<t;++r)n.push(e[r][0]);return n}function gr(e,t,n){for(var r=e.slice(0,1),o=0;o<n;++o)r.push(e[o+1]-t[o][0]-t[o][1]);return r}function yr(e,t){if(e.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+e.rank+".");if(t.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if("int32"!==t.dtype)throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.shape[t.rank-1]>e.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[t.rank-1]+" vs. "+e.rank);if(0===e.size)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+e.shape+".");for(var n=t.shape,r=n[n.length-1],o=1,i=0;i<n.length-1;++i)o*=n[i];var a=e.shape,s=n.slice();s.pop();var u=1;for(i=r;i<e.rank;++i)u*=a[i],s.push(a[i]);var c=Q(e.shape).map((function(e){return e/u})).concat([1]).slice(0,r);return[s,o,u,c]}Object.freeze({prepareAndValidate:yr});function br(e){return e<=30?e:J(e,Math.floor(Math.sqrt(e)))}function wr(e,t,n){var r=t.rank>1?t.shape[t.rank-1]:1,o=t.rank>1?t.rank-1:1,i="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+n.shape+", indices.shape: "+t.shape+", shape: "+e+", sliceDim: "+r+", and batchDim: "+o+".";if(n.rank<o)throw new Error(i+" update.rank < "+o+". ");if(e.length<r+(n.rank-o))throw new Error(i+" Output shape length < "+(r+(n.rank-o)));if(n.rank!==o+e.length-r)throw new Error(i+" update.rank != "+(o+e.length-r));for(var a=0;a<o;++a)if(n.shape[a]!==t.shape[a])throw new Error(i+" updates.shape["+a+"] ("+n.shape[a]+") != indices.shape["+a+"] ("+t.shape[a]+").");for(a=0;a<n.rank-o;++a)if(n.shape[a+o]!==e[a+r])throw new Error(i+" updates.shape["+(a+o)+"] ("+n.shape[a+o]+") != shape["+(a+o)+"] ("+e[a+o]+")")}function xr(e,t,n){if(t.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(e.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+e.rank+".");if("int32"!==t.dtype)throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(n.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+n);if(0===n.length){if(0===t.size)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(0===e.size)throw new Error("Updates specified for empty output. updates shape: "+e.shape)}wr(n,t,e)}function Er(e,t,n){for(var r=t.shape.length,o=r>1?t.shape[r-1]:1,i=n.length,a=1,s=o;s<i;++s)a*=n[s];var u=o<1?1:o;return{sliceRank:o,numUpdates:T(t.shape)/u,sliceSize:a,strides:Q(n.slice(0,o)).concat([1]),outputSize:T(n)}}Object.freeze({validateUpdateShape:wr,validateInput:xr,calculateShapes:Er});function Cr(e,t,n){k(e.rank===t.length,(function(){return"Error in slice"+e.rank+"D: Length of begin "+t+" must match the rank of the array ("+e.rank+")."})),k(e.rank===n.length,(function(){return"Error in slice"+e.rank+"D: Length of size "+n+" must match the rank of the array ("+e.rank+")."}));for(var r=function(r){k(t[r]+n[r]<=e.shape[r],(function(){return"Error in slice"+e.rank+"D: begin["+r+"] + size["+r+"] ("+(t[r]+n[r])+") would overflow input.shape["+r+"] ("+e.shape[r]+")"}))},o=0;o<e.rank;++o)r(o)}function kr(e){for(var t=[],n=0;e>0;)1&e&&t.push(n),e/=2,n++;return t}function Or(e,t,n){for(var r=[],o=0;o<e.length;o++)r[o]=Math.ceil((t[o]-e[o])/n[o]);return r}function Sr(e,t,n,r,o){var i=t[o],a=n[o]||1;(e&1<<o||null==i)&&(i=a>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var s=r[o];return i<0&&(i+=s),x(0,i,s-1)}function _r(e,t,n,r,o){var i=t[o],a=n[o]||1;(e&1<<o||null==i)&&(i=a>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var s=r[o];return i<0&&(i+=s),a>0?x(0,i,s):x(-1,i,s-1)}function Tr(e,t,n){for(var r=n.length,o=0;o<n.length;o++)if(n[o]>1){r=o;break}for(o=r+1;o<n.length;o++)if(t[o]>0||n[o]!==e[o])return!1;return!0}function Ir(e,t){for(var n=e.length>0?e[e.length-1]:1,r=0;r<e.length-1;r++)n+=e[r]*t[r];return n}Object.freeze({assertParamsValid:Cr,maskToAxes:kr,computeOutShape:Or,startForAxis:Sr,stopForAxis:_r,isSliceContinous:Tr,computeFlatOffset:Ir});function Pr(e){return je.customGrad(e)}var Ar=on({softmax_:function(e,t){void 0===t&&(t=-1);var n=qt(e,"logits","softmax","float32");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and dim was "+t);return je.runKernelFunc((function(e,r){var o=e.softmax(n,t);return r([o]),o}),{logits:n},(function(e,n){var r=n[0],o=e.mul(r);return{logits:function(){return o.sub(o.sum([t],!0).mul(r))}}}),"Softmax",{dim:t},[],[!0])}}),Rr=on({logSoftmax_:function(e,t){void 0===t&&(t=-1);var n=qt(e,"logits","logSoftmax");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and axis was "+t);return Pr((function(e,n){var r=e.max(t,!0),o=e.sub(r),i=o.toFloat().sub(o.exp().sum(t,!0).log());return n([i]),{value:i,gradFunc:function(e,n){var r=n[0].exp();return e.sub(e.sum(t,!0).mul(r))}}}))(n)}}),Nr=function(){function e(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}return e.prototype.get=function(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)},e.prototype.set=function(e,t){this.dataIdsCount++,this.data.set(e,t)},e.prototype.has=function(e){return this.data.has(e)},e.prototype.delete=function(e){return this.dataIdsCount--,this.data.delete(e)},e.prototype.numDataIds=function(){return this.dataIdsCount},e}(),Mr=function(){function e(){}return e.prototype.time=function(e){return jr("time")},e.prototype.read=function(e){return jr("read")},e.prototype.readSync=function(e){return jr("readSync")},e.prototype.numDataIds=function(){return jr("numDataIds")},e.prototype.disposeData=function(e){return jr("disposeData")},e.prototype.write=function(e,t,n){return jr("write")},e.prototype.move=function(e,t,n,r){return jr("move")},e.prototype.memory=function(){return jr("memory")},e.prototype.floatPrecision=function(){return jr("floatPrecision")},e.prototype.epsilon=function(){return 32===this.floatPrecision()?1e-7:1e-4},e.prototype.batchMatMul=function(e,t,n,r){return jr("batchMatMul")},e.prototype.fusedBatchMatMul=function(e){return e.a,e.b,e.transposeA,e.transposeB,e.bias,e.activation,e.preluActivationWeights,jr("fusedBatchMatMul")},e.prototype.slice=function(e,t,n){return jr("slice")},e.prototype.stridedSlice=function(e,t,n,r){return jr("stridedSlice")},e.prototype.unstack=function(e,t){return jr("unstack")},e.prototype.reverse=function(e,t){return jr("reverse")},e.prototype.concat=function(e,t){return jr("concat")},e.prototype.neg=function(e){return jr("neg")},e.prototype.add=function(e,t){return jr("add")},e.prototype.addN=function(e){return jr("addN")},e.prototype.subtract=function(e,t){return jr("subtract")},e.prototype.multiply=function(e,t){return jr("multiply")},e.prototype.realDivide=function(e,t){return jr("realDivide")},e.prototype.floorDiv=function(e,t){return jr("floorDiv")},e.prototype.sum=function(e,t){return jr("sum")},e.prototype.prod=function(e,t){return jr("prod")},e.prototype.unsortedSegmentSum=function(e,t,n){return jr("unsortedSegmentSum")},e.prototype.argMin=function(e,t){return jr("argMin")},e.prototype.argMax=function(e,t){return jr("argMax")},e.prototype.equal=function(e,t){return jr("equal")},e.prototype.notEqual=function(e,t){return jr("notEqual")},e.prototype.less=function(e,t){return jr("less")},e.prototype.lessEqual=function(e,t){return jr("lessEqual")},e.prototype.greater=function(e,t){return jr("greater")},e.prototype.greaterEqual=function(e,t){return jr("greaterEqual")},e.prototype.logicalNot=function(e){return jr("logicalNot")},e.prototype.logicalAnd=function(e,t){return jr("logicalAnd")},e.prototype.logicalOr=function(e,t){return jr("logicalOr")},e.prototype.where=function(e){return jr("where")},e.prototype.select=function(e,t,n){return jr("select")},e.prototype.topk=function(e,t,n){return jr("topk")},e.prototype.min=function(e,t){return jr("min")},e.prototype.minimum=function(e,t){return jr("minimum")},e.prototype.mod=function(e,t){return jr("mod")},e.prototype.max=function(e,t){return jr("max")},e.prototype.maximum=function(e,t){return jr("maximum")},e.prototype.all=function(e,t){return jr("all")},e.prototype.any=function(e,t){return jr("any")},e.prototype.squaredDifference=function(e,t){return jr("squaredDifference")},e.prototype.ceil=function(e){return jr("ceil")},e.prototype.floor=function(e){return jr("floor")},e.prototype.round=function(e){return jr("round")},e.prototype.sign=function(e){return jr("sign")},e.prototype.isNaN=function(e){return jr("isNaN")},e.prototype.isInf=function(e){return jr("isInf")},e.prototype.isFinite=function(e){return jr("isFinite")},e.prototype.pow=function(e,t){return jr("pow")},e.prototype.exp=function(e){return jr("exp")},e.prototype.expm1=function(e){return jr("expm1")},e.prototype.softmax=function(e,t){return jr("softmax")},e.prototype.log=function(e){return jr("log")},e.prototype.log1p=function(e){return jr("log1p")},e.prototype.sqrt=function(e){return jr("sqrt")},e.prototype.rsqrt=function(e){return jr("rsqrt")},e.prototype.square=function(e){return jr("square")},e.prototype.reciprocal=function(e){return jr("reciprocal")},e.prototype.relu=function(e){return jr("relu")},e.prototype.relu6=function(e){return jr("relu6")},e.prototype.prelu=function(e,t){return jr("prelu")},e.prototype.elu=function(e){return jr("elu")},e.prototype.eluDer=function(e,t){return jr("eluDer")},e.prototype.selu=function(e){return jr("selu")},e.prototype.int=function(e){return jr("int")},e.prototype.clip=function(e,t,n){return jr("clip")},e.prototype.abs=function(e){return jr("abs")},e.prototype.complexAbs=function(e){return jr("complexAbs")},e.prototype.sigmoid=function(e){return jr("sigmoid")},e.prototype.softplus=function(e){return jr("softplus")},e.prototype.sin=function(e){return jr("sin")},e.prototype.cos=function(e){return jr("cos")},e.prototype.tan=function(e){return jr("tan")},e.prototype.asin=function(e){return jr("asin")},e.prototype.acos=function(e){return jr("acos")},e.prototype.atan=function(e){return jr("atan")},e.prototype.atan2=function(e,t){return jr("atan2")},e.prototype.sinh=function(e){return jr("sinh")},e.prototype.cosh=function(e){return jr("cosh")},e.prototype.tanh=function(e){return jr("tanh")},e.prototype.asinh=function(e){return jr("asinh")},e.prototype.acosh=function(e){return jr("acosh")},e.prototype.atanh=function(e){return jr("atanh")},e.prototype.erf=function(e){return jr("erf")},e.prototype.step=function(e,t){return jr("step")},e.prototype.fusedConv2d=function(e){return e.input,e.filter,e.convInfo,e.bias,e.activation,e.preluActivationWeights,jr("fusedConv2d")},e.prototype.conv2d=function(e,t,n){return jr("conv2d")},e.prototype.conv2dDerInput=function(e,t,n){return jr("conv2dDerInput")},e.prototype.conv2dDerFilter=function(e,t,n){return jr("conv2dDerFilter")},e.prototype.fusedDepthwiseConv2D=function(e){return e.input,e.filter,e.convInfo,e.bias,e.activation,e.preluActivationWeights,jr("fusedDepthwiseConv2D")},e.prototype.depthwiseConv2D=function(e,t,n){return jr("depthwiseConv2D")},e.prototype.depthwiseConv2DDerInput=function(e,t,n){return jr("depthwiseConv2DDerInput")},e.prototype.depthwiseConv2DDerFilter=function(e,t,n){return jr("depthwiseConv2DDerFilter")},e.prototype.conv3d=function(e,t,n){return jr("conv3d")},e.prototype.conv3dDerInput=function(e,t,n){return jr("conv3dDerInput")},e.prototype.conv3dDerFilter=function(e,t,n){return jr("conv3dDerFilter")},e.prototype.maxPool=function(e,t){return jr("maxPool")},e.prototype.maxPoolBackprop=function(e,t,n,r){return jr("maxPoolBackprop")},e.prototype.avgPool=function(e,t){return jr("avgPool")},e.prototype.avgPoolBackprop=function(e,t,n){return jr("avgPoolBackprop")},e.prototype.avgPool3d=function(e,t){return jr("avgPool3d")},e.prototype.avgPool3dBackprop=function(e,t,n){return jr("avgPool3dBackprop")},e.prototype.maxPool3d=function(e,t){return jr("maxPool3d")},e.prototype.maxPool3dBackprop=function(e,t,n,r){return jr("maxPool3dBackprop")},e.prototype.reshape=function(e,t){return jr("reshape")},e.prototype.cast=function(e,t){return jr("cast")},e.prototype.tile=function(e,t){return jr("tile")},e.prototype.pad=function(e,t,n){return jr("pad")},e.prototype.transpose=function(e,t){return jr("transpose")},e.prototype.gather=function(e,t,n){return jr("gather")},e.prototype.gatherND=function(e,t){return jr("gatherND")},e.prototype.scatterND=function(e,t,n){return jr("scatterND")},e.prototype.batchToSpaceND=function(e,t,n){return jr("batchToSpaceND")},e.prototype.spaceToBatchND=function(e,t,n){return jr("spaceToBatchND")},e.prototype.resizeBilinear=function(e,t,n,r){return jr("resizeBilinear")},e.prototype.resizeBilinearBackprop=function(e,t,n){return jr("resizeBilinearBackprop")},e.prototype.resizeNearestNeighbor=function(e,t,n,r){return jr("resizeNearestNeighbor")},e.prototype.resizeNearestNeighborBackprop=function(e,t,n){return jr("resizeNearestNeighborBackprop")},e.prototype.batchNormalization=function(e,t,n,r,o,i){return jr("batchNormalization")},e.prototype.localResponseNormalization4D=function(e,t,n,r,o){return jr("localResponseNormalization4D")},e.prototype.LRNGrad=function(e,t,n,r,o,i,a){return jr("LRNGrad")},e.prototype.multinomial=function(e,t,n,r){return jr("multinomial")},e.prototype.oneHot=function(e,t,n,r){return jr("oneHot")},e.prototype.cumsum=function(e,t,n,r){return jr("cumsum")},e.prototype.nonMaxSuppression=function(e,t,n,r,o){return jr("nonMaxSuppression")},e.prototype.fft=function(e){return jr("fft")},e.prototype.ifft=function(e){return jr("ifft")},e.prototype.complex=function(e,t){return jr("complex")},e.prototype.real=function(e){return jr("real")},e.prototype.imag=function(e){return jr("imag")},e.prototype.cropAndResize=function(e,t,n,r,o,i){return jr("cropAndResize")},e.prototype.depthToSpace=function(e,t,n){return jr("depthToSpace")},e.prototype.split=function(e,t,n){return jr("split")},e.prototype.sparseToDense=function(e,t,n,r){return jr("sparseToDense")},e.prototype.diag=function(e){return jr("diag")},e.prototype.fill=function(e,t,n){return jr("fill")},e.prototype.onesLike=function(e){return jr("onesLike")},e.prototype.zerosLike=function(e){return jr("zerosLike")},e.prototype.linspace=function(e,t,n){return jr("linspace")},e.prototype.dispose=function(){return jr("dispose")},e}();function jr(e){throw new Error("'"+e+"' not yet implemented or not found in the registry. Did you forget to import the kernel?")}function Dr(e,t){for(var n=e.length,r=[],o=0;o<n;o++){var i=n-1-o,a=e[i]||1;(t[t.length-1-o]||1)>1&&1===a&&r.unshift(i)}return r}function Fr(e,t){for(var n=[],r=0;r<t.length;r++){var o=e[e.length-r-1],i=t.length-r-1,a=t[i];(null==o||1===o&&a>1)&&n.unshift(i)}return n}function Lr(e,t){for(var n=[],r=Math.max(e.length,t.length),o=0;o<r;o++){var i=e[e.length-o-1];null==i&&(i=1);var a=t[t.length-o-1];if(null==a&&(a=1),1===i)n.unshift(a);else if(1===a)n.unshift(i);else{if(i!==a)throw Error("Operands could not be broadcast together with shapes "+e+" and "+t+".");n.unshift(i)}}return n}function Br(e,t,n,r,o,i,a){void 0===a&&(a="channelsLast");var s,u=Hr(t),c=u[0],l=u[1];if("channelsLast"===a)s=[c,l,e[3],e[3]];else{if("channelsFirst"!==a)throw new Error("Unknown dataFormat "+a);s=[c,l,e[1],e[1]]}return zr(e,s,n,r,o,i,!1,a)}function Ur(e,t,n,r,o,i,a){void 0===a&&(a="NDHWC");var s,u,c=$r(t),l=c[0],f=c[1],d=c[2];if("NDHWC"===a)u="channelsLast",s=[l,f,d,e[4],e[4]];else{if("NCDHW"!==a)throw new Error("Unknown dataFormat "+a);u="channelsFirst",s=[l,f,d,e[1],e[1]]}return Vr(e,s,n,r,o,!1,u,i)}function zr(e,t,n,r,o,i,a,s){void 0===a&&(a=!1),void 0===s&&(s="channelsLast");var u=[-1,-1,-1,-1],c=u[0],l=u[1],f=u[2],d=u[3];if("channelsLast"===s)c=e[0],l=e[1],f=e[2],d=e[3];else{if("channelsFirst"!==s)throw new Error("Unknown dataFormat "+s);c=e[0],d=e[1],l=e[2],f=e[3]}var p,h=t[0],v=t[1],m=t[3],g=Hr(n),y=g[0],b=g[1],w=Hr(r),x=w[0],E=w[1],C=qr(h,x),O=qr(v,E),S=function(e,t,n,r,o,i,a,s){var u,c,l;if("number"==typeof e){u={top:e,bottom:e,left:e,right:e,type:0===e?"VALID":"NUMBER"};var f=function(e,t,n,r,o){null==r&&(r=Wr(e,t,n));var i=e[1],a=Kr((e[0]-t+2*r)/n+1,o);k(P(a),(function(){return"The output # of rows ("+a+") must be an integer. Change the stride and/or zero pad parameters"}));var s=Kr((i-t+2*r)/n+1,o);return k(P(s),(function(){return"The output # of columns ("+s+") must be an integer. Change the stride and/or zero pad parameters"})),[a,s]}([t,n],i,r,e,s);c=f[0],l=f[1]}else if("same"===e){c=Math.ceil(t/r),l=Math.ceil(n/o);var d=Math.max(0,(c-1)*r+i-t),p=Math.max(0,(l-1)*o+a-n),h=Math.floor(d/2),v=d-h,m=Math.floor(p/2);u={top:h,bottom:v,left:m,right:p-m,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);u={top:0,bottom:0,left:0,right:0,type:"VALID"},c=Math.ceil((t-i+1)/r),l=Math.ceil((n-a+1)/o)}return{padInfo:u,outHeight:c,outWidth:l}}(o,l,f,y,b,C,O,i),_=S.padInfo,T=S.outHeight,I=S.outWidth,A=a?m*d:m;return"channelsFirst"===s?p=[c,A,T,I]:"channelsLast"===s&&(p=[c,T,I,A]),{batchSize:c,dataFormat:s,inHeight:l,inWidth:f,inChannels:d,outHeight:T,outWidth:I,outChannels:A,padInfo:_,strideHeight:y,strideWidth:b,filterHeight:h,filterWidth:v,effectiveFilterHeight:C,effectiveFilterWidth:O,dilationHeight:x,dilationWidth:E,inShape:e,outShape:p,filterShape:t}}function Vr(e,t,n,r,o,i,a,s){void 0===i&&(i=!1),void 0===a&&(a="channelsLast");var u=[-1,-1,-1,-1,-1],c=u[0],l=u[1],f=u[2],d=u[3],p=u[4];if("channelsLast"===a)c=e[0],l=e[1],f=e[2],d=e[3],p=e[4];else{if("channelsFirst"!==a)throw new Error("Unknown dataFormat "+a);c=e[0],p=e[1],l=e[2],f=e[3],d=e[4]}var h,v=t[0],m=t[1],g=t[2],y=t[4],b=$r(n),w=b[0],x=b[1],E=b[2],C=$r(r),O=C[0],S=C[1],_=C[2],T=qr(v,O),I=qr(m,S),A=qr(g,_),R=function(e,t,n,r,o,i,a,s,u,c,l){var f,d,p,h;if("number"==typeof e){f={top:e,bottom:e,left:e,right:e,front:e,back:e,type:0===e?"VALID":"NUMBER"};var v=function(e,t,n,r,o,i){null==o&&(o=Wr(e,t,r));var a=e[1],s=e[2],u=Kr((e[0]-t+2*o)/r+1,i);k(P(u),(function(){return"The output # of depths ("+u+") must be an integer. Change the stride and/or zero pad parameters"}));var c=Kr((a-t+2*o)/r+1,i);k(P(c),(function(){return"The output # of rows ("+c+") must be an integer. Change the stride and/or zero pad parameters"}));var l=Kr((s-t+2*o)/r+1,i);return k(P(l),(function(){return"The output # of columns ("+l+") must be an integer. Change the stride and/or zero pad parameters"})),[u,c,l,1]}([t,n,r,1],s,0,o,e,l);d=v[0],p=v[1],h=v[2]}else if("same"===e){var m=((d=Math.ceil(t/o))-1)*o+s-t,g=((p=Math.ceil(n/i))-1)*i+u-n,y=((h=Math.ceil(r/a))-1)*a+c-r,b=Math.floor(m/2),w=m-b,x=Math.floor(g/2),E=g-x,C=Math.floor(y/2);f={top:x,bottom:E,left:C,right:y-C,front:b,back:w,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);f={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},d=Math.ceil((t-s+1)/o),p=Math.ceil((n-u+1)/i),h=Math.ceil((r-c+1)/a)}return{padInfo:f,outDepth:d,outHeight:p,outWidth:h}}(o,l,f,d,w,x,E,T,I,A,s),N=R.padInfo,M=R.outDepth,j=R.outHeight,D=R.outWidth,F=i?y*p:y;return"channelsFirst"===a?h=[c,F,M,j,D]:"channelsLast"===a&&(h=[c,M,j,D,F]),{batchSize:c,dataFormat:a,inDepth:l,inHeight:f,inWidth:d,inChannels:p,outDepth:M,outHeight:j,outWidth:D,outChannels:F,padInfo:N,strideDepth:w,strideHeight:x,strideWidth:E,filterDepth:v,filterHeight:m,filterWidth:g,effectiveFilterDepth:T,effectiveFilterHeight:I,effectiveFilterWidth:A,dilationDepth:O,dilationHeight:S,dilationWidth:_,inShape:e,outShape:h,filterShape:t}}function Wr(e,t,n,r){void 0===r&&(r=1);var o=qr(t,r);return Math.floor((e[0]*(n-1)-n+o)/2)}function Hr(e){return"number"==typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}function $r(e){return"number"==typeof e?[e,e,e]:e}function qr(e,t){return t<=1?e:e+(e-1)*(t-1)}function Kr(e,t){if(!t)return e;switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error("Unknown roundingMode "+t)}}function Gr(e){var t=Hr(e),n=t[0],r=t[1],o=t[2];return 1===n&&1===r&&1===o}function Xr(e,t){return Gr(e)||Gr(t)}function Yr(e){if("NHWC"===e)return"channelsLast";if("NCHW"===e)return"channelsFirst";throw new Error("Unknown dataFormat "+e)}function Jr(e,t,n){if("complex64"===t){if("complex64"===e.dtype)return e.clone();var r=gn(e.shape),o=e.toFloat(),i=n.complex(o,r);return r.dispose(),o.dispose(),i}if(!V(e.dtype,t))return je.makeTensorFromDataId(e.dataId,e.shape,t);if("complex64"===e.dtype){var a=n.real(e);return i=a.cast(t),a.dispose(),i}if("int32"===t)return n.int(e);if("bool"===t){var s=fn(0,e.dtype);return i=n.notEqual(e,s),s.dispose(),i}throw new Error("Error in Cast: failed to cast "+e.dtype+" to "+t)}function Qr(e,t){return je.makeTensorFromDataId(e.dataId,t,e.dtype)}function Zr(e,t,n){var r=(t-e)/(n-1),o=ne(n,"float32");o[0]=e;for(var i=1;i<o.length;i++)o[i]=o[i-1]+r;return dn(o,"float32")}Object.freeze({castTensor:Jr,reshapeTensor:Qr,linspaceImpl:Zr,upcastType:_e,axesAreInnerMostDims:Gt,combineLocations:Xt,computeOutAndReduceShapes:Yt,expandShapeToKeepDim:Jt,assertAxesAreInnerMostDims:Qt,getAxesPermutation:Zt,getUndoAxesPermutation:en,getInnerMostAxes:tn,getBroadcastDims:Dr,getReductionAxes:Fr,assertAndGetBroadcastShape:Lr,assertParamsConsistent:nn,computeOutShape:rn,computePool2DInfo:Br,computePool3DInfo:Ur,computeConv2DInfo:zr,computeConv3DInfo:Vr,computeDefaultPad:Wr,tupleValuesAreOne:Gr,eitherStridesOrDilationsAreOne:Xr,convertConv2DDataFormat:Yr,PARALLELIZE_THRESHOLD:30,computeOptimalWindowSize:br});function eo(e,t){if(e.length!==t.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+e.length+", imag: "+t.length+".");for(var n=new Float32Array(2*e.length),r=0;r<n.length;r+=2)n[r]=e[r/2],n[r+1]=t[r/2];return n}function to(e,t){return{real:e[2*t],imag:e[2*t+1]}}function no(e,t,n,r){e[2*r]=t,e[2*r+1]=n}function ro(e,t,n){var r=(n?2:-2)*Math.PI*(e/t);return{real:Math.cos(r),imag:Math.sin(r)}}function oo(e,t,n){var r=function(e,t,n){return function(e,t,n){for(var r=0,o=e.length,i=0,a=!1;r<o;){var s=n(t,e[i=r+(o-r>>>1)]);s>0?r=i+1:(o=i,a=!s)}return a?r:-r-1}(e,t,n||io)}(e,t,n),o=r<0?-(r+1):r;e.splice(o,0,t)}function io(e,t){return e>t?1:e<t?-1:0}function ao(e,t,n,r,o){return uo(e,t,n,r,o,0).selectedIndices}function so(e,t,n,r,o,i){var a=uo(e,t,n,r,o,i,!0);return a.numValidOutputs.dispose(),{selectedIndices:a.selectedIndices,selectedScores:a.selectedScores}}function uo(e,t,n,r,o,i,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);for(var u=Array.from(t).map((function(e,t){return{score:e,boxIndex:t,suppressBeginIndex:0}})).filter((function(e){return e.score>o})).sort(fo),c=i>0?-.5/i:0,l=[],f=[];l.length<n&&u.length>0;){var d=u.pop(),p=d.score,h=d.boxIndex,v=d.suppressBeginIndex;if(p<o)break;for(var m=!1,g=l.length-1;g>=v;--g){var y=co(e,h,l[g]);if(y>=r){m=!0;break}if(d.score=d.score*lo(r,c,y),d.score<=o)break}d.suppressBeginIndex=l.length,m||(d.score===p?(l.push(h),f.push(d.score)):d.score>o&&oo(u,d,fo))}var b=l.length;return s&&(l.fill(0,b),f.fill(0,b)),{selectedIndices:dn(l,"int32"),selectedScores:dn(f,"float32"),numValidOutputs:fn(b,"int32")}}function co(e,t,n){var r=e.subarray(4*t,4*t+4),o=e.subarray(4*n,4*n+4),i=Math.min(r[0],r[2]),a=Math.min(r[1],r[3]),s=Math.max(r[0],r[2]),u=Math.max(r[1],r[3]),c=Math.min(o[0],o[2]),l=Math.min(o[1],o[3]),f=Math.max(o[0],o[2]),d=Math.max(o[1],o[3]),p=(s-i)*(u-a),h=(f-c)*(d-l);if(p<=0||h<=0)return 0;var v=Math.max(i,c),m=Math.max(a,l),g=Math.min(s,f),y=Math.min(u,d),b=Math.max(g-v,0)*Math.max(y-m,0);return b/(p+h-b)}function lo(e,t,n){var r=Math.exp(t*n*n);return n<=e?r:0}function fo(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}function po(e,t,n){var r=new Array(e.rank).fill(0),o=e.shape.slice();return t.map((function(t){o[n]=t;var i=e.slice(r,o);return r[n]+=t,i}))}function ho(e,t){for(var n=new Array(e.rank),r=0;r<n.length;r++)n[r]=e.shape[r]*t[r];var o=Un(n,e.dtype);for(r=0;r<o.values.length;++r){for(var i=o.indexToLoc(r),a=new Array(e.rank),s=0;s<a.length;s++)a[s]=i[s]%e.shape[s];var u=e.locToIndex(a);o.values[r]=e.values[u]}return o.toTensor()}function vo(e,t,n,r,o){for(var i=t[t.length-1],a=[e.length/i,i],s=a[0],u=a[1],c=L(n,s*r),l=L("int32",s*r),f=0;f<s;f++){for(var d=f*u,p=e.subarray(d,d+u),h=[],v=0;v<p.length;v++)h.push({value:p[v],index:v});h.sort((function(e,t){return t.value-e.value}));var m=f*r,g=c.subarray(m,m+r),y=l.subarray(m,m+r);for(v=0;v<r;v++)g[v]=h[v].value,y[v]=h[v].index}var b=t.slice();return b[b.length-1]=r,[cn(c,b,n),cn(l,b,"int32")]}function mo(e,t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(r);var o=Un(e,"int32"),i=Un([n.length,e.length],"int32");for(r=0;r<n.length;r++){var a=o.indexToLoc(n[r]),s=r*e.length;i.values.set(a,s)}return i.toTensor()}var go=function(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map((function(e,t){return"T"+t}));var n=[];this.variableNames.forEach((function(e){n.push("float v"+e+" = get"+e+"AtOutCoords();")}));var r=this.variableNames.map((function(e){return"v"+e})).join(" + ");this.userCode="\n void main() {\n "+n.join("\n ")+"\n\n float result = "+r+";\n setOutput(result);\n }\n "},yo=function(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map((function(e,t){return"T"+t}));var n=[];this.variableNames.forEach((function(e){n.push("vec4 v"+e+" = get"+e+"AtOutCoords();")}));var r=this.variableNames.map((function(e){return"v"+e})).join(" + ");this.userCode="\n void main() {\n "+n.join("\n ")+"\n\n vec4 result = "+r+";\n setOutput(result);\n }\n "},bo=function(e,t,n){this.variableNames=["A"];var r=e.windowSize,o=e.batchSize,i=e.inSize,a=Math.ceil(i/r);n||this.variableNames.push("bestIndicesA"),this.outputShape=[o,a];var s="max"===t?">":"<",u=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+r+";\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < "+r+"; i++) {\n int inIdx = "+u+";\n float candidate = getA(batch, inIdx);\n if (candidate "+s+" bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n "};function wo(e,t){return["x","y","z","w","u","v"].slice(0,t).map((function(t){return e+"."+t}))}function xo(e,t){return 1===t?[e]:wo(e,t)}function Eo(){var e,t,n,r,o,i,a,s,u,c;return 2===f().getNumber("WEBGL_VERSION")?(e="#version 300 es",t="in",n="out",r="in",o="texture",i="outputColor",a="out vec4 outputColor;",s="\n bool isnan_custom(float val) {\n return (val > 0.0 || val < 0.0) ? false : val != 0.0;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n ",u="",c="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(e="",t="attribute",n="varying",r="varying",o="texture2D",i="gl_FragColor",a="",s="\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",u="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",c="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:e,attribute:t,varyingVs:n,varyingFs:r,texture2D:o,output:i,defineOutput:a,defineSpecialNaN:s,defineSpecialInf:u,defineRound:c}}function Co(e,t,n){void 0===n&&(n="index");var r=Q(t);return r.map((function(t,o){return"int "+e[o]+" = "+n+" / "+t+"; "+(o===r.length-1?"int "+e[o+1]+" = "+n+" - "+e[o]+" * "+t:"index -= "+e[o]+" * "+t)+";"})).join("")}function ko(e){var t=Q(e).map((function(e){return e.toString()}));return"\n int getFlatIndex(ivec3 coords) {\n return coords.x * "+t[0]+" + coords.y * "+t[1]+" + coords.z;\n }\n"}var Oo="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n";function So(e,t,n,r){var o=[];e.forEach((function(e){var t=T(e.shapeInfo.logicalShape);e.shapeInfo.isUniform?o.push("uniform float "+e.name+(t>1?"["+t+"]":"")+";"):(o.push("uniform sampler2D "+e.name+";"),o.push("uniform int offset"+e.name+";"))}));var i,a,s=o.join("\n"),u=e.map((function(e){return function(e,t,n){void 0===n&&(n=!1);var r="";r+=n?To(e):_o(e);var o=e.shapeInfo.logicalShape,i=t.logicalShape;return o.length<=i.length&&(r+=n?function(e,t){var n,r=e.name,o=r.charAt(0).toUpperCase()+r.slice(1),i="get"+o+"AtOutCoords",a=e.shapeInfo.logicalShape.length,s=t.logicalShape.length,u=Dr(e.shapeInfo.logicalShape,t.logicalShape),c=jo(s),l=s-a,f=["x","y","z","w","u","v"];n=0===a?"":s<2&&u.length>=1?"coords = 0;":u.map((function(e){return"coords."+f[e+l]+" = 0;"})).join("\n");var d;d=s<2&&a>0?"coords":e.shapeInfo.logicalShape.map((function(e,t){return"coords."+f[t+l]})).join(", ");var p="return outputValue;",h=1===T(e.shapeInfo.logicalShape),v=1===T(t.logicalShape);if(1!==a||h||v){if(h&&!v)p=1===s?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(u.length){var m=a-2,g=a-1;u.indexOf(m)>-1&&u.indexOf(g)>-1?p="return vec4(outputValue.x);":u.indexOf(m)>-1?p="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":u.indexOf(g)>-1&&(p="return vec4(outputValue.xx, outputValue.zz);")}}else p="\n return vec4(outputValue.xy, outputValue.xy);\n ";return"\n vec4 "+i+"() {\n "+c+" coords = getOutputCoords();\n "+n+"\n vec4 outputValue = get"+o+"("+d+");\n "+p+"\n }\n "}(e,t):function(e,t){var n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),o="get"+r+"AtOutCoords",i=t.texShape,a=e.shapeInfo.texShape,s=e.shapeInfo.logicalShape.length,u=t.logicalShape.length;if(!e.shapeInfo.isUniform&&s===u&&null==e.shapeInfo.flatOffset&&I(a,i))return"\n float "+o+"() {\n return sampleTexture("+n+", resultUV);\n }\n ";var c=jo(u),l=Dr(e.shapeInfo.logicalShape,t.logicalShape),f=u-s,d=["x","y","z","w","u","v"];return"\n float "+o+"() {\n "+c+" coords = getOutputCoords();\n "+(0===s?"":u<2&&l.length>=1?"coords = 0;":l.map((function(e){return"coords."+d[e+f]+" = 0;"})).join("\n"))+"\n return get"+r+"("+(u<2&&s>0?"coords":e.shapeInfo.logicalShape.map((function(e,t){return"coords."+d[t+f]})).join(", "))+");\n }\n "}(e,t)),r}(e,t,r)})).join("\n"),c=t.texShape,l=Eo(),f=function(e){return"\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return "+e.texture2D+"(textureSampler, uv).r;\n }\n "}(l),d=function(e){return e.version+"\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n "+e.varyingFs+" vec2 resultUV;\n "+e.defineOutput+"\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n "+e.defineSpecialNaN+"\n "+e.defineSpecialInf+"\n "+e.defineRound+"\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n "+Io+"\n "+Po+"\n "+Ao+"\n "}(l);return t.isPacked?(i=function(e,t){switch(e.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(e,t){var n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];return 1===n[0]?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * "+n[1]+".0);\n }\n ":1===n[1]?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * "+n[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n return 2 * (resTexRC.x * "+n[1]+" + resTexRC.y);\n }\n "}(0,t);case 2:return function(e,t){var n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(I(e,t))return"\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2("+n[0]+", "+n[1]+"));\n }\n ";var r=Math.ceil(e[1]/2);return"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec2(r, c);\n }\n "}(e,t);case 3:return n=e,r=t,o=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)],a=(i=Math.ceil(n[2]/2))*Math.ceil(n[1]/2),"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+o[0]+", "+o[1]+"));\n int index = resTexRC.x * "+o[1]+" + resTexRC.y;\n\n int b = index / "+a+";\n index -= b * "+a+";\n\n int r = 2 * (index / "+i+");\n int c = imod(index, "+i+") * 2;\n\n return ivec3(b, r, c);\n }\n ";default:return function(e,t){for(var n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],r=Math.ceil(e[e.length-1]/2),o=r*Math.ceil(e[e.length-2]/2),i=o,a="",s="b, r, c",u=2;u<e.length-1;u++)a="\n int b"+u+" = index / "+(i*=e[e.length-u-1])+";\n index -= b"+u+" * "+i+";\n "+a,s="b"+u+", "+s;return"\n ivec"+e.length+" getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n\n "+a+"\n\n int b = index / "+o+";\n index -= b * "+o+";\n\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec"+e.length+"("+s+");\n }\n "}(e,t)}var n,r,o,i,a}(t.logicalShape,c),a=function(e){return"\n void setOutput(vec4 val) {\n "+e.output+" = val;\n }\n "}(l)):(i=function(e,t){switch(e.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(e,t){return 1===t[0]?"\n int getOutputCoords() {\n return int(resultUV.x * "+t[1]+".0);\n }\n ":1===t[1]?"\n int getOutputCoords() {\n return int(resultUV.y * "+t[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n return resTexRC.x * "+t[1]+" + resTexRC.y;\n }\n "}(0,t);case 2:return function(e,t){return I(e,t)?"\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2("+t[0]+", "+t[1]+"));\n }\n ":1===e[1]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n return ivec2(index, 0);\n }\n ":1===e[0]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n return ivec2(0, index);\n }\n ":"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n int r = index / "+e[1]+";\n int c = index - r * "+e[1]+";\n return ivec2(r, c);\n }\n "}(e,t);case 3:return n=t,r=Co(["r","c","d"],e),"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n "+r+"\n return ivec3(r, c, d);\n }\n ";case 4:return function(e,t){var n=Co(["r","c","d","d2"],e);return"\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n "+n+"\n return ivec4(r, c, d, d2);\n }\n "}(e,t);case 5:return function(e,t){var n=Co(["r","c","d","d2","d3"],e);return"\n ivec5 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2("+t[0]+",\n "+t[1]+"));\n\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec5 outShape = ivec5(r, c, d, d2, d3);\n return outShape;\n }\n "}(e,t);case 6:return function(e,t){var n=Co(["r","c","d","d2","d3","d4"],e);return"\n ivec6 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = resTexRC.x * "+t[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec6 result = ivec6(r, c, d, d2, d3, d4);\n return result;\n }\n "}(e,t);default:throw new Error(e.length+"-D output sampling is not yet supported")}var n,r}(t.logicalShape,c),a=function(e){return"\n void setOutput(float val) {\n "+e.output+" = vec4(val, 0, 0, 0);\n }\n "}(l)),r&&(d+=Ro),[d,f,a,s,i,u,n].join("\n")}function _o(e){var t=e.shapeInfo.logicalShape;switch(t.length){case 0:return function(e){var t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1);if(e.shapeInfo.isUniform)return"float "+n+"() {return "+t+";}";var r=e.shapeInfo.texShape,o=r[0],i=r[1];if(1===o&&1===i)return"\n float "+n+"() {\n return sampleTexture("+t+", halfCR);\n }\n ";var a=e.shapeInfo.texShape;return"\n float "+n+"() {\n vec2 uv = uvFromFlat("+a[0]+", "+a[1]+", "+No(t)+");\n return sampleTexture("+t+", uv);\n }\n "}(e);case 1:return function(e){var t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1);if(e.shapeInfo.isUniform)return"\n float "+n+"(int index) {\n "+Mo(e)+"\n }\n ";var r=e.shapeInfo.texShape,o=r[0],i=r[1];if(1===i&&1===o)return"\n float "+n+"(int index) {\n return sampleTexture("+t+", halfCR);\n }\n ";var a=No(t);return 1===i?"\n float "+n+"(int index) {\n vec2 uv = vec2(0.5, (float(index + "+a+") + 0.5) / "+o+".0);\n return sampleTexture("+t+", uv);\n }\n ":1===o?"\n float "+n+"(int index) {\n vec2 uv = vec2((float(index + "+a+") + 0.5) / "+i+".0, 0.5);\n return sampleTexture("+t+", uv);\n }\n ":"\n float "+n+"(int index) {\n vec2 uv = uvFromFlat("+o+", "+i+", index + "+a+");\n return sampleTexture("+t+", uv);\n }\n "}(e);case 2:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape;if(null!=o&&I(t,o)){var i=o[0];return"\n float "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+o[1]+".0, "+i+".0);\n return sampleTexture("+n+", uv);\n }\n "}var a=F(t),s=a.newShape,u=a.keptDims,c=s;if(c.length<t.length)return"\n "+_o(Do(e,c))+"\n float "+r+"(int row, int col) {\n return "+r+"("+Fo(["row","col"],u)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col) {\n int index = round(dot(vec2(row, col), vec2("+t[1]+", 1)));\n "+Mo(e)+"\n }\n ";var l=o[0],f=o[1],d=No(n);return 1===f?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+d+"), vec3("+t[1]+", 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / "+l+".0);\n return sampleTexture("+n+", uv);\n }\n ":1===l?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+d+"), vec3("+t[1]+", 1, 1));\n vec2 uv = vec2((index + 0.5) / "+f+".0, 0.5);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+t[1]+" + col + "+d+";\n vec2 uv = uvFromFlat("+l+", "+f+", index);\n return sampleTexture("+n+", uv);\n }\n"}(e);case 3:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=t[1]*t[2],i=t[2],a=F(t),s=a.newShape,u=a.keptDims,c=s;if(c.length<t.length)return"\n "+_o(Do(e,c))+"\n float "+r+"(int row, int col, int depth) {\n return "+r+"("+Fo(["row","col","depth"],u)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth) {\n int index = round(dot(vec3(row, col, depth),\n vec3("+o+", "+i+", 1)));\n "+Mo(e)+"\n }\n ";var l=e.shapeInfo.texShape,f=l[0],d=l[1],p=e.shapeInfo.flatOffset;return d===o&&null==p?"\n float "+r+"(int row, int col, int depth) {\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2("+i+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+d+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":d===i&&null==p?"\n float "+r+"(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2("+t[1]+", 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+d+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+o+" + col * "+i+" + depth + "+No(n)+";\n vec2 uv = uvFromFlat("+f+", "+d+", index);\n return sampleTexture("+n+", uv);\n }\n "}(e);case 4:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=t[3],i=t[2]*o,a=t[1]*i,s=F(t),u=s.newShape,c=s.keptDims;if(u.length<t.length)return"\n "+_o(Do(e,u))+"\n float "+r+"(int row, int col, int depth, int depth2) {\n return "+r+"("+Fo(["row","col","depth","depth2"],c)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2) {\n int index = round(dot(vec4(row, col, depth, depth2),\n vec4("+a+", "+i+", "+o+", 1)));\n "+Mo(e)+"\n }\n ";var l=e.shapeInfo.flatOffset,f=e.shapeInfo.texShape,d=f[0],p=f[1];return p===a&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3("+i+", "+o+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":p===o&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3("+t[1]*t[2]+", "+t[2]+", 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+a+" + col * "+i+" +\n depth * "+o+" + depth2;\n vec2 uv = uvFromFlat("+d+", "+p+", index + "+No(n)+");\n return sampleTexture("+n+", uv);\n }\n "}(e);case 5:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=t[4],i=t[3]*o,a=t[2]*i,s=t[1]*a,u=F(t),c=u.newShape,l=u.keptDims;if(c.length<t.length)return"\n "+_o(Do(e,c))+"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n return "+r+"("+Fo(["row","col","depth","depth2","depth3"],l)+");\n }\n ";if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float index = dot(\n vec4(row, col, depth, depth2),\n vec4("+s+", "+a+", "+i+", "+o+")) +\n depth3;\n "+Mo(e)+"\n }\n ";var f=e.shapeInfo.flatOffset,d=e.shapeInfo.texShape,p=d[0],h=d[1];return h===s&&null==f?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+a+", "+i+", "+o+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":h===o&&null==f?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float texR = dot(\n vec4(row, col, depth, depth2),\n vec4("+t[1]*t[2]*t[3]+",\n "+t[2]*t[3]+", "+t[3]+", 1));\n int texC = depth3;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+s+" + col * "+a+" + depth * "+i+" +\n depth2 * "+o+" + depth3 + "+No(n)+";\n vec2 uv = uvFromFlat("+p+", "+h+", index);\n return sampleTexture("+n+", uv);\n }\n "}(e);case 6:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=F(t),i=o.newShape,a=o.keptDims;if(i.length<t.length)return"\n "+_o(Do(e,i))+"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n return "+r+"("+Fo(["row","col","depth","depth2","depth3","depth4"],a)+");\n }\n ";var s=t[5],u=t[4]*s,c=t[3]*u,l=t[2]*c,f=t[1]*l;if(e.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int index = round(dot(\n vec4(row, col, depth, depth2),\n vec4("+f+", "+l+", "+c+", "+u+")) +\n dot(\n vec2(depth3, depth4),\n vec2("+s+", 1)));\n "+Mo(e)+"\n }\n ";var d=e.shapeInfo.flatOffset,p=e.shapeInfo.texShape,h=p[0],v=p[1];return v===f&&null==d?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+l+", "+c+", "+u+", "+s+")) +\n float(depth4);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+v+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":v===s&&null==d?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n float texR = dot(vec4(row, col, depth, depth2),\n vec4("+t[1]*t[2]*t[3]*t[4]+",\n "+t[2]*t[3]*t[4]+",\n "+t[3]*t[4]+",\n "+t[4]+")) + float(depth3);\n int texC = depth4;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+v+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+f+" + col * "+l+" + depth * "+c+" +\n depth2 * "+u+" + depth3 * "+s+" + depth4 + "+No(n)+";\n vec2 uv = uvFromFlat("+h+", "+v+", index);\n return sampleTexture("+n+", uv);\n }\n "}(e);default:throw new Error(t.length+"-D input sampling is not yet supported")}}function To(e){var t;switch(e.shapeInfo.logicalShape.length){case 0:return"\n vec4 "+("get"+(t=e.name).charAt(0).toUpperCase()+t.slice(1))+"() {\n return "+Eo().texture2D+"("+t+", halfCR);\n }\n ";case 1:return function(e){var t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1),r=e.shapeInfo.texShape,o=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)],i=Eo();return"\n vec4 "+n+"(int index) {\n vec2 uv = packedUVfrom1D(\n "+o[0]+", "+o[1]+", index);\n return "+i.texture2D+"("+t+", uv);\n }\n "}(e);case 2:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape,i=o[0],a=o[1],s=Eo();if(null!=o&&I(t,o))return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+a+".0, "+i+".0);\n\n return "+s.texture2D+"("+n+", uv);\n }\n ";var u=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)];return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = packedUVfrom2D("+Math.ceil(t[1]/2)+", "+u[0]+", "+u[1]+", row, col);\n return "+s.texture2D+"("+n+", uv);\n }\n "}(e);case 3:return function(e){var t=e.shapeInfo.logicalShape,n=e.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),o=e.shapeInfo.texShape,i=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)];if(1===t[0])return"\n "+To(Do(e,t.slice(1)))+"\n vec4 "+r+"(int b, int row, int col) {\n return "+r+"("+Fo(["b","row","col"],[1,2])+");\n }\n ";var a=i[0],s=i[1],u=Math.ceil(t[2]/2);return"\n vec4 "+r+"(int b, int row, int col) {\n vec2 uv = packedUVfrom3D(\n "+a+", "+s+", "+u*Math.ceil(t[1]/2)+", "+u+", b, row, col);\n return "+Eo().texture2D+"("+n+", uv);\n }\n "}(e);default:return function(e){for(var t=e.shapeInfo.logicalShape,n=t.length,r=e.name,o="get"+r.charAt(0).toUpperCase()+r.slice(1),i=e.shapeInfo.texShape,a=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)],s=a[0],u=a[1],c=Math.ceil(t[n-1]/2),l=c*Math.ceil(t[n-2]/2),f="int b, int row, int col",d="b * "+l+" + (row / 2) * "+c+" + (col / 2)",p=2;p<n-1;p++)f="int b"+p+", "+f,d="b"+p+" * "+(l*=t[n-p-1])+" + "+d;return"\n vec4 "+o+"("+f+") {\n int index = "+d+";\n int texR = index / "+u+";\n int texC = index - texR * "+u+";\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+u+", "+s+");\n return "+Eo().texture2D+"("+r+", uv);\n }\n "}(e)}}var Io="\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n int texelIndex = index / 2;\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",Po="\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n int texNumC, int row, int col) {\n int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",Ao="\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n int texelsInBatch, int texelsInLogicalRow, int b,\n int row, int col) {\n int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",Ro="\n float getChannel(vec4 frag, vec2 innerDims) {\n vec2 modCoord = mod(innerDims, 2.);\n return modCoord.x == 0. ?\n (modCoord.y == 0. ? frag.r : frag.g) :\n (modCoord.y == 0. ? frag.b : frag.a);\n }\n float getChannel(vec4 frag, int dim) {\n float modCoord = mod(float(dim), 2.);\n return modCoord == 0. ? frag.r : frag.g;\n }\n";function No(e){return"offset"+e}function Mo(e){var t=e.name,n=T(e.shapeInfo.logicalShape);return n<2?"return "+t+";":"\n for (int i = 0; i < "+n+"; i++) {\n if (i == index) {\n return "+t+"[i];\n }\n }\n "}function jo(e){if(e<=1)return"int";if(2===e)return"ivec2";if(3===e)return"ivec3";if(4===e)return"ivec4";if(5===e)return"ivec5";if(6===e)return"ivec6";throw Error("GPU for rank "+e+" is not yet supported")}function Do(e,t){var n=JSON.parse(JSON.stringify(e));return n.shapeInfo.logicalShape=t,n}function Fo(e,t){return t.map((function(t){return e[t]})).join(", ")}var Lo=function(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,k(e.length>2,(function(){return"Packed arg"+(n.charAt(0).toUpperCase()+n.slice(1))+" supports only inputs with rank above 2."}));var o=e[e.length-1],i=Math.ceil(o/t);this.outputShape=e.slice(0,-1),i>1&&this.outputShape.push(i),r||this.variableNames.push("bestIndicesA");var a,s,u=this.outputShape,c=u.length,l=jo(c),f=xo("coords",c);if(1===i){var d=jo(s=c+1);a="\n "+d+" sourceLocR = "+d+"("+f.join()+", 0);\n ++"+f[c-1]+";\n "+d+" sourceLocG = "+d+"("+f.join()+", 0);\n ++"+f[c-2]+";\n "+d+" sourceLocA = "+d+"("+f.join()+", 0);\n --"+f[c-1]+";\n "+d+" sourceLocB = "+d+"("+f.join()+", 0);\n --"+f[c-2]+";"}else s=c,a="\n "+l+" sourceLocR = coords;\n ++"+f[c-1]+";\n "+l+" sourceLocG = coords;\n ++"+f[c-2]+";\n "+l+" sourceLocA = coords;\n --"+f[c-1]+";\n "+l+" sourceLocB = coords;\n --"+f[c-2]+";";var p=["x","y","z","w","u","v"].slice(0,s),h="."+p[s-1],v=p.map((function(e){return"int "+e})),m=xo("sourceLocR",s-1).concat("inIdx.r"),g=xo("sourceLocG",s-1).concat("inIdx.g"),y=xo("sourceLocB",s-1).concat("inIdx.b"),b=xo("sourceLocA",s-1).concat("inIdx.a"),w="max"===n?"greaterThan":"lessThan",x=r?"":"\n inIdx = round(vec4(getBestIndicesAChannel("+m.join()+"),\n getBestIndicesAChannel("+g.join()+"),\n getBestIndicesAChannel("+y.join()+"),\n getBestIndicesAChannel("+b.join()+")));",E="vec4(\n getAChannel("+m.join()+"),\n hasNextCol ? getAChannel("+g.join()+") : 0.,\n hasNextRow ? getAChannel("+y.join()+") : 0.,\n hasNextRow && hasNextCol ? getAChannel("+b.join()+") : 0.)",C=r?"":"\n float getBestIndicesAChannel("+v.join()+") {\n return getChannel(getBestIndicesA("+p.join()+"),\n vec2("+p.slice(-2).join()+"));\n }";this.userCode="\n float getAChannel("+v.join()+") {\n return getChannel(getA("+p.join()+"),\n vec2("+p.slice(-2).join()+"));\n }\n "+C+"\n void main() {\n "+l+" coords = getOutputCoords();\n bool hasNextCol = "+f[c-1]+" < "+(u[c-1]-1)+";\n bool hasNextRow = "+f[c-2]+" < "+(u[c-2]-1)+";\n "+a+"\n ivec4 srcIdx = ivec4(sourceLocR"+h+", sourceLocG"+h+",\n sourceLocB"+h+", sourceLocA"+h+") * "+t+";\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = "+E+";\n\n for (int i = 0; i < "+t+"; i++) {\n inIdx = srcIdx;\n "+x+"\n vec4 candidate = "+E+";\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4("+w+"(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n "},Bo=function(e){this.variableNames=["dy"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,i=e.dilationHeight,a=e.dilationWidth,s=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=s-1-e.padInfo.top,l=u-1-e.padInfo.left,f=1/(t*n);this.userCode="\n const ivec2 pads = ivec2("+c+", "+l+");\n const float avgMultiplier = float("+f+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+s+";\n wR += "+i+") {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+u+";\n wC+= "+a+") {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n "},Uo=function(e){this.variableNames=["dy"],this.outputShape=e.inShape;var t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterDepth,f=e.effectiveFilterHeight,d=e.effectiveFilterWidth,p=l-1-e.padInfo.front,h=f-1-e.padInfo.top,v=d-1-e.padInfo.left,m=1/(t*n*r);this.userCode="\n const ivec3 pads = ivec3("+p+", "+h+", "+v+");\n const float avgMultiplier = float("+m+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+s+") {\n float dyD = float(dyDCorner + wD) / "+o+".0;\n\n if (dyD < 0.0 || dyD >= "+e.outDepth+".0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < "+f+";\n wR += "+u+") {\n float dyR = float(dyRCorner + wR) / "+i+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+d+";\n wC += "+c+") {\n float dyC = float(dyCCorner + wC) / "+a+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n "},zo=function(e,t,n,r,o,i){this.outputShape=[],this.variableNames=["x","mean","variance"],Lr(e,t),Lr(e,n);var a="0.0";null!=r&&(Lr(e,r),this.variableNames.push("offset"),a="getOffsetAtOutCoords()");var s="1.0";null!=o&&(Lr(e,o),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=e,this.userCode="\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = "+a+";\n float scale = "+s+";\n float inv = scale * inversesqrt(variance + float("+i+"));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n "},Vo=function(e,t,n,r,o,i){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],Lr(e,t),Lr(e,n);var a="vec4(0.0)";null!=r&&(Lr(e,r),this.variableNames.push("offset"),a="getOffsetAtOutCoords()");var s="vec4(1.0)";null!=o&&(Lr(e,o),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=e,this.userCode="\n void main() {\n vec4 offset = "+a+";\n vec4 scale = "+s+";\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4("+i+"));\n\n setOutput((x - mean) * inv + offset);\n }\n "},Wo=function(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=Lr(t,n),this.userCode="\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n "+e+"\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n "},Ho="return a + b;",$o="return a - b;",qo="return a * b;",Ko="return (a < 0.) ? b * a : a;",Go=function(e,t,n){this.variableNames=["A","B"],this.outputShape=Lr(t,n),this.userCode="\n float binaryOperation(float a, float b) {\n "+e+"\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},Xo="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n",Yo=function(e,t,n,r){void 0===r&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=Lr(t,n);var o=this.outputShape.length,i="";if(r)if(0===o||1===T(this.outputShape))i="\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n ";else if(i="\n "+jo(o)+" coords = getOutputCoords();\n ",1===o)i+="\n result.y = (coords + 1) >= "+this.outputShape[0]+" ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n ";else{var a=xo("coords",o);i+="\n bool nextRowOutOfBounds =\n ("+a[o-2]+" + 1) >= "+this.outputShape[o-2]+";\n bool nextColOutOfBounds =\n ("+a[o-1]+" + 1) >= "+this.outputShape[o-1]+";\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n "}this.userCode="\n vec4 binaryOperation(vec4 a, vec4 b) {\n "+e+"\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n "+i+"\n\n setOutput(result);\n }\n "},Jo=function(){function e(e){this.variableNames=["A"],this.outputShape=e,this.userCode="\n uniform float minVal;\n uniform float maxVal;\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n "}return e.prototype.getCustomSetupFunc=function(e,t){var n=this;return function(r,o){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(o,"minVal"),n.maxLoc=r.getUniformLocationNoThrow(o,"maxVal")),r.gl.uniform1f(n.minLoc,e),r.gl.uniform1f(n.maxLoc,t)}},e}(),Qo=function(){function e(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.userCode="\n uniform float minVal;\n uniform float maxVal;\n\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n "}return e.prototype.getCustomSetupFunc=function(e,t){var n=this;return function(r,o){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(o,"minVal"),n.maxLoc=r.getUniformLocationNoThrow(o,"maxVal")),r.gl.uniform1f(n.minLoc,e),r.gl.uniform1f(n.maxLoc,t)}},e}(),Zo=function(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "},ei=function(e){this.outputShape=[],this.outputShape=rn(e,1),this.variableNames=e.map((function(e,t){return"T"+t}));var t=new Array(e.length-1);t[0]=e[0][1];for(var n=1;n<t.length;n++)t[n]=t[n-1]+e[n][1];var r=["if (yC < "+t[0]+") setOutput(getT0(yR, yC));"];for(n=1;n<t.length;n++){var o=t[n-1];r.push("else if (yC < "+t[n]+") setOutput(getT"+n+"(yR, yC-"+o+"));")}var i=t.length,a=t[t.length-1];r.push("else setOutput(getT"+i+"(yR, yC-"+a+"));"),this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int yR = coords.x;\n int yC = coords.y;\n\n "+r.join("\n ")+"\n }\n "},ti=function(e,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=rn(e,t);var n=this.outputShape,r=n.length,o=jo(r),i=xo("coords",r),a=["x","y","z","w","u","v"].slice(0,r);this.variableNames=e.map((function(e,t){return"T"+t}));var s=new Array(e.length-1);s[0]=e[0][t];for(var u=1;u<s.length;u++)s[u]=s[u-1]+e[u][t];var c=a[t],l=a.slice(-2),f=a.join(),d="if ("+c+" < "+s[0]+") {\n return getChannel(\n getT0("+f+"), vec2("+l.join()+"));\n }";for(u=1;u<s.length;u++){var p=s[u-1];d+="\n if ("+c+" < "+s[u]+" && "+c+" >= "+s[u-1]+") {\n return getChannel(\n getT"+u+"("+ni(a,c,p)+"),\n vec2("+ni(l,c,p)+"));\n }"}var h=s.length,v=s[s.length-1];d+="\n return getChannel(\n getT"+h+"("+ni(a,c,v)+"),\n vec2("+ni(l,c,v)+"));",this.userCode="\n float getValue("+a.map((function(e){return"int "+e}))+") {\n "+d+"\n }\n\n void main() {\n "+o+" coords = getOutputCoords();\n vec4 result = vec4(getValue("+i+"), 0., 0., 0.);\n\n "+i[r-1]+" = "+i[r-1]+" + 1;\n if ("+i[r-1]+" < "+n[r-1]+") {\n result.g = getValue("+i+");\n }\n\n "+i[r-2]+" = "+i[r-2]+" + 1;\n if ("+i[r-2]+" < "+n[r-2]+") {\n result.a = getValue("+i+");\n }\n\n "+i[r-1]+" = "+i[r-1]+" - 1;\n if ("+i[r-2]+" < "+n[r-2]+" &&\n "+i[r-1]+" < "+n[r-1]+") {\n result.b = getValue("+i+");\n }\n setOutput(result);\n }\n "};function ni(e,t,n){var r=e.indexOf(t);return e.map((function(e,t){return t===r?e+" - "+n:e})).join()}var ri=function(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,o=e.padInfo.left,i="channelsLast"===e.dataFormat;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < "+e.batchSize+"; b++) {\n for (int yR = 0; yR < "+e.outHeight+"; yR++) {\n int xR = wR + yR * "+t+" - "+r+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+e.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+o+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n if ("+i+") {\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n } else {\n float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n "},oi=function(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,i="channelsLast"===e.dataFormat,a=t-1-e.padInfo.top,s=n-1-e.padInfo.left,u=i?1:2,c=i?2:3,l=i?3:1;this.userCode="\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords["+l+"];\n\n ivec2 dyCorner = ivec2(coords["+u+"], coords["+c+"]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+t+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+t+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+e.outChannels+"; d2++) {\n\n if ("+i+") {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n "},ii=function(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,o=e.padInfo.front,i=e.padInfo.top,a=e.padInfo.left;this.userCode="\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < "+e.batchSize+"; b++) {\n for (int yF = 0; yF < "+e.outDepth+"; yF++) {\n int xF = wF + yF * "+t+" - "+o+";\n\n if (xF < 0 || xF >= "+e.inDepth+") {\n continue;\n }\n\n for (int yR = 0; yR < "+e.outHeight+"; yR++) {\n int xR = wR + yR * "+n+" - "+i+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+e.outWidth+"; yC++) {\n int xC = wC + yC * "+r+" - "+a+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},ai=function(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=t-1-e.padInfo.front,u=n-1-e.padInfo.top,c=r-1-e.padInfo.left;this.userCode="\n const ivec3 pads = ivec3("+s+", "+u+", "+c+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < "+t+"; wF++) {\n float dyF = float(dyFCorner + wF) / "+o+".0;\n\n if (dyF < 0.0 || dyF >= "+e.outDepth+".0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = "+t+" - 1 - wF;\n\n for (int wR = 0; wR < "+n+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+i+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+n+" - 1 - wR;\n\n for (int wC = 0; wC < "+r+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+a+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+r+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+e.outChannels+"; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},si=function(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,o=e.padInfo.left,i=e.outChannels/e.inChannels;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * "+i+" + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < "+e.batchSize+"; b++) {\n for (int yR = 0; yR < "+e.outHeight+"; yR++) {\n int xR = wR + yR * "+t+" - "+r+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+e.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+o+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},ui=function(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,o=e.strideWidth,i=t-1-e.padInfo.top,a=n-1-e.padInfo.left,s=e.outChannels/e.inChannels;this.userCode="\n const ivec2 pads = ivec2("+i+", "+a+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < "+t+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+t+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < "+s+"; dm++) {\n int d2 = d1 * "+s+" + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},ci=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.outputShape=e.outShape;var o=e.padInfo.top,i=e.padInfo.left,a=e.strideHeight,s=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,l=e.filterHeight,f=e.filterWidth,d=4*Math.floor(e.inChannels/4),p=e.inChannels%4,h="channelsLast"===e.dataFormat,v=h?1:2,m=h?2:3,g=h?3:1,y="",b="";n&&(y=r?"float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n "+n+"\n }":"\n float activation(float x) {\n "+n+"\n }\n ",b="result = activation(result);");var w=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+y+"\n\n const ivec2 strides = ivec2("+a+", "+s+");\n const ivec2 pads = ivec2("+o+", "+i+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords["+g+"];\n\n ivec2 xRCCorner =\n ivec2(coords["+v+"], coords["+m+"]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+l+"; wR++) {\n int xR = xRCorner + wR * "+u+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+f+"; wC++) {\n int xC = xCCorner + wC * "+c+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+d+"; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if ("+h+") {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if ("+(1===p)+") {\n\n if ("+h+") {\n dotProd +=\n getX(batch, xR, xC, "+d+") *\n getW(wR, wC, "+d+", d2);\n } else {\n dotProd +=\n getX(batch, "+d+", xR, xC) *\n getW(wR, wC, "+d+", d2);\n }\n\n } else if ("+(2===p)+") {\n vec2 wValues = vec2(\n getW(wR, wC, "+d+", d2),\n getW(wR, wC, "+d+" + 1, d2)\n );\n\n if ("+h+") {\n vec2 xValues = vec2(\n getX(batch, xR, xC, "+d+"),\n getX(batch, xR, xC, "+d+" + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, "+d+", xR, xC),\n getX(batch, "+d+" + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if ("+(3===p)+") {\n vec3 wValues = vec3(\n getW(wR, wC, "+d+", d2),\n getW(wR, wC, "+d+" + 1, d2),\n getW(wR, wC, "+d+" + 2, d2)\n );\n\n if ("+h+") {\n vec3 xValues = vec3(\n getX(batch, xR, xC, "+d+"),\n getX(batch, xR, xC, "+d+" + 1),\n getX(batch, xR, xC, "+d+" + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, "+d+", xR, xC),\n getX(batch, "+d+" + 1, xR, xC),\n getX(batch, "+d+" + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n "+w+"\n "+b+"\n setOutput(result);\n }\n "},li=function(e){this.variableNames=["x","W"],this.outputShape=e.outShape;var t=e.padInfo.front,n=e.padInfo.top,r=e.padInfo.left,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.filterDepth,f=e.filterHeight,d=e.filterWidth,p=4*Math.floor(e.inChannels/4),h=e.inChannels%4;this.userCode="\n const ivec3 strides = ivec3("+o+", "+i+", "+a+");\n const ivec3 pads = ivec3("+t+", "+n+", "+r+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < "+l+"; wF++) {\n int xF = xFCorner + wF * "+s+";\n\n if (xF < 0 || xF >= "+e.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+f+"; wR++) {\n int xR = xRCorner + wR * "+u+";\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+d+"; wC++) {\n int xC = xCCorner + wC * "+c+";\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+p+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===h)+") {\n dotProd +=\n getX(batch, xF, xR, xC, "+p+") *\n getW(wF, wR, wC, "+p+", d2);\n } else if ("+(2===h)+") {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, "+p+"),\n getX(batch, xF, xR, xC, "+p+" + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, "+p+", d2),\n getW(wF, wR, wC, "+p+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===h)+") {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, "+p+"),\n getX(batch, xF, xR, xC, "+p+" + 1),\n getX(batch, xF, xR, xC, "+p+" + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, "+p+", d2),\n getW(wF, wR, wC, "+p+" + 1, d2),\n getW(wF, wR, wC, "+p+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},fi=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.outputShape=e.outShape;var o=e.inHeight,i=e.inWidth,a=e.padInfo.top,s=e.padInfo.left,u=e.strideHeight,c=e.strideWidth,l=e.dilationHeight,f=e.dilationWidth,d=e.filterHeight,p=e.filterWidth,h=e.outChannels/e.inChannels,v="",m="";n&&(v=r?"float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n "+n+"\n }":"\n float activation(float x) {\n "+n+"\n }\n ",m="result = activation(result);");var g=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+v+"\n\n const ivec2 strides = ivec2("+u+", "+c+");\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / "+h+";\n int q = d2 - d1 * "+h+";\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < "+d+"; wR++) {\n int xR = xRCorner + wR * "+l+";\n\n if (xR < 0 || xR >= "+o+") {\n continue;\n }\n\n for (int wC = 0; wC < "+p+"; wC++) {\n int xC = xCCorner + wC * "+f+";\n\n if (xC < 0 || xC >= "+i+") {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n "+g+"\n "+m+"\n setOutput(result);\n }\n "},di=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=null),void 0===r&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e.outShape;for(var o=e.inHeight,i=e.inWidth,a=e.padInfo.top,s=e.padInfo.left,u=e.strideHeight,c=e.strideWidth,l=e.dilationHeight,f=e.dilationWidth,d=e.filterHeight,p=e.filterWidth,h=p,v="int xR; int xC; int xCOffset;",m=0;m<d;m++)for(var g=0;g<p;g++)v+="\n vec4 xTexelR"+m+"C"+2*g+" = vec4(0.);\n vec4 wR"+m+"C"+g+" = vec4(0.);\n vec4 xR"+m+"C"+g+" = vec4(0.);";for(m=0;m<d;m++)for(var y=0;y<h;y++){if(v+="\n xR = xRCorner + "+m*l+";\n xC = xCCorner + "+(g=2*y)*f+";\n ",1===c){if(g<p&&(v+=s%2==1?"\n xCOffset = xC + 1;\n if(xR >= 0 && xR < "+o+" && xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+m+"C"+g+" = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if(xCOffset + 1 >= "+i+") {\n xTexelR"+m+"C"+g+".zw = vec2(0.);\n }\n } else {\n xTexelR"+m+"C"+g+" = vec4(0.);\n }\n\n xCOffset = xC + 1 - 2;\n if(xR >= 0 && xR < "+o+" && xCOffset >= 0 && xCOffset < "+i+") {\n vec4 previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if(xCOffset + 1 >= "+i+") {\n previous.zw = vec2(0.);\n }\n\n xR"+m+"C"+g+" = vec4(previous.zw, xTexelR"+m+"C"+g+".xy);\n } else {\n xR"+m+"C"+g+" = vec4(0, 0, xTexelR"+m+"C"+g+".xy);\n }\n ":"\n if(xR >= 0 && xR < "+o+" && xC >= 0 && xC < "+i+") {\n xTexelR"+m+"C"+g+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+m+"C"+g+" = vec4(0.);\n }\n\n xR"+m+"C"+g+" = xTexelR"+m+"C"+g+";\n ",g+1<p)){var b=s%2==0?E(f):f;f%2==0&&s%2==1||f%2!=0&&s%2!=1?(v+="\n xCOffset = xC + "+s%2+" + "+b+";\n\n if(xR >= 0 && xR < "+o+" &&\n xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+m+"C"+(g+2)+" = getX(batch, xR, xCOffset, d1);\n }\n ",f>1&&(v+="\n xCOffset -= 2;\n if(xR >= 0 && xR < "+o+" &&\n xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+m+"C"+g+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+m+"C"+g+" = vec4(0.);\n }\n "),v+="\n xR"+m+"C"+(g+1)+" = vec4(\n xTexelR"+m+"C"+g+".zw, xTexelR"+m+"C"+(g+2)+".xy);\n "):v+="\n xCOffset = xC + "+b+";\n\n if(xR >= 0 && xR < "+o+" &&\n xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+m+"C"+(g+2)+" = getX(batch, xR, xCOffset, d1);\n }\n\n xR"+m+"C"+(g+1)+" = xTexelR"+m+"C"+(g+2)+";\n "}}else g<p&&(v+="\n if(xR >= 0 && xR < "+o+") {\n ",s%2==1?(v+="\n xCOffset = xC + 1 - "+c+";\n if(xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+m+"C"+g+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+m+"C"+g+" = vec4(0.);\n }\n\n if(xC + 1 >= 0 && xC + 1 < "+i+") {\n xTexelR"+m+"C"+(g+2)+" = getX(batch, xR, xC + 1, d1);\n } else {\n xTexelR"+m+"C"+(g+2)+" = vec4(0.);\n }\n\n xR"+m+"C"+g+" = vec4(\n xTexelR"+m+"C"+g+".zw, xTexelR"+m+"C"+(g+2)+".zw);\n ",g+1<p&&(v+="\n vec4 final = vec4(0.);\n xCOffset = xC + 1 + "+c+";\n if(xCOffset >= 0 && xCOffset < "+i+") {\n final = getX(batch, xR, xCOffset, d1);\n }\n xR"+m+"C"+(g+1)+" = vec4(xTexelR"+m+"C"+(g+2)+".xy, final.xy);\n ")):(v+="\n if(xC >= 0 && xC < "+i+") {\n xTexelR"+m+"C"+g+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+m+"C"+g+" = vec4(0.);\n }\n\n xCOffset = xC + "+c+";\n if(xCOffset >= 0 && xCOffset < "+i+") {\n xTexelR"+m+"C"+(g+2)+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+m+"C"+(g+2)+" = vec4(0.);\n }\n\n xR"+m+"C"+g+" = vec4(\n xTexelR"+m+"C"+g+".xy, xTexelR"+m+"C"+(g+2)+".xy);\n ",g+1<p&&(v+="\n xR"+m+"C"+(g+1)+" = vec4(\n xTexelR"+m+"C"+g+".zw, xTexelR"+m+"C"+(g+2)+".zw);\n ")),v+="}");g<p&&(v+="\n vec4 wTexelR"+m+"C"+g+" = getW("+m+", "+g+", d1, q);\n wR"+m+"C"+g+" = vec4(wTexelR"+m+"C"+g+".xz, wTexelR"+m+"C"+g+".xz);\n ",g+1<p&&(v+="\n vec4 wTexelR"+m+"C"+(g+1)+" = getW("+m+", "+(g+1)+", d1, q);\n wR"+m+"C"+(g+1)+" =\n vec4(wTexelR"+m+"C"+(g+1)+".xz, wTexelR"+m+"C"+(g+1)+".xz);"))}for(m=0;m<d;m++)for(g=0;g<p;g++)v+="dotProd += xR"+m+"C"+g+" * wR"+m+"C"+g+";";var w="",x="";n&&(w=r?"vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n "+n+"\n }":"vec4 activation(vec4 x) {\n "+n+"\n }",x="result = activation(result);");var C=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+w+"\n\n const ivec2 strides = ivec2("+u+", "+c+");\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2;\n int q = 0;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n vec4 dotProd = vec4(0.);\n\n "+v+"\n\n vec4 result = dotProd;\n "+C+"\n "+x+"\n setOutput(result);\n }\n "},pi=function(e,t,n,r,o){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var i=e[0],a=e[1],s=e[2],u=e[3],c=t[0],l=n[0],f=n[1];this.outputShape=[c,l,f,u];var d="bilinear"===r?1:0,p=[a-1+".0",s-1+".0"],h=p[0],v=p[1],m=l>1?[""+(a-1)/(l-1),"(y2-y1) * height_ratio","y1*"+h+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+h],g=m[0],y=m[1],b=m[2],w=f>1?[""+(s-1)/(f-1),"(x2-x1) * width_ratio","x1*"+v+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+v],x=w[0],E=w[1],C=w[2];this.userCode="\n const float height_ratio = float("+g+");\n const float width_ratio = float("+x+");\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= "+i+") {\n return;\n }\n\n float height_scale = "+y+";\n float width_scale = "+E+";\n\n float in_y = "+b+";\n if( in_y < 0.0 || in_y > "+h+" ) {\n setOutput(float("+o+"));\n return;\n }\n float in_x = "+C+";\n if( in_x < 0.0 || in_x > "+v+" ) {\n setOutput(float("+o+"));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if("+d+" == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n "},hi=function(e,t,n){this.variableNames=["x"],this.outputShape=e;var r=e.length,o=e[e.length-1],i=n?"<":">";this.userCode="\n int getIndex(int i) {\n "+(n?"return "+o+" -i - 1;":"return i;")+"\n }\n\n void main() {\n "+jo(r)+" coords = getOutputCoords();\n int end = "+vi(r,"coords")+";\n float val = 0.0;\n for (int i = "+o+" - 1; i >= 0; i -= 1) {\n int idx = getIndex(i);\n if (idx "+i+" end) {\n continue;\n }\n if (idx == end && "+t+") {\n continue;\n }\n "+vi(r,"coords")+" = idx;\n val += getX("+function(e,t){if(1===e)return""+t;if(2===e)return t+".x, "+t+".y";if(3===e)return t+".x, "+t+".y, "+t+".z";if(4===e)return t+".x, "+t+".y, "+t+".z, "+t+".w";throw Error("Cumulative sum for rank "+e+" is not yet supported")}(r,"coords")+");\n }\n setOutput(val);\n }\n "};function vi(e,t){if(1===e)return""+t;if(2===e)return t+".y";if(3===e)return t+".z";if(4===e)return t+".w";throw Error("Cumulative sum for rank "+e+" is not yet supported")}var mi=function(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=Le.DENSE;var t=qe(e),n=Eo();this.outputShape=e,this.userCode="\n ivec3 outCoordsFromFlatIndex(int index) {\n "+Co(["r","c","d"],e)+"\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = 4 * (resTexRC.x * "+t[1]+" + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n "+n.output+" = result;\n }\n "},gi=function(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=Le.DENSE;var t=qe(e),n=Eo();this.outputShape=e,this.userCode="\n ivec3 outCoordsFromFlatIndex(int index) {\n "+Co(["r","c","d"],e)+"\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+t[0]+", "+t[1]+"));\n int index = 4 * (resTexRC.x * "+t[1]+" + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n "+n.output+" = result;\n }\n "},yi=function(){function e(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = "+this.getHeightCoordString()+";\n int w = "+this.getWidthCoordString()+";\n int d = "+this.getDepthCoordString()+";\n\n int in_h = h / "+t+";\n int offset_h = imod(h, "+t+");\n int in_w = w / "+t+";\n int offset_w = imod(w, "+t+");\n int offset_d = (offset_h * "+t+" + offset_w) *\n "+this.getOutputDepthSize()+";\n int in_d = d + offset_d;\n\n float result = "+this.getInputSamplingString()+";\n setOutput(result);\n }\n "}return e.prototype.getHeightCoordString=function(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"},e.prototype.getWidthCoordString=function(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"},e.prototype.getDepthCoordString=function(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"},e.prototype.getOutputDepthSize=function(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]},e.prototype.getInputSamplingString=function(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},e}(),bi=function(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n "},wi=function(e){this.variableNames=["A"],this.outTexUsage=Be.DOWNLOAD;var t=Eo();this.outputShape=e,this.userCode="\n "+Oo+"\n\n void main() {\n float x = getAAtOutCoords();\n "+t.output+" = encode_float(x);\n }\n "},xi=function(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Be.DOWNLOAD;var t=Eo();this.outputShape=e,this.userCode="\n "+Oo+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n "+t.output+" = encode_float(x);\n }\n "},Ei=function(e,t,n){void 0===n&&(n=!1),this.variableNames=["A"];var r=Eo(),o=t[0],i=t[1];this.outputShape=e;var a="result";n&&(a="floor(result * 255. + 0.5)"),this.userCode="\n "+ko(e)+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n int flatIndex = getFlatIndex(coords);\n int offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n \n int r = flatIndex / "+i+";\n int c = imod(flatIndex, "+i+");\n vec2 uv = (vec2(c, r) + halfCR) / vec2("+i+".0, "+o+".0);\n vec4 values = "+r.texture2D+"(A, uv);\n\n float result;\n\n if(offset == 0) {\n result = values[0];\n } else if(offset == 1) {\n result = values[1];\n } else if(offset == 2) {\n result = values[2];\n } else {\n result = values[3];\n }\n\n "+r.output+" = vec4("+a+", 0., 0., 0.);\n }\n "},Ci=function(e,t,n){void 0===n&&(n=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=Eo(),o=t[0],i=t[1];this.outputShape=e;var a="",s="result";n&&(s="floor(result * 255. + 0.5)");for(var u=0;u<=1;u++)for(var c=0;c<=1;c++){var l=2*u+c;a+="\n localCoords = coords;\n if(localCoords[2] + "+c+" < "+e[2]+") {\n localCoords[2] += "+c+";\n if(localCoords[1] + "+u+" < "+e[1]+") {\n localCoords[1] += "+u+";\n\n flatIndex = getFlatIndex(localCoords);\n offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n r = flatIndex / "+i+";\n c = imod(flatIndex, "+i+");\n uv = (vec2(c, r) + halfCR) / vec2("+i+".0, "+o+".0);\n values = "+r.texture2D+"(A, uv);\n\n if(offset == 0) {\n result["+l+"] = values[0];\n } else if(offset == 1) {\n result["+l+"] = values[1];\n } else if(offset == 2) {\n result["+l+"] = values[2];\n } else {\n result["+l+"] = values[3];\n }\n }\n }\n "}this.userCode="\n "+ko(e)+"\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n vec4 result = vec4(0.);\n int flatIndex, r, c, offset;\n ivec3 localCoords;\n vec2 uv;\n vec4 values;\n\n "+a+"\n\n "+r.output+" = "+s+";\n }\n "},ki=function(e,t,n){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t;var o=n?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,i=n?r+".0":"1.0";this.userCode="\n const float exponentMultiplier = "+o+";\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n "+e+"\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float("+r+");\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < "+r+"; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / "+i+";\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n "},Oi=function(){function e(e,t){this.outputShape=[],this.variableNames=["x"],this.outputShape=e,this.userCode="\n uniform float value;\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;return function(n,r){null==t.valueLoc&&(t.valueLoc=n.getUniformLocationNoThrow(r,"value")),n.gl.uniform1f(t.valueLoc,e)}},e}(),Si=function(e,t,n){this.variableNames=["A","indices"];var r=e.slice();r[n]=t,this.outputShape=r,this.rank=r.length;var o=jo(this.rank),i=function(e,t){var n=e.length;if(n>4)throw Error("Gather for rank "+n+" is not yet supported");if(1===n)return"int(getIndices(resRC))";for(var r=["resRC.x","resRC.y","resRC.z","resRC.w"],o=[],i=0;i<e.length;i++)i===t?o.push("int(getIndices("+r[i]+"))"):o.push(""+r[i]);return o.join()}(e,n);this.userCode="\n void main() {\n "+o+" resRC = getOutputCoords();\n setOutput(getA("+i+"));\n }\n "},_i=function(e,t,n){this.sliceDim=e,this.strides=t,this.variableNames=["x","indices"],this.outputShape=n;var r=jo(t.length),o=jo(n.length),i=this.sliceDim>1?"strides[j]":"strides";this.userCode="\n "+r+" strides = "+r+"("+this.strides+");\n void main() {\n "+o+" coords = getOutputCoords();\n int flattenIndex = 0;\n for (int j = 0; j < "+this.sliceDim+"; j++) {\n int index = round(getIndices(coords[0], j));\n flattenIndex += index * "+i+";\n }\n setOutput(getX(flattenIndex, coords[1]));\n }\n "};function Ti(e,t){var n=Eo();return Ze(e,t,n.version+"\n precision highp float;\n "+n.attribute+" vec3 clipSpacePos;\n "+n.attribute+" vec2 uv;\n "+n.varyingVs+" vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }")}function Ii(e,t){return st(e,t,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Pi(e,t){return ut(e,t,new Uint16Array([0,1,2,2,1,3]))}function Ai(e,t,n,r,o,i,a){lt(n,r);var s=ct(e,t),u=e.TEXTURE_2D;return Xe(e,t,(function(){return e.bindTexture(u,s)})),Xe(e,t,(function(){return e.texParameteri(u,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE)})),Xe(e,t,(function(){return e.texParameteri(u,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)})),Xe(e,t,(function(){return e.texParameteri(u,e.TEXTURE_MIN_FILTER,e.NEAREST)})),Xe(e,t,(function(){return e.texParameteri(u,e.TEXTURE_MAG_FILTER,e.NEAREST)})),Xe(e,t,(function(){return e.texImage2D(u,0,o,n,r,0,i,a,null)})),Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)})),s}function Ri(e,t,n,r,o){var i=$e(n,r);return Ai(e,t,i[0],i[1],o.internalFormatFloat,o.textureFormatFloat,e.FLOAT)}function Ni(e,t,n,r,o){var i=$e(n,r);return Ai(e,t,i[0],i[1],o.internalFormatHalfFloat,o.textureFormatFloat,o.textureTypeHalfFloat)}function Mi(e,t,n,r,o){var i=$e(n,r);return Ai(e,t,i[0],i[1],e.RGBA,e.RGBA,e.UNSIGNED_BYTE)}function ji(e,t,n,r,o){var i=Ke(n,r);return Ai(e,t,i[0],i[1],o.internalFormatPackedFloat,e.RGBA,e.FLOAT)}function Di(e,t,n,r,o){var i=Ke(n,r);return Ai(e,t,i[0],i[1],o.internalFormatPackedHalfFloat,e.RGBA,o.textureTypeHalfFloat)}function Fi(e,t,n,r){return Xe(e,t,(function(){return e.bindBuffer(e.ARRAY_BUFFER,r)})),dt(e,t,n,"clipSpacePos",r,3,20,0)&&dt(e,t,n,"uv",r,2,20,12)}function Li(e,t,n,r,o,i,a){var s,u,c;Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,n)})),i instanceof Uint8Array?(s=new Uint8Array(r*o*4),u=e.UNSIGNED_BYTE,c=e.RGBA):(s=new Float32Array(r*o*4),u=e.FLOAT,c=a.internalFormatPackedFloat),s.set(i),Xe(e,t,(function(){return e.texImage2D(e.TEXTURE_2D,0,c,r,o,0,e.RGBA,u,s)})),Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)}))}function Bi(e,t,n,r){Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,n)})),r.data instanceof Uint8Array?Xe(e,t,(function(){return e.texImage2D(e.TEXTURE_2D,0,e.RGBA,r.width,r.height,0,e.RGBA,e.UNSIGNED_BYTE,r.data)})):Xe(e,t,(function(){return e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r)})),Xe(e,t,(function(){return e.bindTexture(e.TEXTURE_2D,null)}))}function Ui(e,t,n,r,o){var i=e.createBuffer();Xe(e,t,(function(){return e.bindBuffer(e.PIXEL_PACK_BUFFER,i)}));var a=16*n*r;return Xe(e,t,(function(){return e.bufferData(e.PIXEL_PACK_BUFFER,a,e.STREAM_READ)})),Xe(e,t,(function(){return e.readPixels(0,0,r,n,e.RGBA,e.FLOAT,0)})),Xe(e,t,(function(){return e.bindBuffer(e.PIXEL_PACK_BUFFER,null)})),i}function zi(e,t,n){var r=e,o=new Float32Array(n);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,o),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),o}function Vi(e,t,n,r,o){var i=$e(n,r),a=i[0],s=i[1],u=new Uint8Array(n*r*4);return Xe(e,t,(function(){return e.readPixels(0,0,a,s,o.downloadTextureFormat,e.UNSIGNED_BYTE,u)})),new Float32Array(u.buffer)}function Wi(e,t,n,r,o,i,a,s){var u=e,c=new Float32Array(function(e,t){var n=Ke(e,t);return n[0]*n[1]*4}(i,a));return u.bindBuffer(u.PIXEL_PACK_BUFFER,t),u.getBufferSubData(u.PIXEL_PACK_BUFFER,0,c),u.bindBuffer(u.PIXEL_PACK_BUFFER,null),c}function Hi(e,t,n,r){var o=new Float32Array(n*r*4);return Xe(e,t,(function(){return e.readPixels(0,0,r,n,e.RGBA,e.FLOAT,o)})),o}var $i=Object.freeze({createVertexShader:Ti,createVertexBuffer:Ii,createIndexBuffer:Pi,createFloat32MatrixTexture:Ri,createFloat16MatrixTexture:Ni,createUnsignedBytesMatrixTexture:Mi,createPackedMatrixTexture:ji,createFloat16PackedMatrixTexture:Di,bindVertexProgramAttributeStreams:Fi,uploadDenseMatrixToTexture:Li,uploadPixelDataToTexture:Bi,createBufferFromOutputTexture:Ui,downloadFloat32MatrixFromBuffer:zi,downloadByteEncodedFloatMatrixFromOutputTexture:Vi,downloadPackedMatrixFromBuffer:Wi,downloadMatrixFromPackedOutputTexture:Hi}),qi=function(){function e(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var t=f().getNumber("WEBGL_VERSION");null!=e?(this.gl=e,We(t,e)):this.gl=He(t);var n="WEBGL_color_buffer_float";if(1===f().getNumber("WEBGL_VERSION")){if(this.textureFloatExtension=Qe(this.gl,this.debug,"OES_texture_float"),Rt(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=Qe(this.gl,this.debug,"OES_texture_half_float");else if(f().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(n),Rt(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=Qe(this.gl,this.debug,"EXT_color_buffer_half_float");else if(f().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(n="EXT_color_buffer_float",Rt(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else{if(!Rt(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=Ii(this.gl,this.debug),this.indexBuffer=Pi(this.gl,this.debug),this.framebuffer=ft(this.gl,this.debug),this.textureConfig=Ge(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(e.prototype,"debug",{get:function(){return f().getBool("DEBUG")},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){var e=this;if(!this.disposed){null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var t=this.gl;Xe(t,this.debug,(function(){return t.finish()})),Xe(t,this.debug,(function(){return t.bindFramebuffer(t.FRAMEBUFFER,null)})),Xe(t,this.debug,(function(){return t.deleteFramebuffer(e.framebuffer)})),Xe(t,this.debug,(function(){return t.bindBuffer(t.ARRAY_BUFFER,null)})),Xe(t,this.debug,(function(){return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)})),Xe(t,this.debug,(function(){return t.deleteBuffer(e.indexBuffer)})),this.disposed=!0}},e.prototype.createFloat32MatrixTexture=function(e,t){return this.throwIfDisposed(),Ri(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.createFloat16MatrixTexture=function(e,t){return this.throwIfDisposed(),Ni(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.createUnsignedBytesMatrixTexture=function(e,t){return this.throwIfDisposed(),Mi(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.uploadPixelDataToTexture=function(e,t){this.throwIfDisposed(),Bi(this.gl,this.debug,e,t)},e.prototype.uploadDenseMatrixToTexture=function(e,t,n,r){this.throwIfDisposed(),Li(this.gl,this.debug,e,t,n,r,this.textureConfig)},e.prototype.createFloat16PackedMatrixTexture=function(e,t){return this.throwIfDisposed(),Di(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.createPackedMatrixTexture=function(e,t){return this.throwIfDisposed(),ji(this.gl,this.debug,e,t,this.textureConfig)},e.prototype.deleteMatrixTexture=function(e){var t=this;this.throwIfDisposed(),this.outputTexture===e&&(yt(this.gl,this.debug,this.framebuffer),this.outputTexture=null),Xe(this.gl,this.debug,(function(){return t.gl.deleteTexture(e)}))},e.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(e,t,n){var r=this;return this.downloadMatrixDriver(e,(function(){return Vi(r.gl,r.debug,t,n,r.textureConfig)}))},e.prototype.downloadPackedMatrixFromBuffer=function(e,t,n,r,o,i){return Wi(this.gl,e,0,0,0,o,i,this.textureConfig)},e.prototype.downloadFloat32MatrixFromBuffer=function(e,t){return zi(this.gl,e,t)},e.prototype.createBufferFromTexture=function(e,t,n){this.bindTextureToFrameBuffer(e);var r=Ui(this.gl,this.debug,t,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),r},e.prototype.createAndWaitForFence=function(){var e=this.createFence(this.gl);return this.pollFence(e)},e.prototype.createFence=function(e){var t,n,r=this;if(f().getBool("WEBGL_FENCE_API_ENABLED")){var o=e,i=o.fenceSync(o.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=function(){var e=o.clientWaitSync(i,0,0);return e===o.ALREADY_SIGNALED||e===o.CONDITION_SATISFIED},t=i}else f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(t=this.beginQuery(),this.endQuery(),n=function(){return r.isQueryAvailable(t,f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):n=function(){return!0};return{query:t,isFencePassed:n}},e.prototype.downloadMatrixFromPackedTexture=function(e,t,n){var r=this;return this.downloadMatrixDriver(e,(function(){return Hi(r.gl,r.debug,t,n)}))},e.prototype.createProgram=function(e){this.throwIfDisposed();var t=this.gl,n=et(t,this.debug,e),r=Ti(t,this.debug),o=ot(t,this.debug);return Xe(t,this.debug,(function(){return t.attachShader(o,r)})),Xe(t,this.debug,(function(){return t.attachShader(o,n)})),it(t,this.debug,o),this.debug&&at(t,this.debug,o),this.vertexAttrsAreBound||(this.setProgram(o),this.vertexAttrsAreBound=Fi(t,this.debug,this.program,this.vertexBuffer)),o},e.prototype.deleteProgram=function(e){var t=this;this.throwIfDisposed(),e===this.program&&(this.program=null),null!=e&&Xe(this.gl,this.debug,(function(){return t.gl.deleteProgram(e)}))},e.prototype.setProgram=function(e){var t=this;this.throwIfDisposed(),this.program=e,null!=this.program&&this.debug&&at(this.gl,this.debug,this.program),Xe(this.gl,this.debug,(function(){return t.gl.useProgram(e)}))},e.prototype.getUniformLocation=function(e,t,n){return void 0===n&&(n=!0),this.throwIfDisposed(),n?ht(this.gl,this.debug,e,t):vt(this.gl,e,t)},e.prototype.getAttributeLocation=function(e,t){var n=this;return this.throwIfDisposed(),Xe(this.gl,this.debug,(function(){return n.gl.getAttribLocation(e,t)}))},e.prototype.getUniformLocationNoThrow=function(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)},e.prototype.setInputMatrixTexture=function(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),mt(this.gl,this.debug,this.program,e,t,n)},e.prototype.setOutputMatrixTexture=function(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)},e.prototype.setOutputPackedMatrixTexture=function(e,t,n){this.throwIfDisposed();var r=Ke(t,n),o=r[0],i=r[1];this.setOutputMatrixTextureDriver(e,o,i)},e.prototype.setOutputMatrixWriteRegion=function(e,t,n,r){this.setOutputMatrixWriteRegionDriver(n,e,r,t)},e.prototype.setOutputPackedMatrixWriteRegion=function(e,t,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},e.prototype.debugValidate=function(){null!=this.program&&at(this.gl,this.debug,this.program),bt(this.gl)},e.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var e=this.gl;this.debug&&this.debugValidate(),Xe(e,this.debug,(function(){return e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}))},e.prototype.blockUntilAllProgramsCompleted=function(){var e=this;this.throwIfDisposed(),Xe(this.gl,this.debug,(function(){return e.gl.finish()}))},e.prototype.getQueryTimerExtension=function(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=Qe(this.gl,this.debug,2===f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},e.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},e.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},e.prototype.beginQuery=function(){if(2===f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var e=this.gl,t=this.getQueryTimerExtensionWebGL2(),n=e.createQuery();return e.beginQuery(t.TIME_ELAPSED_EXT,n),n}var r=this.getQueryTimerExtensionWebGL1(),o=r.createQueryEXT();return r.beginQueryEXT(r.TIME_ELAPSED_EXT,o),o},e.prototype.endQuery=function(){if(2!==f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}else{var t=this.gl,n=this.getQueryTimerExtensionWebGL2();t.endQuery(n.TIME_ELAPSED_EXT)}},e.prototype.waitForQueryAndGetTime=function(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,M((function(){return t.disposed||t.isQueryAvailable(e,f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}))];case 1:return n.sent(),[2,this.getQueryTime(e,f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}}))}))},e.prototype.getQueryTime=function(e,t){if(0===t)return null;if(2===t){var n=this.gl;return n.getQueryParameter(e,n.QUERY_RESULT)/1e6}var r=this.getQueryTimerExtensionWebGL1();return r.getQueryObjectEXT(e,r.QUERY_RESULT_EXT)/1e6},e.prototype.isQueryAvailable=function(e,t){if(0===t)return!0;if(2===t){var n=this.gl,r=this.getQueryTimerExtensionWebGL2(),o=n.getQueryParameter(e,n.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),o&&!this.disjoint}return o=(r=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(e,r.QUERY_RESULT_AVAILABLE_EXT),null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),o&&!this.disjoint},e.prototype.pollFence=function(e){var t=this;return new Promise((function(n){t.addItemToPoll((function(){return e.isFencePassed()}),(function(){return n()}))}))},e.prototype.pollItems=function(){for(var e=function(e){for(var t=0;t<e.length&&e[t]();++t);return t-1}(this.itemsToPoll.map((function(e){return e.isDoneFn}))),t=0;t<=e;++t)(0,this.itemsToPoll[t].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(e+1)},e.prototype.addItemToPoll=function(e,t){var n=this;this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),this.itemsToPoll.length>1||M((function(){return n.pollItems(),0===n.itemsToPoll.length}))},e.prototype.bindTextureToFrameBuffer=function(e){this.throwIfDisposed(),gt(this.gl,this.debug,e,this.framebuffer),this.debug&&bt(this.gl)},e.prototype.unbindTextureToFrameBuffer=function(){null!=this.outputTexture?(gt(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&bt(this.gl)):yt(this.gl,this.debug,this.framebuffer)},e.prototype.downloadMatrixDriver=function(e,t){this.bindTextureToFrameBuffer(e);var n=t();return this.unbindTextureToFrameBuffer(),n},e.prototype.setOutputMatrixTextureDriver=function(e,t,n){this.throwIfDisposed();var r=this.gl;gt(r,this.debug,e,this.framebuffer),this.debug&&bt(r),this.outputTexture=e,Xe(r,this.debug,(function(){return r.viewport(0,0,t,n)})),Xe(r,this.debug,(function(){return r.scissor(0,0,t,n)}))},e.prototype.setOutputMatrixWriteRegionDriver=function(e,t,n,r){var o=this;this.throwIfDisposed(),Xe(this.gl,this.debug,(function(){return o.gl.scissor(e,t,n,r)}))},e.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},e.prototype.throwIfNoProgram=function(){if(null==this.program)throw new Error("No GPU program is currently set.")},e}();function Ki(e,t){if(e.length!==t.length)throw Error("Binary was compiled with "+e.length+" inputs, but was executed with "+t.length+" inputs");e.forEach((function(e,n){var r=e.logicalShape,o=t[n],i=o.shape;if(!I(r,i))throw Error("Binary was compiled with different shapes than the current args. Shapes "+r+" and "+i+" must match");if(!e.isUniform||!o.isUniform){var a=e.texShape,s=o.isUniform?null:o.texData.texShape;if(!I(a,s))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+a+" and "+s+" must match")}}))}var Gi=function(e,t,n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e;for(var r=n.filterWidth,o=n.inChannels,i=n.strideWidth,a=n.strideHeight,s=n.padInfo,u=n.outWidth,c=n.dilationWidth,l=n.dilationHeight,f=n.dataFormat,d=s.left,p=s.top,h=o*r,v=Eo(),m="channelsLast"===f,g=m?0:1,y=m?1:2,b="",w=0;w<=1;w++)for(var x=0;x<=1;x++)b+="\n blockIndex = rc.y + "+x+";\n pos = rc.x + "+w+";\n\n if(blockIndex < "+e[1]+" && pos < "+e[0]+") {\n offsetY = int(blockIndex / ("+u+")) * "+a+" - "+p+";\n d0 = offsetY + "+l+" * (pos / "+h+");\n\n if(d0 < "+t[g]+" && d0 >= 0) {\n\n offsetX = int(mod(float(blockIndex), "+u+".) * "+i+". - "+d+".);\n d1 = offsetX + "+c+" * (int(mod(float(pos), "+h+".) / "+o+".));\n\n if(d1 < "+t[y]+" && d1 >= 0) {\n\n ch = int(mod(float(pos), "+o+".));\n\n if ("+m+") {\n innerDims = vec2(d1, ch);\n result["+(2*w+x)+"] = getChannel(\n getA(d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result["+(2*w+x)+"] = getChannel(\n getA(ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n ";this.userCode="\n void main() {\n ivec2 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n "+b+"\n\n "+v.output+" = result;\n }\n "},Xi=function(e,t,n,r,o){this.variableNames=["x"],this.outputShape=[];var i,a=t,s=e[3]-1;this.outputShape=e;var u="float("+n+") + float("+r+") * sum";i=.5===o?"inversesqrt("+u+")":1===o?"1.0/("+u+")":"exp(log("+u+") * float(-"+o+"));",this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -"+a+"; j <= "+a+"; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= "+s+") {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * "+i+";\n setOutput(val);\n }\n "},Yi=function(e,t,n,r,o){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=r,this.beta=o,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < "+this.depth+"; ++d) {\n int depthBegin = int(max(0.0, float(d - "+t+")));\n int depthEnd = int(min(float("+this.depth+"),\n float(d + "+t+" + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = "+this.depth+";\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float("+r+") * norm + float("+n+");\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float("+r+")\n * float("+o+")\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * "+o+");\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n "},Ji=function(e,t,n,r,o){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var i,a=t,s=e[3]-1;this.outputShape=e;var u="float("+n+") + float("+r+") * sum";i=.5===o?"inversesqrt("+u+")":1===o?"1.0/("+u+")":"exp(log("+u+") * float(-"+o+"));",this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < "+this.outputShape[3]+";\n bool hasNextRow = c < "+this.outputShape[2]+";\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - "+a+";\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - "+a+"; j <= "+a+"; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2("+s+"));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * "+i+";\n setOutput(result);\n }\n "},Qi=function(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;var t=e.strideHeight,n=e.strideWidth,r=e.dilationHeight,o=e.effectiveFilterHeight,i=e.effectiveFilterWidth,a=o-1-e.padInfo.top,s=i-1-e.padInfo.left,u=o*i-1;this.userCode="\n const ivec2 pads = ivec2("+a+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+o+";\n wR += "+r+") {\n float dyR = float(dyRCorner + wR) / "+t+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+i+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+n+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = "+u+" - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * "+i+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n "},Zi=function(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;var t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,o=e.dilationDepth,i=e.dilationHeight,a=e.dilationWidth,s=e.effectiveFilterDepth,u=e.effectiveFilterHeight,c=e.effectiveFilterWidth,l=s-1-e.padInfo.front,f=u-1-e.padInfo.top,d=c-1-e.padInfo.left,p=s*u*c-1;this.userCode="\n const ivec3 pads = ivec3("+l+", "+f+", "+d+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < "+s+";\n wD += "+o+") {\n float dyD = float(dyDCorner + wD) / "+t+".0;\n\n if (dyD < 0.0 || dyD >= "+e.outDepth+".0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < "+u+";\n wR += "+i+") {\n float dyR = float(dyRCorner + wR) / "+n+".0;\n\n if (dyR < 0.0 || dyR >= "+e.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+c+";\n wC += "+a+") {\n float dyC = float(dyCCorner + wC) / "+r+".0;\n\n if (dyC < 0.0 || dyC >= "+e.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = "+p+" -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * "+u+" * "+c+" +\n wR * "+c+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n "},ea=function(e,t,n,r,o,i,a){void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===i&&(i=null),void 0===a&&(a=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;var s=n?e[1]:e[2],u=Math.ceil(s/2),c=n?"i * 2, rc.y":"rc.y, i * 2",l=r?"rc.z, i * 2":"i * 2, rc.z",f=n?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],d=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],p="",h="";i&&(p=a?"vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n "+i+"\n }":"vec4 activation(vec4 x) {\n "+i+"\n }",h="result = activation(result);");var v=o?"result += getBiasAtOutCoords();":"";o&&this.variableNames.push("bias"),a&&this.variableNames.push("preluActivationWeights"),this.userCode="\n "+p+"\n\n const float sharedDimension = "+u+".0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < "+u+"; i++) {\n vec4 a = getMatrixA(rc.x, "+c+");\n vec4 b = getMatrixB(rc.x, "+l+");\n\n // These swizzled products need to be separately added.\n // See: https://github.com/tensorflow/tfjs/issues/1735\n result += ("+f[0]+" * "+d[0]+");\n result += ("+f[1]+" * "+d[1]+");\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n "+v+"\n\n "+h+"\n\n setOutput(result);\n }\n "},ta=function(){function e(e,t,n){this.variableNames=["probs"],this.outputShape=[e,n],this.userCode="\n uniform float seed;\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < "+(t-1)+"; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float("+(t-1)+"));\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;return function(n,r){null==t.seedLoc&&(t.seedLoc=n.getUniformLocation(r,"seed")),n.gl.uniform1f(t.seedLoc,e)}},e}(),na=function(e,t,n,r){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float("+r+"), float("+n+"),\n float(index == coords.y)));\n }\n "},ra=function(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=e;var t=e.length;if(0===t)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{var n=xo("rc",t),r=jo(t),o=function(e,t,n){if(1===e)return"rc > "+t[0];for(var r="",o=e-2;o<e;o++)r+=n[o]+" >= "+t[o],o<e-1&&(r+="||");return r}(t,e,n),i=function(e,t,n,r){if(1===e)return"";var o=r.slice(-2);return"\n int r = "+o[0]+";\n int c = "+o[1]+";\n int rp1 = r + 1;\n int cp1 = c + 1;\n\n bool cEdge = cp1 >= "+t+";\n bool rEdge = rp1 >= "+n+";\n "}(t,e[e.length-1],e[e.length-2],n),a=function(e,t){var n=e.length,r=function(e,t){for(var n=[],r=0;r<=1;r++)for(var o=0;o<=1;o++){for(var i=(0===r?"r":"rp1")+", "+(0===o?"c":"cp1"),a=2;a<e;a++)i=t[t.length-1-a]+","+i;n.push(i)}return n}(n,t);return 1===n?"getA(rc),\n rc + 1 >= "+e[0]+" ? 0. : getA(rc + 1),\n 0, 0":"getA("+r[0]+"),\n cEdge ? 0. : getA("+r[1]+"),\n rEdge ? 0. : getA("+r[2]+"),\n rEdge || cEdge ? 0. : getA("+r[3]+")"}(e,n);this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n\n if("+o+") {\n setOutput(vec4(0));\n } else {\n "+i+"\n\n setOutput(vec4("+a+"));\n }\n }\n "}},oa=function(e,t,n){this.variableNames=["x"],this.outputShape=t.map((function(t,n){return t[0]+e[n]+t[1]}));var r=e.length,o=jo(r),i=t.map((function(e){return e[0]})).join(","),a=t.map((function(t,n){return t[0]+e[n]})).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?"\n "+o+" start = "+o+"("+i+");\n "+o+" end = "+o+"("+a+");\n\n void main() {\n "+o+" outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(float("+n+"));\n } else {\n "+o+" coords = outC - start;\n setOutput(getX("+s+"));\n }\n }\n ":"\n int start = "+i+";\n int end = "+a+";\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(float("+n+"));\n } else {\n setOutput(getX(outC - start));\n }\n }\n "},ia=function(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map((function(t,n){return t[0]+e[n]+t[1]}));for(var r=e.length,o=jo(r),i=t.map((function(e){return e[0]})).join(","),a=t.map((function(t,n){return t[0]+e[n]})).join(","),s=xo("rc",r),u=xo("source",r),c=s[r-1]+" < "+this.outputShape[r-1],l=1===r?"source":"vec2("+u.slice(-2).join()+")",f=[o+" rc = outputLoc;",s[r-1]+" += 1;\n if("+c+") {\n ",1===r?"":"}\n rc = outputLoc;\n "+s[r-2]+" += 1;\n if("+s[r-2]+" < "+this.outputShape[r-2]+") {",1===r?"":" "+s[r-1]+" += 1;\n if("+c+") {"],d=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",p="",h=0,v=1===r?2:4;h<v;h++)p+="\n "+f[h]+"\n if ("+d+") {\n result["+h+"] = float("+n+");\n } else {\n "+o+" source = rc - start;\n result["+h+"] = getChannel(getX("+u.join()+"), "+l+");\n }\n ";p+=1===r?"} ":"}}",this.userCode="\n const "+o+" start = "+o+"("+i+");\n const "+o+" end = "+o+"("+a+");\n\n void main() {\n "+o+" outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n "+p+"\n setOutput(result);\n }\n "},aa=function(e,t,n){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");var r=e.filterWidth,o=e.strideHeight,i=e.strideWidth,a=e.dilationHeight,s=e.dilationWidth,u=e.effectiveFilterHeight,c=e.effectiveFilterWidth,l=e.padInfo.top,f=e.padInfo.left;this.outputShape=e.outShape;var d="avg"===t,p="0.0";if(d||(p="-1.0 / 1e-20"),n)this.userCode="\n const ivec2 strides = ivec2("+o+", "+i+");\n const ivec2 pads = ivec2("+l+", "+f+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < "+u+";\n wR += "+a+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+c+";\n wC += "+s+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = wR * "+c+" + wC;\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var h=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===t&&(h="avgValue / count");var v=4*Math.floor(r/4),m=r%4,g="\n if ("+d+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec2 strides = ivec2("+o+", "+i+");\n const ivec2 pads = ivec2("+l+", "+f+");\n const float initializationValue = "+p+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= "+e.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4("+p+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < "+u+";\n wR += "+a+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+v+"; wC += 4) {\n int xC = xCCorner + wC * "+s+";\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n getValue(batch, xR, xC + 3 * "+s+", d)\n );\n\n "+g+"\n }\n\n int xC = xCCorner + "+v+";\n if ("+(1===m)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+g+"\n } else if ("+(2===m)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n initializationValue,\n initializationValue\n );\n\n "+g+"\n } else if ("+(3===m)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n initializationValue\n );\n\n "+g+"\n }\n }\n setOutput("+h+");\n }\n "}},sa=function(e,t,n){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");var r=e.filterWidth,o=e.strideDepth,i=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterDepth,f=e.effectiveFilterHeight,d=e.effectiveFilterWidth,p=e.padInfo.front,h=e.padInfo.top,v=e.padInfo.left;this.outputShape=e.outShape;var m="avg"===t,g="0.0";if(m||(g="-1.0 / 1e-20"),n)this.userCode="\n const ivec3 strides =\n ivec3("+o+", "+i+", "+a+");\n const ivec3 pads = ivec3("+p+", "+h+", "+v+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+s+") {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= "+e.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+f+";\n wR += "+u+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+d+";\n wC += "+c+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+e.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition =\n wD * "+f+" * "+d+" +\n wR * "+d+" + wC;;\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var y=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===t&&(y="avgValue / count");var b=4*Math.floor(r/4),w=r%4,x="\n if ("+m+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec3 strides =\n ivec3("+o+", "+i+", "+a+");\n const ivec3 pads = ivec3("+p+", "+h+", "+v+");\n const float initializationValue = "+g+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= "+e.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4("+g+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < "+l+";\n wD += "+s+") {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= "+e.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+f+";\n wR += "+u+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+e.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+b+"; wC += 4) {\n int xC = xCCorner + wC * "+c+";\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+c+", ch),\n getValue(batch, xD, xR, xC + 2 * "+c+", ch),\n getValue(batch, xD, xR, xC + 3 * "+c+", ch)\n );\n\n "+x+"\n }\n\n int xC = xCCorner + "+b+";\n if ("+(1===w)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+x+"\n } else if ("+(2===w)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+c+", ch),\n initializationValue,\n initializationValue\n );\n\n "+x+"\n } else if ("+(3===w)+") {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + "+c+", ch),\n getValue(batch, xD, xR, xC + 2 * "+c+", ch),\n initializationValue\n );\n\n "+x+"\n }\n }\n setOutput("+y+");\n }\n }\n "}},ua=function(e,t){this.variableNames=["x"];var n=e.windowSize,r=e.batchSize,o=e.inSize,i=Math.ceil(o/n);this.outputShape=[r,i];var a="0.0",s="";"prod"===t?a="1.0":"min"===t?(a="1.0 / 1e-20",s="min"):"max"===t&&(a="-1.0 / 1e-20",s="max");var u=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"sum"===t?u="sumValue":"prod"===t?u="prodValue":"all"===t?u="allValue":"any"===t&&(u="anyValue");var c=4*Math.floor(n/4),l=n%4,f="\n if ("+("sum"===t)+") {\n sumValue += dot(values, ones);\n } else if ("+("prod"===t)+") {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = "+s+"(values, minMaxValue);\n }\n ",d="vec4";"all"===t?(a="1.0",f="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",d="bvec4"):"any"===t&&(a="0.0",f="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",d="bvec4");var p="";o%n>0&&(p="\n if (inIdx < 0 || inIdx >= "+o+") {\n return initializationValue;\n }\n "),this.userCode="\n const float initializationValue = "+a+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n "+p+"\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+n+";\n\n vec4 minMaxValue = vec4("+a+");\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < "+c+"; i += 4) {\n int inIdx = inOffset + i;\n "+d+" values = "+d+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n "+f+"\n }\n\n int inIdx = inOffset + "+c+";\n if ("+(1===l)+") {\n "+d+" values = "+d+"(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+f+"\n } else if ("+(2===l)+") {\n "+d+" values = "+d+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n "+f+"\n } else if ("+(3===l)+") {\n "+d+" values = "+d+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n "+f+"\n }\n setOutput("+u+");\n }\n "},ca=function(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e;for(var n="",r=0;r<4;r++){var o="thisRC = rc;";r%2==1&&(o+="thisRC.z += 1;"),r>1&&(o+="thisRC.y += 1;"),n+="\n "+o+"\n "+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+"\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result["+r+"] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n "+(r>0?"}":"")+"\n "}this.userCode="\n \n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n "+Co(["r","c","d"],t)+"\n return ivec3(r, c, d);\n }\n \n "+ko(e)+"\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = "+e[1]+";\n int cols = "+e[2]+";\n\n "+n+"\n\n setOutput(result);\n }\n "},la=function(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,o=r[1],i=r[2],a=e.shape,s=a[1],u=a[2],c=[n&&s>1?o-1:o,n&&u>1?i-1:i],l=[n&&s>1?s-1:s,n&&u>1?u-1:u],f=c[0]/l[0],d=c[1]/l[1],p=1/f,h=1/d,v=2*Math.ceil(p)+2,m=2*Math.ceil(h)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+f+");\n const float widthScale = float("+d+");\n\n const float invHeightScale = float("+p+");\n const float invWidthScale = float("+h+");\n\n const int winHeight = int("+v+");\n const int winWidth = int("+m+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+u+") {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), "+(o-1)+".0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), "+(i-1)+".0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},fa=function(e,t,n,r){this.variableNames=["A"],this.outputShape=[];var o=e[0],i=e[1],a=e[2],s=e[3];this.outputShape=[o,t,n,s];var u=[r&&t>1?i-1:i,r&&n>1?a-1:a],c=[r&&t>1?t-1:t,r&&n>1?n-1:n];this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+u[0]/c[0]+",\n "+u[1]/c[1]+");\n const vec2 inputShapeRC = vec2("+i+".0, "+a+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n "},da=function(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var o=e[0],i=e[1],a=e[2],s=e[3];this.outputShape=[o,t,n,s];var u=[r&&t>1?i-1:i,r&&n>1?a-1:a],c=[r&&t>1?t-1:t,r&&n>1?n-1:n];this.userCode="\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n "+u[0]/c[0]+",\n "+u[1]/c[1]+",\n "+u[1]/c[1]+");\n const vec3 inputShapeRC = vec3("+i+".0, "+a+".0,\n "+a+".0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < "+(s-1)+";\n bool hasNextRow = coords.z < "+(n-1)+";\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n "},pa=function(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,o=r[1],i=r[2],a=e.shape,s=a[1],u=a[2],c=[n&&s>1?o-1:o,n&&u>1?i-1:i],l=[n&&s>1?s-1:s,n&&u>1?u-1:u],f=c[0]/l[0],d=c[1]/l[1],p=1/f,h=1/d,v=2*Math.ceil(p)+2,m=2*Math.ceil(h)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+f+");\n const float widthScale = float("+d+");\n\n const float invHeightScale = float("+p+");\n const float invWidthScale = float("+h+");\n\n const int winHeight = int("+v+");\n const int winWidth = int("+m+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+u+") {\n continue;\n }\n\n float sourceFracRow =\n float("+c[0]+") *\n (float(dyR) / float("+l[0]+"));\n\n float sourceFracCol =\n float("+c[1]+") *\n (float(dyC) / float("+l[1]+"));\n\n int sourceNearestRow = int(min(\n float(int("+o+") - 1),\n "+n+" ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int("+i+") - 1),\n "+n+" ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},ha=function(e,t,n,r){this.variableNames=["A"],this.outputShape=[];var o=e[0],i=e[1],a=e[2],s=e[3];this.outputShape=[o,t,n,s];var u=[r&&t>1?i-1:i,r&&n>1?a-1:a],c=[r&&t>1?t-1:t,r&&n>1?n-1:n],l=r?"0.5":"0.0";this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+u[0]/c[0]+",\n "+u[1]/c[1]+");\n const vec2 inputShapeRC = vec2("+i+".0, "+a+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + "+l+")));\n\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n "},va=function(e,t){this.variableNames=["x"];var n=e.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");if(this.outputShape=e,1!==n){var r=e.map((function(n,r){return function(n){return-1!==t.indexOf(n)&&1!==e[n]?e[n]+" - coords["+n+"] - 1":"coords["+n+"]"}(r)})).join(","),o=jo(n);this.userCode="\n void main() {\n "+o+" coords = getOutputCoords();\n setOutput(getX("+r+"));\n }\n "}else this.userCode="\n void main() {\n int coord = getOutputCoords();\n setOutput(getX("+e[0]+" - coord - 1));\n }\n "},ma=function(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var n=e.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");this.outputShape=e;var r=xo("rc",n),o=r[n-1]+" + 1 < "+this.outputShape[n-1],i=r[n-2]+" + 1 < "+this.outputShape[n-2],a=jo(n);function s(n){var r=e.map((function(r,o){return function(n,r){return-1!==t.indexOf(n)&&1!==e[n]?e[n]+" - "+r[n]+" - 1":""+r[n]}(o,n)}));return"getChannel(getX("+r.join(",")+"), vec2("+r.slice(-2).join(",")+"))"}this.userCode=1===n?"\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX("+e[0]+" - rc - 1),\n "+e[0]+" - rc - 1);\n if("+o+"){\n result.g = getChannel(getX("+e[0]+" - (rc + 1) - 1),\n "+e[0]+" - (rc + 1) - 1);\n }\n setOutput(result);\n }\n ":"\n void main() {\n "+a+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = "+function(e){return s(e)}(r.slice())+";\n if("+o+"){\n result.g = "+function(e){return e[n-1]="("+e[n-1]+" + 1)",s(e)}(r.slice())+";\n }\n if("+i+") {\n result.b = "+function(e){return e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())+";\n if("+o+") {\n result.a = "+function(e){return e[n-1]="("+e[n-1]+" + 1)",e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())+";\n }\n }\n setOutput(result);\n }\n "},ga=function(e,t,n,r,o,i,a){void 0===a&&(a=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=i;var s=jo(o.length),u=jo(i.length),c="";1===n?c="i":2===n&&(c="i, j");var l="getIndices("+c+")",f="";1===r?f="i":2===r&&(f="i, coords[1]");var d="getUpdates("+f+")",p=t>1?"strides[j]":"strides";this.userCode="\n "+s+" strides = "+s+"("+o+");\n\n void main() {\n "+u+" coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < "+e+"; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < "+t+"; j++) {\n int index = round("+l+");\n flattenedIndex += index * "+p+";\n }\n if (flattenedIndex == coords[0]) {\n sum += "+d+";\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n "},ya=function(e,t){this.variableNames=["x","segmentIds"];var n=e.windowSize,r=e.batchSize,o=e.inSize,i=e.numSegments,a=i*Math.ceil(o/n);this.outputShape=[r,a];var s=4*Math.floor(n/4),u=n%4,c="\n sumValue += dot(values, segFilter);\n ",l="";o%n>0&&(l="\n if (inIdx < 0 || inIdx >= "+o+") {\n return initializationValue;\n }\n ");var f="";o%n>0&&(f="\n if (inIdx < 0 || inIdx >= "+o+") {\n return -1.0;\n }\n "),this.userCode="\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n "+l+"\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n "+f+"\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n "+i+")) * float("+n+"));\n int currentSeg = int(mod(float(outIdx), float("+i+")));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < "+s+"; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n "+c+"\n }\n\n int inIdx = inOffset + "+s+";\n if ("+(1===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n "+c+"\n } else if ("+(2===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n "+c+"\n } else if ("+(3===u)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n "+c+"\n }\n setOutput(sumValue);\n }\n "},ba=function(e,t,n){var r,o;if(this.variableNames=["c","a","b"],this.outputShape=t,n>4)throw Error("Where for rank "+n+" is not yet supported");if(1===n)o="resRC",r="resRC";else{for(var i=["resRC.x","resRC.y","resRC.z","resRC.w"],a=[],s=[],u=0;u<t.length;u++)s.push(""+i[u]),u<e&&a.push(""+i[u]);r=a.join(),o=s.join()}var c=jo(n);this.userCode="\n void main() {\n "+c+" resRC = getOutputCoords();\n float cVal = getC("+r+");\n if (cVal >= 1.0) {\n setOutput(getA("+o+"));\n } else {\n setOutput(getB("+o+"));\n }\n }\n "},wa=function(){function e(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;var t,n=jo(this.rank),r="uniform int start["+this.rank+"];",o=function(e){if(1===e)return"sourceLoc";if(e<=6)return xa.slice(0,e).map((function(e){return"sourceLoc."+e})).join(",");throw Error("Slicing for rank "+e+" is not yet supported")}(this.rank);t="\n "+n+" sourceLoc;\n "+n+" coords = getOutputCoords();\n "+e.map((function(e,t){return"sourceLoc."+xa[t]+" = start["+t+"] + coords."+xa[t]+";"})).join("\n")+"\n ",this.userCode="\n "+r+"\n void main() {\n "+t+"\n setOutput(getSource("+o+"));\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;if(e.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+e.length+")");return function(n,r){null==t.startLoc&&(t.startLoc=n.getUniformLocationNoThrow(r,"start"),null==t.startLoc)||n.gl.uniform1iv(t.startLoc,e)}},e}(),xa=["x","y","z","w","u","v"],Ea=function(){function e(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length;var t=jo(this.rank),n=xo("coords",this.rank),r=xo("sourceLoc",this.rank),o=1===this.rank?"sourceLoc":"vec2("+r.slice(-2).join()+")",i="getChannel(getSource("+r.join()+"), "+o+")",a="\n result.x = "+i+";\n if (++"+n[this.rank-1]+" < "+e[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.y = "+i+";\n --"+r[this.rank-1]+";\n }\n ",s=1===this.rank?"":"\n --"+n[this.rank-1]+";\n if (++"+n[this.rank-2]+" < "+e[this.rank-2]+") {\n ++"+r[this.rank-2]+";\n result.z = "+i+";\n if (++"+n[this.rank-1]+" < "+e[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.w = "+i+";\n }\n }\n ",u=this.rank<=4?"sourceLoc = coords +\n "+t+"("+e.map((function(e,t){return"start["+t+"]"})).join()+");":e.map((function(e,t){return r[t]+" = "+n[t]+" + start["+t+"];"})).join("\n");this.userCode="\n uniform int start["+this.rank+"];\n void main() {\n "+t+" coords = getOutputCoords();\n "+t+" sourceLoc;\n "+u+"\n vec4 result = vec4(0.);\n "+a+"\n "+s+"\n setOutput(result);\n }\n "}return e.prototype.getCustomSetupFunc=function(e){var t=this;if(e.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+e.length+")");return function(n,r){null==t.startLoc&&(t.startLoc=n.getUniformLocationNoThrow(r,"start"),null==t.startLoc)||n.gl.uniform1iv(t.startLoc,e)}},e}(),Ca=function(e,t,n){this.variableNames=["x"],this.outputShape=n;var r=n.length,o=jo(n.length),i=jo(n.length),a="";if(1===r)a="coords * strides + begin";else{var s=0;a=n.map((function(e,t){return s++,1===n.length?"coords * strides["+t+"] + begin["+t+"]":"coords["+(s-1)+"] * strides["+t+"] + begin["+t+"]"})).join(",")}this.userCode="\n "+o+" begin = "+o+"("+e+");\n "+o+" strides = "+o+"("+t+");\n\n void main() {\n "+i+" coords = getOutputCoords();\n setOutput(getX("+a+"));\n }\n "},ka=function(){function e(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return e.prototype.acquireTexture=function(e,t,n){var r,o=Oa(t,n),i=Sa(e,o,n);if(i in this.freeTextures||(this.freeTextures[i]=[]),i in this.usedTextures||(this.usedTextures[i]=[]),this.freeTextures[i].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var a=this.freeTextures[i].shift();return this.usedTextures[i].push(a),a}return this.numUsedTextures++,this.log(),o===Ue.PACKED_2X2_FLOAT32?r=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):o===Ue.PACKED_2X2_FLOAT16?r=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):o===Ue.UNPACKED_FLOAT32?r=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):o===Ue.UNPACKED_FLOAT16?r=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):o===Ue.PACKED_4X1_UNSIGNED_BYTE&&(r=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[i].push(r),r},e.prototype.releaseTexture=function(e,t,n,r){if(null!=this.freeTextures){var o=Sa(t,Oa(n,r),r);o in this.freeTextures||(this.freeTextures[o]=[]),this.freeTextures[o].push(e),this.numFreeTextures++,this.numUsedTextures--;var i=this.usedTextures[o],a=i.indexOf(e);if(a<0)throw new Error("Cannot release a texture that was never provided by this texture manager");i.splice(a,1),this.log()}},e.prototype.log=function(){if(this.logEnabled){var e=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+e+")")}},e.prototype.getNumUsedTextures=function(){return this.numUsedTextures},e.prototype.getNumFreeTextures=function(){return this.numFreeTextures},e.prototype.dispose=function(){var e=this;if(null!=this.freeTextures){for(var t in this.freeTextures)this.freeTextures[t].forEach((function(t){e.gpgpu.deleteMatrixTexture(t)}));for(var t in this.usedTextures)this.usedTextures[t].forEach((function(t){e.gpgpu.deleteMatrixTexture(t)}));this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},e}();function Oa(e,t){if(e===Be.UPLOAD)return Ue.PACKED_2X2_FLOAT32;if(e===Be.RENDER||null==e)return function(e){return f().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?Ue.PACKED_2X2_FLOAT32:Ue.UNPACKED_FLOAT32:e?Ue.PACKED_2X2_FLOAT16:Ue.UNPACKED_FLOAT16}(t);if(e===Be.DOWNLOAD||e===Be.PIXELS)return Ue.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+e)}function Sa(e,t,n){return e[0]+"_"+e[1]+"_"+t+"_"+n}var _a=function(e,t){this.variableNames=["A"];for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e[r]*t[r];this.outputShape=n,this.rank=n.length;var o=jo(this.rank),i=function(e){var t=e.length;if(t>5)throw Error("Tile for rank "+t+" is not yet supported");if(1===t)return"imod(resRC, "+e[0]+")";for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[],o=0;o<e.length;o++)r.push("imod("+n[o]+", "+e[o]+")");return r.join()}(e);this.userCode="\n void main() {\n "+o+" resRC = getOutputCoords();\n setOutput(getA("+i+"));\n }\n "},Ta=function(e,t){this.variableNames=["A"];for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e[t[r]];this.outputShape=n,this.rank=n.length;var o=jo(this.rank),i=function(e){var t=e.length;if(t>6)throw Error("Transpose for rank "+t+" is not yet supported");for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(t),o=0;o<e.length;o++)r[e[o]]=n[o];return r.join()}(t);this.userCode="\n void main() {\n "+o+" resRC = getOutputCoords();\n setOutput(getA("+i+"));\n }\n "},Ia=function(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e[t[r]];if(this.outputShape=n,this.rank=n.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var o=jo(this.rank),i=wo("rc",this.rank),a=new Array(this.rank);for(r=0;r<t.length;r++)a[t[r]]=i[r];var s="vec2("+a.slice(-2).join()+")",u="++"+i[this.rank-1]+" < "+n[this.rank-1],c="getChannel(getA("+a.join()+"), "+s+")";this.userCode="\n void main() {\n "+o+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result[0] = "+c+";\n if("+u+") {\n result[1] = "+c+";\n }\n --"+i[this.rank-1]+";\n if(++"+i[this.rank-2]+" < "+n[this.rank-2]+") {\n result[2] = "+c+";\n if("+u+") {\n result[3] = "+c+";\n }\n }\n setOutput(result);\n }\n "},Pa=1.7580993408473768,Aa=1.0507009873554805,Ra=function(e,t){this.variableNames=["A"],this.outputShape=e,this.userCode="\n float unaryOperation(float x) {\n "+t+"\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n "},Na="if (isnan(x)) return x;",Ma="return abs(x);",ja=Na+"\n return (x < 0.0) ? 0.0 : x;\n",Da=Na+"\n return (x < 0.0) ? 0.0 : min(6.0, x);\n",Fa="return (x >= 0.0) ? x : (exp(x) - 1.0);",La="return -x;",Ba="return ceil(x);",Ua="return floor(x);",za="return exp(x);",Va="return exp(x) - 1.0;",Wa="return x;",Ha="\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",$a="\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",qa="\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n",Ka=function(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.userCode="\n vec4 unaryOperation(vec4 x) {\n "+t+"\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n "},Ga=function(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e;var t=e.length,n=xo("rc",t),r=jo(t),o=function(e,t){if(1===e)return"rc";for(var n="",r=0;r<e;r++)n+=t[r],r<e-1&&(n+=",");return n}(t,n),i=n.slice(-2),a=t<=1?"rc":"vec2("+i.join(",")+")";this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n vec4 packedInput = getA("+o+");\n\n setOutput(getChannel(packedInput, "+a+"));\n }\n "},Xa={};function Ya(e,t){if(void 0===t&&(t=!1),"linear"===e)return"return x;";if("relu"===e)return t?Ha:ja;if("elu"===e)return t?qa:Fa;if("relu6"===e)return t?$a:Da;if("prelu"===e)return t?Xo:Ko;throw new Error("Activation "+e+" has not been implemented for the WebGL backend.")}var Ja=function(e){function t(t){var n,r=e.call(this)||this;if(r.pendingRead=new WeakMap,r.pendingDisposal=new WeakSet,r.dataRefCount=new WeakMap,r.numBytesInGPU=0,r.uploadWaitMs=0,r.downloadWaitMs=0,r.warnedAboutMemory=!1,r.pendingDeletes=0,r.disposed=!1,!f().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");if(null==t){var o=He(f().getNumber("WEBGL_VERSION"));r.binaryCache=((n=f().getNumber("WEBGL_VERSION"))in Xa||(Xa[n]={}),Xa[n]),r.gpgpu=new qi(o),r.canvas=o.canvas,r.gpgpuCreatedLocally=!0}else r.gpgpu=t,r.binaryCache={},r.gpgpuCreatedLocally=!1,r.canvas=t.gl.canvas;return r.textureManager=new ka(r.gpgpu),r.numMBBeforeWarning=null==f().global.screen?1024:f().global.screen.height*f().global.screen.width*window.devicePixelRatio*600/1024/1024,r.texData=new Nr(r,je),r}return a(t,e),t.prototype.numDataIds=function(){return this.texData.numDataIds()+(this.cpuBackend?this.cpuBackend.numDataIds():0)-this.pendingDeletes},t.prototype.write=function(e,t,n){if(f().getBool("DEBUG")&&this.checkNumericalProblems(e),"complex64"===n&&null!=e)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var r={};return this.texData.set(r,{shape:t,dtype:n,values:e,usage:Be.UPLOAD}),r},t.prototype.move=function(e,t,n,r){if(f().getBool("DEBUG")&&this.checkNumericalProblems(t),"complex64"===r)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:n,dtype:r,values:t,usage:Be.UPLOAD})},t.prototype.readSync=function(e){var t=this.texData.get(e),n=t.values,r=t.dtype,o=t.complexTensors,i=t.slice,a=t.shape,s=t.isPacked;if(null!=i){var u;u=s?new Ka(a,Wa):new Ra(a,Wa);var c=this.runWebGLProgram(u,[{dataId:e,shape:a,dtype:r}],r),l=this.readSync(c.dataId);return this.disposeData(c.dataId),l}if(null!=n)return this.convertAndCacheOnCPU(e);if("string"===r)return n;var f,d,p=null!=this.activeTimers;return p&&(f=re()),d="complex64"===r?eo(o.real.dataSync(),o.imag.dataSync()):this.getValuesFromTexture(e),p&&(this.downloadWaitMs+=re()-f),this.convertAndCacheOnCPU(e,d)},t.prototype.read=function(e){return s(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,c,l,d,p,h,v,m,g,y,b,w,x,E,C,k;return u(this,(function(u){switch(u.label){case 0:if(this.pendingRead.has(e))return t=this.pendingRead.get(e),[2,new Promise((function(e){return t.push(e)}))];if(n=this.texData.get(e),r=n.values,o=n.shape,i=n.slice,a=n.dtype,s=n.complexTensors,c=n.isPacked,null!=i)return void 0,l=c?new Ka(o,Wa):new Ra(o,Wa),d=this.runWebGLProgram(l,[{dataId:e,shape:o,dtype:a}],a),p=this.read(d.dataId),this.disposeData(d.dataId),[2,p];if(null!=r)return[2,this.convertAndCacheOnCPU(e)];if(!f().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===f().getNumber("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return h=null,"complex64"!==a&&f().get("WEBGL_BUFFER_SUPPORTED")&&(v=this.decode(e),m=this.texData.get(v.dataId),h=(k=this.gpgpu).createBufferFromTexture.apply(k,[m.texture].concat(qe(o)))),this.pendingRead.set(e,[]),"complex64"===a?[3,2]:[4,this.gpgpu.createAndWaitForFence()];case 1:u.sent(),u.label=2;case 2:return"complex64"!==a?[3,4]:[4,Promise.all([s.real.data(),s.imag.data()])];case 3:return y=u.sent(),b=y[0],w=y[1],g=eo(b,w),[3,5];case 4:null==h?g=this.getValuesFromTexture(e):(x=T(o),g=this.gpgpu.downloadFloat32MatrixFromBuffer(h,x)),u.label=5;case 5:return null!=v&&this.disposeData(v.dataId),E=this.convertAndCacheOnCPU(e,g),C=this.pendingRead.get(e),this.pendingRead.delete(e),C.forEach((function(e){return e(E)})),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e),this.pendingDeletes--),[2,E]}}))}))},t.prototype.checkNumericalProblems=function(e){if(null!=e)for(var t=0;t<e.length;t++){var n=e[t];if(!Ye(n)){if(f().getBool("WEBGL_RENDER_FLOAT32_CAPABLE"))throw Error("The value "+n+" cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'");throw Error("The value "+n+" cannot be represented on this device.")}}},t.prototype.getValuesFromTexture=function(e){var t,n=this.texData.get(e),r=n.shape,o=n.dtype,i=n.isPacked,a=T(r);if(f().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var s=this.decode(e),u=this.texData.get(s.dataId),c=(t=this.gpgpu).downloadMatrixFromPackedTexture.apply(t,[u.texture].concat(qe(r))).subarray(0,a);return this.disposeData(s.dataId),c}var l=f().getBool("WEBGL_PACK")&&!0===i,d=l?Ot(r):r,p=l?new xi(d):new wi(d),h=this.runWebGLProgram(p,[{shape:d,dtype:o,dataId:e}],"float32"),v=this.texData.get(h.dataId),m=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(v.texture,v.texShape[0],v.texShape[1]).subarray(0,a);return this.disposeData(h.dataId),m},t.prototype.time=function(e){return s(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return u(this,(function(u){switch(u.label){case 0:return t=this.activeTimers,n=[],r=!1,null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,e(),o=_(this.activeTimers.map((function(e){return e.query}))).filter((function(e){return null!=e})),i=_(this.activeTimers.map((function(e){return e.name}))).filter((function(e){return null!=e})),this.activeTimers=t,r&&(this.programTimersStack=null),a={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[4,Promise.all(o)]:[3,2];case 1:return s=u.sent(),a.kernelMs=C(s),a.getExtraProfileInfo=function(){return s.map((function(e,t){return{name:i[t],ms:e}})).map((function(e){return e.name+": "+e.ms})).join(", ")},[3,3];case 2:a.kernelMs={error:"WebGL query timers are not supported in this environment."},u.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,a]}}))}))},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:re(),endMs:null}},t.prototype.endTimer=function(e){return f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=re(),e)},t.prototype.getQueryTime=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){return f().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(t=e).endMs-t.startMs]}))}))},t.prototype.disposeData=function(e){if(!this.pendingDisposal.has(e)){if(this.pendingRead.has(e))return this.pendingDisposal.add(e),void this.pendingDeletes++;if(this.texData.has(e)){this.releaseGPUData(e);var t=this.texData.get(e).complexTensors;null!=t&&(t.real.dispose(),t.imag.dispose()),this.texData.delete(e)}}},t.prototype.releaseGPUData=function(e){var t=this.texData.get(e),n=t.texture,r=t.dtype,o=t.texShape,i=t.usage,a=t.isPacked,s=t.slice,u=s&&s.origDataId||e,c=this.dataRefCount.get(u);c>1?this.dataRefCount.set(u,c-1):(this.dataRefCount.delete(u),null!=n&&(this.numBytesInGPU-=this.computeBytes(o,r),this.textureManager.releaseTexture(n,o,i,a)));var l=this.texData.get(e);l.texture=null,l.texShape=null,l.isPacked=!1,l.slice=null},t.prototype.getTexture=function(e){return this.uploadToGPU(e),this.texData.get(e).texture},t.prototype.getDataInfo=function(e){return this.texData.get(e)},t.prototype.getCPUBackend=function(){return f().getBool("WEBGL_CPU_FORWARD")?(null==this.cpuBackend&&(this.cpuBackend=je.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(e,t){var n=this;return void 0===t&&(t=128),null!=this.getCPUBackend()&&e.every((function(e){return null==n.texData.get(e.dataId).texture&&e.size<t}))},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.complex=function(e,t){var n=this.makeOutput(e.shape,"complex64");return this.texData.get(n.dataId).complexTensors={real:je.keep(e.clone()),imag:je.keep(t.clone())},n},t.prototype.real=function(e){return this.texData.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.texData.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,t,n){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.slice(e,t,n);if(0===T(n))return cn([],n,e.dtype);var r=this.texData.get(e.dataId).isPacked,o=Tr(e.shape,t,n);if(r||!o){var i=f().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ea(n):new wa(n),a=i.getCustomSetupFunc(t);return this.compileAndRun(i,[e],null,a)}return this.uploadToGPU(e.dataId),this.shallowSlice(e,t,n)},t.prototype.shallowSlice=function(e,t,n){var r=this.texData.get(e.dataId),o=this.makeOutput(n,e.dtype),i=this.texData.get(o.dataId);Object.assign(i,r),i.shape=n,i.dtype=e.dtype;var a=Ir(t,e.strides);r.slice&&(a+=r.slice.flatOffset),i.slice={flatOffset:a,origDataId:r.slice&&r.slice.origDataId||e.dataId};var s=this.dataRefCount.get(i.slice.origDataId)||1;return this.dataRefCount.set(i.slice.origDataId,s+1),o},t.prototype.stridedSlice=function(e,t,n,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.stridedSlice(e,t,n,r);var o=Or(t,n,r);if(o.some((function(e){return 0===e})))return cn([],o);var i=new Ca(t,r,o);return this.compileAndRun(i,[e])},t.prototype.reverse=function(e,t){var n=f().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new ma(e.shape,t):new va(e.shape,t);return this.compileAndRun(n,[e])},t.prototype.concat=function(e,t){if("complex64"===e[0].dtype){var n=e.map((function(e){return sn(e)})),r=e.map((function(e){return un(e)}));return an(this.concat(n,t),this.concat(r,t))}if(this.shouldExecuteOnCPU(e))return this.cpuBackend.concat(e,t);if(1===e.length)return e[0];if(e.length>f().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var o=Math.floor(e.length/2),i=this.concat(e.slice(0,o),t),a=this.concat(e.slice(o),t);return this.concat([i,a],t)}if(f().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var s=new ti(e.map((function(e){return e.shape})),t);return this.compileAndRun(s,e)}var u=rn(e.map((function(e){return e.shape})),t),c=e.map((function(e){return e.as2D(-1,T(e.shape.slice(t)))})),l=new ei(c.map((function(e){return e.shape})));return this.compileAndRun(l,c).reshape(u)},t.prototype.neg=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.neg(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,La,e.dtype);var t=new Ra(e.shape,La);return this.compileAndRun(t,[e])},t.prototype.batchMatMul=function(e,t,n,r){var o=n?e.shape[2]:e.shape[1],i=r?t.shape[1]:t.shape[2],a=n?e.shape[1]:e.shape[2],s=e.shape[0];if((1===o||1===i)&&a>1e3){n&&(e=e.transpose([0,2,1])),r&&(t=t.transpose([0,2,1]));var u=1===i?e:e.as3D(s,a,1),c=1===i?2:1,l=1===i?t.as3D(s,1,a):t;return this.multiply(u,l).sum(c,!0)}var f=_e(e.dtype,t.dtype),d=new ea(e.shape,[s,o,i],n,r);return this.compileAndRun(d,[e,t],f)},t.prototype.fusedBatchMatMul=function(e){var t=e.a,n=e.b,r=e.transposeA,o=e.transposeB,i=e.bias,a=e.activation,s=e.preluActivationWeights,u=r?t.shape[2]:t.shape[1],c=o?n.shape[1]:n.shape[2],l=t.shape[0],f=_e(t.dtype,n.dtype),d=null!=i,p=null!=s,h=a?Ya(a,!0):null,v=new ea(t.shape,[l,u,c],r,o,d,h,p),m=[t,n];return i&&m.push(i),s&&m.push(s),this.compileAndRun(v,m,f)},t.prototype.multiply=function(e,t){if("complex64"===e.dtype){var n=this.texData.get(e.dataId),r=this.texData.get(t.dataId),o=new Wo("return areal * breal - aimag * bimag;",e.shape,t.shape),i=new Wo("return areal * bimag + aimag * breal;",e.shape,t.shape),a=[this.makeComplexComponentTensorInfo(e,n.complexTensors.real),this.makeComplexComponentTensorInfo(e,n.complexTensors.imag),this.makeComplexComponentTensorInfo(t,r.complexTensors.real),this.makeComplexComponentTensorInfo(t,r.complexTensors.imag)],s=this.compileAndRun(o,a),u=this.compileAndRun(i,a),c=this.complex(s,u);return s.dispose(),u.dispose(),c}if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.multiply(e,t);if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,qo,e.dtype);var l=new Go(qo,e.shape,t.shape);return this.compileAndRun(l,[e,t],e.dtype)},t.prototype.batchNormalization=function(e,t,n,r,o,i){var a=[e,t,n],s=null;null!=i&&(s=i.shape,a.push(i));var u=null;if(null!=o&&(u=o.shape,a.push(o)),f().getBool("WEBGL_PACK_NORMALIZATION")){var c=new Vo(e.shape,t.shape,n.shape,s,u,r);return this.compileAndRun(c,a)}var l=new zo(e.shape,t.shape,n.shape,s,u,r);return this.compileAndRun(l,a)},t.prototype.localResponseNormalization4D=function(e,t,n,r,o){var i=f().getBool("WEBGL_PACK_NORMALIZATION")?new Ji(e.shape,t,n,r,o):new Xi(e.shape,t,n,r,o);return this.compileAndRun(i,[e])},t.prototype.LRNGrad=function(e,t,n,r,o,i,a){var s=new Yi(t.shape,r,o,i,a);return this.compileAndRun(s,[t,n,e])},t.prototype.tile=function(e,t){if("string"===e.dtype){var n=this.readSync(e.dataId).map((function(e){return ae(e)}));return ho(Un(e.shape,e.dtype,n),t)}var r=new _a(e.shape,t);return this.compileAndRun(r,[e])},t.prototype.pad=function(e,t,n){var r=f().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new ia(e.shape,t,n):new oa(e.shape,t,n);return this.compileAndRun(r,[e])},t.prototype.transpose=function(e,t){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,t);var n=f().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ia(e.shape,t):new Ta(e.shape,t);return this.compileAndRun(n,[e])},t.prototype.gather=function(e,t,n){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.gather(e,t,n);var r=new Si(e.shape,t.size,n);return this.compileAndRun(r,[e,t])},t.prototype.batchToSpaceND=function(e,t,n){k(e.rank<=4,(function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"}));var r=t.reduce((function(e,t){return e*t})),o=pr(e.shape,t,r),i=hr(o.length,t.length),a=vr(e.shape,t,r),s=mr(n,t.length),u=gr(a,n,t.length);return e.reshape(o).transpose(i).reshape(a).slice(s,u)},t.prototype.spaceToBatchND=function(e,t,n){k(e.rank<=4,(function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"}));var r=t.reduce((function(e,t){return e*t})),o=[[0,0]];o.push.apply(o,n);for(var i=1+t.length;i<e.shape.length;++i)o.push([0,0]);var a=e.pad(o),s=pr(a.shape,t,r,!1),u=hr(s.length,t.length,!1),c=vr(a.shape,t,r,!1);return a.reshape(s).transpose(u).reshape(c)},t.prototype.reduce=function(e,t,n){var r=e.shape[0],o=e.shape[1],i=br(o),a=new ua({windowSize:i,inSize:o,batchSize:r},t),s=this.compileAndRun(a,[e],n);return 1===s.shape[1]?s:this.reduce(s,t,n)},t.prototype.argReduce=function(e,t,n){void 0===n&&(n=null);var r=e.shape[0],o=e.shape[1];null!=n&&(r=n.shape[0],o=n.shape[1]);var i=br(o),a=new bo({windowSize:i,inSize:o,batchSize:r},t,null==n),s=[e];null!=n&&s.push(n);var u=this.compileAndRun(a,s,"int32");return 1===u.shape[1]?u:this.argReduce(e,t,u)},t.prototype.argReducePacked=function(e,t,n){void 0===n&&(n=null);var r=null!=n?n.shape:e.shape,o=br(r[r.length-1]),i=new Lo(r,o,t,null==n),a=null==n?[e]:[e,n],s=this.compileAndRun(i,a,"int32");return s.rank===e.rank?this.argReducePacked(e,t,s):s},t.prototype.sum=function(e,t){Qt("sum",t,e.rank);var n=Yt(e.shape,t),r=n[0],o=T(n[1]),i=e.as2D(-1,o),a=Te(e.dtype);return this.reduce(i,"sum",a).reshape(r)},t.prototype.prod=function(e,t){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.prod(e,t);var n=Yt(e.shape,t),r=n[0],o=T(n[1]),i=e.as2D(-1,o),a=Te(e.dtype);return this.reduce(i,"prod",a).reshape(r)},t.prototype.unsortedSegmentSum=function(e,t,n){var r=0,o=Zt([r],e.rank),i=e;null!=o&&(i=e.transpose(o),r=tn(1,e.rank)[0]);var a=function(e,t,n){for(var r=[],o=e.length,i=0;i<o;i++)i!==t?r.push(e[i]):r.push(n);return r}(i.shape,r,n),s=T([i.shape[r]]),u=i.as2D(-1,s),c=Te(e.dtype),l=this.segOpCompute(u,"unsortedSegmentSum",t,c,n).reshape(a);return null!=o&&(l=l.transpose(en(o))),l},t.prototype.segOpCompute=function(e,t,n,r,o){var i=e.shape[0],a=e.shape[1],s=function(e,t){var n,r=!1;for(e<=30?(n=e,r=!0):n=J(e,Math.floor(Math.sqrt(e)));!r;)n>t||n===e?r=!0:n=J(e,n+1);return n}(a,o),u=new ya({windowSize:s,inSize:a,batchSize:i,numSegments:o},t),c=this.compileAndRun(u,[e,n],r);return c.shape[1]===o?c:(n=bn(0,o).tile([a/s]),this.segOpCompute(c,t,n,r,o))},t.prototype.argMinMaxReduce=function(e,t,n){var r=[t];if(Qt("arg"+n.charAt(0).toUpperCase()+n.slice(1),r,e.rank),!f().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var o=Yt(e.shape,r),i=o[0],a=T(o[1]),s=e.as2D(-1,a);return this.argReduce(s,n).reshape(i)}return this.argReducePacked(e,n)},t.prototype.argMin=function(e,t){return this.argMinMaxReduce(e,t,"min")},t.prototype.argMax=function(e,t){return this.argMinMaxReduce(e,t,"max")},t.prototype.cumsum=function(e,t,n,r){if(t!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+t);var o=new hi(e.shape,n,r);return this.compileAndRun(o,[e])},t.prototype.equal=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(equal(a, b));\n","bool");var n=new Go("return float(a == b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.notEqual=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(notEqual(a, b));\n","bool");var n=new Go("return float(a != b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.less=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.less(e,t);if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(lessThan(a, b));\n","bool");var n=new Go("return float(a < b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.lessEqual=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(lessThanEqual(a, b));\n","bool");var n=new Go("return float(a <= b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.greater=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.greater(e,t);if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(greaterThan(a, b));\n","bool");var n=new Go("return float(a > b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.greaterEqual=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(greaterThanEqual(a, b));\n","bool");var n=new Go("return float(a >= b);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.logicalNot=function(e){var t=new Ra(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(t,[e])},t.prototype.logicalAnd=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n","bool");var n=new Go("return float(a >= 1.0 && b >= 1.0);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.logicalOr=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n","bool");var n=new Go("return float(a >= 1.0 || b >= 1.0);",e.shape,t.shape);return this.compileAndRun(n,[e,t],"bool")},t.prototype.select=function(e,t,n){var r=new ba(e.rank,t.shape,t.rank);return this.compileAndRun(r,[e,t,n],_e(t.dtype,n.dtype))},t.prototype.where=function(e){Wt("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var t=e.dataSync();return mo(e.shape,t)},t.prototype.topk=function(e,t,n){return vo(e.dataSync(),e.shape,e.dtype,t)},t.prototype.min=function(e,t){Qt("min",t,e.rank);var n=Yt(e.shape,t),r=n[0],o=T(n[1]),i=e.as2D(-1,o);return this.reduce(i,"min",i.dtype).reshape(r)},t.prototype.minimum=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.minimum(e,t);var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("\n vec4 result = vec4(min(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new Go("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return min(a, b);\n",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.mod=function(e,t){var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("\n vec4 result = mod(a, b);\n vec4 isNaN = vec4(equal(b, vec4(0.0)));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new Go("if (b == 0.0) return NAN;\n return mod(a, b);",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.max=function(e,t){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,t);Qt("max",t,e.rank);var n=Yt(e.shape,t),r=n[0],o=T(n[1]),i=e.as2D(-1,o);return this.reduce(i,"max",i.dtype).reshape(r)},t.prototype.maximum=function(e,t){if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.maximum(e,t);var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("\n vec4 result = vec4(max(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new Go("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return max(a, b);\n",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.all=function(e,t){Qt("all",t,e.rank);var n=Yt(e.shape,t),r=n[0],o=T(n[1]),i=e.as2D(-1,o);return this.reduce(i,"all",i.dtype).reshape(r)},t.prototype.any=function(e,t){Qt("any",t,e.rank);var n=Yt(e.shape,t),r=n[0],o=T(n[1]),i=e.as2D(-1,o);return this.reduce(i,"any",i.dtype).reshape(r)},t.prototype.realDivide=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n","float32",!0);var n=new Go("\nif (a == b) {\n return 1.0;\n};\nreturn a / b;",e.shape,t.shape);return this.compileAndRun(n,[e,t],"float32")},t.prototype.floorDiv=function(e,t){if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,"\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n","int32");var n=new Go("\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n",e.shape,t.shape);return this.compileAndRun(n,[e,t],"int32")},t.prototype.add=function(e,t){if("complex64"===e.dtype&&"complex64"===t.dtype)return this.complexSeparableBinaryOp(e,t,Ho);if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.add(e,t);var n=_e(e.dtype,t.dtype);if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,Ho,n);var r=new Go(Ho,e.shape,t.shape);return this.compileAndRun(r,[e,t],n)},t.prototype.packedUnaryOp=function(e,t,n){var r=new Ka(e.shape,t);return this.compileAndRun(r,[e],n)},t.prototype.packedBinaryOp=function(e,t,n,r,o){void 0===o&&(o=!1);var i=new Yo(n,e.shape,t.shape,o);return this.compileAndRun(i,[e,t],r)},t.prototype.complexSeparableBinaryOp=function(e,t,n){var r=this,o=this.texData.get(e.dataId),i=this.texData.get(t.dataId),a=[[o.complexTensors.real,i.complexTensors.real],[o.complexTensors.imag,i.complexTensors.imag]].map((function(o){var i=o[0],a=o[1],s=r.makeComplexComponentTensorInfo(e,i),u=r.makeComplexComponentTensorInfo(t,a),c=new Go(n,e.shape,t.shape);return r.compileAndRun(c,[s,u],_e(i.dtype,a.dtype))})),s=a[0],u=a[1],c=this.complex(s,u);return s.dispose(),u.dispose(),c},t.prototype.makeComplexComponentTensorInfo=function(e,t){return{dataId:t.dataId,dtype:t.dtype,shape:e.shape}},t.prototype.addN=function(e){if(1===e.length)return e[0];if(e.length>f().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var t=Math.floor(e.length/2),n=this.addN(e.slice(0,t)),r=this.addN(e.slice(t));return this.addN([n,r])}var o=e.map((function(e){return e.dtype})).reduce((function(e,t){return _e(e,t)})),i=e.map((function(e){return e.shape})),a=f().getBool("WEBGL_PACK")?new yo(e[0].shape,i):new go(e[0].shape,i);return this.compileAndRun(a,e,o)},t.prototype.subtract=function(e,t){if("complex64"===e.dtype&&"complex64"===t.dtype)return this.complexSeparableBinaryOp(e,t,$o);if(this.shouldExecuteOnCPU([e,t]))return this.cpuBackend.subtract(e,t);var n=_e(e.dtype,t.dtype);if(f().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,t,$o,e.dtype);var r=new Go($o,e.shape,t.shape);return this.compileAndRun(r,[e,t],n)},t.prototype.pow=function(e,t){var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new Go("\nif(a < 0.0 && floor(b) < b){\n return NAN;\n}\nif (b == 0.0) {\n return 1.0;\n}\nreturn (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",e.shape,t.shape),r=_e(e.dtype,t.dtype);return this.compileAndRun(n,[e,t],r)},t.prototype.ceil=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.ceil(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Ba,e.dtype);var t=new Ra(e.shape,Ba);return this.compileAndRun(t,[e])},t.prototype.floor=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.floor(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Ua,e.dtype);var t=new Ra(e.shape,Ua);return this.compileAndRun(t,[e])},t.prototype.sign=function(e){var t=new Ra(e.shape,"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n");return this.compileAndRun(t,[e])},t.prototype.isNaN=function(e){var t=new Ra(e.shape,"return float(isnan(x));");return this.compileAndRun(t,[e],"bool")},t.prototype.isInf=function(e){var t=new Ra(e.shape,"return float(isinf(x));");return this.compileAndRun(t,[e],"bool")},t.prototype.isFinite=function(e){var t=new Ra(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(t,[e],"bool")},t.prototype.round=function(e){var t=new Ra(e.shape,"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n");return this.compileAndRun(t,[e])},t.prototype.exp=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.exp(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,za,e.dtype);var t=new Ra(e.shape,za);return this.compileAndRun(t,[e])},t.prototype.expm1=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.expm1(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Va,e.dtype);var t=new Ra(e.shape,Va);return this.compileAndRun(t,[e])},t.prototype.softmax=function(e,t){var n=D([t],e.shape),r=this.max(e,n),o=Jt(r.shape,n),i=this.subtract(e,r.reshape(o)),a=this.exp(i),s=this.sum(a,n).reshape(o);return this.realDivide(a,s)},t.prototype.log=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.log(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,"\n vec4 result = log(x);\n vec4 isNaN = vec4(lessThan(x, vec4(0.0)));\n result.r = isNaN.r == 1.0 ? NAN : result.r;\n result.g = isNaN.g == 1.0 ? NAN : result.g;\n result.b = isNaN.b == 1.0 ? NAN : result.b;\n result.a = isNaN.a == 1.0 ? NAN : result.a;\n\n return result;\n",e.dtype);var t=new Ra(e.shape,"if (x < 0.0) return NAN;\n return log(x);");return this.compileAndRun(t,[e])},t.prototype.log1p=function(e){var t=new Ra(e.shape,"return log(1.0 + x);");return this.compileAndRun(t,[e])},t.prototype.sqrt=function(e){var t=new Ra(e.shape,"return sqrt(x);");return this.compileAndRun(t,[e])},t.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var t=new Ra(e.shape,"return inversesqrt(x);");return this.compileAndRun(t,[e])},t.prototype.reciprocal=function(e){var t=new Ra(e.shape,"return 1.0 / x;");return this.compileAndRun(t,[e])},t.prototype.relu=function(e){var t;return t=f().getBool("WEBGL_PACK")?new Ka(e.shape,Ha):new Ra(e.shape,ja),this.compileAndRun(t,[e])},t.prototype.relu6=function(e){var t;return t=f().getBool("WEBGL_PACK")?new Ka(e.shape,$a):new Ra(e.shape,Da),this.compileAndRun(t,[e])},t.prototype.prelu=function(e,t){var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo(Xo,e.shape,t.shape):new Go(Ko,e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.elu=function(e){if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,qa,e.dtype);var t=new Ra(e.shape,Fa);return this.compileAndRun(t,[e])},t.prototype.eluDer=function(e,t){var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",e.shape,t.shape):new Go("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.selu=function(e){var t=new Ra(e.shape,"\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = 1.7580993408473768;\n float scale = 1.0507009873554805;\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n");return this.compileAndRun(t,[e])},t.prototype.int=function(e){var t=new Ra(e.shape,"return float(int(x));");return this.compileAndRun(t,[e],"int32")},t.prototype.clip=function(e,t,n){var r,o=(r=f().getBool("WEBGL_PACK_CLIP")?new Qo(e.shape):new Jo(e.shape)).getCustomSetupFunc(t,n);return this.compileAndRun(r,[e],null,o)},t.prototype.abs=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.abs(e);if(f().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Ma,e.dtype);var t=new Ra(e.shape,Ma);return this.compileAndRun(t,[e])},t.prototype.complexAbs=function(e){var t=this.texData.get(e.dataId),n=new Zo(e.shape),r=[this.makeComplexComponentTensorInfo(e,t.complexTensors.real),this.makeComplexComponentTensorInfo(e,t.complexTensors.imag)];return this.compileAndRun(n,r)},t.prototype.sigmoid=function(e){var t=new Ra(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(t,[e])},t.prototype.softplus=function(e){var t=new Ra(e.shape,"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n");return this.compileAndRun(t,[e])},t.prototype.sin=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n return sin(x);\n");return this.compileAndRun(t,[e])},t.prototype.cos=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n return cos(x);\n");return this.compileAndRun(t,[e])},t.prototype.tan=function(e){var t=new Ra(e.shape,"return tan(x);");return this.compileAndRun(t,[e])},t.prototype.asin=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n");return this.compileAndRun(t,[e])},t.prototype.acos=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n");return this.compileAndRun(t,[e])},t.prototype.atan=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n return atan(x);\n");return this.compileAndRun(t,[e])},t.prototype.atan2=function(e,t){var n=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("\n vec4 result = atan(a, b);\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",e.shape,t.shape):new Go("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return atan(a, b);\n",e.shape,t.shape);return this.compileAndRun(n,[e,t])},t.prototype.sinh=function(e){var t=new Ra(e.shape,"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n");return this.compileAndRun(t,[e])},t.prototype.cosh=function(e){var t=new Ra(e.shape,"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n");return this.compileAndRun(t,[e])},t.prototype.tanh=function(e){var t=new Ra(e.shape,"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n");return this.compileAndRun(t,[e])},t.prototype.asinh=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;return log(x + sqrt(x * x + 1.0));");return this.compileAndRun(t,[e])},t.prototype.acosh=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n if (x < 1.0) return NAN;\n return log(x + sqrt(x * x - 1.0));");return this.compileAndRun(t,[e])},t.prototype.atanh=function(e){var t=new Ra(e.shape,"if (isnan(x)) return x;\n if ((x < -1.0) || (x > 1.0)) return NAN;\n return (log(1.0 + x) - log(1.0 - x)) / 2.0;");return this.compileAndRun(t,[e])},t.prototype.erf=function(e){var t=new Ra(e.shape,'\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = 0.3275911;\n float a1 = 0.254829592;\n float a2 = -0.284496736;\n float a3 = 1.421413741;\n float a4 = -1.453152027;\n float a5 = 1.061405429;\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n');return this.compileAndRun(t,[e])},t.prototype.step=function(e,t){var n=new Ra(e.shape,function(e){return void 0===e&&(e=0),Na+"\n return x > 0.0 ? 1.0 : float("+e+");\n "}(t));return this.compileAndRun(n,[e])},t.prototype.conv2dByMatMul=function(e,t,n,r,o,i){var a=e.shape,s=this.texData.get(e.dataId),u=n.inChannels,c=a[0]*a[1]*a[2],l=n.outChannels,d="channelsLast"===n.dataFormat,p=(1===c||1===l)&&u>1e3,h=a[2]%2!=0&&!!s.isPacked;if(p||!f().getBool("WEBGL_LAZILY_UNPACK")||!f().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!h){var v=d?a[0]*a[1]*a[2]:a[0]*a[2]*a[3],m=this.reshape(e,[1,v,n.inChannels]),g=this.reshape(t,[1,n.inChannels,n.outChannels]);return this.reshape(this.fusedBatchMatMul({a:m,b:g,transposeA:!1,transposeB:!1,bias:r,activation:o,preluActivationWeights:i}),n.outShape)}var y=d?a[0]*a[1]*(a[2]+1):a[0]*a[2]*(a[3]+1),b={dataId:e.dataId,shape:[1,y,n.inChannels],dtype:e.dtype},w=s.shape;s.shape=s.shape.slice(),s.shape[s.shape.length-2]++,k(Tt(s.shape,b.shape),(function(){return"packed reshape "+s.shape+" to "+b.shape+" isn't free"}));var x=this.reshape(t,[1,n.inChannels,n.outChannels]),E=this.fusedBatchMatMul({a:b,b:x,transposeA:!1,transposeB:!1,bias:r,activation:o,preluActivationWeights:i}),C=this.texData.get(E.dataId);return k(C.isPacked,(function(){return"batchMatMul result is expected to be packed"})),s.shape=w,C.shape=n.outShape,je.makeTensorFromDataId(E.dataId,n.outShape,E.dtype)},t.prototype.conv2dWithIm2Row=function(e,t,n,r,o,i){var a=n.filterWidth,s=n.filterHeight,u=n.inChannels,c=n.outWidth,l=n.outHeight,f="channelsLast"===n.dataFormat,d=a*s*u,p=l*c,h=[d,p],v=e.squeeze([0]),m=t.reshape([1,d,-1]),g=new Gi(h,v.shape,n),y=this.compileAndRun(g,[v]).reshape([1,h[0],h[1]]),b=null!=r,w=null!=i,x=o?Ya(o,!0):null,E=new ea(y.shape,[1,p,n.outChannels],!0,!1,b,x,w),C=[y,m];r&&C.push(r),w&&C.push(i);var k=this.compileAndRun(E,C);return f?k.reshape([1,l,c,n.outChannels]):k.reshape([1,n.outChannels,l,c])},t.prototype.fusedConv2d=function(e){var t=e.input,n=e.filter,r=e.convInfo,o=e.bias,i=e.activation,a=e.preluActivationWeights;if(1===r.filterHeight&&1===r.filterWidth&&1===r.dilationHeight&&1===r.dilationWidth&&1===r.strideHeight&&1===r.strideWidth&&("SAME"===r.padInfo.type||"VALID"===r.padInfo.type))return this.conv2dByMatMul(t,n,r,o,i,a);if(f().getBool("WEBGL_CONV_IM2COL")&&1===t.shape[0])return this.conv2dWithIm2Row(t,n,r,o,i,a);var s=null!=o,u=null!=a,c=i?Ya(i,!1):null,l=new ci(r,s,c,u),d=[t,n];return o&&d.push(o),a&&d.push(a),this.compileAndRun(l,d)},t.prototype.conv2d=function(e,t,n){if(1===n.filterHeight&&1===n.filterWidth&&1===n.dilationHeight&&1===n.dilationWidth&&1===n.strideHeight&&1===n.strideWidth&&("SAME"===n.padInfo.type||"VALID"===n.padInfo.type))return this.conv2dByMatMul(e,t,n);if(f().getBool("WEBGL_CONV_IM2COL")&&1===e.shape[0])return this.conv2dWithIm2Row(e,t,n);var r=new ci(n);return this.compileAndRun(r,[e,t])},t.prototype.conv2dDerInput=function(e,t,n){var r=new oi(n);return this.compileAndRun(r,[e,t])},t.prototype.conv2dDerFilter=function(e,t,n){var r=new ri(n);return this.compileAndRun(r,[e,t])},t.prototype.fusedDepthwiseConv2D=function(e){var t,n=e.input,r=e.filter,o=e.convInfo,i=e.bias,a=e.activation,s=e.preluActivationWeights,u=f().getBool("WEBGL_PACK_DEPTHWISECONV")&&o.strideWidth<=2&&o.outChannels/o.inChannels==1,c=a?Ya(a,u):null,l=[n,r],d=null!=i,p=null!=s;return d&&l.push(i),p&&l.push(s),u?(t=new di(o,d,c,p),this.compileAndRun(t,l)):(t=new fi(o,d,c,p),this.compileAndRun(t,l))},t.prototype.depthwiseConv2D=function(e,t,n){var r;return f().getBool("WEBGL_PACK_DEPTHWISECONV")&&n.strideWidth<=2&&n.outChannels/n.inChannels==1?(r=new di(n),this.compileAndRun(r,[e,t])):(r=new fi(n),this.compileAndRun(r,[e,t]))},t.prototype.depthwiseConv2DDerInput=function(e,t,n){var r=new ui(n);return this.compileAndRun(r,[e,t])},t.prototype.depthwiseConv2DDerFilter=function(e,t,n){var r=new si(n);return this.compileAndRun(r,[e,t])},t.prototype.conv3d=function(e,t,n){var r=new li(n);return this.compileAndRun(r,[e,t])},t.prototype.conv3dDerInput=function(e,t,n){var r=new ai(n);return this.compileAndRun(r,[e,t])},t.prototype.conv3dDerFilter=function(e,t,n){var r=new ii(n);return this.compileAndRun(r,[e,t])},t.prototype.maxPool=function(e,t){var n=new aa(t,"max",!1);return this.compileAndRun(n,[e])},t.prototype.avgPool=function(e,t){var n=new aa(t,"avg",!1);return this.compileAndRun(n,[e],"float32")},t.prototype.maxPoolBackprop=function(e,t,n,r){var o=new aa(r,"max",!0),i=this.compileAndRun(o,[t]),a=new Qi(r),s=this.compileAndRun(a,[e,i],t.dtype);return i.dispose(),s},t.prototype.avgPoolBackprop=function(e,t,n){var r=new Bo(n);return this.compileAndRun(r,[e],t.dtype)},t.prototype.cast=function(e,t){return Jr(e,t,this)},t.prototype.unstack=function(e,t){for(var n=e.shape[t],r=new Array(e.rank-1),o=0,i=0;i<e.rank;i++)i!==t&&(r[o++]=e.shape[i]);var a=new Array(e.rank).fill(0),s=e.shape.slice();s[t]=1;var u=new Array(n);for(i=0;i<u.length;i++)a[t]=i,u[i]=this.slice(e,a,s).reshape(r);return u},t.prototype.avgPool3d=function(e,t){var n=new sa(t,"avg",!1);return this.compileAndRun(n,[e],"float32")},t.prototype.avgPool3dBackprop=function(e,t,n){var r=new Uo(n);return this.compileAndRun(r,[e],t.dtype)},t.prototype.maxPool3d=function(e,t){var n=new sa(t,"max",!1);return this.compileAndRun(n,[e],"float32")},t.prototype.maxPool3dBackprop=function(e,t,n,r){var o=new sa(r,"max",!0),i=this.compileAndRun(o,[t]),a=new Zi(r),s=this.compileAndRun(a,[e,i],t.dtype);return i.dispose(),s},t.prototype.reshape=function(e,t){var n=this.texData.get(e.dataId);if(n.isPacked&&!Tt(e.shape,t)&&(null===n.texture||!Tt(n.shape,t))){var r=this.packedReshape(e,t);return je.makeTensorFromDataId(r.dataId,r.shape,r.dtype)}return Qr(e,t)},t.prototype.resizeBilinear=function(e,t,n,r){var o=f().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new da(e.shape,t,n,r):new fa(e.shape,t,n,r);return this.compileAndRun(o,[e],"float32")},t.prototype.resizeBilinearBackprop=function(e,t,n){var r=new la(e,t,n);return this.compileAndRun(r,[e])},t.prototype.resizeNearestNeighbor=function(e,t,n,r){var o=new ha(e.shape,t,n,r);return this.compileAndRun(o,[e])},t.prototype.resizeNearestNeighborBackprop=function(e,t,n){var r=new pa(e,t,n);return this.compileAndRun(r,[e])},t.prototype.multinomial=function(e,t,n,r){var o=t?e:Ar(e),i=o.shape[0],a=o.shape[1],s=new ta(i,a,n),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[o],"int32",u)},t.prototype.oneHot=function(e,t,n,r){var o=new na(e.size,t,n,r);return this.compileAndRun(o,[e])},t.prototype.diag=function(e){var t=new bi(e.size);return this.compileAndRun(t,[e])},t.prototype.nonMaxSuppression=function(e,t,n,r,o){return Wt("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),ao(e.dataSync(),t.dataSync(),n,r,o)},t.prototype.cropAndResize=function(e,t,n,r,o,i){var a=new pi(e.shape,t.shape,r,o,i);return this.compileAndRun(a,[e,t,n],"float32")},t.prototype.depthToSpace=function(e,t,n){k(t>1,(function(){return"blockSize should be > 1 for depthToSpace, but was: "+t}));var r=e.shape[0],o="NHWC"===n?e.shape[1]:e.shape[2],i="NHWC"===n?e.shape[2]:e.shape[3],a="NHWC"===n?e.shape[3]:e.shape[1],s=o*t,u=i*t,c=a/(t*t),l=new yi("NHWC"===n?[r,s,u,c]:[r,c,s,u],t,n);return this.compileAndRun(l,[e])},t.prototype.split=function(e,t,n){return po(e,t,n)},t.prototype.scatterND=function(e,t,n){var r=Er(0,e,n),o=r.sliceRank,i=r.numUpdates,a=r.sliceSize,s=r.strides,u=r.outputSize,c=[u/a,a],l=e.reshape([i,o]),f=t.reshape([i,a]);if(0===u)return Qr(cn([]),n);var d=fn(0),p=new ga(i,o,l.rank,f.rank,s,c);return this.compileAndRun(p,[f,l,d]).reshape(n)},t.prototype.sparseToDense=function(e,t,n,r){var o=Er(0,e,n),i=o.sliceRank,a=o.numUpdates,s=o.strides,u=o.outputSize,c=new ga(a,i,e.rank,t.rank,s,[u,1],!1);return this.compileAndRun(c,[t,e,r]).reshape(n)},t.prototype.fft=function(e){return this.fftImpl(e,!1)},t.prototype.ifft=function(e){return this.fftImpl(e,!0)},t.prototype.fftImpl=function(e,t){var n=this.texData.get(e.dataId),r=new ki("return real * expR - imag * expI;",e.shape,t),o=new ki("return real * expI + imag * expR;",e.shape,t),i=[this.makeComplexComponentTensorInfo(e,n.complexTensors.real),this.makeComplexComponentTensorInfo(e,n.complexTensors.imag)],a=this.compileAndRun(r,i),s=this.compileAndRun(o,i),u=this.complex(a,s).as2D(e.shape[0],e.shape[1]);return a.dispose(),s.dispose(),u},t.prototype.gatherND=function(e,t){var n=t.shape,r=n[n.length-1],o=yr(e,t),i=o[0],a=o[1],s=o[2],u=o[3],c=t.reshape([a,r]),l=e.reshape([e.size/s,s]),f=new _i(r,u,[a,s]);return this.compileAndRun(f,[l,c]).reshape(i)},t.prototype.fill=function(e,t,n){if("string"===(n=n||X(t))){var r=B(n,T(e));return r.fill(t),je.makeTensor(r,e,n,this)}var o=new Oi(e,t),i=o.getCustomSetupFunc(t);return this.compileAndRun(o,[],n,i)},t.prototype.onesLike=function(e){if("string"===e.dtype)throw new Error("onesLike is not supported under string dtype");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){return this.fill(e.shape,"string"===e.dtype?"":0,e.dtype)},t.prototype.linspace=function(e,t,n){return Zr(e,t,n)},t.prototype.makeTensorInfo=function(e,t){var n=this.write(null,e,t);return this.texData.get(n).usage=null,{dataId:n,shape:e,dtype:t}},t.prototype.makeOutput=function(e,t){var n=this.makeTensorInfo(e,t).dataId;return je.makeTensorFromDataId(n,e,t,this)},t.prototype.unpackTensor=function(e){var t=new Ga(e.shape);return this.runWebGLProgram(t,[e],e.dtype)},t.prototype.packTensor=function(e){var t=new ra(e.shape);return this.runWebGLProgram(t,[e],e.dtype,null,!0)},t.prototype.packedReshape=function(e,t){var n=[Ct(e.shape)].concat(kt(e.shape)),r={dtype:e.dtype,shape:n,dataId:e.dataId},o=[Ct(t)].concat(kt(t)),i=new ca(o,n),a=this.runWebGLProgram(i,[r],e.dtype,null,!0);return{dataId:a.dataId,shape:t,dtype:a.dtype}},t.prototype.decode=function(e){var t,n=this.texData.get(e),r=n.isPacked,o=n.shape,i=n.dtype,a=Ot(o);return t=r?new gi(a):new mi(a),{dtype:i,shape:o,dataId:this.runWebGLProgram(t,[{shape:a,dtype:i,dataId:e}],i,null,!0).dataId}},t.prototype.runWebGLProgram=function(e,t,n,r,o){var i=this;void 0===o&&(o=!1);var a=this.makeTensorInfo(e.outputShape,n),s=this.texData.get(a.dataId);if(e.packedOutput&&(s.isPacked=!0),e.outPackingScheme===Le.DENSE){var u=qe(e.outputShape);s.texShape=u.map((function(e){return 2*e}))}if(null!=e.outTexUsage&&(s.usage=e.outTexUsage),0===T(a.shape))return s.values=L(a.dtype,0),a;var c=[],l=t.map((function(t){if("complex64"===t.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var n=i.texData.get(t.dataId);if(null==n.texture){if(!e.packedInputs&&T(t.shape)<=f().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:t.shape,texData:null,isUniform:!0,uniformValues:n.values};e.packedInputs&&(n.isPacked=!0,n.shape=t.shape)}else if(!!n.isPacked!=!!e.packedInputs)t=n.isPacked?i.unpackTensor(t):i.packTensor(t),c.push(t),n=i.texData.get(t.dataId);else if(n.isPacked&&!Tt(n.shape,t.shape)){var r=t,o=t.shape;t.shape=n.shape,t=i.packedReshape(t,o),c.push(t),n=i.texData.get(t.dataId),r.shape=o}return i.uploadToGPU(t.dataId),{shape:t.shape,texData:n,isUniform:!1}}));this.uploadToGPU(a.dataId);var d,p={shape:a.shape,texData:s,isUniform:!1},h=function(e,t,n){var r="";t.concat(n).forEach((function(e){var t=null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0,n=e.isUniform?"uniform":e.texData.texShape;r+=e.shape+"_"+n+"_"+t}));var o=e.userCode;return e.constructor.name+"_"+r+"_"+o}(e,l,p),v=this.getAndSaveBinary(h,(function(){return function(e,t,n,r){var o=t.userCode,i=n.map((function(e,n){var r={logicalShape:e.shape,texShape:e.isUniform?null:e.texData.texShape,isUniform:e.isUniform,isPacked:!e.isUniform&&e.texData.isPacked,flatOffset:null};return null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0&&(r.flatOffset=e.texData.slice.flatOffset),{name:t.variableNames[n],shapeInfo:r}})),a=i.map((function(e){return e.shapeInfo})),s={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},u=So(i,s,o,t.packedInputs),c=e.createProgram(u),l=null,d=e.getUniformLocation(c,"NAN",!1);1===f().getNumber("WEBGL_VERSION")&&(l=e.getUniformLocation(c,"INFINITY",!1));for(var p={},h=0;h<t.variableNames.length;h++){var v=t.variableNames[h];p[v]=e.getUniformLocation(c,v,!1),p["offset"+v]=e.getUniformLocation(c,"offset"+v,!1)}return{program:t,source:u,webGLProgram:c,uniformLocations:p,inShapeInfos:a,outShapeInfo:s,infLoc:l,nanLoc:d}}(i.gpgpu,e,l,p)})),m=null!=this.activeTimers;if(m&&(d=this.startTimer()),function(e,t,n,r,o){Ki(t.inShapeInfos,n),Ki([t.outShapeInfo],[r]);var i=r.texData.texture,a=r.texData.texShape;r.texData.isPacked?e.setOutputPackedMatrixTexture(i,a[0],a[1]):e.setOutputMatrixTexture(i,a[0],a[1]),e.setProgram(t.webGLProgram),1===f().getNumber("WEBGL_VERSION")&&null!==t.infLoc&&e.gl.uniform1f(t.infLoc,1/0),null!==t.nanLoc&&e.gl.uniform1f(t.nanLoc,NaN),n.forEach((function(n,r){var o=t.program.variableNames[r],i=t.uniformLocations[o],a=t.uniformLocations["offset"+o];if(null!=i)if(n.isUniform)if(T(n.shape)<2)e.gl.uniform1f(i,n.uniformValues[0]);else{var s=n.uniformValues;s instanceof Float32Array||(s=new Float32Array(s)),e.gl.uniform1fv(i,s)}else null!=n.texData.slice&&null!=a&&e.gl.uniform1i(a,n.texData.slice.flatOffset),e.setInputMatrixTexture(n.texData.texture,i,r)})),null!=o&&o(e,t.webGLProgram),e.executeProgram()}(this.gpgpu,v,l,p,r),c.forEach((function(e){return i.disposeData(e.dataId)})),m&&(d=this.endTimer(d),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(d)})),!f().getBool("WEBGL_LAZILY_UNPACK")&&s.isPacked&&!1===o){var g=this.unpackTensor(a);return this.disposeData(a.dataId),g}return a},t.prototype.compileAndRun=function(e,t,n,r,o){void 0===o&&(o=!1),n=n||t[0].dtype;var i=this.runWebGLProgram(e,t,n,r,o);return je.makeTensorFromDataId(i.dataId,i.shape,i.dtype)},t.prototype.getAndSaveBinary=function(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),this.binaryCache[e]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){var e=this;this.disposed||(f().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach((function(t){e.gpgpu.deleteProgram(e.binaryCache[t].webGLProgram),delete e.binaryCache[t]})),this.textureManager.dispose(),null!=this.canvas&&"undefined"!=typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var e=this;return null==this.floatPrecisionValue&&(this.floatPrecisionValue=zt((function(){if(!f().get("WEBGL_RENDER_FLOAT32_ENABLED")){var t=f().getBool("DEBUG");f().set("DEBUG",!1);var n=e.abs(fn(1e-8)).dataSync()[0];if(f().set("DEBUG",t),n>0)return 32}return 16}))),this.floatPrecisionValue},t.prototype.epsilon=function(){return 32===this.floatPrecision()?1e-7:1e-4},t.prototype.uploadToGPU=function(e){var t,n=this.texData.get(e),r=n.shape,o=n.dtype,i=n.values,a=n.texture,s=n.usage,u=n.isPacked;if(null==a){var c,l=null!=this.activeTimers;l&&(c=re());var f=n.texShape;if(null==f&&(f=St(r,u),n.texShape=f),null!=i){var d=Ot(r),p=void 0,h=f[1],v=f[0],m=i instanceof Uint8Array;u?(h=(t=Ke(f[0],f[1]))[0],v=t[1],p=new Ci(d,[v,h],m)):p=new Ei(d,[v,h],m);var g=this.makeTensorInfo([v,h],o);this.texData.get(g.dataId).usage=m?Be.PIXELS:Be.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(g.dataId),h,v,i);var y=this.runWebGLProgram(p,[g],o,null,!0),b=this.texData.get(y.dataId);n.texture=b.texture,n.texShape=b.texShape,n.isPacked=b.isPacked,n.usage=b.usage,this.disposeData(g.dataId),this.texData.delete(y.dataId),n.values=null,l&&(this.uploadWaitMs+=re()-c)}else{var w=this.acquireTexture(f,s,o,u);n.texture=w}}},t.prototype.convertAndCacheOnCPU=function(e,t){var n=this.texData.get(e),r=n.dtype;return this.releaseGPUData(e),null!=t&&(n.values=function(e,t){if("float32"===t||"complex64"===t)return e;if("int32"===t||"bool"===t){for(var n="int32"===t?new Int32Array(e.length):new Uint8Array(e.length),r=0;r<n.length;++r)n[r]=Math.round(e[r]);return n}throw new Error("Unknown dtype "+t)}(t,r)),n.values},t.prototype.acquireTexture=function(e,t,n,r){if(this.numBytesInGPU+=this.computeBytes(e,n),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){var o=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+o+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,t,r)},t.prototype.computeBytes=function(e,t){return e[0]*e[1]*H(t)},t}(Mr);De()&&je.registerBackend("webgl",(function(){return new Ja}),2);var Qa=on({square_:function(e){var t=qt(e,"x","square"),n=[t];return je.runKernelFunc((function(e,n){return n([t]),e.square(t)}),{x:t},null,"Square",{},n,[])}}),Za="SquaredDifference",es=on({squaredDifference_:function(e,t){var n,r=qt(e,"a","squaredDifference"),o=qt(t,"b","squaredDifference");n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape);var i={a:r,b:o},a=[r,o];return je.runKernelFunc((function(e,t){var n=e.squaredDifference(r,o);return t([r,o]),n}),i,(function(e,t){var n=t[0],r=t[1],o=fn(2);return{a:function(){return e.mul(n.sub(r).mul(o))},b:function(){return e.mul(r.sub(n).mul(o))}}}),Za,{},a,[])}}),ts=on({abs_:function(e){var t=qt(e,"x","abs");return"complex64"===t.dtype?je.runKernelFunc((function(e){return e.complexAbs(t)}),{$x:t}):je.runKernelFunc((function(e,n){var r=e.abs(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.mul(n.toFloat().step(-1))}}}),"Abs")}}),ns=on({acos_:function(e){var t=qt(e,"x","acos");return je.runKernelFunc((function(e,n){var r=e.acos(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(fn(1).sub(n.toFloat().square()).sqrt()).neg()}}}))}}),rs=on({acosh_:function(e){var t=qt(e,"x","acosh");return je.runKernelFunc((function(e,n){var r=e.acosh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(n.toFloat().square().sub(1).sqrt())}}}))}}),os=on({asin_:function(e){var t=qt(e,"x","asin");return je.runKernelFunc((function(e,n){var r=e.asin(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(fn(1).sub(n.toFloat().square()).sqrt())}}}))}}),is=on({asinh_:function(e){var t=qt(e,"x","asinh");return je.runKernelFunc((function(e,n){var r=e.asinh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.divStrict(fn(1).add(n.toFloat().square()).sqrt())}}}))}}),as=on({atan_:function(e){var t=qt(e,"x","atan");return je.runKernelFunc((function(e,n){var r=e.atan(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.toFloat().square().add(1))}}}))}}),ss=on({atanh_:function(e){var t=qt(e,"x","atanh");return je.runKernelFunc((function(e,n){var r=e.atanh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(fn(1).sub(n.toFloat().square()))}}}))}}),us=on({ceil_:function(e){var t=qt(e,"x","ceil");return je.runKernelFunc((function(e){return e.ceil(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),cs=on({clipByValue_:function(e,t,n){var r=qt(e,"x","clipByValue");k(t<=n,(function(){return"Error in clip: min ("+t+") must be less than or equal to max ("+n+")."}));var o=[r],i={min:t,max:n};return je.runKernelFunc((function(e,o){var i=e.clip(r,t,n);return o([r]),i}),{x:r},(function(e,r){var o=r[0];return{x:function(){return e.where(o.greaterEqual(t).logicalAnd(o.lessEqual(n)),xn(e))}}}),"ClipByValue",i,o)}}),ls=on({cos_:function(e){var t=qt(e,"x","cos"),n=[t];return je.runKernelFunc((function(e,n){var r=e.cos(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return n.toFloat().sin().neg().mul(e)}}}),"Cos",{},n)}}),fs=on({cosh_:function(e){var t=qt(e,"x","cosh");return je.runKernelFunc((function(e,n){var r=e.cosh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return n.toFloat().sinh().mulStrict(e)}}}))}}),ds=on({erf_:function(e){var t=qt(e,"x","erf");return k("int32"===t.dtype||"float32"===t.dtype,(function(){return"Input dtype must be `int32` or `float32`."})),"int32"===t.dtype&&(t=t.toFloat()),je.runKernelFunc((function(e,n){var r=e.erf(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}}))}}),ps=on({exp_:function(e){var t=qt(e,"x","exp");return je.runKernelFunc((function(e,n){var r=e.exp(t);return n([r]),r}),{x:t},(function(e,t){return{x:function(){return e.mulStrict(t[0])}}}),"Exp",{},[],[!0])}}),hs=on({expm1_:function(e){var t=qt(e,"x","expm1");return je.runKernelFunc((function(e,n){var r=e.expm1(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.exp())}}}))}}),vs=on({floor_:function(e){var t=qt(e,"x","floor");return je.runKernelFunc((function(e){return e.floor(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),ms=on({log_:function(e){var t=qt(e,"x","log"),n=[t];return je.runKernelFunc((function(e,n){var r=e.log(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.div(n.toFloat())}}}),"Log",{},n)}}),gs=on({log1p_:function(e){var t=qt(e,"x","log1p");return je.runKernelFunc((function(e,n){var r=e.log1p(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.add(1))}}}))}}),ys=on({logSigmoid_:function(e){var t=qt(e,"x","logSigmoid");return je.runKernelFunc((function(e,n){var r=e.softplus(t.neg()).neg();return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.neg().sigmoid())}}}))}}),bs=on({neg_:function(e){var t=qt(e,"x","neg"),n=[t];return je.runKernelFunc((function(e){return e.neg(t)}),{x:t},(function(e){return{x:function(){return e.neg()}}}),"Neg",{},n)}}),ws=on({reciprocal_:function(e){var t=qt(e,"x","reciprocal");return je.runKernelFunc((function(e,n){var r=e.reciprocal(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.square().neg())}}}))}}),xs=on({round_:function(e){var t=qt(e,"x","round");return je.runKernelFunc((function(e){return e.round(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),Es=on({rsqrt_:function(e){var t=qt(e,"x","rsqrt"),n=[t];return je.runKernelFunc((function(e,n){var r=e.rsqrt(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.div(n.pow(1.5).mul(2)).neg()}}}),"Rsqrt",{},n)}}),Cs=on({sigmoid_:function(e){var t=qt(e,"x","sigmoid");return je.runKernelFunc((function(e,n){var r=e.sigmoid(t);return n([r]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.mul(n.mul(fn(1).sub(n)))}}}),"Sigmoid")}}),ks=on({sign_:function(e){var t=qt(e,"x","sign");return je.runKernelFunc((function(e){return e.sign(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),Os=on({isNaN_:function(e){var t=qt(e,"x","isNaN");return je.runKernelFunc((function(e){return e.isNaN(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),Ss=on({isInf_:function(e){var t=qt(e,"x","isInf");return je.runKernelFunc((function(e){return e.isInf(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),_s=on({isFinite_:function(e){var t=qt(e,"x","isFinite");return je.runKernelFunc((function(e){return e.isFinite(t)}),{$x:t},(function(e){return{$x:function(){return xn(e)}}}))}}),Ts=on({sin_:function(e){var t=qt(e,"x","sin"),n=[t];return je.runKernelFunc((function(e,n){var r=e.sin(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return n.toFloat().cos().mul(e)}}}),"Sin",{},n)}}),Is=on({sinh_:function(e){var t=qt(e,"x","sinh");return je.runKernelFunc((function(e,n){var r=e.sinh(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return n.toFloat().cosh().mulStrict(e)}}}))}}),Ps=on({softplus_:function(e){var t=qt(e,"x","softplus");return je.runKernelFunc((function(e,n){var r=e.softplus(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.mul(n.sigmoid())}}}))}}),As=on({sqrt_:function(e){var t=qt(e,"x","sqrt");return je.runKernelFunc((function(e,n){var r=e.sqrt(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.toFloat().sqrt().mul(2))}}}))}}),Rs=on({step_:function(e,t){void 0===t&&(t=0);var n=qt(e,"x","step");return je.runKernelFunc((function(e){return e.step(n,t)}),{$x:n},(function(e){return{$x:function(){return xn(e)}}}))}}),Ns=on({tan_:function(e){var t=qt(e,"x","tan");return je.runKernelFunc((function(e,n){var r=e.tan(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return e.div(n.cos().square())}}}))}}),Ms=on({tanh_:function(e){var t=qt(e,"x","tanh");return je.runKernelFunc((function(e,n){var r=e.tanh(t);return n([r]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return fn(1).sub(n.square()).mulStrict(e)}}}),"Tanh",{},null,[!0])}});function js(e,t,n,r,o,i){var a,s,u=qt(e,"x","batchNorm"),c=qt(t,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=o&&(a=qt(o,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),k(2===u.rank,(function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+u.rank+"."})),k(2===c.rank||1===c.rank,(function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+c.rank+"."})),k(2===l.rank||1===l.rank,(function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+l.rank+"."})),null!=a&&k(2===a.rank||1===a.rank,(function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+a.rank+"."})),null!=s&&k(2===s.rank||1===s.rank,(function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+s.rank+"."})),Ls(u,c,l,s,a,i)}function Ds(e,t,n,r,o,i){var a,s,u=qt(e,"x","batchNorm"),c=qt(t,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=o&&(a=qt(o,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),k(3===u.rank,(function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+u.rank+"."})),k(3===c.rank||1===c.rank,(function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+c.rank+"."})),k(3===l.rank||1===l.rank,(function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+l.rank+"."})),null!=a&&k(3===a.rank||1===a.rank,(function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+a.rank+"."})),null!=s&&k(3===s.rank||1===s.rank,(function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+s.rank+"."})),Ls(u,c,l,s,a,i)}function Fs(e,t,n,r,o,i){var a,s,u=qt(e,"x","batchNorm"),c=qt(t,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=o&&(a=qt(o,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),k(4===u.rank,(function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+u.rank+"."})),k(4===c.rank||1===c.rank,(function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+c.rank+"."})),k(4===l.rank||1===l.rank,(function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+l.rank+"."})),null!=a&&k(4===a.rank||1===a.rank,(function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+a.rank+"."})),null!=s&&k(4===s.rank||1===s.rank,(function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+s.rank+"."})),Ls(u,c,l,s,a,i)}function Ls(e,t,n,r,o,i){null==i&&(i=.001);var a,s,u,c=qt(e,"x","batchNorm"),l=qt(t,"mean","batchNorm"),f=qt(n,"variance","batchNorm");null!=o&&(a=qt(o,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),k(l.rank===f.rank,(function(){return"Batch normalization gradient requires mean and variance to have equal ranks."})),k(null==s||l.rank===s.rank,(function(){return"Batch normalization gradient requires mean and offset to have equal ranks."})),k(null==a||l.rank===a.rank,(function(){return"Batch normalization gradient requires mean and scale to have equal ranks."})),u=0===c.rank||1===c.rank?c.as4D(1,1,1,c.size):2===c.rank?c.as4D(1,1,c.shape[0],c.shape[1]):3===c.rank?c.as4D(1,c.shape[0],c.shape[1],c.shape[2]):c;var d=[c,l,f,a];return je.runKernelFunc((function(e,t){var n=e.batchNormalization(u,Bs(l),Bs(f),i,Bs(a),Bs(s));return t([c,l,f,a]),n}),{x:c,mean:l,variance:f,scale:a,offset:s},(function(e,t){var n=t,r=n[0],o=n[1],a=n[2],s=n[3],c=null==s?fn(1):s,l=Fr(o.shape,u.shape),f=[];if(1===o.rank){for(var d=0;d<u.shape.length-1;++d)f.push(u.shape[d]);f.push(1)}var p=r.sub(o),h=e.mul(c),v=Es(a.add(fn(i))),m=v.mul(v).mul(v).mul(fn(-.5));return{x:function(){return 1===o.rank?e.mul(lr(v.as4D(1,1,1,o.shape[0]),f)).mul(c).reshape(r.shape):e.mul(v).mul(c).reshape(r.shape)},mean:function(){var e=v.mul(fn(-1)).mul(h);return 1===o.rank&&(e=e.sum(l)),e.reshape(o.shape)},variance:function(){var e=m.mul(p).mul(h);return 1===o.rank&&(e=e.sum(l)),e.reshape(o.shape)},scale:function(){var t=p.mul(v),n=e.mul(t);return 1===o.rank&&(n=n.sum(l)),n.reshape(o.shape)},offset:function(){var t=e;return 1===o.rank&&(t=t.sum(l)),t.reshape(o.shape)}}}),"BatchNormalization",{varianceEpsilon:i},d).reshape(c.shape)}function Bs(e){return null==e?null:0===e.rank?e.as1D():1===e.rank?e:2===e.rank?e.as4D(1,1,e.shape[0],e.shape[1]):3===e.rank?e.as4D(1,e.shape[0],e.shape[1],e.shape[2]):e}function Us(){Ut("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var zs=on({batchNormalization2d_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),Us(),js(e,t,n,i,o,r)}}),Vs=on({batchNormalization3d_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),Us(),Ds(e,t,n,i,o,r)}}),Ws=on({batchNormalization4d_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),Us(),Fs(e,t,n,i,o,r)}}),Hs=on({batchNormalization_:function(e,t,n,r,o,i){return void 0===r&&(r=.001),Us(),Ls(e,t,n,i,o,r)}}),$s=on({batchNorm_:Ls}),qs=on({batchNorm2d_:js}),Ks=on({batchNorm3d_:Ds}),Gs=on({batchNorm4d_:Fs}),Xs=on({logicalAnd_:function(e,t){var n=qt(e,"a","logicalAnd","bool"),r=qt(t,"b","logicalAnd","bool");return Lr(n.shape,r.shape),je.runKernelFunc((function(e){return e.logicalAnd(n,r)}),{a:n,b:r},null,"LogicalAnd")}}),Ys=on({logicalNot_:function(e){var t=qt(e,"x","logicalNot","bool");return je.runKernelFunc((function(e){return e.logicalNot(t)}),{$x:t})}}),Js=on({logicalOr_:function(e,t){var n=qt(e,"a","logicalOr","bool"),r=qt(t,"b","logicalOr","bool");return Lr(n.shape,r.shape),je.runKernelFunc((function(e){return e.logicalOr(n,r)}),{$a:n,$b:r})}}),Qs=on({logicalXor_:function(e,t){var n=qt(e,"a","logicalXor","bool"),r=qt(t,"b","logicalXor","bool");return Lr(n.shape,r.shape),Js(e,t).logicalAnd(Xs(e,t).logicalNot())}}),Zs=on({where_:function(e,t,n){var r=qt(t,"a","where"),o=qt(n,"b","where"),i=qt(e,"condition","where","bool");return O(r.shape,o.shape,"Error in where: "),1===i.rank?k(i.shape[0]===r.shape[0],(function(){return"The first dimension of `a` must match the size of `condition`."})):O(i.shape,o.shape,"Error in where: "),je.runKernelFunc((function(e,t){var n=e.select(i,r,o);return t([i]),n}),{$condition:i,$a:r,$b:o},(function(e,t){var n=t[0];return{$condition:function(){return xn(n).toFloat()},$a:function(){return e.mul(n.cast(e.dtype))},$b:function(){return e.mul(n.logicalNot().cast(e.dtype))}}}))}}),eu=function(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){switch(o.label){case 0:return[4,(t=qt(e,"condition","whereAsync","bool")).data()];case 1:return n=o.sent(),r=mo(t.shape,n),e!==t&&t.dispose(),[2,r]}}))}))},tu=on({add_:function(e,t){var n,r=qt(e,"a","add"),o=qt(t,"b","add");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e){return e.add(r,o)}),{a:r,b:o},(function(e){return{a:function(){var t=e,n=Fr(r.shape,i);return n.length>0&&(t=t.sum(n)),t.reshape(r.shape)},b:function(){var t=e,n=Fr(o.shape,i);return n.length>0&&(t=t.sum(n)),t.reshape(o.shape)}}}),"Add")}}),nu=on({addN_:function(e){k(Array.isArray(e),(function(){return"The argument passed to tf.addN() must be a list of tensors"})),k(e.length>=1,(function(){return"Must pass at least one tensor to tf.addN(), but got "+e.length}));var t=e.map((function(e,t){return qt(e,"tensors"+t,"addN")})),n=t[0];t.forEach((function(e){if(e.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")})),t.forEach((function(e){if(!I(e.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")}));var r=t;return je.runKernelFunc((function(e){return e.addN(t)}),r,(function(e){var n={};return t.forEach((function(t,r){n[r]=function(){return e.clone()}})),n}),"AddN")}}),ru=on({addStrict_:function(e,t){var n=qt(e,"a","addStrict"),r=qt(t,"b","addStrict");return O(n.shape,r.shape,"Error in addStrict: "),n.add(r)}}),ou=on({atan2_:function(e,t){var n,r=qt(e,"a","atan2"),o=qt(t,"b","atan2");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e,t){var n=e.atan2(r,o);return t([r,o]),n}),{$a:r,$b:o},(function(e,t){var n=t[0],r=t[1];return{$a:function(){var t=tu(n.square(),r.square()),o=e.mul(r.div(t)),a=Fr(n.shape,i);return a.length>0&&(o=o.sum(a)),o.reshape(n.shape)},$b:function(){var t=tu(n.square(),r.square()),o=bs(e.mul(n.div(t))),a=Fr(r.shape,i);return a.length>0&&(o=o.sum(a)),o.reshape(r.shape)}}}))}}),iu=on({div_:function(e,t){var n,r=qt(e,"a","div"),o=qt(t,"b","div");if(n=Ie(r,o),r=n[0],o=n[1],"int32"===r.dtype&&"int32"===o.dtype)return uu(r,o);var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e,t){var n=e.realDivide(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){var t=e.div(r.toFloat()),o=Fr(n.shape,i);return o.length>0?t.sum(o).reshape(n.shape):t},b:function(){var t=e.mul(n.toFloat()),o=Fr(r.shape,i);o.length>0&&(t=t.sum(o).reshape(r.shape));var a=r.square();return t.div(a.toFloat()).neg()}}}),"Div")}}),au=on({divNoNan_:function(e,t){var n,r=qt(e,"a","div"),o=qt(t,"b","div");r=(n=Ie(r,o))[0],o=n[1];var i=iu(r,o),a=xn(i),s=o.equal(a);return Zs(s,a,i)}}),su=on({divStrict_:function(e,t){var n=qt(e,"a","div"),r=qt(t,"b","div");return O(n.shape,r.shape,"Error in divideStrict: "),n.div(r)}}),uu=on({floorDiv_:function(e,t){var n,r=qt(e,"a","floorDiv"),o=qt(t,"b","floorDiv");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e,t){var n=e.floorDiv(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){var t=e.div(r.toFloat()),o=Fr(n.shape,i);return o.length>0?t.sum(o).reshape(n.shape):t},b:function(){var t=e.mul(n.toFloat()),o=Fr(r.shape,i);o.length>0&&(t=t.sum(o).reshape(r.shape));var a=r.square();return t.div(a.toFloat()).neg()}}}),"FloorDiv")}}),cu=on({maximum_:function(e,t){var n,r=qt(e,"a","maximum"),o=qt(t,"b","maximum");return n=Ie(r,o),r=n[0],o=n[1],"bool"===r.dtype&&(r=r.toInt(),o=o.toInt()),Lr(r.shape,o.shape),je.runKernelFunc((function(e,t){var n=e.maximum(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){return e.mul(n.greaterEqual(r).toFloat())},b:function(){return e.mul(n.less(r).toFloat())}}}),"Maximum")}}),lu=on({maximumStrict_:function(e,t){var n=qt(e,"a","maximumStrict"),r=qt(t,"b","maximumStrict");return O(n.shape,r.shape,"Error in maximumStrict: "),n.maximum(r)}}),fu=on({minimum_:function(e,t){var n,r=qt(e,"a","minimum"),o=qt(t,"b","minimum");return n=Ie(r,o),r=n[0],o=n[1],"bool"===r.dtype&&(r=r.toInt(),o=o.toInt()),Lr(r.shape,o.shape),je.runKernelFunc((function(e,t){var n=e.minimum(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){return e.mul(n.lessEqual(r).toFloat())},b:function(){return e.mul(n.greater(r).toFloat())}}}),"Minimum")}}),du=on({minimumStrict_:function(e,t){var n=qt(e,"a","minimumStrict"),r=qt(t,"b","minimumStrict");return O(n.shape,r.shape,"Error in minimumStrict: "),n.minimum(r)}}),pu=on({mod_:function(e,t){var n,r=qt(e,"a","mod"),o=qt(t,"b","mod");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e,t){var n=e.mod(r,o);return t([r,o]),n}),{$a:r,$b:o},(function(e,t){var n=t[0],r=t[1];return{$a:function(){var t=Fr(n.shape,i);return t.length>0?e.sum(t).reshape(n.shape):e},$b:function(){var t=e.mul(n.div(r).floor().neg()),o=Fr(r.shape,i);return o.length>0?t.sum(o).reshape(r.shape):t}}}))}}),hu=on({modStrict_:function(e,t){var n=qt(e,"a","modStrict"),r=qt(t,"b","modStrict");return O(n.shape,r.shape,"Error in modStrict: "),n.mod(r)}}),vu=on({mul_:function(e,t){var n,r=qt(e,"a","mul"),o=qt(t,"b","mul");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e,t){var n=e.multiply(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){var t=e.mul(r.toFloat()),o=Fr(n.shape,i);return o.length>0?t.sum(o).reshape(n.shape):t},b:function(){var t=e.mul(n.toFloat()),o=Fr(r.shape,i);return o.length>0?t.sum(o).reshape(r.shape):t}}}),"Mul")}}),mu=on({mulStrict_:function(e,t){var n=qt(e,"a","mul"),r=qt(t,"b","mul");return O(n.shape,r.shape,"Error in multiplyStrict: "),n.mul(r)}}),gu=on({pow_:function(e,t){var n,r=qt(e,"base","pow"),o=qt(t,"exp","pow");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape),a=[r,o];return je.runKernelFunc((function(e,t){var n=e.pow(r,o);return t([r,o,n]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1],o=t[2];return{a:function(){var t=r.toFloat(),o=e.mul(t.mul(n.pow(t.sub(fn(1))))),a=Fr(n.shape,i);return a.length>0&&(o=o.sum(a)),o.reshape(n.shape)},b:function(){var t=n.greater(0),a=n.log().where(t,xn(n)),s=e.mul(o.mul(a)),u=Fr(r.shape,i);return u.length>0&&(s=s.sum(u)),s.reshape(r.shape)}}}),"Pow",{},a,[!0])}}),yu=on({powStrict_:function(e,t){return O(e.shape,t.shape,"Error in powStrict: "),e.pow(t)}}),bu=on({squaredDifferenceStrict_:function(e,t){var n=qt(e,"a","squaredDifferenceStrict"),r=qt(t,"b","squaredDifferenceStrict");return O(n.shape,r.shape,"Error in squaredDifferenceStrict: "),n.squaredDifference(r)}}),wu=on({sub_:function(e,t){var n,r=qt(e,"a","sub"),o=qt(t,"b","sub");n=Ie(r,o),r=n[0],o=n[1];var i=Lr(r.shape,o.shape);return je.runKernelFunc((function(e){return e.subtract(r,o)}),{a:r,b:o},(function(e){return{a:function(){var t=e,n=Fr(r.shape,i);return n.length>0&&(t=t.sum(n)),t.reshape(r.shape)},b:function(){var t=e,n=Fr(o.shape,i);return n.length>0&&(t=t.sum(n)),t.neg().reshape(o.shape)}}}),"Sub")}}),xu=on({subStrict_:function(e,t){var n=qt(e,"a","subStrict"),r=qt(t,"b","subStrict");return O(n.shape,r.shape,"Error in subStrict: "),n.sub(r)}}),Eu=on({equal_:function(e,t){var n,r=qt(e,"a","equal"),o=qt(t,"b","equal");return n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape),je.runKernelFunc((function(e){return e.equal(r,o)}),{$a:r,$b:o})}}),Cu=on({equalStrict_:function(e,t){var n=qt(e,"a","equalStrict"),r=qt(t,"b","equalStrict");return O(n.shape,r.shape,"Error in equalStrict: "),n.equal(r)}}),ku=on({greater_:function(e,t){var n,r=qt(e,"a","greater"),o=qt(t,"b","greater");return n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape),je.runKernelFunc((function(e){return e.greater(r,o)}),{a:r,b:o},null,"Greater")}}),Ou=on({greaterEqual_:function(e,t){var n,r=qt(e,"a","greaterEqual"),o=qt(t,"b","greaterEqual");return n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape),je.runKernelFunc((function(e,t){var n=e.greaterEqual(r,o);return t([r,o]),n}),{a:r,b:o},(function(e,t){var n=t[0],r=t[1];return{a:function(){return xn(n)},b:function(){return xn(r)}}}),"GreaterEqual")}}),Su=on({greaterEqualStrict_:function(e,t){var n=qt(e,"a","greaterEqualStrict"),r=qt(t,"b","greaterEqualStrict");return O(n.shape,r.shape,"Error in greaterEqualStrict: "),n.greaterEqual(r)}}),_u=on({greaterStrict_:function(e,t){var n=qt(e,"a","greaterStrict"),r=qt(t,"b","greaterStrict");return O(n.shape,r.shape,"Error in greaterStrict: "),n.greater(r)}}),Tu=on({less_:function(e,t){var n,r=qt(e,"a","less"),o=qt(t,"b","less");return n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape),je.runKernelFunc((function(e){return e.less(r,o)}),{a:r,b:o},null,"Less")}}),Iu=on({lessEqual_:function(e,t){var n,r=qt(e,"a","lessEqual"),o=qt(t,"b","lessEqual");return n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape),je.runKernelFunc((function(e,t){var n=e.lessEqual(r,o);return t([r,o]),n}),{a:r,b:o},null,"LessEqual")}}),Pu=on({lessEqualStrict_:function(e,t){var n=qt(e,"a","lessEqualStrict"),r=qt(t,"b","lessEqualStrict");return O(n.shape,r.shape,"Error in lessEqualStrict: "),n.lessEqual(r)}}),Au=on({lessStrict_:function(e,t){var n=qt(e,"a","lessStrict"),r=qt(t,"b","lessStrict");return O(n.shape,r.shape,"Error in lessStrict: "),n.less(r)}}),Ru=on({notEqual_:function(e,t){var n,r=qt(e,"a","notEqual"),o=qt(t,"b","notEqual");return n=Ie(r,o),r=n[0],o=n[1],Lr(r.shape,o.shape),je.runKernelFunc((function(e){return e.notEqual(r,o)}),{a:r,b:o},null,"NotEqual")}}),Nu=on({notEqualStrict_:function(e,t){var n=qt(e,"a","notEqualStrict"),r=qt(t,"b","notEqualStrict");return O(n.shape,r.shape,"Error in notEqualStrict: "),n.notEqual(r)}});function Mu(e,t){for(var n=[],r=e;r<t;++r)n.push(r);return n}function ju(e){for(var t=[],n=0;n<e.length;++n)for(var r=0;r<e[n].length;++r)t.push(e[n][r]);return t}var Du=on({gather_:function(e,t,n){void 0===n&&(n=0);var r=qt(e,"x","gather"),o=qt(t,"indices","gather","int32");n=D(n,r.shape)[0];var i=function(e,t,n){for(var r=e.shape[n],o=[],i=1,a=1,s=0;s<n;s++)o.push(e.shape[s]),i*=e.shape[s];for(s=0;s<t.rank;s++)o.push(t.shape[s]);for(s=n+1;s<e.rank;s++)o.push(e.shape[s]),a*=e.shape[s];return{batchSize:i,sliceSize:a,dimSize:r,outputShape:o}}(r,o,n);return je.runKernelFunc((function(e,t){var i=e.gather(r,o.flatten(),n);return t([o]),i}),{x:r,indices:o},(function(e,t){var o=t[0];return{x:function(){var t=r.shape,i=o.size,a=t.slice(0,n),s=a.length,u=t.slice(n,t.length).slice(1),c=u.length,l=Mu(0,s),f=Mu(s+1,s+1+c),d=ju([a,[i],u]),p=e.reshape(d),h=o.reshape([i]),v=ju([[s],l,f]),m=p.transpose(v),g=Fu(m,h,r.shape[n]),y=en(v);return g.transpose(y)},indices:function(){return o}}}),"Gather",{axis:n}).reshape(i.outputShape)}}),Fu=on({unsortedSegmentSum_:function(e,t,n){var r=qt(e,"x","unsortedSegmentSum"),o=qt(t,"segmentIds","unsortedSegmentSum","int32");return k(P(n),(function(){return"numSegments must be of dtype int"})),je.runKernelFunc((function(e,t){var i=e.unsortedSegmentSum(r,o,n);return t([o]),i}),{$x:r},(function(e,t){var n=t[0];return{$x:function(){return function(e,t){for(var n=cu(t,xn(t)),r=Du(e,n),o=Ou(t,fn(0,"int32")),i=r.rank-o.rank,a=0;a<i;++a)o=Kn(o,a+1);o=Xs(o,mn(r.shape,"bool"));var s=xn(r);return Zs(o,r,s)}(e,n)}}}))}});function Lu(e,t,n,r,o,i,a){void 0===i&&(i="NHWC"),k(e.length===t.rank,(function(){return"Length of inShape ("+e.length+") and rank of dy ("+t.rank+") must match"}));var s=e,u=t,c=!1;3===t.rank&&(c=!0,u=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]),s=[1,e[0],e[1],e[2]]),k(4===s.length,(function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+s.length+"."})),k(4===u.rank,(function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+u.rank})),k(4===n.rank,(function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+n.rank}));var l="NHWC"===i?s[3]:s[1],f="NHWC"===i?u.shape[3]:u.shape[1];k(l===n.shape[2],(function(){return"Error in conv2dDerInput: depth of input ("+l+") must match input depth for filter "+n.shape[2]+"."})),k(f===n.shape[3],(function(){return"Error in conv2dDerInput: depth of output ("+f+") must match output depth for filter "+n.shape[3]+"."})),null!=a&&k(P(o),(function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+o+"."}));var d=Yr(i),p=zr(s,n.shape,r,1,o,a,!1,d),h=je.runKernelFunc((function(e,t){var r=e.conv2dDerInput(u,n,p);return t([n,u]),r}),{dy4D:u,filter:n},(function(e,t){var n=t[0],s=t[1];return{dy4D:function(){return Vu(e,n,r,o,i,1,a)},filter:function(){return Hu(e,s,n.shape,r,o,i,a)}}}));return c?h.as3D(h.shape[1],h.shape[2],h.shape[3]):h}function Bu(e){var t=function(e){return"number"==typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}(e),n=t[0],r=t[1],o=t[2];return 1===n&&1===r&&1===o}function Uu(e,t,n,r,o){k(e.length===t.rank,(function(){return"Length of inShape ("+e.length+") and rank of dy ("+t.rank+") must match"}));var i=e,a=t,s=!1;4===t.rank&&(s=!0,a=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]),i=[1,e[0],e[1],e[2],e[3]]);var u=i[4],c=a.shape[4];k(5===i.length,(function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+i.length+"."})),k(5===a.rank,(function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+a.rank})),k(5===n.rank,(function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+n.rank})),k(u===n.shape[3],(function(){return"Error in conv3dDerInput: depth of input ("+u+") must match input depth for filter "+n.shape[3]+"."})),k(c===n.shape[4],(function(){return"Error in conv3dDerInput: depth of output ("+c+") must match output depth for filter "+n.shape[4]+"."}));var l=Vr(i,n.shape,r,1,o),f=je.runKernelFunc((function(e){return e.conv3dDerInput(a,n,l)}),{dy5D:a});return s?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}var zu=on({conv1d_:function(e,t,n,r,o,i,a){void 0===o&&(o="NWC"),void 0===i&&(i=1);var s=qt(e,"x","conv1d"),u=qt(t,"filter","conv1d"),c=s,l=!1;2===s.rank&&(l=!0,c=s.as3D(1,s.shape[0],s.shape[1])),k(3===c.rank,(function(){return"Error in conv1d: input must be rank 3, but got rank "+c.rank+"."})),k(3===u.rank,(function(){return"Error in conv1d: filter must be rank 3, but got rank "+u.rank+"."})),null!=a&&k(P(r),(function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+r+"."})),k(c.shape[2]===u.shape[1],(function(){return"Error in conv1d: depth of input ("+c.shape[2]+") must match input depth for filter "+u.shape[1]+"."})),k(Xr(n,i),(function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+n+" and dilation '"+i+"'"})),k("NWC"===o,(function(){return"Error in conv1d: got dataFormat of "+o+" but only NWC is currently supported."}));var f=u.as4D(1,u.shape[0],u.shape[1],u.shape[2]),d=c.as4D(c.shape[0],1,c.shape[1],c.shape[2]),p=Vu(d,f,[1,n],r,"NHWC",[1,i],a);return l?p.as2D(p.shape[2],p.shape[3]):p.as3D(p.shape[0],p.shape[2],p.shape[3])}}),Vu=on({conv2d_:function(e,t,n,r,o,i,a){void 0===o&&(o="NHWC"),void 0===i&&(i=[1,1]);var s=qt(e,"x","conv2d"),u=qt(t,"filter","conv2d"),c=s,l=!1;3===s.rank&&(l=!0,c=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),k(4===c.rank,(function(){return"Error in conv2d: input must be rank 4, but got rank "+c.rank+"."})),k(4===u.rank,(function(){return"Error in conv2d: filter must be rank 4, but got rank "+u.rank+"."})),null!=a&&k(P(r),(function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+r+"."}));var f="NHWC"===o?c.shape[3]:c.shape[1];k(f===u.shape[2],(function(){return"Error in conv2d: depth of input ("+f+") must match input depth for filter "+u.shape[2]+"."})),k(Xr(n,i),(function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+i+"'"}));var d=Yr(o),p=zr(c.shape,u.shape,n,i,r,a,!1,d),h=[u,c],v=je.runKernelFunc((function(e,t){var n=e.conv2d(c,u,p);return t([u,c]),n}),{x:c,filter:u},(function(e,t){var a=t,s=a[0],u=a[1];return k(Gr(i),(function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+i+"'"})),{x:function(){return $u(u.shape,e,s,n,r,o)},filter:function(){return Hu(u,e,s.shape,n,r,o)}}}),"Conv2D",p,h);return l?v.as3D(v.shape[1],v.shape[2],v.shape[3]):v}}),Wu=on({conv3d_:function(e,t,n,r,o,i){void 0===o&&(o="NDHWC"),void 0===i&&(i=[1,1,1]);var a=qt(e,"x","conv3d"),s=qt(t,"filter","conv3d"),u=a,c=!1;4===a.rank&&(c=!0,u=a.as5D(1,a.shape[0],a.shape[1],a.shape[2],a.shape[3])),k(5===u.rank,(function(){return"Error in conv3d: input must be rank 5, but got rank "+u.rank+"."})),k(5===s.rank,(function(){return"Error in conv3d: filter must be rank 5, but got rank "+s.rank+"."})),k(u.shape[4]===s.shape[3],(function(){return"Error in conv3d: depth of input ("+u.shape[4]+") must match input depth for filter "+s.shape[3]+"."})),k(function(e,t){return Bu(e)||Bu(t)}(n,i),(function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+i+"'"})),k("NDHWC"===o,(function(){return"Error in conv3d: got dataFormat of "+o+" but only NDHWC is currently supported."}));var l=Vr(u.shape,s.shape,n,i,r),f=je.runKernelFunc((function(e,t){var n=e.conv3d(u,s,l);return t([u,s]),n}),{x:u,$filter:s},(function(e,t){k(Bu(i),(function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+i+"'"}));var o=t[0],a=t[1];return{x:function(){return Uu(o.shape,e,a,n,r)},$filter:function(){return function(e,t,n,r,o){var i=e;4===e.rank&&(i=e.as5D(1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]));var a=t;4===a.rank&&(a=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3])),k(5===i.rank,(function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+i.shape+"."})),k(5===a.rank,(function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+a.shape+"."})),k(5===n.length,(function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+n+"."})),k(i.shape[4]===n[3],(function(){return"Error in conv3dDerFilter: depth of input "+i.shape[4]+") must match input depth in filter ("+n[3]+"."})),k(a.shape[4]===n[4],(function(){return"Error in conv3dDerFilter: depth of dy ("+a.shape[4]+") must match output depth for filter ("+n[4]+")."}));var s=Vr(i.shape,n,r,1,o);return je.runKernelFunc((function(e){return e.conv3dDerFilter(i,a,s)}),{x5D:i,dy5D:a})}(o,e,a.shape,n,r)}}}));return c?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}}),Hu=on({conv2dDerFilter_:function(e,t,n,r,o,i,a){void 0===i&&(i="NHWC");var s=e;3===e.rank&&(s=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]));var u=t;3===u.rank&&(u=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),k(4===s.rank,(function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+s.shape+"."})),k(4===u.rank,(function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+u.shape+"."})),k(4===n.length,(function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+n+"."}));var c="NHWC"===i?s.shape[3]:s.shape[1],l="NHWC"===i?u.shape[3]:u.shape[1];k(c===n[2],(function(){return"Error in conv2dDerFilter: depth of input "+c+") must match input depth in filter ("+n[2]+"."})),k(l===n[3],(function(){return"Error in conv2dDerFilter: depth of dy ("+l+") must match output depth for filter ("+n[3]+")."})),null!=a&&k(P(o),(function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+o+"."}));var f=Yr(i),d=zr(s.shape,n,r,1,o,a,!1,f);return je.runKernelFunc((function(e){return e.conv2dDerFilter(s,u,d)}),{x4D:s,dy4D:u})}}),$u=on({conv2dDerInput_:Lu}),qu=on({depthwiseConv2d_:function(e,t,n,r,o,i,a){void 0===o&&(o="NHWC"),void 0===i&&(i=[1,1]);var s=qt(e,"x","depthwiseConv2d"),u=qt(t,"filter","depthwiseConv2d"),c=s,l=!1;3===s.rank&&(l=!0,c=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),k(4===c.rank,(function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+c.rank+"."})),k(4===u.rank,(function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+u.rank+"."})),k(c.shape[3]===u.shape[2],(function(){return"Error in depthwiseConv2d: number of input channels ("+c.shape[3]+") must match the inChannels dimension in filter "+u.shape[2]+"."})),null==i&&(i=[1,1]),k(Xr(n,i),(function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+i+"'"})),null!=a&&k(P(r),(function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+r+"."}));var f=zr(c.shape,u.shape,n,i,r,a,!0),d=[c,u],p=je.runKernelFunc((function(e,t){var n=e.depthwiseConv2D(c,u,f);return t([c,u]),n}),{x:c,filter:u},(function(e,t){k(Gr(i),(function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+i+"'"}));var n=t[0],r=t[1];return{x:function(){return Ku(n.shape,e,r,f)},filter:function(){return Gu(n,e,r.shape,f)}}}),"DepthwiseConv2dNative",f,d);return l?p.as3D(p.shape[1],p.shape[2],p.shape[3]):p}}),Ku=on({depthwiseConv2dDerInput_:function(e,t,n,r){var o=t,i=!1;3===t.rank&&(i=!0,o=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var a=je.runKernelFunc((function(e){return e.depthwiseConv2DDerInput(o,n,r)}),{dy4D:o});return i?a.as3D(a.shape[1],a.shape[2],a.shape[3]):a}}),Gu=on({depthwiseConv2dDerFilter_:function(e,t,n,r){var o=e;3===e.rank&&(o=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]));var i=t;return 3===i.rank&&(i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),je.runKernelFunc((function(e){return e.depthwiseConv2DDerFilter(o,i,r)}),{x4D:o,dy4D:i})}}),Xu=on({separableConv2d_:function(e,t,n,r,o,i,a){void 0===i&&(i=[1,1]),void 0===a&&(a="NHWC");var s=qt(e,"x","separableConv2d"),u=qt(t,"depthwiseFilter","separableConv2d"),c=qt(n,"pointwiseFilter","separableConv2d"),l=s,f=!1;if(3===s.rank&&(f=!0,l=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),"NCHW"===a)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");k(4===l.rank,(function(){return"Error in separableConv2d: input must be rank 4, but got rank "+l.rank+"."})),k(4===u.rank,(function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+u.rank+"."})),k(4===c.rank,(function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+u.rank+"."})),k(1===c.shape[0],(function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+c.shape[0]+"."})),k(1===c.shape[1],(function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+c.shape[1]+"."}));var d=u.shape[2],p=u.shape[3];k(c.shape[2]===d*p,(function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+d*p+", but got "+c.shape[2]+"."}));var h=qu(l,u,r,o,a,i),v=Vu(h,c,1,"valid",a);return f?v.as3D(v.shape[1],v.shape[2],v.shape[3]):v}}),Yu=on({conv2dTranspose_:function(e,t,n,r,o,i){return Lu(n,qt(e,"x","conv2dTranspose"),qt(t,"filter","conv2dTranspose"),r,o,"NHWC",i)}}),Ju=on({conv3dTranspose_:function(e,t,n,r,o){return Uu(n,qt(e,"x","conv3dTranspose"),qt(t,"filter","conv3dTranspose"),r,o)}}),Qu=on({matMul_:function(e,t,n,r){var o;void 0===n&&(n=!1),void 0===r&&(r=!1);var i=qt(e,"a","matMul"),a=qt(t,"b","matMul");o=Ie(i,a),i=o[0],a=o[1];var s=n?i.shape[i.rank-2]:i.shape[i.rank-1],u=r?a.shape[a.rank-1]:a.shape[a.rank-2],c=n?i.shape[i.rank-1]:i.shape[i.rank-2],l=r?a.shape[a.rank-2]:a.shape[a.rank-1],f=i.shape.slice(0,-2),d=a.shape.slice(0,-2),p=T(f),h=T(d);k(i.rank>=2&&a.rank>=2&&i.rank===a.rank,(function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+i.rank+" and "+a.rank+"."})),k(I(f,d),(function(){return"Error in matMul: outer dimensions ("+f+") and ("+d+") of Tensors with shapes "+i.shape+" and "+a.shape+" must match."})),k(s===u,(function(){return"Error in matMul: inner shapes ("+s+") and ("+u+") of Tensors with shapes "+i.shape+" and "+a.shape+" and transposeA="+n+" and transposeB="+r+" must match."}));var v=i.shape.slice(0,-2).concat([c,l]),m=n?i.as3D(p,s,c):i.as3D(p,c,s),g=r?a.as3D(h,l,u):a.as3D(h,u,l),y={transposeA:n,transposeB:r};return je.runKernelFunc((function(e,t){var o=e.batchMatMul(m,g,n,r);return t([m,g]),o}),{a:m,b:g},(function(e,t){var o=t,i=o[0],a=o[1];return n||r?!n&&r?{a:function(){return e.matMul(a,!1,!1)},b:function(){return e.matMul(i,!0,!1)}}:n&&!r?{a:function(){return a.matMul(e,!1,!0)},b:function(){return i.matMul(e,!1,!1)}}:{a:function(){return a.matMul(e,!0,!0)},b:function(){return e.matMul(i,!0,!0)}}:{a:function(){return e.matMul(a,!1,!0)},b:function(){return i.matMul(e,!0,!1)}}}),"BatchMatMul",y).reshape(v)}}),Zu=on({dot_:function(e,t){var n=qt(e,"t1","dot"),r=qt(t,"t2","dot");k(!(1!==n.rank&&2!==n.rank||1!==r.rank&&2!==r.rank),(function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+n.rank+" and "+r.rank+"."}));var o=1===n.rank?n.size:n.shape[1],i=1===r.rank?r.size:r.shape[0];return k(o===i,(function(){return"Error in dot: inner dimensions of inputs must match, but got "+o+" and "+i+"."})),1===n.rank&&1===r.rank?n.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():1===n.rank&&2===r.rank?n.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():2===n.rank&&1===r.rank?n.matMul(r.as2D(-1,1)).as1D():n.matMul(r.as2D(r.shape[0],r.shape[1]))}}),ec=on({outerProduct_:function(e,t){var n=qt(e,"v1","outerProduct"),r=qt(t,"v2","outerProduct");return k(1===n.rank&&1===r.rank,(function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+n.rank+" and "+r.rank+"."})),n.as2D(-1,1).matMul(r.as2D(1,-1))}}),tc=on({reverse_:function(e,t){var n=qt(e,"x","reverse");if(0===n.rank)return n.clone();var r=D(t,n.shape);return je.runKernelFunc((function(e){return e.reverse(n,r)}),{$x:n},(function(e){return{$x:function(){return e.reverse(r)}}})).reshapeAs(n)}}),nc=on({reverse1d_:function(e){var t=qt(e,"x","reverse");return k(1===t.rank,(function(){return"Error in reverse1D: x must be rank 1 but got rank "+t.rank+"."})),tc(t,0)}}),rc=on({reverse2d_:function(e,t){var n=qt(e,"x","reverse");return k(2===n.rank,(function(){return"Error in reverse2D: x must be rank 2 but got rank "+n.rank+"."})),tc(n,t)}}),oc=on({reverse3d_:function(e,t){var n=qt(e,"x","reverse");return k(3===n.rank,(function(){return"Error in reverse3D: x must be rank 3 but got rank "+n.rank+"."})),tc(n,t)}}),ic=on({reverse4d_:function(e,t){var n=qt(e,"x","reverse");return k(4===n.rank,(function(){return"Error in reverse4D: x must be rank 4 but got rank "+n.rank+"."})),tc(n,t)}});function ac(e,t,n,r,o,i){var a=qt(e,"x","maxPool"),s=a,u=!1;3===a.rank&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),null==r&&(r=[1,1]),k(4===s.rank,(function(){return"Error in maxPool: input must be rank 4 but got rank "+s.rank+"."})),k(Xr(n,r),(function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"})),null!=i&&k(P(o),(function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+o+"."}));var c=Br(s.shape,t,n,r,o,i);if(1===c.filterWidth&&1===c.filterHeight&&I(c.inShape,c.outShape))return a.clone();var l=[s],f=je.runKernelFunc((function(e,t){var n=e.maxPool(s,c);return t([s,n]),n}),{x:s},(function(e,i){var a=i[0],s=i[1];return{x:function(){return function(e,t,n,r,o,i,a,s){var u=qt(e,"dy","maxPoolBackprop"),c=qt(t,"input","maxPoolBackprop"),l=qt(n,"output","maxPoolBackprop");k(c.rank===u.rank,(function(){return"Rank of input ("+c.rank+") does not match rank of dy ("+u.rank+")"})),null==i&&(i=[1,1]),k(Xr(o,i),(function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+o+" and dilations '"+i+"'"})),k(4===u.rank,(function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+u.rank+"."})),k(4===c.rank,(function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+c.rank+"."}));var f=Br(c.shape,r,o,i,a,s);return je.runKernelFunc((function(e){return e.maxPoolBackprop(u,c,l,f)}),{$dy:u,$input:c})}(e,a,s,t,n,r,o)}}}),"MaxPool",c,l);return u?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}function sc(e,t,n,r,o,i){var a=qt(e,"x","avgPool","float32");null==r&&(r=[1,1]),k(Xr(n,r),(function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"}));var s=a,u=!1;3===a.rank&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),k(4===s.rank,(function(){return"Error in avgPool: x must be rank 4 but got rank "+s.rank+"."})),null!=i&&k(P(o),(function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+o+"."}));var c=Br(s.shape,t,n,r,o,i);if(1===c.filterWidth&&1===c.filterHeight&&I(c.inShape,c.outShape))return a.clone();var l=je.runKernelFunc((function(e){return e.avgPool(s,c)}),{x:s},(function(e){return{x:function(){return function(e,t,n,r,o,i){var a=qt(e,"dy","avgPoolBackprop"),s=qt(t,"input","avgPoolBackprop");k(s.rank===a.rank,(function(){return"Rank of input ("+s.rank+") does not match rank of dy ("+a.rank+")"})),null==o&&(o=[1,1]),k(Xr(r,o),(function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+o+"'"}));var u=s,c=a,l=!1;3===s.rank&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2]),c=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),k(4===c.rank,(function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+c.rank+"."})),k(4===u.rank,(function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+u.rank+"."}));var f=Br(u.shape,n,r,o,i),d=je.runKernelFunc((function(e){return e.avgPoolBackprop(c,u,f)}),{dy4D:c,input4D:u});return l?d.as3D(d.shape[1],d.shape[2],d.shape[3]):d}(e,s,t,n,r,o)}}}),"AvgPool",c);return l=l.cast(a.dtype),u?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}var uc=on({maxPool_:function(e,t,n,r,o){return ac(e,t,n,1,r,o)}}),cc=on({avgPool_:function(e,t,n,r,o){return sc(e,t,n,1,r,o)}}),lc=on({pool_:function(e,t,n,r,o,i){null==o&&(o=[1,1]),null==i&&(i=1),0===r&&(r="valid");var a=qt(e,"x","maxPool"),s=a,u=!1;3===a.rank&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2])),k(Xr(i,o),(function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+i+" and dilations '"+o+"'"}));var c,l=Br(s.shape,t,i,o,r),f=[l.dilationHeight,l.dilationWidth];c="same"===r?function(e,t){var n=e.map((function(e,n){return e+(e-1)*(t[n]-1)})).map((function(e){return e-1})),r=n.map((function(e){return Math.floor(e/2)})),o=n.map((function(e,t){return e-r[t]}));return n.map((function(e,t){return[r[t],o[t]]}))}([l.filterHeight,l.filterWidth],f):[[0,0],[0,0]];var d=1===f[0]&&1===f[1],p=function(e,t,n){var r=n.map((function(e){return e[0]})),o=n.map((function(e){return e[1]})),i=e.concat(r,o),a=t.map((function(e,t){return(e-i[t]%e)%e})),s=o.map((function(e,t){return e+a[t]}));return[t.map((function(e,t){return[r[t],s[t]]})),t.map((function(e,t){return[0,a[t]]}))]}([l.inHeight,l.inWidth],f,c),h=p[0],v=p[1],m=d?r:"valid",g=d?s:sr(s,f,h),y=("avg"===n?function(){return sc(g,t,i,1,m)}:function(){return ac(g,t,i,1,m)})(),b=d?y:zn(y,f,v);return u?b.as3D(b.shape[1],b.shape[2],b.shape[3]):b}}),fc=on({maxPool3d_:function(e,t,n,r,o,i,a){void 0===i&&(i="NDHWC");var s=qt(e,"x","maxPool3d"),u=s,c=!1;4===s.rank&&(c=!0,u=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),null==a&&(a=[1,1,1]),k(5===u.rank,(function(){return"Error in maxPool3d: x must be rank 5 but got rank "+u.rank+"."})),k("NDHWC"===i,(function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+i})),k(Xr(n,a),(function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"})),null!=o&&k(P(r),(function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}));var l=Ur(u.shape,t,n,a,r,o,i),f=je.runKernelFunc((function(e,t){var n=e.maxPool3d(u,l);return t([u,n]),n}),{x:u},(function(e,i){var s=i[0],u=i[1];return{x:function(){return function(e,t,n,r,o,i,a,s){var u=qt(e,"dy","maxPool3dBackprop"),c=qt(t,"input","maxPool3dBackprop"),l=qt(n,"output","maxPool3dBackprop"),f=u,d=c,p=l,h=!1;4===c.rank&&(h=!0,f=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3]),d=c.as5D(1,c.shape[0],c.shape[1],c.shape[2],c.shape[3]),p=l.as5D(1,l.shape[0],l.shape[1],l.shape[2],l.shape[3])),k(5===f.rank,(function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+f.rank+"."})),k(5===d.rank,(function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+d.rank+"."})),k(5===p.rank,(function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+p.rank+"."})),null==i&&(i=[1,1,1]),k(Xr(o,i),(function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+o+" and dilations '"+i+"'"})),null!=s&&k(P(a),(function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+a+"."}));var v=Ur(d.shape,r,o,i,a,s),m=je.runKernelFunc((function(e){return e.maxPool3dBackprop(f,d,p,v)}),{dy5D:f,input5D:d});return h?m.as4D(m.shape[1],m.shape[2],m.shape[3],m.shape[4]):m}(e,s,u,t,n,a,r,o)}}}));return c?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}}),dc=on({avgPool3d_:function(e,t,n,r,o,i,a){void 0===i&&(i="NDHWC");var s=qt(e,"x","avgPool3d","float32"),u=s,c=!1;4===s.rank&&(c=!0,u=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),null==a&&(a=[1,1,1]),k(5===u.rank,(function(){return"Error in avgPool3d: x must be rank 5 but got rank "+u.rank+"."})),k("NDHWC"===i,(function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+i})),k(Xr(n,a),(function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"})),null!=o&&k(P(r),(function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}));var l=Ur(u.shape,t,n,a,r,o,i),f=je.runKernelFunc((function(e){return e.avgPool3d(u,l)}),{x:u},(function(e){return{x:function(){return function(e,t,n,r,o,i,a){var s=qt(e,"dy","avgPool3dBackprop"),u=qt(t,"input","avgPool3dBackprop"),c=s,l=u,f=!1;4===u.rank&&(f=!0,c=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3]),l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),k(5===c.rank,(function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+c.rank+"."})),k(5===l.rank,(function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+l.rank+"."})),null==o&&(o=[1,1,1]),k(Xr(r,o),(function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+o+"'"})),null!=a&&k(P(i),(function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."}));var d=Ur(l.shape,n,r,o,i,a),p=je.runKernelFunc((function(e){return e.avgPool3dBackprop(c,l,d)}),{dy5D:c,input5D:l});return f?p.as4D(p.shape[1],p.shape[2],p.shape[3],p.shape[4]):p}(e,u,t,n,a,r,o)}}}));return f=f.cast(u.dtype),c?f.as4D(f.shape[1],f.shape[2],f.shape[3],f.shape[4]):f}}),pc=on({slice_:function(e,t,n){var r,o,i=qt(e,"x","slice");if(0===i.rank)throw new Error("Slicing scalar is not possible");(r="number"==typeof t?[t].concat(new Array(i.rank-1).fill(0)):t.length<i.rank?t.concat(new Array(i.rank-t.length).fill(0)):t.slice()).forEach((function(e){k(-1!==e,(function(){return"slice() does not support negative begin indexing."}))})),o=(o=null==n?new Array(i.rank).fill(-1):"number"==typeof n?[n].concat(new Array(i.rank-1).fill(-1)):n.length<i.rank?n.concat(new Array(i.rank-n.length).fill(-1)):n).map((function(e,t){return e>=0?e:(k(-1===e,(function(){return"Negative size values should be exactly -1 but got "+e+" for the slice() size at index "+t+"."})),i.shape[t]-r[t])})),Cr(i,r,o);var a=i.shape,s={begin:r,size:o};return je.runKernelFunc((function(e){return e.slice(i,r,o)}),{x:i},(function(e){for(var t=[],n=0;n<e.rank;n++)t.push([r[n],a[n]-r[n]-o[n]]);return{x:function(){return e.pad(t)}}}),"Slice",s)}}),hc=on({slice1d_:function(e,t,n){var r=qt(e,"x","slice1d");return k(1===r.rank,(function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"})),pc(r,[t],[n])}}),vc=on({slice2d_:function(e,t,n){var r=qt(e,"x","slice2d");return k(2===r.rank,(function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"})),pc(r,t,n)}}),mc=on({slice3d_:function(e,t,n){var r=qt(e,"x","slice3d");return k(3===r.rank,(function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"})),pc(r,t,n)}}),gc=on({slice4d_:function(e,t,n){var r=qt(e,"x","slice4d");return k(4===r.rank,(function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"})),pc(r,t,n)}});function yc(e,t,n,r,o){return t.rank<n.rank&&(t=t.reshape(Jt(t.shape,r))),e.rank<n.rank&&(e=e.reshape(Jt(e.shape,r))),{x:function(){var r=e.mul(n.equal(t).cast(e.dtype));return null==o?r:r.transpose(o)}}}var bc=on({all_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","all","bool"),o=D(t,r.shape),i=o,a=Zt(i,r.rank);null!=a&&(r=r.transpose(a),i=tn(i.length,r.rank));var s=je.runKernelFunc((function(e){return e.all(r,i)}),{$x:r});if(n){var u=Jt(s.shape,o);return s.reshape(u)}return s}}),wc=on({any_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","any","bool"),o=D(t,r.shape),i=o,a=Zt(i,r.rank);null!=a&&(r=r.transpose(a),i=tn(i.length,r.rank));var s=je.runKernelFunc((function(e){return e.any(r,i)}),{$x:r});if(n){var u=Jt(s.shape,o);return s.reshape(u)}return s}}),xc=on({argMax_:function(e,t){void 0===t&&(t=0);var n=qt(e,"x","argMax");null==t&&(t=0);var r=D(t,n.shape),o=Zt(r,n.rank);null!=o&&(n=n.transpose(o),r=tn(r.length,n.rank));var i={axis:r[0]},a=[n];return je.runKernelFunc((function(e,t){var o=e.argMax(n,r[0]);return t([n]),o}),{x:n},(function(e,t){var n=t[0];return{x:function(){return xn(n)}}}),"ArgMax",i,a)}}),Ec=on({argMin_:function(e,t){void 0===t&&(t=0);var n=qt(e,"x","argMin");null==t&&(t=0);var r=D(t,n.shape),o=Zt(r,n.rank);return null!=o&&(n=n.transpose(o),r=tn(r.length,n.rank)),je.runKernelFunc((function(e,t){var o=e.argMin(n,r[0]);return t([n]),o}),{$x:n},(function(e,t){var n=t[0];return{$x:function(){return xn(n)}}}))}}),Cc=on({logSumExp_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","logSumExp"),o=D(t,r.shape),i=r.max(o,!0),a=r.sub(i).exp().sum(o).log(),s=i.reshape(a.shape).add(a);if(n){var u=Jt(s.shape,o);return s.reshape(u)}return s}}),kc=on({max_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","max"),o=r,i=D(t,r.shape),a=i,s=Zt(a,r.rank);null!=s&&(r=r.transpose(s),a=tn(a.length,r.rank));var u=[r],c=je.runKernelFunc((function(e,t){var n=e.max(r,a);return t([o,n]),n}),{x:r},(function(e,t){return yc(e,t[1],t[0],i,s)}),"Max",{axes:a},u,[!0]);if(n){var l=Jt(c.shape,i);c=c.reshape(l)}return c}}),Oc=on({mean_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","mean"),o=D(t,r.shape),i=T(Yt(r.shape,o)[1]);return Pr((function(e){var r=fn(i);return{value:(r.dtype===e.dtype?e:e.cast(r.dtype)).div(r).sum(t,n),gradFunc:function(t){var n=e.shape.slice();return o.forEach((function(e){n[e]=1})),t.reshape(n).mul(mn(e.shape,"float32")).div(i)}}}))(r)}}),Sc=on({min_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","min"),o=r,i=D(t,r.shape),a=i,s=Zt(a,r.rank);null!=s&&(r=r.transpose(s),a=tn(a.length,r.rank));var u=[r],c=je.runKernelFunc((function(e,t){var n=e.min(r,a);return t([o,n]),n}),{x:r},(function(e,t){return yc(e,t[1],t[0],i,s)}),"Min",{axes:a},u,[!0]);if(n){var l=Jt(c.shape,i);c=c.reshape(l)}return c}}),_c=on({moments_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=D(t,(e=qt(e,"x","moments")).shape),o=e.mean(r,n),i=o.shape;n||(i=Jt(o.shape,r));var a=e.toFloat().sub(o.reshape(i)).square();return{mean:o,variance:a.mean(r,n)}}}),Tc=on({sum_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","sum");"bool"===r.dtype&&(r=r.toInt());var o=D(t,r.shape);return Pr((function(e){var t=Zt(o,e.rank),r=o,i=e;null!=t&&(i=e.transpose(t),r=tn(r.length,e.rank));var a=function(t){var n=e.shape.slice();return o.forEach((function(e){n[e]=1})),t.reshape(n).mul(mn(e.shape,"float32"))},s={axes:r},u=je.runKernelFunc((function(e){return e.sum(i,r)}),{x:i},(function(e){return{x:function(){return a(e)}}}),"Sum",s);if(n){var c=Jt(u.shape,o);u=u.reshape(c)}return{value:u,gradFunc:a}}))(r)}}),Ic=on({prod_:function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1);var r=qt(e,"x","prod");"bool"===r.dtype&&(r=r.toInt());var o=D(t,r.shape),i=Zt(o,r.rank),a=o,s=r;null!=i&&(s=r.transpose(i),a=tn(a.length,r.rank));var u=je.runKernelFunc((function(e){return e.prod(s,a)}),{permutedX:s});if(n){var c=Jt(u.shape,o);u=u.reshape(c)}return u}}),Pc=on({elu_:function(e){var t=qt(e,"x","elu");return je.runKernelFunc((function(e,n){var r=e.elu(t);return n([r]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){return je.runKernelFunc((function(t){return t.eluDer(e,n)}),{dy:e,y:n})}}}))}}),Ac=on({leakyRelu_:function(e,t){void 0===t&&(t=.2);var n=qt(e,"x","leakyRelu");return cu(fn(t).mul(n),n)}}),Rc=on({prelu_:function(e,t){var n=qt(e,"x","prelu"),r=qt(t,"alpha","prelu");return je.runKernelFunc((function(e,t){var o=e.prelu(n,r);return t([n,r]),o}),{x:n,alpha:r},(function(e,t){var n=t[0],r=t[1],o=n.greater(0);return{x:function(){return Zs(o,e,e.mul(r))},alpha:function(){var t=Zs(o,xn(e),e.mul(n)),i=Fr(r.shape,e.shape);return i.length>0&&(t=t.sum(i)),t.reshape(r.shape)}}}),"Prelu")}}),Nc=on({relu_:function(e){var t=qt(e,"x","relu");return"bool"===t.dtype?t.toInt():je.runKernelFunc((function(e,n){var r=e.relu(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0];return{x:function(){return e.mulStrict(n.step().toFloat())}}}),"Relu")}}),Mc=on({relu6_:function(e){var t=qt(e,"x","relu6");return"bool"===t.dtype?t.toInt():je.runKernelFunc((function(e,n){var r=e.relu6(t);return n([t]),r}),{x:t},(function(e,t){var n=t[0],r=n.lessEqual(6).mul(n.step());return{x:function(){return e.mulStrict(r.toFloat())}}}),"Relu6")}}),jc=on({selu_:function(e){var t=qt(e,"x","selu");return je.runKernelFunc((function(e,n){var r=e.selu(t);return n([t]),r}),{$x:t},(function(e,t){var n=t[0];return{$x:function(){var t=n.greater(fn(0)),r=fn(Pa),o=fn(Aa),i=e.mul(o),a=e.mul(r).mul(n.toFloat().exp());return Zs(t,i,a)}}}))}}),Dc=on({transpose_:function(e,t){var n=qt(e,"x","transpose");if(null==t&&(t=n.shape.map((function(e,t){return t})).reverse()),k(n.rank===t.length,(function(){return"Error in transpose: rank of input "+n.rank+" must match length of perm "+t+"."})),t.forEach((function(e){k(e>=0&&e<n.rank,(function(){return"All entries in 'perm' must be between 0 and "+(n.rank-1)+" but got "+t}))})),n.rank<=1)return n.clone();var r={perm:t};return je.runKernelFunc((function(e){return e.transpose(n,t)}),{x:n},(function(e){var n=en(t);return{x:function(){return e.transpose(n)}}}),"Transpose",r)}}),Fc=on({localResponseNormalization_:function(e,t,n,r,o){void 0===t&&(t=5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===o&&(o=.5);var i=qt(e,"x","localResponseNormalization");k(4===i.rank||3===i.rank,(function(){return"Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank "+i.rank+"."})),k(P(t),(function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+t+"."}));var a=i,s=!1;3===i.rank&&(s=!0,a=i.as4D(1,i.shape[0],i.shape[1],i.shape[2]));var u=je.runKernelFunc((function(e,i){var s=e.localResponseNormalization4D(a,t,n,r,o);return i([a,s]),s}),{x4D:a},(function(e,i){var a=i[0],s=i[1];return{x4D:function(){return je.runKernelFunc((function(i){return i.LRNGrad(e,a,s,t,n,r,o)}),{})}}}));return s?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),Lc=on({norm_:function(e,t,n,r){void 0===t&&(t="euclidean"),void 0===n&&(n=null),void 0===r&&(r=!1);var o=function e(t,n,r){if(void 0===r&&(r=null),0===t.rank)return t.abs();if(1!==t.rank&&null===r)return e(t.reshape([-1]),n,r);if(1===t.rank||"number"==typeof r||Array.isArray(r)&&1===r.length){if(1===n)return t.abs().sum(r);if(n===1/0)return t.abs().max(r);if(n===-1/0)return t.abs().min(r);if("euclidean"===n||2===n)return t.abs().pow(fn(2,"int32")).sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}if(Array.isArray(r)&&2===r.length){if(1===n)return t.abs().sum(r[0]).max(r[1]-1);if(n===1/0)return t.abs().sum(r[1]).max(r[0]);if(n===-1/0)return t.abs().sum(r[1]).min(r[0]);if("fro"===n||"euclidean"===n)return t.square().sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}throw new Error("Error in norm: invalid axis: "+r)}(e=qt(e,"x","norm"),t,n),i=o.shape;if(r){var a=D(n,e.shape);i=Jt(o.shape,a)}return o.reshape(i)}}),Bc=on({basicLSTMCell_:function(e,t,n,r,o,i){var a=qt(e,"forgetBias","basicLSTMCell"),s=qt(t,"lstmKernel","basicLSTMCell"),u=qt(n,"lstmBias","basicLSTMCell"),c=qt(r,"data","basicLSTMCell"),l=qt(o,"c","basicLSTMCell"),f=qt(i,"h","basicLSTMCell"),d=c.concat(f,1).matMul(s).add(u),p=d.shape[0],h=d.shape[1]/4,v=[p,h],m=d.slice([0,0],v),g=d.slice([0,h],v),y=d.slice([0,2*h],v),b=d.slice([0,3*h],v),w=m.sigmoid().mulStrict(g.tanh()).addStrict(l.mulStrict(a.add(y).sigmoid())),x=w.tanh().mulStrict(b.sigmoid());return[w,x]}}),Uc=on({multiRNNCell_:function(e,t,n,r){for(var o=qt(t,"data","multiRNNCell"),i=Kt(n,"c","multiRNNCell"),a=Kt(r,"h","multiRNNCell"),s=o,u=[],c=0;c<e.length;c++){var l=e[c](s,i[c],a[c]);u.push(l[0]),u.push(l[1]),s=l[1]}var f=[],d=[];for(c=0;c<u.length;c+=2)f.push(u[c]),d.push(u[c+1]);return[f,d]}}),zc=on({movingAverage_:function(e,t,n,r,o){void 0===o&&(o=!0);var i=qt(e,"v","movingAverage"),a=qt(t,"x","movingAverage"),s=qt(n,"decay","movingAverage");Pe(i,a),k(I(i.shape,a.shape),(function(){return"Shape mismatch in v and x"}));var u=fn(1),c=u.sub(s),l=a.sub(i).mul(c);if(o){k(null!=r,(function(){return"When using zeroDebias: true, step is required."}));var f=qt(r,"step","movingAverage");l=l.div(u.sub(gu(s,f)))}return i.add(l)}}),Vc=on({stridedSlice_:function(e,t,n,r,o,i,a,s,u){if(void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=0),void 0===u&&(u=0),null==r&&(r=new Array(t.length)),0!==a)throw new Error("ellipsis mask is not yet supported");var c=qt(e,"x","stridedSlice"),l=kr(s),f=c.shape.slice();l.forEach((function(e){t[e]=0,n[e]=1,f.splice(e,0,1)})),c=c.reshape(f);for(var d=0;d<c.rank;d++)t[d]=Sr(o,t,r,c.shape,d),n[d]=_r(i,n,r,c.shape,d),r[d]=r[d]||1;var p=kr(u);p.forEach((function(e){n[e]=t[e]+1,r[e]=1}));var h=Or(t,n,r),v=h.filter((function(e,t){return-1===p.indexOf(t)}));return r.every((function(e){return 1===e}))?pc(c,t,h).reshape(v):je.runKernelFunc((function(e){return e.stridedSlice(c,t,n,r)}),{$x:c}).reshape(v)}}),Wc=on({topk_:function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!0);var r=qt(e,"x","topk");if(0===r.rank)throw new Error("topk() expects the input to be of rank 1 or higher");var o=r.shape[r.shape.length-1];if(t>o)throw new Error("'k' passed to topk() must be <= the last dimension ("+o+") but got "+t);var i=je.runKernelFunc((function(e){return e.topk(r,t,n)}),{$x:r});return{values:i[0],indices:i[1]}}}),Hc=on({scatterND_:function(e,t,n){var r=qt(e,"indices","scatterND","int32"),o=qt(t,"updates","scatterND");return xr(o,r,n),je.runKernelFunc((function(e){return e.scatterND(r,o,n)}),{indices:r,updates:o},null,"ScatterNd",{shape:n})}}),$c=on({fft_:function(e){k("complex64"===e.dtype,(function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+e.dtype+"."}));var t=e.shape[e.shape.length-1],n=e.size/t,r=e.as2D(n,t);return je.runKernelFunc((function(e){return e.fft(r)}),{input:e}).reshape(e.shape)}}),qc=on({ifft_:function(e){k("complex64"===e.dtype,(function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+e.dtype+"."}));var t=e.shape[e.shape.length-1],n=e.size/t,r=e.as2D(n,t);return je.runKernelFunc((function(e){return e.ifft(r)}),{input:e}).reshape(e.shape)}}),Kc=on({rfft_:function(e,t){k("float32"===e.dtype,(function(){return"The dtype for rfft() must be real value but got "+e.dtype}));var n,r=e.shape[e.shape.length-1],o=e.size/r;if(null!=t&&t<r){var i=e.shape.map((function(e){return 0})),a=e.shape.map((function(e){return e}));a[e.shape.length-1]=t,n=e.slice(i,a),r=t}else if(null!=t&&t>r){var s=e.shape.map((function(e){return e}));s[e.shape.length-1]=t-r,n=e.concat(gn(s),e.shape.length-1),r=t}else n=e;var u=n.zerosLike(),c=an(n,u).as2D(o,r),l=$c(c),f=Math.floor(r/2)+1,d=sn(l),p=un(l),h=d.split([f,r-f],d.shape.length-1),v=p.split([f,r-f],p.shape.length-1),m=n.shape.slice();return m[n.shape.length-1]=f,an(h[0],v[0]).reshape(m)}}),Gc=on({irfft_:function(e){var t=e.shape[e.shape.length-1],n=e.size/t;if(t<=2){var r=e.as2D(n,t),o=qc(r);return sn(o)}var i=[n,2*(t-1)],a=sn(e).as2D(n,t),s=un(e).as2D(n,t),u=a.slice([0,1],[n,t-2]).reverse(1),c=s.slice([0,1],[n,t-2]).reverse(1).mul(fn(-1)),l=a.concat(u,1),f=s.concat(c,1);return r=an(l,f).as2D(i[0],i[1]),o=qc(r),sn(o)}}),Xc=Object.freeze({fft:$c,ifft:qc,rfft:Kc,irfft:Gc}),Yc=on({sparseToDense_:function(e,t,n,r){void 0===r&&(r=0);var o=qt(e,"sparseIndices","sparseToDense","int32"),i=qt(t,"sparseValues","sparseToDense"),a=qt(r,"defaultValue","sparseToDense",i.dtype);return function(e,t,n,r){if("int32"!==e.dtype)throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+e.dtype+".");if(e.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+e.shape+".");var o=e.rank>0?e.shape[0]:1,i=e.rank>1?e.shape[1]:1;if(n.length!==i)throw new Error("outputShape has incorrect number of elements:, "+n.length+", should be: "+i+".");var a=t.size;if(0!==t.rank&&(1!==t.rank||a!==o))throw new Error("sparseValues has incorrect shape "+t.shape+", should be [] or ["+o+"]");if(t.dtype!==r.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(o,i,n,a),je.runKernelFunc((function(e){return e.sparseToDense(o,i,n,a)}),{$sparseIndices:o,$sparseValues:i,$defaultValue:a})}}),Jc=on({gatherND_:function(e,t){var n=qt(t,"indices","gatherND","int32"),r=qt(e,"x","gatherND");return je.runKernelFunc((function(e){return e.gatherND(r,n)}),{x:r,indices:n},null,"GatherNd")}}),Qc=on({diag_:function(e){var t=qt(e,"x","diag").flatten(),n=e.shape.concat(e.shape);return je.runKernelFunc((function(e){return e.diag(t)}),{$x:t}).reshape(n)}}),Zc=on({dropout_:function(e,t,n,r){var o=qt(e,"x","dropout");if(k("float32"===o.dtype,(function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+o.dtype+" tensor instead."})),k(t>=0&&t<1,(function(){return"rate must be a float in the range [0, 1), but got "+t+"."})),0===t)return e instanceof ye?o.clone():o;var i=function(e,t){if(null==t)return e.shape.slice();if(I(e.shape,t))return t;if(e.shape.length===t.length){for(var n=[],r=0;r<e.shape.length;r++)null==t[r]&&null!=e.shape[r]?n.push(e.shape[r]):n.push(t[r]);return n}return t}(o,n),a=1-t,s=ir(i,0,1,"float32",r).add(a).floor().div(a);return o.mul(s)}});function el(e,t,n){for(var r=1-e%2,o=new Float32Array(e),i=0;i<e;++i){var a=2*Math.PI*i/(e+r-1);o[i]=t-n*Math.cos(a)}return dn(o,"float32")}var tl,nl=on({hannWindow_:function(e){return el(e,.5,.5)}}),rl=on({hammingWindow_:function(e){return el(e,.54,.46)}}),ol=on({frame_:function(e,t,n,r,o){void 0===r&&(r=!1),void 0===o&&(o=0);for(var i=0,a=[];i+t<=e.size;)a.push(pc(e,i,t)),i+=n;if(r)for(;i<e.size;){var s=i+t-e.size,u=En([pc(e,i,t-s),yn([s],o)]);a.push(u),i+=n}return 0===a.length?pn([],[0,t]):En(a).as2D(a.length,t)}}),il=on({stft_:function(e,t,n,r,o){var i;void 0===o&&(o=nl),null==r&&(i=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(i)/Math.log(2)))));for(var a=ol(e,t,n),s=vu(a,o(t)),u=[],c=0;c<a.shape[0];c++)u.push(Kc(s.slice([c,0],[1,t]),r));return En(u)}}),al=Object.freeze({hannWindow:nl,hammingWindow:rl,frame:ol,stft:il});!function(e){e[e.NONE=0]="NONE",e[e.MEAN=1]="MEAN",e[e.SUM=2]="SUM",e[e.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(tl||(tl={}));var sl=on({absoluteDifference_:function(e,t,n,r){void 0===r&&(r=tl.SUM_BY_NONZERO_WEIGHTS);var o=qt(e,"labels","absoluteDifference"),i=qt(t,"predictions","absoluteDifference"),a=null;null!=n&&(a=qt(n,"weights","absoluteDifference")),O(o.shape,i.shape,"Error in absoluteDifference: ");var s=o.sub(i).abs();return ul(s,a,r)}}),ul=on({computeWeightedLoss_:function(e,t,n){void 0===n&&(n=tl.SUM_BY_NONZERO_WEIGHTS);var r=qt(e,"losses","computeWeightedLoss"),o=null;null!=t&&(o=qt(t,"weights","computeWeightedLoss"));var i=null==o?r:r.mul(o);if(n===tl.NONE)return i;if(n===tl.SUM)return i.sum();if(n===tl.MEAN){if(null==o)return i.mean();var a=r.size/o.size,s=i.sum().div(o.sum());return a>1?s.div(fn(a)):s}if(n===tl.SUM_BY_NONZERO_WEIGHTS){if(null==o)return i.sum().div(fn(r.size));var u=o.mul(mn(r.shape)).notEqual(fn(0)).sum().toFloat();return i.sum().div(u)}throw Error("Unknown reduction: "+n)}}),cl=on({cosineDistance_:function(e,t,n,r,o){void 0===o&&(o=tl.SUM_BY_NONZERO_WEIGHTS);var i=qt(e,"labels","cosineDistance"),a=qt(t,"predictions","cosineDistance"),s=null;null!=r&&(s=qt(r,"weights","cosineDistance")),O(i.shape,a.shape,"Error in cosineDistance: ");var u=fn(1).sub(i.mul(a).sum(n,!0));return ul(u,s,o)}}),ll=on({hingeLoss_:function(e,t,n,r){void 0===r&&(r=tl.SUM_BY_NONZERO_WEIGHTS);var o=qt(e,"labels","hingeLoss"),i=qt(t,"predictions","hingeLoss"),a=null;null!=n&&(a=qt(n,"weights","hingeLoss")),O(o.shape,i.shape,"Error in hingeLoss: ");var s=fn(1);o=fn(2).mul(o).sub(s);var u=s.sub(o.mul(i)).relu();return ul(u,a,r)}}),fl=on({huberLoss_:function(e,t,n,r,o){void 0===r&&(r=1),void 0===o&&(o=tl.SUM_BY_NONZERO_WEIGHTS);var i=qt(e,"labels","huberLoss"),a=qt(t,"predictions","huberLoss"),s=null;null!=n&&(s=qt(n,"weights","huberLoss")),O(i.shape,a.shape,"Error in huberLoss: ");var u=fn(r),c=a.sub(i).abs(),l=fu(c,u),f=c.sub(l),d=fn(.5).mul(l.square()).add(u.mul(f));return ul(d,s,o)}}),dl=on({logLoss_:function(e,t,n,r,o){void 0===r&&(r=1e-7),void 0===o&&(o=tl.SUM_BY_NONZERO_WEIGHTS);var i=qt(e,"labels","logLoss"),a=qt(t,"predictions","logLoss"),s=null;null!=n&&(s=qt(n,"weights","logLoss")),O(i.shape,a.shape,"Error in logLoss: ");var u=fn(1),c=fn(r),l=i.mul(a.add(c).log()).neg().sub(u.sub(i).mul(u.sub(a).add(c).log()));return ul(l,s,o)}}),pl=on({meanSquaredError_:function(e,t,n,r){void 0===r&&(r=tl.SUM_BY_NONZERO_WEIGHTS);var o=qt(e,"labels","meanSquaredError"),i=qt(t,"predictions","meanSquaredError"),a=null;null!=n&&(a=qt(n,"weights","meanSquaredError")),O(o.shape,i.shape,"Error in meanSquaredError: ");var s=o.squaredDifference(i);return ul(s,a,r)}}),hl=on({sigmoidCrossEntropy_:function(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=tl.SUM_BY_NONZERO_WEIGHTS);var i=qt(e,"multiClassLabels","sigmoidCrossEntropy"),a=qt(t,"logits","sigmoidCrossEntropy"),s=null;if(null!=n&&(s=qt(n,"weights","sigmoidCrossEntropy")),O(i.shape,a.shape,"Error in sigmoidCrossEntropy: "),r>0){var u=fn(r),c=fn(1),l=fn(.5);i=i.mul(c.sub(u)).add(l.mul(u))}var f=function(e,t){var n=qt(e,"labels","sigmoidCrossEntropyWithLogits"),r=qt(t,"logits","sigmoidCrossEntropyWithLogits");O(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: ");var o=r.relu(),i=r.mul(n),a=r.abs().neg().exp().log1p();return o.sub(i).add(a)}(i,a);return ul(f,s,o)}}),vl=on({softmaxCrossEntropy_:function(e,t,n,r,o){void 0===r&&(r=0),void 0===o&&(o=tl.SUM_BY_NONZERO_WEIGHTS);var i=qt(e,"onehotLabels","softmaxCrossEntropy"),a=qt(t,"logits","softmaxCrossEntropy"),s=null;if(null!=n&&(s=qt(n,"weights","softmaxCrossEntropy")),O(i.shape,a.shape,"Error in softmaxCrossEntropy: "),r>0){var u=fn(r),c=fn(1),l=fn(i.shape[1]);i=i.mul(c.sub(u)).add(u.div(l))}var f=function(e,t,n){if(void 0===n&&(n=-1),-1===n&&(n=t.rank-1),n!==t.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+t.rank+" and dim was "+n);return Pr((function(e,t,r){var o=t.logSumExp([n],!0),i=t.toFloat().sub(o);return r([e,i]),{value:i.mul(e).neg().sum([n]),gradFunc:function(e,t){var r=t[0],o=t[1],i=Jt(e.shape,[n]);return[e.reshape(i).mul(r.toFloat().sub(o.exp())),e.reshape(i).mul(o.exp().sub(r.toFloat()))]}}}))(e,t)}(i,a);return ul(f,s,o)}}),ml=Object.freeze({get Reduction(){return tl},absoluteDifference:sl,computeWeightedLoss:ul,cosineDistance:cl,hingeLoss:ll,huberLoss:fl,logLoss:dl,meanSquaredError:pl,sigmoidCrossEntropy:hl,softmaxCrossEntropy:vl});function gl(e,t){return void 0===t&&(t=!1),je.tidy((function(){if(2!==e.shape.length)throw new Error("qr2d() requires a 2D Tensor, but got a "+e.shape.length+"D Tensor.");for(var n=e.shape[0],r=e.shape[1],o=Gn(n),i=e.clone(),a=pn([[1]],[1,1]),s=a.clone(),u=n>=r?r:n,c=function(e){var t,u=i,c=s,l=o;t=je.tidy((function(){var t=i.slice([e,e],[n-e,1]),u=t.norm(),c=i.slice([e,e],[1,1]),l=pn([[-1]]).where(c.greater(0),pn([[1]])),f=c.sub(l.mul(u)),d=t.div(f);s=1===d.shape[0]?a.clone():a.concat(d.slice([1,0],[d.shape[0]-1,d.shape[1]]),0);var p=l.matMul(f).div(u).neg(),h=i.slice([e,0],[n-e,r]),v=p.mul(s);if(0===e)i=h.sub(v.matMul(s.transpose().matMul(h)));else{var m=h.sub(v.matMul(s.transpose().matMul(h)));i=i.slice([0,0],[e,r]).concat(m,0)}var g=o.slice([0,e],[n,o.shape[1]-e]);if(0===e)o=g.sub(g.matMul(s).matMul(v.transpose()));else{var y=g.sub(g.matMul(s).matMul(v.transpose()));o=o.slice([0,0],[n,e]).concat(y,1)}return[s,i,o]})),s=t[0],i=t[1],o=t[2],Vt([u,c,l])},l=0;l<u;++l)c(l);return!t&&n>r&&(o=o.slice([0,0],[n,r]),i=i.slice([0,0],[r,r])),[o,i]}))}var yl=on({bandPart_:function(e,t,n){if(t%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+t+".");if(n%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+n+".");var r=qt(e,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var o=r.shape,i=r.shape.slice(-2),a=i[0],s=i[1];if(!(t<=a))throw new Error("bandPart(): numLower ("+t+") must not be greater than the number of rows ("+a+").");if(!(n<=s))throw new Error("bandPart(): numUpper ("+n+") must not be greater than the number of columns ("+s+").");t<0&&(t=a),n<0&&(n=s);var u=bn(0,a,1,"int32").reshape([-1,1]),c=bn(0,s,1,"int32"),l=wu(u,c),f=Xs(l.lessEqual(fn(+t,"int32")),l.greaterEqual(fn(-n,"int32"))),d=gn([a,s],r.dtype);return cr(dr(r.reshape([-1,a,s])).map((function(e){return Zs(f,e,d)}))).reshape(o)}}),bl=on({gramSchmidt_:function(e){var t;if(Array.isArray(e)){t=!1,k(null!=e&&e.length>0,(function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"}));for(var n=e[0].shape[0],r=function(t){k(e[t].shape[0]===n,(function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+e[t].shape[0]+" vs. "+n+")"}))},o=1;o<e.length;++o)r(o)}else t=!0,e=_n(e,e.shape[0],0).map((function(e){return ur(e,[0])}));k(e.length<=e[0].shape[0],(function(){return"Gram-Schmidt: Number of vectors ("+e.length+") exceeds number of dimensions ("+e[0].shape[0]+")."}));var i=[],a=e,s=function(e){i.push(je.tidy((function(){var t=a[e];if(e>0)for(var n=0;n<e;++n){var r=Tc(i[n].mulStrict(t)).mul(i[n]);t=t.sub(r)}return t.div(Lc(t,"euclidean"))})))};for(o=0;o<e.length;++o)s(o);return t?cr(i,0):i}}),wl=on({qr_:function(e,t){if(void 0===t&&(t=!1),e.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+e.rank);if(2===e.rank)return gl(e,t);var n=e.shape.slice(0,e.shape.length-2).reduce((function(e,t){return e*t})),r=dr(e.reshape([n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),o=[],i=[];return r.forEach((function(e){var n=gl(e,t),r=n[0],a=n[1];o.push(r),i.push(a)})),[cr(o,0).reshape(e.shape),cr(i,0).reshape(e.shape)]}}),xl=Object.freeze({bandPart:yl,gramSchmidt:bl,qr:wl});function El(e,t,n,r,o,i){null==r&&(r=.5),null==o&&(o=Number.NEGATIVE_INFINITY),null==i&&(i=0);var a=e.shape[0];return n=Math.min(n,a),k(0<=r&&r<=1,(function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"})),k(2===e.rank,(function(){return"boxes must be a 2D tensor, but was of rank '"+e.rank+"'"})),k(4===e.shape[1],(function(){return"boxes must have 4 columns, but 2nd dimension was "+e.shape[1]})),k(1===t.rank,(function(){return"scores must be a 1D tensor"})),k(t.shape[0]===a,(function(){return"scores has incompatible shape with boxes. Expected "+a+", but was "+t.shape[0]})),k(0<=i&&i<=1,(function(){return"softNmsSigma must be in [0, 1], but was '"+i+"'"})),{maxOutputSize:n,iouThreshold:r,scoreThreshold:o,softNmsSigma:i}}var Cl=on({resizeBilinear_:function(e,t,n){void 0===n&&(n=!1);var r=qt(e,"images","resizeBilinear");k(3===r.rank||4===r.rank,(function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."})),k(2===t.length,(function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."}));var o=r,i=!1;3===r.rank&&(i=!0,o=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var a=t[0],s=t[1],u=je.runKernelFunc((function(e,t){return t([o]),e.resizeBilinear(o,a,s,n)}),{x:o},(function(e,t){return{x:function(){return je.runKernelFunc((function(r){return r.resizeBilinearBackprop(e,t[0],n)}),{})}}}),"ResizeBilinear",{alignCorners:n,newHeight:a,newWidth:s});return i?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),kl=on({resizeNearestNeighbor_:function(e,t,n){void 0===n&&(n=!1);var r=qt(e,"images","resizeNearestNeighbor");k(3===r.rank||4===r.rank,(function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."})),k(2===t.length,(function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."})),k("float32"===r.dtype||"int32"===r.dtype,(function(){return"`images` must have `int32` or `float32` as dtype"}));var o=r,i=!1;3===r.rank&&(i=!0,o=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var a=t[0],s=t[1],u=je.runKernelFunc((function(e,t){return t([o]),e.resizeNearestNeighbor(o,a,s,n)}),{batchImages:o},(function(e,t){return{batchImages:function(){return je.runKernelFunc((function(r){return r.resizeNearestNeighborBackprop(e,t[0],n)}),{})}}}));return i?u.as3D(u.shape[1],u.shape[2],u.shape[3]):u}}),Ol=on({nonMaxSuppression_:function(e,t,n,r,o){void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY);var i=qt(e,"boxes","nonMaxSuppression"),a=qt(t,"scores","nonMaxSuppression"),s=El(i,a,n,r,o);n=s.maxOutputSize,r=s.iouThreshold,o=s.scoreThreshold;var u={maxOutputSize:n,iouThreshold:r,scoreThreshold:o};return je.runKernelFunc((function(e){return e.nonMaxSuppression(i,a,n,r,o)}),{boxes:i,scores:a},null,"NonMaxSuppressionV3",u)}}),Sl=on({nonMaxSuppressionWithScore_:function(e,t,n,r,o,i){void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY),void 0===i&&(i=0);var a=qt(e,"boxes","nonMaxSuppression"),s=qt(t,"scores","nonMaxSuppression"),u=El(a,s,n,r,o,i),c={maxOutputSize:n=u.maxOutputSize,iouThreshold:r=u.iouThreshold,scoreThreshold:o=u.scoreThreshold,softNmsSigma:i=u.softNmsSigma},l=je.runKernel("NonMaxSuppressionV5",{boxes:a,scores:s},c);return{selectedIndices:l[0],selectedScores:l[1]}}}),_l=on({cropAndResize_:function(e,t,n,r,o,i){var a=qt(e,"image","cropAndResize"),s=qt(t,"boxes","cropAndResize","float32"),u=qt(n,"boxInd","cropAndResize","int32");o=o||"bilinear",i=i||0;var c=s.shape[0];return k(4===a.rank,(function(){return"Error in cropAndResize: image must be rank 4,but got rank "+a.rank+"."})),k(2===s.rank&&4===s.shape[1],(function(){return"Error in cropAndResize: boxes must be have size ["+c+",4] but had shape "+s.shape+"."})),k(1===u.rank&&u.shape[0]===c,(function(){return"Error in cropAndResize: boxInd must be have size ["+c+"] but had shape "+s.shape+"."})),k(2===r.length,(function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."})),k(r[0]>=1&&r[1]>=1,(function(){return"cropSize must be atleast [1,1], but was "+r})),k("bilinear"===o||"nearest"===o,(function(){return"method must be bilinear or nearest, but was "+o})),je.runKernelFunc((function(e,t){return e.cropAndResize(a,s,u,r,o,i)}),{images:a,boxes:s,boxInd:u},null,"CropAndResize",{method:o,extrapolationValue:i,cropSize:r})}}),Tl=Object.freeze({resizeBilinear:Cl,resizeNearestNeighbor:kl,nonMaxSuppression:Ol,nonMaxSuppressionAsync:function(e,t,n,r,o){return void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY),s(this,void 0,void 0,(function(){var i,a,s,c,l,f,d;return u(this,(function(u){switch(u.label){case 0:return i=qt(e,"boxes","nonMaxSuppressionAsync"),a=qt(t,"scores","nonMaxSuppressionAsync"),s=El(i,a,n,r,o),n=s.maxOutputSize,r=s.iouThreshold,o=s.scoreThreshold,[4,Promise.all([i.data(),a.data()])];case 1:return c=u.sent(),l=c[0],f=c[1],d=ao(l,f,n,r,o),i!==e&&i.dispose(),a!==t&&a.dispose(),[2,d]}}))}))},nonMaxSuppressionWithScore:Sl,nonMaxSuppressionWithScoreAsync:function(e,t,n,r,o,i){return void 0===r&&(r=.5),void 0===o&&(o=Number.NEGATIVE_INFINITY),void 0===i&&(i=0),s(this,void 0,void 0,(function(){var a,s,c,l,f,d,p;return u(this,(function(u){switch(u.label){case 0:return a=qt(e,"boxes","nonMaxSuppressionAsync"),s=qt(t,"scores","nonMaxSuppressionAsync"),c=El(a,s,n,r,o,i),n=c.maxOutputSize,r=c.iouThreshold,o=c.scoreThreshold,i=c.softNmsSigma,[4,Promise.all([a.data(),s.data()])];case 1:return l=u.sent(),f=l[0],d=l[1],p=so(f,d,n,r,o,i),a!==e&&a.dispose(),s!==t&&s.dispose(),[2,p]}}))}))},cropAndResize:_l}),Il=function(e,t){return!(e>0)||"linear"===t},Pl=function(e,t,n){if(null==n||"linear"===n)return e;if("relu"===n)return e.mul(t.step());throw new Error("Gradient for activation "+n+" has not been implemented yet.")},Al=function(e,t){var n=t,r=Fr(e.shape,t.shape);return r.length>0&&(n=n.sum(r)),n.reshape(e.shape)},Rl=function(e,t,n){if("linear"===t)return e;if("relu"===t)return Nc(e);if("elu"===t)return Pc(e);if("relu6"===t)return Mc(e);if("prelu"===t)return Rc(e,n);throw new Error("Unknown fused activation "+t+".")},Nl=on({fusedMatMul_:function(e){var t,n=e.a,r=e.b,o=e.transposeA,i=void 0!==o&&o,a=e.transposeB,s=void 0!==a&&a,u=e.bias,c=e.activation,l=void 0===c?"linear":c,f=e.preluActivationWeights;if(!1===Il(je.state.gradientDepth,l)){var d=Qu(n,r,i,s);return null!=u&&(d=tu(d,u)),Rl(d,l,f)}var p=qt(n,"a","fused matMul"),h=qt(r,"b","fused matMul");t=Ie(p,h),p=t[0],h=t[1];var v=i?p.shape[p.rank-2]:p.shape[p.rank-1],m=s?h.shape[h.rank-1]:h.shape[h.rank-2],g=i?p.shape[p.rank-1]:p.shape[p.rank-2],y=s?h.shape[h.rank-2]:h.shape[h.rank-1],b=p.shape.slice(0,-2),w=h.shape.slice(0,-2),x=T(b),E=T(w);k(p.rank>=2&&h.rank>=2&&p.rank===h.rank,(function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+p.rank+" and "+h.rank+"."})),k(I(b,w),(function(){return"Error in fused matMul: outer dimensions ("+b+") and ("+w+") of Tensors with shapes "+p.shape+" and "+h.shape+" must match."})),k(v===m,(function(){return"Error in fused matMul: inner shapes ("+v+") and ("+m+") of Tensors with shapes "+p.shape+" and "+h.shape+" and transposeA="+i+" and transposeB="+s+" must match."}));var C,O,S=p.shape.slice(0,-2).concat([g,y]),_=i?p.as3D(x,v,g):p.as3D(x,g,v),P=s?h.as3D(E,y,m):h.as3D(E,m,y);null!=u&&Lr(S,(C=Ie(C=qt(u,"bias","fused matMul"),p)[0]).shape),null!=f&&(O=qt(f,"prelu weights","fused matMul"));var A={a:_,b:P};null!=u&&(A.bias=C),null!=f&&(A.preluActivationWeights=O);var R=[_,P];return je.runKernelFunc((function(e,t){var n=e.fusedBatchMatMul({a:_,b:P,transposeA:i,transposeB:s,bias:C,activation:l,preluActivationWeights:O});return t([_,P,n]),n}),A,(function(e,t){var n=t[0],r=t[1],o=t[2],a=Pl(e,o,l),c={};return null!=u&&(c={bias:function(){return Al(C,a)}}),i||s?!i&&s?Object.assign({a:function(){return a.matMul(r,!1,!1)},b:function(){return a.matMul(n,!0,!1)}},c):i&&!s?Object.assign({a:function(){return r.matMul(a,!1,!0)},b:function(){return n.matMul(a,!1,!1)}},c):Object.assign({a:function(){return r.matMul(a,!0,!0)},b:function(){return a.matMul(n,!0,!0)}},c):Object.assign({a:function(){return a.matMul(r,!1,!0)},b:function(){return n.matMul(a,!0,!1)}},c)}),"_FusedMatMul",{transposeA:i,transposeB:s,activation:l},R,[!0]).reshape(S)}}),Ml=on({fusedConv2d_:function(e){var t=e.x,n=e.filter,r=e.strides,o=e.pad,i=e.dataFormat,a=void 0===i?"NHWC":i,s=e.dilations,u=void 0===s?[1,1]:s,c=e.dimRoundingMode,l=e.bias,f=e.activation,d=void 0===f?"linear":f,p=e.preluActivationWeights;if(d=d||"linear",!1===Il(je.state.gradientDepth,d)){var h=Vu(t,n,r,o,a,u,c);return null!=l&&(h=tu(h,l)),Rl(h,d,p)}var v=qt(t,"x","conv2d"),m=qt(n,"filter","conv2d"),g=v,y=!1;3===v.rank&&(y=!0,g=v.as4D(1,v.shape[0],v.shape[1],v.shape[2])),k(4===g.rank,(function(){return"Error in fused conv2d: input must be rank 4, but got rank "+g.rank+"."})),k(4===m.rank,(function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+m.rank+"."})),null!=c&&k(P(o),(function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+c+" but got pad "+o+"."})),k(g.shape[3]===m.shape[2],(function(){return"Error in conv2d: depth of input ("+g.shape[3]+") must match input depth for filter "+m.shape[2]+"."})),k(Xr(r,u),(function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+u+"'"})),k("NHWC"===a,(function(){return"Error in conv2d: got dataFormat of "+a+" but only NHWC is currently supported."}));var b,w,x=zr(g.shape,m.shape,r,u,o,c);null!=l&&(b=Ie(b=qt(l,"bias","fused conv2d"),v)[0],Lr(x.outShape,b.shape)),null!=p&&(w=qt(p,"prelu weights","fused conv2d"));var E={x:g,filter:m};null!=l&&(E.bias=b),null!=p&&(E.preluActivationWeights=w);var C=[m,g],O=je.runKernelFunc((function(e,t){var n=e.fusedConv2d({input:g,filter:m,convInfo:x,bias:b,activation:d,preluActivationWeights:w});return t([m,g,n]),n}),E,(function(e,t){var n=t,i=n[0],a=n[1],s=n[2],c=Pl(e,s,d);k(Gr(u),(function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+u+"'"}));var f={};return null!=l&&(f={bias:function(){return Al(b,c)}}),Object.assign({x:function(){return $u(a.shape,c,i,r,o)},filter:function(){return Hu(a,c,i.shape,r,o)}},f)}),"FusedConv2D",{convInfo:x,activation:d},C,[!0]);return y?O.as3D(O.shape[1],O.shape[2],O.shape[3]):O}}),jl=on({fusedDepthwiseConv2d_:function(e){var t=e.x,n=e.filter,r=e.strides,o=e.pad,i=e.dataFormat,a=void 0===i?"NHWC":i,s=e.dilations,u=void 0===s?[1,1]:s,c=e.dimRoundingMode,l=e.bias,f=e.activation,d=void 0===f?"linear":f,p=e.preluActivationWeights;if(!1===Il(je.state.gradientDepth,d)){var h=qu(t,n,r,o,a,u,c);return null!=l&&(h=tu(h,l)),Rl(h,d,p)}var v=qt(t,"x","depthwiseConv2d"),m=qt(n,"filter","depthwiseConv2d"),g=v,y=!1;3===v.rank&&(y=!0,g=v.as4D(1,v.shape[0],v.shape[1],v.shape[2])),k(4===g.rank,(function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+g.rank+"."})),k(4===m.rank,(function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+m.rank+"."})),k(g.shape[3]===m.shape[2],(function(){return"Error in fused depthwiseConv2d: number of input channels ("+g.shape[3]+") must match the inChannels dimension in filter "+m.shape[2]+"."})),null==u&&(u=[1,1]),k(Xr(r,u),(function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+u+"'"})),null!=c&&k(P(o),(function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+c+" but got pad "+o+"."}));var b,w,x=zr(g.shape,m.shape,r,u,o,c,!0);null!=l&&(b=Ie(b=qt(l,"bias","fused conv2d"),v)[0],Lr(x.outShape,b.shape)),null!=p&&(w=qt(p,"prelu weights","fused depthwiseConv2d"));var E={x:g,filter:m};null!=l&&(E.bias=b),null!=p&&(E.preluActivationWeights=w);var C=[m,g],O=je.runKernelFunc((function(e,t){var n=e.fusedDepthwiseConv2D({input:g,filter:m,convInfo:x,bias:b,activation:d,preluActivationWeights:w});return t([m,g,n]),n}),E,(function(e,t){k(Gr(u),(function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+u+"'"}));var n=t[0],r=t[1],o=t[2],i=Pl(e,o,d),a={};return null!=l&&(a={bias:function(){return Al(b,i)}}),Object.assign({x:function(){return Ku(r.shape,i,n,x)},filter:function(){return Gu(r,i,n.shape,x)}},a)}),"FusedDepthwiseConv2D",{convInfo:x,activation:d},C,[!0]);return y?O.as3D(O.shape[1],O.shape[2],O.shape[3]):O}}),Dl=Object.freeze({matMul:Nl,conv2d:Ml,depthwiseConv2d:jl}),Fl=Object.freeze({image:Tl,linalg:xl,losses:ml,spectral:Xc,fused:Dl,signal:al,square:Qa,squaredDifference:es,conv1d:zu,conv2d:Vu,conv3d:Wu,depthwiseConv2d:qu,separableConv2d:Xu,conv2dTranspose:Yu,conv3dTranspose:Ju,op:on,batchNormalization2d:zs,batchNormalization3d:Vs,batchNormalization4d:Ws,batchNormalization:Hs,batchNorm:$s,batchNorm2d:qs,batchNorm3d:Ks,batchNorm4d:Gs,booleanMaskAsync:function(e,t,n){return s(this,void 0,void 0,(function(){var r,o,i,a,s,c,l,f,d,p,h,v,m;return u(this,(function(u){switch(u.label){case 0:for(r=qt(e,"tensor","boolMask"),o=qt(t,"mask","boolMask","bool"),i=null==n?0:n,a=o.rank,s=r.shape,k(a>0,(function(){return"mask cannot be scalar"})),O(s.slice(i,i+a),o.shape,"mask's shape must match the first K dimensions of tensor's shape,"),c=1,l=i;l<i+a;l++)c*=s[l];return f=s.slice(0,i).concat([c],s.slice(i+a)),d=r.reshape(f),p=o.reshape([-1]),[4,eu(p)];case 1:return h=u.sent(),v=h.squeeze([1]),m=Du(d,v,i),e!==r&&r.dispose(),t!==o&&o.dispose(),v.dispose(),d.dispose(),p.dispose(),h.dispose(),[2,m]}}))}))},complex:an,real:sn,imag:un,concat:En,concat1d:Cn,concat2d:kn,concat3d:On,concat4d:Sn,split:_n,matMul:Qu,dot:Zu,outerProduct:ec,reverse:tc,reverse1d:nc,reverse2d:rc,reverse3d:oc,reverse4d:ic,maxPool:uc,avgPool:cc,pool:lc,maxPool3d:fc,avgPool3d:dc,slice:pc,slice1d:hc,slice2d:vc,slice3d:mc,slice4d:gc,abs:ts,acos:ns,acosh:rs,asin:os,asinh:is,atan:as,atanh:ss,ceil:us,clipByValue:cs,cos:ls,cosh:fs,erf:ds,exp:ps,expm1:hs,floor:vs,log:ms,log1p:gs,logSigmoid:ys,neg:bs,reciprocal:ws,round:xs,rsqrt:Es,sigmoid:Cs,sign:ks,isNaN:Os,isInf:Ss,isFinite:_s,sin:Ts,sinh:Is,softplus:Ps,sqrt:As,step:Rs,tan:Ns,tanh:Ms,all:bc,any:wc,argMax:xc,argMin:Ec,logSumExp:Cc,max:kc,mean:Oc,min:Sc,moments:_c,sum:Tc,prod:Ic,equal:Eu,equalStrict:Cu,greater:ku,greaterEqual:Ou,greaterEqualStrict:Su,greaterStrict:_u,less:Tu,lessEqual:Iu,lessEqualStrict:Pu,lessStrict:Au,notEqual:Ru,notEqualStrict:Nu,add:tu,addN:nu,addStrict:ru,atan2:ou,div:iu,divNoNan:au,divStrict:su,floorDiv:uu,maximum:cu,maximumStrict:lu,minimum:fu,minimumStrict:du,mod:pu,modStrict:hu,mul:vu,mulStrict:mu,pow:gu,powStrict:yu,squaredDifferenceStrict:bu,sub:wu,subStrict:xu,elu:Pc,leakyRelu:Ac,prelu:Rc,relu:Nc,relu6:Mc,selu:jc,logicalAnd:Xs,logicalNot:Ys,logicalOr:Js,logicalXor:Qs,where:Zs,whereAsync:eu,buffer:Un,print:function(e,t){void 0===t&&(t=!1),console.log(e.toString(t))},batchToSpaceND:zn,broadcastTo:Vn,cast:Wn,clone:Hn,cumsum:$n,depthToSpace:qn,expandDims:Kn,eye:Gn,multinomial:Xn,oneHot:Yn,pad:Jn,pad1d:Qn,pad2d:Zn,pad3d:er,pad4d:tr,rand:nr,randomNormal:rr,randomGamma:or,randomUniform:ir,reshape:ar,spaceToBatchND:sr,squeeze:ur,stack:cr,tile:lr,truncatedNormal:fr,unstack:dr,setdiff1dAsync:function(e,t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,l,f,d;return u(this,(function(u){switch(u.label){case 0:return n=qt(e,"x","setdiff1d"),r=qt(t,"y","setdiff1d"),k(n.dtype===r.dtype,(function(){return"x and y should have the same dtype, but got x ("+n.dtype+") and y ("+r.dtype+")."})),k(1===n.rank,(function(){return"x should be 1D tensor, but got x ("+n.shape+")."})),k(1===r.rank,(function(){return"y should be 1D tensor, but got y ("+r.shape+")."})),[4,n.data()];case 1:return o=u.sent(),[4,r.data()];case 2:for(i=u.sent(),a=new Set(i),s=0,f=0;f<o.length;f++)a.has(o[f])||s++;for(c=new he([s],n.dtype),l=new he([s],"int32"),f=0,d=0;f<o.length;f++)a.has(o[f])||(c.values[d]=o[f],l.values[d]=f,d++);return[2,[c.toTensor(),l.toTensor()]]}}))}))},fill:yn,linspace:function(e,t,n){if(n<=0)throw new Error("The number of values should be positive.");return je.runKernelFunc((function(r){return r.linspace(e,t,n)}),{})},ones:mn,range:bn,scalar:fn,tensor:cn,tensor1d:dn,tensor2d:pn,tensor3d:hn,tensor4d:vn,tensor5d:function(e,t,n){if(S(e),null!=t&&5!==t.length)throw new Error("tensor5d() requires shape to have five numbers");var r=Ht(e,n);if(5!==r.length&&1!==r.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return ln(e,t,r,n)},tensor6d:function(e,t,n){if(S(e),null!=t&&6!==t.length)throw new Error("tensor6d() requires shape to have six numbers");var r=Ht(e,n);if(6!==r.length&&1!==r.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return ln(e,t=t||r,r,n)},variable:function(e,t,n,r){return void 0===t&&(t=!0),je.makeVariable(e,t,n,r)},zeros:gn,onesLike:wn,zerosLike:xn,transpose:Dc,softmax:Ar,logSoftmax:Rr,localResponseNormalization:Fc,norm:Lc,gather:Du,unsortedSegmentSum:Fu,basicLSTMCell:Bc,multiRNNCell:Uc,movingAverage:zc,stridedSlice:Vc,topk:Wc,scatterND:Hc,fft:$c,ifft:qc,rfft:Kc,irfft:Gc,sparseToDense:Yc,gatherND:Jc,diag:Qc,dropout:Zc,hannWindow:nl,hammingWindow:rl,frame:ol,stft:il,inTopKAsync:function(e,t,n){return void 0===n&&(n=1),s(this,void 0,void 0,(function(){var r,o,i,a,s,c,l,f,d,p,h,v,m,g;return u(this,(function(u){switch(u.label){case 0:return r=qt(e,"predictions","inTopK"),o=qt(t,"targets","inTopK"),k(r.rank>1,(function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank})),k(r.rank-1===o.rank,(function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+o.rank})),O(r.shape.slice(0,r.shape.length-1),o.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),i=r.shape[r.shape.length-1],k(n>0&&n<=i,(function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+i+"), but got "+n})),[4,r.data()];case 1:return a=u.sent(),[4,o.data()];case 2:for(s=u.sent(),c=[a.length/i,i],f=c[1],d=L("bool",l=c[0]),p=0;p<l;p++){for(h=p*f,v=a.subarray(h,h+f),m=[],g=0;g<v.length;g++)m.push({value:v[g],index:g});for(m.sort((function(e,t){return t.value-e.value})),d[p]=0,g=0;g<n;g++)if(m[g].index===s[p]){d[p]=1;break}}return e!==r&&r.dispose(),t!==o&&o.dispose(),[2,cn(d,o.shape,"bool")]}}))}))}});function Ll(e,t){Array.isArray(e)||(e=[e]),e.forEach((function(e){null!=e&&k("complex64"!==e.dtype,(function(){return t+" does not support complex64 tensors."}))}))}function Bl(e,t,n,r){if("linear"===n)return e.linear(t);if("relu"===n)return e.relu(t);if("elu"===n)return e.elu(t);if("relu6"===n)return e.relu6(t);if("prelu"===n)return e.prelu(t,r);throw new Error("Activation "+n+" has not been implemented for the CPU backend.")}var Ul=function(e){function t(){var t=e.call(this)||this;return t.blockSize=48,t.firstUse=!0,t.data=new Nr(t,je),t}return a(t,e),t.prototype.write=function(e,t,n){this.firstUse&&(this.firstUse=!1,f().get("IS_NODE")&&Wt("\n============================\nHi there \ud83d\udc4b. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.\n============================"));var r={};return this.data.set(r,{values:e,dtype:n}),r},t.prototype.move=function(e,t,n,r){this.data.set(e,{values:t,dtype:r})},t.prototype.numDataIds=function(){return this.data.numDataIds()},t.prototype.read=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.readSync(e)]}))}))},t.prototype.readSync=function(e){var t=this.data.get(e),n=t.dtype,r=t.complexTensors;return"complex64"===n?eo(this.readSync(r.real.dataId),this.readSync(r.imag.dataId)):this.data.get(e).values},t.prototype.bufferSync=function(e){var t=this.readSync(e.dataId),n=t;if("string"===e.dtype)try{n=t.map((function(e){return ae(e)}))}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8")}return Un(e.shape,e.dtype,n)},t.prototype.makeOutput=function(e,t,n){var r=this.write(e,t,n);return je.makeTensorFromDataId(r,t,n,this)},t.prototype.disposeData=function(e){if(this.data.has(e)){var t=this.data.get(e).complexTensors;null!=t&&(t.real.dispose(),t.imag.dispose()),this.data.delete(e)}},t.prototype.time=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){return t=re(),e(),[2,{kernelMs:re()-t}]}))}))},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(e,t){var n=this.makeOutput(null,e.shape,"complex64");return this.data.get(n.dataId).complexTensors={real:je.keep(e.clone()),imag:je.keep(t.clone())},n},t.prototype.real=function(e){return this.data.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.data.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,t,n){if(Ll(e,"slice"),Tr(e.shape,t,n)){var r=Ir(t,e.strides),o=T(n);return cn(this.readSync(e.dataId).subarray(r,r+o),n,e.dtype)}for(var i=Un(n,e.dtype),a=this.bufferSync(e),s=0;s<i.size;++s){var u=i.indexToLoc(s).map((function(e,n){return e+t[n]}));i.values[s]=a.get.apply(a,u)}return i.toTensor()},t.prototype.stridedSlice=function(e,t,n,r){Ll(e,"stridedSlice");var o=Or(t,n,r);if(o.some((function(e){return 0===e})))return cn([],o);for(var i=Un(o,e.dtype),a=this.bufferSync(e),s=0;s<i.size;s++){for(var u=i.indexToLoc(s),c=new Array(u.length),l=0;l<c.length;l++)c[l]=u[l]*r[l]+t[l];i.set.apply(i,[a.get.apply(a,c)].concat(u))}return i.toTensor()},t.prototype.diag=function(e){for(var t=this.readSync(e.dataId),n=Un([e.size,e.size],e.dtype),r=n.values,o=0;o<t.length;o++)r[o*e.size+o]=t[o];return n.toTensor()},t.prototype.unstack=function(e,t){for(var n=e.shape[t],r=new Array(e.rank-1),o=0,i=0;i<e.rank;i++)i!==t&&(r[o++]=e.shape[i]);var a=new Array(e.rank).fill(0),s=e.shape.slice();s[t]=1;var u=new Array(n);for(i=0;i<u.length;i++)a[t]=i,u[i]=this.slice(e,a,s).reshape(r);return u},t.prototype.reverse=function(e,t){Ll(e,"reverse");for(var n=Un(e.shape,e.dtype),r=this.bufferSync(e),o=function(o){var i=n.indexToLoc(o),a=i.slice();t.forEach((function(t){return a[t]=e.shape[t]-1-a[t]})),n.set.apply(n,[r.get.apply(r,a)].concat(i))},i=0;i<n.size;i++)o(i);return n.toTensor()},t.prototype.concat=function(e,t){var n=this;if("complex64"===e[0].dtype){var r=e.map((function(e){return sn(e)})),o=e.map((function(e){return un(e)}));return an(this.concat(r,t),this.concat(o,t))}var i=e.map((function(e){var n=T(e.shape.slice(t));return e.as2D(-1,n)})),a=rn(i.map((function(e){return e.shape})),1),s=Un(a,e[0].dtype).values;if(1===i[0].shape[0]){var u=0;i.forEach((function(e){s.set(n.readSync(e.dataId),u),u+=e.size}))}else{var c=0;i.forEach((function(e){for(var t=n.readSync(e.dataId),r=0,o=0;o<e.shape[0];++o)for(var i=o*a[1]+c,u=0;u<e.shape[1];++u)s[i+u]=t[r++];c+=e.shape[1]}))}var l=rn(e.map((function(e){return e.shape})),t);return cn(s,l,e[0].dtype)},t.prototype.neg=function(e){return Ll(e,"neg"),this.multiply(fn(-1),e)},t.prototype.add=function(e,t){return"complex64"===e.dtype||"complex64"===t.dtype?this.broadcastedBinaryComplexOp(e.cast("complex64"),t.cast("complex64"),(function(e,t,n,r){return{real:e+n,imag:t+r}})):this.broadcastedBinaryOp(e,t,_e(e.dtype,t.dtype),(function(e,t){return e+t}))},t.prototype.addN=function(e){var t=this;Ll(e,"addN");for(var n=e.map((function(e){return t.readSync(e.dataId)})),r=Un(e[0].shape,e[0].dtype),o=r.values,i=0;i<e.length;i++)for(var a=n[i],s=0;s<o.length;s++)o[s]+=a[s];return r.toTensor()},t.prototype.softmax=function(e,t){var n=D([t],e.shape),r=this.max(e,n),o=Jt(r.shape,n),i=this.subtract(e,r.reshape(o)),a=this.exp(i),s=this.sum(a,n).reshape(o);return this.realDivide(a,s)},t.prototype.subtract=function(e,t){return"complex64"===e.dtype||"complex64"===t.dtype?this.broadcastedBinaryComplexOp(e.cast("complex64"),t.cast("complex64"),(function(e,t,n,r){return{real:e-n,imag:t-r}})):this.broadcastedBinaryOp(e,t,_e(e.dtype,t.dtype),(function(e,t){return e-t}))},t.prototype.pow=function(e,t){return Ll([e,t],"pow"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.pow(e,t)}))},t.prototype.batchMatMul=function(e,t,n,r){Ll([e,t],"matMul");for(var o=n?e.shape[1]:e.shape[2],i=n?e.shape[2]:e.shape[1],a=r?t.shape[1]:t.shape[2],s=e.shape[0],u=this.readSync(e.dataId),c=this.readSync(t.dataId),l=n?[e.strides[0],1,e.strides[1]]:[e.strides[0],e.strides[1],1],f=l[0],d=l[1],p=l[2],h=r?[1,t.strides[1],t.strides[0]]:[t.strides[1],1,t.strides[0]],v=h[0],m=h[1],g=h[2],y=i*a,b=Un([s,i,a],e.dtype),w=b.values,x=this.blockSize,E=0;E<s;E++)for(var C=0;C<i;C+=x)for(var k=0;k<a;k+=x)for(var O=0;O<o;O+=x)for(var S=Math.min(C+x,i),_=Math.min(k+x,a),T=Math.min(O+x,o),I=C;I<S;I++)for(var P=k;P<_;P++){for(var A=0,R=O;R<T;R++)A+=u[E*f+I*d+R*p]*c[R*v+P*m+E*g];w[E*y+(I*a+P)]+=A}return b.toTensor()},t.prototype.fusedBatchMatMul=function(e){var t=e.a,n=e.b,r=e.transposeA,o=e.transposeB,i=e.bias,a=e.activation,s=e.preluActivationWeights,u=this.batchMatMul(t,n,r,o);return i&&(u=this.add(u,i)),a&&(u=Bl(this,u,a,s)),u},t.prototype.multiply=function(e,t){return"complex64"===e.dtype||"complex64"===t.dtype?this.broadcastedBinaryComplexOp(e.cast("complex64"),t.cast("complex64"),(function(e,t,n,r){return{real:e*n-t*r,imag:e*r+t*n}})):this.broadcastedBinaryOp(e,t,_e(e.dtype,t.dtype),(function(e,t){return e*t}))},t.prototype.realDivide=function(e,t){return Ll([e,t],"realDivide"),this.broadcastedBinaryOp(e,t,"float32",(function(e,t){return e/t}))},t.prototype.floorDiv=function(e,t){return Ll([e,t],"floorDiv"),this.broadcastedBinaryOp(e,t,"int32",(function(e,t){return Math.floor(e/t)}))},t.prototype.sum=function(e,t){Ll(e,"sum"),Qt("sum",t,e.rank);for(var n=Yt(e.shape,t),r=n[0],o=n[1],i=gn(r,_e(e.dtype,"int32")),a=T(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=0,d=0;d<a;++d)f+=u[l+d];s[c]=f}return i},t.prototype.prod=function(e,t){Ll(e,"sum");for(var n=Yt(e.shape,t),r=n[0],o=n[1],i=gn(r,_e(e.dtype,"int32")),a=T(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=1,d=0;d<a;++d)f*=u[l+d];s[c]=f}return i},t.prototype.unsortedSegmentSum=function(e,t,n){Ll(e,"unsortedSegmentSum");for(var r=[],o=e.rank-t.rank,i=0;i<o;++i)t=t.expandDims(i+1);for(i=0;i<n;++i){var a=fn(i,"int32"),s=Eu(a,t).asType("float32").mul(e).sum(0);r.push(s)}return cr(r)},t.prototype.argMin=function(e,t){Ll(e,"argMin");var n=[t];Qt("argMin",n,e.rank);for(var r=Yt(e.shape,n),o=r[0],i=r[1],a=gn(o,"int32"),s=T(i),u=this.readSync(a.dataId),c=this.readSync(e.dataId),l=0;l<u.length;++l){for(var f=l*s,d=c[f],p=0,h=0;h<s;++h){var v=c[f+h];v<d&&(d=v,p=h)}u[l]=p}return a},t.prototype.argMax=function(e,t){Ll(e,"argMax");var n=[t];Qt("argMax",n,e.rank);for(var r=Yt(e.shape,n),o=r[0],i=r[1],a=gn(o,"int32"),s=T(i),u=this.readSync(a.dataId),c=this.readSync(e.dataId),l=0;l<u.length;++l){for(var f=l*s,d=c[f],p=0,h=0;h<s;++h){var v=c[f+h];v>d&&(d=v,p=h)}u[l]=p}return a},t.prototype.cumsum=function(e,t,n,r){if(Ll(e,"cumsum"),t!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+t);for(var o=_e(e.dtype,"int32"),i=gn(e.shape,o),a=this.readSync(i.dataId),s=this.readSync(e.dataId),u=e.shape[e.rank-1],c=r?function(e,t){return e+u-t-1}:function(e,t){return e+t},l=0;l<s.length;l+=u)for(var f=0;f<u;f++){var d=c(l,f);if(0===f)a[d]=n?0:s[d];else{var p=c(l,f-1);a[d]=n?s[p]+a[p]:s[d]+a[p]}}return i},t.prototype.equal=function(e,t){return Ll([e,t],"equal"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e===t?1:0}))},t.prototype.notEqual=function(e,t){return Ll([e,t],"notEqual"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e!==t?1:0}))},t.prototype.less=function(e,t){return Ll([e,t],"less"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e<t?1:0}))},t.prototype.lessEqual=function(e,t){return Ll([e,t],"lessEqual"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e<=t?1:0}))},t.prototype.greater=function(e,t){return Ll([e,t],"greater"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e>t?1:0}))},t.prototype.greaterEqual=function(e,t){return Ll([e,t],"greaterEqual"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e>=t?1:0}))},t.prototype.logicalNot=function(e){Ll(e,"logicalNot");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t[r]?0:1;return this.makeOutput(n,e.shape,"bool")},t.prototype.logicalAnd=function(e,t){return Ll([e,t],"logicalAnd"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e&&t}))},t.prototype.logicalOr=function(e,t){return Ll([e,t],"logicalOr"),this.broadcastedBinaryOp(e,t,"bool",(function(e,t){return e||t}))},t.prototype.select=function(e,t,n){Ll([e,t,n],"select");for(var r=this.readSync(e.dataId),o=this.readSync(t.dataId),i=this.readSync(n.dataId),a=gn(t.shape,_e(t.dtype,n.dtype)),s=this.readSync(a.dataId),u=0,c=0===e.rank||e.rank>1||1===t.rank?1:T(t.shape.slice(1)),l=0;l<r.length;l++)for(var f=0;f<c;f++)1===r[l]?s[u++]=o[l]:s[u++]=i[l];return a},t.prototype.where=function(e){Ll([e],"where");var t=this.readSync(e.dataId);return mo(e.shape,t)},t.prototype.topk=function(e,t,n){return Ll(e,"topk"),vo(this.readSync(e.dataId),e.shape,e.dtype,t)},t.prototype.min=function(e,t){Ll(e,"min"),Qt("min",t,e.rank);for(var n=Yt(e.shape,t),r=n[0],o=n[1],i=gn(r,e.dtype),a=T(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],d=0;d<a;++d){var p=u[l+d];p<f&&(f=p)}s[c]=f}return i},t.prototype.minimum=function(e,t){return Ll([e,t],"minimum"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.min(e,t)}))},t.prototype.mod=function(e,t){return Ll([e,t],"mod"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){var n=e%t;return e<0&&t<0||e>=0&&t>=0?n:(n+t)%t}))},t.prototype.max=function(e,t){Ll(e,"max"),Qt("max",t,e.rank);for(var n=Yt(e.shape,t),r=n[0],o=n[1],i=gn(r,e.dtype),a=T(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],d=0;d<a;++d){var p=u[l+d];p>f&&(f=p)}s[c]=f}return i},t.prototype.maximum=function(e,t){return Ll([e,t],"maximum"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.max(e,t)}))},t.prototype.all=function(e,t){Ll(e,"all"),Qt("all",t,e.rank);for(var n=Yt(e.shape,t),r=n[0],o=n[1],i=gn(r,e.dtype),a=T(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],d=0;d<a;++d){var p=u[l+d];f=f&&p}s[c]=f}return i},t.prototype.any=function(e,t){Ll(e,"any"),Qt("any",t,e.rank);for(var n=Yt(e.shape,t),r=n[0],o=n[1],i=gn(r,e.dtype),a=T(o),s=this.readSync(i.dataId),u=this.readSync(e.dataId),c=0;c<s.length;++c){for(var l=c*a,f=u[l],d=0;d<a;++d){var p=u[l+d];f=f||p}s[c]=f}return i},t.prototype.squaredDifference=function(e,t){return Ll([e,t],"squaredDifference"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){var n=e-t;return n*n}))},t.prototype.ceil=function(e){Ll(e,"ceil");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.ceil(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.floor=function(e){Ll(e,"floor");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.floor(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.sign=function(e){Ll(e,"x");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)t[r]<0?n[r]=-1:t[r]>0?n[r]=1:n[r]=0;return this.makeOutput(n,e.shape,"float32")},t.prototype.isNaN=function(e){Ll(e,"x");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)Number.isNaN(t[r])&&(n[r]=1);return this.makeOutput(n,e.shape,"bool")},t.prototype.isInf=function(e){Ll(e,"x");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)Math.abs(t[r])===1/0&&(n[r]=1);return this.makeOutput(n,e.shape,"bool")},t.prototype.isFinite=function(e){Ll(e,"x");for(var t=this.readSync(e.dataId),n=new Uint8Array(t.length),r=0;r<t.length;++r)Number.isFinite(t[r])&&(n[r]=1);return this.makeOutput(n,e.shape,"bool")},t.prototype.round=function(e){Ll(e,"round");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=Math.floor(t[r]);t[r]-o<.5?n[r]=Math.floor(t[r]):t[r]-o>.5?n[r]=Math.ceil(t[r]):n[r]=o%2==0?o:o+1}return this.makeOutput(n,e.shape,"float32")},t.prototype.exp=function(e){Ll(e,"exp");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.exp(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.expm1=function(e){Ll(e,"expm1");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=Math.expm1(t[r]);return this.makeOutput(n,e.shape,"float32")},t.prototype.log=function(e){Ll(e,"log");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=Math.log(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.log1p=function(e){Ll(e,"log1p");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=Math.log1p(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.sqrt=function(e){Ll(e,"sqrt");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=Math.sqrt(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.rsqrt=function(e){Ll(e,"rsqrt");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r){var o=t[r];n[r]=1/Math.sqrt(o)}return this.makeOutput(n,e.shape,"float32")},t.prototype.reciprocal=function(e){Ll(e,"reciprocal");for(var t=this.readSync(e.dataId),n=new Float32Array(t.length),r=0;r<t.length;++r)n[r]=1/t[r];return this.makeOutput(n,e.shape,"float32")},t.prototype.linear=function(e){return e},t.prototype.relu=function(e){Ll(e,"relu");for(var t=gn(e.shape,e.dtype),n=this.readSync(t.dataId),r=this.readSync(e.dataId),o=0;o<r.length;++o)n[o]=Math.max(0,r[o]);return t},t.prototype.relu6=function(e){Ll(e,"relu");for(var t=gn(e.shape,e.dtype),n=this.readSync(t.dataId),r=this.readSync(e.dataId),o=0;o<r.length;++o)n[o]=Math.min(Math.max(0,r[o]),6);return t},t.prototype.prelu=function(e,t){return Ll([e,t],"prelu"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return e<0?t*e:e}))},t.prototype.elu=function(e){Ll(e,"elu");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r){var o=n[r];t[r]=o>=0?o:Math.exp(o)-1}return this.makeOutput(t,e.shape,"float32")},t.prototype.eluDer=function(e,t){Ll([e,t],"eluDer");for(var n=new Float32Array(t.size),r=this.readSync(t.dataId),o=this.readSync(e.dataId),i=0;i<r.length;++i){var a=r[i];n[i]=a>=1?o[i]:o[i]*(a+1)}return this.makeOutput(n,t.shape,"float32")},t.prototype.selu=function(e){Ll(e,"selu");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r){var o=n[r];t[r]=o>=0?1.0507009873554805*o:1.7580993408473768*(Math.exp(o)-1)}return this.makeOutput(t,e.shape,"float32")},t.prototype.clip=function(e,t,n){Ll(e,"clip");for(var r=new Float32Array(e.size),o=this.readSync(e.dataId),i=0;i<o.length;++i){var a=o[i];r[i]=a>n?n:a<t?t:a}return this.makeOutput(r,e.shape,"float32")},t.prototype.abs=function(e){for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.abs(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.complexAbs=function(e){for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<e.size;++r){var o=n[2*r],i=n[2*r+1];t[r]=Math.hypot(o,i)}return this.makeOutput(t,e.shape,"float32")},t.prototype.int=function(e){Ll(e,"int");for(var t=new Int32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=n[r];return this.makeOutput(t,e.shape,"int32")},t.prototype.sigmoid=function(e){Ll(e,"sigmoid");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=1/(1+Math.exp(-n[r]));return this.makeOutput(t,e.shape,"float32")},t.prototype.softplus=function(e){Ll(e,"softplus");for(var t=Math.log(1.1920928955078125e-7)+2,n=new Float32Array(e.size),r=this.readSync(e.dataId),o=0;o<r.length;++o){var i,a=r[o]>-t,s=r[o]<t,u=Math.exp(r[o]);i=s?u:a?r[o]:Math.log(1+u),n[o]=i}return this.makeOutput(n,e.shape,"float32")},t.prototype.sin=function(e){Ll(e,"sin");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.sin(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.cos=function(e){Ll(e,"cos");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.cos(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.tan=function(e){Ll(e,"tan");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.tan(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.asin=function(e){Ll(e,"asin");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.asin(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.acos=function(e){Ll(e,"acos");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.acos(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.atan=function(e){Ll(e,"atan");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.atan(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.atan2=function(e,t){return Ll([e,t],"atan2"),this.broadcastedBinaryOp(e,t,e.dtype,(function(e,t){return Math.atan2(e,t)}))},t.prototype.sinh=function(e){Ll(e,"sinh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.sinh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.cosh=function(e){Ll(e,"cosh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.cosh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.tanh=function(e){Ll(e,"tanh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=A(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.asinh=function(e){Ll(e,"asinh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.asinh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.acosh=function(e){Ll(e,"acosh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.acosh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.atanh=function(e){Ll(e,"atanh");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r)t[r]=Math.atanh(n[r]);return this.makeOutput(t,e.shape,"float32")},t.prototype.erf=function(e){Ll(e,"erf");for(var t=new Float32Array(e.size),n=this.readSync(e.dataId),r=0;r<n.length;++r){var o=Math.sign(n[r]),i=Math.abs(n[r]),a=1/(1+.3275911*i);t[r]=o*(1-((((1.061405429*a-1.453152027)*a+1.421413741)*a-.284496736)*a+.254829592)*a*Math.exp(-i*i))}return this.makeOutput(t,e.shape,"float32")},t.prototype.step=function(e,t){void 0===t&&(t=0),Ll(e,"step");for(var n=new Float32Array(e.size),r=this.readSync(e.dataId),o=0;o<r.length;++o){var i=r[o];isNaN(i)?n[o]=NaN:n[o]=i>0?1:t}return this.makeOutput(n,e.shape,"float32")},t.prototype.fusedConv2d=function(e){var t=e.input,n=e.filter,r=e.convInfo,o=e.bias,i=e.activation,a=e.preluActivationWeights,s=this.conv2d(t,n,r);return o&&(s=this.add(s,o)),i&&(s=Bl(this,s,i,a)),s},t.prototype.conv2d=function(e,t,n){Ll([e,t],"conv2d");for(var r=n.filterHeight,o=n.filterWidth,i=n.dilationHeight,a=n.dilationWidth,s=n.padInfo.left,u=n.padInfo.top,c="channelsLast"===n.dataFormat,l=Un(n.outShape,e.dtype),f=e.strides[0],d=c?e.strides[1]:e.strides[2],p=c?e.strides[2]:1,h=c?1:e.strides[1],v=l.strides[0],m=c?l.strides[1]:l.strides[2],g=c?l.strides[2]:1,y=c?1:l.strides[1],b=this.readSync(e.dataId),w=this.readSync(t.dataId),x=l.values,E=0;E<n.batchSize;++E)for(var C=E*f,k=E*v,O=0;O<n.outHeight;++O)for(var S=k+O*m,_=O*n.strideHeight-u,T=0;T<r;T++){var I=_+T*i;if(!(I<0||I>=n.inHeight))for(var P=T*t.strides[0],A=C+I*d,R=0;R<n.outWidth;++R)for(var N=S+R*g,M=R*n.strideWidth-s,j=0;j<o;j++){var D=M+j*a;if(!(D<0||D>=n.inWidth))for(var F=A+D*p,L=P+j*t.strides[1],B=0;B<n.inChannels;++B){for(var U=b[F+B*h],z=0;z<n.outChannels;++z)x[N+z*y]+=U*w[L+z];L+=n.outChannels}}}return l.toTensor()},t.prototype.conv3d=function(e,t,n){for(var r=n.filterDepth,o=n.filterHeight,i=n.filterWidth,a=n.dilationDepth,s=n.dilationHeight,u=n.dilationWidth,c=n.padInfo.front,l=n.padInfo.left,f=n.padInfo.top,d=Un(n.outShape,e.dtype),p=this.readSync(e.dataId),h=this.readSync(t.dataId),v=d.values,m=0;m<n.batchSize;++m)for(var g=m*e.strides[0],y=m*d.strides[0],b=0;b<n.outDepth;++b)for(var w=y+b*d.strides[1],x=b*n.strideDepth-c,E=0;E<r;E++){var C=x+E*a;if(!(C<0||C>=n.inDepth))for(var k=E*t.strides[0],O=g+C*e.strides[1],S=0;S<n.outHeight;++S)for(var _=w+S*d.strides[2],T=S*n.strideHeight-f,I=0;I<o;I++){var P=T+I*s;if(!(P<0||P>=n.inHeight))for(var A=k+I*t.strides[1],R=O+P*e.strides[2],N=0;N<n.outWidth;++N)for(var M=_+N*n.outChannels,j=N*n.strideWidth-l,D=0;D<i;D++){var F=j+D*u;if(!(F<0||F>=n.inWidth))for(var L=A+D*t.strides[2],B=R+F*n.inChannels,U=L,z=0;z<n.inChannels;++z){for(var V=p[B+z],W=0;W<n.outChannels;++W)v[M+W]+=V*h[U+W];U+=n.outChannels}}}}return d.toTensor()},t.prototype.conv2dDerInput=function(e,t,n){Ll([e,t],"conv2dDerInput");for(var r=Un(n.inShape,"float32"),o=r.values,i=this.readSync(e.dataId),a=this.readSync(t.dataId),s=t.strides,u=s[0],c=s[1],l=s[2],f=n.batchSize,d=n.filterHeight,p=n.filterWidth,h=n.inChannels,v=n.inHeight,m=n.inWidth,g=n.outChannels,y=n.outHeight,b=n.outWidth,w=n.strideHeight,x=n.strideWidth,E=n.dataFormat,C=d-1-n.padInfo.top,k=p-1-n.padInfo.left,O="channelsLast"===E,S=r.strides[0],_=O?r.strides[1]:r.strides[2],T=O?r.strides[2]:1,I=O?1:r.strides[1],P=e.strides[0],A=O?e.strides[1]:e.strides[2],R=O?e.strides[2]:1,N=O?1:e.strides[1],M=0;M<f;++M)for(var j=0;j<h;++j)for(var D=0;D<v;++D)for(var F=D-C,L=Math.max(0,Math.ceil(F/w)),B=Math.min(y,(d+F)/w),U=0;U<m;++U){for(var z=U-k,V=Math.max(0,Math.ceil(z/x)),W=Math.min(b,(p+z)/x),H=0,$=L;$<B;++$)for(var q=$*w-F,K=V;K<W;++K)for(var G=P*M+A*$+R*K,X=u*(d-1-q)+c*(p-1-(K*x-z))+l*j,Y=0;Y<g;++Y)H+=i[G+N*Y]*a[X+Y];o[S*M+_*D+T*U+I*j]=H}return r.toTensor()},t.prototype.conv3dDerInput=function(e,t,n){for(var r=Un(n.inShape,"float32"),o=r.values,i=r.strides,a=i[0],s=i[1],u=i[2],c=i[3],l=this.readSync(e.dataId),f=e.strides,d=f[0],p=f[1],h=f[2],v=f[3],m=this.readSync(t.dataId),g=t.strides,y=g[0],b=g[1],w=g[2],x=g[3],E=n.batchSize,C=n.filterDepth,k=n.filterHeight,O=n.filterWidth,S=n.inChannels,_=n.inDepth,T=n.inHeight,I=n.inWidth,P=n.outChannels,A=n.outDepth,R=n.outHeight,N=n.outWidth,M=n.strideDepth,j=n.strideHeight,D=n.strideWidth,F=C-1-n.padInfo.front,L=k-1-n.padInfo.top,B=O-1-n.padInfo.left,U=0;U<E;++U)for(var z=0;z<S;++z)for(var V=0;V<_;++V)for(var W=V-F,H=Math.max(0,Math.ceil(W/M)),$=Math.min(A,(C+W)/M),q=0;q<T;++q)for(var K=q-L,G=Math.max(0,Math.ceil(K/j)),X=Math.min(R,(k+K)/j),Y=0;Y<I;++Y){for(var J=Y-B,Q=Math.max(0,Math.ceil(J/D)),Z=Math.min(N,(O+J)/D),ee=0,te=H;te<$;++te)for(var ne=te*M-W,re=G;re<X;++re)for(var oe=re*j-K,ie=Q;ie<Z;++ie)for(var ae=d*U+p*te+h*re+v*ie,se=y*(C-1-ne)+b*(k-1-oe)+w*(O-1-(ie*D-J))+x*z,ue=0;ue<P;++ue)ee+=l[ae+ue]*m[se+ue];o[a*U+s*V+u*q+c*Y+z]=ee}return r.toTensor()},t.prototype.conv2dDerFilter=function(e,t,n){Ll([e,t],"conv2dDerFilter");for(var r=n.strideHeight,o=n.strideWidth,i=n.filterHeight,a=n.filterWidth,s="channelsLast"===n.dataFormat,u=Un(n.filterShape,"float32"),c=n.padInfo.left,l=n.padInfo.top,f=this.bufferSync(e),d=this.bufferSync(t),p=0;p<i;++p)for(var h=Math.max(0,Math.ceil((l-p)/r)),v=Math.min(n.outHeight,(n.inHeight+l-p)/r),m=0;m<a;++m)for(var g=Math.max(0,Math.ceil((c-m)/o)),y=Math.min(n.outWidth,(n.inWidth+c-m)/o),b=0;b<n.inChannels;++b)for(var w=0;w<n.outChannels;++w){for(var x=0,E=0;E<n.batchSize;++E)for(var C=h;C<v;++C)for(var k=p+C*r-l,O=g;O<y;++O){var S=m+O*o-c;x+=s?f.get(E,k,S,b)*d.get(E,C,O,w):f.get(E,b,k,S)*d.get(E,w,C,O)}u.set(x,p,m,b,w)}return u.toTensor()},t.prototype.conv3dDerFilter=function(e,t,n){for(var r=n.strideDepth,o=n.strideHeight,i=n.strideWidth,a=n.filterDepth,s=n.filterHeight,u=n.filterWidth,c=Un(n.filterShape,"float32"),l=c.values,f=c.strides,d=f[0],p=f[1],h=f[2],v=f[3],m=this.readSync(t.dataId),g=t.strides,y=g[0],b=g[1],w=g[2],x=g[3],E=this.readSync(e.dataId),C=e.strides,k=C[0],O=C[1],S=C[2],_=C[3],T=n.padInfo.front,I=n.padInfo.left,P=n.padInfo.top,A=0;A<a;++A)for(var R=Math.max(0,Math.ceil((T-A)/r)),N=Math.min(n.outDepth,(n.inDepth+T-A)/r),M=A*d,j=0;j<s;++j)for(var D=Math.max(0,Math.ceil((P-j)/o)),F=Math.min(n.outHeight,(n.inHeight+P-j)/o),L=j*p+M,B=0;B<u;++B)for(var U=Math.max(0,Math.ceil((I-B)/i)),z=Math.min(n.outWidth,(n.inWidth+I-B)/i),V=B*h+L,W=0;W<n.inChannels;++W)for(var H=W*v+V,$=0;$<n.outChannels;++$){for(var q=0,K=0;K<n.batchSize;++K)for(var G=K*k,X=K*y,Y=R;Y<N;++Y)for(var J=(A+Y*r-T)*O+G,Q=Y*b+X,Z=D;Z<F;++Z)for(var ee=(j+Z*o-P)*S+J,te=Z*w+Q,ne=U;ne<z;++ne){var re=ne*x+te;q+=E[(B+ne*i-I)*_+ee+W]*m[re+$]}l[H+$]=q}return c.toTensor()},t.prototype.fusedDepthwiseConv2D=function(e){var t=e.input,n=e.filter,r=e.convInfo,o=e.bias,i=e.activation,a=e.preluActivationWeights,s=this.depthwiseConv2D(t,n,r);return o&&(s=this.add(s,o)),i&&(s=Bl(this,s,i,a)),s},t.prototype.depthwiseConv2D=function(e,t,n){Ll([e,t],"depthwiseConv2D");for(var r=n.filterHeight,o=n.filterWidth,i=n.dilationHeight,a=n.dilationWidth,s=n.padInfo.left,u=n.padInfo.top,c=n.outChannels/n.inChannels,l=Un(n.outShape,e.dtype),f=this.readSync(e.dataId),d=this.readSync(t.dataId),p=l.values,h=0;h<n.batchSize;++h)for(var v=h*e.strides[0],m=h*l.strides[0],g=0;g<n.outHeight;++g)for(var y=m+g*l.strides[1],b=g*n.strideHeight-s,w=0;w<r;++w){var x=b+w*i;if(!(x<0||x>=n.inHeight))for(var E=w*t.strides[0],C=v+x*e.strides[1],k=0;k<n.outWidth;++k)for(var O=y+k*l.strides[2],S=k*n.strideWidth-u,_=0;_<o;++_){var T=S+_*a;if(!(T<0||T>=n.inWidth))for(var I=E+_*t.strides[1],P=C+T*n.inChannels,A=O,R=I,N=0;N<n.inChannels;++N){for(var M=f[P+N],j=0;j<c;++j)p[A+j]+=M*d[R+j];A+=c,R+=c}}}return l.toTensor()},t.prototype.depthwiseConv2DDerInput=function(e,t,n){Ll([e,t],"depthwiseConv2DDerInput");for(var r=Un(n.inShape,"float32"),o=r.values,i=r.strides,a=i[0],s=i[1],u=i[2],c=this.readSync(e.dataId),l=e.strides,f=l[0],d=l[1],p=l[2],h=this.readSync(t.dataId),v=t.strides,m=v[0],g=v[1],y=v[2],b=n.batchSize,w=n.filterHeight,x=n.filterWidth,E=n.inChannels,C=n.inHeight,k=n.inWidth,O=n.outChannels,S=n.outHeight,_=n.outWidth,T=n.strideHeight,I=n.strideWidth,P=w-1-n.padInfo.top,A=x-1-n.padInfo.left,R=O/E,N=0;N<b;++N)for(var M=0;M<E;++M)for(var j=0;j<C;++j)for(var D=j-P,F=Math.max(0,Math.ceil(D/T)),L=Math.min(S,(w+D)/T),B=0;B<k;++B){for(var U=B-A,z=Math.max(0,Math.ceil(U/I)),V=Math.min(_,(x+U)/I),W=0,H=F;H<L;++H)for(var $=H*T-D,q=z;q<V;++q)for(var K=f*N+d*H+p*q,G=m*(w-1-$)+g*(x-1-(q*I-U))+y*M,X=0;X<R;++X)W+=c[K+(M*R+X)]*h[G+X];o[a*N+s*j+u*B+M]=W}return r.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(e,t,n){Ll([e,t],"depthwiseConv2DDerFilter");for(var r=n.strideHeight,o=n.strideWidth,i=n.filterHeight,a=n.filterWidth,s=Un(n.filterShape,"float32"),u=n.padInfo.left,c=n.padInfo.top,l=n.outChannels/n.inChannels,f=this.bufferSync(e),d=this.bufferSync(t),p=0;p<i;++p)for(var h=Math.max(0,Math.ceil((c-p)/r)),v=Math.min(n.outHeight,(n.inHeight+c-p)/r),m=0;m<a;++m)for(var g=Math.max(0,Math.ceil((u-m)/o)),y=Math.min(n.outWidth,(n.inWidth+u-m)/o),b=0;b<n.outChannels;++b){for(var w=Math.trunc(b/l),x=b%l,E=0,C=0;C<n.batchSize;++C)for(var k=h;k<v;++k)for(var O=p+k*r-c,S=g;S<y;++S){var _=m+S*o-u;E+=f.get(C,O,_,w)*d.get(C,k,S,b)}s.set(E,p,m,w,x)}return s.toTensor()},t.prototype.tile=function(e,t){return Ll(e,"tile"),ho(this.bufferSync(e),t)},t.prototype.pad=function(e,t,n){Ll(e,"pad");var r=t.map((function(t,n){return t[0]+e.shape[n]+t[1]})),o=t.map((function(e){return e[0]})),i=this.bufferSync(e),a=Un(r,e.dtype);0!==n&&a.values.fill(n);for(var s=0;s<e.size;s++){var u=i.indexToLoc(s),c=u.map((function(e,t){return e+o[t]}));a.set.apply(a,[i.get.apply(i,u)].concat(c))}return a.toTensor()},t.prototype.transpose=function(e,t){Ll(e,"transpose");for(var n=new Array(e.rank),r=0;r<n.length;r++)n[r]=e.shape[t[r]];var o=this.readSync(e.dataId),i=Un(n,e.dtype),a=this.bufferSync(e);for(r=0;r<e.size;++r){for(var s=a.indexToLoc(r),u=new Array(s.length),c=0;c<u.length;c++)u[c]=s[t[c]];var l=i.locToIndex(u);i.values[l]=o[r]}return i.toTensor()},t.prototype.gather=function(e,t,n){Ll([e,t],"gather");var r=e.shape.slice(),o=this.readSync(t.dataId);r[n]=o.length;for(var i=Un(r,e.dtype),a=this.bufferSync(e),s=0;s<i.size;++s){var u=i.indexToLoc(s),c=u.slice();c[n]=o[u[n]];var l=a.locToIndex(c);i.values[s]=a.values[l]}return i.toTensor()},t.prototype.batchToSpaceND=function(e,t,n){Ll([e],"batchToSpaceND");var r=t.reduce((function(e,t){return e*t})),o=pr(e.shape,t,r),i=hr(o.length,t.length),a=vr(e.shape,t,r),s=mr(n,t.length),u=gr(a,n,t.length);return e.reshape(o).transpose(i).reshape(a).slice(s,u)},t.prototype.spaceToBatchND=function(e,t,n){Ll([e],"spaceToBatchND");var r=t.reduce((function(e,t){return e*t})),o=[[0,0]];o.push.apply(o,n);for(var i=1+t.length;i<e.shape.length;++i)o.push([0,0]);var a=e.pad(o),s=pr(a.shape,t,r,!1),u=hr(s.length,t.length,!1),c=vr(a.shape,t,r,!1);return a.reshape(s).transpose(u).reshape(c)},t.prototype.pool=function(e,t,n){Ll(e,"pool");for(var r=t.strideHeight,o=t.strideWidth,i=t.dilationHeight,a=t.dilationWidth,s=t.effectiveFilterHeight,u=t.effectiveFilterWidth,c=t.padInfo.top,l=t.padInfo.left,f="max"===n?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,d=this.readSync(e.dataId),p=Un(t.outShape,e.dtype),h=p.values,v=t.outShape[1]*t.outShape[2]*t.outShape[3],m=t.outShape[2]*t.outShape[3],g=t.outShape[3],y=0;y<t.batchSize;++y)for(var b=y*v,w=y*e.strides[0],x=0;x<t.inChannels;++x)for(var E=0;E<t.outHeight;++E)for(var C=E*r-c,k=Math.max(0,C),O=Math.min(t.inHeight,s+C),S=b+E*m,_=0;_<t.outWidth;++_){for(var T=_*o-l,I=Math.max(0,T),P=Math.min(t.inWidth,u+T),A=f,R=0,N=0,M=k;M<O;M+=i){for(var j=w+M*e.strides[1],D=I;D<P;D+=a){var F=d[j+D*e.strides[2]+x];"max"===n&&F>A?A=F:"avg"===n&&(R+=F,N++)}if(isNaN(A))break}h[S+_*g+x]="avg"===n?R/N:A}return p.toTensor()},t.prototype.maxPool=function(e,t){return this.pool(e,t,"max")},t.prototype.maxPoolPositions=function(e,t){for(var n=Un(t.outShape,"int32"),r=t.strideHeight,o=t.strideWidth,i=t.dilationHeight,a=t.dilationWidth,s=t.effectiveFilterHeight,u=t.effectiveFilterWidth,c=t.padInfo.top,l=t.padInfo.left,f=this.bufferSync(e),d=0;d<t.batchSize;++d)for(var p=0;p<t.inChannels;++p)for(var h=0;h<t.outHeight;++h){for(var v=h*r-c,m=v;m<0;)m+=i;for(var g=Math.min(t.inHeight,s+v),y=0;y<t.outWidth;++y){for(var b=y*o-l,w=b;w<0;)w+=a;for(var x=Math.min(t.inWidth,u+b),E=Number.NEGATIVE_INFINITY,C=-1,k=m;k<g;k+=i)for(var O=k-v,S=w;S<x;S+=a){var _=S-b,T=f.get(d,k,S,p);T>E&&(E=T,C=O*u+_)}n.set(C,d,h,y,p)}}return n.toTensor()},t.prototype.maxPoolBackprop=function(e,t,n,r){Ll([t,n],"maxPoolBackprop");for(var o=this.maxPoolPositions(t,r),i=r.strideHeight,a=r.strideWidth,s=r.dilationHeight,u=r.dilationWidth,c=r.effectiveFilterHeight,l=r.effectiveFilterWidth,f=l-1-r.padInfo.left,d=c-1-r.padInfo.top,p=Un(t.shape,"float32"),h=this.bufferSync(o),v=this.bufferSync(e),m=0;m<r.batchSize;++m)for(var g=0;g<r.inChannels;++g)for(var y=0;y<r.inHeight;++y)for(var b=0;b<r.inWidth;++b){for(var w=y-d,x=b-f,E=0,C=0;C<c;C+=s){var k=(w+C)/i;if(!(k<0||k>=r.outHeight||Math.floor(k)!==k))for(var O=0;O<l;O+=u){var S=(x+O)/a;if(!(S<0||S>=r.outWidth||Math.floor(S)!==S)){var _=c*l-1-h.get(m,k,S,g)===C*l+O?1:0;0!==_&&(E+=v.get(m,k,S,g)*_)}}}p.set(E,m,y,b,g)}return p.toTensor()},t.prototype.avgPoolBackprop=function(e,t,n){Ll([e,t],"avgPoolBackprop");for(var r=n.strideHeight,o=n.strideWidth,i=n.filterHeight,a=n.filterWidth,s=n.dilationHeight,u=n.dilationWidth,c=n.effectiveFilterHeight,l=n.effectiveFilterWidth,f=l-1-n.padInfo.left,d=c-1-n.padInfo.top,p=Un(t.shape,"float32"),h=1/(i*a),v=this.bufferSync(e),m=0;m<n.batchSize;++m)for(var g=0;g<n.inChannels;++g)for(var y=0;y<n.inHeight;++y)for(var b=0;b<n.inWidth;++b){for(var w=y-d,x=b-f,E=0,C=0;C<c;C+=s){var k=(w+C)/r;if(!(k<0||k>=n.outHeight||Math.floor(k)!==k))for(var O=0;O<l;O+=u){var S=(x+O)/o;S<0||S>=n.outWidth||Math.floor(S)!==S||(E+=v.get(m,k,S,g))}}p.set(E*h,m,y,b,g)}return p.toTensor()},t.prototype.pool3d=function(e,t,n){Ll(e,"pool3d");for(var r=t.strideDepth,o=t.strideHeight,i=t.strideWidth,a=t.dilationDepth,s=t.dilationHeight,u=t.dilationWidth,c=t.effectiveFilterDepth,l=t.effectiveFilterHeight,f=t.effectiveFilterWidth,d=t.padInfo.front,p=t.padInfo.top,h=t.padInfo.left,v="max"===n?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,m=this.readSync(e.dataId),g=Un(t.outShape,e.dtype),y=g.values,b=t.outShape[1]*t.outShape[2]*t.outShape[3]*t.outShape[4],w=t.outShape[2]*t.outShape[3]*t.outShape[4],x=t.outShape[3]*t.outShape[4],E=t.outShape[4],C=0;C<t.batchSize;++C)for(var k=C*b,O=C*e.strides[0],S=0;S<t.inChannels;++S)for(var _=0;_<t.outDepth;++_){for(var T=_*r-d,I=T;I<0;)I+=a;for(var P=Math.min(t.inDepth,c+T),A=k+_*w,R=0;R<t.outHeight;++R){for(var N=R*o-p,M=N;M<0;)M+=s;for(var j=Math.min(t.inHeight,l+N),D=A+R*x,F=0;F<t.outWidth;++F){for(var L=F*i-h,B=L;B<0;)B+=u;for(var U=Math.min(t.inWidth,f+L),z=D+F*E,V=v,W=0,H=0,$=I;$<P;$+=a){for(var q=O+$*e.strides[1],K=M;K<j;K+=s){for(var G=q+K*e.strides[2],X=B;X<U;X+=u){var Y=m[G+X*e.strides[3]+S];if("max"===n&&Y>V?V=Y:"avg"===n&&(W+=Y,H++),isNaN(V))break}if(isNaN(V))break}if(isNaN(V))break}y[z+S]="avg"===n?W/H:V}}}return g.toTensor()},t.prototype.avgPool3d=function(e,t){return Ll(e,"avgPool3d"),this.pool3d(e,t,"avg").toFloat()},t.prototype.avgPool3dBackprop=function(e,t,n){Ll([e,t],"avgPool3dBackprop");for(var r=n.strideDepth,o=n.strideHeight,i=n.strideWidth,a=n.filterDepth,s=n.filterHeight,u=n.filterWidth,c=n.dilationDepth,l=n.dilationHeight,f=n.dilationWidth,d=n.effectiveFilterDepth,p=n.effectiveFilterHeight,h=n.effectiveFilterWidth,v=d-1-n.padInfo.front,m=h-1-n.padInfo.left,g=p-1-n.padInfo.top,y=Un(t.shape,"float32"),b=1/(a*s*u),w=this.bufferSync(e),x=0;x<n.batchSize;++x)for(var E=0;E<n.inChannels;++E)for(var C=0;C<n.inDepth;++C)for(var k=0;k<n.inHeight;++k)for(var O=0;O<n.inWidth;++O){for(var S=C-v,_=k-g,T=O-m,I=0,P=0;P<d;P+=c){var A=(S+P)/r;if(!(A<0||A>=n.outDepth||Math.floor(A)!==A))for(var R=0;R<p;R+=l){var N=(_+R)/o;if(!(N<0||N>=n.outHeight||Math.floor(N)!==N))for(var M=0;M<h;M+=f){var j=(T+M)/i;j<0||j>=n.outWidth||Math.floor(j)!==j||(I+=w.get(x,A,N,j,E))}}}y.set(I*b,x,C,k,O,E)}return y.toTensor()},t.prototype.maxPool3d=function(e,t){return Ll(e,"maxPool3d"),this.pool3d(e,t,"max").toFloat()},t.prototype.maxPool3dPositions=function(e,t){for(var n=Un(t.outShape,"int32"),r=t.strideDepth,o=t.strideHeight,i=t.strideWidth,a=t.dilationDepth,s=t.dilationHeight,u=t.dilationWidth,c=t.effectiveFilterDepth,l=t.effectiveFilterHeight,f=t.effectiveFilterWidth,d=t.padInfo.front,p=t.padInfo.top,h=t.padInfo.left,v=this.bufferSync(e),m=0;m<t.batchSize;++m)for(var g=0;g<t.inChannels;++g)for(var y=0;y<t.outDepth;++y){for(var b=y*r-d,w=b;w<0;)w+=a;for(var x=Math.min(t.inDepth,c+b),E=0;E<t.outHeight;++E){for(var C=E*o-p,k=C;k<0;)k+=s;for(var O=Math.min(t.inHeight,l+C),S=0;S<t.outWidth;++S){for(var _=S*i-h,T=_;T<0;)T+=u;for(var I=Math.min(t.inWidth,f+_),P=Number.NEGATIVE_INFINITY,A=-1,R=w;R<x;R+=a)for(var N=R-b,M=k;M<O;M+=s)for(var j=M-C,D=T;D<I;D+=u){var F=D-_,L=v.get(m,R,M,D,g);L>=P&&(P=L,A=N*l*f+j*l+F)}n.set(A,m,y,E,S,g)}}}return n.toTensor()},t.prototype.maxPool3dBackprop=function(e,t,n,r){Ll([t,n],"maxPool3dBackprop");for(var o=this.maxPool3dPositions(t,r),i=r.strideDepth,a=r.strideHeight,s=r.strideWidth,u=r.dilationDepth,c=r.dilationHeight,l=r.dilationWidth,f=r.effectiveFilterDepth,d=r.effectiveFilterHeight,p=r.effectiveFilterWidth,h=f-1-r.padInfo.front,v=p-1-r.padInfo.left,m=d-1-r.padInfo.top,g=Un(t.shape,"float32"),y=this.bufferSync(o),b=this.bufferSync(e),w=0;w<r.batchSize;++w)for(var x=0;x<r.inChannels;++x)for(var E=0;E<r.inDepth;++E)for(var C=0;C<r.inHeight;++C)for(var k=0;k<r.inWidth;++k){for(var O=E-h,S=C-m,_=k-v,T=0,I=0;I<f;I+=u){var P=(O+I)/i;if(!(P<0||P>=r.outDepth||Math.floor(P)!==P))for(var A=0;A<d;A+=c){var R=(S+A)/a;if(!(R<0||R>=r.outHeight||Math.floor(R)!==R))for(var N=0;N<p;N+=l){var M=(_+N)/s;if(!(M<0||M>=r.outWidth||Math.floor(M)!==M)){var j=f*d*p-1-y.get(w,P,R,M,x)===I*d*p+A*p+N?1:0;0!==j&&(T+=b.get(w,P,R,M,x)*j)}}}}g.set(T,w,E,C,k,x)}return g.toTensor()},t.prototype.cast=function(e,t){return Jr(e,t,this)},t.prototype.reshape=function(e,t){return Qr(e,t)},t.prototype.avgPool=function(e,t){return Ll(e,"avgPool"),this.pool(e,t,"avg").toFloat()},t.prototype.resizeBilinear=function(e,t,n,r){Ll(e,"resizeBilinear");for(var o=e.shape,i=o[0],a=o[1],s=o[2],u=o[3],c=this.readSync(e.dataId),l=new Float32Array(T([i,t,n,u])),f=[r&&t>1?a-1:a,r&&n>1?s-1:s],d=[r&&t>1?t-1:t,r&&n>1?n-1:n],p=0,h=f[0]/d[0],v=f[1]/d[1],m=0;m<i;m++)for(var g=0;g<t;g++)for(var y=h*g,b=Math.floor(y),w=y-b,x=Math.min(a-1,Math.ceil(y)),E=m*e.strides[0]+b*e.strides[1],C=m*e.strides[0]+x*e.strides[1],k=0;k<n;k++)for(var O=v*k,S=Math.floor(O),_=O-S,I=Math.min(s-1,Math.ceil(O)),P=E+S*e.strides[2],A=C+S*e.strides[2],R=E+I*e.strides[2],N=C+I*e.strides[2],M=0;M<u;M++){var j=c[P+M],D=c[A+M],F=j+(c[R+M]-j)*_,L=F+(D+(c[N+M]-D)*_-F)*w;l[p++]=L}return cn(l,[i,t,n,u])},t.prototype.resizeBilinearBackprop=function(e,t,n){Ll([e,t],"resizeBilinearBackprop");for(var r=t.shape,o=r[0],i=r[1],a=r[2],s=r[3],u=e.shape,c=u[1],l=u[2],f=new Float32Array(o*i*a*s),d=[n&&c>1?i-1:i,n&&l>1?a-1:a],p=[n&&c>1?c-1:c,n&&l>1?l-1:l],h=d[0]/p[0],v=d[1]/p[1],m=this.readSync(e.dataId),g=0,y=0;y<o;y++)for(var b=y*t.strides[0],w=0;w<c;w++)for(var x=w*h,E=Math.floor(x),C=Math.min(Math.ceil(x),i-1),k=b+E*t.strides[1],O=b+C*t.strides[1],S=x-E,_=1-S,T=0;T<l;T++)for(var I=T*v,P=Math.floor(I),A=Math.min(Math.ceil(I),a-1),R=I-P,N=1-R,M=k+P*t.strides[2],j=k+A*t.strides[2],D=O+P*t.strides[2],F=O+A*t.strides[2],L=_*N,B=_*R,U=S*N,z=S*R,V=0;V<s;V++){var W=m[g++];f[M+V]+=W*L,f[j+V]+=W*B,f[D+V]+=W*U,f[F+V]+=W*z}return vn(f,[o,a,i,s],t.dtype)},t.prototype.resizeNearestNeighbor=function(e,t,n,r){Ll(e,"resizeNearestNeighbor");for(var o=e.shape,i=o[0],a=o[1],s=o[2],u=o[3],c=this.readSync(e.dataId),l=new Float32Array(i*t*n*u),f=[r&&t>1?a-1:a,r&&n>1?s-1:s],d=[r&&t>1?t-1:t,r&&n>1?n-1:n],p=f[0]/d[0],h=f[1]/d[1],v=0,m=0;m<i;m++)for(var g=m*e.strides[0],y=0;y<t;y++)for(var b=p*y,w=g+Math.min(a-1,r?Math.round(b):Math.floor(b))*e.strides[1],x=0;x<n;x++)for(var E=h*x,C=w+Math.min(s-1,r?Math.round(E):Math.floor(E))*e.strides[2],k=0;k<u;k++){var O=c[C+k];l[v++]=O}return cn(l,[i,t,n,u],e.dtype)},t.prototype.resizeNearestNeighborBackprop=function(e,t,n){Ll([e,t],"resizeNearestNeighborBackprop");for(var r=t.shape,o=r[0],i=r[1],a=r[2],s=r[3],u=e.shape,c=u[1],l=u[2],f=new Float32Array(o*i*a*s),d=this.readSync(e.dataId),p=[n&&c>1?i-1:i,n&&l>1?a-1:a],h=[n&&c>1?c-1:c,n&&l>1?l-1:l],v=p[0]/h[0],m=p[1]/h[1],g=1/v,y=1/m,b=2*Math.ceil(g)+2,w=2*Math.ceil(y)+2,x=0;x<o;x++)for(var E=x*t.strides[0],C=0;C<i;C++)for(var k=E+C*t.strides[1],O=Math.floor(C*g),S=Math.floor(O-b/2),_=0;_<a;_++)for(var T=k+_*t.strides[2],I=Math.floor(_*y),P=Math.floor(I-w/2),A=0;A<s;A++){for(var R=0,N=0;N<b;N++){var M=N+S;if(!(M<0||M>=c)){var j=E+M*e.strides[1],D=M*v;if(C===Math.min(i-1,n?Math.round(D):Math.floor(D)))for(var F=0;F<w;F++){var L=F+P;if(!(L<0||L>=l)){var B=j+L*e.strides[2],U=L*m;_===Math.min(a-1,n?Math.round(U):Math.floor(U))&&(R+=d[B+A])}}}}f[T+A]=R}return vn(f,t.shape,t.dtype)},t.prototype.batchNormalization=function(e,t,n,r,o,i){Ll([e,t,n,o,i],"batchNorm");for(var a=this.readSync(e.dataId),s=this.readSync(t.dataId),u=this.readSync(n.dataId),c=o?this.readSync(o.dataId):new Float32Array([1]),l=i?this.readSync(i.dataId):new Float32Array([0]),f=new Float32Array(a.length),d=l.length,p=c.length,h=u.length,v=s.length,m=0,g=0,y=0,b=0,w=0;w<a.length;++w)f[w]=l[m++]+(a[w]-s[g++])*c[y++]/Math.sqrt(u[b++]+r),m>=d&&(m=0),g>=v&&(g=0),y>=p&&(y=0),b>=h&&(b=0);return vn(f,e.shape)},t.prototype.localResponseNormalization4D=function(e,t,n,r,o){Ll(e,"localResponseNormalization4D");var i=e.shape[3],a=i-1,s=this.readSync(e.dataId),u=e.size,c=new Float32Array(u);function l(e){for(var n=e%i,r=e-n+Math.max(0,n-t),o=e-n+Math.min(n+t,a),u=0;r<=o;r++){var c=s[r];u+=c*c}return u}for(var f=0;f<u;f++){var d=l(f),p=s[f]*Math.pow(n+r*d,-o);c[f]=p}return vn(c,e.shape)},t.prototype.LRNGrad=function(e,t,n,r,o,i,a){Ll(e,"LRNGrad");for(var s=e.shape[3],u=this.readSync(e.dataId),c=this.readSync(t.dataId),l=this.readSync(n.dataId),f=new Float32Array(e.size),d=e.size,p=0;p<d;p++){for(var h=p%s,v=p-h+Math.max(0,h-r),m=p-h+Math.min(s,h+r+1),g=0,y=v;y<m;y++)g+=Math.pow(c[y],2);for(g=i*g+o,y=v;y<m;y++){var b=-2*i*a*c[y]*l[p]/g;p===y&&(b+=Math.pow(g,-a)),b*=u[p],f[y]+=b}}return vn(f,e.shape)},t.prototype.multinomial=function(e,t,n,r){Ll(e,"multinomial");for(var o=t?e:Ar(e),i=o.shape[0],a=o.shape[1],s=gn([i,n],"int32"),u=this.readSync(s.dataId),c=this.readSync(o.dataId),l=0;l<i;++l){var f=l*a,d=new Float32Array(a-1);d[0]=c[f];for(var p=1;p<d.length;++p)d[p]=d[p-1]+c[f+p];for(var h=Dn(r.toString()),v=l*n,m=0;m<n;++m){var g=h();u[v+m]=d.length;for(var y=0;y<d.length;y++)if(g<d[y]){u[v+m]=y;break}}}return s},t.prototype.oneHot=function(e,t,n,r){Ll(e,"oneHot");var o=new Float32Array(e.size*t);o.fill(r);for(var i=this.readSync(e.dataId),a=0;a<e.size;++a)i[a]>=0&&i[a]<t&&(o[a*t+i[a]]=n);return pn(o,[e.size,t],"int32")},t.prototype.nonMaxSuppression=function(e,t,n,r,o){return Ll(e,"nonMaxSuppression"),ao(this.readSync(e.dataId),this.readSync(t.dataId),n,r,o)},t.prototype.fft=function(e){return this.fftBatch(e,!1)},t.prototype.ifft=function(e){return this.fftBatch(e,!0)},t.prototype.fftBatch=function(e,t){for(var n=e.shape[0],r=e.shape[1],o=Un(e.shape,"float32"),i=Un(e.shape,"float32"),a=sn(e).as2D(n,r),s=un(e).as2D(n,r),u=0;u<n;u++)for(var c=a.slice([u,0],[1,r]),l=s.slice([u,0],[1,r]),f=an(c,l),d=this.readSync(this.fftImpl(f,t).dataId),p=0;p<r;p++){var h=to(d,p);o.values[u*r+p]=h.real,i.values[u*r+p]=h.imag}return an(o.toTensor(),i.toTensor()).as2D(n,r)},t.prototype.fftImpl=function(e,t){var n=e.as1D(),r=n.size;if(this.isExponentOf2(r)){var o=this.fftRadix2(n,r,t).as2D(e.shape[0],e.shape[1]);return t&&(o=an(sn(o).div(fn(r)),un(o).div(fn(r)))),o}var i=this.readSync(e.dataId),a=function(e){for(var t=new Float32Array(e.length/2),n=new Float32Array(e.length/2),r=0;r<e.length;r+=2)t[r/2]=e[r],n[r/2]=e[r+1];return{real:t,imag:n}}(this.fourierTransformByMatmul(i,r,t));return an(a.real,a.imag).as2D(e.shape[0],e.shape[1])},t.prototype.isExponentOf2=function(e){return 0==(e&e-1)},t.prototype.fftRadix2=function(e,t,n){if(1===t)return e;var r=this.readSync(e.dataId),o=t/2,i=function(e){for(var t=Math.ceil(e.length/4),n=new Float32Array(t),r=new Float32Array(t),o=0;o<e.length;o+=4)n[Math.floor(o/4)]=e[o],r[Math.floor(o/4)]=e[o+1];return{real:n,imag:r}}(r),a=an(i.real,i.imag).as1D(),s=function(e){for(var t=Math.floor(e.length/4),n=new Float32Array(t),r=new Float32Array(t),o=2;o<e.length;o+=4)n[Math.floor(o/4)]=e[o],r[Math.floor(o/4)]=e[o+1];return{real:n,imag:r}}(r),u=an(s.real,s.imag).as1D();a=this.fftRadix2(a,o,n),u=this.fftRadix2(u,o,n);var c=function(e,t){for(var n=new Float32Array(e/2),r=new Float32Array(e/2),o=0;o<Math.ceil(e/2);o++){var i=(t?2:-2)*Math.PI*(o/e);n[o]=Math.cos(i),r[o]=Math.sin(i)}return{real:n,imag:r}}(t,n),l=an(c.real,c.imag).mul(u),f=a.add(l),d=a.sub(l),p=sn(f).concat(sn(d)),h=un(f).concat(un(d));return an(p,h).as1D()},t.prototype.fourierTransformByMatmul=function(e,t,n){for(var r=new Float32Array(2*t),o=0;o<t;o++){for(var i=0,a=0,s=0;s<t;s++){var u=ro(o*s,t,n),c=to(e,s);i+=c.real*u.real-c.imag*u.imag,a+=c.real*u.imag+c.imag*u.real}n&&(i/=t,a/=t),no(r,i,a,o)}return r},t.prototype.depthToSpace=function(e,t,n){k("NHWC"===n,(function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+n})),k(t>1,(function(){return"blockSize should be > 1 for depthToSpace, but was: "+t}));for(var r=e.shape[0],o=e.shape[1],i=e.shape[2],a=e.shape[3],s=o*t,u=i*t,c=a/(t*t),l=this.readSync(e.dataId),f=new Float32Array(r*s*u*c),d=0,p=0;p<r;++p)for(var h=0;h<s;++h)for(var v=Math.floor(h/t),m=h%t,g=0;g<u;++g)for(var y=Math.floor(g/t),b=(m*t+g%t)*c,w=0;w<c;++w){var x=w+b+a*(y+i*(v+o*p));f[d++]=l[x]}return vn(f,[r,s,u,c])},t.prototype.broadcastedBinaryOp=function(e,t,n,r){var o=Lr(e.shape,t.shape),i=Un(o,n),a=this.readSync(e.dataId),s=this.readSync(t.dataId),u=Dr(e.shape,o),c=Dr(t.shape,o),l=i.values;if(u.length+c.length===0)for(var f=0;f<l.length;++f)l[f]=r(a[f%a.length],s[f%s.length]);else{var d=this.bufferSync(e),p=this.bufferSync(t),h=function(n){var o=i.indexToLoc(n),f=o.slice(-e.rank);u.forEach((function(e){return f[e]=0}));var h=d.locToIndex(f),v=o.slice(-t.rank);c.forEach((function(e){return v[e]=0}));var m=p.locToIndex(v);l[n]=r(a[h],s[m])};for(f=0;f<l.length;++f)h(f)}return i.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(e,t,n){var r=Lr(e.shape,t.shape),o=Un(r,"float32"),i=Un(r,"float32"),a=this.readSync(e.dataId),s=this.readSync(t.dataId),u=Dr(e.shape,r),c=Dr(t.shape,r),l=o.values,f=i.values;if(u.length+c.length===0)for(var d=0;d<l.length;d++){var p=d%a.length,h=d%s.length,v=n(a[2*p],a[2*p+1],s[2*h],s[2*h+1]);l[d]=v.real,f[d]=v.imag}else{var m=this.bufferSync(this.data.get(e.dataId).complexTensors.real),g=this.bufferSync(this.data.get(t.dataId).complexTensors.real),y=function(r){var i=o.indexToLoc(r),d=i.slice(-e.rank);u.forEach((function(e){return d[e]=0}));var p=m.locToIndex(d),h=i.slice(-t.rank);c.forEach((function(e){return h[e]=0}));var v=g.locToIndex(h),y=n(a[2*p],a[2*p+1],s[2*v],s[2*v+1]);l[r]=y.real,f[r]=y.imag};for(d=0;d<l.length;d++)y(d)}return this.complex(o.toTensor(),i.toTensor())},t.prototype.split=function(e,t,n){return po(e,t,n)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.epsilon=function(){return 1e-7},t.prototype.cropAndResize=function(e,t,n,r,o,i){for(var a=e.shape,s=a[0],u=a[1],c=a[2],l=a[3],f=t.shape[0],d=r[0],p=r[1],h=Un([f,d,p,l],"float32"),v=this.readSync(t.dataId),m=this.readSync(n.dataId),g=this.readSync(e.dataId),y=e.strides,b=h.strides,w=0;w<f;w++){var x=4*w,E=v[x],C=v[x+1],k=v[x+2],O=v[x+3],S=m[w];if(!(S>=s))for(var _=d>1?(k-E)*(u-1)/(d-1):0,T=p>1?(O-C)*(c-1)/(p-1):0,I=0;I<d;I++){var P=d>1?E*(u-1)+I*_:.5*(E+k)*(u-1);if(P<0||P>u-1)for(var A=0;A<p;A++)for(var R=0;R<l;R++){var N=R+A*b[2]+I*b[1]+w*b[0];h.values[N]=i}else if("bilinear"===o){var M=Math.floor(P),j=Math.ceil(P),D=P-M;for(A=0;A<p;A++)if(($=p>1?C*(c-1)+A*T:.5*(C+O)*(c-1))<0||$>c-1)for(R=0;R<l;R++)N=R+A*b[2]+I*b[1]+w*b[0],h.values[N]=i;else{var F=Math.floor($),L=Math.ceil($),B=$-F;for(R=0;R<l;R++){var U=g[N=R+F*y[2]+M*y[1]+S*y[0]],z=g[N=R+L*y[2]+M*y[1]+S*y[0]],V=g[N=R+F*y[2]+j*y[1]+S*y[0]],W=U+(z-U)*B,H=V+(g[N=R+L*y[2]+j*y[1]+S*y[0]]-V)*B;N=R+A*b[2]+I*b[1]+w*b[0],h.values[N]=W+(H-W)*D}}}else for(A=0;A<p;++A){var $;if(($=p>1?C*(c-1)+A*T:.5*(C+O)*(c-1))<0||$>c-1)for(R=0;R<l;R++)N=R+A*b[2]+I*b[1]+w*b[0],h.values[N]=i;else{var q=Math.round($),K=Math.round(P);for(R=0;R<l;R++){var G=R+q*y[2]+K*y[1]+S*y[0],X=R+A*b[2]+I*b[1]+w*b[0];h.values[X]=g[G]}}}}}return h.toTensor()},t.prototype.sparseToDense=function(e,t,n,r){var o=Er(0,e,n),i=o.sliceRank,a=o.numUpdates,s=o.sliceSize,u=o.strides,c=o.outputSize;return this.scatter(e,t,n,c,s,a,i,u,r,!1)},t.prototype.gatherND=function(e,t){var n=t.shape,r=n[n.length-1],o=yr(e,t),i=o[0],a=o[1],s=o[2],u=o[3];if(0===a)return cn([],i,e.dtype);for(var c=new he([a,s],e.dtype),l=this.readSync(t.dataId),f=this.readSync(e.dataId),d=0;d<a;d++){for(var p=[],h=0,v=0;v<r;v++){var m=l[d*r+v];h+=m*u[v],p.push(m)}if(h<0||h>=e.size/s)throw new Error("Invalid indices: "+p+" does not index into "+e.shape);for(var g=0;g<s;g++)c.values[d*s+g]=f[h*s+g]}return c.toTensor().reshape(i)},t.prototype.scatterND=function(e,t,n){var r=Er(0,e,n),o=r.sliceRank,i=r.numUpdates,a=r.sliceSize,s=r.strides,u=r.outputSize,c=fn(0);return this.scatter(e,t,n,u,a,i,o,s,c,!0)},t.prototype.fill=function(e,t,n){var r=B(n=n||X(t),T(e));return r.fill(t),je.makeTensor(r,e,n,this)},t.prototype.onesLike=function(e){if("string"===e.dtype)throw new Error("onesLike is not supported for string tensors");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){var t=B(e.dtype,T(e.shape));return this.makeOutput(t,e.shape,e.dtype)},t.prototype.linspace=function(e,t,n){return Zr(e,t,n)},t.prototype.scatter=function(e,t,n,r,o,i,a,s,u,c){var l=[r/o,o],f=this.readSync(e.dataId),d=this.readSync(t.dataId);if(0===r)return cn([],n,t.dtype);var p=new he(l,t.dtype);p.values.fill(this.readSync(u.dataId)[0]);for(var h=0;h<i;h++){for(var v=[],m=0,g=0;g<a;g++){var y=f[h*a+g];v.push(y),m+=y*s[g]}if(m<0||m>=r/o)throw new Error("Invalid indices: "+v+" does not index into "+n);for(var b=0;b<o;b++)c?p.values[m*o+b]+=d[h*o+b]:p.values[m*o+b]=0===t.rank?d[0]:d[h*o+b]}return p.toTensor().reshape(n)},t}(Mr);je.registerBackend("cpu",(function(){return new Ul}),1);for(var zl=0,Vl=[{kernelName:"NonMaxSuppressionV5",backendName:"cpu",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=e.attrs,o=t,i=o.boxes,a=o.scores,s=r,u=s.maxOutputSize,c=s.iouThreshold,l=s.scoreThreshold,f=s.softNmsSigma,d=n;Ll(i,"NonMaxSuppressionWithScore");var p=so(d.data.get(i.dataId).values,d.data.get(a.dataId).values,u,c,l,f);return[p.selectedIndices,p.selectedScores]}},{kernelName:"Square",backendName:"cpu",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t.x,o=n;Ll(r,"square");for(var i=o.data.get(r.dataId).values,a=new Float32Array(i.length),s=0;s<i.length;++s){var u=i[s];a[s]=u*u}return{dataId:o.write(a,r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},{kernelName:Za,backendName:"cpu",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t,o=r.a,i=r.b,a=n;Ll([o,i],Za);var s=a.data.get(o.dataId).values,u=a.data.get(i.dataId).values,c=function(e,t,n,r,o,i){var a=Lr(e,t),s=a.length,u=Q(a),c=L(o,T(a)),l=e.length,f=t.length,d=Q(e),p=Q(t),h=Dr(e,a),v=Dr(t,a);if(h.length+v.length===0)for(var m=0;m<c.length;++m)c[m]=i(n[m%n.length],r[m%r.length]);else{var g=function(e){var t=ue(e,s,u),o=t.slice(-l);h.forEach((function(e){return o[e]=0}));var a=se(o,l,d),m=t.slice(-f);v.forEach((function(e){return m[e]=0}));var g=se(m,f,p);c[e]=i(n[a],r[g])};for(m=0;m<c.length;++m)g(m)}return[c,a]}(o.shape,i.shape,s,u,o.dtype,(function(e,t){var n=e-t;return n*n})),l=c[0],f=c[1];return{dataId:a.write(l,f,o.dtype),shape:f,dtype:o.dtype}}}];zl<Vl.length;zl++)g(Vl[zl]);for(var Wl,Hl=function(e){this.variableNames=["A"];var t=Eo(),n=e[0],r=e[1];this.outputShape=e,this.userCode="\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+r+".0, "+n+".0);\n\n vec4 values = "+t.texture2D+"(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n "},$l=function(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=Eo(),n=e[0],r=e[1];this.outputShape=e,this.userCode="\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n\n vec4 result = vec4(0.);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n texC = coords[1] + row;\n depth = coords[2] + col;\n\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+r+".0, "+n+".0);\n vec4 values = "+t.texture2D+"(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n result[row * 2 + col] = floor(value * 255.0 + 0.5);\n }\n }\n\n "+t.output+" = result;\n }\n "},ql=0,Kl=[{kernelName:"FromPixels",backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=e.attrs,o=t.pixels,i=r.numChannels,a="undefined"!=typeof HTMLVideoElement&&o instanceof HTMLVideoElement,s="undefined"!=typeof HTMLImageElement&&o instanceof HTMLImageElement,u=a?[o.videoWidth,o.videoHeight]:[o.width,o.height],c=u[0],l=u[1],d=[l,c],p=[l,c,i];(s||a)&&(null==Wl&&(Wl=document.createElement("canvas").getContext("2d")),Wl.canvas.width=c,Wl.canvas.height=l,Wl.drawImage(o,0,0,c,l),o=Wl.canvas);var h=n.makeTensorInfo(d,"int32");n.texData.get(h.dataId).usage=Be.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(h.dataId),o);var v=f().getBool("WEBGL_PACK")?new $l(p):new Hl(p),m=n.runWebGLProgram(v,[h],"int32");return n.disposeData(h.dataId),m}},{kernelName:"NonMaxSuppressionV5",backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=e.attrs;Wt("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");var o=t,i=o.boxes,a=o.scores,s=r,u=s.maxOutputSize,c=s.iouThreshold,l=s.scoreThreshold,f=s.softNmsSigma,d=n,p=so(d.readSync(i.dataId),d.readSync(a.dataId),u,c,l,f);return[p.selectedIndices,p.selectedScores]}},{kernelName:"Square",backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t.x,o=n,i=new Ra(r.shape,"return x * x;");return o.runWebGLProgram(i,[r],r.dtype)}},{kernelName:Za,backendName:"webgl",kernelFunc:function(e){var t=e.inputs,n=e.backend,r=t,o=r.a,i=r.b,a=n,s=f().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Yo("return (a - b) * (a - b);",o.shape,i.shape):new Go("return (a - b) * (a - b);",o.shape,i.shape);return a.compileAndRun(s,[o,i])}}];ql<Kl.length;ql++)g(Kl[ql]);for(var Gl=0,Xl=[{kernelName:"Square",gradFunc:function(e,t){var n=t[0];return{x:function(){return e.mul(n.toFloat().mul(2))}}}},{kernelName:Za,gradFunc:function(e,t){var n=t[0],r=t[1],o=fn(2);return{a:function(){return vu(e,vu(o,wu(n,r)))},b:function(){return vu(e,vu(o,wu(r,n)))}}}}];Gl<Xl.length;Gl++)y(Xl[Gl]);var Yl=function(){function e(){}return e.prototype.fetch=function(e,t){return fetch(e,t)},e.prototype.now=function(){return performance.now()},e.prototype.encode=function(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Browser's encoder only supports utf-8, but got "+t);return null==this.textEncoder&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)},e.prototype.decode=function(e,t){return new TextDecoder(t).decode(e)},e}();f().get("IS_BROWSER")&&f().setPlatform("browser",new Yl);var Jl,Ql=function(){function e(){this.util=n(515),this.textEncoder=new this.util.TextEncoder}return e.prototype.fetch=function(e,t){return null!=f().global.fetch?f().global.fetch(e,t):(null==Jl&&(Jl=n(514)),Jl(e,t))},e.prototype.now=function(){var e=r.hrtime();return 1e3*e[0]+e[1]/1e6},e.prototype.encode=function(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Node built-in encoder only supports utf-8, but got "+t);return this.textEncoder.encode(e)},e.prototype.decode=function(e,t){return 0===e.length?"":new this.util.TextDecoder(t).decode(e)},e}();f().get("IS_NODE")&&f().setPlatform("node",new Ql);var Zl={float32:4,int32:4,uint16:2,uint8:1,bool:1};function ef(e,t){for(var n={},r=0,o=function(t){var o=t.name,i=t.dtype,a=t.shape,s=T(a),u=void 0;if("quantization"in t){var c=t.quantization;if("uint8"!==c.dtype&&"uint16"!==c.dtype)throw new Error("Weight "+t.name+" has unknown quantization dtype "+c.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var l=Zl[c.dtype],f=e.slice(r,r+s*l),d="uint8"===c.dtype?new Uint8Array(f):new Uint16Array(f);if("float32"===i)u=Float32Array.from(d,(function(e){return e*c.scale+c.min}));else{if("int32"!==i)throw new Error("Unsupported dtype in weight '"+o+"': "+i);u=Int32Array.from(d,(function(e){return Math.round(e*c.scale+c.min)}))}r+=s*l}else if("string"===i){var p=T(t.shape);u=[];for(var h=0;h<p;h++){var v=new Uint32Array(e.slice(r,r+4))[0];r+=4;var m=new Uint8Array(e.slice(r,r+v));u.push(m),r+=v}}else{var g=Zl[i];if(f=e.slice(r,r+s*g),"float32"===i)u=new Float32Array(f);else if("int32"===i)u=new Int32Array(f);else{if("bool"!==i)throw new Error("Unsupported dtype in weight '"+o+"': "+i);u=new Uint8Array(f)}r+=s*g}n[o]=cn(u,a,i)},i=0,a=t;i<a.length;i++)o(a[i]);return n}function tf(e){if(null===e)throw new Error("Invalid input value: "+JSON.stringify(e));var t=0,n=[];e.forEach((function(e){if(t+=e.byteLength,n.push(e.byteLength===e.buffer.byteLength?e:new e.constructor(e)),!(e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+e.constructor.name)}));var r=new Uint8Array(t),o=0;return n.forEach((function(e){r.set(new Uint8Array(e.buffer),o),o+=e.byteLength})),r.buffer}var nf="undefined"!=typeof Buffer&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function rf(e){return nf?Buffer.byteLength(e):new Blob([e]).size}function of(e){var t=0;e.forEach((function(e){t+=e.byteLength}));var n=new Uint8Array(t),r=0;return e.forEach((function(e){n.set(new Uint8Array(e),r),r+=e.byteLength})),n.buffer}function af(e){for(e=e.trim();e.endsWith("/");)e=e.slice(0,e.length-1);var t=e.split("/");return t[t.length-1]}function sf(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==e.modelTopology?0:rf(JSON.stringify(e.modelTopology)),weightSpecsBytes:null==e.weightSpecs?0:rf(JSON.stringify(e.weightSpecs)),weightDataBytes:null==e.weightData?0:e.weightData.byteLength}}var uf=function(){function e(){this.saveRouters=[],this.loadRouters=[]}return e.getInstance=function(){return null==e.instance&&(e.instance=new e),e.instance},e.registerSaveRouter=function(t){e.getInstance().saveRouters.push(t)},e.registerLoadRouter=function(t){e.getInstance().loadRouters.push(t)},e.getSaveHandlers=function(t){return e.getHandlers(t,"save")},e.getLoadHandlers=function(t,n){return e.getHandlers(t,"load",n)},e.getHandlers=function(t,n,r){var o=[];return("load"===n?e.getInstance().loadRouters:e.getInstance().saveRouters).forEach((function(e){var n=e(t,r);null!==n&&o.push(n)})),o},e}(),cf="://",lf=function(){function e(){this.managers={}}return e.getInstance=function(){return null==e.instance&&(e.instance=new e),e.instance},e.registerManager=function(t,n){k(null!=t,(function(){return"scheme must not be undefined or null."})),t.endsWith(cf)&&(t=t.slice(0,t.indexOf(cf))),k(t.length>0,(function(){return"scheme must not be an empty string."}));var r=e.getInstance();k(null==r.managers[t],(function(){return"A model store manager is already registered for scheme '"+t+"'."})),r.managers[t]=n},e.getManager=function(e){var t=this.getInstance().managers[e];if(null==t)throw new Error("Cannot find model manager for scheme '"+e+"'");return t},e.getSchemes=function(){return Object.keys(this.getInstance().managers)},e}();function ff(e){if(-1===e.indexOf(cf))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+lf.getSchemes().join(","));return{scheme:e.split(cf)[0],path:e.split(cf)[1]}}function df(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var r,o,i,a,s,c,l,f,d;return u(this,(function(u){switch(u.label){case 0:return k(e!==t,(function(){return"Old path and new path are the same: '"+e+"'"})),k((r=uf.getLoadHandlers(e)).length>0,(function(){return"Copying failed because no load handler is found for source URL "+e+"."})),k(r.length<2,(function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+e+"."})),o=r[0],k((i=uf.getSaveHandlers(t)).length>0,(function(){return"Copying failed because no save handler is found for destination URL "+t+"."})),k(i.length<2,(function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+t+"."})),a=i[0],s=ff(e).scheme,c=ff(e).path,l=s===ff(e).scheme,[4,o.load()];case 1:return f=u.sent(),n&&l?[4,lf.getManager(s).removeModel(c)]:[3,3];case 2:u.sent(),u.label=3;case 3:return[4,a.save(f)];case 4:return d=u.sent(),!n||l?[3,6]:[4,lf.getManager(s).removeModel(c)];case 5:u.sent(),u.label=6;case 6:return[2,d.modelArtifactsInfo]}}))}))}var pf="models_store",hf="model_info_store";function vf(){if(!f().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var e=window||self,t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB;if(null==t)throw new Error("The current browser does not appear to support IndexedDB.");return t}function mf(e){var t=e.result;t.createObjectStore(pf,{keyPath:"modelPath"}),t.createObjectStore(hf,{keyPath:"modelPath"})}var gf=function(){function e(e){if(this.indexedDB=vf(),null==e||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}return e.prototype.save=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,e)]}))}))},e.prototype.load=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.databaseAction(this.modelPath)]}))}))},e.prototype.databaseAction=function(e,t){var n=this;return new Promise((function(e,r){var o=n.indexedDB.open("tensorflowjs",1);o.onupgradeneeded=function(){return mf(o)},o.onsuccess=function(){var i=o.result;if(null==t){var a=i.transaction(pf,"readonly"),s=a.objectStore(pf).get(n.modelPath);s.onsuccess=function(){if(null==s.result)return i.close(),r(new Error("Cannot find model with path '"+n.modelPath+"' in IndexedDB."));e(s.result.modelArtifacts)},s.onerror=function(e){return i.close(),r(s.error)},a.oncomplete=function(){return i.close()}}else{var u,c=sf(t),l=i.transaction(hf,"readwrite"),f=l.objectStore(hf),d=f.put({modelPath:n.modelPath,modelArtifactsInfo:c});d.onsuccess=function(){var o=(u=i.transaction(pf,"readwrite")).objectStore(pf).put({modelPath:n.modelPath,modelArtifacts:t,modelArtifactsInfo:c});o.onsuccess=function(){return e({modelArtifactsInfo:c})},o.onerror=function(e){var t=(f=l.objectStore(hf)).delete(n.modelPath);t.onsuccess=function(){return i.close(),r(o.error)},t.onerror=function(e){return i.close(),r(o.error)}}},d.onerror=function(e){return i.close(),r(d.error)},l.oncomplete=function(){null==u?i.close():u.oncomplete=function(){return i.close()}}}},o.onerror=function(e){return r(o.error)}}))},e.URL_SCHEME="indexeddb://",e}(),yf=function(e){return f().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(gf.URL_SCHEME)?(t=e.slice(gf.URL_SCHEME.length),new gf(t)):null;var t};uf.registerSaveRouter(yf),uf.registerLoadRouter(yf);var bf=function(){function e(){this.indexedDB=vf()}return e.prototype.listModels=function(){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(t){return[2,new Promise((function(t,n){var r=e.indexedDB.open("tensorflowjs",1);r.onupgradeneeded=function(){return mf(r)},r.onsuccess=function(){var e=r.result,o=e.transaction(hf,"readonly"),i=o.objectStore(hf).getAll();i.onsuccess=function(){for(var e={},n=0,r=i.result;n<r.length;n++){var o=r[n];e[o.modelPath]=o.modelArtifactsInfo}t(e)},i.onerror=function(t){return e.close(),n(i.error)},o.oncomplete=function(){return e.close()}},r.onerror=function(e){return n(r.error)}}))]}))}))},e.prototype.removeModel=function(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){var r;return e=(r=e).startsWith(gf.URL_SCHEME)?r.slice(gf.URL_SCHEME.length):r,[2,new Promise((function(n,r){var o=t.indexedDB.open("tensorflowjs",1);o.onupgradeneeded=function(){return mf(o)},o.onsuccess=function(){var t,i=o.result,a=i.transaction(hf,"readwrite"),s=a.objectStore(hf),u=s.get(e);u.onsuccess=function(){if(null==u.result)return i.close(),r(new Error("Cannot find model with path '"+e+"' in IndexedDB."));var o=s.delete(e),a=function(){var o=(t=i.transaction(pf,"readwrite")).objectStore(pf).delete(e);o.onsuccess=function(){return n(u.result.modelArtifactsInfo)},o.onerror=function(e){return r(u.error)}};o.onsuccess=a,o.onerror=function(e){return a(),i.close(),r(u.error)}},u.onerror=function(e){return i.close(),r(u.error)},a.oncomplete=function(){null==t?i.close():t.oncomplete=function(){return i.close()}}},o.onerror=function(e){return r(o.error)}}))]}))}))},e}();if(f().getBool("IS_BROWSER"))try{lf.registerManager(gf.URL_SCHEME,new bf)}catch(ke){}var wf="/",xf="tensorflowjs_models",Ef="info",Cf="model_topology",kf="weight_specs",Of="weight_data",Sf="model_metadata";function _f(e){return{info:[xf,e,Ef].join(wf),topology:[xf,e,Cf].join(wf),weightSpecs:[xf,e,kf].join(wf),weightData:[xf,e,Of].join(wf),modelMetadata:[xf,e,Sf].join(wf)}}function Tf(e){var t=e.split(wf);if(t.length<3)throw new Error("Invalid key format: "+e);return t.slice(1,t.length-1).join(wf)}var If=function(){function e(e){if(!f().getBool("IS_BROWSER")||"undefined"==typeof window||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==e||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=_f(this.modelPath)}return e.prototype.save=function(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");t=JSON.stringify(e.modelTopology),n=JSON.stringify(e.weightSpecs),r=sf(e);try{return this.LS.setItem(this.keys.info,JSON.stringify(r)),this.LS.setItem(this.keys.topology,t),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,function(e){if(nf)return Buffer.from(e).toString("base64");for(var t=new Uint8Array(e),n="",r=0,o=t.length;r<o;r++)n+=String.fromCharCode(t[r]);return btoa(n)}(e.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,userDefinedMetadata:e.userDefinedMetadata})),[2,{modelArtifactsInfo:r}]}catch(e){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+r.modelTopologyBytes+", weightSpecsBytes="+r.weightSpecsBytes+", weightDataBytes="+r.weightDataBytes+".")}return[2]}))}))},e.prototype.load=function(){return s(this,void 0,void 0,(function(){var e,t,n,r,o,i,a;return u(this,(function(s){if(null==(e=JSON.parse(this.LS.getItem(this.keys.info))))throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if("JSON"!==e.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(t={},null==(n=JSON.parse(this.LS.getItem(this.keys.topology))))throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(t.modelTopology=n,null==(r=JSON.parse(this.LS.getItem(this.keys.weightSpecs))))throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(t.weightSpecs=r,null!=(o=this.LS.getItem(this.keys.modelMetadata))&&(i=JSON.parse(o),t.format=i.format,t.generatedBy=i.generatedBy,t.convertedBy=i.convertedBy,t.userDefinedMetadata=i.userDefinedMetadata),null==(a=this.LS.getItem(this.keys.weightData)))throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return t.weightData=function(e){if(nf){var t=Buffer.from(e,"base64");return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}for(var n=atob(e),r=new Uint8Array(n.length),o=0;o<n.length;++o)r.set([n.charCodeAt(o)],o);return r.buffer}(a),[2,t]}))}))},e.URL_SCHEME="localstorage://",e}(),Pf=function(e){return f().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(If.URL_SCHEME)?(t=e.slice(If.URL_SCHEME.length),new If(t)):null;var t};uf.registerSaveRouter(Pf),uf.registerLoadRouter(Pf);var Af=function(){function e(){k(f().getBool("IS_BROWSER"),(function(){return"Current environment is not a web browser"})),k("undefined"==typeof window||void 0!==window.localStorage,(function(){return"Current browser does not appear to support localStorage"})),this.LS=window.localStorage}return e.prototype.listModels=function(){return s(this,void 0,void 0,(function(){var e,t,n,r,o,i;return u(this,(function(a){for(e={},t=xf+wf,n=wf+Ef,r=0;r<this.LS.length;++r)(o=this.LS.key(r)).startsWith(t)&&o.endsWith(n)&&(i=Tf(o),e[i]=JSON.parse(this.LS.getItem(o)));return[2,e]}))}))},e.prototype.removeModel=function(e){return s(this,void 0,void 0,(function(){var t,n;return u(this,(function(r){var o;if(e=(o=e).startsWith(If.URL_SCHEME)?o.slice(If.URL_SCHEME.length):o,t=_f(e),null==this.LS.getItem(t.info))throw new Error("Cannot find model at path '"+e+"'");return n=JSON.parse(this.LS.getItem(t.info)),this.LS.removeItem(t.info),this.LS.removeItem(t.topology),this.LS.removeItem(t.weightSpecs),this.LS.removeItem(t.weightData),[2,n]}))}))},e}();if(f().getBool("IS_BROWSER"))try{lf.registerManager(If.URL_SCHEME,new Af)}catch(ke){}function Rf(e){return new Promise((function(e){return setTimeout(e)})).then(e)}var Nf=function(){function e(t){if(!f().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(e.URL_SCHEME)&&(t=t.slice(e.URL_SCHEME.length)),null!=t&&0!==t.length||(t="model"),this.modelTopologyFileName=t+".json",this.weightDataFileName=t+".weights.bin"}return e.prototype.save=function(e){return s(this,void 0,void 0,(function(){var t,n,r,o,i,a;return u(this,(function(s){switch(s.label){case 0:if("undefined"==typeof document)throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(t=window.URL.createObjectURL(new Blob([e.weightData],{type:"application/octet-stream"})),!(e.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return n=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}],r={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,weightsManifest:n},o=window.URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),(i=null==this.jsonAnchor?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,i.href=o,[4,Rf((function(){return i.dispatchEvent(new MouseEvent("click"))}))];case 2:return s.sent(),null==e.weightData?[3,4]:((a=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,a.href=t,[4,Rf((function(){return a.dispatchEvent(new MouseEvent("click"))}))]);case 3:s.sent(),s.label=4;case 4:return[2,{modelArtifactsInfo:sf(e)}]}}))}))},e.URL_SCHEME="downloads://",e}(),Mf=function(){function e(e){if(null==e||e.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+e);this.files=e}return e.prototype.load=function(){return s(this,void 0,void 0,(function(){var e,t,n=this;return u(this,(function(r){return e=this.files[0],t=this.files.slice(1),[2,new Promise((function(r,o){var i=new FileReader;i.onload=function(i){var a=JSON.parse(i.target.result),s=a.modelTopology;if(null!=s){0===t.length&&r({modelTopology:s});var u=a.weightsManifest;if(null!=u){var c;try{c=n.checkManifestAndWeightFiles(u,t)}catch(e){return void o(e)}var l=[],f=[],d=[];u.forEach((function(e){e.paths.forEach((function(e){f.push(e),d.push(null)})),l.push.apply(l,e.weights)})),u.forEach((function(e){e.paths.forEach((function(e){var t=new FileReader;t.onload=function(t){var n=t.target.result,o=f.indexOf(e);d[o]=n,-1===d.indexOf(null)&&r({modelTopology:s,weightSpecs:l,weightData:of(d),format:a.format,generatedBy:a.generatedBy,convertedBy:a.convertedBy,userDefinedMetadata:a.userDefinedMetadata})},t.onerror=function(t){return o("Failed to weights data from file of path '"+e+"'.")},t.readAsArrayBuffer(c[e])}))}))}else o(new Error("weightManifest field is missing from file "+e.name))}else o(new Error("modelTopology field is missing from file "+e.name))},i.onerror=function(t){return o("Failed to read model topology and weights manifest JSON from file '"+e.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},i.readAsText(e)}))]}))}))},e.prototype.checkManifestAndWeightFiles=function(e,t){for(var n=[],r=t.map((function(e){return af(e.name)})),o={},i=0,a=e;i<a.length;i++)a[i].paths.forEach((function(e){var i=af(e);if(-1!==n.indexOf(i))throw new Error("Duplicate file basename found in weights manifest: '"+i+"'");if(n.push(i),-1===r.indexOf(i))throw new Error("Weight file with basename '"+i+"' is not provided.");o[e]=t[r.indexOf(i)]}));if(n.length!==t.length)throw new Error("Mismatch in the number of files in weights manifest ("+n.length+") and the number of weight files provided ("+t.length+").");return o},e}();function jf(e,t,n,r){!function(e){k(null!=e&&Array.isArray(e)&&e.length>0,(function(){return"promises must be a none empty array"}))}(e),function(e,t){k(e>=0&&e<=1,(function(){return"Progress fraction must be in range [0, 1], but got startFraction "+e})),k(t>=0&&t<=1,(function(){return"Progress fraction must be in range [0, 1], but got endFraction "+t})),k(t>=e,(function(){return"startFraction must be no more than endFraction, but got startFraction "+e+" and endFraction "+t}))}(n=null==n?0:n,r=null==r?1:r);var o=0;return Promise.all(e.map((function(i){return i.then((function(i){var a=n+ ++o/e.length*(r-n);return t(a),i})),i})))}function Df(e,t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return null==t&&(t={}),n=null==t.fetchFunc?f().platform.fetch:t.fetchFunc,r=e.map((function(e){return n(e,t.requestInit,{isBinary:!0})})),o=0,i=.5,null!=t.onProgress?[3,2]:[4,Promise.all(r)];case 1:return a=u.sent(),[3,4];case 2:return[4,jf(r,t.onProgress,o,i)];case 3:a=u.sent(),u.label=4;case 4:return s=a.map((function(e){return e.arrayBuffer()})),c=.5,l=1,null!=t.onProgress?[3,6]:[4,Promise.all(s)];case 5:return d=u.sent(),[3,8];case 6:return[4,jf(s,t.onProgress,c,l)];case 7:d=u.sent(),u.label=8;case 8:return[2,d]}}))}))}function Ff(e){var t=this;return function(n,r,o){return void 0===r&&(r=""),s(t,void 0,void 0,(function(){var t,i,a,s,c,l,f,d,p,h;return u(this,(function(u){switch(u.label){case 0:if(t=n.map((function(){return!1})),i={},a=null!=o?o.map((function(){return!1})):[],s=[],n.forEach((function(e,n){var r=0;e.weights.forEach((function(e){var u="quantization"in e?e.quantization.dtype:e.dtype,c=Zl[u]*T(e.shape),l=function(){t[n]=!0,null==i[n]&&(i[n]=[]),i[n].push({manifestEntry:e,groupOffset:r,sizeBytes:c})};null!=o?o.forEach((function(t,n){t===e.name&&(l(),a[n]=!0)})):l(),s.push(e.name),r+=c}))})),!a.every((function(e){return e})))throw c=o.filter((function(e,t){return!a[t]})),new Error("Could not find weights in manifest with names: "+c.join(", ")+". \nManifest JSON has weights with names: "+s.join(", ")+".");return l=t.reduce((function(e,t,n){return t&&e.push(n),e}),[]),f=[],l.forEach((function(e){n[e].paths.forEach((function(e){var t=r+(r.endsWith("/")?"":"/")+e;f.push(t)}))})),[4,e(f)];case 1:return d=u.sent(),p={},h=0,l.forEach((function(e){for(var t=n[e].paths.length,r=0,o=0;o<t;o++)r+=d[h+o].byteLength;for(var a=new ArrayBuffer(r),s=new Uint8Array(a),u=0,c=0;c<t;c++){var l=new Uint8Array(d[h+c]);s.set(l,u),u+=l.byteLength}i[e].forEach((function(e){var t=ef(a.slice(e.groupOffset,e.groupOffset+e.sizeBytes),[e.manifestEntry]);for(var n in t)p[n]=t[n]})),h+=t})),[2,p]}}))}))}}uf.registerSaveRouter((function(e){return f().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(Nf.URL_SCHEME)?function(e){return void 0===e&&(e="model"),new Nf(e)}(e.slice(Nf.URL_SCHEME.length)):null}));var Lf=function(){function e(e,t){if(this.DEFAULT_METHOD="POST",null==t&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.onProgress=t.onProgress,null!=t.fetchFunc?(k("function"==typeof t.fetchFunc,(function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"})),this.fetch=t.fetchFunc):this.fetch=f().platform.fetch,k(null!=e&&e.length>0,(function(){return"URL path for http must not be null, undefined or empty."})),Array.isArray(e)&&k(2===e.length,(function(){return"URL paths for http must have a length of 2, (actual length is "+e.length+")."})),this.path=e,null!=t.requestInit&&null!=t.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}return e.prototype.save=function(e){return s(this,void 0,void 0,(function(){var t,n,r,o;return u(this,(function(i){switch(i.label){case 0:if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],r={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,userDefinedMetadata:e.userDefinedMetadata,weightsManifest:n},t.body.append("model.json",new Blob([JSON.stringify(r)],{type:"application/json"}),"model.json"),null!=e.weightData&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,t)];case 1:if((o=i.sent()).ok)return[2,{modelArtifactsInfo:sf(e),responses:[o]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+o.status+".")}}))}))},e.prototype.load=function(){return s(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,c,l,f,d;return u(this,(function(u){switch(u.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(e=u.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+e.status+". Please verify this URL points to the model JSON of the model to load.");u.label=2;case 2:return u.trys.push([2,4,,5]),[4,e.json()];case 3:return t=u.sent(),[3,5];case 4:throw u.sent(),n="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?n+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":n+=" Please make sure the server is serving valid JSON for this request.",new Error(n);case 5:if(r=t.modelTopology,o=t.weightsManifest,i=t.generatedBy,a=t.convertedBy,s=t.format,c=t.userDefinedMetadata,null==r&&null==o)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return null==o?[3,7]:[4,this.loadWeights(o)];case 6:d=u.sent(),l=d[0],f=d[1],u.label=7;case 7:return[2,{modelTopology:r,weightSpecs:l,weightData:f,userDefinedMetadata:c,generatedBy:i,convertedBy:a,format:s}]}}))}))},e.prototype.loadWeights=function(e){return s(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,c,l,f,d;return u(this,(function(u){switch(u.label){case 0:for(t=Array.isArray(this.path)?this.path[1]:this.path,n=function(e){var t=e.lastIndexOf("/"),n=e.lastIndexOf("?");return[e.substring(0,t)+"/",n>t?e.substring(n):""]}(t),r=n[0],o=n[1],i=this.weightPathPrefix||r,a=[],s=0,c=e;s<c.length;s++)l=c[s],a.push.apply(a,l.weights);return f=[],e.forEach((function(e){e.paths.forEach((function(e){f.push(i+e+o)}))})),[4,Df(f,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress})];case 1:return d=u.sent(),[2,[a,of(d)]]}}))}))},e.URL_SCHEME_REGEX=/^https?:\/\//,e}();function Bf(e){return null!=e.match(Lf.URL_SCHEME_REGEX)}var Uf=function(e,t){return"undefined"==typeof fetch?null:(Array.isArray(e)?e.every((function(e){return Bf(e)})):Bf(e))?zf(e,{onProgress:t}):null};function zf(e,t){return new Lf(e,t)}uf.registerSaveRouter(Uf),uf.registerLoadRouter(Uf);var Vf,Wf=function(){function e(e){this.modelArtifacts=e}return e.prototype.load=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.modelArtifacts]}))}))},e}(),Hf=function(){function e(e){this.saveHandler=e}return e.prototype.save=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.saveHandler(e)]}))}))},e}(),$f=Object.freeze({browserFiles:function(e){return new Mf(e)},browserHTTPRequest:function(e,t){return zf(e,t)},concatenateArrayBuffers:of,decodeWeights:ef,encodeWeights:function(e,t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,c=this;return u(this,(function(l){switch(l.label){case 0:for(n=[],r=[],o=Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e),i=function(i){var a=o[i],l=Array.isArray(e)?e[i].tensor:e[a];if("float32"!==l.dtype&&"int32"!==l.dtype&&"bool"!==l.dtype&&"string"!==l.dtype)throw new Error("Unsupported dtype in weight '"+a+"': "+l.dtype);var f={name:a,shape:l.shape,dtype:l.dtype};if("string"===l.dtype){var d=new Promise((function(e){return s(c,void 0,void 0,(function(){var t,n,r,o,i,a,s;return u(this,(function(u){switch(u.label){case 0:return[4,l.bytes()];case 1:for(t=u.sent(),n=t.reduce((function(e,t){return e+t.length}),0)+4*t.length,r=new Uint8Array(n),o=0,i=0;i<t.length;i++)a=t[i],s=new Uint8Array(new Uint32Array([a.length]).buffer),r.set(s,o),o+=4,r.set(a,o),o+=a.length;return e(r),[2]}}))}))}));r.push(d)}else r.push(l.data());null!=t&&(f.group=t),n.push(f)},a=0;a<o.length;++a)i(a);return[4,Promise.all(r)];case 1:return[2,{data:tf(l.sent()),specs:n}]}}))}))},fromMemory:function(e,t,n,r){return 1===arguments.length?null!=e.modelTopology||null!=e.weightSpecs?new Wf(e):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new Wf({modelTopology:e})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new Wf({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:r}))},getLoadHandlers:function(e,t){return uf.getLoadHandlers(e,t)},getModelArtifactsInfoForJSON:sf,getSaveHandlers:function(e){return uf.getSaveHandlers(e)},http:zf,isHTTPScheme:Bf,loadWeights:function(e,t,n,r){return void 0===t&&(t=""),s(this,void 0,void 0,(function(){return u(this,(function(o){return[2,Ff((function(e){return Df(e,{requestInit:r})}))(e,t,n)]}))}))},registerLoadRouter:function(e){return uf.registerLoadRouter(e)},registerSaveRouter:function(e){return uf.registerSaveRouter(e)},weightsLoaderFactory:Ff,withSaveHandler:function(e){return new Hf(e)},copyModel:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,df(e,t,!1)]}))}))},listModels:function(){return s(this,void 0,void 0,(function(){var e,t,n,r,o,i,a;return u(this,(function(s){switch(s.label){case 0:e=lf.getSchemes(),t={},n=0,r=e,s.label=1;case 1:return n<r.length?(o=r[n],[4,lf.getManager(o).listModels()]):[3,4];case 2:for(a in i=s.sent())t[o+cf+a]=i[a];s.label=3;case 3:return n++,[3,1];case 4:return[2,t]}}))}))},moveModel:function(e,t){return s(this,void 0,void 0,(function(){return u(this,(function(n){return[2,df(e,t,!0)]}))}))},removeModel:function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){return t=ff(e),[2,lf.getManager(t.scheme).removeModel(t.path)]}))}))}}),qf=on({confusionMatrix_:function(e,t,n){var r=qt(e,"labels","confusionMatrix"),o=qt(t,"predictions","confusionMatrix");k(null==n||n>0&&Number.isInteger(n),(function(){return"If provided, numClasses must be a positive integer, but got "+n})),k(1===r.rank,(function(){return"Expected the rank of labels to be 1, but got "+r.rank})),k(1===o.rank,(function(){return"Expected the rank of predictions to be 1, but got "+o.rank})),k(r.shape[0]===o.shape[0],(function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+o.shape[0]+". Labels and predictions should have the same number of elements."})),k(n>0&&Number.isInteger(n),(function(){return"numClasses is required to be a positive integer, but got "+n}));var i=Yn(r.asType("int32"),n),a=Yn(o.asType("int32"),n);return i.transpose().matMul(a).asType("int32")}}),Kf=(Object.freeze({confusionMatrix:qf}),on({fromPixels_:function(e,t){if(void 0===t&&(t=3),t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==e)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var n=!1,r=!1,o=!1,i=!1,a=!1;if(e.data instanceof Uint8Array)n=!0;else if("undefined"!=typeof ImageData&&e instanceof ImageData)r=!0;else if("undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement)o=!0;else if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement)i=!0;else{if(null==e.getContext)throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+e.constructor.name);a=!0}if(o&&o&&e.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.");if(null!=v("FromPixels",je.backendName))return je.runKernel("FromPixels",{pixels:e},{numChannels:t});var s,u,c=o?[e.videoWidth,e.videoHeight]:[e.width,e.height],l=c[0],f=c[1];if(a?s=e.getContext("2d").getImageData(0,0,l,f).data:r||n?s=e.data:(i||o)&&(null==Vf&&(Vf=document.createElement("canvas").getContext("2d")),Vf.canvas.width=l,Vf.canvas.height=f,Vf.drawImage(e,0,0,l,f),s=Vf.getImageData(0,0,l,f).data),4===t)u=new Int32Array(s);else{var d=l*f;u=new Int32Array(d*t);for(var p=0;p<d;p++)for(var h=0;h<t;++h)u[p*t+h]=s[4*p+h]}return hn(u,[f,l,t],"int32")}})),Gf=Object.freeze({toPixels:function(e,t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,s,c,l,f,d,p,h,v,m,g,y,b,w,x,E,C,k,O;return u(this,(function(u){switch(u.label){case 0:if(n=qt(e,"img","toPixels"),e instanceof ye||(n=n.toInt()),2!==n.rank&&3!==n.rank)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+n.rank+".");if(r=n.shape.slice(0,2),o=r[0],i=r[1],(a=2===n.rank?1:n.shape[2])>4||2===a)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+a);return[4,n.data()];case 1:return s=u.sent(),c=n.min(),l=n.max(),[4,Promise.all([c.data(),l.data()])];case 2:if(f=u.sent(),d=f[0],p=f[1],h=d[0],v=p[0],c.dispose(),l.dispose(),"float32"===n.dtype){if(h<0||v>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+h+" - "+v+"].")}else{if("int32"!==n.dtype)throw new Error("Unsupported type for toPixels: "+n.dtype+". Please use float32 or int32 tensors.");if(h<0||v>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+h+" - "+v+"].")}for(m="float32"===n.dtype?255:1,g=new Uint8ClampedArray(i*o*4),y=0;y<o*i;++y)b=void 0,w=void 0,x=void 0,E=void 0,1===a?(b=s[y]*m,w=s[y]*m,x=s[y]*m,E=255):3===a?(b=s[3*y]*m,w=s[3*y+1]*m,x=s[3*y+2]*m,E=255):4===a&&(b=s[4*y]*m,w=s[4*y+1]*m,x=s[4*y+2]*m,E=s[4*y+3]*m),g[0+(C=4*y)]=Math.round(b),g[C+1]=Math.round(w),g[C+2]=Math.round(x),g[C+3]=Math.round(E);return null!=t&&(t.width=i,t.height=o,k=t.getContext("2d"),O=new ImageData(g,i,o),k.putImageData(O,0,0)),n!==e&&n.dispose(),[2,g]}}))}))},fromPixels:Kf}),Xf=function(){function e(){}return e.prototype.getClassName=function(){return this.constructor.className},e.fromConfig=function(e,t){return new e(t)},e}(),Yf=function(){function e(){this.classNameMap={}}return e.getMap=function(){return null==e.instance&&(e.instance=new e),e.instance},e.register=function(t){e.getMap().classNameMap[t.className]=[t,t.fromConfig]},e}();function Jf(e){k(null!=e.className,(function(){return"Class being registered does not have the static className property defined."})),k("string"==typeof e.className,(function(){return"className is required to be a string, but got type "+typeof e.className})),k(e.className.length>0,(function(){return"Class being registered has an empty-string as its className, which is disallowed."})),Yf.register(e)}Object.freeze({Serializable:Xf,SerializationMap:Yf,registerClass:Jf});function Qf(){return 32===je.backend.floatPrecision()?.001:.1}function Zf(e,t,n){var r=!0;if((W(e)||W(t))&&(r=!1),W(e)&&W(t)&&(r=!0),r){var o=e.constructor.name,i=t.constructor.name;if(o!==i)throw new Error("Arrays are of different type. Actual: "+o+". Expected: "+i)}if(Array.isArray(e)&&Array.isArray(t)){var a=Ht(e),s=Ht(t);if(!I(a,s))throw new Error("Arrays have different shapes. Actual: ["+a+"]. Expected: ["+s+"]")}var u=W(e)?e:_(e),c=W(t)?t:_(t);if(u.length!==c.length)throw new Error("Arrays have different lengths actual: "+u.length+" vs expected: "+c.length+".\nActual: "+u+".\nExpected: "+c+".");for(var l=0;l<c.length;++l){var f=u[l],d=c[l];if(!n(f,d))throw new Error("Arrays differ: actual["+l+"] = "+f+", expected["+l+"] = "+d+".\nActual: "+u+".\nExpected: "+c+".")}}function ed(e,t,n){return!isFinite(e)&&!isFinite(t)||!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}Object.freeze({TEST_EPSILON_FLOAT16:.1,expectArraysClose:function(e,t,n){return null==n&&(n=Qf()),Zf(e,t,(function(e,t){return ed(e,t,n)}))},testEpsilon:Qf,expectPromiseToFail:function(e,t){e().then((function(){return t.fail()}),(function(){return t()}))},expectArraysEqual:function(e,t){var n="string"==typeof t||"number"==typeof t||"boolean"==typeof t?[t]:t;return q(e)||q(e[0])||q(t)||q(t[0])?Zf(e,n,(function(e,t){return e==t})):Zf(e,t,(function(e,t){return ed(e,t,0)}))},expectNumbersClose:function(e,t,n){if(null==n&&(n=Qf()),!ed(e,t,n))throw new Error("Numbers differ: actual === "+e+", expected === "+t)},expectValuesInRange:function(e,t,n){for(var r=0;r<e.length;r++)if(e[r]<t||e[r]>n)throw new Error("Value out of range:"+e[r]+" low: "+t+", high: "+n)},expectArrayBuffersEqual:function(e,t){expect(new Float32Array(e)).toEqual(new Float32Array(t))}}),Object.freeze({gpgpu_util:$i,webgl_util:Lt,forceHalfFloat:function(){f().set("WEBGL_FORCE_F16_TEXTURES",!0)},MathBackendWebGL:Ja,setWebGLContext:We,GPGPUContext:qi});var td=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.minimize=function(e,t,n){void 0===t&&(t=!1);var r=this.computeGradients(e,n),o=r.value,i=r.grads;if(null!=n){var a=n.map((function(e){return{name:e.name,tensor:i[e.name]}}));this.applyGradients(a)}else this.applyGradients(i);return Vt(i),t?o:(o.dispose(),null)},Object.defineProperty(t.prototype,"iterations",{get:function(){return null==this.iterations_&&(this.iterations_=0),this.iterations_},enumerable:!0,configurable:!0}),t.prototype.incrementIterations=function(){this.iterations_=this.iterations+1},t.prototype.computeGradients=function(e,t){return function(e,t){k(Y(e),(function(){return"The f passed in variableGrads(f) must be a function"})),k(null==t||Array.isArray(t)&&t.every((function(e){return e instanceof Oe})),(function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"}));var n=null!=t;if(!n)for(var r in t=[],je.registeredVariables)t.push(je.registeredVariables[r]);var o=n?t.filter((function(e){return!e.trainable})):null,i=t.length;k((t=t.filter((function(e){return e.trainable}))).length>0,(function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+i+" variables is trainable."}));var a=je.gradients(e,t,null,!0),s=a.value,u=a.grads;k(u.some((function(e){return null!=e})),(function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."})),k(0===s.rank,(function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+s.rank+" tensor"}));var c={};return t.forEach((function(e,t){null!=u[t]&&(c[e.name]=u[t])})),null!=o&&o.forEach((function(e){return c[e.name]=null})),{value:s,grads:c}}(e,t)},t.prototype.dispose=function(){null!=this.iterations_&&Vt(this.iterations_)},t.prototype.saveIterations=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){return null==this.iterations_&&(this.iterations_=0),[2,{name:"iter",tensor:fn(this.iterations_,"int32")}]}))}))},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){throw new Error("getWeights() is not implemented for this optimizer yet.")}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(e){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())}))}))},t.prototype.extractIterations=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return t=this,[4,e[0].tensor.data()];case 1:return t.iterations_=n.sent()[0],[2,e.slice(1)]}}))}))},t}(Xf);Object.defineProperty(td,Symbol.hasInstance,{value:function(e){return null!=e.minimize&&null!=e.computeGradients&&null!=e.applyGradients}});var nd=function(e){function t(t,n,r){void 0===r&&(r=null);var o=e.call(this)||this;return o.learningRate=t,o.rho=n,o.epsilon=r,o.accumulatedGrads=[],o.accumulatedUpdates=[],null==r&&(o.epsilon=je.backend.epsilon()),o}return a(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=je.registeredVariables[n];null==t.accumulatedGrads[r]&&(t.accumulatedGrads[r]={originalName:n+"/accum_grad",variable:zt((function(){return xn(o).variable(!1)}))}),null==t.accumulatedUpdates[r]&&(t.accumulatedUpdates[r]={originalName:n+"/accum_var",variable:zt((function(){return xn(o).variable(!1)}))});var i=Array.isArray(e)?e[r].tensor:e[n];if(null!=i){var a=t.accumulatedGrads[r].variable,s=t.accumulatedUpdates[r].variable;zt((function(){var e=a.mul(t.rho).add(i.square().mul(1-t.rho)),n=s.add(t.epsilon).sqrt().div(a.add(t.epsilon).sqrt()).mul(i),r=s.mul(t.rho).add(n.square().mul(1-t.rho));a.assign(e),s.assign(r);var u=n.mul(-t.learningRate).add(o);o.assign(u)}))}})),this.incrementIterations()},t.prototype.dispose=function(){null!=this.accumulatedUpdates&&(Vt(this.accumulatedGrads.map((function(e){return e.variable}))),Vt(this.accumulatedUpdates.map((function(e){return e.variable}))))},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return e=this.accumulatedGrads.concat(this.accumulatedUpdates),[4,this.saveIterations()];case 1:return[2,[t.sent()].concat(e.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return[4,this.extractIterations(e)];case 1:return e=n.sent(),t=e.length/2,this.accumulatedGrads=e.slice(0,t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.accumulatedUpdates=e.slice(t,2*t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},t.fromConfig=function(e,t){return new e(t.learningRate,t.rho,t.epsilon)},t.className="Adadelta",t}(td);Jf(nd);var rd=function(e){function t(t,n){void 0===n&&(n=.1);var r=e.call(this)||this;return r.learningRate=t,r.initialAccumulatorValue=n,r.accumulatedGrads=[],r}return a(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=je.registeredVariables[n];null==t.accumulatedGrads[r]&&(t.accumulatedGrads[r]={originalName:n+"/accumulator",variable:zt((function(){return yn(o.shape,t.initialAccumulatorValue).variable(!1)}))});var i=Array.isArray(e)?e[r].tensor:e[n];if(null!=i){var a=t.accumulatedGrads[r].variable;zt((function(){var e=a.add(i.square());a.assign(e);var n=i.div(e.add(je.backend.epsilon()).sqrt()).mul(-t.learningRate).add(o);o.assign(n)}))}})),this.incrementIterations()},t.prototype.dispose=function(){null!=this.accumulatedGrads&&Vt(this.accumulatedGrads.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulatedGrads.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.extractIterations(e)];case 1:return e=t.sent(),this.accumulatedGrads=e.map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},t.fromConfig=function(e,t){return new e(t.learningRate,t.initialAccumulatorValue)},t.className="Adagrad",t}(td);Jf(rd);var od=function(e){function t(t,n,r,o){void 0===o&&(o=null);var i=e.call(this)||this;return i.learningRate=t,i.beta1=n,i.beta2=r,i.epsilon=o,i.accumulatedFirstMoment=[],i.accumulatedSecondMoment=[],zt((function(){i.accBeta1=fn(n).variable(),i.accBeta2=fn(r).variable()})),null==o&&(i.epsilon=je.backend.epsilon()),i}return a(t,e),t.prototype.applyGradients=function(e){var t=this,n=Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e);zt((function(){var r=wu(1,t.accBeta1),o=wu(1,t.accBeta2);n.forEach((function(n,i){var a=je.registeredVariables[n];null==t.accumulatedFirstMoment[i]&&(t.accumulatedFirstMoment[i]={originalName:n+"/m",variable:zt((function(){return xn(a).variable(!1)}))}),null==t.accumulatedSecondMoment[i]&&(t.accumulatedSecondMoment[i]={originalName:n+"/v",variable:zt((function(){return xn(a).variable(!1)}))});var s=Array.isArray(e)?e[i].tensor:e[n];if(null!=s){var u=t.accumulatedFirstMoment[i].variable,c=t.accumulatedSecondMoment[i].variable,l=u.mul(t.beta1).add(s.mul(1-t.beta1)),f=c.mul(t.beta2).add(s.square().mul(1-t.beta2)),d=l.div(r),p=f.div(o);u.assign(l),c.assign(f);var h=d.div(p.sqrt().add(t.epsilon)).mul(-t.learningRate).add(a);a.assign(h)}})),t.accBeta1.assign(t.accBeta1.mul(t.beta1)),t.accBeta2.assign(t.accBeta2.mul(t.beta2))})),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.accBeta2.dispose(),null!=this.accumulatedFirstMoment&&Vt(this.accumulatedFirstMoment.map((function(e){return e.variable}))),null!=this.accumulatedSecondMoment&&Vt(this.accumulatedSecondMoment.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return e=this.accumulatedFirstMoment.concat(this.accumulatedSecondMoment),[4,this.saveIterations()];case 1:return[2,[t.sent()].concat(e.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){var t,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),zt((function(){n.accBeta1.assign(gu(n.beta1,n.iterations_+1)),n.accBeta2.assign(gu(n.beta2,n.iterations_+1))})),t=e.length/2,this.accumulatedFirstMoment=e.slice(0,t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.accumulatedSecondMoment=e.slice(t,2*t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},t.fromConfig=function(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon)},t.className="Adam",t}(td);Jf(od);var id=function(e){function t(t,n,r,o,i){void 0===o&&(o=null),void 0===i&&(i=0);var a=e.call(this)||this;return a.learningRate=t,a.beta1=n,a.beta2=r,a.epsilon=o,a.decay=i,a.accumulatedFirstMoment=[],a.accumulatedWeightedInfNorm=[],zt((function(){a.iteration=fn(0).variable(),a.accBeta1=fn(n).variable()})),null==o&&(a.epsilon=je.backend.epsilon()),a}return a(t,e),t.prototype.applyGradients=function(e){var t=this,n=Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e);zt((function(){var r=wu(1,t.accBeta1),o=iu(-t.learningRate,t.iteration.mul(t.decay).add(1));n.forEach((function(n,i){var a=je.registeredVariables[n];null==t.accumulatedFirstMoment[i]&&(t.accumulatedFirstMoment[i]={originalName:n+"/m",variable:xn(a).variable(!1)}),null==t.accumulatedWeightedInfNorm[i]&&(t.accumulatedWeightedInfNorm[i]={originalName:n+"/v",variable:xn(a).variable(!1)});var s=Array.isArray(e)?e[i].tensor:e[n];if(null!=s){var u=t.accumulatedFirstMoment[i].variable,c=t.accumulatedWeightedInfNorm[i].variable,l=u.mul(t.beta1).add(s.mul(1-t.beta1)),f=c.mul(t.beta2),d=s.abs(),p=f.maximum(d);u.assign(l),c.assign(p);var h=o.div(r).mul(l.div(p.add(t.epsilon))).add(a);a.assign(h)}})),t.iteration.assign(t.iteration.add(1)),t.accBeta1.assign(t.accBeta1.mul(t.beta1))})),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.iteration.dispose(),null!=this.accumulatedFirstMoment&&Vt(this.accumulatedFirstMoment.map((function(e){return e.variable}))),null!=this.accumulatedWeightedInfNorm&&Vt(this.accumulatedWeightedInfNorm.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){throw new Error("getWeights() is not implemented for Adamax yet.")}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(e){throw new Error("setWeights() is not implemented for Adamax yet.")}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},t.fromConfig=function(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon,t.decay)},t.className="Adamax",t}(td);Jf(id);var ad=function(e){function t(t){var n=e.call(this)||this;return n.learningRate=t,n.setLearningRate(t),n}return a(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=Array.isArray(e)?e[r].tensor:e[n];if(null!=o){var i=je.registeredVariables[n];zt((function(){var e=t.c.mul(o).add(i);i.assign(e)}))}})),this.incrementIterations()},t.prototype.setLearningRate=function(e){this.learningRate=e,null!=this.c&&this.c.dispose(),this.c=function(e){return je.keep(e)}(fn(-e))},t.prototype.dispose=function(){this.c.dispose()},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()]]}}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.extractIterations(e)];case 1:if(0!==(e=t.sent()).length)throw new Error("SGD optimizer does not have settable weights.");return[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate}},t.fromConfig=function(e,t){return new e(t.learningRate)},t.className="SGD",t}(td);Jf(ad);var sd=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t)||this;return o.learningRate=t,o.momentum=n,o.useNesterov=r,o.accumulations=[],o.m=fn(o.momentum),o}return a(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=je.registeredVariables[n];null==t.accumulations[r]&&(t.accumulations[r]={originalName:n+"/momentum",variable:zt((function(){return xn(o).variable(!1)}))});var i=t.accumulations[r].variable,a=Array.isArray(e)?e[r].tensor:e[n];null!=a&&zt((function(){var e,n=t.m.mul(i).add(a);e=t.useNesterov?t.c.mul(a.add(n.mul(t.m))).add(o):t.c.mul(n).add(o),i.assign(n),o.assign(e)}))})),this.incrementIterations()},t.prototype.dispose=function(){this.m.dispose(),null!=this.accumulations&&Vt(this.accumulations.map((function(e){return e.variable})))},t.prototype.setMomentum=function(e){this.momentum=e},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulations.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.extractIterations(e)];case 1:return e=t.sent(),this.accumulations=e.map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},t.fromConfig=function(e,t){return new e(t.learningRate,t.momentum,t.useNesterov)},t.className="Momentum",t}(ad);Jf(sd);var ud=function(e){function t(t,n,r,o,i){void 0===n&&(n=.9),void 0===r&&(r=0),void 0===o&&(o=null),void 0===i&&(i=!1);var a=e.call(this)||this;if(a.learningRate=t,a.decay=n,a.momentum=r,a.epsilon=o,a.accumulatedMeanSquares=[],a.accumulatedMoments=[],a.accumulatedMeanGrads=[],a.centered=i,null==o&&(a.epsilon=je.backend.epsilon()),null==t)throw new Error("learningRate for RMSPropOptimizer must be defined.");return a}return a(t,e),t.prototype.applyGradients=function(e){var t=this;(Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e)).forEach((function(n,r){var o=je.registeredVariables[n];null==t.accumulatedMeanSquares[r]&&(t.accumulatedMeanSquares[r]={originalName:n+"/rms",variable:zt((function(){return xn(o).variable(!1)}))}),null==t.accumulatedMoments[r]&&(t.accumulatedMoments[r]={originalName:n+"/momentum",variable:zt((function(){return xn(o).variable(!1)}))}),null==t.accumulatedMeanGrads[r]&&t.centered&&(t.accumulatedMeanGrads[r]={originalName:n+"/mg",variable:zt((function(){return xn(o).variable(!1)}))});var i=Array.isArray(e)?e[r].tensor:e[n];if(null!=i){var a=t.accumulatedMeanSquares[r].variable,s=t.accumulatedMoments[r].variable;zt((function(){var e=a.mul(t.decay).add(i.square().mul(1-t.decay));if(t.centered){var n=t.accumulatedMeanGrads[r].variable,u=n.mul(t.decay).add(i.mul(1-t.decay)),c=s.mul(t.momentum).add(i.mul(t.learningRate).div(e.sub(u.square().add(t.epsilon)).sqrt()));a.assign(e),n.assign(u),s.assign(c);var l=o.sub(c);o.assign(l)}else{var f=a.mul(t.decay).add(i.square().mul(1-t.decay));c=s.mul(t.momentum).add(i.mul(t.learningRate).div(f.add(t.epsilon).sqrt())),a.assign(f),s.assign(c),l=o.sub(c),o.assign(l)}}))}})),this.incrementIterations()},t.prototype.dispose=function(){null!=this.accumulatedMeanSquares&&Vt(this.accumulatedMeanSquares.map((function(e){return e.variable}))),null!=this.accumulatedMeanGrads&&this.centered&&Vt(this.accumulatedMeanGrads.map((function(e){return e.variable}))),null!=this.accumulatedMoments&&Vt(this.accumulatedMoments.map((function(e){return e.variable})))},t.prototype.getWeights=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return e=this.accumulatedMeanSquares.concat(this.accumulatedMoments),this.centered&&e.push.apply(e,this.accumulatedMeanGrads),[4,this.saveIterations()];case 1:return[2,[t.sent()].concat(e.map((function(e){return{name:e.originalName,tensor:e.variable}})))]}}))}))},t.prototype.setWeights=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return[4,this.extractIterations(e)];case 1:return e=n.sent(),t=this.centered?e.length/3:e.length/2,this.accumulatedMeanSquares=e.slice(0,t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.accumulatedMoments=e.slice(t,2*t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}})),this.centered&&(this.accumulatedMeanGrads=e.slice(2*t,3*t).map((function(e){return{originalName:e.name,variable:e.tensor.variable(!1)}}))),[2]}}))}))},t.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},t.fromConfig=function(e,t){return new e(t.learningRate,t.decay,t.momentum,t.epsilon,t.centered)},t.className="RMSProp",t}(td);Jf(ud);var cd=function(){function e(){}return e.sgd=function(e){return new ad(e)},e.momentum=function(e,t,n){return void 0===n&&(n=!1),new sd(e,t,n)},e.rmsprop=function(e,t,n,r,o){return void 0===t&&(t=.9),void 0===n&&(n=0),void 0===r&&(r=null),void 0===o&&(o=!1),new ud(e,t,n,r,o)},e.adam=function(e,t,n,r){return void 0===e&&(e=.001),void 0===t&&(t=.9),void 0===n&&(n=.999),void 0===r&&(r=null),new od(e,t,n,r)},e.adadelta=function(e,t,n){return void 0===e&&(e=.001),void 0===t&&(t=.95),void 0===n&&(n=null),new nd(e,t,n)},e.adamax=function(e,t,n,r,o){return void 0===e&&(e=.002),void 0===t&&(t=.9),void 0===n&&(n=.999),void 0===r&&(r=null),void 0===o&&(o=0),new id(e,t,n,r,o)},e.adagrad=function(e,t){return void 0===t&&(t=.1),new rd(e,t)},e}();cd.sgd,cd.momentum,cd.adadelta,cd.adagrad,cd.rmsprop,cd.adamax,cd.adam,"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame;ye.prototype.squaredDifference=function(e){return es(this,e)},me=Fl}).call(this,n(65),n(108),n(511).setImmediate)},function(e,t,n){e.exports=n(185)},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return u}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function u(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(13);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function s(e){r(a,o,i,s,u,"next",e)}function u(e){r(a,o,i,s,u,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(15);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";var r,o,i,a,s,u,c,l,f,d,p;n.d(t,"Sb",(function(){return c})),n.d(t,"Ub",(function(){return f})),n.d(t,"G",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return y})),n.d(t,"g",(function(){return b})),n.d(t,"i",(function(){return w})),n.d(t,"j",(function(){return x})),n.d(t,"m",(function(){return E})),n.d(t,"n",(function(){return C})),n.d(t,"r",(function(){return k})),n.d(t,"s",(function(){return O})),n.d(t,"t",(function(){return S})),n.d(t,"u",(function(){return _})),n.d(t,"v",(function(){return T})),n.d(t,"w",(function(){return I})),n.d(t,"x",(function(){return P})),n.d(t,"y",(function(){return A})),n.d(t,"z",(function(){return R})),n.d(t,"A",(function(){return N})),n.d(t,"B",(function(){return M})),n.d(t,"C",(function(){return j})),n.d(t,"D",(function(){return D})),n.d(t,"E",(function(){return F})),n.d(t,"F",(function(){return L})),n.d(t,"H",(function(){return B})),n.d(t,"ab",(function(){return U})),n.d(t,"bb",(function(){return z})),n.d(t,"cb",(function(){return V})),n.d(t,"db",(function(){return W})),n.d(t,"eb",(function(){return H})),n.d(t,"fb",(function(){return $})),n.d(t,"gb",(function(){return q})),n.d(t,"pb",(function(){return K})),n.d(t,"qb",(function(){return G})),n.d(t,"rb",(function(){return X})),n.d(t,"sb",(function(){return Y})),n.d(t,"tb",(function(){return J})),n.d(t,"ub",(function(){return Q})),n.d(t,"vb",(function(){return Z})),n.d(t,"wb",(function(){return ee})),n.d(t,"xb",(function(){return te})),n.d(t,"yb",(function(){return ne})),n.d(t,"Bb",(function(){return re})),n.d(t,"zb",(function(){return oe})),n.d(t,"Ab",(function(){return ie})),n.d(t,"Cb",(function(){return ae})),n.d(t,"Lb",(function(){return se})),n.d(t,"Mb",(function(){return ue})),n.d(t,"Nb",(function(){return ce})),n.d(t,"Ob",(function(){return le})),n.d(t,"Pb",(function(){return fe})),n.d(t,"Rb",(function(){return de})),n.d(t,"Qb",(function(){return pe})),n.d(t,"Xb",(function(){return he})),n.d(t,"Yb",(function(){return ve})),n.d(t,"Zb",(function(){return me})),n.d(t,"ac",(function(){return ge})),n.d(t,"bc",(function(){return ye})),n.d(t,"cc",(function(){return be})),n.d(t,"dc",(function(){return we})),n.d(t,"ec",(function(){return xe})),n.d(t,"fc",(function(){return Ee})),n.d(t,"gc",(function(){return Ce})),n.d(t,"hc",(function(){return ke})),n.d(t,"a",(function(){return Oe})),n.d(t,"h",(function(){return Se})),n.d(t,"l",(function(){return _e})),n.d(t,"o",(function(){return Te})),n.d(t,"p",(function(){return Ie})),n.d(t,"q",(function(){return Pe})),n.d(t,"I",(function(){return Ae})),n.d(t,"J",(function(){return Re})),n.d(t,"K",(function(){return Ne})),n.d(t,"L",(function(){return Me})),n.d(t,"M",(function(){return je})),n.d(t,"N",(function(){return De})),n.d(t,"O",(function(){return Fe})),n.d(t,"P",(function(){return Le})),n.d(t,"Q",(function(){return Be})),n.d(t,"R",(function(){return Ue})),n.d(t,"S",(function(){return ze})),n.d(t,"T",(function(){return Ve})),n.d(t,"U",(function(){return We})),n.d(t,"k",(function(){return He})),n.d(t,"V",(function(){return $e})),n.d(t,"W",(function(){return qe})),n.d(t,"X",(function(){return Ke})),n.d(t,"Y",(function(){return Ge})),n.d(t,"Z",(function(){return Xe})),n.d(t,"hb",(function(){return Ye})),n.d(t,"ib",(function(){return Je})),n.d(t,"jb",(function(){return Qe})),n.d(t,"kb",(function(){return Ze})),n.d(t,"lb",(function(){return et})),n.d(t,"mb",(function(){return tt})),n.d(t,"ob",(function(){return nt})),n.d(t,"nb",(function(){return rt})),n.d(t,"Db",(function(){return ot})),n.d(t,"Eb",(function(){return it})),n.d(t,"Fb",(function(){return at})),n.d(t,"Gb",(function(){return st})),n.d(t,"Hb",(function(){return ut})),n.d(t,"Ib",(function(){return ct})),n.d(t,"Jb",(function(){return lt})),n.d(t,"Kb",(function(){return ft})),n.d(t,"Tb",(function(){return dt})),n.d(t,"Vb",(function(){return pt})),n.d(t,"Wb",(function(){return ht})),n.d(t,"kc",(function(){return vt})),n.d(t,"ic",(function(){return mt})),n.d(t,"jc",(function(){return gt})),n.d(t,"lc",(function(){return yt})),n.d(t,"mc",(function(){return bt})),n.d(t,"nc",(function(){return wt})),n.d(t,"oc",(function(){return xt})),n.d(t,"pc",(function(){return Et})),function(e){e.Data="DATA",e.Api="API",e.Menu="MENU",e.Ui="UI",e.Button="BUTTON"}(r||(r={})),function(e){e.User="USER",e.Role="ROLE",e.Group="GROUP",e.Org="ORG",e.AkSk="AK_SK"}(o||(o={})),function(e){e.And="AND",e.Or="OR"}(i||(i={})),function(e){e.ResetPassword="RESET_PASSWORD",e.PasswordResetedNotification="PASSWORD_RESETED_NOTIFICATION",e.ChangePassword="CHANGE_PASSWORD",e.Welcome="WELCOME",e.VerifyEmail="VERIFY_EMAIL",e.ChangeEmail="CHANGE_EMAIL"}(a||(a={})),function(e){e.CreatedatDesc="CREATEDAT_DESC",e.CreatedatAsc="CREATEDAT_ASC",e.UpdatedatDesc="UPDATEDAT_DESC",e.UpdatedatAsc="UPDATEDAT_ASC"}(s||(s={})),function(e){e.Suspended="Suspended",e.Resigned="Resigned",e.Activated="Activated",e.Archived="Archived"}(u||(u={})),function(e){e.String="STRING",e.Number="NUMBER",e.Datetime="DATETIME",e.Boolean="BOOLEAN",e.Object="OBJECT",e.Select="SELECT"}(c||(c={})),function(e){e.Allow="ALLOW",e.Deny="DENY"}(l||(l={})),function(e){e.Node="NODE",e.Org="ORG",e.User="USER",e.Userpool="USERPOOL",e.Role="ROLE",e.Permission="PERMISSION",e.Application="APPLICATION"}(f||(f={})),function(e){e.Username="USERNAME",e.Email="EMAIL",e.Phone="PHONE"}(d||(d={})),function(e){e.ResetPassword="RESET_PASSWORD",e.VerifyEmail="VERIFY_EMAIL",e.ChangeEmail="CHANGE_EMAIL",e.MfaVerify="MFA_VERIFY"}(p||(p={}));var h="\n mutation addMember($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $nodeId: String, $orgId: String, $nodeCode: String, $userIds: [String!]!, $isLeader: Boolean) {\n addMember(nodeId: $nodeId, orgId: $orgId, nodeCode: $nodeCode, userIds: $userIds, isLeader: $isLeader) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n username\n status\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",v="\n mutation addNodeV2($orgId: String!, $parentNodeId: String, $name: String!, $nameI18n: String, $description: String, $descriptionI18n: String, $order: Int, $code: String) {\n addNodeV2(orgId: $orgId, parentNodeId: $parentNodeId, name: $name, nameI18n: $nameI18n, description: $description, descriptionI18n: $descriptionI18n, order: $order, code: $code) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",m="\n mutation addPolicyAssignments($policies: [String!]!, $targetType: PolicyAssignmentTargetType!, $targetIdentifiers: [String!], $inheritByChildren: Boolean, $namespace: String) {\n addPolicyAssignments(policies: $policies, targetType: $targetType, targetIdentifiers: $targetIdentifiers, inheritByChildren: $inheritByChildren, namespace: $namespace) {\n message\n code\n }\n}\n ",g="\n mutation addUserToGroup($userIds: [String!]!, $code: String) {\n addUserToGroup(userIds: $userIds, code: $code) {\n message\n code\n }\n}\n ",y="\n mutation addWhitelist($type: WhitelistType!, $list: [String!]!) {\n addWhitelist(type: $type, list: $list) {\n createdAt\n updatedAt\n value\n }\n}\n ",b="\n mutation allow($resource: String!, $action: String!, $userId: String, $userIds: [String!], $roleCode: String, $roleCodes: [String!], $namespace: String) {\n allow(resource: $resource, action: $action, userId: $userId, userIds: $userIds, roleCode: $roleCode, roleCodes: $roleCodes, namespace: $namespace) {\n message\n code\n }\n}\n ",w="\n mutation assignRole($namespace: String, $roleCode: String, $roleCodes: [String], $userIds: [String!], $groupCodes: [String!], $nodeCodes: [String!]) {\n assignRole(namespace: $namespace, roleCode: $roleCode, roleCodes: $roleCodes, userIds: $userIds, groupCodes: $groupCodes, nodeCodes: $nodeCodes) {\n message\n code\n }\n}\n ",x="\n mutation authorizeResource($namespace: String, $resource: String, $resourceType: ResourceType, $opts: [AuthorizeResourceOpt]) {\n authorizeResource(namespace: $namespace, resource: $resource, resourceType: $resourceType, opts: $opts) {\n code\n message\n }\n}\n ",E="\n mutation bindEmail($email: String!, $emailCode: String!) {\n bindEmail(email: $email, emailCode: $emailCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",C="\n mutation bindPhone($phone: String!, $phoneCode: String!) {\n bindPhone(phone: $phone, phoneCode: $phoneCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",k="\n mutation createGroup($code: String!, $name: String!, $description: String) {\n createGroup(code: $code, name: $name, description: $description) {\n code\n name\n description\n createdAt\n updatedAt\n }\n}\n ",O="\n mutation createOrg($name: String!, $code: String, $description: String) {\n createOrg(name: $name, code: $code, description: $description) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",S="\n mutation createPolicy($namespace: String, $code: String!, $description: String, $statements: [PolicyStatementInput!]!) {\n createPolicy(namespace: $namespace, code: $code, description: $description, statements: $statements) {\n namespace\n code\n isDefault\n description\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n createdAt\n updatedAt\n assignmentsCount\n }\n}\n ",_="\n mutation createRole($namespace: String, $code: String!, $description: String, $parent: String) {\n createRole(namespace: $namespace, code: $code, description: $description, parent: $parent) {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n parent {\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",T="\n mutation createUser($userInfo: CreateUserInput!, $params: String, $identity: CreateUserIdentityInput, $keepPassword: Boolean, $resetPasswordOnFirstLogin: Boolean) {\n createUser(userInfo: $userInfo, params: $params, identity: $identity, keepPassword: $keepPassword, resetPasswordOnFirstLogin: $resetPasswordOnFirstLogin) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",I="\n mutation deleteGroups($codeList: [String!]!) {\n deleteGroups(codeList: $codeList) {\n message\n code\n }\n}\n ",P="\n mutation deleteNode($orgId: String!, $nodeId: String!) {\n deleteNode(orgId: $orgId, nodeId: $nodeId) {\n message\n code\n }\n}\n ",A="\n mutation deleteOrg($id: String!) {\n deleteOrg(id: $id) {\n message\n code\n }\n}\n ",R="\n mutation deletePolicies($codeList: [String!]!, $namespace: String) {\n deletePolicies(codeList: $codeList, namespace: $namespace) {\n message\n code\n }\n}\n ",N="\n mutation deletePolicy($code: String!, $namespace: String) {\n deletePolicy(code: $code, namespace: $namespace) {\n message\n code\n }\n}\n ",M="\n mutation deleteRole($code: String!, $namespace: String) {\n deleteRole(code: $code, namespace: $namespace) {\n message\n code\n }\n}\n ",j="\n mutation deleteRoles($codeList: [String!]!, $namespace: String) {\n deleteRoles(codeList: $codeList, namespace: $namespace) {\n message\n code\n }\n}\n ",D="\n mutation deleteUser($id: String!) {\n deleteUser(id: $id) {\n message\n code\n }\n}\n ",F="\n mutation deleteUsers($ids: [String!]!) {\n deleteUsers(ids: $ids) {\n message\n code\n }\n}\n ",L="\n mutation disbalePolicyAssignment($policy: String!, $targetType: PolicyAssignmentTargetType!, $targetIdentifier: String!, $namespace: String) {\n disbalePolicyAssignment(policy: $policy, targetType: $targetType, targetIdentifier: $targetIdentifier, namespace: $namespace) {\n message\n code\n }\n}\n ",B="\n mutation enablePolicyAssignment($policy: String!, $targetType: PolicyAssignmentTargetType!, $targetIdentifier: String!, $namespace: String) {\n enablePolicyAssignment(policy: $policy, targetType: $targetType, targetIdentifier: $targetIdentifier, namespace: $namespace) {\n message\n code\n }\n}\n ",U="\n mutation loginByEmail($input: LoginByEmailInput!) {\n loginByEmail(input: $input) {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",z="\n mutation loginByPhoneCode($input: LoginByPhoneCodeInput!) {\n loginByPhoneCode(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",V="\n mutation loginByPhonePassword($input: LoginByPhonePasswordInput!) {\n loginByPhonePassword(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",W="\n mutation loginBySubAccount($account: String!, $password: String!, $captchaCode: String, $clientIp: String) {\n loginBySubAccount(account: $account, password: $password, captchaCode: $captchaCode, clientIp: $clientIp) {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",H="\n mutation loginByUsername($input: LoginByUsernameInput!) {\n loginByUsername(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",$="\n mutation moveMembers($userIds: [String!]!, $sourceNodeId: String!, $targetNodeId: String!) {\n moveMembers(userIds: $userIds, sourceNodeId: $sourceNodeId, targetNodeId: $targetNodeId) {\n code\n message\n }\n}\n ",q="\n mutation moveNode($orgId: String!, $nodeId: String!, $targetParentId: String!) {\n moveNode(orgId: $orgId, nodeId: $nodeId, targetParentId: $targetParentId) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",K="\n mutation refreshToken($id: String) {\n refreshToken(id: $id) {\n token\n iat\n exp\n }\n}\n ",G="\n mutation registerByEmail($input: RegisterByEmailInput!) {\n registerByEmail(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",X="\n mutation registerByPhoneCode($input: RegisterByPhoneCodeInput!) {\n registerByPhoneCode(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",Y="\n mutation registerByUsername($input: RegisterByUsernameInput!) {\n registerByUsername(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",J="\n mutation removeMember($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $nodeId: String, $orgId: String, $nodeCode: String, $userIds: [String!]!) {\n removeMember(nodeId: $nodeId, orgId: $orgId, nodeCode: $nodeCode, userIds: $userIds) {\n id\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n }\n }\n}\n ",Q="\n mutation removePolicyAssignments($policies: [String!]!, $targetType: PolicyAssignmentTargetType!, $targetIdentifiers: [String!], $namespace: String) {\n removePolicyAssignments(policies: $policies, targetType: $targetType, targetIdentifiers: $targetIdentifiers, namespace: $namespace) {\n message\n code\n }\n}\n ",Z="\n mutation removeUdf($targetType: UDFTargetType!, $key: String!) {\n removeUdf(targetType: $targetType, key: $key) {\n message\n code\n }\n}\n ",ee="\n mutation removeUdv($targetType: UDFTargetType!, $targetId: String!, $key: String!) {\n removeUdv(targetType: $targetType, targetId: $targetId, key: $key) {\n key\n dataType\n value\n label\n }\n}\n ",te="\n mutation removeUserFromGroup($userIds: [String!]!, $code: String) {\n removeUserFromGroup(userIds: $userIds, code: $code) {\n message\n code\n }\n}\n ",ne="\n mutation removeWhitelist($type: WhitelistType!, $list: [String!]!) {\n removeWhitelist(type: $type, list: $list) {\n createdAt\n updatedAt\n value\n }\n}\n ",re="\n mutation resetPassword($phone: String, $email: String, $code: String!, $newPassword: String!) {\n resetPassword(phone: $phone, email: $email, code: $code, newPassword: $newPassword) {\n message\n code\n }\n}\n ",oe="\n mutation resetPasswordByFirstLoginToken($token: String!, $password: String!) {\n resetPasswordByFirstLoginToken(token: $token, password: $password) {\n message\n code\n }\n}\n ",ie="\n mutation resetPasswordByForceResetToken($token: String!, $oldPassword: String!, $newPassword: String!) {\n resetPasswordByForceResetToken(token: $token, oldPassword: $oldPassword, newPassword: $newPassword) {\n message\n code\n }\n}\n ",ae="\n mutation revokeRole($namespace: String, $roleCode: String, $roleCodes: [String], $userIds: [String!], $groupCodes: [String!], $nodeCodes: [String!]) {\n revokeRole(namespace: $namespace, roleCode: $roleCode, roleCodes: $roleCodes, userIds: $userIds, groupCodes: $groupCodes, nodeCodes: $nodeCodes) {\n message\n code\n }\n}\n ",se="\n mutation sendEmail($email: String!, $scene: EmailScene!) {\n sendEmail(email: $email, scene: $scene) {\n message\n code\n }\n}\n ",ue="\n mutation sendFirstLoginVerifyEmail($userId: String!, $appId: String!) {\n sendFirstLoginVerifyEmail(userId: $userId, appId: $appId) {\n message\n code\n }\n}\n ",ce="\n mutation setMainDepartment($userId: String!, $departmentId: String) {\n setMainDepartment(userId: $userId, departmentId: $departmentId) {\n message\n code\n }\n}\n ",le="\n mutation setUdf($targetType: UDFTargetType!, $key: String!, $dataType: UDFDataType!, $label: String!, $options: String) {\n setUdf(targetType: $targetType, key: $key, dataType: $dataType, label: $label, options: $options) {\n targetType\n dataType\n key\n label\n options\n }\n}\n ",fe="\n mutation setUdfValueBatch($targetType: UDFTargetType!, $input: [SetUdfValueBatchInput!]!) {\n setUdfValueBatch(targetType: $targetType, input: $input) {\n code\n message\n }\n}\n ",de="\n mutation setUdv($targetType: UDFTargetType!, $targetId: String!, $key: String!, $value: String!) {\n setUdv(targetType: $targetType, targetId: $targetId, key: $key, value: $value) {\n key\n dataType\n value\n label\n }\n}\n ",pe="\n mutation setUdvBatch($targetType: UDFTargetType!, $targetId: String!, $udvList: [UserDefinedDataInput!]) {\n setUdvBatch(targetType: $targetType, targetId: $targetId, udvList: $udvList) {\n key\n dataType\n value\n label\n }\n}\n ",he="\n mutation unbindEmail {\n unbindEmail {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",ve="\n mutation unbindPhone {\n unbindPhone {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",me="\n mutation updateEmail($email: String!, $emailCode: String!, $oldEmail: String, $oldEmailCode: String) {\n updateEmail(email: $email, emailCode: $emailCode, oldEmail: $oldEmail, oldEmailCode: $oldEmailCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",ge="\n mutation updateGroup($code: String!, $name: String, $description: String, $newCode: String) {\n updateGroup(code: $code, name: $name, description: $description, newCode: $newCode) {\n code\n name\n description\n createdAt\n updatedAt\n }\n}\n ",ye="\n mutation updateNode($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $id: String!, $name: String, $code: String, $description: String) {\n updateNode(id: $id, name: $name, code: $code, description: $description) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n }\n }\n}\n ",be="\n mutation updatePassword($newPassword: String!, $oldPassword: String) {\n updatePassword(newPassword: $newPassword, oldPassword: $oldPassword) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",we="\n mutation updatePhone($phone: String!, $phoneCode: String!, $oldPhone: String, $oldPhoneCode: String) {\n updatePhone(phone: $phone, phoneCode: $phoneCode, oldPhone: $oldPhone, oldPhoneCode: $oldPhoneCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",xe="\n mutation updatePolicy($namespace: String, $code: String!, $description: String, $statements: [PolicyStatementInput!], $newCode: String) {\n updatePolicy(namespace: $namespace, code: $code, description: $description, statements: $statements, newCode: $newCode) {\n namespace\n code\n description\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n createdAt\n updatedAt\n }\n}\n ",Ee="\n mutation updateRole($code: String!, $description: String, $newCode: String, $namespace: String) {\n updateRole(code: $code, description: $description, newCode: $newCode, namespace: $namespace) {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n parent {\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",Ce="\n mutation updateUser($id: String, $input: UpdateUserInput!) {\n updateUser(id: $id, input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",ke="\n mutation updateUserpool($input: UpdateUserpoolInput!) {\n updateUserpool(input: $input) {\n id\n name\n domain\n description\n secret\n jwtSecret\n userpoolTypes {\n code\n name\n description\n image\n sdks\n }\n logo\n createdAt\n updatedAt\n emailVerifiedDefault\n sendWelcomeEmail\n registerDisabled\n appSsoEnabled\n showWxQRCodeWhenRegisterDisabled\n allowedOrigins\n tokenExpiresAfter\n isDeleted\n frequentRegisterCheck {\n timeInterval\n limit\n enabled\n }\n loginFailCheck {\n timeInterval\n limit\n enabled\n }\n loginFailStrategy\n loginPasswordFailCheck {\n timeInterval\n limit\n enabled\n }\n changePhoneStrategy {\n verifyOldPhone\n }\n changeEmailStrategy {\n verifyOldEmail\n }\n qrcodeLoginStrategy {\n qrcodeExpiresAfter\n returnFullUserInfo\n allowExchangeUserInfoFromBrowser\n ticketExpiresAfter\n }\n app2WxappLoginStrategy {\n ticketExpriresAfter\n ticketExchangeUserInfoNeedSecret\n }\n whitelist {\n phoneEnabled\n emailEnabled\n usernameEnabled\n }\n customSMSProvider {\n enabled\n provider\n config\n }\n packageType\n useCustomUserStore\n loginRequireEmailVerified\n verifyCodeLength\n }\n}\n ",Oe="\n query accessToken($userPoolId: String!, $secret: String!) {\n accessToken(userPoolId: $userPoolId, secret: $secret) {\n accessToken\n exp\n iat\n }\n}\n ",Se="\n query archivedUsers($page: Int, $limit: Int) {\n archivedUsers(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n}\n ",_e="\n query authorizedTargets($namespace: String!, $resourceType: ResourceType!, $resource: String!, $targetType: PolicyAssignmentTargetType, $actions: AuthorizedTargetsActionsInput) {\n authorizedTargets(namespace: $namespace, resource: $resource, resourceType: $resourceType, targetType: $targetType, actions: $actions) {\n totalCount\n list {\n targetType\n targetIdentifier\n actions\n }\n }\n}\n ",Te="\n query checkLoginStatus($token: String) {\n checkLoginStatus(token: $token) {\n code\n message\n status\n exp\n iat\n data {\n id\n userPoolId\n arn\n }\n }\n}\n ",Ie="\n query checkPasswordStrength($password: String!) {\n checkPasswordStrength(password: $password) {\n valid\n message\n }\n}\n ",Pe="\n query childrenNodes($nodeId: String!) {\n childrenNodes(nodeId: $nodeId) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",Ae="\n query findUser($email: String, $phone: String, $username: String, $externalId: String, $identity: FindUserByIdentityInput) {\n findUser(email: $email, phone: $phone, username: $username, externalId: $externalId, identity: $identity) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",Re="\n query findUserWithCustomData($email: String, $phone: String, $username: String, $externalId: String) {\n findUser(email: $email, phone: $phone, username: $username, externalId: $externalId) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",Ne="\n query getUserDepartments($id: String!, $orgId: String) {\n user(id: $id) {\n departments(orgId: $orgId) {\n totalCount\n list {\n department {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n }\n isMainDepartment\n joinedAt\n }\n }\n }\n}\n ",Me="\n query getUserGroups($id: String!) {\n user(id: $id) {\n groups {\n totalCount\n list {\n code\n name\n description\n createdAt\n updatedAt\n }\n }\n }\n}\n ",je="\n query getUserRoles($id: String!, $namespace: String) {\n user(id: $id) {\n roles(namespace: $namespace) {\n totalCount\n list {\n id\n code\n namespace\n arn\n description\n createdAt\n updatedAt\n parent {\n code\n namespace\n arn\n description\n createdAt\n updatedAt\n }\n }\n }\n }\n}\n ",De="\n query group($code: String!) {\n group(code: $code) {\n code\n name\n description\n createdAt\n updatedAt\n }\n}\n ",Fe="\n query groupWithUsers($code: String!, $page: Int, $limit: Int) {\n group(code: $code) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",Le="\n query groupWithUsersWithCustomData($code: String!, $page: Int, $limit: Int) {\n group(code: $code) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n }\n}\n ",Be="\n query groups($userId: String, $page: Int, $limit: Int, $sortBy: SortByEnum) {\n groups(userId: $userId, page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n code\n name\n description\n createdAt\n updatedAt\n }\n }\n}\n ",Ue="\n query isActionAllowed($resource: String!, $action: String!, $userId: String!, $namespace: String) {\n isActionAllowed(resource: $resource, action: $action, userId: $userId, namespace: $namespace)\n}\n ",ze="\n query isActionDenied($resource: String!, $action: String!, $userId: String!) {\n isActionDenied(resource: $resource, action: $action, userId: $userId)\n}\n ",Ve="\n query isRootNode($nodeId: String!, $orgId: String!) {\n isRootNode(nodeId: $nodeId, orgId: $orgId)\n}\n ",We="\n query isUserExists($email: String, $phone: String, $username: String, $externalId: String) {\n isUserExists(email: $email, phone: $phone, username: $username, externalId: $externalId)\n}\n ",He="\n query authorizedResources($targetType: PolicyAssignmentTargetType, $targetIdentifier: String, $namespace: String, $resourceType: String) {\n authorizedResources(targetType: $targetType, targetIdentifier: $targetIdentifier, namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n}\n ",$e="\n query listGroupAuthorizedResources($code: String!, $namespace: String, $resourceType: String) {\n group(code: $code) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n }\n}\n ",qe="\n query listNodeByCodeAuthorizedResources($orgId: String!, $code: String!, $namespace: String, $resourceType: String) {\n nodeByCode(orgId: $orgId, code: $code) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n }\n}\n ",Ke="\n query listNodeByIdAuthorizedResources($id: String!, $namespace: String, $resourceType: String) {\n nodeById(id: $id) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n }\n}\n ",Ge="\n query listRoleAuthorizedResources($code: String!, $namespace: String, $resourceType: String) {\n role(code: $code, namespace: $namespace) {\n authorizedResources(resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n }\n}\n ",Xe="\n query listUserAuthorizedResources($id: String!, $namespace: String, $resourceType: String) {\n user(id: $id) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n apiIdentifier\n }\n }\n }\n}\n ",Ye="\n query nodeByCodeWithMembers($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $orgId: String!, $code: String!) {\n nodeByCode(orgId: $orgId, code: $code) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",Je="\n query nodeById($id: String!) {\n nodeById(id: $id) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",Qe="\n query nodeByIdWithMembers($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $id: String!) {\n nodeById(id: $id) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",Ze="\n query org($id: String!) {\n org(id: $id) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",et="\n query orgs($page: Int, $limit: Int, $sortBy: SortByEnum) {\n orgs(page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n rootNode {\n id\n name\n nameI18n\n path\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n name\n path\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n }\n }\n }\n}\n ",tt="\n query policies($page: Int, $limit: Int, $namespace: String) {\n policies(page: $page, limit: $limit, namespace: $namespace) {\n totalCount\n list {\n namespace\n code\n description\n createdAt\n updatedAt\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n }\n }\n}\n ",nt="\n query policy($namespace: String, $code: String!) {\n policy(code: $code, namespace: $namespace) {\n namespace\n code\n isDefault\n description\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n createdAt\n updatedAt\n }\n}\n ",rt="\n query policyAssignments($namespace: String, $code: String, $targetType: PolicyAssignmentTargetType, $targetIdentifier: String, $page: Int, $limit: Int) {\n policyAssignments(namespace: $namespace, code: $code, targetType: $targetType, targetIdentifier: $targetIdentifier, page: $page, limit: $limit) {\n totalCount\n list {\n code\n targetType\n targetIdentifier\n }\n }\n}\n ",ot="\n query role($code: String!, $namespace: String) {\n role(code: $code, namespace: $namespace) {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n parent {\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",it="\n query roleWithUsers($code: String!, $namespace: String, $page: Int, $limit: Int) {\n role(code: $code, namespace: $namespace) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",at="\n query roleWithUsersWithCustomData($code: String!, $namespace: String, $page: Int, $limit: Int) {\n role(code: $code, namespace: $namespace) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n }\n}\n ",st="\n query roles($namespace: String, $page: Int, $limit: Int, $sortBy: SortByEnum) {\n roles(namespace: $namespace, page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",ut="\n query rootNode($orgId: String!) {\n rootNode(orgId: $orgId) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n }\n}\n ",ct="\n query searchNodes($keyword: String!) {\n searchNodes(keyword: $keyword) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n }\n}\n ",lt="\n query searchUser($query: String!, $fields: [String], $page: Int, $limit: Int, $departmentOpts: [SearchUserDepartmentOpt], $groupOpts: [SearchUserGroupOpt], $roleOpts: [SearchUserRoleOpt]) {\n searchUser(query: $query, fields: $fields, page: $page, limit: $limit, departmentOpts: $departmentOpts, groupOpts: $groupOpts, roleOpts: $roleOpts) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n}\n ",ft="\n query searchUserWithCustomData($query: String!, $fields: [String], $page: Int, $limit: Int, $departmentOpts: [SearchUserDepartmentOpt], $groupOpts: [SearchUserGroupOpt], $roleOpts: [SearchUserRoleOpt]) {\n searchUser(query: $query, fields: $fields, page: $page, limit: $limit, departmentOpts: $departmentOpts, groupOpts: $groupOpts, roleOpts: $roleOpts) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n}\n ",dt="\n query udf($targetType: UDFTargetType!) {\n udf(targetType: $targetType) {\n targetType\n dataType\n key\n label\n options\n }\n}\n ",pt="\n query udfValueBatch($targetType: UDFTargetType!, $targetIds: [String!]!) {\n udfValueBatch(targetType: $targetType, targetIds: $targetIds) {\n targetId\n data {\n key\n dataType\n value\n label\n }\n }\n}\n ",ht="\n query udv($targetType: UDFTargetType!, $targetId: String!) {\n udv(targetType: $targetType, targetId: $targetId) {\n key\n dataType\n value\n label\n }\n}\n ",vt="\n query user($id: String) {\n user(id: $id) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n type\n userPoolId\n }\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",mt="\n query userBatch($ids: [String!]!, $type: String) {\n userBatch(ids: $ids, type: $type) {\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n type\n userPoolId\n }\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",gt="\n query userBatchWithCustomData($ids: [String!]!, $type: String) {\n userBatch(ids: $ids, type: $type) {\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n type\n userPoolId\n }\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",yt="\n query userWithCustomData($id: String) {\n user(id: $id) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n userPoolId\n }\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",bt="\n query userpool {\n userpool {\n id\n name\n domain\n description\n secret\n jwtSecret\n ownerId\n userpoolTypes {\n code\n name\n description\n image\n sdks\n }\n logo\n createdAt\n updatedAt\n emailVerifiedDefault\n sendWelcomeEmail\n registerDisabled\n appSsoEnabled\n showWxQRCodeWhenRegisterDisabled\n allowedOrigins\n tokenExpiresAfter\n isDeleted\n frequentRegisterCheck {\n timeInterval\n limit\n enabled\n }\n loginFailCheck {\n timeInterval\n limit\n enabled\n }\n loginPasswordFailCheck {\n timeInterval\n limit\n enabled\n }\n loginFailStrategy\n changePhoneStrategy {\n verifyOldPhone\n }\n changeEmailStrategy {\n verifyOldEmail\n }\n qrcodeLoginStrategy {\n qrcodeExpiresAfter\n returnFullUserInfo\n allowExchangeUserInfoFromBrowser\n ticketExpiresAfter\n }\n app2WxappLoginStrategy {\n ticketExpriresAfter\n ticketExchangeUserInfoNeedSecret\n }\n whitelist {\n phoneEnabled\n emailEnabled\n usernameEnabled\n }\n customSMSProvider {\n enabled\n provider\n config\n }\n packageType\n useCustomUserStore\n loginRequireEmailVerified\n verifyCodeLength\n }\n}\n ",wt="\n query users($page: Int, $limit: Int, $sortBy: SortByEnum, $excludeUsersInOrg: Boolean) {\n users(page: $page, limit: $limit, sortBy: $sortBy, excludeUsersInOrg: $excludeUsersInOrg) {\n totalCount\n list {\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n type\n userPoolId\n }\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n}\n ",xt="\n query usersWithCustomData($page: Int, $limit: Int, $sortBy: SortByEnum, $excludeUsersInOrg: Boolean) {\n users(page: $page, limit: $limit, sortBy: $sortBy, excludeUsersInOrg: $excludeUsersInOrg) {\n totalCount\n list {\n id\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n type\n userPoolId\n }\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n}\n ",Et="\n query whitelist($type: WhitelistType!) {\n whitelist(type: $type) {\n createdAt\n updatedAt\n value\n }\n}\n "},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(100);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(143);var o=n(102),i=n(144);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Object(o.a)(e,t)||Object(i.a)()}},function(e,t,n){var r=n(57);function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(390)),a=r(n(145)),s=r(n(240)),u=r(n(473)),c=n(78),l=r(n(49)),f=i.default;f.Item=a.default,f.List=u.default,f.ErrorList=s.default,f.useForm=i.useForm,f.Provider=c.FormProvider,f.create=function(){(0,l.default)(!1,"Form","antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.")};var d=f;t.default=d},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(120);var o=n(142),i=n(102);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},,function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.getKeyThenIncreaseKey=function(){return x++},t.attachTypeApi=I,t.default=t.getInstance=void 0;var i,a,s,u,c=o(n(18)),l=o(n(25)),f=r(n(0)),d=o(n(10)),p=o(n(261)),h=o(n(110)),v=o(n(212)),m=o(n(111)),g=o(n(164)),y=o(n(361)),b=o(n(364)),w=3,x=1,E="ant-message",C="move-up",k=!1;function O(e,t){var n=e.prefixCls||E;i?t({prefixCls:n,instance:i}):p.default.newInstance({prefixCls:n,transitionName:C,style:{top:a},getContainer:s,maxCount:u},(function(e){i?t({prefixCls:n,instance:i}):(i=e,t({prefixCls:n,instance:e}))}))}var S={info:y.default,success:g.default,error:m.default,warning:v.default,loading:h.default};function _(e,t){var n,r=void 0!==e.duration?e.duration:w,o=S[e.type],i=(0,d.default)("".concat(t,"-custom-content"),(n={},(0,l.default)(n,"".concat(t,"-").concat(e.type),e.type),(0,l.default)(n,"".concat(t,"-rtl"),!0===k),n));return{key:e.key,duration:r,style:e.style||{},className:e.className,content:f.createElement("div",{className:i},e.icon||o&&f.createElement(o,null),f.createElement("span",null,e.content)),onClose:e.onClose}}var T={open:function(e){var t=e.key||x++,n=new Promise((function(n){var r=function(){return"function"===typeof e.onClose&&e.onClose(),n(!0)};O(e,(function(n){var o=n.prefixCls;n.instance.notice(_((0,c.default)((0,c.default)({},e),{key:t,onClose:r}),o))}))})),r=function(){i&&i.removeNotice(t)};return r.then=function(e,t){return n.then(e,t)},r.promise=n,r},config:function(e){void 0!==e.top&&(a=e.top,i=null),void 0!==e.duration&&(w=e.duration),void 0!==e.prefixCls&&(E=e.prefixCls),void 0!==e.getContainer&&(s=e.getContainer),void 0!==e.transitionName&&(C=e.transitionName,i=null),void 0!==e.maxCount&&(u=e.maxCount,i=null),void 0!==e.rtl&&(k=e.rtl)},destroy:function(e){if(i)if(e){(0,i.removeNotice)(e)}else{var t=i.destroy;t(),i=null}}};function I(e,t){e[t]=function(n,r,o){return function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!!e.content}(n)?e.open((0,c.default)((0,c.default)({},n),{type:t})):("function"===typeof r&&(o=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:o}))}}["success","info","warning","error","loading"].forEach((function(e){return I(T,e)})),T.warn=T.warning,T.useMessage=(0,b.default)(O,_);t.getInstance=function(){return null};var P=T;t.default=P},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},,function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ConfigConsumer",{enumerable:!0,get:function(){return l.ConfigConsumer}}),Object.defineProperty(t,"ConfigContext",{enumerable:!0,get:function(){return l.ConfigContext}}),t.default=t.configConsumerProps=void 0;var i=o(n(18)),a=r(n(0)),s=n(98),u=r(n(337)),c=o(n(88)),l=n(346),f=n(89),d=o(n(20)),p=o(n(369));t.configConsumerProps=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"];var h=function(e){a.useEffect((function(){e.direction&&(d.default.config({rtl:"rtl"===e.direction}),p.default.config({rtl:"rtl"===e.direction}))}),[e.direction]);var t=function(t){return function(n,r){var o=e.prefixCls;if(r)return r;var i=o||t.getPrefixCls("");return n?"".concat(i,"-").concat(n):i}};return a.createElement(c.default,null,(function(n,r,o){return a.createElement(l.ConfigConsumer,null,(function(n){return function(n,r){var o=e.children,c=e.getTargetContainer,d=e.getPopupContainer,p=e.renderEmpty,h=e.csp,v=e.autoInsertSpaceInButton,m=e.form,g=e.input,y=e.locale,b=e.pageHeader,w=e.componentSize,x=e.direction,E=e.space,C=e.virtual,k=e.dropdownMatchSelectWidth,O=(0,i.default)((0,i.default)({},n),{getPrefixCls:t(n),csp:h,autoInsertSpaceInButton:v,locale:y||r,direction:x,space:E,virtual:C,dropdownMatchSelectWidth:k});c&&(O.getTargetContainer=c),d&&(O.getPopupContainer=d),p&&(O.renderEmpty=p),b&&(O.pageHeader=b),g&&(O.input=g),m&&(O.form=m);var S=o,_={};y&&y.Form&&y.Form.defaultValidateMessages&&(_=y.Form.defaultValidateMessages),m&&m.validateMessages&&(_=(0,i.default)((0,i.default)({},_),m.validateMessages)),Object.keys(_).length>0&&(S=a.createElement(s.FormProvider,{validateMessages:_},o));var T=void 0===y?S:a.createElement(u.default,{locale:y||r,_ANT_MARK__:u.ANT_MARK},S);return a.createElement(f.SizeContextProvider,{size:w},a.createElement(l.ConfigContext.Provider,{value:O},T))}(n,o)}))}))};h.ConfigContext=l.ConfigContext;var v=h;t.default=v},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(116)),i=r(n(474)),a=r(n(475)),s=r(n(243)),u=r(n(479));o.default.Group=i.default,o.default.Search=a.default,o.default.TextArea=s.default,o.default.Password=u.default;var c=o.default;t.default=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(119);var o=n(100);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s}));var r={};function o(e,t){0}function i(e,t){0}function a(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function s(e,t){a(i,e,t)}t.a=function(e,t){a(o,e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(e){return+setTimeout(e,16)},o=function(e){return clearTimeout(e)};function i(e){return r(e)}"undefined"!==typeof window&&"requestAnimationFrame"in window&&(r=function(e){return window.requestAnimationFrame(e)},o=function(e){return window.cancelAnimationFrame(e)}),i.cancel=o},function(e,t,n){(function(t){e.exports=function(){var e=e||function(e,r){var o;if("undefined"!==typeof window&&window.crypto&&(o=window.crypto),!o&&"undefined"!==typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&"undefined"!==typeof t&&t.crypto&&(o=t.crypto),!o)try{o=n(127)}catch(g){}var i=function(){if(o){if("function"===typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},u=s.lib={},c=u.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=u.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=r?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),f=s.enc={},d=f.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},p=f.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},h=f.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},v=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*u,i);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(o,f);n=o.splice(0,u),r.sigBytes-=c}return new l.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),m=(u.Hasher=v.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new m.HMAC.init(e,n).finalize(t)}}}),s.algo={});return s}(Math);return e}()}).call(this,n(65))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(63);var o=n(79);function i(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Object(r.a)(e);if(t){var a=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return Object(o.a)(this,n)}}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(332),o=n(333),i=n(204),a=n(334);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(39)),a=o(n(25)),s=o(n(209)),u=r(n(0)),c=o(n(10)),l=o(n(210)),f=n(354),d=n(163);(0,f.setTwoToneColor)("#1890ff");var p=u.forwardRef((function(e,t){var n=e.className,r=e.icon,o=e.spin,f=e.rotate,p=e.tabIndex,h=e.onClick,v=e.twoToneColor,m=(0,s.default)(e,["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"]),g=(0,c.default)("anticon",(0,a.default)({},"anticon-".concat(r.name),Boolean(r.name)),{"anticon-spin":!!o||"loading"===r.name},n),y=p;void 0===y&&h&&(y=-1);var b=f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0,w=(0,d.normalizeTwoToneColors)(v),x=(0,i.default)(w,2),E=x[0],C=x[1];return u.createElement("span",Object.assign({role:"img","aria-label":r.name},m,{ref:t,tabIndex:y,onClick:h,className:g}),u.createElement(l.default,{icon:r,primaryColor:E,secondaryColor:C,style:b}))}));p.displayName="AntdIcon",p.getTwoToneColor=f.getTwoToneColor,p.setTwoToneColor=f.setTwoToneColor;var h=p;t.default=h},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(276)},,function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.r(t),n.d(t,"CSSMotionList",(function(){return ne}));var r=n(13),o=n(4),i=n(11),a=n(37),s=n(0),u=n(80),c=n(62),l=n(10),f=n.n(l),d=n(73);function p(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var h=function(e,t){var n={animationend:p("Animation","AnimationEnd"),transitionend:p("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(Object(d.a)(),"undefined"!==typeof window?window:{}),v={};if(Object(d.a)()){var m=document.createElement("div");v=m.style}var g={};function y(e){if(g[e])return g[e];var t=h[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in v)return g[e]=t[i],g[e]}return""}var b=y("animationend"),w=y("transitionend"),x=!(!b||!w),E=b||"animationend",C=w||"transitionend";function k(e,t){return e?"object"===Object(a.a)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}var O="none",S="appear",_="enter",T="leave",I="none",P="prepare",A="start",R="active",N="end";function M(e){var t=Object(s.useRef)(!1),n=Object(s.useState)(e),r=Object(i.a)(n,2),o=r[0],a=r[1];return Object(s.useEffect)((function(){return function(){t.current=!0}}),[]),[o,function(e){t.current||a(e)}]}var j=Object(d.a)()?s.useLayoutEffect:s.useEffect,D=n(34),F=[P,A,R,N];function L(e){return e===R||e===N}var B=function(e,t){var n=s.useState(I),r=Object(i.a)(n,2),o=r[0],a=r[1],u=function(){var e=s.useRef(null);function t(){D.a.cancel(e.current)}return s.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=Object(D.a)((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),c=Object(i.a)(u,2),l=c[0],f=c[1];return j((function(){if(o!==I&&o!==N){var e=F.indexOf(o),n=F[e+1],r=t(o);false===r?a(n):l((function(e){function t(){e.isCanceled()||a(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,o]),s.useEffect((function(){return function(){f()}}),[]),[function(){a(P)},o]};function U(e,t,n,a){var u=a.motionEnter,c=void 0===u||u,l=a.motionAppear,f=void 0===l||l,d=a.motionLeave,p=void 0===d||d,h=a.motionDeadline,v=a.motionLeaveImmediately,m=a.onAppearPrepare,g=a.onEnterPrepare,y=a.onLeavePrepare,b=a.onAppearStart,w=a.onEnterStart,x=a.onLeaveStart,k=a.onAppearActive,I=a.onEnterActive,N=a.onLeaveActive,D=a.onAppearEnd,F=a.onEnterEnd,U=a.onLeaveEnd,z=a.onVisibleChanged,V=M(),W=Object(i.a)(V,2),H=W[0],$=W[1],q=M(O),K=Object(i.a)(q,2),G=K[0],X=K[1],Y=M(null),J=Object(i.a)(Y,2),Q=J[0],Z=J[1],ee=Object(s.useRef)(!1),te=Object(s.useRef)(null),ne=Object(s.useRef)(!1),re=Object(s.useRef)(null);function oe(){return n()||re.current}var ie=Object(s.useRef)(!1);function ae(e){var t,n=oe();e&&!e.deadline&&e.target!==n||(G===S&&ie.current?t=null===D||void 0===D?void 0:D(n,e):G===_&&ie.current?t=null===F||void 0===F?void 0:F(n,e):G===T&&ie.current&&(t=null===U||void 0===U?void 0:U(n,e)),!1===t||ne.current||(X(O),Z(null)))}var se=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function o(e){e&&(e.removeEventListener(C,r),e.removeEventListener(E,r))}return s.useEffect((function(){return function(){o(t.current)}}),[]),[function(e){t.current&&t.current!==e&&o(t.current),e&&e!==t.current&&(e.addEventListener(C,r),e.addEventListener(E,r),t.current=e)},o]}(ae),ue=Object(i.a)(se,1)[0],ce=s.useMemo((function(){var e,t,n;switch(G){case"appear":return e={},Object(r.a)(e,P,m),Object(r.a)(e,A,b),Object(r.a)(e,R,k),e;case"enter":return t={},Object(r.a)(t,P,g),Object(r.a)(t,A,w),Object(r.a)(t,R,I),t;case"leave":return n={},Object(r.a)(n,P,y),Object(r.a)(n,A,x),Object(r.a)(n,R,N),n;default:return{}}}),[G]),le=B(G,(function(e){if(e===P){var t=ce.prepare;return!!t&&t(oe())}var n;pe in ce&&Z((null===(n=ce[pe])||void 0===n?void 0:n.call(ce,oe(),null))||null);return pe===R&&(ue(oe()),h>0&&(clearTimeout(te.current),te.current=setTimeout((function(){ae({deadline:!0})}),h))),true})),fe=Object(i.a)(le,2),de=fe[0],pe=fe[1],he=L(pe);ie.current=he,j((function(){if($(t),e){var n,r=ee.current;ee.current=!0,!r&&t&&f&&(n=S),r&&t&&c&&(n=_),(r&&!t&&p||!r&&v&&!t&&p)&&(n=T),n&&(X(n),de())}}),[t]),Object(s.useEffect)((function(){(G===S&&!f||G===_&&!c||G===T&&!p)&&X(O)}),[f,c,p]),Object(s.useEffect)((function(){return function(){clearTimeout(te.current),ne.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==H&&G===O&&(null===z||void 0===z||z(H))}),[H,G]);var ve=Q;return ce.prepare&&pe===A&&(ve=Object(o.a)({transition:"none"},ve)),[G,pe,ve,null!==H&&void 0!==H?H:t]}var z=n(23),V=n(26),W=n(30),H=n(36),$=function(e){Object(W.a)(n,e);var t=Object(H.a)(n);function n(){return Object(z.a)(this,n),t.apply(this,arguments)}return Object(V.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var q=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(a.a)(e)&&(t=e.transitionSupport);var l=s.forwardRef((function(e,t){var a=e.visible,l=void 0===a||a,d=e.removeOnLeave,p=void 0===d||d,h=e.forceRender,v=e.children,m=e.motionName,g=e.leavedClassName,y=e.eventProps,b=n(e),w=Object(s.useRef)(),x=Object(s.useRef)();var E=U(b,l,(function(){try{return Object(u.a)(w.current||x.current)}catch(e){return null}}),e),C=Object(i.a)(E,4),S=C[0],_=C[1],T=C[2],I=C[3],R=Object(s.useRef)(t);R.current=t;var N,M=s.useCallback((function(e){w.current=e,Object(c.b)(R.current,e)}),[]),j=Object(o.a)(Object(o.a)({},y),{},{visible:l});if(v)if(S!==O&&n(e)){var D,F;_===P?F="prepare":L(_)?F="active":_===A&&(F="start"),N=v(Object(o.a)(Object(o.a)({},j),{},{className:f()(k(m,S),(D={},Object(r.a)(D,k(m,"".concat(S,"-").concat(F)),F),Object(r.a)(D,m,"string"===typeof m),D)),style:T}),M)}else N=I?v(Object(o.a)({},j),M):p?h?v(Object(o.a)(Object(o.a)({},j),{},{style:{display:"none"}}),M):null:v(Object(o.a)(Object(o.a)({},j),{},{className:g}),M);else N=null;return s.createElement($,{ref:x},N)}));return l.displayName="CSSMotion",l}(x),K=n(21),G="add",X="keep",Y="remove",J="removed";function Q(e){var t;return t=e&&"object"===Object(a.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Q)}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=Z(e),s=Z(t);a.forEach((function(e){for(var t=!1,a=r;a<i;a+=1){var u=s[a];if(u.key===e.key){r<a&&(n=n.concat(s.slice(r,a).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{status:G})}))),r=a),n.push(Object(o.a)(Object(o.a)({},u),{},{status:X})),r+=1,t=!0;break}}t||n.push(Object(o.a)(Object(o.a)({},e),{},{status:Y}))})),r<i&&(n=n.concat(s.slice(r).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{status:G})}))));var u={};n.forEach((function(e){var t=e.key;u[t]=(u[t]||0)+1}));var c=Object.keys(u).filter((function(e){return u[e]>1}));return c.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==Y}))).forEach((function(t){t.key===e&&(t.status=X)}))})),n}var te=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];var ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,n=function(e){Object(W.a)(r,e);var n=Object(H.a)(r);function r(){var e;return Object(z.a)(this,r),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(o.a)(Object(o.a)({},e),{},{status:J})}))}}))},e}return Object(V.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,o=r.component,i=r.children,a=r.onVisibleChanged,u=Object(K.a)(r,["component","children","onVisibleChanged"]),c=o||s.Fragment,l={};return te.forEach((function(e){l[e]=u[e],delete u[e]})),delete u.keys,s.createElement(c,Object.assign({},u),n.map((function(n){var r=n.status,o=Object(K.a)(n,["status"]),u=r===G||r===X;return s.createElement(t,Object.assign({},l,{key:o.key,visible:u,eventProps:o,onVisibleChanged:function(t){null===a||void 0===a||a(t,{key:o.key}),t||e.removeKey(o.key)}}),i)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,o=Z(n);return{keyEntities:ee(r,o).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==J||e.status!==Y}))}}}]),r}(s.Component);return n.defaultProps={component:"div"},n}(x);t.default=q},,function(e,t,n){},function(e,t,n){"use strict";n(47),n(274)},function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resetWarned",{enumerable:!0,get:function(){return o.resetWarned}}),t.default=void 0;var o=r(n(161));t.default=function(e,t,n){(0,o.default)(e,"[antd: ".concat(t,"] ").concat(n))}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(159)).default;t.default=o},function(e,t,n){"use strict";n(47),n(284),n(155),n(126)},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(87),void(i.lib.Cipher||function(e){var t=i,n=t.lib,r=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=t.enc,u=(s.Utf8,s.Base64),c=t.algo.EvpKDF,l=n.Cipher=a.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:g}return function(t){return{encrypt:function(n,r,o){return e(r).encrypt(t,n,r,o)},decrypt:function(n,r,o){return e(r).decrypt(t,n,r,o)}}}}()}),f=(n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),d=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var t=d.extend();function n(t,n,r){var o,i=this._iv;i?(o=i,this._iv=e):o=this._prevBlock;for(var a=0;a<r;a++)t[n+a]^=o[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,o=r.blockSize;n.call(this,e,t,o),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+o)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,o=r.blockSize,i=e.slice(t,t+o);r.decryptBlock(e,t),n.call(this,e,t,o),this._prevBlock=i}}),t}(),h=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var u=o.create(a,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},v=(n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:h}),reset:function(){var e;l.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:t})}},g=n.SerializableCipher=r.extend({cfg:r.extend({format:m}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var o=e.createEncryptor(n,r),i=o.finalize(t),a=o.cfg;return v.create({ciphertext:i,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),a=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,v.create({key:i,iv:a,salt:r})}},b=n.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var o=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=o.iv;var i=g.encrypt.call(this,e,t,o.key,r);return i.mixIn(o),i},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var o=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=o.iv,g.decrypt.call(this,e,t,o.key,r)}})}()))}()},function(e,t,n){"use strict";n.r(t),t.default=function(e,t){for(var n=Object.assign({},e),r=0;r<t.length;r+=1){delete n[t[r]]}return n}},,function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=r(n(0)),u=r(n(597)),c=o(n(10)),l=o(n(502)),f=o(n(505)),d=o(n(112)),p=o(n(49)),h=n(29),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function m(e){var t,n,r=e.type,o=e.className,m=e.size,g=e.onEdit,y=e.hideAdd,b=e.centered,w=e.addIcon,x=v(e,["type","className","size","onEdit","hideAdd","centered","addIcon"]),E=x.prefixCls,C=s.useContext(h.ConfigContext),k=C.getPrefixCls,O=C.direction,S=k("tabs",E);return"editable-card"===r&&(n={onEdit:function(e,t){var n=t.key,r=t.event;null===g||void 0===g||g("add"===e?r:n,e)},removeIcon:s.createElement(d.default,null),addIcon:w||s.createElement(f.default,null),showAdd:!0!==y}),(0,p.default)(!("onPrevClick"in x)&&!("onNextClick"in x),"Tabs","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),s.createElement(u.default,(0,i.default)({direction:O},x,{moreTransitionName:"slide-up",className:(0,c.default)((t={},(0,a.default)(t,"".concat(S,"-").concat(m),m),(0,a.default)(t,"".concat(S,"-card"),["card","editable-card"].includes(r)),(0,a.default)(t,"".concat(S,"-editable-card"),"editable-card"===r),(0,a.default)(t,"".concat(S,"-centered"),b),t),o),editable:n,moreIcon:s.createElement(l.default,null),prefixCls:S}))}m.TabPane=u.TabPane;var g=m;t.default=g},function(e,t,n){"use strict";var r=n(196),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:s,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){"object"===typeof t[r]&&"object"===typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},deepMerge:function e(){var t={};function n(n,r){"object"===typeof t[r]&&"object"===typeof n?t[r]=e(t[r],n):t[r]="object"===typeof n?e({},n):n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,o){e[o]=n&&"function"===typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(91);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return o.a.Children.forEach(e,(function(e){(void 0!==e&&null!==e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(a(e)):Object(i.isFragment)(e)&&e.props?n=n.concat(a(e.props.children,t)):n.push(e))})),n}},function(e,t,n){e.exports=n(185)},,function(e,t,n){"use strict";n(47),n(287),n(86)},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(91);function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){"function"===typeof e?e(t):"object"===o(e)&&e&&"current"in e&&(e.current=t)}function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){i(t,e)}))}}function s(e){var t,n,o=Object(r.isMemo)(e)?e.type.type:e.type;return!("function"===typeof o&&!(null===(t=o.prototype)||void 0===t?void 0:t.render))&&!("function"===typeof e&&!(null===(n=e.prototype)||void 0===n?void 0:n.render))}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r,o,i,a,s,u,c;n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),function(e){e[e.LOW=1]="LOW",e[e.MIDDLE=2]="MIDDLE",e[e.HIGH=3]="HIGH"}(r||(r={})),function(e){e.ALIPAY="alipay",e.GOOGLE="google",e.WECHATPC="wechat:pc",e.WECHATMP="wechat:webpage-authorization",e.WECHAT_MINIPROGRAM="wechat:miniprogram:default",e.WECHAT_MINIPROGRAM_QRCODE="wechat:miniprogram:qrconnect",e.WECHAT_MINIPROGRAM_APPLAUNCH="wechat:miniprogram:app-launch",e.WECHATMOBILE="wechat:mobile",e.GITHUB="github",e.QQ="qq",e.WECHATWORK_ADDRESS_BOOK="wechatwork:addressbook",e.WECHATWORK_CORP_QRCONNECT="wechatwork:corp:qrconnect",e.WECHATWORK_SERVICEPROVIDER_QRCONNECT="wechatwork:service-provider:qrconnect",e.DINGTALK="dingtalk",e.WEIBO="weibo",e.APPLE="apple",e.APPLE_WEB="apple:web",e.OAUTH="oauth",e.BAIDU="baidu"}(o||(o={})),function(e){e.OIDC="oidc",e.OAUTH="oauth",e.SAML="saml",e.CAS="cas",e.AZURE_AD="azure-ad"}(i||(i={})),function(e){e[e.NoCheck=0]="NoCheck",e[e.Low=1]="Low",e[e.Middle=2]="Middle",e[e.High=3]="High"}(a||(a={})),function(e){e.Email="email",e.Phone="phone"}(s||(s={})),function(e){e.LDAP="ldap",e.AppQr="app-qrcode",e.Password="password",e.PhoneCode="phone-code",e.WxMinQr="wechat-miniprogram-qrcode",e.AD="ad"}(u||(u={})),function(e){e.FRONT_CHANNEL="FRONT_CHANNEL",e.BACK_CHANNEL="BACK_CHANNEL"}(c||(c={}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(231),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(338);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(339),o=n(340),i=n(341);e.exports=function(e){var t=o();return function(){var n,o=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return i(this,n)}}},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n(23),i=n(26),a=n(30),s=n(36),u=n(0),c=n(80),l=n(58),f=n(33),d=n(62),p=n(103),h=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var n=e.props.onResize,o=t[0].target,i=o.getBoundingClientRect(),a=i.width,s=i.height,u=o.offsetWidth,c=o.offsetHeight,l=Math.floor(a),f=Math.floor(s);if(e.state.width!==l||e.state.height!==f||e.state.offsetWidth!==u||e.state.offsetHeight!==c){var d={width:l,height:f,offsetWidth:u,offsetHeight:c};e.setState(d),n&&Promise.resolve().then((function(){n(Object(r.a)(Object(r.a)({},d),{},{offsetWidth:u,offsetHeight:c}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var e=Object(c.a)(this.childNode||this);e!==this.currentElement&&(this.destroyObserver(),this.currentElement=e),!this.resizeObserver&&e&&(this.resizeObserver=new p.a(this.onResize),this.resizeObserver.observe(e))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var e=this.props.children,t=Object(l.a)(e);if(t.length>1)Object(f.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(f.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(u.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;t[0]=u.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!u.isValidElement(e)||"key"in e&&null!==e.key?e:u.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(u.Component);h.displayName="ResizeObserver",t.default=h},function(e,t,n){"use strict";function r(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return!!e&&e.contains(t)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(365),o=n(366),i=n(204),a=n(367);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.replaceElement=a,t.cloneElement=function(e,t){return a(e,e,t)},t.isValidElement=void 0;var o=r(n(0)),i=o.isValidElement;function a(e,t,n){return i(e)?o.cloneElement(e,"function"===typeof n?n(e.props||{}):n):t}t.isValidElement=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;t.tuple=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t};t.tupleNum=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.FormItemPrefixContext=t.FormProvider=t.FormItemContext=t.FormContext=void 0;var i=o(n(0)),a=r(n(53)),s=n(98),u=i.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}});t.FormContext=u;var c=i.createContext({updateItemErrors:function(){}});t.FormItemContext=c;t.FormProvider=function(e){var t=(0,a.default)(e,["prefixCls"]);return i.createElement(s.FormProvider,t)};var l=i.createContext({prefixCls:""});t.FormItemPrefixContext=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37),o=n(40);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!==typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(42),o=n.n(r);function i(e){return e instanceof HTMLElement?e:o.a.findDOMNode(e)}},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return l}));var a="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),s="aria-",u="data-";function c(e,t){return 0===e.indexOf(t)}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:o({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||c(n,s))||t.data&&c(n,u)||t.attr&&a.includes(n))&&(r[n]=e[n])})),r}},function(e,t,n){"use strict";var r=n(4),o=n(23),i=n(26),a=n(40),s=n(30),u=n(36),c=n(0),l=n.n(c),f=n(42),d=n.n(f),p=n(34),h=n(74),v=n(80),m=n(62);function g(e,t,n,r){var o=d.a.unstable_batchedUpdates?function(e){d.a.unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,o,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,o)}}}var y=n(146),b=n(10),w=n.n(b);function x(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var E=n(11),C=n(21),k=n(147),O=n(45);function S(e){var t=e.prefixCls,n=e.motion,r=e.animation,o=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:o?{motionName:o}:null)}function _(e){var t=e.prefixCls,n=e.visible,o=e.zIndex,i=e.mask,a=e.maskMotion,s=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var l={};return(a||u||s)&&(l=Object(r.a)({motionAppear:!0},S({motion:a,prefixCls:t,transitionName:u,animation:s}))),c.createElement(O.default,Object.assign({},l,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return c.createElement("div",{style:{zIndex:o},className:w()("".concat(t,"-mask"),n)})}))}var T,I=n(37);function P(e){return(P="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var N={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function M(){if(void 0!==T)return T;T="";var e=document.createElement("p").style;for(var t in N)t+"Transform"in e&&(T=t);return T}function j(){return M()?"".concat(M(),"TransitionProperty"):"transitionProperty"}function D(){return M()?"".concat(M(),"Transform"):"transform"}function F(e,t){var n=j();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function L(e,t){var n=D();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var B,U=/matrix\((.*)\)/,z=/matrix3d\((.*)\)/;function V(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function W(e,t,n){var r=n;if("object"!==P(t))return"undefined"!==typeof r?("number"===typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):B(e,t);for(var o in t)t.hasOwnProperty(o)&&W(e,o,t[o])}function H(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var o=e.document;"number"!==typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function $(e){return H(e)}function q(e){return H(e,!0)}function K(e){var t=function(e){var t,n,r,o=e.ownerDocument,i=o.body,a=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=a.clientLeft||i.clientLeft||0,top:r-=a.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=$(r),t.top+=q(r),t}function G(e){return null!==e&&void 0!==e&&e==e.window}function X(e){return G(e)?e.document:9===e.nodeType?e:e.ownerDocument}var Y=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),J=/^(top|right|bottom|left)$/;function Q(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function Z(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function ee(e,t,n){"static"===W(e,"position")&&(e.style.position="relative");var r=-999,o=-999,i=Q("left",n),a=Q("top",n),s=Z(i),u=Z(a);"left"!==i&&(r=999),"top"!==a&&(o=999);var c,l="",f=K(e);("left"in t||"top"in t)&&(l=(c=e).style.transitionProperty||c.style[j()]||"",F(e,"none")),"left"in t&&(e.style[s]="",e.style[i]="".concat(r,"px")),"top"in t&&(e.style[u]="",e.style[a]="".concat(o,"px")),V(e);var d=K(e),p={};for(var h in t)if(t.hasOwnProperty(h)){var v=Q(h,n),m="left"===h?r:o,g=f[h]-d[h];p[v]=v===h?m+g:m-g}W(e,p),V(e),("left"in t||"top"in t)&&F(e,l);var y={};for(var b in t)if(t.hasOwnProperty(b)){var w=Q(b,n),x=t[b]-f[b];y[w]=b===w?p[w]+x:p[w]-x}W(e,y)}function te(e,t){var n=K(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(D());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),o={x:r.x,y:r.y};"left"in t&&(o.x=r.x+t.left-n.left),"top"in t&&(o.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(D());if(r&&"none"!==r){var o,i=r.match(U);i?((o=(i=i[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,o[5]=t.y,L(e,"matrix(".concat(o.join(","),")"))):((o=r.match(z)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,o[13]=t.y,L(e,"matrix3d(".concat(o.join(","),")")))}else L(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,o)}function ne(e,t){for(var n=0;n<e.length;n++)t(e[n])}function re(e){return"border-box"===B(e,"boxSizing")}"undefined"!==typeof window&&(B=window.getComputedStyle?function(e,t,n){var r=n,o="",i=X(e);return(r=r||i.defaultView.getComputedStyle(e,null))&&(o=r.getPropertyValue(t)||r[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(Y.test(n)&&!J.test(t)){var r=e.style,o=r.left,i=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=i}return""===n?"auto":n});var oe=["margin","border","padding"];function ie(e,t,n){var r,o={},i=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=i[r],i[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(i[r]=o[r])}function ae(e,t,n){var r,o,i,a=0;for(o=0;o<t.length;o++)if(r=t[o])for(i=0;i<n.length;i++){var s=void 0;s="border"===r?"".concat(r).concat(n[i],"Width"):r+n[i],a+=parseFloat(B(e,s))||0}return a}var se={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function ue(e,t,n){var r=n;if(G(e))return"width"===t?se.viewportWidth(e):se.viewportHeight(e);if(9===e.nodeType)return"width"===t?se.docWidth(e):se.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],i="width"===t?e.getBoundingClientRect().width:e.getBoundingClientRect().height,a=(B(e),re(e)),s=0;(null===i||void 0===i||i<=0)&&(i=void 0,(null===(s=B(e,t))||void 0===s||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===r&&(r=a?1:-1);var u=void 0!==i||a,c=i||s;return-1===r?u?c-ae(e,["border","padding"],o):s:u?1===r?c:c+(2===r?-ae(e,["border"],o):ae(e,["margin"],o)):s+ae(e,oe.slice(r),o)}ne(["Width","Height"],(function(e){se["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],se["viewport".concat(e)](n))},se["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,i=r.documentElement[n];return"CSS1Compat"===r.compatMode&&i||o&&o[n]||i}}));var ce={position:"absolute",visibility:"hidden",display:"block"};function le(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t[0];return 0!==o.offsetWidth?r=ue.apply(void 0,t):ie(o,ce,(function(){r=ue.apply(void 0,t)})),r}function fe(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}ne(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);se["outer".concat(t)]=function(t,n){return t&&le(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];se[e]=function(t,r){var o=r;if(void 0===o)return t&&le(t,e,-1);if(t){B(t);return re(t)&&(o+=ae(t,["padding","border"],n)),W(t,e,o)}}}));var de={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:X,offset:function(e,t,n){if("undefined"===typeof t)return K(e);!function(e,t,n){if(n.ignoreShake){var r=K(e),o=r.left.toFixed(0),i=r.top.toFixed(0),a=t.left.toFixed(0),s=t.top.toFixed(0);if(o===a&&i===s)return}n.useCssRight||n.useCssBottom?ee(e,t,n):n.useCssTransform&&D()in document.body.style?te(e,t):ee(e,t,n)}(e,t,n||{})},isWindow:G,each:ne,css:W,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:fe,getWindowScrollLeft:function(e){return $(e)},getWindowScrollTop:function(e){return q(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)de.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};fe(de,se);var pe=de.getParent;function he(e){if(de.isWindow(e)||9===e.nodeType)return null;var t,n=de.getDocument(e).body,r=de.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:pe(e);for(t=pe(e);t&&t!==n&&9!==t.nodeType;t=pe(t))if("static"!==(r=de.css(t,"position")))return t;return null}var ve=de.getParent;function me(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=he(e),o=de.getDocument(e),i=o.defaultView||o.parentWindow,a=o.body,s=o.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===a||r===s||"visible"===de.css(r,"overflow")){if(r===a||r===s)break}else{var u=de.offset(r);u.left+=r.clientLeft,u.top+=r.clientTop,n.top=Math.max(n.top,u.top),n.right=Math.min(n.right,u.left+r.clientWidth),n.bottom=Math.min(n.bottom,u.top+r.clientHeight),n.left=Math.max(n.left,u.left)}r=he(r)}var c=null;de.isWindow(e)||9===e.nodeType||(c=e.style.position,"absolute"===de.css(e,"position")&&(e.style.position="fixed"));var l=de.getWindowScrollLeft(i),f=de.getWindowScrollTop(i),d=de.viewportWidth(i),p=de.viewportHeight(i),h=s.scrollWidth,v=s.scrollHeight,m=window.getComputedStyle(a);if("hidden"===m.overflowX&&(h=i.innerWidth),"hidden"===m.overflowY&&(v=i.innerHeight),e.style&&(e.style.position=c),t||function(e){if(de.isWindow(e)||9===e.nodeType)return!1;var t=de.getDocument(e).body,n=null;for(n=ve(e);n&&n!==t;n=ve(n))if("fixed"===de.css(n,"position"))return!0;return!1}(e))n.left=Math.max(n.left,l),n.top=Math.max(n.top,f),n.right=Math.min(n.right,l+d),n.bottom=Math.min(n.bottom,f+p);else{var g=Math.max(h,l+d);n.right=Math.min(n.right,g);var y=Math.max(v,f+p);n.bottom=Math.min(n.bottom,y)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function ge(e){var t,n,r;if(de.isWindow(e)||9===e.nodeType){var o=de.getWindow(e);t={left:de.getWindowScrollLeft(o),top:de.getWindowScrollTop(o)},n=de.viewportWidth(o),r=de.viewportHeight(o)}else t=de.offset(e),n=de.outerWidth(e),r=de.outerHeight(e);return t.width=n,t.height=r,t}function ye(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,i=e.height,a=e.left,s=e.top;return"c"===n?s+=i/2:"b"===n&&(s+=i),"c"===r?a+=o/2:"r"===r&&(a+=o),{left:a,top:s}}function be(e,t,n,r,o){var i=ye(t,n[1]),a=ye(e,n[0]),s=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-s[0]+r[0]-o[0]),top:Math.round(e.top-s[1]+r[1]-o[1])}}function we(e,t,n){return e.left<n.left||e.left+t.width>n.right}function xe(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Ee(e,t,n){var r=[];return de.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Ce(e,t){return e[t]=-e[t],e}function ke(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Oe(e,t){e[0]=ke(e[0],t.width),e[1]=ke(e[1],t.height)}function Se(e,t,n,r){var o=n.points,i=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,u=n.source||e;i=[].concat(i),a=[].concat(a);var c={},l=0,f=me(u,!(!(s=s||{})||!s.alwaysByViewport)),d=ge(u);Oe(i,d),Oe(a,t);var p=be(d,t,o,i,a),h=de.merge(d,p);if(f&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&we(p,d,f)){var v=Ee(o,/[lr]/gi,{l:"r",r:"l"}),m=Ce(i,0),g=Ce(a,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(be(d,t,v,m,g),d,f)||(l=1,o=v,i=m,a=g)}if(s.adjustY&&xe(p,d,f)){var y=Ee(o,/[tb]/gi,{t:"b",b:"t"}),b=Ce(i,1),w=Ce(a,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(be(d,t,y,b,w),d,f)||(l=1,o=y,i=b,a=w)}l&&(p=be(d,t,o,i,a),de.mix(h,p));var x=we(p,d,f),E=xe(p,d,f);if(x||E){var C=o;x&&(C=Ee(o,/[lr]/gi,{l:"r",r:"l"})),E&&(C=Ee(o,/[tb]/gi,{t:"b",b:"t"})),o=C,i=n.offset||[0,0],a=n.targetOffset||[0,0]}c.adjustX=s.adjustX&&x,c.adjustY=s.adjustY&&E,(c.adjustX||c.adjustY)&&(h=function(e,t,n,r){var o=de.clone(e),i={width:t.width,height:t.height};return r.adjustX&&o.left<n.left&&(o.left=n.left),r.resizeWidth&&o.left>=n.left&&o.left+i.width>n.right&&(i.width-=o.left+i.width-n.right),r.adjustX&&o.left+i.width>n.right&&(o.left=Math.max(n.right-i.width,n.left)),r.adjustY&&o.top<n.top&&(o.top=n.top),r.resizeHeight&&o.top>=n.top&&o.top+i.height>n.bottom&&(i.height-=o.top+i.height-n.bottom),r.adjustY&&o.top+i.height>n.bottom&&(o.top=Math.max(n.bottom-i.height,n.top)),de.mix(o,i)}(p,d,f,c))}return h.width!==d.width&&de.css(u,"width",de.width(u)+h.width-d.width),h.height!==d.height&&de.css(u,"height",de.height(u)+h.height-d.height),de.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:i,targetOffset:a,overflow:c}}function _e(e,t,n){var r=n.target||t;return Se(e,ge(r),n,!function(e,t){var n=me(e,t),r=ge(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function Te(e,t,n){var r,o,i=de.getDocument(e),a=i.defaultView||i.parentWindow,s=de.getWindowScrollLeft(a),u=de.getWindowScrollTop(a),c=de.viewportWidth(a),l=de.viewportHeight(a);r="pageX"in t?t.pageX:s+t.clientX,o="pageY"in t?t.pageY:u+t.clientY;var f=r>=0&&r<=s+c&&o>=0&&o<=u+l;return Se(e,{left:r,top:o,width:0,height:0},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(n,!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{points:[n.points[0],"cc"]}),f)}_e.__getOffsetParent=he,_e.__getVisibleRectForElement=me;var Ie=n(103);function Pe(e,t){var n=null,r=null;var o=new Ie.a((function(e){var o=Object(E.a)(e,1)[0].target;if(document.documentElement.contains(o)){var i=o.getBoundingClientRect(),a=i.width,s=i.height,u=Math.floor(a),c=Math.floor(s);n===u&&r===c||Promise.resolve().then((function(){t({width:u,height:c})})),n=u,r=c}}));return e&&o.observe(e),function(){o.disconnect()}}function Ae(e){return"function"!==typeof e?null:e()}function Re(e){return"object"===Object(I.a)(e)&&e?e:null}var Ne=l.a.forwardRef((function(e,t){var n=e.children,r=e.disabled,o=e.target,i=e.align,a=e.onAlign,s=e.monitorWindowResize,u=e.monitorBufferTime,c=void 0===u?0:u,f=l.a.useRef({}),d=l.a.useRef(),p=l.a.Children.only(n),v=l.a.useRef({});v.current.disabled=r,v.current.target=o,v.current.onAlign=a;var y=function(e,t){var n=l.a.useRef(!1),r=l.a.useRef(null);function o(){window.clearTimeout(r.current)}return[function i(a){if(n.current&&!0!==a)o(),r.current=window.setTimeout((function(){n.current=!1,i()}),t);else{if(!1===e())return;n.current=!0,o(),r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,o()}]}((function(){var e=v.current,t=e.disabled,n=e.target,r=e.onAlign;if(!t&&n){var o,a=d.current,s=Ae(n),u=Re(n);f.current.element=s,f.current.point=u;var c=document.activeElement;return s&&function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}(s)?o=_e(a,s,i):u&&(o=Te(a,u,i)),function(e,t){e!==document.activeElement&&Object(h.a)(t,e)&&"function"===typeof e.focus&&e.focus()}(c,a),r&&o&&r(a,o),!0}return!1}),c),b=Object(E.a)(y,2),w=b[0],x=b[1],C=l.a.useRef({cancel:function(){}}),k=l.a.useRef({cancel:function(){}});l.a.useEffect((function(){var e,t,n=Ae(o),r=Re(o);d.current!==k.current.element&&(k.current.cancel(),k.current.element=d.current,k.current.cancel=Pe(d.current,w)),f.current.element===n&&((e=f.current.point)===(t=r)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))||(w(),C.current.element!==n&&(C.current.cancel(),C.current.element=n,C.current.cancel=Pe(n,w)))})),l.a.useEffect((function(){r?x():w()}),[r]);var O=l.a.useRef(null);return l.a.useEffect((function(){s?O.current||(O.current=g(window,"resize",w)):O.current&&(O.current.remove(),O.current=null)}),[s]),l.a.useEffect((function(){return function(){C.current.cancel(),k.current.cancel(),O.current&&O.current.remove(),x()}}),[]),l.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return w(!0)}}})),l.a.isValidElement(p)&&(p=l.a.cloneElement(p,{ref:Object(m.a)(p.ref,d)})),p}));Ne.displayName="Align";var Me=Ne,je=n(59),De=n.n(je),Fe=n(93),Le=["measure","align",null,"motion"],Be=c.forwardRef((function(e,t){var n=e.visible,o=e.prefixCls,i=e.className,a=e.style,s=e.children,u=e.zIndex,l=e.stretch,f=e.destroyPopupOnHide,d=e.align,h=e.point,v=e.getRootDomNode,m=e.getClassNameFromAlign,g=e.onAlign,y=e.onMouseEnter,b=e.onMouseLeave,x=e.onMouseDown,C=e.onTouchStart,k=Object(c.useRef)(),_=Object(c.useRef)(),T=Object(c.useState)(),I=Object(E.a)(T,2),P=I[0],A=I[1],R=function(e){var t=c.useState({width:0,height:0}),n=Object(E.a)(t,2),r=n[0],o=n[1];return[c.useMemo((function(){var t={};if(e){var n=r.width,o=r.height;-1!==e.indexOf("height")&&o?t.height=o:-1!==e.indexOf("minHeight")&&o&&(t.minHeight=o),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){o({width:e.offsetWidth,height:e.offsetHeight})}]}(l),N=Object(E.a)(R,2),M=N[0],j=N[1];var D=function(e,t){var n=Object(c.useState)(null),r=Object(E.a)(n,2),o=r[0],i=r[1],a=Object(c.useRef)();function s(){p.a.cancel(a.current)}return Object(c.useEffect)((function(){i("measure")}),[e]),Object(c.useEffect)((function(){switch(o){case"measure":t()}o&&(a.current=Object(p.a)(Object(Fe.a)(De.a.mark((function e(){var t,n;return De.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Le.indexOf(o),(n=Le[t+1])&&-1!==t&&i(n);case 3:case"end":return e.stop()}}),e)})))))}),[o]),Object(c.useEffect)((function(){return function(){s()}}),[]),[o,function(e){s(),a.current=Object(p.a)((function(){i((function(e){switch(o){case"align":return"motion";case"motion":return"stable"}return e})),null===e||void 0===e||e()}))}]}(n,(function(){l&&j(v())})),F=Object(E.a)(D,2),L=F[0],B=F[1],U=Object(c.useRef)();function z(){var e;null===(e=k.current)||void 0===e||e.forceAlign()}function V(e,t){if("align"===L){var n=m(t);A(n),P!==n?Promise.resolve().then((function(){z()})):B((function(){var e;null===(e=U.current)||void 0===e||e.call(U)})),null===g||void 0===g||g(e,t)}}var W=Object(r.a)({},S(e));function H(){return new Promise((function(e){U.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=W[e];W[e]=function(e,n){return B(),null===t||void 0===t?void 0:t(e,n)}})),c.useEffect((function(){W.motionName||"motion"!==L||B()}),[W.motionName,L]),c.useImperativeHandle(t,(function(){return{forceAlign:z,getElement:function(){return _.current}}}));var $=Object(r.a)(Object(r.a)(Object(r.a)({},M),{},{zIndex:u},a),{},{opacity:"motion"!==L&&"stable"!==L&&n?0:void 0,pointerEvents:"stable"===L?void 0:"none"}),q=!0;!(null===d||void 0===d?void 0:d.points)||"align"!==L&&"stable"!==L||(q=!1);var K=s;return c.Children.count(s)>1&&(K=c.createElement("div",{className:"".concat(o,"-content")},s)),c.createElement(O.default,Object.assign({visible:n,ref:_,leavedClassName:"".concat(o,"-hidden")},W,{onAppearPrepare:H,onEnterPrepare:H,removeOnLeave:f}),(function(e,t){var n=e.className,a=e.style,s=w()(o,i,P,n);return c.createElement(Me,{target:h||v,key:"popup",ref:k,monitorWindowResize:!0,disabled:q,align:d,onAlign:V},c.createElement("div",{ref:t,className:s,onMouseEnter:y,onMouseLeave:b,onMouseDown:x,onTouchStart:C,style:Object(r.a)(Object(r.a)({},a),$)},K))}))}));Be.displayName="PopupInner";var Ue=Be,ze=c.forwardRef((function(e,t){var n=e.prefixCls,o=e.visible,i=e.zIndex,a=e.children,s=e.mobile,u=(s=void 0===s?{}:s).popupClassName,l=s.popupStyle,f=s.popupMotion,d=void 0===f?{}:f,p=s.popupRender,h=c.useRef();c.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return h.current}}}));var v=Object(r.a)({zIndex:i},l),m=a;return c.Children.count(a)>1&&(m=c.createElement("div",{className:"".concat(n,"-content")},a)),p&&(m=p(m)),c.createElement(O.default,Object.assign({visible:o,ref:h,removeOnLeave:!0},d),(function(e,t){var o=e.className,i=e.style,a=w()(n,u,o);return c.createElement("div",{ref:t,className:a,style:Object(r.a)(Object(r.a)({},i),v)},m)}))}));ze.displayName="MobilePopupInner";var Ve=ze,We=c.forwardRef((function(e,t){var n=e.visible,o=e.mobile,i=Object(C.a)(e,["visible","mobile"]),a=Object(c.useState)(n),s=Object(E.a)(a,2),u=s[0],l=s[1],f=Object(c.useState)(!1),d=Object(E.a)(f,2),p=d[0],h=d[1],v=Object(r.a)(Object(r.a)({},i),{},{visible:u});Object(c.useEffect)((function(){l(n),n&&o&&h(Object(k.a)())}),[n,!!o]);var m=p?c.createElement(Ve,Object.assign({},v,{mobile:o,ref:t})):c.createElement(Ue,Object.assign({},v,{ref:t}));return c.createElement("div",null,c.createElement(_,Object.assign({},v)),m)}));We.displayName="Popup";var He=We,$e=c.createContext(null);function qe(){}function Ke(){return""}function Ge(e){return e?e.ownerDocument:window.document}var Xe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];t.a=function(e){var t=function(t){Object(s.a)(l,t);var n=Object(u.a)(l);function l(e){var t,r;return Object(o.a)(this,l),(t=n.call(this,e)).popupRef=c.createRef(),t.triggerRef=c.createRef(),t.onMouseEnter=function(e){var n=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",e),t.delaySetPopupVisible(!0,n,n?null:e)},t.onMouseMove=function(e){t.fireEvents("onMouseMove",e),t.setPoint(e)},t.onMouseLeave=function(e){t.fireEvents("onMouseLeave",e),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)},t.onPopupMouseEnter=function(){t.clearDelayTimer()},t.onPopupMouseLeave=function(e){var n;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(h.a)(null===(n=t.popupRef.current)||void 0===n?void 0:n.getElement(),e.relatedTarget)||t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)},t.onFocus=function(e){t.fireEvents("onFocus",e),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))},t.onMouseDown=function(e){t.fireEvents("onMouseDown",e),t.preClickTime=Date.now()},t.onTouchStart=function(e){t.fireEvents("onTouchStart",e),t.preTouchTime=Date.now()},t.onBlur=function(e){t.fireEvents("onBlur",e),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)},t.onContextMenu=function(e){e.preventDefault(),t.fireEvents("onContextMenu",e),t.setPopupVisible(!0,e)},t.onContextMenuClose=function(){t.isContextMenuToShow()&&t.close()},t.onClick=function(e){if(t.fireEvents("onClick",e),t.focusTime){var n;if(t.preClickTime&&t.preTouchTime?n=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?n=t.preClickTime:t.preTouchTime&&(n=t.preTouchTime),Math.abs(n-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var r=!t.state.popupVisible;(t.isClickToHide()&&!r||r&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,e)},t.onPopupMouseDown=function(){var e;(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout((function(){t.hasPopupMouseDown=!1}),0),t.context)&&(e=t.context).onPopupMouseDown.apply(e,arguments)},t.onDocumentClick=function(e){if(!t.props.mask||t.props.maskClosable){var n=e.target,r=t.getRootDomNode(),o=t.getPopupDomNode();Object(h.a)(r,n)||Object(h.a)(o,n)||t.hasPopupMouseDown||t.close()}},t.getRootDomNode=function(){var e=t.props.getTriggerDOMNode;if(e)return e(t.triggerRef.current);try{var n=Object(v.a)(t.triggerRef.current);if(n)return n}catch(r){}return d.a.findDOMNode(Object(a.a)(t))},t.getPopupClassNameFromAlign=function(e){var n=[],r=t.props,o=r.popupPlacement,i=r.builtinPlacements,a=r.prefixCls,s=r.alignPoint,u=r.getPopupClassNameFromAlign;return o&&i&&n.push(function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var s=i[a];if(x(e[s].points,o,r))return"".concat(t,"-placement-").concat(s)}return""}(i,a,e,s)),u&&n.push(u(e)),n.join(" ")},t.getComponent=function(){var e=t.props,n=e.prefixCls,r=e.destroyPopupOnHide,o=e.popupClassName,i=e.onPopupAlign,a=e.popupMotion,s=e.popupAnimation,u=e.popupTransitionName,l=e.popupStyle,f=e.mask,d=e.maskAnimation,p=e.maskTransitionName,h=e.maskMotion,v=e.zIndex,m=e.popup,g=e.stretch,y=e.alignPoint,b=e.mobile,w=t.state,x=w.popupVisible,E=w.point,C=t.getPopupAlign(),k={};return t.isMouseEnterToShow()&&(k.onMouseEnter=t.onPopupMouseEnter),t.isMouseLeaveToHide()&&(k.onMouseLeave=t.onPopupMouseLeave),k.onMouseDown=t.onPopupMouseDown,k.onTouchStart=t.onPopupMouseDown,c.createElement(He,Object.assign({prefixCls:n,destroyPopupOnHide:r,visible:x,point:y&&E,className:o,align:C,onAlign:i,animation:s,getClassNameFromAlign:t.getPopupClassNameFromAlign},k,{stretch:g,getRootDomNode:t.getRootDomNode,style:l,mask:f,zIndex:v,transitionName:u,maskAnimation:d,maskTransitionName:p,maskMotion:h,ref:t.popupRef,motion:a,mobile:b}),"function"===typeof m?m():m)},t.attachParent=function(e){p.a.cancel(t.attachId);var n,r=t.props,o=r.getPopupContainer,i=r.getDocument,a=t.getRootDomNode();o?(a||0===o.length)&&(n=o(a)):n=i(t.getRootDomNode()).body,n?n.appendChild(e):t.attachId=Object(p.a)((function(){t.attachParent(e)}))},t.getContainer=function(){var e=(0,t.props.getDocument)(t.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",t.attachParent(e),e},t.setPoint=function(e){t.props.alignPoint&&e&&t.setState({point:{pageX:e.pageX,pageY:e.pageY}})},t.handlePortalUpdate=function(){t.state.prevPopupVisible!==t.state.popupVisible&&t.props.afterPopupVisibleChange(t.state.popupVisible)},r="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,t.state={prevPopupVisible:r,popupVisible:r},Xe.forEach((function(e){t["fire".concat(e)]=function(n){t.fireEvents(e,n)}})),t}return Object(i.a)(l,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=g(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=g(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=g(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=g(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),p.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,o=e.builtinPlacements;return t&&o?function(e,t,n){var o=e[t]||{};return Object(r.a)(Object(r.a)({},o),n)}(o,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,o=1e3*t;if(this.clearDelayTimer(),o){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,i),r.clearDelayTimer()}),o)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,n=this.props,o=n.children,i=n.forceRender,a=n.alignPoint,s=n.className,u=n.autoDestroy,l=c.Children.only(o),f={key:"trigger"};this.isContextMenuToShow()?f.onContextMenu=this.onContextMenu:f.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(f.onClick=this.onClick,f.onMouseDown=this.onMouseDown,f.onTouchStart=this.onTouchStart):(f.onClick=this.createTwoChains("onClick"),f.onMouseDown=this.createTwoChains("onMouseDown"),f.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(f.onMouseEnter=this.onMouseEnter,a&&(f.onMouseMove=this.onMouseMove)):f.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?f.onMouseLeave=this.onMouseLeave:f.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(f.onFocus=this.onFocus,f.onBlur=this.onBlur):(f.onFocus=this.createTwoChains("onFocus"),f.onBlur=this.createTwoChains("onBlur"));var d=w()(l&&l.props&&l.props.className,s);d&&(f.className=d);var p=Object(r.a)({},f);Object(m.c)(l)&&(p.ref=Object(m.a)(this.triggerRef,l.ref));var h,v=c.cloneElement(l,p);return(t||this.popupRef.current||i)&&(h=c.createElement(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!t&&u&&(h=null),c.createElement($e.Provider,{value:{onPopupMouseDown:this.onPopupMouseDown}},v,h)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),l}(c.Component);return t.contextType=$e,t.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ke,getDocument:Ge,onPopupVisibleChange:qe,afterPopupVisibleChange:qe,onPopupAlign:qe,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},t}(y.a)},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(21),a=n(0),s=n.n(a),u=n(10),c=n.n(u),l=n(4),f=n(37),d=n(118),p=n(33),h=n(176);function v(e){return"object"===Object(f.a)(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===Object(f.a)(e.icon)||"function"===typeof e.icon)}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}function g(e,t,n){return n?s.a.createElement(e.tag,Object(l.a)(Object(l.a)({key:t},m(e.attrs)),n),(e.children||[]).map((function(n,r){return g(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):s.a.createElement(e.tag,Object(l.a)({key:t},m(e.attrs)),(e.children||[]).map((function(n,r){return g(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function y(e){return Object(d.generate)(e)[0]}function b(e){return e?Array.isArray(e)?e:[e]:[]}var w="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",x=!1,E={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var C=function(e){var t,n,r=e.icon,o=e.className,s=e.onClick,u=e.style,c=e.primaryColor,f=e.secondaryColor,d=Object(i.a)(e,["icon","className","onClick","style","primaryColor","secondaryColor"]),m=E;if(c&&(m={primaryColor:c,secondaryColor:f||y(c)}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;Object(a.useEffect)((function(){x||(Object(h.insertCss)(e,{prepend:!0}),x=!0)}),[])}(),t=v(r),n="icon should be icon definiton, but got ".concat(r),Object(p.a)(t,"[@ant-design/icons] ".concat(n)),!v(r))return null;var b=r;return b&&"function"===typeof b.icon&&(b=Object(l.a)(Object(l.a)({},b),{},{icon:b.icon(m.primaryColor,m.secondaryColor)})),g(b.icon,"svg-".concat(b.name),Object(l.a)({className:o,onClick:s,style:u,"data-icon":b.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d))};C.displayName="IconReact",C.getTwoToneColors=function(){return Object(l.a)({},E)},C.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;E.primaryColor=t,E.secondaryColor=n||y(t),E.calculated=!!n};var k=C;function O(e){var t=b(e),n=Object(r.a)(t,2),o=n[0],i=n[1];return k.setTwoToneColors({primaryColor:o,secondaryColor:i})}O("#1890ff");var S=a.forwardRef((function(e,t){var n=e.className,s=e.icon,u=e.spin,l=e.rotate,f=e.tabIndex,d=e.onClick,p=e.twoToneColor,h=Object(i.a)(e,["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"]),v=c()("anticon",Object(o.a)({},"anticon-".concat(s.name),Boolean(s.name)),{"anticon-spin":!!u||"loading"===s.name},n),m=f;void 0===m&&d&&(m=-1);var g=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,y=b(p),w=Object(r.a)(y,2),x=w[0],E=w[1];return a.createElement("span",Object.assign({role:"img","aria-label":s.name},h,{ref:t,tabIndex:m,onClick:d,className:v}),a.createElement(k,{icon:s,primaryColor:x,secondaryColor:E,style:g}))}));S.displayName="AntdIcon",S.getTwoToneColor=function(){var e=k.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},S.setTwoToneColor=O;t.a=S},function(e,t,n){(function(e,r){var o;(function(){var i,a="Expected a function",s="__lodash_hash_undefined__",u="__lodash_placeholder__",c=16,l=32,f=64,d=128,p=256,h=1/0,v=9007199254740991,m=NaN,g=4294967295,y=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",l],["partialRight",f],["rearg",p]],b="[object Arguments]",w="[object Array]",x="[object Boolean]",E="[object Date]",C="[object Error]",k="[object Function]",O="[object GeneratorFunction]",S="[object Map]",_="[object Number]",T="[object Object]",I="[object Promise]",P="[object RegExp]",A="[object Set]",R="[object String]",N="[object Symbol]",M="[object WeakMap]",j="[object ArrayBuffer]",D="[object DataView]",F="[object Float32Array]",L="[object Float64Array]",B="[object Int8Array]",U="[object Int16Array]",z="[object Int32Array]",V="[object Uint8Array]",W="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",q=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,J=RegExp(X.source),Q=RegExp(Y.source),Z=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(ie.source),se=/^\s+|\s+$/g,ue=/^\s+/,ce=/\s+$/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fe=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/\\(\\)?/g,ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,be=/^\[object .+?Constructor\]$/,we=/^0o[0-7]+$/i,xe=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ce=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="['\u2019]",Re="[\\ud800-\\udfff]",Ne="["+Pe+"]",Me="["+Oe+"]",je="\\d+",De="[\\u2700-\\u27bf]",Fe="["+_e+"]",Le="[^\\ud800-\\udfff"+Pe+je+Se+_e+Te+"]",Be="\\ud83c[\\udffb-\\udfff]",Ue="[^\\ud800-\\udfff]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Te+"]",He="(?:"+Fe+"|"+Le+")",$e="(?:"+We+"|"+Le+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ke="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Me+"|"+Be+")"+"?",Xe="[\\ufe0e\\ufe0f]?",Ye=Xe+Ge+("(?:\\u200d(?:"+[Ue,ze,Ve].join("|")+")"+Xe+Ge+")*"),Je="(?:"+[De,ze,Ve].join("|")+")"+Ye,Qe="(?:"+[Ue+Me+"?",Me,ze,Ve,Re].join("|")+")",Ze=RegExp(Ae,"g"),et=RegExp(Me,"g"),tt=RegExp(Be+"(?="+Be+")|"+Qe+Ye,"g"),nt=RegExp([We+"?"+Fe+"+"+qe+"(?="+[Ne,We,"$"].join("|")+")",$e+"+"+Ke+"(?="+[Ne,We+He,"$"].join("|")+")",We+"?"+He+"+"+qe,We+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Je].join("|"),"g"),rt=RegExp("[\\u200d\\ud800-\\udfff"+Oe+Ie+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,st={};st[F]=st[L]=st[B]=st[U]=st[z]=st[V]=st[W]=st[H]=st[$]=!0,st[b]=st[w]=st[j]=st[x]=st[D]=st[E]=st[C]=st[k]=st[S]=st[_]=st[T]=st[P]=st[A]=st[R]=st[M]=!1;var ut={};ut[b]=ut[w]=ut[j]=ut[D]=ut[x]=ut[E]=ut[F]=ut[L]=ut[B]=ut[U]=ut[z]=ut[S]=ut[_]=ut[T]=ut[P]=ut[A]=ut[R]=ut[N]=ut[V]=ut[W]=ut[H]=ut[$]=!0,ut[C]=ut[k]=ut[M]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ft=parseInt,dt="object"==typeof e&&e&&e.Object===Object&&e,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=dt||pt||Function("return this")(),vt=t&&!t.nodeType&&t,mt=vt&&"object"==typeof r&&r&&!r.nodeType&&r,gt=mt&&mt.exports===vt,yt=gt&&dt.process,bt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(t){}}(),wt=bt&&bt.isArrayBuffer,xt=bt&&bt.isDate,Et=bt&&bt.isMap,Ct=bt&&bt.isRegExp,kt=bt&&bt.isSet,Ot=bt&&bt.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _t(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function It(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function At(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Rt(e,t){return!!(null==e?0:e.length)&&Vt(e,t,0)>-1}function Nt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function jt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Ft(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Bt=qt("length");function Ut(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function zt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Vt(e,t,n){return t===t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,Ht,n)}function Wt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Ht(e){return e!==e}function $t(e,t){var n=null==e?0:e.length;return n?Xt(e,t)/n:m}function qt(e){return function(t){return null==t?i:t[e]}}function Kt(e){return function(t){return null==e?i:e[t]}}function Gt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Xt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return Mt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function en(e,t){for(var n=-1,r=e.length;++n<r&&Vt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length;n--&&Vt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=Kt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Kt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(e){return"\\"+ct[e]}function sn(e){return rt.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,i[o++]=n)}return i}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return sn(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Bt(e)}function hn(e){return sn(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}var vn=Kt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var mn=function e(t){var n=(t=null==t?ht:mn.defaults(ht.Object(),t,mn.pick(ht,it))).Array,r=t.Date,o=t.Error,Oe=t.Function,Se=t.Math,_e=t.Object,Te=t.RegExp,Ie=t.String,Pe=t.TypeError,Ae=n.prototype,Re=Oe.prototype,Ne=_e.prototype,Me=t["__core-js_shared__"],je=Re.toString,De=Ne.hasOwnProperty,Fe=0,Le=function(){var e=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Be=Ne.toString,Ue=je.call(_e),ze=ht._,Ve=Te("^"+je.call(De).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=gt?t.Buffer:i,He=t.Symbol,$e=t.Uint8Array,qe=We?We.allocUnsafe:i,Ke=cn(_e.getPrototypeOf,_e),Ge=_e.create,Xe=Ne.propertyIsEnumerable,Ye=Ae.splice,Je=He?He.isConcatSpreadable:i,Qe=He?He.iterator:i,tt=He?He.toStringTag:i,rt=function(){try{var e=di(_e,"defineProperty");return e({},"",{}),e}catch(t){}}(),ct=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=r&&r.now!==ht.Date.now&&r.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,vt=Se.ceil,mt=Se.floor,yt=_e.getOwnPropertySymbols,bt=We?We.isBuffer:i,Bt=t.isFinite,Kt=Ae.join,gn=cn(_e.keys,_e),yn=Se.max,bn=Se.min,wn=r.now,xn=t.parseInt,En=Se.random,Cn=Ae.reverse,kn=di(t,"DataView"),On=di(t,"Map"),Sn=di(t,"Promise"),_n=di(t,"Set"),Tn=di(t,"WeakMap"),In=di(_e,"create"),Pn=Tn&&new Tn,An={},Rn=Bi(kn),Nn=Bi(On),Mn=Bi(Sn),jn=Bi(_n),Dn=Bi(Tn),Fn=He?He.prototype:i,Ln=Fn?Fn.valueOf:i,Bn=Fn?Fn.toString:i;function Un(e){if(ns(e)&&!$a(e)&&!(e instanceof Hn)){if(e instanceof Wn)return e;if(De.call(e,"__wrapped__"))return Ui(e)}return new Wn(e)}var zn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new qn(e);this.size=t.size}function Yn(e,t){var n=$a(e),r=!n&&Ha(e),o=!n&&!r&&Xa(e),i=!n&&!r&&!o&&ls(e),a=n||r||o||i,s=a?Yt(e.length,Ie):[],u=s.length;for(var c in e)!t&&!De.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bi(c,u))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Gr(0,t-1)]:i}function Qn(e,t){return Di(Po(e),sr(t,0,e.length))}function Zn(e){return Di(Po(e))}function er(e,t,n){(n!==i&&!za(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function tr(e,t,n){var r=e[t];De.call(e,t)&&za(r,n)&&(n!==i||t in e)||ir(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function rr(e,t,n,r){return dr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function or(e,t){return e&&Ao(t,Rs(t),e)}function ir(e,t,n){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:_s(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!ts(e))return e;var f=$a(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Po(e,s)}else{var d=vi(e),p=d==k||d==O;if(Xa(e))return ko(e,u);if(d==T||d==b||p&&!o){if(s=c||p?{}:gi(e),!u)return c?function(e,t){return Ao(e,hi(e),t)}(e,function(e,t){return e&&Ao(t,Ns(t),e)}(s,e)):function(e,t){return Ao(e,pi(e),t)}(e,or(s,e))}else{if(!ut[d])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case j:return Oo(e);case x:case E:return new r(+e);case D:return function(e,t){var n=t?Oo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case F:case L:case B:case U:case z:case V:case W:case H:case $:return So(e,n);case S:return new r;case _:case R:return new r(e);case P:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case N:return o=e,Ln?_e(Ln.call(o)):{}}var o}(e,d,u)}}a||(a=new Xn);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,ur(r,t,n,o,e,a))}));var v=f?i:(l?c?ii:oi:c?Ns:Rs)(e);return Tt(v||e,(function(r,o){v&&(r=e[o=r]),tr(s,o,ur(r,t,n,o,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=_e(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Pe(a);return Ri((function(){e.apply(i,n)}),t)}function fr(e,t,n,r){var o=-1,i=Rt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Mt(t,Jt(n))),r?(i=Nt,a=!1):t.length>=200&&(i=Zt,a=!1,t=new Gn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f===f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}Un.templateSettings={escape:Z,evaluate:ee,interpolate:te,variable:"",imports:{_:Un}},Un.prototype=Vn.prototype,Un.prototype.constructor=Un,Wn.prototype=zn(Vn.prototype),Wn.prototype.constructor=Wn,Hn.prototype=zn(Vn.prototype),Hn.prototype.constructor=Hn,$n.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},$n.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$n.prototype.get=function(e){var t=this.__data__;if(In){var n=t[e];return n===s?i:n}return De.call(t,e)?t[e]:i},$n.prototype.has=function(e){var t=this.__data__;return In?t[e]!==i:De.call(t,e)},$n.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===i?s:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,!0)},qn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},qn.prototype.has=function(e){return nr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(On||qn),string:new $n}},Kn.prototype.delete=function(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return li(this,e).get(e)},Kn.prototype.has=function(e){return li(this,e).has(e)},Kn.prototype.set=function(e,t){var n=li(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new qn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var dr=Mo(wr),pr=Mo(xr,!0);function hr(e,t){var n=!0;return dr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!cs(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return dr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=yi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?gr(s,t-1,n,r,o):jt(o,s):r||(o[o.length]=s)}return o}var yr=jo(),br=jo(!0);function wr(e,t){return e&&yr(e,t,Rs)}function xr(e,t){return e&&br(e,t,Rs)}function Er(e,t){return At(t,(function(t){return Qa(e[t])}))}function Cr(e,t){for(var n=0,r=(t=wo(t,e)).length;null!=e&&n<r;)e=e[Li(t[n++])];return n&&n==r?e:i}function kr(e,t,n){var r=t(e);return $a(e)?r:jt(r,n(e))}function Or(e){return null==e?e===i?"[object Undefined]":"[object Null]":tt&&tt in _e(e)?function(e){var t=De.call(e,tt),n=e[tt];try{e[tt]=i;var r=!0}catch(a){}var o=Be.call(e);r&&(t?e[tt]=n:delete e[tt]);return o}(e):function(e){return Be.call(e)}(e)}function Sr(e,t){return e>t}function _r(e,t){return null!=e&&De.call(e,t)}function Tr(e,t){return null!=e&&t in _e(e)}function Ir(e,t,r){for(var o=r?Nt:Rt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Mt(d,Jt(t))),l=bn(d.length,l),c[u]=!r&&(t||a>=120&&d.length>=120)?new Gn(u&&d):i}d=e[0];var p=-1,h=c[0];e:for(;++p<a&&f.length<l;){var v=d[p],m=t?t(v):v;if(v=r||0!==v?v:0,!(h?Zt(h,m):o(f,m,r))){for(u=s;--u;){var g=c[u];if(!(g?Zt(g,m):o(e[u],m,r)))continue e}h&&h.push(m),f.push(v)}}return f}function Pr(e,t,n){var r=null==(e=Ti(e,t=wo(t,e)))?e:e[Li(Ji(t))];return null==r?i:St(r,e,n)}function Ar(e){return ns(e)&&Or(e)==b}function Rr(e,t,n,r,o){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=$a(e),u=$a(t),c=s?w:vi(e),l=u?w:vi(t),f=(c=c==b?T:c)==T,d=(l=l==b?T:l)==T,p=c==l;if(p&&Xa(e)){if(!Xa(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Xn),s||ls(e)?ni(e,t,n,r,o,a):function(e,t,n,r,o,i,a){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!i(new $e(e),new $e(t)));case x:case E:case _:return za(+e,+t);case C:return e.name==t.name&&e.message==t.message;case P:case R:return e==t+"";case S:var s=un;case A:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ni(s(e),s(t),r,o,i,a);return a.delete(e),l;case N:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var h=f&&De.call(e,"__wrapped__"),v=d&&De.call(t,"__wrapped__");if(h||v){var m=h?e.value():e,g=v?t.value():t;return a||(a=new Xn),o(m,g,n,r,a)}}if(!p)return!1;return a||(a=new Xn),function(e,t,n,r,o,a){var s=1&n,u=oi(e),c=u.length,l=oi(t).length;if(c!=l&&!s)return!1;var f=c;for(;f--;){var d=u[f];if(!(s?d in t:De.call(t,d)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);var m=s;for(;++f<c;){var g=e[d=u[f]],y=t[d];if(r)var b=s?r(y,g,d,t,e,a):r(g,y,d,e,t,a);if(!(b===i?g===y||o(g,y,n,r,a):b)){v=!1;break}m||(m="constructor"==d)}if(v&&!m){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,r,o,a)}(e,t,n,r,Rr,o))}function Nr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=_e(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var d=new Xn;if(r)var p=r(l,f,c,e,t,d);if(!(p===i?Rr(f,l,3,r,d):p))return!1}}return!0}function Mr(e){return!(!ts(e)||(t=e,Le&&Le in t))&&(Qa(e)?Ve:be).test(Bi(e));var t}function jr(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?$a(e)?zr(e[0],e[1]):Ur(e):pu(e)}function Dr(e){if(!ki(e))return gn(e);var t=[];for(var n in _e(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in _e(e))t.push(n);return t}(e);var t=ki(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}function Lr(e,t){return e<t}function Br(e,t){var r=-1,o=Ka(e)?n(e.length):[];return dr(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function Ur(e){var t=fi(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function zr(e,t){return xi(e)&&Oi(t)?Si(Li(e),t):function(n){var r=_s(n,e);return r===i&&r===t?Ts(n,e):Rr(t,r,3)}}function Vr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Xn),ts(a))!function(e,t,n,r,o,a,s){var u=Pi(e,n),c=Pi(t,n),l=s.get(c);if(l)return void er(e,n,l);var f=a?a(u,c,n+"",e,t,s):i,d=f===i;if(d){var p=$a(c),h=!p&&Xa(c),v=!p&&!h&&ls(c);f=c,p||h||v?$a(u)?f=u:Ga(u)?f=Po(u):h?(d=!1,f=ko(c,!0)):v?(d=!1,f=So(c,!0)):f=[]:is(c)||Ha(c)?(f=u,Ha(u)?f=ys(u):ts(u)&&!Qa(u)||(f=gi(c))):d=!1}d&&(s.set(c,f),o(f,c,r,a,s),s.delete(c));er(e,n,f)}(e,t,s,n,Vr,r,o);else{var u=r?r(Pi(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),Ns)}function Wr(e,t){var n=e.length;if(n)return bi(t+=t<0?n:0,n)?e[t]:i}function Hr(e,t,n){t=t.length?Mt(t,(function(e){return $a(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e})):[ou];var r=-1;return t=Mt(t,Jt(ci())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Br(e,(function(e,n,o){return{criteria:Mt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;for(;++r<a;){var u=_o(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function $r(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Cr(e,a);n(s,a)&&Zr(i,wo(a,e),s)}return i}function qr(e,t,n,r){var o=r?Wt:Vt,i=-1,a=t.length,s=e;for(e===t&&(t=Po(t)),n&&(s=Mt(e,Jt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Ye.call(s,u,1),Ye.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;bi(o)?Ye.call(e,o,1):fo(e,o)}}return e}function Gr(e,t){return e+mt(En()*(t-e+1))}function Xr(e,t){var n="";if(!e||t<1||t>v)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Ni(_i(e,t,ou),e+"")}function Jr(e){return Jn(zs(e))}function Qr(e,t){var n=zs(e);return Di(n,sr(t,0,n.length))}function Zr(e,t,n,r){if(!ts(e))return e;for(var o=-1,a=(t=wo(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Li(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ts(f)?f:bi(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var eo=Pn?function(e,t){return Pn.set(e,t),e}:ou,to=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ou;function no(e){return Di(zs(e))}function ro(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o<i;)a[o]=e[o+t];return a}function oo(e,t){var n;return dr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function io(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t===t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ao(e,t,ou,n)}function ao(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=cs(t),l=t===i;o<a;){var f=mt((o+a)/2),d=n(e[f]),p=d!==i,h=null===d,v=d===d,m=cs(d);if(s)var g=r||v;else g=l?v&&(r||p):u?v&&p&&(r||!h):c?v&&p&&!h&&(r||!m):!h&&!m&&(r?d<=t:d<t);g?o=f+1:a=f}return bn(a,4294967294)}function so(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function uo(e){return"number"==typeof e?e:cs(e)?m:+e}function co(e){if("string"==typeof e)return e;if($a(e))return Mt(e,co)+"";if(cs(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lo(e,t,n){var r=-1,o=Rt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=Nt;else if(i>=200){var c=t?null:Yo(e);if(c)return fn(c);a=!1,o=Zt,u=new Gn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function fo(e,t){return null==(e=Ti(e,t=wo(t,e)))||delete e[Li(Ji(t))]}function po(e,t,n,r){return Zr(e,t,n(Cr(e,t)),r)}function ho(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?ro(e,r?0:i,r?i+1:o):ro(e,r?i+1:0,r?o:i)}function vo(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function mo(e,t,r){var o=e.length;if(o<2)return o?lo(e[0]):[];for(var i=-1,a=n(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=fr(a[i]||s,e[u],t,r));return lo(gr(a,1),t,r)}function go(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function yo(e){return Ga(e)?e:[]}function bo(e){return"function"==typeof e?e:ou}function wo(e,t){return $a(e)?e:xi(e,t)?[e]:Fi(bs(e))}var xo=Yr;function Eo(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ro(e,t,n)}var Co=ct||function(e){return ht.clearTimeout(e)};function ko(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function Oo(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function So(e,t){var n=t?Oo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function _o(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=cs(e),s=t!==i,u=null===t,c=t===t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function To(e,t,r,o){for(var i=-1,a=e.length,s=r.length,u=-1,c=t.length,l=yn(a-s,0),f=n(c+l),d=!o;++u<c;)f[u]=t[u];for(;++i<s;)(d||i<a)&&(f[r[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function Io(e,t,r,o){for(var i=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,f=yn(a-u,0),d=n(f+l),p=!o;++i<f;)d[i]=e[i];for(var h=i;++c<l;)d[h+c]=t[c];for(;++s<u;)(p||i<a)&&(d[h+r[s]]=e[i++]);return d}function Po(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Ao(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):tr(n,u,c)}return n}function Ro(e,t){return function(n,r){var o=$a(n)?_t:rr,i=t?t():{};return o(n,e,ci(r,2),i)}}function No(e){return Yr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wi(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=_e(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Mo(e,t){return function(n,r){if(null==n)return n;if(!Ka(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=_e(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function jo(e){return function(t,n,r){for(var o=-1,i=_e(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function Do(e){return function(t){var n=sn(t=bs(t))?hn(t):i,r=n?n[0]:t.charAt(0),o=n?Eo(n,1).join(""):t.slice(1);return r[e]()+o}}function Fo(e){return function(t){return Dt(Qs(Hs(t).replace(Ze,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Bo(e){return function(t,n,r){var o=_e(t);if(!Ka(t)){var a=ci(n,3);t=Rs(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Uo(e){return ri((function(t){var n=t.length,r=n,o=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Pe(a);if(o&&!u&&"wrapper"==si(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=si(s=t[r]),l="wrapper"==c?ai(s):i;u=l&&Ei(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[si(l[0])].apply(u,l[3]):1==s.length&&Ei(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&$a(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function zo(e,t,r,o,a,s,u,c,l,f){var p=t&d,h=1&t,v=2&t,m=24&t,g=512&t,y=v?i:Lo(e);return function i(){for(var d=arguments.length,b=n(d),w=d;w--;)b[w]=arguments[w];if(m)var x=ui(i),E=nn(b,x);if(o&&(b=To(b,o,a,m)),s&&(b=Io(b,s,u,m)),d-=E,m&&d<f){var C=ln(b,x);return Go(e,t,zo,i.placeholder,r,b,C,c,l,f-d)}var k=h?r:this,O=v?k[e]:e;return d=b.length,c?b=Ii(b,c):g&&d>1&&b.reverse(),p&&l<d&&(b.length=l),this&&this!==ht&&this instanceof i&&(O=y||Lo(O)),O.apply(k,b)}}function Vo(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Wo(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=co(n),r=co(r)):(n=uo(n),r=uo(r)),o=e(n,r)}return o}}function Ho(e){return ri((function(t){return t=Mt(t,Jt(ci())),Yr((function(n){var r=this;return e(t,(function(e){return St(e,r,n)}))}))}))}function $o(e,t){var n=(t=t===i?" ":co(t)).length;if(n<2)return n?Xr(t,e):t;var r=Xr(t,vt(e/pn(t)));return sn(t)?Eo(hn(r),0,e).join(""):r.slice(0,e)}function qo(e){return function(t,r,o){return o&&"number"!=typeof o&&wi(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,o){for(var i=-1,a=yn(vt((t-e)/(r||1)),0),s=n(a);a--;)s[o?a:++i]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Go(e,t,n,r,o,a,s,u,c,d){var p=8&t;t|=p?l:f,4&(t&=~(p?f:l))||(t&=-4);var h=[e,t,o,p?a:i,p?s:i,p?i:a,p?i:s,u,c,d],v=n.apply(i,h);return Ei(e)&&Ai(v,h),v.placeholder=r,Mi(v,e,t)}function Xo(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:bn(vs(n),292))&&Bt(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yo=_n&&1/fn(new _n([,-0]))[1]==h?function(e){return new _n(e)}:cu;function Jo(e){return function(t){var n=vi(t);return n==S?un(t):n==A?dn(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qo(e,t,r,o,s,h,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Pe(a);var y=o?o.length:0;if(y||(t&=-97,o=s=i),v=v===i?v:yn(vs(v),0),m=m===i?m:vs(m),y-=s?s.length:0,t&f){var b=o,w=s;o=s=i}var x=g?i:ai(e),E=[e,t,r,o,s,b,w,h,v,m];if(x&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==d&&8==n||r==d&&n==p&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?To(c,s,t[4]):s,e[4]=c?ln(e[3],u):t[4]}(s=t[5])&&(c=e[5],e[5]=c?Io(c,s,t[6]):s,e[6]=c?ln(e[5],u):t[6]);(s=t[7])&&(e[7]=s);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(E,x),e=E[0],t=E[1],r=E[2],o=E[3],s=E[4],!(m=E[9]=E[9]===i?g?0:e.length:yn(E[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)C=8==t||t==c?function(e,t,r){var o=Lo(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=ui(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:ln(u,l);return(s-=f.length)<r?Go(e,t,zo,a.placeholder,i,u,f,i,i,r-s):St(this&&this!==ht&&this instanceof a?o:e,this,u)}}(e,t,m):t!=l&&33!=t||s.length?zo.apply(i,E):function(e,t,r,o){var i=1&t,a=Lo(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=n(l+u),d=this&&this!==ht&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return St(d,i?r:this,f)}}(e,t,r,o);else var C=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==ht&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,r);return Mi((x?eo:Ai)(C,E),e,t)}function Zo(e,t,n,r){return e===i||za(e,Ne[n])&&!De.call(r,n)?t:e}function ei(e,t,n,r,o,a){return ts(e)&&ts(t)&&(a.set(t,e),Vr(e,t,i,ei,a),a.delete(t)),e}function ti(e){return is(e)?i:e}function ni(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,h=2&n?new Gn:i;for(a.set(e,t),a.set(t,e);++d<u;){var v=e[d],m=t[d];if(r)var g=s?r(m,v,d,t,e,a):r(v,m,d,e,t,a);if(g!==i){if(g)continue;p=!1;break}if(h){if(!Lt(t,(function(e,t){if(!Zt(h,t)&&(v===e||o(v,e,n,r,a)))return h.push(t)}))){p=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ri(e){return Ni(_i(e,i,qi),e+"")}function oi(e){return kr(e,Rs,pi)}function ii(e){return kr(e,Ns,hi)}var ai=Pn?function(e){return Pn.get(e)}:cu;function si(e){for(var t=e.name+"",n=An[t],r=De.call(An,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ui(e){return(De.call(Un,"placeholder")?Un:e).placeholder}function ci(){var e=Un.iteratee||iu;return e=e===iu?jr:e,arguments.length?e(arguments[0],arguments[1]):e}function li(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function fi(e){for(var t=Rs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Oi(o)]}return t}function di(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Mr(n)?n:i}var pi=yt?function(e){return null==e?[]:(e=_e(e),At(yt(e),(function(t){return Xe.call(e,t)})))}:mu,hi=yt?function(e){for(var t=[];e;)jt(t,pi(e)),e=Ke(e);return t}:mu,vi=Or;function mi(e,t,n){for(var r=-1,o=(t=wo(t,e)).length,i=!1;++r<o;){var a=Li(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&es(o)&&bi(a,o)&&($a(e)||Ha(e))}function gi(e){return"function"!=typeof e.constructor||ki(e)?{}:zn(Ke(e))}function yi(e){return $a(e)||Ha(e)||!!(Je&&e&&e[Je])}function bi(e,t){var n=typeof e;return!!(t=null==t?v:t)&&("number"==n||"symbol"!=n&&xe.test(e))&&e>-1&&e%1==0&&e<t}function wi(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?Ka(n)&&bi(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function xi(e,t){if($a(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||(re.test(e)||!ne.test(e)||null!=t&&e in _e(t))}function Ei(e){var t=si(e),n=Un[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=ai(n);return!!r&&e===r[0]}(kn&&vi(new kn(new ArrayBuffer(1)))!=D||On&&vi(new On)!=S||Sn&&vi(Sn.resolve())!=I||_n&&vi(new _n)!=A||Tn&&vi(new Tn)!=M)&&(vi=function(e){var t=Or(e),n=t==T?e.constructor:i,r=n?Bi(n):"";if(r)switch(r){case Rn:return D;case Nn:return S;case Mn:return I;case jn:return A;case Dn:return M}return t});var Ci=Me?Qa:gu;function ki(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function Oi(e){return e===e&&!ts(e)}function Si(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in _e(n)))}}function _i(e,t,r){return t=yn(t===i?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=yn(o.length-t,0),s=n(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=n(t+1);++i<t;)u[i]=o[i];return u[t]=r(s),St(e,this,u)}}function Ti(e,t){return t.length<2?e:Cr(e,ro(t,0,-1))}function Ii(e,t){for(var n=e.length,r=bn(t.length,n),o=Po(e);r--;){var a=t[r];e[r]=bi(a,n)?o[a]:i}return e}function Pi(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Ai=ji(eo),Ri=pt||function(e,t){return ht.setTimeout(e,t)},Ni=ji(to);function Mi(e,t,n){var r=t+"";return Ni(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Tt(y,(function(n){var r="_."+n[0];t&n[1]&&!Rt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(fe);return t?t[1].split(de):[]}(r),n)))}function ji(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Di(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Gr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Fi=function(e){var t=ja(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(oe,(function(e,n,r,o){t.push(r?o.replace(he,"$1"):n||e)})),t}));function Li(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bi(e){if(null!=e){try{return je.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ui(e){if(e instanceof Hn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zi=Yr((function(e,t){return Ga(e)?fr(e,gr(t,1,Ga,!0)):[]})),Vi=Yr((function(e,t){var n=Ji(t);return Ga(n)&&(n=i),Ga(e)?fr(e,gr(t,1,Ga,!0),ci(n,2)):[]})),Wi=Yr((function(e,t){var n=Ji(t);return Ga(n)&&(n=i),Ga(e)?fr(e,gr(t,1,Ga,!0),i,n):[]}));function Hi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),zt(e,ci(t,3),o)}function $i(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=vs(n),o=n<0?yn(r+o,0):bn(o,r-1)),zt(e,ci(t,3),o,!0)}function qi(e){return(null==e?0:e.length)?gr(e,1):[]}function Ki(e){return e&&e.length?e[0]:i}var Gi=Yr((function(e){var t=Mt(e,yo);return t.length&&t[0]===e[0]?Ir(t):[]})),Xi=Yr((function(e){var t=Ji(e),n=Mt(e,yo);return t===Ji(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ir(n,ci(t,2)):[]})),Yi=Yr((function(e){var t=Ji(e),n=Mt(e,yo);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,i,t):[]}));function Ji(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Qi=Yr(Zi);function Zi(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var ea=ri((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Kr(e,Mt(t,(function(e){return bi(e,n)?+e:e})).sort(_o)),r}));function ta(e){return null==e?e:Cn.call(e)}var na=Yr((function(e){return lo(gr(e,1,Ga,!0))})),ra=Yr((function(e){var t=Ji(e);return Ga(t)&&(t=i),lo(gr(e,1,Ga,!0),ci(t,2))})),oa=Yr((function(e){var t=Ji(e);return t="function"==typeof t?t:i,lo(gr(e,1,Ga,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=At(e,(function(e){if(Ga(e))return t=yn(e.length,t),!0})),Yt(t,(function(t){return Mt(e,qt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Mt(n,(function(e){return St(t,i,e)}))}var sa=Yr((function(e,t){return Ga(e)?fr(e,t):[]})),ua=Yr((function(e){return mo(At(e,Ga))})),ca=Yr((function(e){var t=Ji(e);return Ga(t)&&(t=i),mo(At(e,Ga),ci(t,2))})),la=Yr((function(e){var t=Ji(e);return t="function"==typeof t?t:i,mo(At(e,Ga),i,t)})),fa=Yr(ia);var da=Yr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,aa(e,n)}));function pa(e){var t=Un(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var va=ri((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Hn&&bi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var ma=Ro((function(e,t,n){De.call(e,n)?++e[n]:ir(e,n,1)}));var ga=Bo(Hi),ya=Bo($i);function ba(e,t){return($a(e)?Tt:dr)(e,ci(t,3))}function wa(e,t){return($a(e)?It:pr)(e,ci(t,3))}var xa=Ro((function(e,t,n){De.call(e,n)?e[n].push(t):ir(e,n,[t])}));var Ea=Yr((function(e,t,r){var o=-1,i="function"==typeof t,a=Ka(e)?n(e.length):[];return dr(e,(function(e){a[++o]=i?St(t,e,r):Pr(e,t,r)})),a})),Ca=Ro((function(e,t,n){ir(e,n,t)}));function ka(e,t){return($a(e)?Mt:Br)(e,ci(t,3))}var Oa=Ro((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Sa=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wi(e,t[0],t[1])?t=[]:n>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,gr(t,1),[])})),_a=dt||function(){return ht.Date.now()};function Ta(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Qo(e,d,i,i,i,i,t)}function Ia(e,t){var n;if("function"!=typeof t)throw new Pe(a);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Pa=Yr((function(e,t,n){var r=1;if(n.length){var o=ln(n,ui(Pa));r|=l}return Qo(e,r,t,n,o)})),Aa=Yr((function(e,t,n){var r=3;if(n.length){var o=ln(n,ui(Aa));r|=l}return Qo(t,r,e,n,o)}));function Ra(e,t,n){var r,o,s,u,c,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Pe(a);function v(t){var n=r,a=o;return r=o=i,f=t,u=e.apply(a,n)}function m(e){return f=e,c=Ri(y,t),d?v(e):u}function g(e){var n=e-l;return l===i||n>=t||n<0||p&&e-f>=s}function y(){var e=_a();if(g(e))return b(e);c=Ri(y,function(e){var n=t-(e-l);return p?bn(n,s-(e-f)):n}(e))}function b(e){return c=i,h&&r?v(e):(r=o=i,u)}function w(){var e=_a(),n=g(e);if(r=arguments,o=this,l=e,n){if(c===i)return m(l);if(p)return Co(c),c=Ri(y,t),v(l)}return c===i&&(c=Ri(y,t)),u}return t=gs(t)||0,ts(n)&&(d=!!n.leading,s=(p="maxWait"in n)?yn(gs(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==i&&Co(c),f=0,r=l=o=c=i},w.flush=function(){return c===i?u:b(_a())},w}var Na=Yr((function(e,t){return lr(e,1,t)})),Ma=Yr((function(e,t,n){return lr(e,gs(t)||0,n)}));function ja(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(a);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ja.Cache||Kn),n}function Da(e){if("function"!=typeof e)throw new Pe(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ja.Cache=Kn;var Fa=xo((function(e,t){var n=(t=1==t.length&&$a(t[0])?Mt(t[0],Jt(ci())):Mt(gr(t,1),Jt(ci()))).length;return Yr((function(r){for(var o=-1,i=bn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return St(e,this,r)}))})),La=Yr((function(e,t){var n=ln(t,ui(La));return Qo(e,l,i,t,n)})),Ba=Yr((function(e,t){var n=ln(t,ui(Ba));return Qo(e,f,i,t,n)})),Ua=ri((function(e,t){return Qo(e,p,i,i,i,t)}));function za(e,t){return e===t||e!==e&&t!==t}var Va=Ko(Sr),Wa=Ko((function(e,t){return e>=t})),Ha=Ar(function(){return arguments}())?Ar:function(e){return ns(e)&&De.call(e,"callee")&&!Xe.call(e,"callee")},$a=n.isArray,qa=wt?Jt(wt):function(e){return ns(e)&&Or(e)==j};function Ka(e){return null!=e&&es(e.length)&&!Qa(e)}function Ga(e){return ns(e)&&Ka(e)}var Xa=bt||gu,Ya=xt?Jt(xt):function(e){return ns(e)&&Or(e)==E};function Ja(e){if(!ns(e))return!1;var t=Or(e);return t==C||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Qa(e){if(!ts(e))return!1;var t=Or(e);return t==k||t==O||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=Et?Jt(Et):function(e){return ns(e)&&vi(e)==S};function os(e){return"number"==typeof e||ns(e)&&Or(e)==_}function is(e){if(!ns(e)||Or(e)!=T)return!1;var t=Ke(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&je.call(n)==Ue}var as=Ct?Jt(Ct):function(e){return ns(e)&&Or(e)==P};var ss=kt?Jt(kt):function(e){return ns(e)&&vi(e)==A};function us(e){return"string"==typeof e||!$a(e)&&ns(e)&&Or(e)==R}function cs(e){return"symbol"==typeof e||ns(e)&&Or(e)==N}var ls=Ot?Jt(Ot):function(e){return ns(e)&&es(e.length)&&!!st[Or(e)]};var fs=Ko(Lr),ds=Ko((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Ka(e))return us(e)?hn(e):Po(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=vi(e);return(t==S?un:t==A?fn:zs)(e)}function hs(e){return e?(e=gs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function vs(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function ms(e){return e?sr(vs(e),0,g):0}function gs(e){if("number"==typeof e)return e;if(cs(e))return m;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(se,"");var n=ye.test(e);return n||we.test(e)?ft(e.slice(2),n?2:8):ge.test(e)?m:+e}function ys(e){return Ao(e,Ns(e))}function bs(e){return null==e?"":co(e)}var ws=No((function(e,t){if(ki(t)||Ka(t))Ao(t,Rs(t),e);else for(var n in t)De.call(t,n)&&tr(e,n,t[n])})),xs=No((function(e,t){Ao(t,Ns(t),e)})),Es=No((function(e,t,n,r){Ao(t,Ns(t),e,r)})),Cs=No((function(e,t,n,r){Ao(t,Rs(t),e,r)})),ks=ri(ar);var Os=Yr((function(e,t){e=_e(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wi(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Ns(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||za(f,Ne[l])&&!De.call(e,l))&&(e[l]=a[l])}return e})),Ss=Yr((function(e){return e.push(i,ei),St(js,i,e)}));function _s(e,t,n){var r=null==e?i:Cr(e,t);return r===i?n:r}function Ts(e,t){return null!=e&&mi(e,t,Tr)}var Is=Vo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=n}),tu(ou)),Ps=Vo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),ci),As=Yr(Pr);function Rs(e){return Ka(e)?Yn(e):Dr(e)}function Ns(e){return Ka(e)?Yn(e,!0):Fr(e)}var Ms=No((function(e,t,n){Vr(e,t,n)})),js=No((function(e,t,n,r){Vr(e,t,n,r)})),Ds=ri((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=wo(t,e),r||(r=t.length>1),t})),Ao(e,ii(e),n),r&&(n=ur(n,7,ti));for(var o=t.length;o--;)fo(n,t[o]);return n}));var Fs=ri((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return Ts(e,n)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var n=Mt(ii(e),(function(e){return[e]}));return t=ci(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var Bs=Jo(Rs),Us=Jo(Ns);function zs(e){return null==e?[]:Qt(e,Rs(e))}var Vs=Fo((function(e,t,n){return t=t.toLowerCase(),e+(n?Ws(t):t)}));function Ws(e){return Js(bs(e).toLowerCase())}function Hs(e){return(e=bs(e))&&e.replace(Ee,rn).replace(et,"")}var $s=Fo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=Fo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ks=Do("toLowerCase");var Gs=Fo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Xs=Fo((function(e,t,n){return e+(n?" ":"")+Js(t)}));var Ys=Fo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=Do("toUpperCase");function Qs(e,t,n){return e=bs(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(pe)||[]}(e):e.match(t)||[]}var Zs=Yr((function(e,t){try{return St(e,i,t)}catch(n){return Ja(n)?n:new o(n)}})),eu=ri((function(e,t){return Tt(t,(function(t){t=Li(t),ir(e,t,Pa(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Uo(),ru=Uo(!0);function ou(e){return e}function iu(e){return jr("function"==typeof e?e:ur(e,1))}var au=Yr((function(e,t){return function(n){return Pr(n,e,t)}})),su=Yr((function(e,t){return function(n){return Pr(e,n,t)}}));function uu(e,t,n){var r=Rs(t),o=Er(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Er(t,Rs(t)));var i=!(ts(n)&&"chain"in n)||!!n.chain,a=Qa(e);return Tt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Po(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})})),e}function cu(){}var lu=Ho(Mt),fu=Ho(Pt),du=Ho(Lt);function pu(e){return xi(e)?qt(Li(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hu=qo(),vu=qo(!0);function mu(){return[]}function gu(){return!1}var yu=Wo((function(e,t){return e+t}),0),bu=Xo("ceil"),wu=Wo((function(e,t){return e/t}),1),xu=Xo("floor");var Eu=Wo((function(e,t){return e*t}),1),Cu=Xo("round"),ku=Wo((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Pe(a);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Ta,Un.assign=ws,Un.assignIn=xs,Un.assignInWith=Es,Un.assignWith=Cs,Un.at=ks,Un.before=Ia,Un.bind=Pa,Un.bindAll=eu,Un.bindKey=Aa,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $a(e)?e:[e]},Un.chain=pa,Un.chunk=function(e,t,r){t=(r?wi(e,t,r):t===i)?1:yn(vs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(vt(o/t));a<o;)u[s++]=ro(e,a,a+=t);return u},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return jt($a(r)?Po(r):[r],gr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=ci();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Pe(a);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var o=e[r];if(St(o[0],this,n))return St(o[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=Rs(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Un.constant=tu,Un.countBy=ma,Un.create=function(e,t){var n=zn(e);return null==t?n:or(n,t)},Un.curry=function e(t,n,r){var o=Qo(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.curryRight=function e(t,n,r){var o=Qo(t,c,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.debounce=Ra,Un.defaults=Os,Un.defaultsDeep=Ss,Un.defer=Na,Un.delay=Ma,Un.difference=zi,Un.differenceBy=Vi,Un.differenceWith=Wi,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=n||t===i?1:vs(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,0,(t=r-(t=n||t===i?1:vs(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?ho(e,ci(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?ho(e,ci(t,3),!0):[]},Un.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wi(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=vs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:vs(r))<0&&(r+=o),r=n>r?0:ms(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return($a(e)?At:mr)(e,ci(t,3))},Un.flatMap=function(e,t){return gr(ka(e,t),1)},Un.flatMapDeep=function(e,t){return gr(ka(e,t),h)},Un.flatMapDepth=function(e,t,n){return n=n===i?1:vs(n),gr(ka(e,t),n)},Un.flatten=qi,Un.flattenDeep=function(e){return(null==e?0:e.length)?gr(e,h):[]},Un.flattenDepth=function(e,t){return(null==e?0:e.length)?gr(e,t=t===i?1:vs(t)):[]},Un.flip=function(e){return Qo(e,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Un.functions=function(e){return null==e?[]:Er(e,Rs(e))},Un.functionsIn=function(e){return null==e?[]:Er(e,Ns(e))},Un.groupBy=xa,Un.initial=function(e){return(null==e?0:e.length)?ro(e,0,-1):[]},Un.intersection=Gi,Un.intersectionBy=Xi,Un.intersectionWith=Yi,Un.invert=Is,Un.invertBy=Ps,Un.invokeMap=Ea,Un.iteratee=iu,Un.keyBy=Ca,Un.keys=Rs,Un.keysIn=Ns,Un.map=ka,Un.mapKeys=function(e,t){var n={};return t=ci(t,3),wr(e,(function(e,r,o){ir(n,t(e,r,o),e)})),n},Un.mapValues=function(e,t){var n={};return t=ci(t,3),wr(e,(function(e,r,o){ir(n,r,t(e,r,o))})),n},Un.matches=function(e){return Ur(ur(e,1))},Un.matchesProperty=function(e,t){return zr(e,ur(t,1))},Un.memoize=ja,Un.merge=Ms,Un.mergeWith=js,Un.method=au,Un.methodOf=su,Un.mixin=uu,Un.negate=Da,Un.nthArg=function(e){return e=vs(e),Yr((function(t){return Wr(t,e)}))},Un.omit=Ds,Un.omitBy=function(e,t){return Ls(e,Da(ci(t)))},Un.once=function(e){return Ia(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:($a(t)||(t=null==t?[]:[t]),$a(n=r?i:n)||(n=null==n?[]:[n]),Hr(e,t,n))},Un.over=lu,Un.overArgs=Fa,Un.overEvery=fu,Un.overSome=du,Un.partial=La,Un.partialRight=Ba,Un.partition=Oa,Un.pick=Fs,Un.pickBy=Ls,Un.property=pu,Un.propertyOf=function(e){return function(t){return null==e?i:Cr(e,t)}},Un.pull=Qi,Un.pullAll=Zi,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,ci(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,i,n):e},Un.pullAt=ea,Un.range=hu,Un.rangeRight=vu,Un.rearg=Ua,Un.reject=function(e,t){return($a(e)?At:mr)(e,Da(ci(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ci(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Kr(e,o),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Pe(a);return Yr(e,t=t===i?t:vs(t))},Un.reverse=ta,Un.sampleSize=function(e,t,n){return t=(n?wi(e,t,n):t===i)?1:vs(t),($a(e)?Qn:Qr)(e,t)},Un.set=function(e,t,n){return null==e?e:Zr(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Zr(e,t,n,r)},Un.shuffle=function(e){return($a(e)?Zn:no)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wi(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===i?r:vs(n)),ro(e,t,n)):[]},Un.sortBy=Sa,Un.sortedUniq=function(e){return e&&e.length?so(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?so(e,ci(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&wi(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=co(t))&&sn(e)?Eo(hn(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Pe(a);return t=null==t?0:yn(vs(t),0),Yr((function(n){var r=n[t],o=Eo(n,0,t);return r&&jt(o,r),St(e,this,o)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ro(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?ro(e,0,(t=n||t===i?1:vs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=r-(t=n||t===i?1:vs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?ho(e,ci(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?ho(e,ci(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Pe(a);return ts(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ra(e,t,{leading:r,maxWait:t,trailing:o})},Un.thru=ha,Un.toArray=ps,Un.toPairs=Bs,Un.toPairsIn=Us,Un.toPath=function(e){return $a(e)?Mt(e,Li):cs(e)?[e]:Po(Fi(bs(e)))},Un.toPlainObject=ys,Un.transform=function(e,t,n){var r=$a(e),o=r||Xa(e)||ls(e);if(t=ci(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Qa(i)?zn(Ke(e)):{}}return(o?Tt:wr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Un.unary=function(e){return Ta(e,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=oa,Un.uniq=function(e){return e&&e.length?lo(e):[]},Un.uniqBy=function(e,t){return e&&e.length?lo(e,ci(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?lo(e,i,t):[]},Un.unset=function(e,t){return null==e||fo(e,t)},Un.unzip=ia,Un.unzipWith=aa,Un.update=function(e,t,n){return null==e?e:po(e,t,bo(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:po(e,t,bo(n),r)},Un.values=zs,Un.valuesIn=function(e){return null==e?[]:Qt(e,Ns(e))},Un.without=sa,Un.words=Qs,Un.wrap=function(e,t){return La(bo(t),e)},Un.xor=ua,Un.xorBy=ca,Un.xorWith=la,Un.zip=fa,Un.zipObject=function(e,t){return go(e||[],t||[],tr)},Un.zipObjectDeep=function(e,t){return go(e||[],t||[],Zr)},Un.zipWith=da,Un.entries=Bs,Un.entriesIn=Us,Un.extend=xs,Un.extendWith=Es,uu(Un,Un),Un.add=yu,Un.attempt=Zs,Un.camelCase=Vs,Un.capitalize=Ws,Un.ceil=bu,Un.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=gs(n))===n?n:0),t!==i&&(t=(t=gs(t))===t?t:0),sr(gs(e),t,n)},Un.clone=function(e){return ur(e,4)},Un.cloneDeep=function(e){return ur(e,5)},Un.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Un.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Un.conformsTo=function(e,t){return null==t||cr(e,t,Rs(t))},Un.deburr=Hs,Un.defaultTo=function(e,t){return null==e||e!==e?t:e},Un.divide=wu,Un.endsWith=function(e,t,n){e=bs(e),t=co(t);var r=e.length,o=n=n===i?r:sr(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Un.eq=za,Un.escape=function(e){return(e=bs(e))&&Q.test(e)?e.replace(Y,on):e},Un.escapeRegExp=function(e){return(e=bs(e))&&ae.test(e)?e.replace(ie,"\\$&"):e},Un.every=function(e,t,n){var r=$a(e)?Pt:hr;return n&&wi(e,t,n)&&(t=i),r(e,ci(t,3))},Un.find=ga,Un.findIndex=Hi,Un.findKey=function(e,t){return Ut(e,ci(t,3),wr)},Un.findLast=ya,Un.findLastIndex=$i,Un.findLastKey=function(e,t){return Ut(e,ci(t,3),xr)},Un.floor=xu,Un.forEach=ba,Un.forEachRight=wa,Un.forIn=function(e,t){return null==e?e:yr(e,ci(t,3),Ns)},Un.forInRight=function(e,t){return null==e?e:br(e,ci(t,3),Ns)},Un.forOwn=function(e,t){return e&&wr(e,ci(t,3))},Un.forOwnRight=function(e,t){return e&&xr(e,ci(t,3))},Un.get=_s,Un.gt=Va,Un.gte=Wa,Un.has=function(e,t){return null!=e&&mi(e,t,_r)},Un.hasIn=Ts,Un.head=Ki,Un.identity=ou,Un.includes=function(e,t,n,r){e=Ka(e)?e:zs(e),n=n&&!r?vs(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),us(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Vt(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),Vt(e,t,o)},Un.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<yn(t,n)}(e=gs(e),t,n)},Un.invoke=As,Un.isArguments=Ha,Un.isArray=$a,Un.isArrayBuffer=qa,Un.isArrayLike=Ka,Un.isArrayLikeObject=Ga,Un.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Or(e)==x},Un.isBuffer=Xa,Un.isDate=Ya,Un.isElement=function(e){return ns(e)&&1===e.nodeType&&!is(e)},Un.isEmpty=function(e){if(null==e)return!0;if(Ka(e)&&($a(e)||"string"==typeof e||"function"==typeof e.splice||Xa(e)||ls(e)||Ha(e)))return!e.length;var t=vi(e);if(t==S||t==A)return!e.size;if(ki(e))return!Dr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Rr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Rr(e,t,i,n):!!r},Un.isError=Ja,Un.isFinite=function(e){return"number"==typeof e&&Bt(e)},Un.isFunction=Qa,Un.isInteger=Za,Un.isLength=es,Un.isMap=rs,Un.isMatch=function(e,t){return e===t||Nr(e,t,fi(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Nr(e,t,fi(t),n)},Un.isNaN=function(e){return os(e)&&e!=+e},Un.isNative=function(e){if(Ci(e))throw new o("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=os,Un.isObject=ts,Un.isObjectLike=ns,Un.isPlainObject=is,Un.isRegExp=as,Un.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=v},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(e){return e===i},Un.isWeakMap=function(e){return ns(e)&&vi(e)==M},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Or(e)},Un.join=function(e,t){return null==e?"":Kt.call(e,t)},Un.kebabCase=$s,Un.last=Ji,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vs(n))<0?yn(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):zt(e,Ht,o,!0)},Un.lowerCase=qs,Un.lowerFirst=Ks,Un.lt=fs,Un.lte=ds,Un.max=function(e){return e&&e.length?vr(e,ou,Sr):i},Un.maxBy=function(e,t){return e&&e.length?vr(e,ci(t,2),Sr):i},Un.mean=function(e){return $t(e,ou)},Un.meanBy=function(e,t){return $t(e,ci(t,2))},Un.min=function(e){return e&&e.length?vr(e,ou,Lr):i},Un.minBy=function(e,t){return e&&e.length?vr(e,ci(t,2),Lr):i},Un.stubArray=mu,Un.stubFalse=gu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Eu,Un.nth=function(e,t){return e&&e.length?Wr(e,vs(t)):i},Un.noConflict=function(){return ht._===this&&(ht._=ze),this},Un.noop=cu,Un.now=_a,Un.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return $o(mt(o),n)+e+$o(vt(o),n)},Un.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?pn(e):0;return t&&r<t?e+$o(t-r,n):e},Un.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?pn(e):0;return t&&r<t?$o(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),xn(bs(e).replace(ue,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wi(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return bn(e+o*(t-e+lt("1e-"+((o+"").length-1))),t)}return Gr(e,t)},Un.reduce=function(e,t,n){var r=$a(e)?Dt:Gt,o=arguments.length<3;return r(e,ci(t,4),n,o,dr)},Un.reduceRight=function(e,t,n){var r=$a(e)?Ft:Gt,o=arguments.length<3;return r(e,ci(t,4),n,o,pr)},Un.repeat=function(e,t,n){return t=(n?wi(e,t,n):t===i)?1:vs(t),Xr(bs(e),t)},Un.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,o=(t=wo(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Li(t[r])];a===i&&(r=o,a=n),e=Qa(a)?a.call(e):a}return e},Un.round=Cu,Un.runInContext=e,Un.sample=function(e){return($a(e)?Jn:Jr)(e)},Un.size=function(e){if(null==e)return 0;if(Ka(e))return us(e)?pn(e):e.length;var t=vi(e);return t==S||t==A?e.size:Dr(e).length},Un.snakeCase=Gs,Un.some=function(e,t,n){var r=$a(e)?Lt:oo;return n&&wi(e,t,n)&&(t=i),r(e,ci(t,3))},Un.sortedIndex=function(e,t){return io(e,t)},Un.sortedIndexBy=function(e,t,n){return ao(e,t,ci(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=io(e,t);if(r<n&&za(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return io(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return ao(e,t,ci(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=io(e,t,!0)-1;if(za(e[n],t))return n}return-1},Un.startCase=Xs,Un.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:sr(vs(n),0,e.length),t=co(t),e.slice(n,n+t.length)==t},Un.subtract=ku,Un.sum=function(e){return e&&e.length?Xt(e,ou):0},Un.sumBy=function(e,t){return e&&e.length?Xt(e,ci(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&wi(e,t,n)&&(t=i),e=bs(e),t=Es({},t,r,Zo);var o,a,s=Es({},t.imports,r.imports,Zo),u=Rs(s),c=Qt(s,u),l=0,f=t.interpolate||Ce,d="__p += '",p=Te((t.escape||Ce).source+"|"+f.source+"|"+(f===te?ve:Ce).source+"|"+(t.evaluate||Ce).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,(function(t,n,r,i,s,u){return r||(r=i),d+=e.slice(l,u).replace(ke,an),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var v=De.call(t,"variable")&&t.variable;v||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(q,""):d).replace(K,"$1").replace(G,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Zs((function(){return Oe(u,h+"return "+d).apply(i,c)}));if(m.source=d,Ja(m))throw m;return m},Un.times=function(e,t){if((e=vs(e))<1||e>v)return[];var n=g,r=bn(e,g);t=ci(t),e-=g;for(var o=Yt(r,t);++n<e;)t(n);return o},Un.toFinite=hs,Un.toInteger=vs,Un.toLength=ms,Un.toLower=function(e){return bs(e).toLowerCase()},Un.toNumber=gs,Un.toSafeInteger=function(e){return e?sr(vs(e),-9007199254740991,v):0===e?e:0},Un.toString=bs,Un.toUpper=function(e){return bs(e).toUpperCase()},Un.trim=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.replace(se,"");if(!e||!(t=co(t)))return e;var r=hn(e),o=hn(t);return Eo(r,en(r,o),tn(r,o)+1).join("")},Un.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.replace(ce,"");if(!e||!(t=co(t)))return e;var r=hn(e);return Eo(r,0,tn(r,hn(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.replace(ue,"");if(!e||!(t=co(t)))return e;var r=hn(e);return Eo(r,en(r,hn(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(ts(t)){var o="separator"in t?t.separator:o;n="length"in t?vs(t.length):n,r="omission"in t?co(t.omission):r}var a=(e=bs(e)).length;if(sn(e)){var s=hn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?Eo(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Te(o.source,bs(me.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?u:d)}}else if(e.indexOf(co(o),u)!=u){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Un.unescape=function(e){return(e=bs(e))&&J.test(e)?e.replace(X,vn):e},Un.uniqueId=function(e){var t=++Fe;return bs(e)+t},Un.upperCase=Ys,Un.upperFirst=Js,Un.each=ba,Un.eachRight=wa,Un.first=Ki,uu(Un,function(){var e={};return wr(Un,(function(t,n){De.call(Un.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Un.VERSION="4.17.20",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),Tt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===i?1:yn(vs(n),0);var r=this.__filtered__&&!t?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(ou)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Pr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Da(ci(e)))},Hn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(g)},wr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Hn,c=s[0],l=u||$a(t),f=function(e){var t=o.apply(Un,jt([e],s));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,v=u&&!p;if(!a&&l){t=v?t:new Hn(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[f],thisArg:i}),new Wn(m,d)}return h&&v?e.apply(this,s):(m=this.thru(f),h?r?m.value()[0]:m.value():m)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply($a(o)?o:[],e)}return this[n]((function(n){return t.apply($a(n)?n:[],e)}))}})),wr(Hn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";De.call(An,r)||(An[r]=[]),An[r].push({name:t,func:n})}})),An[zo(i,2).name]=[{name:"wrapper",func:i}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$a(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,d=0,p=bn(u,this.__takeCount__);if(!n||!r&&o==u&&p==u)return vo(e,this.__actions__);var h=[];e:for(;u--&&d<p;){for(var v=-1,m=e[c+=t];++v<f;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}h[d++]=m}return h},Un.prototype.at=va,Un.prototype.chain=function(){return pa(this)},Un.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Ui(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:i}),new Wn(t,this.__chain__)}return this.thru(ta)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,Qe&&(Un.prototype[Qe]=function(){return this}),Un}();ht._=mn,(o=function(){return mn}.call(t,n,t,r))===i||(r.exports=o)}).call(this)}).call(this,n(65),n(154)(e))},,function(e,t,n){"use strict";n(47),n(282)},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(157),n(158),function(){var e=i,t=e.lib,n=t.Base,r=t.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,o=this.cfg,i=o.hasher.create(),a=r.create(),s=a.words,u=o.keySize,c=o.iterations;s.length<u;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var l=1;l<c;l++)n=i.finalize(n),i.reset();a.concat(n)}return a.sigBytes=4*u,a}});e.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}}(),i.EvpKDF)}()},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.useLocaleReceiver=function(e,t){var n=l.useContext(d.default);return[l.useMemo((function(){var r=t||f.default[e||"global"],o=e&&n?n[e]:{};return(0,i.default)((0,i.default)({},"function"===typeof r?r():r),o||{})}),[e,t,n])]},t.default=void 0;var i=o(n(18)),a=o(n(66)),s=o(n(69)),u=o(n(70)),c=o(n(71)),l=r(n(0)),f=o(n(345)),d=o(n(208)),p=function(e){(0,u.default)(n,e);var t=(0,c.default)(n);function n(){return(0,a.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"getLocale",value:function(){var e=this.props,t=e.componentName,n=e.defaultLocale||f.default[t||"global"],r=this.context,o=t&&r?r[t]:{};return(0,i.default)((0,i.default)({},"function"===typeof n?n():n),o||{})}},{key:"getLocaleCode",value:function(){var e=this.context,t=e&&e.locale;return e&&e.exist&&!t?f.default.locale:t}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode(),this.context)}}]),n}(l.Component);t.default=p,p.defaultProps={componentName:"global"},p.contextType=d.default},function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SizeContextProvider=void 0;var o=r(n(0)),i=o.createContext(void 0);t.SizeContextProvider=function(e){var t=e.children,n=e.size;return o.createElement(i.Consumer,null,(function(e){return o.createElement(i.Provider,{value:n||e},t)}))};var a=i;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fillRef=i,t.composeRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){i(t,e)}))}},t.supportRef=function(e){var t,n,o=(0,r.isMemo)(e)?e.type.type:e.type;if("function"===typeof o&&!(null===(t=o.prototype)||void 0===t?void 0:t.render))return!1;if("function"===typeof e&&!(null===(n=e.prototype)||void 0===n?void 0:n.render))return!1;return!0};var r=n(91);function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){"function"===typeof e?e(t):"object"===o(e)&&e&&"current"in e&&(e.current=t)}},function(e,t,n){"use strict";e.exports=n(336)},,function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function s(e){r(a,o,i,s,u,"next",e)}function u(e){r(a,o,i,s,u,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return o}))},,function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(){var e=o,t=e.lib.WordArray;function n(e,n,r){for(var o=[],i=0,a=0;a<n;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2|r[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=s<<24-i%4*8,i++}return t.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),o.enc.Base64)}()},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(e){var t=o,n=t.lib,r=n.WordArray,i=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,o=e[r];e[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,a=e[t+0],u=e[t+1],p=e[t+2],h=e[t+3],v=e[t+4],m=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],E=e[t+11],C=e[t+12],k=e[t+13],O=e[t+14],S=e[t+15],_=i[0],T=i[1],I=i[2],P=i[3];_=c(_,T,I,P,a,7,s[0]),P=c(P,_,T,I,u,12,s[1]),I=c(I,P,_,T,p,17,s[2]),T=c(T,I,P,_,h,22,s[3]),_=c(_,T,I,P,v,7,s[4]),P=c(P,_,T,I,m,12,s[5]),I=c(I,P,_,T,g,17,s[6]),T=c(T,I,P,_,y,22,s[7]),_=c(_,T,I,P,b,7,s[8]),P=c(P,_,T,I,w,12,s[9]),I=c(I,P,_,T,x,17,s[10]),T=c(T,I,P,_,E,22,s[11]),_=c(_,T,I,P,C,7,s[12]),P=c(P,_,T,I,k,12,s[13]),I=c(I,P,_,T,O,17,s[14]),_=l(_,T=c(T,I,P,_,S,22,s[15]),I,P,u,5,s[16]),P=l(P,_,T,I,g,9,s[17]),I=l(I,P,_,T,E,14,s[18]),T=l(T,I,P,_,a,20,s[19]),_=l(_,T,I,P,m,5,s[20]),P=l(P,_,T,I,x,9,s[21]),I=l(I,P,_,T,S,14,s[22]),T=l(T,I,P,_,v,20,s[23]),_=l(_,T,I,P,w,5,s[24]),P=l(P,_,T,I,O,9,s[25]),I=l(I,P,_,T,h,14,s[26]),T=l(T,I,P,_,b,20,s[27]),_=l(_,T,I,P,k,5,s[28]),P=l(P,_,T,I,p,9,s[29]),I=l(I,P,_,T,y,14,s[30]),_=f(_,T=l(T,I,P,_,C,20,s[31]),I,P,m,4,s[32]),P=f(P,_,T,I,b,11,s[33]),I=f(I,P,_,T,E,16,s[34]),T=f(T,I,P,_,O,23,s[35]),_=f(_,T,I,P,u,4,s[36]),P=f(P,_,T,I,v,11,s[37]),I=f(I,P,_,T,y,16,s[38]),T=f(T,I,P,_,x,23,s[39]),_=f(_,T,I,P,k,4,s[40]),P=f(P,_,T,I,a,11,s[41]),I=f(I,P,_,T,h,16,s[42]),T=f(T,I,P,_,g,23,s[43]),_=f(_,T,I,P,w,4,s[44]),P=f(P,_,T,I,C,11,s[45]),I=f(I,P,_,T,S,16,s[46]),_=d(_,T=f(T,I,P,_,p,23,s[47]),I,P,a,6,s[48]),P=d(P,_,T,I,y,10,s[49]),I=d(I,P,_,T,O,15,s[50]),T=d(T,I,P,_,m,21,s[51]),_=d(_,T,I,P,C,6,s[52]),P=d(P,_,T,I,h,10,s[53]),I=d(I,P,_,T,x,15,s[54]),T=d(T,I,P,_,u,21,s[55]),_=d(_,T,I,P,b,6,s[56]),P=d(P,_,T,I,S,10,s[57]),I=d(I,P,_,T,g,15,s[58]),T=d(T,I,P,_,k,21,s[59]),_=d(_,T,I,P,v,6,s[60]),P=d(P,_,T,I,E,10,s[61]),I=d(I,P,_,T,p,15,s[62]),T=d(T,I,P,_,w,21,s[63]),i[0]=i[0]+_|0,i[1]=i[1]+T|0,i[2]=i[2]+I|0,i[3]=i[3]+P|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var i=e.floor(r/4294967296),a=r;n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+o+a;return(s<<i|s>>>32-i)+t}function l(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+o+a;return(s<<i|s>>>32-i)+t}function f(e,t,n,r,o,i,a){var s=e+(t^n^r)+o+a;return(s<<i|s>>>32-i)+t}function d(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+o+a;return(s<<i|s>>>32-i)+t}t.MD5=i._createHelper(u),t.HmacMD5=i._createHmacHelper(u)}(Math),o.MD5)}()},function(e,t,n){var r=n(406),o=n(411);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.r(t),n.d(t,"Field",(function(){return te})),n.d(t,"List",(function(){return ne})),n.d(t,"useForm",(function(){return ae})),n.d(t,"FormProvider",(function(){return ue}));var r=n(0),o=n(68),i=n(21),a=n(13),s=n(4),u=n(17),c=n(23),l=n(26),f=n(40),d=n(30),p=n(36),h=n(58),v=n(33),m="RC_FORM_INTERNAL_HOOKS",g=function(){Object(v.a)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},y=r.createContext({getFieldValue:g,getFieldsValue:g,getFieldError:g,getFieldsError:g,isFieldsTouched:g,isFieldTouched:g,isFieldValidating:g,isFieldsValidating:g,resetFields:g,setFields:g,setFieldsValue:g,validateFields:g,submit:g,getInternalHooks:function(){return g(),{dispatch:g,initEntityValue:g,registerField:g,useSubscribe:g,setInitialValues:g,setCallbacks:g,getFields:g,setValidateMessages:g,setPreserve:g}}});function b(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}var w=n(59),x=n.n(w),E=n(93),C=n(37),k=n(268);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){return function(e){if(Array.isArray(e))return P(e)}(e)||A(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){return function(e){if(Array.isArray(e))return e}(e)||A(e)||I(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){if(e){if("string"===typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function R(e,t,n){if(!t.length)return n;var r,o=T(t),i=o[0],a=o.slice(1);return(r=e||"number"!==typeof i?Array.isArray(e)?_(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e):[])[i]=R(r[i],a,n),r}function N(e){return b(e)}function M(e,t){return function(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null===n||void 0===n)return;n=n[t[r]]}return n}(e,t)}function j(e,t,n){return R(e,t,n)}function D(e,t){var n={};return t.forEach((function(t){var r=M(e,t);n=j(n,t,r)})),n}function F(e,t){return e&&e.some((function(e){return z(e,t)}))}function L(e){return"object"===Object(C.a)(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function B(e,t){var n=Array.isArray(e)?Object(u.a)(e):Object(s.a)({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],o=t[e],i=L(r)&&L(o);n[e]=i?B(r,o||{}):o})),n):n}function U(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return B(e,t)}),e)}function z(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))}function V(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&e in t.target?t.target[e]:t}function W(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat(Object(u.a)(e.slice(0,n)),[o],Object(u.a)(e.slice(n,t)),Object(u.a)(e.slice(t+1,r))):i<0?[].concat(Object(u.a)(e.slice(0,t)),Object(u.a)(e.slice(t+1,n+1)),[o],Object(u.a)(e.slice(n+1,r))):e}var H="'${name}' is not a valid ${type}",$={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:H,method:H,array:H,object:H,number:H,date:H,boolean:H,integer:H,float:H,regexp:H,email:H,url:H,hex:H},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},q=k.a;function K(e,t,n,r){var o=Object(s.a)(Object(s.a)({},n),{},{name:t,enum:(n.enum||[]).join(", ")}),i=function(e,t){return function(){return function(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}(e,Object(s.a)(Object(s.a)({},o),t))}};return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(o){var a=t[o];"string"===typeof a?n[o]=i(a,r):a&&"object"===Object(C.a)(a)?(n[o]={},e(a,n[o])):n[o]=a})),n}(U({},$,e))}function G(e,t,n,r,o){return X.apply(this,arguments)}function X(){return(X=Object(E.a)(x.a.mark((function e(t,n,o,i,c){var l,f,d,p,h,v;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=Object(s.a)({},o),f=null,l&&"array"===l.type&&l.defaultField&&(f=l.defaultField,delete l.defaultField),d=new q(Object(a.a)({},t,[l])),p=K(i.validateMessages,t,l,c),d.messages(p),h=[],e.prev=7,e.next=10,Promise.resolve(d.validate(Object(a.a)({},t,n),Object(s.a)({},i)));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),e.t0.errors?h=e.t0.errors.map((function(e,t){var n=e.message;return r.isValidElement(n)?r.cloneElement(n,{key:"error_".concat(t)}):n})):(console.error(e.t0),h=[p.default()]);case 15:if(h.length||!f){e.next=20;break}return e.next=18,Promise.all(n.map((function(e,n){return G("".concat(t,".").concat(n),e,f,i,c)})));case 18:return v=e.sent,e.abrupt("return",v.reduce((function(e,t){return[].concat(Object(u.a)(e),Object(u.a)(t))}),[]));case 20:return e.abrupt("return",h);case 21:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function Y(e,t,n,r,o,i){var a,u=e.join("."),c=n.map((function(e){var t=e.validator;return t?Object(s.a)(Object(s.a)({},e),{},{validator:function(e,n,r){var o=!1,i=t(e,n,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){Object(v.a)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)}))}));o=i&&"function"===typeof i.then&&"function"===typeof i.catch,Object(v.a)(o,"`callback` is deprecated. Please return a promise instead."),o&&i.then((function(){r()})).catch((function(e){r(e||" ")}))}}):e}));if(!0===o)a=new Promise(function(){var e=Object(E.a)(x.a.mark((function e(n,o){var a,s;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a<c.length)){e.next=11;break}return e.next=4,G(u,t,c[a],r,i);case 4:if(!(s=e.sent).length){e.next=8;break}return o(s),e.abrupt("return");case 8:a+=1,e.next=1;break;case 11:n([]);case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var l=c.map((function(e){return G(u,t,e,r,i)}));a=(o?function(e){return Q.apply(this,arguments)}(l):function(e){return J.apply(this,arguments)}(l)).then((function(e){return e.length?Promise.reject(e):[]}))}return a.catch((function(e){return e})),a}function J(){return(J=Object(E.a)(x.a.mark((function e(t){return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,Object(u.a)(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(){return(Q=Object(E.a)(x.a.mark((function e(t){var n;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.length&&e(r),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e,t,n,r,o,i){return"function"===typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var ee=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var o;(Object(c.a)(this,n),(o=t.call(this,e)).state={resetCount:0},o.cancelRegisterFunc=null,o.mounted=!1,o.touched=!1,o.dirty=!1,o.validatePromise=null,o.errors=[],o.cancelRegister=function(){var e=o.props,t=e.preserve,n=e.isListField;o.cancelRegisterFunc&&o.cancelRegisterFunc(n,t),o.cancelRegisterFunc=null},o.getNamePath=function(){var e=o.props,t=e.name,n=e.fieldContext.prefixName,r=void 0===n?[]:n;return void 0!==t?[].concat(Object(u.a)(r),Object(u.a)(t)):[]},o.getRules=function(){var e=o.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"===typeof e?e(r):e}))},o.refresh=function(){o.mounted&&o.setState((function(e){return{resetCount:e.resetCount+1}}))},o.onStoreChange=function(e,t,n){var r=o.props,i=r.shouldUpdate,a=r.dependencies,s=void 0===a?[]:a,u=r.onReset,c=n.store,l=o.getNamePath(),f=o.getValue(e),d=o.getValue(c),p=t&&F(t,l);switch("valueUpdate"===n.type&&"external"===n.source&&f!==d&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=[]),n.type){case"reset":if(!t||p)return o.touched=!1,o.dirty=!1,o.validatePromise=null,o.errors=[],u&&u(),void o.refresh();break;case"setField":if(p){var h=n.data;return"touched"in h&&(o.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(o.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(o.errors=h.errors||[]),o.dirty=!0,void o.reRender()}if(i&&!l.length&&Z(i,e,c,f,d,n))return void o.reRender();break;case"dependenciesUpdate":if(s.map(N).some((function(e){return F(n.relatedFields,e)})))return void o.reRender();break;default:if(p||(!s.length||l.length||i)&&Z(i,e,c,f,d,n))return void o.reRender()}!0===i&&o.reRender()},o.validateRules=function(e){var t=o.getNamePath(),n=o.getValue(),r=Promise.resolve().then((function(){if(!o.mounted)return[];var i=o.props,a=i.validateFirst,s=void 0!==a&&a,u=i.messageVariables,c=(e||{}).triggerName,l=o.getRules();c&&(l=l.filter((function(e){var t=e.validateTrigger;return!t||b(t).includes(c)})));var f=Y(t,n,l,e,s,u);return f.catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o.validatePromise===r&&(o.validatePromise=null,o.errors=e,o.reRender())})),f}));return o.validatePromise=r,o.dirty=!0,o.errors=[],o.reRender(),r},o.isFieldValidating=function(){return!!o.validatePromise},o.isFieldTouched=function(){return o.touched},o.isFieldDirty=function(){return o.dirty},o.getErrors=function(){return o.errors},o.isListField=function(){return o.props.isListField},o.isList=function(){return o.props.isList},o.getMeta=function(){return o.prevValidating=o.isFieldValidating(),{touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,name:o.getNamePath()}},o.getOnlyChild=function(e){if("function"===typeof e){var t=o.getMeta();return Object(s.a)(Object(s.a)({},o.getOnlyChild(e(o.getControlled(),t,o.props.fieldContext))),{},{isFunction:!0})}var n=Object(h.a)(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}},o.getValue=function(e){var t=o.props.fieldContext.getFieldsValue,n=o.getNamePath();return M(e||t(!0),n)},o.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.props,n=t.trigger,r=t.validateTrigger,i=t.getValueFromEvent,u=t.normalize,c=t.valuePropName,l=t.getValueProps,f=t.fieldContext,d=void 0!==r?r:f.validateTrigger,p=o.getNamePath(),h=f.getInternalHooks,v=f.getFieldsValue,g=h(m),y=g.dispatch,w=o.getValue(),x=l||function(e){return Object(a.a)({},c,e)},E=e[n],C=Object(s.a)(Object(s.a)({},e),x(w));C[n]=function(){var e;o.touched=!0,o.dirty=!0;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e=i?i.apply(void 0,n):V.apply(void 0,[c].concat(n)),u&&(e=u(e,w,v(!0))),y({type:"updateValue",namePath:p,value:e}),E&&E.apply(void 0,n)};var k=b(d||[]);return k.forEach((function(e){var t=C[e];C[e]=function(){t&&t.apply(void 0,arguments);var n=o.props.rules;n&&n.length&&y({type:"validateField",namePath:p,triggerName:e})}})),C},e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(m).initEntityValue)(Object(f.a)(o));return o}return Object(l.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(m).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,o=this.getOnlyChild(n),i=o.child;return o.isFunction?e=i:r.isValidElement(i)?e=r.cloneElement(i,this.getControlled(i.props)):(Object(v.a)(!i,"`children` of Field is not validate ReactElement."),e=i),r.createElement(r.Fragment,{key:t},e)}}]),n}(r.Component);ee.contextType=y,ee.defaultProps={trigger:"onChange",valuePropName:"value"};var te=function(e){var t=e.name,n=Object(i.a)(e,["name"]),a=r.useContext(y),s=void 0!==t?N(t):void 0,u="keep";return n.isListField||(u="_".concat((s||[]).join("_"))),r.createElement(ee,Object(o.a)({key:u,name:s},n,{fieldContext:a}))},ne=function(e){var t=e.name,n=e.initialValue,o=e.children,i=e.rules,a=e.validateTrigger,c=r.useContext(y),l=r.useRef({keys:[],id:0}).current;if("function"!==typeof o)return Object(v.a)(!1,"Form.List only accepts function as children."),null;var f=N(c.prefixName)||[],d=[].concat(Object(u.a)(f),Object(u.a)(N(t)));return r.createElement(y.Provider,{value:Object(s.a)(Object(s.a)({},c),{},{prefixName:d})},r.createElement(te,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:a,initialValue:n,isList:!0},(function(e,t){var n=e.value,r=void 0===n?[]:n,i=e.onChange,a=c.getFieldValue,s=function(){return a(d||[])||[]},f={add:function(e,t){var n=s();t>=0&&t<=n.length?(l.keys=[].concat(Object(u.a)(l.keys.slice(0,t)),[l.id],Object(u.a)(l.keys.slice(t))),i([].concat(Object(u.a)(n.slice(0,t)),[e],Object(u.a)(n.slice(t))))):(l.keys=[].concat(Object(u.a)(l.keys),[l.id]),i([].concat(Object(u.a)(n),[e]))),l.id+=1},remove:function(e){var t=s(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(l.keys=l.keys.filter((function(e,t){return!n.has(t)})),i(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=s();e<0||e>=n.length||t<0||t>=n.length||(l.keys=W(l.keys,e,t),i(W(n,e,t)))}}},p=r||[];return Array.isArray(p)||(p=[]),o(p.map((function(e,t){var n=l.keys[t];return void 0===n&&(l.keys[t]=l.id,n=l.keys[t],l.id+=1),{name:t,key:n,isListField:!0}})),f,t)})))},re=n(11);var oe=function(){function e(){Object(c.a)(this,e),this.list=[]}return Object(l.a)(e,[{key:"set",value:function(e,t){var n=this.list.findIndex((function(t){return z(t.key,e)}));-1!==n?this.list[n].value=t:this.list.push({key:e,value:t})}},{key:"get",value:function(e){var t=this.list.find((function(t){return z(t.key,e)}));return t&&t.value}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.list=this.list.filter((function(t){return!z(t.key,e)}))}},{key:"map",value:function(e){return this.list.map(e)}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}(),ie=function e(t){var n=this;Object(c.a)(this,e),this.formHooked=!1,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===m?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve}):(Object(v.a)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){n.subscribable=e},this.setInitialValues=function(e,t){n.initialValues=e||{},t&&(n.store=U({},e,n.store))},this.getInitialValue=function(e){return M(n.initialValues,e)},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.timeoutId=null,this.warningUnhooked=function(){0},this.getFieldEntities=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new oe;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=N(e);return t.get(n)||{INVALIDATE_NAME_PATH:N(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),o=[];return r.forEach((function(n){var r,i="INVALIDATE_NAME_PATH"in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var a="getMeta"in n?n.getMeta():null;t(a)&&o.push(i)}else o.push(i)})),D(n.store,o.map(N))},this.getFieldValue=function(e){n.warningUnhooked();var t=N(e);return M(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors()}:{name:N(e[n]),errors:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=N(e);return n.getFieldsError([t])[0].errors},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,i=t[0],a=t[1],s=!1;0===t.length?o=null:1===t.length?Array.isArray(i)?(o=i.map(N),s=!1):(o=null,s=i):(o=i.map(N),s=a);var c=n.getFieldEntities(!0),l=function(e){return e.isFieldTouched()};if(!o)return s?c.every(l):c.some(l);var f=new oe;o.forEach((function(e){f.set(e,[])})),c.forEach((function(e){var t=e.getNamePath();o.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&f.update(n,(function(t){return[].concat(Object(u.a)(t),[e])}))}))}));var d=function(e){return e.some(l)},p=f.map((function(e){return e.value}));return s?p.every(d):p.some(d)},this.isFieldTouched=function(e){return n.warningUnhooked(),n.isFieldsTouched([e])},this.isFieldsValidating=function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(N);return t.some((function(e){var t=e.getNamePath();return F(r,t)&&e.isFieldValidating()}))},this.isFieldValidating=function(e){return n.warningUnhooked(),n.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new oe,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var o=t.get(r)||new Set;o.add({entity:e,value:n}),t.set(r,o)}}));var o,i=function(r){r.forEach((function(r){if(void 0!==r.props.initialValue){var o=r.getNamePath();if(void 0!==n.getInitialValue(o))Object(v.a)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var i=t.get(o);if(i&&i.size>1)Object(v.a)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var a=n.getFieldValue(o);e.skipExist&&void 0!==a||(n.store=j(n.store,o,Object(u.a)(i)[0].value))}}}}))};e.entities?o=e.entities:e.namePathList?(o=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=o).push.apply(n,Object(u.a)(Object(u.a)(r).map((function(e){return e.entity}))))}))):o=r,i(o)},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.store=U({},n.initialValues),n.resetWithFieldInitialValue(),void n.notifyObservers(t,null,{type:"reset"});var r=e.map(N);r.forEach((function(e){var t=n.getInitialValue(e);n.store=j(n.store,e,t)})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"})},this.setFields=function(e){n.warningUnhooked();var t=n.store;e.forEach((function(e){var r=e.name,o=(e.errors,Object(i.a)(e,["name","errors"])),a=N(r);"value"in o&&(n.store=j(n.store,a,o.value)),n.notifyObservers(t,[a],{type:"setField",data:e})}))},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),o=Object(s.a)(Object(s.a)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===M(n.store,r)&&(n.store=j(n.store,r,t))}},this.registerField=function(e){if(n.fieldEntities.push(e),void 0!==e.props.initialValue){var t=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(t,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(t,r){if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!1===(void 0!==r?r:n.preserve)&&!t){var o=e.getNamePath();o.length&&void 0!==n.getFieldValue(o)&&(n.store=j(n.store,o,void 0))}}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,i=e.triggerName;n.validateFields([o],{triggerName:i})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var o=Object(s.a)(Object(s.a)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()},this.updateValue=function(e,t){var r=N(e),o=n.store;n.store=j(n.store,r,t),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"});var i=n.getDependencyChildrenFields(r);i.length&&n.validateFields(i),n.notifyObservers(o,i,{type:"dependenciesUpdate",relatedFields:[r].concat(Object(u.a)(i))});var a=n.callbacks.onValuesChange;a&&a(D(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(Object(u.a)(i)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;e&&(n.store=U(n.store,e)),n.notifyObservers(t,null,{type:"valueUpdate",source:"external"})},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],o=new oe;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=N(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var i=new oe;t.forEach((function(e){var t=e.name,n=e.errors;i.set(t,n)})),o.forEach((function(e){e.errors=i.get(e.name)||e.errors}))}r(o.filter((function(t){var n=t.name;return F(e,n)})),o)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,o=r?e.map(N):[],i=[];n.getFieldEntities(!0).forEach((function(a){if(r||o.push(a.getNamePath()),(null===t||void 0===t?void 0:t.recursive)&&r){var u=a.getNamePath();u.every((function(t,n){return e[n]===t||void 0===e[n]}))&&o.push(u)}if(a.props.rules&&a.props.rules.length){var c=a.getNamePath();if(!r||F(o,c)){var l=a.validateRules(Object(s.a)({validateMessages:Object(s.a)(Object(s.a)({},$),n.validateMessages)},t));i.push(l.then((function(){return{name:c,errors:[]}})).catch((function(e){return Promise.reject({name:c,errors:e})})))}}}));var a=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,i){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&i(r),o(r))}))}))})):Promise.resolve([])}(i);n.lastValidatePromise=a,a.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var u=a.then((function(){return n.lastValidatePromise===a?Promise.resolve(n.getFieldsValue(o)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(o),errorFields:t,outOfDate:n.lastValidatePromise!==a})}));return u.catch((function(e){return e})),u},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t};var ae=function(e){var t=r.useRef(),n=r.useState({}),o=Object(re.a)(n,2)[1];if(!t.current)if(e)t.current=e;else{var i=new ie((function(){o({})}));t.current=i.getForm()}return[t.current]},se=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),ue=function(e){var t=e.validateMessages,n=e.onFormChange,o=e.onFormFinish,i=e.children,u=r.useContext(se),c=r.useRef({});return r.createElement(se.Provider,{value:Object(s.a)(Object(s.a)({},u),{},{validateMessages:Object(s.a)(Object(s.a)({},u.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:c.current}),u.triggerFormChange(e,t)},triggerFormFinish:function(e,t){o&&o(e,{values:t,forms:c.current}),u.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(c.current=Object(s.a)(Object(s.a)({},c.current),{},Object(a.a)({},e,t))),u.registerForm(e,t)},unregisterForm:function(e){var t=Object(s.a)({},c.current);delete t[e],c.current=t,u.unregisterForm(e)}})},i)},ce=se,le=function(e,t){var n=e.name,a=e.initialValues,c=e.fields,l=e.form,f=e.preserve,d=e.children,p=e.component,h=void 0===p?"form":p,v=e.validateMessages,g=e.validateTrigger,b=void 0===g?"onChange":g,w=e.onValuesChange,x=e.onFieldsChange,E=e.onFinish,k=e.onFinishFailed,O=Object(i.a)(e,["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"]),S=r.useContext(ce),_=ae(l),T=Object(re.a)(_,1)[0],I=T.getInternalHooks(m),P=I.useSubscribe,A=I.setInitialValues,R=I.setCallbacks,N=I.setValidateMessages,M=I.setPreserve;r.useImperativeHandle(t,(function(){return T})),r.useEffect((function(){return S.registerForm(n,T),function(){S.unregisterForm(n)}}),[S,T,n]),N(Object(s.a)(Object(s.a)({},S.validateMessages),v)),R({onValuesChange:w,onFieldsChange:function(e){if(S.triggerFormChange(n,e),x){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];x.apply(void 0,[e].concat(r))}},onFinish:function(e){S.triggerFormFinish(n,e),E&&E(e)},onFinishFailed:k}),M(f);var j=r.useRef(null);A(a,!j.current),j.current||(j.current=!0);var D=d,F="function"===typeof d;F&&(D=d(T.getFieldsValue(!0),T));P(!F);var L=r.useRef();r.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==Object(C.a)(e)||"object"!==Object(C.a)(t))return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(Object(u.a)(n),Object(u.a)(r)));return Object(u.a)(o).every((function(n){var r=e[n],o=t[n];return"function"===typeof r&&"function"===typeof o||r===o}))})(L.current||[],c||[])||T.setFields(c||[]),L.current=c}),[c,T]);var B=r.useMemo((function(){return Object(s.a)(Object(s.a)({},T),{},{validateTrigger:b})}),[T,b]),U=r.createElement(y.Provider,{value:B},D);return!1===h?U:r.createElement(h,Object(o.a)({},O,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),T.submit()}}),U)},fe=r.forwardRef(le);fe.FormProvider=ue,fe.Field=te,fe.List=ne,fe.useForm=ae;t.default=fe},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(39)),s=o(n(18)),u=r(n(0)),c=o(n(600)),l=o(n(10)),f=o(n(465)),d=n(76),p=n(29),h=n(467),v=new RegExp("^(".concat(h.PresetColorTypes.join("|"),")(-inverse)?$"));function m(e,t){var n=e.type;if((!0===n.__ANT_BUTTON||!0===n.__ANT_SWITCH||!0===n.__ANT_CHECKBOX||"button"===e.type)&&e.props.disabled){var r=function(e,t){var n={},r=(0,s.default)({},e);return t.forEach((function(t){e&&t in e&&(n[t]=e[t],delete r[t])})),{picked:n,omitted:r}}(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),o=r.picked,i=r.omitted,a=(0,s.default)((0,s.default)({display:"inline-block"},o),{cursor:"not-allowed",width:e.props.block?"100%":null}),c=(0,s.default)((0,s.default)({},i),{pointerEvents:"none"}),f=(0,d.cloneElement)(e,{style:c,className:null});return u.createElement("span",{style:a,className:(0,l.default)(e.props.className,"".concat(t,"-disabled-compatible-wrapper"))},f)}return e}var g=u.forwardRef((function(e,t){var n,r=u.useContext(p.ConfigContext),o=r.getPopupContainer,h=r.getPrefixCls,g=r.direction,y=u.useState(!!e.visible||!!e.defaultVisible),b=(0,a.default)(y,2),w=b[0],x=b[1];u.useEffect((function(){"visible"in e&&x(e.visible)}),[e.visible]);var E=function(){var t=e.title,n=e.overlay;return!t&&!n&&0!==t},C=function(){var t=e.builtinPlacements,n=e.arrowPointAtCenter,r=e.autoAdjustOverflow;return t||(0,f.default)({arrowPointAtCenter:n,autoAdjustOverflow:r})},k=e.prefixCls,O=e.openClassName,S=e.getPopupContainer,_=e.getTooltipContainer,T=e.overlayClassName,I=e.color,P=e.overlayInnerStyle,A=e.children,R=h("tooltip",k),N=w;!("visible"in e)&&E()&&(N=!1);var M,j,D=m((0,d.isValidElement)(A)?A:u.createElement("span",null,A),R),F=D.props,L=(0,l.default)(F.className,(0,i.default)({},O||"".concat(R,"-open"),!0)),B=(0,l.default)(T,(n={},(0,i.default)(n,"".concat(R,"-rtl"),"rtl"===g),(0,i.default)(n,"".concat(R,"-").concat(I),I&&v.test(I)),n));return I&&!v.test(I)&&(M=(0,s.default)((0,s.default)({},P),{background:I}),j={background:I}),u.createElement(c.default,(0,s.default)({},e,{prefixCls:R,overlayClassName:B,getTooltipContainer:S||_||o,ref:t,builtinPlacements:C(),overlay:function(){var t=e.title,n=e.overlay;return 0===t?t:n||t||""}(),visible:N,onVisibleChange:function(t){"visible"in e||x(!E()&&t),e.onVisibleChange&&!E()&&e.onVisibleChange(t)},onPopupAlign:function(e,t){var n=C(),r=Object.keys(n).filter((function(e){return n[e].points[0]===t.points[0]&&n[e].points[1]===t.points[1]}))[0];if(r){var o=e.getBoundingClientRect(),i={top:"50%",left:"50%"};r.indexOf("top")>=0||r.indexOf("Bottom")>=0?i.top="".concat(o.height-t.offset[1],"px"):(r.indexOf("Top")>=0||r.indexOf("bottom")>=0)&&(i.top="".concat(-t.offset[1],"px")),r.indexOf("left")>=0||r.indexOf("Right")>=0?i.left="".concat(o.width-t.offset[0],"px"):(r.indexOf("right")>=0||r.indexOf("Left")>=0)&&(i.left="".concat(-t.offset[0],"px")),e.style.transformOrigin="".concat(i.left," ").concat(i.top)}},overlayInnerStyle:M,arrowContent:u.createElement("span",{className:"".concat(R,"-arrow-content"),style:j})}),N?(0,d.cloneElement)(D,{className:L}):D)}));g.displayName="Tooltip",g.defaultProps={placement:"top",transitionName:"zoom-big-fast",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0};var y=g;t.default=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(119);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(288),o=n(289),i=n(186);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(120);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),r="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,o="undefined"!==typeof e&&e.Math===Math?e:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),i="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!==typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&u()}function s(){i(a)}function u(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},l=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},f=g(0,0,0,0);function d(e){return parseFloat(e)||0}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=l(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=d(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,s=d(r.width),u=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+i)!==t&&(s-=p(r,"left","right")+i),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(e){return e===l(e).document.documentElement}(e)){var c=Math.round(s+i)-t,h=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(u-=h)}return g(o.left,o.top,s,u)}var v="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof l(e).SVGGraphicsElement}:function(e){return e instanceof l(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return r?v(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):h(e):f}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return c(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}(t);c(this,{target:e,contentRect:n})},w=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),x="undefined"!==typeof WeakMap?new WeakMap:new n,E=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new w(t,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){E.prototype[e]=function(){var t;return(t=x.get(this))[e].apply(t,arguments)}}));var C="undefined"!==typeof o.ResizeObserver?o.ResizeObserver:E;t.a=C}).call(this,n(65))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SpaceContext=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(39)),u=r(n(0)),c=o(n(10)),l=o(n(172)),f=n(29),d=o(n(500)),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},h=u.createContext({latestIndex:0,horizontalSize:0,verticalSize:0});t.SpaceContext=h;var v={small:8,middle:16,large:24};var m=function(e){var t,n=u.useContext(f.ConfigContext),r=n.getPrefixCls,o=n.space,m=n.direction,g=e.size,y=void 0===g?(null===o||void 0===o?void 0:o.size)||"small":g,b=e.align,w=e.className,x=e.children,E=e.direction,C=void 0===E?"horizontal":E,k=e.prefixCls,O=e.split,S=e.style,_=e.wrap,T=void 0!==_&&_,I=p(e,["size","align","className","children","direction","prefixCls","split","style","wrap"]),P=u.useMemo((function(){return(Array.isArray(y)?y:[y,y]).map((function(e){return function(e){return"string"===typeof e?v[e]:e||0}(e)}))}),[y]),A=(0,s.default)(P,2),R=A[0],N=A[1],M=(0,l.default)(x,{keepEmpty:!0});if(0===M.length)return null;var j=void 0===b&&"horizontal"===C?"center":b,D=r("space",k),F=(0,c.default)(D,"".concat(D,"-").concat(C),(t={},(0,a.default)(t,"".concat(D,"-rtl"),"rtl"===m),(0,a.default)(t,"".concat(D,"-align-").concat(j),j),t),w),L="".concat(D,"-item"),B="rtl"===m?"marginLeft":"marginRight",U=0,z=M.map((function(e,t){return null!==e&&void 0!==e&&(U=t),u.createElement(d.default,{className:L,key:"".concat(L,"-").concat(t),direction:C,index:t,marginDirection:B,split:O,wrap:T},e)}));return u.createElement("div",(0,i.default)({className:F,style:(0,i.default)((0,i.default)({},T&&{flexWrap:"wrap",marginBottom:-N}),S)},I),u.createElement(h.Provider,{value:{horizontalSize:R,verticalSize:N,latestIndex:U}},z))};t.default=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=t||{},i=n.defaultValue,a=n.value,s=n.onChange,u=n.postState,c=o(r.useState((function(){return void 0!==a?a:void 0!==i?"function"===typeof i?i():i:"function"===typeof e?e():e})),2),l=c[0],f=c[1],d=void 0!==a?a:l;u&&(d=u(d));var p=r.useRef(!0);return r.useEffect((function(){p.current?p.current=!1:void 0===a&&f(a)}),[a]),[d,function(e){f(e),d!==e&&s&&s(e,d)}]}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(57)),u=o(n(39)),c=r(n(0)),l=o(n(10)),f=o(n(72)),d=n(90),p=n(29),h=o(n(49)),v=n(170),m=o(n(247)),g=o(n(499)),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},b=function(e,t){var n,r,o=c.useContext(g.default),b=c.useState(1),w=(0,u.default)(b,2),x=w[0],E=w[1],C=c.useState(!1),k=(0,u.default)(C,2),O=k[0],S=k[1],_=c.useState(!0),T=(0,u.default)(_,2),I=T[0],P=T[1],A=c.useRef(),R=c.useRef(),N=(0,d.composeRef)(t,A),M=c.useContext(p.ConfigContext).getPrefixCls,j=function(){if(R.current&&A.current){var t=R.current.offsetWidth,n=A.current.offsetWidth;if(0!==t&&0!==n){var r=e.gap,o=void 0===r?4:r;2*o<n&&E(n-2*o<t?(n-2*o)/t:1)}}};c.useEffect((function(){S(!0)}),[]),c.useEffect((function(){P(!0),E(1)}),[e.src]),c.useEffect((function(){j()}),[e.gap]);var D=e.prefixCls,F=e.shape,L=e.size,B=e.src,U=e.srcSet,z=e.icon,V=e.className,W=e.alt,H=e.draggable,$=e.children,q=y(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children"]),K="default"===L?o:L,G=(0,m.default)(),X=c.useMemo((function(){if("object"!==(0,s.default)(K))return{};var e=v.responsiveArray.find((function(e){return G[e]})),t=K[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:z?t/2:18}:{}}),[G,K]);(0,h.default)(!("string"===typeof z&&z.length>2),"Avatar","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(z,"` at https://ant.design/components/icon"));var Y,J=M("avatar",D),Q=(0,l.default)((n={},(0,a.default)(n,"".concat(J,"-lg"),"large"===K),(0,a.default)(n,"".concat(J,"-sm"),"small"===K),n)),Z=c.isValidElement(B),ee=(0,l.default)(J,Q,(r={},(0,a.default)(r,"".concat(J,"-").concat(F),F),(0,a.default)(r,"".concat(J,"-image"),Z||B&&I),(0,a.default)(r,"".concat(J,"-icon"),z),r),V),te="number"===typeof K?{width:K,height:K,lineHeight:"".concat(K,"px"),fontSize:z?K/2:18}:{};if("string"===typeof B&&I)Y=c.createElement("img",{src:B,draggable:H,srcSet:U,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&P(!1)},alt:W});else if(Z)Y=B;else if(z)Y=z;else if(O||1!==x){var ne="scale(".concat(x,") translateX(-50%)"),re={msTransform:ne,WebkitTransform:ne,transform:ne},oe="number"===typeof K?{lineHeight:"".concat(K,"px")}:{};Y=c.createElement(f.default,{onResize:j},c.createElement("span",{className:"".concat(J,"-string"),ref:function(e){R.current=e},style:(0,i.default)((0,i.default)({},oe),re)},$))}else Y=c.createElement("span",{className:"".concat(J,"-string"),style:{opacity:0},ref:function(e){R.current=e}},$);return delete q.onError,delete q.gap,c.createElement("span",(0,i.default)({},q,{style:(0,i.default)((0,i.default)((0,i.default)({},te),X),q.style),className:ee,ref:N}),Y)},w=c.forwardRef(b);w.displayName="Avatar",w.defaultProps={shape:"circle",size:"default"};var x=w;t.default=x},,function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(342)),i=r(n(206)),a=r(n(207)),s=r(n(344)),u="${label} is not a valid ${type}",c={locale:"en",Pagination:o.default,DatePicker:i.default,TimePicker:a.default,Calendar:s.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:u,method:u,array:u,object:u,number:u,date:u,boolean:u,integer:u,float:u,regexp:u,email:u,url:u,hex:u},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}}};t.default=c},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(351))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(357))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(370))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){var r=n(168),o=n(407),i=n(408),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=a.useReducer((function(e){return e+1}),0);return(0,i.default)(e,2)[1]};var i=o(n(39)),a=r(n(0))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.fixControlledValue=y,t.resolveOnChange=b,t.getInputClassName=w,t.default=void 0;var i=o(n(18)),a=o(n(66)),s=o(n(69)),u=o(n(70)),c=o(n(71)),l=o(n(25)),f=r(n(0)),d=o(n(10)),p=o(n(53)),h=r(n(241)),v=n(29),m=o(n(89)),g=o(n(49));function y(e){return"undefined"===typeof e||null===e?"":e}function b(e,t,n){if(n){var r=t;if("click"===t.type){(r=Object.create(t)).target=e,r.currentTarget=e;var o=e.value;return e.value="",n(r),void(e.value=o)}n(r)}}function w(e,t,n,r,o){var i;return(0,d.default)(e,(i={},(0,l.default)(i,"".concat(e,"-sm"),"small"===n),(0,l.default)(i,"".concat(e,"-lg"),"large"===n),(0,l.default)(i,"".concat(e,"-disabled"),r),(0,l.default)(i,"".concat(e,"-rtl"),"rtl"===o),(0,l.default)(i,"".concat(e,"-borderless"),!t),i))}var x=function(e){(0,u.default)(n,e);var t=(0,c.default)(n);function n(e){var r;(0,a.default)(this,n),(r=t.call(this,e)).direction="ltr",r.focus=function(){r.input.focus()},r.saveClearableInput=function(e){r.clearableInput=e},r.saveInput=function(e){r.input=e},r.onFocus=function(e){var t=r.props.onFocus;r.setState({focused:!0},r.clearPasswordValueAttribute),t&&t(e)},r.onBlur=function(e){var t=r.props.onBlur;r.setState({focused:!1},r.clearPasswordValueAttribute),t&&t(e)},r.handleReset=function(e){r.setValue("",(function(){r.focus()})),b(r.input,e,r.props.onChange)},r.renderInput=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.props,s=a.className,u=a.addonBefore,c=a.addonAfter,h=a.size,v=a.disabled,m=(0,p.default)(r.props,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","inputType","bordered"]);return f.createElement("input",(0,i.default)({autoComplete:o.autoComplete},m,{onChange:r.handleChange,onFocus:r.onFocus,onBlur:r.onBlur,onKeyDown:r.handleKeyDown,className:(0,d.default)(w(e,n,h||t,v,r.direction),(0,l.default)({},s,s&&!u&&!c)),ref:r.saveInput}))},r.clearPasswordValueAttribute=function(){r.removePasswordTimeout=setTimeout((function(){r.input&&"password"===r.input.getAttribute("type")&&r.input.hasAttribute("value")&&r.input.removeAttribute("value")}))},r.handleChange=function(e){r.setValue(e.target.value,r.clearPasswordValueAttribute),b(r.input,e,r.props.onChange)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,o=t.onKeyDown;13===e.keyCode&&n&&n(e),o&&o(e)},r.renderComponent=function(e){var t=e.getPrefixCls,n=e.direction,o=e.input,a=r.state,s=a.value,u=a.focused,c=r.props,l=c.prefixCls,d=c.bordered,p=void 0===d||d,v=t("input",l);return r.direction=n,f.createElement(m.default.Consumer,null,(function(e){return f.createElement(h.default,(0,i.default)({size:e},r.props,{prefixCls:v,inputType:"input",value:y(s),element:r.renderInput(v,e,p,o),handleReset:r.handleReset,ref:r.saveClearableInput,direction:n,focused:u,triggerFocus:r.focus,bordered:p}))}))};var o="undefined"===typeof e.value?e.defaultValue:e.value;return r.state={value:o,focused:!1,prevValue:e.value},r}return(0,s.default)(n,[{key:"componentDidMount",value:function(){this.clearPasswordValueAttribute()}},{key:"componentDidUpdate",value:function(){}},{key:"getSnapshotBeforeUpdate",value:function(e){return(0,h.hasPrefixSuffix)(e)!==(0,h.hasPrefixSuffix)(this.props)&&(0,g.default)(this.input!==document.activeElement,"Input","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),null}},{key:"componentWillUnmount",value:function(){this.removePasswordTimeout&&clearTimeout(this.removePasswordTimeout)}},{key:"blur",value:function(){this.input.blur()}},{key:"setSelectionRange",value:function(e,t,n){this.input.setSelectionRange(e,t,n)}},{key:"select",value:function(){this.input.select()}},{key:"setValue",value:function(e,t){void 0===this.props.value?this.setState({value:e},t):null===t||void 0===t||t()}},{key:"render",value:function(){return f.createElement(v.ConfigConsumer,null,this.renderComponent)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevValue,r={prevValue:e.value};return void 0===e.value&&n===e.value||(r.value=e.value),r}}]),n}(f.Component);x.defaultProps={type:"text"};var E=x;t.default=E},function(e,t,n){(function(t){var n;n="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=n}).call(this,n(65))},function(e,t,n){"use strict";function r(e,t){(function(e){return"string"===typeof e&&e.includes(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&e.includes("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return Math.min(1,Math.max(0,e))}function i(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?100*Number(e)+"%":e}function s(e){return 1===e.length?"0"+e:String(e)}function u(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var o=Math.max(e,t,n),i=Math.min(e,t,n),a=0,s=0,u=(o+i)/2;if(o===i)s=0,a=0;else{var c=o-i;switch(s=u>.5?c/(2-o-i):c/(o+i),o){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4}a/=6}return{h:a,s:s,l:u}}function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function l(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var o=Math.max(e,t,n),i=Math.min(e,t,n),a=0,s=o,u=o-i,c=0===o?0:u/o;if(o===i)a=0;else{switch(o){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4}a/=6}return{h:a,s:c,v:s}}function f(e,t,n,r){var o=[s(Math.round(e).toString(16)),s(Math.round(t).toString(16)),s(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function d(e){return Math.round(255*parseFloat(e)).toString(16)}function p(e){return h(e)/255}function h(e){return parseInt(e,16)}n.r(t),n.d(t,"blue",(function(){return B})),n.d(t,"cyan",(function(){return L})),n.d(t,"geekblue",(function(){return U})),n.d(t,"generate",(function(){return _})),n.d(t,"gold",(function(){return N})),n.d(t,"green",(function(){return F})),n.d(t,"grey",(function(){return W})),n.d(t,"lime",(function(){return D})),n.d(t,"magenta",(function(){return V})),n.d(t,"orange",(function(){return M})),n.d(t,"presetDarkPalettes",(function(){return P})),n.d(t,"presetPalettes",(function(){return I})),n.d(t,"presetPrimaryColors",(function(){return T})),n.d(t,"purple",(function(){return z})),n.d(t,"red",(function(){return A})),n.d(t,"volcano",(function(){return R})),n.d(t,"yellow",(function(){return j}));var v={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function m(e){var t,n,o,s={r:0,g:0,b:0},u=1,l=null,f=null,d=null,m=!1,g=!1;return"string"===typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(v[e])e=v[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=w.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=w.rgba.exec(e))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=w.hsl.exec(e))return{h:n[1],s:n[2],l:n[3]};if(n=w.hsla.exec(e))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=w.hsv.exec(e))return{h:n[1],s:n[2],v:n[3]};if(n=w.hsva.exec(e))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=w.hex8.exec(e))return{r:h(n[1]),g:h(n[2]),b:h(n[3]),a:p(n[4]),format:t?"name":"hex8"};if(n=w.hex6.exec(e))return{r:h(n[1]),g:h(n[2]),b:h(n[3]),format:t?"name":"hex"};if(n=w.hex4.exec(e))return{r:h(n[1]+n[1]),g:h(n[2]+n[2]),b:h(n[3]+n[3]),a:p(n[4]+n[4]),format:t?"name":"hex8"};if(n=w.hex3.exec(e))return{r:h(n[1]+n[1]),g:h(n[2]+n[2]),b:h(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(x(e.r)&&x(e.g)&&x(e.b)?(t=e.r,n=e.g,o=e.b,s={r:255*r(t,255),g:255*r(n,255),b:255*r(o,255)},m=!0,g="%"===String(e.r).substr(-1)?"prgb":"rgb"):x(e.h)&&x(e.s)&&x(e.v)?(l=a(e.s),f=a(e.v),s=function(e,t,n){e=6*r(e,360),t=r(t,100),n=r(n,100);var o=Math.floor(e),i=e-o,a=n*(1-t),s=n*(1-i*t),u=n*(1-(1-i)*t),c=o%6;return{r:255*[n,s,a,a,u,n][c],g:255*[u,n,n,s,a,a][c],b:255*[a,a,u,n,n,s][c]}}(e.h,l,f),m=!0,g="hsv"):x(e.h)&&x(e.s)&&x(e.l)&&(l=a(e.s),d=a(e.l),s=function(e,t,n){var o,i,a;if(e=r(e,360),t=r(t,100),n=r(n,100),0===t)i=n,a=n,o=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;o=c(u,s,e+1/3),i=c(u,s,e),a=c(u,s,e-1/3)}return{r:255*o,g:255*i,b:255*a}}(e.h,l,d),m=!0,g="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(u=e.a)),u=i(u),{ok:m,format:e.format||g,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:u}}var g="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",y="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",b="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",w={CSS_UNIT:new RegExp(g),rgb:new RegExp("rgb"+y),rgba:new RegExp("rgba"+b),hsl:new RegExp("hsl"+y),hsla:new RegExp("hsla"+b),hsv:new RegExp("hsv"+y),hsva:new RegExp("hsva"+b),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function x(e){return Boolean(w.CSS_UNIT.exec(String(e)))}var E=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=m(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=i(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=l(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=l(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this.roundA+")"},e.prototype.toHsl=function(){var e=u(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=u(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this.roundA+")"},e.prototype.toHex=function(e){return void 0===e&&(e=!1),f(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var i=[s(Math.round(e).toString(16)),s(Math.round(t).toString(16)),s(Math.round(n).toString(16)),s(d(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb("+e+", "+t+", "+n+")":"rgba("+e+", "+t+", "+n+", "+this.roundA+")"},e.prototype.toPercentageRgb=function(){var e=function(e){return Math.round(100*r(e,255))+"%"};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*r(e,255))};return 1===this.a?"rgb("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%)":"rgba("+e(this.r)+"%, "+e(this.g)+"%, "+e(this.b)+"%, "+this.roundA+")"},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+f(this.r,this.g,this.b,!1),t=0,n=Object.entries(v);t<n.length;t++){var r=n[t],o=r[0];if(e===r[1])return o}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!==e&&void 0!==e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=o(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=o(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=o(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=o(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],i=360/t,a=1;a<t;a++)o.push(new e({h:(r+a*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();var C=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function k(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function O(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function S(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function _(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=new E(e),o=5;o>0;o-=1){var i=r.toHsv(),a=new E({h:k(i,o,!0),s:O(i,o,!0),v:S(i,o,!0)}).toHexString();n.push(a)}n.push(r.toHexString());for(var s=1;s<=4;s+=1){var u=r.toHsv(),c=new E({h:k(u,s),s:O(u,s),v:S(u,s)}).toHexString();n.push(c)}return"dark"===t.theme?C.map((function(e){var r=e.index,o=e.opacity;return new E(t.backgroundColor||"#141414").mix(n[r],100*o).toHexString()})):n}var T={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},I={},P={};Object.keys(T).forEach((function(e){I[e]=_(T[e]),I[e].primary=I[e][5],P[e]=_(T[e],{theme:"dark",backgroundColor:"#141414"}),P[e].primary=P[e][5]}));var A=I.red,R=I.volcano,N=I.gold,M=I.orange,j=I.yellow,D=I.lime,F=I.green,L=I.cyan,B=I.blue,U=I.geekblue,z=I.purple,V=I.magenta,W=I.grey},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;u<i.length;u++){var c=i[u];if(!s(c))return!1;var l=e[c],f=t[c];if(!1===(o=n?n.call(r,l,f,c):void 0)||void 0===o&&l!==f)return!1}return!0}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(18)),s=r(n(0)),u=o(n(53)),c=o(n(10)),l=r(n(596)),f=n(29),d=o(n(552)),p=o(n(89)),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},v="SECRET_COMBOBOX_MODE_DO_NOT_USE",m=function(e,t){var n,r,o=e.prefixCls,m=e.bordered,g=void 0===m||m,y=e.className,b=e.getPopupContainer,w=e.dropdownClassName,x=e.listHeight,E=void 0===x?256:x,C=e.listItemHeight,k=void 0===C?24:C,O=e.size,S=e.notFoundContent,_=e.transitionName,T=void 0===_?"slide-up":_,I=h(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","listHeight","listItemHeight","size","notFoundContent","transitionName"]),P=s.useContext(f.ConfigContext),A=P.getPopupContainer,R=P.getPrefixCls,N=P.renderEmpty,M=P.direction,j=P.virtual,D=P.dropdownMatchSelectWidth,F=s.useContext(p.default),L=R("select",o),B=s.useMemo((function(){var e=I.mode;if("combobox"!==e)return e===v?"combobox":e}),[I.mode]),U="multiple"===B||"tags"===B;r=void 0!==S?S:"combobox"===B?null:N("Select");var z=(0,d.default)((0,a.default)((0,a.default)({},I),{multiple:U,prefixCls:L})),V=z.suffixIcon,W=z.itemIcon,H=z.removeIcon,$=z.clearIcon,q=(0,u.default)(I,["suffixIcon","itemIcon"]),K=(0,c.default)(w,(0,i.default)({},"".concat(L,"-dropdown-").concat(M),"rtl"===M)),G=O||F,X=(0,c.default)((n={},(0,i.default)(n,"".concat(L,"-lg"),"large"===G),(0,i.default)(n,"".concat(L,"-sm"),"small"===G),(0,i.default)(n,"".concat(L,"-rtl"),"rtl"===M),(0,i.default)(n,"".concat(L,"-borderless"),!g),n),y);return s.createElement(l.default,(0,a.default)({ref:t,virtual:j,dropdownMatchSelectWidth:D},q,{transitionName:T,listHeight:E,listItemHeight:k,mode:B,prefixCls:L,direction:M,inputIcon:V,menuItemSelectedIcon:W,removeIcon:H,clearIcon:$,notFoundContent:r,className:X,getPopupContainer:b||A,dropdownClassName:K}))},g=s.forwardRef(m);g.SECRET_COMBOBOX_MODE_DO_NOT_USE=v,g.Option=l.Option,g.OptGroup=l.OptGroup;var y=g;t.default=y},function(e,t,n){"use strict";n.d(t,"b",(function(){return vn})),n.d(t,"c",(function(){return Gt})),n.d(t,"a",(function(){return It}));var r=n(1);function o(e,t,n){if(void 0===n&&(n=!1),e.beginPath(),t.slice(1).forEach((function(n,r){var o=n.x,i=n.y,a=t[r];e.moveTo(a.x,a.y),e.lineTo(o,i)})),n){var r=t[t.length-1],o=t[0];if(!r||!o)return;e.moveTo(r.x,r.y),e.lineTo(o.x,o.y)}e.stroke()}var i=n(3),a=function(){function e(e,t){if(!v(e)||!v(t))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:e,height:t}));this._width=e,this._height=t}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.reverse=function(){return new e(1/this.width,1/this.height)},e}();function s(e,t){return e instanceof r.a&&e.shape.length===t}function u(e){return s(e,3)}function c(e){return s(e,4)}function l(e){return e%2===0}function f(e,t){void 0===t&&(t=2);var n=Math.pow(10,t);return Math.floor(e*n)/n}function d(e){return e&&e.width&&e.height}function p(e){return e.reduce((function(e,t){return e.add(t)}),new g(0,0)).div(new g(e.length,e.length))}function h(e,t,n){return Array(e).fill(0).map((function(e,r){return t+r*n}))}function v(e){return!!e&&e!==1/0&&e!==-1/0&&!isNaN(e)||0===e}function m(e){return v(e)&&0<=e&&e<=1}var g=function(){function e(e,t){this._x=e,this._y=t}return Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.sub=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.mul=function(t){return new e(this.x*t.x,this.y*t.y)},e.prototype.div=function(t){return new e(this.x/t.x,this.y/t.y)},e.prototype.abs=function(){return new e(Math.abs(this.x),Math.abs(this.y))},e.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},e.prototype.floor=function(){return new e(Math.floor(this.x),Math.floor(this.y))},e}(),y=function(){function e(t,n){void 0===n&&(n=!0);var r=t||{},o=[r.left,r.top,r.right,r.bottom].every(v),i=[r.x,r.y,r.width,r.height].every(v);if(!i&&!o)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var a=i?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],s=a[0],u=a[1],c=a[2],l=a[3];e.assertIsValidBox({x:s,y:u,width:c,height:l},"Box.constructor",n),this._x=s,this._y=u,this._width=c,this._height=l}return e.isRect=function(e){return!!e&&[e.x,e.y,e.width,e.height].every(v)},e.assertIsValidBox=function(t,n,r){if(void 0===r&&(r=!1),!e.isRect(t))throw new Error(n+" - invalid box: "+JSON.stringify(t)+", expected object with properties x, y, width, height");if(!r&&(t.width<0||t.height<0))throw new Error(n+" - width ("+t.width+") and height ("+t.height+") must be positive numbers")},Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topLeft",{get:function(){return new g(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topRight",{get:function(){return new g(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomLeft",{get:function(){return new g(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomRight",{get:function(){return new g(this.right,this.bottom)},enumerable:!0,configurable:!0}),e.prototype.round=function(){var t=[this.x,this.y,this.width,this.height].map((function(e){return Math.round(e)}));return new e({x:t[0],y:t[1],width:t[2],height:t[3]})},e.prototype.floor=function(){var t=[this.x,this.y,this.width,this.height].map((function(e){return Math.floor(e)}));return new e({x:t[0],y:t[1],width:t[2],height:t[3]})},e.prototype.toSquare=function(){var t=this,n=t.x,r=t.y,o=t.width,i=t.height,a=Math.abs(o-i);return o<i&&(n-=a/2,o+=a),i<o&&(r-=a/2,i+=a),new e({x:n,y:r,width:o,height:i})},e.prototype.rescale=function(t){var n=d(t)?t.width:t,r=d(t)?t.height:t;return new e({x:this.x*n,y:this.y*r,width:this.width*n,height:this.height*r})},e.prototype.pad=function(t,n){var r=[this.x-t/2,this.y-n/2,this.width+t,this.height+n];return new e({x:r[0],y:r[1],width:r[2],height:r[3]})},e.prototype.clipAtImageBorders=function(t,n){var r=this,o=r.x,i=r.y,a=r.right,s=r.bottom,u=Math.max(o,0),c=Math.max(i,0),l=a-u,f=s-c;return new e({x:u,y:c,width:Math.min(l,t-u),height:Math.min(f,n-c)}).floor()},e.prototype.shift=function(t,n){var r=this.width,o=this.height;return new e({x:this.x+t,y:this.y+n,width:r,height:o})},e.prototype.padAtBorders=function(e,t){var n=this.width+1,r=this.height+1,o=n,i=r,a=this.left,s=this.top,u=this.right,c=this.bottom;return u>t&&(o=-u+t+n,u=t),c>e&&(i=-c+e+r,c=e),a<1&&(i=2-a,a=1),s<1&&(i=2-s,s=1),{dy:1,edy:i,dx:1,edx:o,y:s,ey:c,x:a,ex:u,w:n,h:r}},e.prototype.calibrate=function(t){return new e({left:this.left+t.left*this.width,top:this.top+t.top*this.height,right:this.right+t.right*this.width,bottom:this.bottom+t.bottom*this.height}).toSquare().round()},e}(),b=function(e){function t(t,n,r,o,i){return void 0===i&&(i=!1),e.call(this,{left:t,top:n,right:r,bottom:o},i)||this}return Object(i.c)(t,e),t}(y),w=function(){function e(e,t,n,r,o){this._imageDims=new a(o.width,o.height),this._score=e,this._classScore=t,this._className=n,this._box=new y(r).rescale(this._imageDims)}return Object.defineProperty(e.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeBox",{get:function(){return new y(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),e.prototype.forSize=function(t,n){return new e(this.score,this.classScore,this.className,this.relativeBox,{width:t,height:n})},e}(),x=function(e){function t(t,n,r){return e.call(this,t,t,"",n,r)||this}return Object(i.c)(t,e),t.prototype.forSize=function(n,r){var o=e.prototype.forSize.call(this,n,r);return new t(o.score,o.relativeBox,o.imageDims)},t}(w);function E(e,t,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left))*Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));return n?r/(e.area+t.area-r):r/Math.min(e.area,t.area)}function C(e,t,n,r){void 0===r&&(r=!0);for(var o=t.map((function(e,t){return{score:e,boxIndex:t}})).sort((function(e,t){return e.score-t.score})).map((function(e){return e.boxIndex})),i=[],a=function(){var t=o.pop();i.push(t);for(var a=o,s=[],u=0;u<a.length;u++){var c=a[u],l=e[t],f=e[c];s.push(E(l,f,r))}o=o.filter((function(e,t){return s[t]<=n}))};o.length>0;)a();return i}function k(e,t){return r.L((function(){var n=t[0],o=t[1],a=t[2],s=r.n(Object(i.e)(e.shape.slice(0,3),[1]),n),u=r.n(Object(i.e)(e.shape.slice(0,3),[1]),o),c=r.n(Object(i.e)(e.shape.slice(0,3),[1]),a),l=r.h([s,u,c],3);return r.F(e,l)}))}function O(e){return 1/(1+Math.exp(-e))}var S=function(e){function t(t,n,r,o,i){return void 0===i&&(i=!1),e.call(this,{x:t,y:n,width:r,height:o},i)||this}return Object(i.c)(t,e),t}(y),_=function(){function e(e,t,n){void 0===n&&(n=new g(0,0));var r=t.width,o=t.height;this._imgDims=new a(r,o),this._shift=n,this._positions=e.map((function(e){return e.mul(new g(r,o)).add(n)}))}return Object.defineProperty(e.prototype,"shift",{get:function(){return new g(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativePositions",{get:function(){var e=this;return this._positions.map((function(t){return t.sub(e._shift).div(new g(e.imageWidth,e.imageHeight))}))},enumerable:!0,configurable:!0}),e.prototype.forSize=function(e,t){return new this.constructor(this.relativePositions,{width:e,height:t})},e.prototype.shiftBy=function(e,t){return new this.constructor(this.relativePositions,this._imgDims,new g(e,t))},e.prototype.shiftByPoint=function(e){return this.shiftBy(e.x,e.y)},e.prototype.align=function(e,t){if(void 0===t&&(t={}),e){var n=e instanceof x?e.box.floor():new y(e);return this.shiftBy(n.x,n.y).align(null,t)}var r=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},t),o=r.useDlibAlignment,i=r.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(i)},e.prototype.alignDlib=function(){var e=this.getRefPointsForAlignment(),t=e[0],n=e[1],r=e[2],o=function(e){return r.sub(e).magnitude()},i=(o(t)+o(n))/2,a=Math.floor(i/.45),s=p(e),u=Math.floor(Math.max(0,s.x-.5*a)),c=Math.floor(Math.max(0,s.y-.43*a));return new S(u,c,Math.min(a,this.imageWidth+u),Math.min(a,this.imageHeight+c))},e.prototype.alignMinBbox=function(e){var t=function(e){var t=e.map((function(e){return e.x})),n=e.map((function(e){return e.y})),r=t.reduce((function(e,t){return t<e?t:e}),1/0),o=n.reduce((function(e,t){return t<e?t:e}),1/0),i=t.reduce((function(e,t){return e<t?t:e}),0),a=n.reduce((function(e,t){return e<t?t:e}),0);return new b(r,o,i,a)}(this.positions);return t.pad(t.width*e,t.height*e)},e.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},e}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.getRefPointsForAlignment=function(){var e=this.positions;return[e[0],e[1],p([e[3],e[4]])]},t}(_),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.getJawOutline=function(){return this.positions.slice(0,17)},t.prototype.getLeftEyeBrow=function(){return this.positions.slice(17,22)},t.prototype.getRightEyeBrow=function(){return this.positions.slice(22,27)},t.prototype.getNose=function(){return this.positions.slice(27,36)},t.prototype.getLeftEye=function(){return this.positions.slice(36,42)},t.prototype.getRightEye=function(){return this.positions.slice(42,48)},t.prototype.getMouth=function(){return this.positions.slice(48,68)},t.prototype.getRefPointsForAlignment=function(){return[this.getLeftEye(),this.getRightEye(),this.getMouth()].map(p)},t}(_),P=function(){function e(e,t){this._label=e,this._distance=t}return Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){return void 0===e&&(e=!0),this.label+(e?" ("+f(this.distance)+")":"")},e}(),A=function(e){function t(t,n){var r=e.call(this,t)||this;return r._label=n,r}return Object(i.c)(t,e),t.assertIsValidLabeledBox=function(e,t){if(y.assertIsValidBox(e,t),!v(e.label))throw new Error(t+" - expected property label ("+e.label+") to be a number")},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),t}(y),R=function(){function e(e,t){if("string"!==typeof e)throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(t)||t.some((function(e){return!(e instanceof Float32Array)})))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=e,this._descriptors=t}return Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){return{label:this.label,descriptors:this.descriptors.map((function(e){return Array.from(e)}))}},e.fromJSON=function(t){var n=t.descriptors.map((function(e){return new Float32Array(e)}));return new e(t.label,n)},e}();!function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i._score=r,i._classScore=o,i}Object(i.c)(t,e),t.assertIsValidPredictedBox=function(e,t){if(A.assertIsValidLabeledBox(e,t),!m(e.score)||!m(e.classScore))throw new Error(t+" - expected properties score ("+e.score+") and ("+e.classScore+") to be a number between [0, 1]")},Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0})}(A);function N(e){return e.detection instanceof x}function M(e,t){var n={detection:t};return Object.assign({},e,n)}function j(){var e=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")};return{Canvas:HTMLCanvasElement,CanvasRenderingContext2D:CanvasRenderingContext2D,Image:HTMLImageElement,ImageData:ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:e,readFile:function(){throw new Error("readFile - filesystem not available for browser environment")}}}var D=n(148),F=n(180);function L(){return"object"===typeof window&&"undefined"!==typeof document&&"undefined"!==typeof HTMLImageElement&&"undefined"!==typeof HTMLCanvasElement&&"undefined"!==typeof HTMLVideoElement&&"undefined"!==typeof ImageData&&"undefined"!==typeof CanvasRenderingContext2D}var B,U=n(181);function z(e){B=e}function V(){L()&&z(j()),Object(U.a)()&&z(Object(F.a)())}var W,H={getEnv:function(){if(!B)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return B},setEnv:z,initialize:V,createBrowserEnv:j,createFileSystem:D.a,createNodejsEnv:F.a,monkeyPatch:function(e){if(B||V(),!B)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var t=e.Canvas,n=void 0===t?B.Canvas:t,r=e.Image,o=void 0===r?B.Image:r;B.Canvas=n,B.Image=o,B.createCanvasElement=e.createCanvasElement||function(){return new n},B.createImageElement=e.createImageElement||function(){return new o},B.ImageData=e.ImageData||B.ImageData,B.Video=e.Video||B.Video,B.fetch=e.fetch||B.fetch,B.readFile=e.readFile||B.readFile},isBrowser:L,isNodejs:U.a};function $(e){return H.isNodejs()||"string"!==typeof e?e:document.getElementById(e)}function q(e){var t=H.getEnv(),n=t.Canvas;if(e instanceof t.CanvasRenderingContext2D)return e;var r=$(e);if(!(r instanceof n))throw new Error("resolveContext2d - expected canvas to be of instance of Canvas");var o=r.getContext("2d");if(!o)throw new Error("resolveContext2d - canvas 2d context is null");return o}V(),function(e){e.TOP_LEFT="TOP_LEFT",e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT"}(W||(W={}));var K=function(e){void 0===e&&(e={});var t=e.anchorPosition,n=e.backgroundColor,r=e.fontColor,o=e.fontSize,i=e.fontStyle,a=e.padding;this.anchorPosition=t||W.TOP_LEFT,this.backgroundColor=n||"rgba(0, 0, 0, 0.5)",this.fontColor=r||"rgba(255, 255, 255, 1)",this.fontSize=o||14,this.fontStyle=i||"Georgia",this.padding=a||4},G=function(){function e(t,n,r){void 0===r&&(r={}),this.text="string"===typeof t?[t]:t instanceof e?t.text:t,this.anchor=n,this.options=new K(r)}return e.prototype.measureWidth=function(e){var t=this.options.padding;return this.text.map((function(t){return e.measureText(t).width})).reduce((function(e,t){return e<t?t:e}),0)+2*t},e.prototype.measureHeight=function(){var e=this.options,t=e.fontSize,n=e.padding;return this.text.length*t+2*n},e.prototype.getUpperLeft=function(e,t){var n=this.options.anchorPosition,r=n===W.BOTTOM_RIGHT||n===W.TOP_RIGHT,o=n===W.BOTTOM_LEFT||n===W.BOTTOM_RIGHT,i=this.measureWidth(e),a=this.measureHeight(),s=r?this.anchor.x-i:this.anchor.x,u=o?this.anchor.y-a:this.anchor.y;if(t){var c=t.width,l=t.height;return{x:Math.max(Math.min(s,c-i),0),y:Math.max(Math.min(u,l-a),0)}}return{x:s,y:u}},e.prototype.draw=function(e){var t=$(e),n=q(t),r=this.options,o=r.backgroundColor,i=r.fontColor,a=r.fontSize,s=r.fontStyle,u=r.padding;n.font=a+"px "+s;var c=this.measureWidth(n),l=this.measureHeight();n.fillStyle=o;var f=this.getUpperLeft(n,t);n.fillRect(f.x,f.y,c,l),n.fillStyle=i,this.text.forEach((function(e,t){var r=u+f.x,o=u+f.y+(t+1)*a;n.fillText(e,r,o)}))},e}(),X=function(e){void 0===e&&(e={});var t=e.boxColor,n=e.lineWidth,r=e.label,o=e.drawLabelOptions;this.boxColor=t||"rgba(0, 0, 255, 1)",this.lineWidth=n||2,this.label=r;var i={anchorPosition:W.BOTTOM_LEFT,backgroundColor:this.boxColor};this.drawLabelOptions=new K(Object.assign({},i,o))};!function(){function e(e,t){void 0===t&&(t={}),this.box=new y(e),this.options=new X(t)}e.prototype.draw=function(e){var t=q(e),n=this.options,r=n.boxColor,o=n.lineWidth,i=this.box,a=i.x,s=i.y,u=i.width,c=i.height;t.strokeStyle=r,t.lineWidth=o,t.strokeRect(a,s,u,c);var l=this.options.label;l&&new G([l],{x:a-o/2,y:s},this.options.drawLabelOptions).draw(e)}}();function Y(e){var t=H.getEnv(),n=t.Image,r=t.Video;return e instanceof n&&e.complete||e instanceof r&&e.readyState>=3}function J(e){var t=H.getEnv(),n=t.Image,r=t.Video;return e instanceof n?new a(e.naturalWidth,e.naturalHeight):e instanceof r?new a(e.videoWidth,e.videoHeight):new a(e.width,e.height)}function Q(e){var t=e.width,n=e.height,r=(0,H.getEnv().createCanvasElement)();return r.width=t,r.height=n,r}function Z(e,t){var n=H.getEnv().ImageData;if(!(e instanceof n)&&!Y(e))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=t||J(e),o=r.width,i=r.height,a=Q({width:o,height:i});return e instanceof n?q(a).putImageData(e,0,0):q(a).drawImage(e,0,0,o,i),a}function ee(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,o,a,s,u,l;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=t||H.getEnv().createCanvasElement(),o=e.shape.slice(c(e)?1:0),a=o[0],s=o[1],u=o[2],l=r.L((function(){return e.as3D(a,s,u).toInt()})),[4,r.f.toPixels(l,n)];case 1:return i.sent(),l.dispose(),[2,n]}}))}))}function te(e){var t=H.getEnv(),n=t.Image,r=t.Canvas,o=t.Video;return e instanceof n||e instanceof r||e instanceof o}var ne=function(){function e(e,t){var n=this;if(void 0===t&&(t=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(e))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+e);this._treatAsBatchInput=t,this._batchSize=e.length,e.forEach((function(e,t){if(u(e))return n._imageTensors[t]=e,void(n._inputDimensions[t]=e.shape);if(c(e)){var r=e.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[t]=e,void(n._inputDimensions[t]=e.shape.slice(1))}var o=e instanceof H.getEnv().Canvas?e:Z(e);n._canvases[t]=o,n._inputDimensions[t]=[o.height,o.width,3]}))}return Object.defineProperty(e.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reshapedInputDimensions",{get:function(){var e=this;return h(this.batchSize,0,1).map((function(t,n){return e.getReshapedInputDimensions(n)}))},enumerable:!0,configurable:!0}),e.prototype.getInput=function(e){return this.canvases[e]||this.imageTensors[e]},e.prototype.getInputDimensions=function(e){return this._inputDimensions[e]},e.prototype.getInputHeight=function(e){return this._inputDimensions[e][0]},e.prototype.getInputWidth=function(e){return this._inputDimensions[e][1]},e.prototype.getReshapedInputDimensions=function(e){if("number"!==typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return function(e,t){var n=e.width,r=e.height,o=t/Math.max(r,n);return new a(Math.round(n*o),Math.round(r*o))}({width:this.getInputWidth(e),height:this.getInputHeight(e)},this.inputSize)},e.prototype.toBatchTensor=function(e,t){var n=this;return void 0===t&&(t=!0),this._inputSize=e,r.L((function(){var o=h(n.batchSize,0,1).map((function(o){var i=n.getInput(o);if(i instanceof r.a){var a=c(i)?i:i.expandDims();return(a=function(e,t){return void 0===t&&(t=!1),r.L((function(){var n=e.shape.slice(1),o=n[0],i=n[1];if(o===i)return e;var a=Math.abs(o-i),s=Math.round(a*(t?.5:1)),u=o>i?2:1,c=function(t){var n=e.shape.slice();return n[u]=t,r.n(n,0)},l=c(s),f=a-l.shape[u],d=[t&&f?c(f):null,e,l].filter((function(e){return!!e})).map((function(e){return e.toFloat()}));return r.h(d,u)}))}(a,t)).shape[1]===e&&a.shape[2]===e||(a=r.o.resizeBilinear(a,[e,e])),a.as3D(e,e,3)}if(i instanceof H.getEnv().Canvas)return r.f.fromPixels(function(e,t,n){void 0===n&&(n=!1);var r=H.getEnv(),o=r.Image,i=r.Canvas;if(!(e instanceof o||e instanceof i))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var a=J(e),s=t/Math.max(a.height,a.width),u=s*a.width,c=s*a.height,l=Q({width:t,height:t}),f=e instanceof i?e:Z(e),d=Math.abs(u-c)/2,p=n&&u<c?d:0,h=n&&c<u?d:0;return q(l).drawImage(f,p,h,u,c),l}(i,e,t));throw new Error("toBatchTensor - at batchIdx "+o+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+i)}));return r.E(o.map((function(e){return e.toFloat()}))).as4D(n.batchSize,e,e,3)}))},e}();function re(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,r;return Object(i.d)(this,(function(o){switch(o.label){case 0:if(e instanceof ne)return[2,e];if(!(t=Array.isArray(e)?e:[e]).length)throw new Error("toNetInput - empty array passed as input");return n=function(t){return Array.isArray(e)?" at input index "+t+":":""},(r=t.map($)).forEach((function(e,r){if(!te(e)&&!u(e)&&!c(e)){if("string"===typeof t[r])throw new Error("toNetInput -"+n(r)+" string passed, but could not resolve HTMLElement for element id "+t[r]);throw new Error("toNetInput -"+n(r)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id")}if(c(e)){var o=e.shape[0];if(1!==o)throw new Error("toNetInput -"+n(r)+" tf.Tensor4D with batchSize "+o+" passed, but not supported in input array")}})),[4,Promise.all(r.map((function(e){return te(e)&&(t=e,new Promise((function(e,n){if(t instanceof H.getEnv().Canvas||Y(t))return e();function r(t){t.currentTarget&&(t.currentTarget.removeEventListener("load",r),t.currentTarget.removeEventListener("error",o),e(t))}function o(e){e.currentTarget&&(e.currentTarget.removeEventListener("load",r),e.currentTarget.removeEventListener("error",o),n(e))}t.addEventListener("load",r),t.addEventListener("error",o)})));var t})))];case 1:return o.sent(),[2,new ne(r,Array.isArray(e))]}}))}))}function oe(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a,s,u;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=H.getEnv().Canvas,r=e,e instanceof n?[3,5]:[4,re(e)];case 1:if((o=i.sent()).batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return(a=o.getInput(0))instanceof n?(s=a,[3,4]):[3,2];case 2:return[4,ee(a)];case 3:s=i.sent(),i.label=4;case 4:r=s,i.label=5;case 5:return u=q(r),[2,t.map((function(e){return e instanceof x?e.forSize(r.width,r.height).box.floor():e})).map((function(e){return e.clipAtImageBorders(r.width,r.height)})).map((function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=Q({width:r,height:o});return q(i).putImageData(u.getImageData(t,n,r,o),0,0),i}))]}}))}))}function ie(e,t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){if(!u(e)&&!c(e))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(c(e)&&e.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,r.L((function(){var n=e.shape.slice(c(e)?1:0),o=n[0],i=n[1],a=n[2];return t.map((function(e){return e instanceof x?e.forSize(i,o).box:e})).map((function(e){return e.clipAtImageBorders(i,o)})).map((function(t){var n=t.x,s=t.y,u=t.width,c=t.height;return r.C(e.as3D(o,i,a),[s,n,0],[c,u,a])}))}))]}))}))}function ae(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return[4,(0,H.getEnv().fetch)(e,t)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}}))}))}function se(e){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(t){switch(t.label){case 0:return[4,ae(e)];case 1:return[2,t.sent().json()]}}))}))}function ue(e,t){var n=t+"-weights_manifest.json";if(!e)return{modelBaseUri:"",manifestUri:n};if("/"===e)return{modelBaseUri:"/",manifestUri:"/"+n};var r=e.startsWith("http://")?"http://":e.startsWith("https://")?"https://":"",o=(e=e.replace(r,"")).split("/").filter((function(e){return e})),i=e.endsWith(".json")?o[o.length-1]:n,a=r+(e.endsWith(".json")?o.slice(0,o.length-1):o).join("/");return{modelBaseUri:a=e.startsWith("/")?"/"+a:a,manifestUri:"/"===a?"/"+i:a+"/"+i}}function ce(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,o,a,s;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=ue(e,t),o=n.manifestUri,a=n.modelBaseUri,[4,se(o)];case 1:return s=i.sent(),[2,r.p.loadWeights(s,a)]}}))}))}var le=function(){function e(e){this._name=e,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(e.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),e.prototype.getParamFromPath=function(e){var t=this.traversePropertyPath(e);return t.obj[t.objProp]},e.prototype.reassignParamFromPath=function(e,t){var n=this.traversePropertyPath(e),r=n.obj,o=n.objProp;r[o].dispose(),r[o]=t},e.prototype.getParamList=function(){var e=this;return this._paramMappings.map((function(t){var n=t.paramPath;return{path:n,tensor:e.getParamFromPath(n)}}))},e.prototype.getTrainableParams=function(){return this.getParamList().filter((function(e){return e.tensor instanceof r.b}))},e.prototype.getFrozenParams=function(){return this.getParamList().filter((function(e){return!(e.tensor instanceof r.b)}))},e.prototype.variable=function(){var e=this;this.getFrozenParams().forEach((function(t){var n=t.path,r=t.tensor;e.reassignParamFromPath(n,r.variable())}))},e.prototype.freeze=function(){var e=this;this.getTrainableParams().forEach((function(t){var n=t.path,o=t.tensor,i=r.G(o.dataSync());o.dispose(),e.reassignParamFromPath(n,i)}))},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.getParamList().forEach((function(t){if(e&&t.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+t.path);t.tensor.dispose()})),this._params=void 0},e.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map((function(e){var t=e.tensor;return Array.from(t.dataSync())})).reduce((function(e,t){return e.concat(t)})))},e.prototype.load=function(e){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(t){switch(t.label){case 0:return e instanceof Float32Array?(this.extractWeights(e),[2]):[4,this.loadFromUri(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.loadFromUri=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:if(e&&"string"!==typeof e)throw new Error(this._name+".loadFromUri - expected model uri");return[4,ce(e,this.getDefaultModelName())];case 1:return t=n.sent(),this.loadFromWeightMap(t),[2]}}))}))},e.prototype.loadFromDisk=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,o,a,s,u,c,l,f,d;return Object(i.d)(this,(function(i){switch(i.label){case 0:if(e&&"string"!==typeof e)throw new Error(this._name+".loadFromDisk - expected model file path");return t=H.getEnv().readFile,n=ue(e,this.getDefaultModelName()),o=n.manifestUri,a=n.modelBaseUri,s=function(e){return Promise.all(e.map((function(e){return t(e).then((function(e){return e.buffer}))})))},u=r.p.weightsLoaderFactory(s),f=(l=JSON).parse,[4,t(o)];case 1:return c=f.apply(l,[i.sent().toString()]),[4,u(c,a)];case 2:return d=i.sent(),this.loadFromWeightMap(d),[2]}}))}))},e.prototype.loadFromWeightMap=function(e){var t=this.extractParamsFromWeigthMap(e),n=t.paramMappings,r=t.params;this._paramMappings=n,this._params=r},e.prototype.extractWeights=function(e){var t=this.extractParams(e),n=t.paramMappings,r=t.params;this._paramMappings=n,this._params=r},e.prototype.traversePropertyPath=function(e){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var t=e.split("/").reduce((function(t,n){if(!t.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+e);return{obj:t.nextObj,objProp:n,nextObj:t.nextObj[n]}}),{nextObj:this.params}),n=t.obj,o=t.objProp;if(!n||!o||!(n[o]instanceof r.a))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+e);return{obj:n,objProp:o}},e}();function fe(e,t,n){return r.L((function(){var o=r.z(e,t.depthwise_filter,t.pointwise_filter,n,"same");return o=r.c(o,t.bias)}))}function de(e,t,n){return void 0===n&&(n=!1),r.L((function(){var o=r.w(n?r.c(r.i(e,t.conv0.filters,[2,2],"same"),t.conv0.bias):fe(e,t.conv0,[2,2])),i=fe(o,t.conv1,[1,1]),a=fe(r.w(r.c(o,i)),t.conv2,[1,1]);return r.w(r.c(o,r.c(i,a)))}))}function pe(e,t,n,o){return void 0===n&&(n=!1),void 0===o&&(o=!0),r.L((function(){var i=r.w(n?r.c(r.i(e,t.conv0.filters,o?[2,2]:[1,1],"same"),t.conv0.bias):fe(e,t.conv0,o?[2,2]:[1,1])),a=fe(i,t.conv1,[1,1]),s=fe(r.w(r.c(i,a)),t.conv2,[1,1]),u=fe(r.w(r.c(i,r.c(a,s))),t.conv3,[1,1]);return r.w(r.c(i,r.c(a,r.c(s,u))))}))}function he(e,t,n,o){return void 0===n&&(n="same"),void 0===o&&(o=!1),r.L((function(){var i=r.c(r.i(e,t.filters,[1,1],n),t.bias);return o?r.w(i):i}))}function ve(e,t){Object.keys(e).forEach((function(n){t.some((function(e){return e.originalPath===n}))||e[n].dispose()}))}function me(e,t){return function(n,o,i,a){var s=r.K(e(n*o*i*i),[i,i,n,o]),u=r.H(e(o));return t.push({paramPath:a+"/filters"},{paramPath:a+"/bias"}),{filters:s,bias:u}}}function ge(e,t){return function(n,o,i){var a=r.I(e(n*o),[n,o]),s=r.H(e(o));return t.push({paramPath:i+"/weights"},{paramPath:i+"/bias"}),{weights:a,bias:s}}}var ye=function(e,t,n){this.depthwise_filter=e,this.pointwise_filter=t,this.bias=n};function be(e,t){return function(n,o,i){var a=r.K(e(9*n),[3,3,n,1]),s=r.K(e(n*o),[1,1,n,o]),u=r.H(e(o));return t.push({paramPath:i+"/depthwise_filter"},{paramPath:i+"/pointwise_filter"},{paramPath:i+"/bias"}),new ye(a,s,u)}}function we(e){return function(t){var n=e(t+"/depthwise_filter",4),r=e(t+"/pointwise_filter",4),o=e(t+"/bias",1);return new ye(n,r,o)}}function xe(e,t){return function(n,r,o){var i=e[n];if(!s(i,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+i);return t.push({originalPath:n,paramPath:o||n}),i}}function Ee(e){var t=e;return{extractWeights:function(e){var n=t.slice(0,e);return t=t.slice(e),n},getRemainingWeights:function(){return t}}}function Ce(e,t){var n=me(e,t),r=be(e,t);function o(e,t,o,i){return void 0===i&&(i=!1),{conv0:i?n(e,t,3,o+"/conv0"):r(e,t,o+"/conv0"),conv1:r(t,t,o+"/conv1"),conv2:r(t,t,o+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(e,t,n,i){void 0===i&&(i=!1);var a=o(e,t,n,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:r(t,t,n+"/conv3")}}}}function ke(e){return function(t){return{filters:e(t+"/filters",4),bias:e(t+"/bias",1)}}}function Oe(e,t){var n=xe(e,t),r=ke(n),o=we(n);return{extractDenseBlock3Params:function(e,t){return void 0===t&&(t=!1),{conv0:t?r(e+"/conv0"):o(e+"/conv0"),conv1:o(e+"/conv1"),conv2:o(e+"/conv2")}},extractDenseBlock4Params:function(e,t){return void 0===t&&(t=!1),{conv0:t?r(e+"/conv0"):o(e+"/conv0"),conv1:o(e+"/conv1"),conv2:o(e+"/conv2"),conv3:o(e+"/conv3")}}}}var Se=function(e){function t(){return e.call(this,"FaceFeatureExtractor")||this}return Object(i.c)(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("FaceFeatureExtractor - load model before inference");return r.L((function(){var n=pe(k(e.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(r.y(255)),t.dense0,!0);return n=pe(n,t.dense1),n=pe(n,t.dense2),n=pe(n,t.dense3),n=r.d(n,[7,7],[2,2],"valid")}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},t.prototype.extractParamsFromWeigthMap=function(e){return function(e){var t=[],n=Oe(e,t).extractDenseBlock4Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return ve(e,t),{params:r,paramMappings:t}}(e)},t.prototype.extractParams=function(e){return function(e){var t=[],n=Ee(e),r=n.extractWeights,o=n.getRemainingWeights,i=Ce(r,t).extractDenseBlock4Params,a=i(3,32,"dense0",!0),s=i(32,64,"dense1"),u=i(64,128,"dense2"),c=i(128,256,"dense3");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:t,params:{dense0:a,dense1:s,dense2:u,dense3:c}}}(e)},t}(le);function _e(e,t){return r.L((function(){return r.c(r.q(e,t.weights),t.bias)}))}function Te(e){var t={},n={};return Object.keys(e).forEach((function(r){(r.startsWith("fc")?n:t)[r]=e[r]})),{featureExtractorMap:t,classifierMap:n}}var Ie=function(e){function t(t,n){var r=e.call(this,t)||this;return r._faceFeatureExtractor=n,r}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var t=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return r.L((function(){var r=e instanceof ne?t.faceFeatureExtractor.forwardInput(e):e;return _e(r.as2D(r.shape[0],-1),n.fc)}))},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.faceFeatureExtractor.dispose(t),e.prototype.dispose.call(this,t)},t.prototype.loadClassifierParams=function(e){var t=this.extractClassifierParams(e),n=t.params,r=t.paramMappings;this._params=n,this._paramMappings=r},t.prototype.extractClassifierParams=function(e){return function(e,t,n){var r=[],o=Ee(e),i=o.extractWeights,a=o.getRemainingWeights,s=ge(i,r)(t,n,"fc");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:r,params:{fc:s}}}(e,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},t.prototype.extractParamsFromWeigthMap=function(e){var t=Te(e),n=t.featureExtractorMap,r=t.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(e){var t,n=[],r=xe(e,n),o={fc:(t="fc",{weights:r(t+"/weights",2),bias:r(t+"/bias",1)})};return ve(e,n),{params:o,paramMappings:n}}(r)},t.prototype.extractParams=function(e){var t=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*t+n,o=e.slice(0,e.length-r),i=e.slice(e.length-r);return this.faceFeatureExtractor.extractWeights(o),this.extractClassifierParams(i)},t}(le),Pe=["neutral","happy","sad","angry","fearful","disgusted","surprised"],Ae=function(){function e(e){var t=this;if(7!==e.length)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+e.length);Pe.forEach((function(n,r){t[n]=e[r]}))}return e.prototype.asSortedArray=function(){var e=this;return Pe.map((function(t){return{expression:t,probability:e[t]}})).sort((function(e,t){return t.probability-e.probability}))},e}(),Re=function(e){function t(t){return void 0===t&&(t=new Se),e.call(this,"FaceExpressionNet",t)||this}return Object(i.c)(t,e),t.prototype.forwardInput=function(e){var t=this;return r.L((function(){return r.D(t.runNet(e))}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.predictExpressions=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,o,a,s=this;return Object(i.d)(this,(function(u){switch(u.label){case 0:return[4,re(e)];case 1:return t=u.sent(),[4,this.forwardInput(t)];case 2:return n=u.sent(),[4,Promise.all(r.O(n).map((function(e){return Object(i.b)(s,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,e.data()];case 1:return t=n.sent(),e.dispose(),[2,t]}}))}))})))];case 3:return o=u.sent(),n.dispose(),a=o.map((function(e){return new Ae(e)})),[2,t.isBatchInput?a:a[0]]}}))}))},t.prototype.getDefaultModelName=function(){return"face_expression_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t.prototype.getClassifierChannelsOut=function(){return 7},t}(Ie);function Ne(e,t){var n={expressions:t};return Object.assign({},e,n)}function Me(e){return N(e)&&e.landmarks instanceof _&&e.unshiftedLandmarks instanceof _&&e.alignedRect instanceof x}function je(e,t){var n=e.detection.box,r=t.shiftBy(n.x,n.y),o=r.align(),i=e.detection.imageDims,a={landmarks:r,unshiftedLandmarks:t,alignedRect:new x(e.detection.score,o.rescale(i.reverse()),i)};return Object.assign({},e,a)}var De=function(e){void 0===e&&(e={});var t=e.drawLines,n=void 0===t||t,r=e.drawPoints,o=void 0===r||r,i=e.lineWidth,a=e.lineColor,s=e.pointSize,u=e.pointColor;this.drawLines=n,this.drawPoints=o,this.lineWidth=i||1,this.pointSize=s||2,this.lineColor=a||"rgba(0, 255, 255, 1)",this.pointColor=u||"rgba(255, 0, 255, 1)"};!function(){function e(e,t){void 0===t&&(t={}),this.faceLandmarks=e,this.options=new De(t)}e.prototype.draw=function(e){var t=q(e),n=this.options,r=n.drawLines,i=n.drawPoints,a=n.lineWidth,s=n.lineColor,u=n.pointSize,c=n.pointColor;if(r&&this.faceLandmarks instanceof I&&(t.strokeStyle=s,t.lineWidth=a,o(t,this.faceLandmarks.getJawOutline()),o(t,this.faceLandmarks.getLeftEyeBrow()),o(t,this.faceLandmarks.getRightEyeBrow()),o(t,this.faceLandmarks.getNose()),o(t,this.faceLandmarks.getLeftEye(),!0),o(t,this.faceLandmarks.getRightEye(),!0),o(t,this.faceLandmarks.getMouth(),!0)),i){t.strokeStyle=c,t.fillStyle=c;this.faceLandmarks.positions.forEach((function(e){t.beginPath(),t.arc(e.x,e.y,u,0,2*Math.PI),t.fill()}))}}}();function Fe(e,t){var n=[],r=Ee(e),o=r.extractWeights,i=r.getRemainingWeights,a=function(e,t){var n=me(e,t),r=be(e,t);return{extractConvParams:n,extractSeparableConvParams:r,extractReductionBlockParams:function(e,t,o){return{separable_conv0:r(e,t,o+"/separable_conv0"),separable_conv1:r(t,t,o+"/separable_conv1"),expansion_conv:n(e,t,1,o+"/expansion_conv")}},extractMainBlockParams:function(e,t){return{separable_conv0:r(e,e,t+"/separable_conv0"),separable_conv1:r(e,e,t+"/separable_conv1"),separable_conv2:r(e,e,t+"/separable_conv2")}}}}(o,n),s=a.extractConvParams,u=a.extractSeparableConvParams,c=a.extractReductionBlockParams,l=a.extractMainBlockParams,f={conv_in:s(3,32,3,"entry_flow/conv_in"),reduction_block_0:c(32,64,"entry_flow/reduction_block_0"),reduction_block_1:c(64,128,"entry_flow/reduction_block_1")},d={};h(t,0,1).forEach((function(e){d["main_block_"+e]=l(128,"middle_flow/main_block_"+e)}));var p={reduction_block:c(128,256,"exit_flow/reduction_block"),separable_conv:u(256,512,"exit_flow/separable_conv")};if(0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:n,params:{entry_flow:f,middle_flow:d,exit_flow:p}}}function Le(e,t){var n=[],r=function(e,t){var n=xe(e,t),r=ke(n),o=we(n);return{extractConvParams:r,extractSeparableConvParams:o,extractReductionBlockParams:function(e){return{separable_conv0:o(e+"/separable_conv0"),separable_conv1:o(e+"/separable_conv1"),expansion_conv:r(e+"/expansion_conv")}},extractMainBlockParams:function(e){return{separable_conv0:o(e+"/separable_conv0"),separable_conv1:o(e+"/separable_conv1"),separable_conv2:o(e+"/separable_conv2")}}}}(e,n),o=r.extractConvParams,i=r.extractSeparableConvParams,a=r.extractReductionBlockParams,s=r.extractMainBlockParams,u={conv_in:o("entry_flow/conv_in"),reduction_block_0:a("entry_flow/reduction_block_0"),reduction_block_1:a("entry_flow/reduction_block_1")},c={};h(t,0,1).forEach((function(e){c["main_block_"+e]=s("middle_flow/main_block_"+e)}));var l={reduction_block:a("exit_flow/reduction_block"),separable_conv:i("exit_flow/separable_conv")};return ve(e,n),{params:{entry_flow:u,middle_flow:c,exit_flow:l},paramMappings:n}}function Be(e,t,n){return r.c(r.i(e,t.filters,n,"same"),t.bias)}function Ue(e,t,n){void 0===n&&(n=!0);var o=n?r.w(e):e;return o=fe(o,t.separable_conv0,[1,1]),o=fe(r.w(o),t.separable_conv1,[1,1]),o=r.s(o,[3,3],[2,2],"same"),o=r.c(o,Be(e,t.expansion_conv,[2,2]))}var ze,Ve=function(e){function t(t){var n=e.call(this,"TinyXception")||this;return n._numMainBlocks=t,n}return Object(i.c)(t,e),t.prototype.forwardInput=function(e){var t=this,n=this.params;if(!n)throw new Error("TinyXception - load model before inference");return r.L((function(){var o=k(e.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(r.y(256)),i=r.w(Be(o,n.entry_flow.conv_in,[2,2]));return i=Ue(i,n.entry_flow.reduction_block_0,!1),i=Ue(i,n.entry_flow.reduction_block_1),h(t._numMainBlocks,0,1).forEach((function(e){i=function(e,t){var n=fe(r.w(e),t.separable_conv0,[1,1]);return n=fe(r.w(n),t.separable_conv1,[1,1]),n=fe(r.w(n),t.separable_conv2,[1,1]),r.c(n,e)}(i,n.middle_flow["main_block_"+e])})),i=Ue(i,n.exit_flow.reduction_block),i=r.w(fe(i,n.exit_flow.separable_conv,[1,1]))}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.getDefaultModelName=function(){return"tiny_xception_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Le(e,this._numMainBlocks)},t.prototype.extractParams=function(e){return Fe(e,this._numMainBlocks)},t}(le);!function(e){e.FEMALE="female",e.MALE="male"}(ze||(ze={}));var We=function(e){function t(t){void 0===t&&(t=new Ve(2));var n=e.call(this,"AgeGenderNet")||this;return n._faceFeatureExtractor=t,n}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var t=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return r.L((function(){var o=e instanceof ne?t.faceFeatureExtractor.forwardInput(e):e,i=r.d(o,[7,7],[2,2],"valid").as2D(o.shape[0],-1);return{age:_e(i,n.fc.age).as1D(),gender:_e(i,n.fc.gender)}}))},t.prototype.forwardInput=function(e){var t=this;return r.L((function(){var n=t.runNet(e),o=n.age,i=n.gender;return{age:o,gender:r.D(i)}}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.predictAgeAndGender=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,o,a,s,u,c=this;return Object(i.d)(this,(function(l){switch(l.label){case 0:return[4,re(e)];case 1:return t=l.sent(),[4,this.forwardInput(t)];case 2:return n=l.sent(),o=r.O(n.age),a=r.O(n.gender),s=o.map((function(e,t){return{ageTensor:e,genderTensor:a[t]}})),[4,Promise.all(s.map((function(e){var t=e.ageTensor,n=e.genderTensor;return Object(i.b)(c,void 0,void 0,(function(){var e,r,o,a,s;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,t.data()];case 1:return e=i.sent()[0],[4,n.data()];case 2:return r=i.sent()[0],a=(o=r>.5)?ze.MALE:ze.FEMALE,s=o?r:1-r,t.dispose(),n.dispose(),[2,{age:e,gender:a,genderProbability:s}]}}))}))})))];case 3:return u=l.sent(),n.age.dispose(),n.gender.dispose(),[2,t.isBatchInput?u:u[0]]}}))}))},t.prototype.getDefaultModelName=function(){return"age_gender_model"},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.faceFeatureExtractor.dispose(t),e.prototype.dispose.call(this,t)},t.prototype.loadClassifierParams=function(e){var t=this.extractClassifierParams(e),n=t.params,r=t.paramMappings;this._params=n,this._paramMappings=r},t.prototype.extractClassifierParams=function(e){return function(e){var t=[],n=Ee(e),r=n.extractWeights,o=n.getRemainingWeights,i=ge(r,t),a=i(512,1,"fc/age"),s=i(512,2,"fc/gender");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:t,params:{fc:{age:a,gender:s}}}}(e)},t.prototype.extractParamsFromWeigthMap=function(e){var t=Te(e),n=t.featureExtractorMap,r=t.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(e){var t=[],n=xe(e,t);function r(e){return{weights:n(e+"/weights",2),bias:n(e+"/bias",1)}}var o={fc:{age:r("fc/age"),gender:r("fc/gender")}};return ve(e,t),{params:o,paramMappings:t}}(r)},t.prototype.extractParams=function(e){var t=e.slice(0,e.length-1539),n=e.slice(e.length-1539);return this.faceFeatureExtractor.extractWeights(t),this.extractClassifierParams(n)},t}(le),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.postProcess=function(e,t,n){var o=n.map((function(e){var n=e.width,r=e.height,o=t/Math.max(r,n);return{width:n*o,height:r*o}})),i=o.length;return r.L((function(){var n=function(e,t){return r.E([r.n([68],e),r.n([68],t)],1).as2D(1,136).as1D()},a=function(e,t){var n=o[e],r=n.width,i=n.height;return t(r,i)?Math.abs(r-i)/2:0};return e.mul(r.n([i,136],t)).sub(r.E(Array.from(Array(i),(function(e,t){return n(function(e){return a(e,(function(e,t){return e<t}))}(t),function(e){return a(e,(function(e,t){return t<e}))}(t))})))).div(r.E(Array.from(Array(i),(function(e,t){return n(o[t].width,o[t].height)}))))}))},t.prototype.forwardInput=function(e){var t=this;return r.L((function(){var n=t.runNet(e);return t.postProcess(n,e.inputSize,e.inputDimensions.map((function(e){return{height:e[0],width:e[1]}})))}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.detectLandmarks=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,o,a=this;return Object(i.d)(this,(function(s){switch(s.label){case 0:return[4,re(e)];case 1:return t=s.sent(),n=r.L((function(){return r.O(a.forwardInput(t))})),[4,Promise.all(n.map((function(e,n){return Object(i.b)(a,void 0,void 0,(function(){var r,o,a,s,u;return Object(i.d)(this,(function(i){switch(i.label){case 0:return a=(o=Array).from,[4,e.data()];case 1:return r=a.apply(o,[i.sent()]),s=r.filter((function(e,t){return l(t)})),u=r.filter((function(e,t){return!l(t)})),[2,new I(Array(68).fill(0).map((function(e,t){return new g(s[t],u[t])})),{height:t.getInputHeight(n),width:t.getInputWidth(n)})]}}))}))})))];case 2:return o=s.sent(),n.forEach((function(e){return e.dispose()})),[2,t.isBatchInput?o:o[0]]}}))}))},t.prototype.getClassifierChannelsOut=function(){return 136},t}(Ie),$e=function(e){function t(t){return void 0===t&&(t=new Se),e.call(this,"FaceLandmark68Net",t)||this}return Object(i.c)(t,e),t.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t}(He);var qe=function(e){function t(){return e.call(this,"TinyFaceFeatureExtractor")||this}return Object(i.c)(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("TinyFaceFeatureExtractor - load model before inference");return r.L((function(){var n=de(k(e.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(r.y(255)),t.dense0,!0);return n=de(n,t.dense1),n=de(n,t.dense2),n=r.d(n,[14,14],[2,2],"valid")}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},t.prototype.extractParamsFromWeigthMap=function(e){return function(e){var t=[],n=Oe(e,t).extractDenseBlock3Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2")};return ve(e,t),{params:r,paramMappings:t}}(e)},t.prototype.extractParams=function(e){return function(e){var t=[],n=Ee(e),r=n.extractWeights,o=n.getRemainingWeights,i=Ce(r,t).extractDenseBlock3Params,a=i(3,32,"dense0",!0),s=i(32,64,"dense1"),u=i(64,128,"dense2");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:t,params:{dense0:a,dense1:s,dense2:u}}}(e)},t}(le),Ke=function(e){function t(t){return void 0===t&&(t=new qe),e.call(this,"FaceLandmark68TinyNet",t)||this}return Object(i.c)(t,e),t.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},t.prototype.getClassifierChannelsIn=function(){return 128},t}(He);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(i.c)(t,e)}($e);function Ge(e,t,n,o,i){void 0===i&&(i="same");var a=t.conv,s=a.filters,u=a.bias,c=r.i(e,s,n,i);return c=function(e,t){return r.c(r.t(e,t.weights),t.biases)}(c=r.c(c,u),t.scale),o?r.w(c):c}function Xe(e,t){return Ge(e,t,[1,1],!1)}function Ye(e,t){return Ge(e,t,[2,2],!0,"valid")}function Je(e,t){function n(n,o,i,a){var s=function(t,n,o){var i=e(t),a=i.length/(n*o*o);if(a%1!==0)throw new Error("depth has to be an integer: "+a+", weights.length: "+i.length+", numFilters: "+n+", filterSize: "+o);return r.L((function(){return r.N(r.K(i,[n,a,o,o]),[2,3,1,0])}))}(n,o,i),u=r.H(e(o));return t.push({paramPath:a+"/filters"},{paramPath:a+"/bias"}),{filters:s,bias:u}}function o(o,i,a,s){return{conv:n(o,i,a,s+"/conv"),scale:function(n,o){var i=r.H(e(n)),a=r.H(e(n));return t.push({paramPath:o+"/weights"},{paramPath:o+"/biases"}),{weights:i,biases:a}}(i,s+"/scale")}}return{extractConvLayerParams:o,extractResidualLayerParams:function(e,t,n,r,i){return void 0===i&&(i=!1),{conv1:o((i?.5:1)*e,t,n,r+"/conv1"),conv2:o(e,t,n,r+"/conv2")}}}}function Qe(e,t){var n=xe(e,t);function r(e){return{conv:{filters:n(e+"/conv/filters",4),bias:n(e+"/conv/bias",1)},scale:function(e){return{weights:n(e+"/scale/weights",1),biases:n(e+"/scale/biases",1)}}(e)}}return{extractConvLayerParams:r,extractResidualLayerParams:function(e){return{conv1:r(e+"/conv1"),conv2:r(e+"/conv2")}}}}function Ze(e){var t=[],n=Qe(e,t),r=n.extractConvLayerParams,o=n.extractResidualLayerParams,i=r("conv32_down"),a=o("conv32_1"),u=o("conv32_2"),c=o("conv32_3"),l=o("conv64_down"),f=o("conv64_1"),d=o("conv64_2"),p=o("conv64_3"),h=o("conv128_down"),v=o("conv128_1"),m=o("conv128_2"),g=o("conv256_down"),y=o("conv256_1"),b=o("conv256_2"),w=o("conv256_down_out"),x=e.fc;if(t.push({originalPath:"fc",paramPath:"fc"}),!s(x,2))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+x);var E={conv32_down:i,conv32_1:a,conv32_2:u,conv32_3:c,conv64_down:l,conv64_1:f,conv64_2:d,conv64_3:p,conv128_down:h,conv128_1:v,conv128_2:m,conv256_down:g,conv256_1:y,conv256_2:b,conv256_down_out:w,fc:x};return ve(e,t),{params:E,paramMappings:t}}function et(e,t){var n=function(e,t){return Ge(e,t,[1,1],!0)}(e,t.conv1);return n=Xe(n,t.conv2),n=r.c(n,e),n=r.w(n)}function tt(e,t){var n=Ye(e,t.conv1);n=Xe(n,t.conv2);var o=r.d(e,2,2,"valid"),a=r.P(o.shape),s=o.shape[3]!==n.shape[3];if(o.shape[1]!==n.shape[1]||o.shape[2]!==n.shape[2]){var u=Object(i.e)(n.shape);u[1]=1;var c=r.P(u);n=r.h([n,c],1);var l=Object(i.e)(n.shape);l[2]=1;var f=r.P(l);n=r.h([n,f],2)}return o=s?r.h([o,a],3):o,n=r.c(o,n),n=r.w(n)}var nt=function(e){function t(){return e.call(this,"FaceRecognitionNet")||this}return Object(i.c)(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("FaceRecognitionNet - load model before inference");return r.L((function(){var n=Ye(k(e.toBatchTensor(150,!0).toFloat(),[122.782,117.001,104.298]).div(r.y(256)),t.conv32_down);n=et(n=r.s(n,3,2,"valid"),t.conv32_1),n=et(n,t.conv32_2),n=et(n,t.conv32_3),n=et(n=tt(n,t.conv64_down),t.conv64_1),n=et(n,t.conv64_2),n=et(n,t.conv64_3),n=et(n=tt(n,t.conv128_down),t.conv128_1),n=et(n,t.conv128_2),n=et(n=tt(n,t.conv256_down),t.conv256_1);var o=(n=tt(n=et(n,t.conv256_2),t.conv256_down_out)).mean([1,2]);return r.q(o,t.fc)}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.computeFaceDescriptor=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t,n,o,a=this;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,re(e)];case 1:return t=i.sent(),n=r.L((function(){return r.O(a.forwardInput(t))})),[4,Promise.all(n.map((function(e){return e.data()})))];case 2:return o=i.sent(),n.forEach((function(e){return e.dispose()})),[2,t.isBatchInput?o:o[0]]}}))}))},t.prototype.getDefaultModelName=function(){return"face_recognition_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Ze(e)},t.prototype.extractParams=function(e){return function(e){var t=Ee(e),n=t.extractWeights,o=t.getRemainingWeights,i=[],a=Je(n,i),s=a.extractConvLayerParams,u=a.extractResidualLayerParams,c=s(4704,32,7,"conv32_down"),l=u(9216,32,3,"conv32_1"),f=u(9216,32,3,"conv32_2"),d=u(9216,32,3,"conv32_3"),p=u(36864,64,3,"conv64_down",!0),h=u(36864,64,3,"conv64_1"),v=u(36864,64,3,"conv64_2"),m=u(36864,64,3,"conv64_3"),g=u(147456,128,3,"conv128_down",!0),y=u(147456,128,3,"conv128_1"),b=u(147456,128,3,"conv128_2"),w=u(589824,256,3,"conv256_down",!0),x=u(589824,256,3,"conv256_1"),E=u(589824,256,3,"conv256_2"),C=u(589824,256,3,"conv256_down_out"),k=r.L((function(){return r.N(r.I(n(32768),[128,256]),[1,0])}));if(i.push({paramPath:"fc"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{conv32_down:c,conv32_1:l,conv32_2:f,conv32_3:d,conv64_down:p,conv64_1:h,conv64_2:v,conv64_3:m,conv128_down:g,conv128_1:y,conv128_2:b,conv256_down:w,conv256_1:x,conv256_2:E,conv256_down_out:C,fc:k},paramMappings:i}}(e)},t}(le);function rt(e,t){var n={descriptor:t};return Object.assign({},e,n)}function ot(e,t){var n={age:t};return Object.assign({},e,n)}function it(e,t,n){var r={gender:t,genderProbability:n};return Object.assign({},e,r)}var at=function(){function e(e){var t=void 0===e?{}:e,n=t.minFaceSize,r=t.scaleFactor,o=t.maxNumScales,i=t.scoreThresholds,a=t.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=n||20,this._scaleFactor=r||.709,this._maxNumScales=o||10,this._scoreThresholds=i||[.6,.7,.7],this._scaleSteps=a,"number"!==typeof this._minFaceSize||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if("number"!==typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!==typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some((function(e){return"number"!==typeof e})))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some((function(e){return"number"!==typeof e}))))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(e.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),e}();function st(e,t){function n(n,o,i,a,s){var u=r.K(e(n*o*i*i),[i,i,n,o]),c=r.H(e(o));return t.push({paramPath:a+"/filters"},{paramPath:a+"/"+(s?"batch_norm_offset":"bias")}),{filters:u,bias:c}}function o(e,t,r,o){var i=n(e,t,r,o,!0);return{filters:i.filters,batch_norm_offset:i.bias}}function i(n,i,a){return{depthwise_conv:function(n,o){var i=r.K(e(9*n),[3,3,n,1]),a=r.H(e(n)),s=r.H(e(n)),u=r.H(e(n)),c=r.H(e(n));return t.push({paramPath:o+"/filters"},{paramPath:o+"/batch_norm_scale"},{paramPath:o+"/batch_norm_offset"},{paramPath:o+"/batch_norm_mean"},{paramPath:o+"/batch_norm_variance"}),{filters:i,batch_norm_scale:a,batch_norm_offset:s,batch_norm_mean:u,batch_norm_variance:c}}(n,a+"/depthwise_conv"),pointwise_conv:o(n,i,1,a+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:o(3,32,3,"mobilenetv1/conv_0"),conv_1:i(32,64,"mobilenetv1/conv_1"),conv_2:i(64,128,"mobilenetv1/conv_2"),conv_3:i(128,128,"mobilenetv1/conv_3"),conv_4:i(128,256,"mobilenetv1/conv_4"),conv_5:i(256,256,"mobilenetv1/conv_5"),conv_6:i(256,512,"mobilenetv1/conv_6"),conv_7:i(512,512,"mobilenetv1/conv_7"),conv_8:i(512,512,"mobilenetv1/conv_8"),conv_9:i(512,512,"mobilenetv1/conv_9"),conv_10:i(512,512,"mobilenetv1/conv_10"),conv_11:i(512,512,"mobilenetv1/conv_11"),conv_12:i(512,1024,"mobilenetv1/conv_12"),conv_13:i(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:o(1024,256,1,"prediction_layer/conv_0"),conv_1:o(256,512,3,"prediction_layer/conv_1"),conv_2:o(512,128,1,"prediction_layer/conv_2"),conv_3:o(128,256,3,"prediction_layer/conv_3"),conv_4:o(256,128,1,"prediction_layer/conv_4"),conv_5:o(128,256,3,"prediction_layer/conv_5"),conv_6:o(256,64,1,"prediction_layer/conv_6"),conv_7:o(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function ut(e){var t=[],n=function(e,t){var n=xe(e,t);function r(e,t,r){return{filters:n(e+"/Conv2d_"+t+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(e+"/Conv2d_"+t+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function o(e){var t="mobilenetv1/conv_"+e,o="MobilenetV1/Conv2d_"+e+"_depthwise",i=t+"/depthwise_conv",a=t+"/pointwise_conv";return{depthwise_conv:{filters:n(o+"/depthwise_weights",4,i+"/filters"),batch_norm_scale:n(o+"/BatchNorm/gamma",1,i+"/batch_norm_scale"),batch_norm_offset:n(o+"/BatchNorm/beta",1,i+"/batch_norm_offset"),batch_norm_mean:n(o+"/BatchNorm/moving_mean",1,i+"/batch_norm_mean"),batch_norm_variance:n(o+"/BatchNorm/moving_variance",1,i+"/batch_norm_variance")},pointwise_conv:r("MobilenetV1",e,a)}}function i(e,t){return{filters:n(e+"/weights",4,t+"/filters"),bias:n(e+"/biases",1,t+"/bias")}}function a(e){return{box_encoding_predictor:i("Prediction/BoxPredictor_"+e+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+e+"/box_encoding_predictor"),class_predictor:i("Prediction/BoxPredictor_"+e+"/ClassPredictor","prediction_layer/box_predictor_"+e+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:o(1),conv_2:o(2),conv_3:o(3),conv_4:o(4),conv_5:o(5),conv_6:o(6),conv_7:o(7),conv_8:o(8),conv_9:o(9),conv_10:o(10),conv_11:o(11),conv_12:o(12),conv_13:o(13)}},extractPredictionLayerParams:function(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:a(0),box_predictor_1:a(1),box_predictor_2:a(2),box_predictor_3:a(3),box_predictor_4:a(4),box_predictor_5:a(5)}}}}(e,t),r=n.extractMobilenetV1Params,o=n.extractPredictionLayerParams,i=e["Output/extra_dim"];if(t.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!u(i))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+i);var a={mobilenetv1:r(),prediction_layer:o(),output_layer:{extra_dim:i}};return ve(e,t),{params:a,paramMappings:t}}function ct(e,t,n){return r.L((function(){var o=r.i(e,t.filters,n,"same");return o=r.c(o,t.batch_norm_offset),r.g(o,0,6)}))}function lt(e,t){return r.L((function(){var n=null,o=ct(e,t.conv_0,[2,2]);if([t.conv_1,t.conv_2,t.conv_3,t.conv_4,t.conv_5,t.conv_6,t.conv_7,t.conv_8,t.conv_9,t.conv_10,t.conv_11,t.conv_12,t.conv_13].forEach((function(e,t){var i=t+1,a=function(e){return[2,4,6,12].some((function(t){return t===e}))?[2,2]:[1,1]}(i);o=ct(o=function(e,t,n){return r.L((function(){var o=r.j(e,t.filters,n,"same");return o=r.e(o,t.batch_norm_mean,t.batch_norm_variance,t.batch_norm_offset,t.batch_norm_scale,.0010000000474974513),r.g(o,0,6)}))}(o,e.depthwise_conv,a),e.pointwise_conv,[1,1]),11===i&&(n=o)})),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:o,conv11:n}}))}function ft(e,t,n){var r=e.arraySync(),o=Math.min(r[t][0],r[t][2]),i=Math.min(r[t][1],r[t][3]),a=Math.max(r[t][0],r[t][2]),s=Math.max(r[t][1],r[t][3]),u=Math.min(r[n][0],r[n][2]),c=Math.min(r[n][1],r[n][3]),l=Math.max(r[n][0],r[n][2]),f=Math.max(r[n][1],r[n][3]),d=(a-o)*(s-i),p=(l-u)*(f-c);if(d<=0||p<=0)return 0;var h=Math.max(o,u),v=Math.max(i,c),m=Math.min(a,l),g=Math.min(s,f),y=Math.max(m-h,0)*Math.max(g-v,0);return y/(d+p-y)}function dt(e,t){var n=function(e){var t=r.O(r.N(e,[1,0])),n=[r.F(t[2],t[0]),r.F(t[3],t[1])];return{sizes:n,centers:[r.c(t[0],r.k(n[0],r.y(2))),r.c(t[1],r.k(n[1],r.y(2)))]}}(e),o=n.sizes,i=n.centers,a=r.O(r.N(t,[1,0])),s=r.k(r.t(r.l(r.k(a[2],r.y(5))),o[0]),r.y(2)),u=r.c(r.t(r.k(a[0],r.y(10)),o[0]),i[0]),c=r.k(r.t(r.l(r.k(a[3],r.y(5))),o[1]),r.y(2)),l=r.c(r.t(r.k(a[1],r.y(10)),o[1]),i[1]);return r.N(r.E([r.F(u,s),r.F(l,c),r.c(u,s),r.c(l,c)]),[1,0])}function pt(e,t){return r.L((function(){var n=e.shape[0];return{boxPredictionEncoding:r.x(he(e,t.box_encoding_predictor),[n,-1,1,4]),classPrediction:r.x(he(e,t.class_predictor),[n,-1,3])}}))}var ht=function(){function e(e){var t=void 0===e?{}:e,n=t.minConfidence,r=t.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!==typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!==typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(e.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),e}(),vt=function(e){function t(){return e.call(this,"SsdMobilenetv1")||this}return Object(i.c)(t,e),t.prototype.forwardInput=function(e){var t=this.params;if(!t)throw new Error("SsdMobilenetv1 - load model before inference");return r.L((function(){var n=e.toBatchTensor(512,!1).toFloat(),o=lt(r.F(r.t(n,r.y(.007843137718737125)),r.y(1)),t.mobilenetv1),i=function(e,t,n){return r.L((function(){var o=ct(e,n.conv_0,[1,1]),i=ct(o,n.conv_1,[2,2]),a=ct(i,n.conv_2,[1,1]),s=ct(a,n.conv_3,[2,2]),u=ct(s,n.conv_4,[1,1]),c=ct(u,n.conv_5,[2,2]),l=ct(c,n.conv_6,[1,1]),f=ct(l,n.conv_7,[2,2]),d=pt(t,n.box_predictor_0),p=pt(e,n.box_predictor_1),h=pt(i,n.box_predictor_2),v=pt(s,n.box_predictor_3),m=pt(c,n.box_predictor_4),g=pt(f,n.box_predictor_5);return{boxPredictions:r.h([d.boxPredictionEncoding,p.boxPredictionEncoding,h.boxPredictionEncoding,v.boxPredictionEncoding,m.boxPredictionEncoding,g.boxPredictionEncoding],1),classPredictions:r.h([d.classPrediction,p.classPrediction,h.classPrediction,v.classPrediction,m.classPrediction,g.classPrediction],1)}}))}(o.out,o.conv11,t.prediction_layer);return function(e,t,n){return r.L((function(){var o=e.shape[0],i=dt(r.x(r.M(n.extra_dim,[o,1,1]),[-1,4]),r.x(e,[-1,4]));i=r.x(i,[o,i.shape[0]/o,4]);var a=r.A(r.B(t,[0,0,1],[-1,-1,-1])),s=r.B(a,[0,0,0],[-1,-1,1]);return s=r.x(s,[o,s.shape[1]]),{boxes:r.O(i),scores:r.O(s)}}))}(i.boxPredictions,i.classPredictions,t.output_layer)}))},t.prototype.forward=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=this.forwardInput,[4,re(e)];case 1:return[2,t.apply(this,[n.sent()])]}}))}))},t.prototype.locateFaces=function(e,t){return void 0===t&&(t={}),Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a,s,u,c,l,f,d,p,h,v,m,g,y,b,w,E,C;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=new ht(t),r=n.maxResults,o=n.minConfidence,[4,re(e)];case 1:for(a=i.sent(),s=this.forwardInput(a),u=s.boxes,c=s.scores,l=u[0],f=c[0],d=1;d<u.length;d++)u[d].dispose(),c[d].dispose();return v=(h=Array).from,[4,f.data()];case 2:return p=v.apply(h,[i.sent()]),.5,m=function(e,t,n,r,o){var i=e.shape[0],a=Math.min(n,i),s=t.map((function(e,t){return{score:e,boxIndex:t}})).filter((function(e){return e.score>o})).sort((function(e,t){return t.score-e.score})),u=[];return s.forEach((function(t){if(!(u.length>=a)){for(var n=t.score,i=u.length-1;i>=0;--i){var s=ft(e,t.boxIndex,u[i]);if(0!==s&&(t.score*=s<=r?1:0,t.score<=o))break}n===t.score&&u.push(t.boxIndex)}})),u}(l,p,r,.5,o),g=a.getReshapedInputDimensions(0),y=a.inputSize,b=y/g.width,w=y/g.height,E=l.arraySync(),C=m.map((function(e){var t=[Math.max(0,E[e][0]),Math.min(1,E[e][2])].map((function(e){return e*w})),n=t[0],r=t[1],o=[Math.max(0,E[e][1]),Math.min(1,E[e][3])].map((function(e){return e*b})),i=o[0],s=o[1];return new x(p[e],new S(i,n,s-i,r-n),{height:a.getInputHeight(0),width:a.getInputWidth(0)})})),l.dispose(),f.dispose(),[2,C]}}))}))},t.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},t.prototype.extractParamsFromWeigthMap=function(e){return ut(e)},t.prototype.extractParams=function(e){return function(e){var t=[],n=Ee(e),o=n.extractWeights,i=n.getRemainingWeights,a=st(o,t),s=a.extractMobilenetV1Params,u=a.extractPredictionLayerParams,c=s(),l=u(),f={extra_dim:r.J(o(20472),[1,5118,4])};if(t.push({paramPath:"output_layer/extra_dim"}),0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{params:{mobilenetv1:c,prediction_layer:l,output_layer:f},paramMappings:t}}(e)},t}(le);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(i.c)(t,e)}(vt);var mt,gt=[new g(.738768,.874946),new g(2.42204,2.65704),new g(4.30971,7.04493),new g(10.246,4.59428),new g(12.6868,11.8741)],yt=[new g(1.603231,2.094468),new g(6.041143,7.080126),new g(2.882459,3.518061),new g(4.266906,5.178857),new g(9.041765,10.66308)],bt=[117.001,114.697,97.404],wt=function(e){return"number"===typeof e};function xt(e){return r.L((function(){var t=r.t(e,r.y(.10000000149011612));return r.c(r.w(r.F(e,t)),t)}))}function Et(e,t){return r.L((function(){var n=r.v(e,[[0,0],[1,1],[1,1],[0,0]]);return n=r.i(n,t.conv.filters,[1,1],"valid"),n=r.F(n,t.bn.sub),n=r.t(n,t.bn.truediv),xt(n=r.c(n,t.conv.bias))}))}function Ct(e,t){return r.L((function(){var n=r.v(e,[[0,0],[1,1],[1,1],[0,0]]);return n=r.z(n,t.depthwise_filter,t.pointwise_filter,[1,1],"valid"),xt(n=r.c(n,t.bias))}))}function kt(e,t){var n=me(e,t);var o=be(e,t);return{extractConvParams:n,extractConvWithBatchNormParams:function(o,i,a){return{conv:n(o,i,3,a+"/conv"),bn:function(n,o){var i=r.H(e(n)),a=r.H(e(n));return t.push({paramPath:o+"/sub"},{paramPath:o+"/truediv"}),{sub:i,truediv:a}}(i,a+"/bn")}},extractSeparableConvParams:o}}function Ot(e,t){var n=xe(e,t);function r(e){return{filters:n(e+"/filters",4),bias:n(e+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(e){return{conv:r(e+"/conv"),bn:function(e){return{sub:n(e+"/sub",1),truediv:n(e+"/truediv",1)}}(e+"/bn")}},extractSeparableConvParams:we(n)}}!function(e){e[e.XS=224]="XS",e[e.SM=320]="SM",e[e.MD=416]="MD",e[e.LG=608]="LG"}(mt||(mt={}));var St=function(){function e(e){var t=void 0===e?{}:e,n=t.inputSize,r=t.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!==typeof this._inputSize||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!==typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(e.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),e}(),_t=function(e){function t(t){var n=e.call(this,"TinyYolov2")||this;return function(e){if(!e)throw new Error("invalid config: "+e);if("boolean"!==typeof e.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+e.withSeparableConvs);if(!wt(e.iouThreshold)||e.iouThreshold<0||e.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+e.iouThreshold);if(!Array.isArray(e.classes)||!e.classes.length||!e.classes.every((function(e){return"string"===typeof e})))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(e.classes));if(!Array.isArray(e.anchors)||!e.anchors.length||!e.anchors.map((function(e){return e||{}})).every((function(e){return wt(e.x)&&wt(e.y)})))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(e.anchors));if(e.meanRgb&&(!Array.isArray(e.meanRgb)||3!==e.meanRgb.length||!e.meanRgb.every(wt)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(e.meanRgb))}(t),n._config=t,n}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),t.prototype.runTinyYolov2=function(e,t){var n=Et(e,t.conv0);return n=Et(n=r.s(n,[2,2],[2,2],"same"),t.conv1),n=Et(n=r.s(n,[2,2],[2,2],"same"),t.conv2),n=Et(n=r.s(n,[2,2],[2,2],"same"),t.conv3),n=Et(n=r.s(n,[2,2],[2,2],"same"),t.conv4),n=Et(n=r.s(n,[2,2],[2,2],"same"),t.conv5),n=Et(n=r.s(n,[2,2],[1,1],"same"),t.conv6),he(n=Et(n,t.conv7),t.conv8,"valid",!1)},t.prototype.runMobilenet=function(e,t){var n=this.config.isFirstLayerConv2d?xt(he(e,t.conv0,"valid",!1)):Ct(e,t.conv0);return n=Ct(n=r.s(n,[2,2],[2,2],"same"),t.conv1),n=Ct(n=r.s(n,[2,2],[2,2],"same"),t.conv2),n=Ct(n=r.s(n,[2,2],[2,2],"same"),t.conv3),n=Ct(n=r.s(n,[2,2],[2,2],"same"),t.conv4),n=Ct(n=r.s(n,[2,2],[2,2],"same"),t.conv5),n=r.s(n,[2,2],[1,1],"same"),n=t.conv6?Ct(n,t.conv6):n,he(n=t.conv7?Ct(n,t.conv7):n,t.conv8,"valid",!1)},t.prototype.forwardInput=function(e,t){var n=this,o=this.params;if(!o)throw new Error("TinyYolov2 - load model before inference");return r.L((function(){var i=e.toBatchTensor(t,!1).toFloat();return i=(i=n.config.meanRgb?k(i,n.config.meanRgb):i).div(r.y(256)),n.config.withSeparableConvs?n.runMobilenet(i,o):n.runTinyYolov2(i,o)}))},t.prototype.forward=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,re(e)];case 1:return[4,n.apply(this,[r.sent(),t])];case 2:return[2,r.sent()]}}))}))},t.prototype.detect=function(e,t){return void 0===t&&(t={}),Object(i.b)(this,void 0,void 0,(function(){var n,o,a,s,u,c,l,f,d,p,h,v,m,g=this;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=new St(t),o=n.inputSize,a=n.scoreThreshold,[4,re(e)];case 1:return s=i.sent(),[4,this.forwardInput(s,o)];case 2:return u=i.sent(),c=r.L((function(){return r.O(u)[0].expandDims()})),l={width:s.getInputWidth(0),height:s.getInputHeight(0)},[4,this.extractBoxes(c,s.getReshapedInputDimensions(0),a)];case 3:return f=i.sent(),u.dispose(),c.dispose(),d=f.map((function(e){return e.box})),p=f.map((function(e){return e.score})),h=f.map((function(e){return e.classScore})),v=f.map((function(e){return g.config.classes[e.label]})),m=C(d.map((function(e){return e.rescale(o)})),p,this.config.iouThreshold,!0),[2,m.map((function(e){return new w(p[e],h[e],v[e],d[e],l)}))]}}))}))},t.prototype.getDefaultModelName=function(){return""},t.prototype.extractParamsFromWeigthMap=function(e){return function(e,t){var n,r=[],o=Ot(e,r),i=o.extractConvParams,a=o.extractConvWithBatchNormParams,s=o.extractSeparableConvParams;if(t.withSeparableConvs){var u=t.filterSizes&&t.filterSizes.length||9;n={conv0:t.isFirstLayerConv2d?i("conv0"):s("conv0"),conv1:s("conv1"),conv2:s("conv2"),conv3:s("conv3"),conv4:s("conv4"),conv5:s("conv5"),conv6:u>7?s("conv6"):void 0,conv7:u>8?s("conv7"):void 0,conv8:i("conv8")}}else n={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return ve(e,r),{params:n,paramMappings:r}}(e,this.config)},t.prototype.extractParams=function(e){var n=this.config.filterSizes||t.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(e,t,n,r){var o,i=Ee(e),a=i.extractWeights,s=i.getRemainingWeights,u=[],c=kt(a,u),l=c.extractConvParams,f=c.extractConvWithBatchNormParams,d=c.extractSeparableConvParams;if(t.withSeparableConvs){var p=r[0],h=r[1],v=r[2],m=r[3],g=r[4],y=r[5],b=r[6],w=r[7],x=r[8];o={conv0:t.isFirstLayerConv2d?l(p,h,3,"conv0"):d(p,h,"conv0"),conv1:d(h,v,"conv1"),conv2:d(v,m,"conv2"),conv3:d(m,g,"conv3"),conv4:d(g,y,"conv4"),conv5:d(y,b,"conv5"),conv6:w?d(b,w,"conv6"):void 0,conv7:x?d(w,x,"conv7"):void 0,conv8:l(x||w||b,5*n,1,"conv8")}}else p=r[0],h=r[1],v=r[2],m=r[3],g=r[4],y=r[5],b=r[6],w=r[7],x=r[8],o={conv0:f(p,h,"conv0"),conv1:f(h,v,"conv1"),conv2:f(v,m,"conv2"),conv3:f(m,g,"conv3"),conv4:f(g,y,"conv4"),conv5:f(y,b,"conv5"),conv6:f(b,w,"conv6"),conv7:f(w,x,"conv7"),conv8:l(x,5*n,1,"conv8")};if(0!==s().length)throw new Error("weights remaing after extract: "+s().length);return{params:o,paramMappings:u}}(e,this.config,this.boxEncodingSize,n)},t.prototype.extractBoxes=function(e,t,n){return Object(i.b)(this,void 0,void 0,(function(){var o,a,s,u,c,l,f,d,p,h,v,m,g,y,w,x,E,C,k,S,_,T,I,P,A,R,N,M,j,D=this;return Object(i.d)(this,(function(F){switch(F.label){case 0:return o=t.width,a=t.height,s=Math.max(o,a),u=s/o,c=s/a,l=e.shape[1],f=this.config.anchors.length,d=r.L((function(){var t=e.reshape([l,l,f,D.boxEncodingSize]);return[t.slice([0,0,0,0],[l,l,f,4]),t.slice([0,0,0,4],[l,l,f,1]),D.withClassScores?r.D(t.slice([0,0,0,5],[l,l,f,D.config.classes.length]),3):r.y(0)]})),p=d[0],h=d[1],v=d[2],m=[],[4,h.array()];case 1:return g=F.sent(),[4,p.array()];case 2:y=F.sent(),w=0,F.label=3;case 3:if(!(w<l))return[3,12];x=0,F.label=4;case 4:if(!(x<l))return[3,11];E=0,F.label=5;case 5:return E<f?(C=O(g[w][x][E][0]),!n||C>n?(k=(x+O(y[w][x][E][0]))/l*u,S=(w+O(y[w][x][E][1]))/l*c,_=Math.exp(y[w][x][E][2])*this.config.anchors[E].x/l*u,T=Math.exp(y[w][x][E][3])*this.config.anchors[E].y/l*c,I=k-_/2,P=S-T/2,A={row:w,col:x,anchor:E},this.withClassScores?[4,this.extractPredictedClass(v,A)]:[3,7]):[3,9]):[3,10];case 6:return j=F.sent(),[3,8];case 7:j={classScore:1,label:0},F.label=8;case 8:N=(R=j).classScore,M=R.label,m.push(Object(i.a)({box:new b(I,P,I+_,P+T),score:C,classScore:C*N,label:M},A)),F.label=9;case 9:return E++,[3,5];case 10:return x++,[3,4];case 11:return w++,[3,3];case 12:return p.dispose(),h.dispose(),v.dispose(),[2,m]}}))}))},t.prototype.extractPredictedClass=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){var n,r,o,a;return Object(i.d)(this,(function(i){switch(i.label){case 0:return n=t.row,r=t.col,o=t.anchor,[4,e.array()];case 1:return a=i.sent(),[2,Array(this.config.classes.length).fill(0).map((function(e,t){return a[n][r][o][t]})).map((function(e,t){return{classScore:e,label:t}})).reduce((function(e,t){return e.classScore>t.classScore?e:t}))]}}))}))},t.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],t}(le),Tt=function(e){function t(t){void 0===t&&(t=!0);var n=Object.assign({},{withSeparableConvs:t,iouThreshold:.4,classes:["face"]},t?{anchors:yt,meanRgb:bt}:{anchors:gt,withClassScores:!0});return e.call(this,n)||this}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(e,t)];case 1:return[2,n.sent().map((function(e){return new x(e.score,e.relativeBox,{width:e.imageWidth,height:e.imageHeight})}))]}}))}))},t.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},t.prototype.extractParamsFromWeigthMap=function(t){return e.prototype.extractParamsFromWeigthMap.call(this,t)},t}(_t);var It=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._name="TinyFaceDetectorOptions",t}return Object(i.c)(t,e),t}(St),Pt=function(){function e(){}return e.prototype.then=function(e){return Object(i.b)(this,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return t=e,[4,this.run()];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))},e.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){throw new Error("ComposableTask - run is not implemented")}))}))},e}();function At(e,t,n,o,a){return void 0===a&&(a=function(e){return e.alignedRect}),Object(i.b)(this,void 0,void 0,(function(){var s,u,c,l,f;return Object(i.d)(this,(function(i){switch(i.label){case 0:return s=e.map((function(e){return Me(e)?a(e):e.detection})),(c=o)?[3,5]:t instanceof r.a?[4,ie(t,s)]:[3,2];case 1:return l=i.sent(),[3,4];case 2:return[4,oe(t,s)];case 3:l=i.sent(),i.label=4;case 4:c=l,i.label=5;case 5:return[4,n(u=c)];case 6:return f=i.sent(),u.forEach((function(e){return e instanceof r.a&&e.dispose()})),[2,f]}}))}))}function Rt(e,t,n,r,o){return Object(i.b)(this,void 0,void 0,(function(){var a=this;return Object(i.d)(this,(function(s){return[2,At([e],t,(function(e){return Object(i.b)(a,void 0,void 0,(function(){return Object(i.d)(this,(function(t){return[2,n(e[0])]}))}))}),r,o)]}))}))}function Nt(e){var t=Ee(e),n=t.extractWeights,o=t.getRemainingWeights,a=[],s=function(e,t){var n=me(e,t),o=ge(e,t);function a(n,o){var i=r.H(e(n));return t.push({paramPath:o}),i}function s(e,t,r){return void 0===r&&(r=!1),{conv1:n(e[0],e[1],3,t+"/conv1"),prelu1_alpha:a(e[1],t+"/prelu1_alpha"),conv2:n(e[1],e[2],3,t+"/conv2"),prelu2_alpha:a(e[2],t+"/prelu2_alpha"),conv3:n(e[2],e[3],r?2:3,t+"/conv3"),prelu3_alpha:a(e[3],t+"/prelu3_alpha")}}return{extractPNetParams:function(){var e=s([3,10,16,32],"pnet"),t=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return Object(i.a)(Object(i.a)({},e),{conv4_1:t,conv4_2:r})},extractRNetParams:function(){var e=s([3,28,48,64],"rnet",!0),t=o(576,128,"rnet/fc1"),n=a(128,"rnet/prelu4_alpha"),r=o(128,2,"rnet/fc2_1"),u=o(128,4,"rnet/fc2_2");return Object(i.a)(Object(i.a)({},e),{fc1:t,prelu4_alpha:n,fc2_1:r,fc2_2:u})},extractONetParams:function(){var e=s([3,32,64,64],"onet"),t=n(64,128,2,"onet/conv4"),r=a(128,"onet/prelu4_alpha"),u=o(1152,256,"onet/fc1"),c=a(256,"onet/prelu5_alpha"),l=o(256,2,"onet/fc2_1"),f=o(256,4,"onet/fc2_2"),d=o(256,10,"onet/fc2_3");return Object(i.a)(Object(i.a)({},e),{conv4:t,prelu4_alpha:r,fc1:u,prelu5_alpha:c,fc2_1:l,fc2_2:f,fc2_3:d})}}}(n,a),u=s.extractPNetParams,c=s.extractRNetParams,l=s.extractONetParams,f=u(),d=c(),p=l();if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{pnet:f,rnet:d,onet:p},paramMappings:a}}function Mt(e){var t=[],n=function(e,t){var n=xe(e,t);function r(e){return{filters:n(e+"/weights",4,e+"/filters"),bias:n(e+"/bias",1)}}function o(e){return{weights:n(e+"/weights",2),bias:n(e+"/bias",1)}}function a(e){return n(e,1)}function s(e){return{conv1:r(e+"/conv1"),prelu1_alpha:a(e+"/prelu1_alpha"),conv2:r(e+"/conv2"),prelu2_alpha:a(e+"/prelu2_alpha"),conv3:r(e+"/conv3"),prelu3_alpha:a(e+"/prelu3_alpha")}}return{extractPNetParams:function(){var e=s("pnet"),t=r("pnet/conv4_1"),n=r("pnet/conv4_2");return Object(i.a)(Object(i.a)({},e),{conv4_1:t,conv4_2:n})},extractRNetParams:function(){var e=s("rnet"),t=o("rnet/fc1"),n=a("rnet/prelu4_alpha"),r=o("rnet/fc2_1"),u=o("rnet/fc2_2");return Object(i.a)(Object(i.a)({},e),{fc1:t,prelu4_alpha:n,fc2_1:r,fc2_2:u})},extractONetParams:function(){var e=s("onet"),t=r("onet/conv4"),n=a("onet/prelu4_alpha"),u=o("onet/fc1"),c=a("onet/prelu5_alpha"),l=o("onet/fc2_1"),f=o("onet/fc2_2"),d=o("onet/fc2_3");return Object(i.a)(Object(i.a)({},e),{conv4:t,prelu4_alpha:n,fc1:u,prelu5_alpha:c,fc2_1:l,fc2_2:f,fc2_3:d})}}}(e,t),r=n.extractPNetParams,o=n.extractRNetParams,a=n.extractONetParams,s=r(),u=o(),c=a();return ve(e,t),{params:{pnet:s,rnet:u,onet:c},paramMappings:t}}function jt(e,t){var n=t[0],r=t[1];return{height:Math.floor(n*e),width:Math.floor(r*e)}}var Dt=function(e){function t(t,n,r,o){return e.call(this,{left:t,top:n,right:r,bottom:o},!0)||this}return Object(i.c)(t,e),t}(y);function Ft(e){return r.L((function(){return r.t(r.F(e,r.y(127.5)),r.y(.0078125))}))}function Lt(e,t){return r.L((function(){return r.c(r.w(e),r.t(t,r.u(r.w(r.u(e)))))}))}function Bt(e,t,n){return void 0===n&&(n=!1),r.L((function(){var o=he(e,t.conv1,"valid");return o=Lt(o,t.prelu1_alpha),o=Lt(o=he(o=r.s(o,n?[2,2]:[3,3],[2,2],"same"),t.conv2,"valid"),t.prelu2_alpha),o=Lt(o=he(o=n?o:r.s(o,[3,3],[2,2],"valid"),t.conv3,"valid"),t.prelu3_alpha)}))}function Ut(e,t,n,o,i){i.stage1=[];var a=t.map((function(t){return r.L((function(){var n={scale:t},i=function(e,t){return r.L((function(){var n=jt(t,e.shape.slice(1)),o=n.height,i=n.width,a=Ft(r.o.resizeBilinear(e,[o,i]));return r.N(a,[0,2,1,3])}))}(e,t),a=Date.now(),s=function(e,t){return r.L((function(){var n=Bt(e,t,!0),o=he(n,t.conv4_1,"valid"),i=r.m(r.r(o,3),3);return{prob:r.D(r.F(o,i),3),regions:he(n,t.conv4_2,"valid")}}))}(i,o),u=s.prob,c=s.regions;return n.pnet=Date.now()-a,{scoresTensor:r.O(r.O(u,3)[1])[0],regionsTensor:r.O(c)[0],scale:t,statsForScale:n}}))})).map((function(e){var t=e.scoresTensor,r=e.regionsTensor,o=e.scale,a=e.statsForScale,s=function(e,t,n,r){for(var o=[],i=e.arraySync(),a=0;a<e.shape[0];a++)for(var s=0;s<e.shape[1];s++)i[a][s]>=r&&o.push(new g(s,a));return o.map((function(e){var r=new b(Math.round((2*e.y+1)/n),Math.round((2*e.x+1)/n),Math.round((2*e.y+12)/n),Math.round((2*e.x+12)/n)),o=i[e.y][e.x],a=t.arraySync();return{cell:r,score:o,region:new Dt(a[e.y][e.x][0],a[e.y][e.x][1],a[e.y][e.x][2],a[e.y][e.x][3])}}))}(t,r,o,n);if(t.dispose(),r.dispose(),!s.length)return i.stage1.push(a),[];var u=Date.now(),c=C(s.map((function(e){return e.cell})),s.map((function(e){return e.score})),.5);return a.nms=Date.now()-u,a.numBoxes=c.length,i.stage1.push(a),c.map((function(e){return s[e]}))})).reduce((function(e,t){return e.concat(t)}),[]),s=[],u=[];if(a.length>0){var c=Date.now(),l=C(a.map((function(e){return e.cell})),a.map((function(e){return e.score})),.7);i.stage1_nms=Date.now()-c,u=l.map((function(e){return a[e].score})),s=l.map((function(e){return a[e]})).map((function(e){var t=e.cell,n=e.region;return new b(t.left+n.left*t.width,t.top+n.top*t.height,t.right+n.right*t.width,t.bottom+n.bottom*t.height).toSquare().round()}))}return{boxes:s,scores:u}}function zt(e,t,n){var o=n.width,a=n.height;return Object(i.b)(this,void 0,void 0,(function(){var n,s,u,c=this;return Object(i.d)(this,(function(l){switch(l.label){case 0:return n=q(e),[4,Promise.all(t.map((function(t){return Object(i.b)(c,void 0,void 0,(function(){var r,o,a,s,u,c,l,f;return Object(i.d)(this,(function(i){return r=t.padAtBorders(e.height,e.width),o=r.y,a=r.ey,s=r.x,u=r.ex,c=s-1,l=o-1,f=n.getImageData(c,l,u-c,a-l),[2,H.isNodejs()?Z(f):createImageBitmap(f)]}))}))})))];case 1:return s=l.sent(),u=[],s.forEach((function(e){var t=q(Q({width:o,height:a}));t.drawImage(e,0,0,o,a);for(var n=t.getImageData(0,0,o,a).data,r=[],i=0;i<n.length;i+=4)r.push(n[i+2]),r.push(n[i+1]),r.push(n[i]);u.push(r)})),[2,u.map((function(e){return r.L((function(){return Ft(r.N(r.K(e,[1,o,a,3]),[0,2,1,3]).toFloat())}))}))]}}))}))}function Vt(e,t,n,o,a){return Object(i.b)(this,void 0,void 0,(function(){var s,u,c,l,f,d,p,h,v,m,g,y,b,w;return Object(i.d)(this,(function(i){switch(i.label){case 0:return s=Date.now(),[4,zt(e,t,{width:24,height:24})];case 1:return u=i.sent(),a.stage2_extractImagePatches=Date.now()-s,s=Date.now(),c=u.map((function(e){var t=function(e,t){return r.L((function(){var n=Bt(e,t),o=Lt(_e(r.x(n,[n.shape[0],t.fc1.weights.shape[0]]),t.fc1),t.prelu4_alpha),i=_e(o,t.fc2_1),a=r.m(r.r(i,1),1),s=r.D(r.F(i,a),1),u=_e(o,t.fc2_2);return{scores:r.O(s,1)[1],regions:u}}))}(e,o);return e.dispose(),t})),a.stage2_rnet=Date.now()-s,l=c.length>1?r.h(c.map((function(e){return e.scores}))):c[0].scores,p=(d=Array).from,[4,l.data()];case 2:return f=p.apply(d,[i.sent()]),l.dispose(),h=f.map((function(e,t){return{score:e,idx:t}})).filter((function(e){return e.score>n})).map((function(e){return e.idx})),v=h.map((function(e){return t[e]})),m=h.map((function(e){return f[e]})),g=[],y=[],v.length>0&&(s=Date.now(),b=C(v,m,.7),a.stage2_nms=Date.now()-s,w=b.map((function(e){var t=c[h[e]].regions.arraySync();return new Dt(t[0][0],t[0][1],t[0][2],t[0][3])})),y=b.map((function(e){return m[e]})),g=b.map((function(e,t){return v[e].calibrate(w[t])}))),c.forEach((function(e){e.regions.dispose(),e.scores.dispose()})),[2,{boxes:g,scores:y}]}}))}))}function Wt(e,t,n,o,a){return Object(i.b)(this,void 0,void 0,(function(){var s,u,c,l,f,d,p,h,v,m,y,b,w,x,E;return Object(i.d)(this,(function(i){switch(i.label){case 0:return s=Date.now(),[4,zt(e,t,{width:48,height:48})];case 1:return u=i.sent(),a.stage3_extractImagePatches=Date.now()-s,s=Date.now(),c=u.map((function(e){var t=function(e,t){return r.L((function(){var n=Bt(e,t);n=Lt(n=he(n=r.s(n,[2,2],[2,2],"same"),t.conv4,"valid"),t.prelu4_alpha);var o=Lt(_e(r.x(n,[n.shape[0],t.fc1.weights.shape[0]]),t.fc1),t.prelu5_alpha),i=_e(o,t.fc2_1),a=r.m(r.r(i,1),1),s=r.D(r.F(i,a),1),u=_e(o,t.fc2_2),c=_e(o,t.fc2_3);return{scores:r.O(s,1)[1],regions:u,points:c}}))}(e,o);return e.dispose(),t})),a.stage3_onet=Date.now()-s,l=c.length>1?r.h(c.map((function(e){return e.scores}))):c[0].scores,p=(d=Array).from,[4,l.data()];case 2:return f=p.apply(d,[i.sent()]),l.dispose(),h=f.map((function(e,t){return{score:e,idx:t}})).filter((function(e){return e.score>n})).map((function(e){return e.idx})),v=h.map((function(e){var t=c[e].regions.arraySync();return new Dt(t[0][0],t[0][1],t[0][2],t[0][3])})),m=h.map((function(e,n){return t[e].calibrate(v[n])})),y=h.map((function(e){return f[e]})),b=[],w=[],x=[],m.length>0&&(s=Date.now(),E=C(m,y,.7,!1),a.stage3_nms=Date.now()-s,b=E.map((function(e){return m[e]})),w=E.map((function(e){return y[e]})),x=E.map((function(e,t){return Array(5).fill(0).map((function(n,r){var o=c[e].points.arraySync();return new g(o[0][r]*(b[t].width+1)+b[t].left,o[0][r+5]*(b[t].height+1)+b[t].top)}))}))),c.forEach((function(e){e.regions.dispose(),e.scores.dispose(),e.points.dispose()})),[2,{boxes:b,scores:w,points:x}]}}))}))}var Ht=function(e){function t(){return e.call(this,"Mtcnn")||this}return Object(i.c)(t,e),t.prototype.load=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,e.prototype.load.call(this,t)]}))}))},t.prototype.loadFromDisk=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,e.prototype.loadFromDisk.call(this,t)]}))}))},t.prototype.forwardInput=function(e,t){return void 0===t&&(t={}),Object(i.b)(this,void 0,void 0,(function(){var n,o,a,s,u,c,l,f,d,p,h,v,m,y,b,w,E,C,k,O,_;return Object(i.d)(this,(function(i){switch(i.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(o=e.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return a={},s=Date.now(),u=r.L((function(){return e=r.m(r.f.fromPixels(o)).toFloat(),r.L((function(){return r.E(r.O(e,3).reverse(),3)}));var e})),c=function(e){return u.dispose(),a.total=Date.now()-s,e},l=u.shape.slice(1),f=l[0],d=l[1],p=new at(t),h=p.minFaceSize,v=p.scaleFactor,m=p.maxNumScales,y=p.scoreThresholds,b=p.scaleSteps,w=(b||function(e,t,n){for(var r=n[0],o=n[1],i=12/e,a=[],s=Math.min(r,o)*i,u=0;s>=12;)a.push(i*Math.pow(t,u)),s*=t,u+=1;return a}(h,v,[f,d])).filter((function(e){var t=jt(e,[f,d]);return Math.min(t.width,t.height)>12})).slice(0,m),a.scales=w,a.pyramid=w.map((function(e){return jt(e,[f,d])})),E=Date.now(),[4,Ut(u,w,y[0],n.pnet,a)];case 1:return C=i.sent(),a.total_stage1=Date.now()-E,C.boxes.length?(a.stage2_numInputBoxes=C.boxes.length,E=Date.now(),[4,Vt(o,C.boxes,y[1],n.rnet,a)]):[2,c({results:[],stats:a})];case 2:return k=i.sent(),a.total_stage2=Date.now()-E,k.boxes.length?(a.stage3_numInputBoxes=k.boxes.length,E=Date.now(),[4,Wt(o,k.boxes,y[2],n.onet,a)]):[2,c({results:[],stats:a})];case 3:return O=i.sent(),a.total_stage3=Date.now()-E,_=O.boxes.map((function(e,t){return je(M({},new x(O.scores[t],new S(e.left/d,e.top/f,e.width/d,e.height/f),{height:f,width:d})),new T(O.points[t].map((function(t){return t.sub(new g(e.left,e.top)).div(new g(e.width,e.height))})),{width:e.width,height:e.height}))})),[2,c({results:_,stats:a})]}}))}))},t.prototype.forward=function(e,t){return void 0===t&&(t={}),Object(i.b)(this,void 0,void 0,(function(){var n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,re(e)];case 1:return[4,n.apply(this,[r.sent(),t])];case 2:return[2,r.sent().results]}}))}))},t.prototype.forwardWithStats=function(e,t){return void 0===t&&(t={}),Object(i.b)(this,void 0,void 0,(function(){var n;return Object(i.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,re(e)];case 1:return[2,n.apply(this,[r.sent(),t])]}}))}))},t.prototype.getDefaultModelName=function(){return"mtcnn_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Mt(e)},t.prototype.extractParams=function(e){return Nt(e)},t}(le),$t=[new g(1.603231,2.094468),new g(6.041143,7.080126),new g(2.882459,3.518061),new g(4.266906,5.178857),new g(9.041765,10.66308)],qt=[117.001,114.697,97.404],Kt=function(e){function t(){var t={withSeparableConvs:!0,iouThreshold:.4,classes:["face"],anchors:$t,meanRgb:qt,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return e.call(this,t)||this}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(e,t)];case 1:return[2,n.sent().map((function(e){return new x(e.score,e.relativeBox,{width:e.imageWidth,height:e.imageHeight})}))]}}))}))},t.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},t.prototype.extractParamsFromWeigthMap=function(t){return e.prototype.extractParamsFromWeigthMap.call(this,t)},t}(_t),Gt={ssdMobilenetv1:new vt,tinyFaceDetector:new Kt,tinyYolov2:new Tt,mtcnn:new Ht,faceLandmark68Net:new $e,faceLandmark68TinyNet:new Ke,faceRecognitionNet:new nt,faceExpressionNet:new Re,ageGenderNet:new We},Xt=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parentTask=t,o.input=n,o.extractedFaces=r,o}return Object(i.c)(t,e),t}(Pt),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t,n=this;return Object(i.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,At(e=r.sent(),this.input,(function(e){return Object(i.b)(n,void 0,void 0,(function(){return Object(i.d)(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return Gt.faceExpressionNet.predictExpressions(e)})))];case 1:return[2,t.sent()]}}))}))}),this.extractedFaces)];case 2:return t=r.sent(),[2,e.map((function(e,n){return Ne(e,t[n])}))]}}))}))},t.prototype.withAgeAndGender=function(){return new tn(this,this.input)},t}(Xt),Jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(e=n.sent())?[4,Rt(e,this.input,(function(e){return Gt.faceExpressionNet.predictExpressions(e)}),this.extractedFaces)]:[2];case 2:return t=n.sent(),[2,Ne(e,t)]}}))}))},t.prototype.withAgeAndGender=function(){return new nn(this,this.input)},t}(Xt),Qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.withAgeAndGender=function(){return new rn(this,this.input)},t.prototype.withFaceDescriptors=function(){return new sn(this,this.input)},t}(Yt),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.withAgeAndGender=function(){return new on(this,this.input)},t.prototype.withFaceDescriptor=function(){return new un(this,this.input)},t}(Jt),en=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parentTask=t,o.input=n,o.extractedFaces=r,o}return Object(i.c)(t,e),t}(Pt),tn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t,n=this;return Object(i.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,At(e=r.sent(),this.input,(function(e){return Object(i.b)(n,void 0,void 0,(function(){return Object(i.d)(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return Gt.ageGenderNet.predictAgeAndGender(e)})))];case 1:return[2,t.sent()]}}))}))}),this.extractedFaces)];case 2:return t=r.sent(),[2,e.map((function(e,n){var r=t[n],o=r.age;return ot(it(e,r.gender,r.genderProbability),o)}))]}}))}))},t.prototype.withFaceExpressions=function(){return new Yt(this,this.input)},t}(en),nn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t,n,r,o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(e=i.sent())?[4,Rt(e,this.input,(function(e){return Gt.ageGenderNet.predictAgeAndGender(e)}),this.extractedFaces)]:[2];case 2:return t=i.sent(),n=t.age,r=t.gender,o=t.genderProbability,[2,ot(it(e,r,o),n)]}}))}))},t.prototype.withFaceExpressions=function(){return new Jt(this,this.input)},t}(en),rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.withFaceExpressions=function(){return new Qt(this,this.input)},t.prototype.withFaceDescriptors=function(){return new sn(this,this.input)},t}(tn),on=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.withFaceExpressions=function(){return new Zt(this,this.input)},t.prototype.withFaceDescriptor=function(){return new un(this,this.input)},t}(nn),an=function(e){function t(t,n){var r=e.call(this)||this;return r.parentTask=t,r.input=n,r}return Object(i.c)(t,e),t}(Pt),sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e;return Object(i.d)(this,(function(t){switch(t.label){case 0:return[4,this.parentTask];case 1:return[4,At(e=t.sent(),this.input,(function(e){return Promise.all(e.map((function(e){return Gt.faceRecognitionNet.computeFaceDescriptor(e)})))}),null,(function(e){return e.landmarks.align(null,{useDlibAlignment:!0})}))];case 2:return[2,t.sent().map((function(t,n){return rt(e[n],t)}))]}}))}))},t.prototype.withFaceExpressions=function(){return new Qt(this,this.input)},t.prototype.withAgeAndGender=function(){return new rn(this,this.input)},t}(an),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(e=n.sent())?[4,Rt(e,this.input,(function(e){return Gt.faceRecognitionNet.computeFaceDescriptor(e)}),null,(function(e){return e.landmarks.align(null,{useDlibAlignment:!0})}))]:[2];case 2:return t=n.sent(),[2,rt(e,t)]}}))}))},t.prototype.withFaceExpressions=function(){return new Zt(this,this.input)},t.prototype.withAgeAndGender=function(){return new on(this,this.input)},t}(an),cn=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parentTask=t,o.input=n,o.useTinyLandmarkNet=r,o}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?Gt.faceLandmark68TinyNet:Gt.faceLandmark68Net},enumerable:!0,configurable:!0}),t}(Pt),ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t,n,o,a,s=this;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),t=e.map((function(e){return e.detection})),this.input instanceof r.a?[4,ie(this.input,t)]:[3,3];case 2:return o=i.sent(),[3,5];case 3:return[4,oe(this.input,t)];case 4:o=i.sent(),i.label=5;case 5:return n=o,[4,Promise.all(n.map((function(e){return s.landmarkNet.detectLandmarks(e)})))];case 6:return a=i.sent(),n.forEach((function(e){return e instanceof r.a&&e.dispose()})),[2,e.map((function(e,t){return je(e,a[t])}))]}}))}))},t.prototype.withFaceExpressions=function(){return new Qt(this,this.input)},t.prototype.withAgeAndGender=function(){return new rn(this,this.input)},t.prototype.withFaceDescriptors=function(){return new sn(this,this.input)},t}(cn),fn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t,n,o,a;return Object(i.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(e=i.sent())?(t=e.detection,this.input instanceof r.a?[4,ie(this.input,[t])]:[3,3]):[2];case 2:return o=i.sent(),[3,5];case 3:return[4,oe(this.input,[t])];case 4:o=i.sent(),i.label=5;case 5:return n=o,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return a=i.sent(),n.forEach((function(e){return e instanceof r.a&&e.dispose()})),[2,je(e,a)]}}))}))},t.prototype.withFaceExpressions=function(){return new Zt(this,this.input)},t.prototype.withAgeAndGender=function(){return new on(this,this.input)},t.prototype.withFaceDescriptor=function(){return new un(this,this.input)},t}(cn),dn=function(e){function t(t,n){void 0===n&&(n=new ht);var r=e.call(this)||this;return r.input=t,r.options=n,r}return Object(i.c)(t,e),t}(Pt),pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t,n,r;return Object(i.d)(this,(function(o){switch(o.label){case 0:return t=(e=this).input,(n=e.options)instanceof at?[4,Gt.mtcnn.forward(t,n)]:[3,2];case 1:return[2,o.sent().map((function(e){return e.detection}))];case 2:if(!(r=n instanceof It?function(e){return Gt.tinyFaceDetector.locateFaces(e,n)}:n instanceof ht?function(e){return Gt.ssdMobilenetv1.locateFaces(e,n)}:n instanceof St?function(e){return Gt.tinyYolov2.locateFaces(e,n)}:null))throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,r(t)]}}))}))},t.prototype.runAndExtendWithFaceDetections=function(){var e=this;return new Promise((function(t){return Object(i.b)(e,void 0,void 0,(function(){var e;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return e=n.sent(),[2,t(e.map((function(e){return M({},e)})))]}}))}))}))},t.prototype.withFaceLandmarks=function(e){return void 0===e&&(e=!1),new ln(this.runAndExtendWithFaceDetections(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Yt(this.runAndExtendWithFaceDetections(),this.input)},t.prototype.withAgeAndGender=function(){return new tn(this.runAndExtendWithFaceDetections(),this.input)},t}(dn),hn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype.run=function(){return Object(i.b)(this,void 0,void 0,(function(){var e,t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,new pn(this.input,this.options)];case 1:return e=n.sent(),t=e[0],e.forEach((function(e){e.score>t.score&&(t=e)})),[2,t]}}))}))},t.prototype.runAndExtendWithFaceDetection=function(){var e=this;return new Promise((function(t){return Object(i.b)(e,void 0,void 0,(function(){var e;return Object(i.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return e=n.sent(),[2,t(e?M({},e):void 0)]}}))}))}))},t.prototype.withFaceLandmarks=function(e){return void 0===e&&(e=!1),new fn(this.runAndExtendWithFaceDetection(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Jt(this.runAndExtendWithFaceDetection(),this.input)},t.prototype.withAgeAndGender=function(){return new nn(this.runAndExtendWithFaceDetection(),this.input)},t}(dn);function vn(e,t){return void 0===t&&(t=new ht),new hn(e,t)}!function(){function e(e,t){void 0===t&&(t=.6),this._distanceThreshold=t;var n=Array.isArray(e)?e:[e];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,o=function(){return"person "+r++};this._labeledDescriptors=n.map((function(e){if(e instanceof R)return e;if(e instanceof Float32Array)return new R(o(),[e]);if(e.descriptor&&e.descriptor instanceof Float32Array)return new R(o(),[e.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")}))}Object.defineProperty(e.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),e.prototype.computeMeanDistance=function(e,t){return t.map((function(t){return function(e,t){if(e.length!==t.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(e),r=Array.from(t);return Math.sqrt(n.map((function(e,t){return e-r[t]})).reduce((function(e,t){return e+Math.pow(t,2)}),0))}(t,e)})).reduce((function(e,t){return e+t}),0)/(t.length||1)},e.prototype.matchDescriptor=function(e){var t=this;return this.labeledDescriptors.map((function(n){var r=n.descriptors,o=n.label;return new P(o,t.computeMeanDistance(e,r))})).reduce((function(e,t){return e.distance<t.distance?e:t}))},e.prototype.findBestMatch=function(e){var t=this.matchDescriptor(e);return t.distance<this.distanceThreshold?t:new P("unknown",t.distance)},e.prototype.toJSON=function(){return{distanceThreshold:this.distanceThreshold,labeledDescriptors:this.labeledDescriptors.map((function(e){return e.toJSON()}))}},e.fromJSON=function(t){return new e(t.labeledDescriptors.map((function(e){return R.fromJSON(e)})),t.distanceThreshold)}}()},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}var c=n(262),l=n.n(c);function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return!t||"object"!==l()(t)&&"function"!==typeof t?f(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}var m={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},g=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||m,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"===typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),y=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function b(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function w(e){return null==e?"":""+e}function x(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function E(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"===typeof e}for(var i="string"!==typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function C(e,t,n){var r=E(e,t,Object);r.obj[r.k]=n}function k(e,t){var n=E(e,t),r=n.obj,o=n.k;if(r)return r[o]}function O(e,t,n){var r=k(e,n);return void 0!==r?r:k(t,n)}function S(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"===typeof e[r]||e[r]instanceof String||"string"===typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):S(e[r],t[r],n):e[r]=t[r]);return e}function _(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function I(e){return"string"===typeof e?e.replace(/[&<>"'\/]/g,(function(e){return T[e]})):e}var P="undefined"!==typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if("string"===typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),u=o[s];void 0===u&&r.length>i+a;)a++,u=o[s=r.slice(i,i+a).join(n)];if(void 0===u)return;if("string"===typeof u)return u;if(s&&"string"===typeof u[s])return u[s];var c=r.slice(i+a).join(n);return c?A(u,c,n):void 0}o=o[r[i]]}return o}}var R=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=d(this,p(t).call(this)),P&&y.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return v(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!==typeof n&&(a=a.concat(n)),n&&"string"===typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=k(this.data,a);return s||!i||"string"!==typeof n?s:A(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),C(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!==typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=k(this.data,s)||{};r?S(u,n,o):u=i({},u,n),C(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(y),N={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},M={},j=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=d(this,p(t).call(this)),P&&y.call(f(n)),x(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=g.create("translator"),n}return v(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"===typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var h=n.nsSeparator||this.options.nsSeparator;return f+h+c}return c}var v=this.resolve(e,n),m=v&&v.res,g=v&&v.usedKey||c,y=v&&v.exactUsedKey||c,b=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,C="string"!==typeof m&&"boolean"!==typeof m&&"number"!==typeof m;if(E&&m&&C&&w.indexOf(b)<0&&("string"!==typeof x||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var k="[object Array]"===b,O=k?[]:{},S=k?y:g;for(var _ in m)if(Object.prototype.hasOwnProperty.call(m,_)){var T="".concat(S).concat(s).concat(_);O[_]=this.translate(T,i({},n,{joinArrays:!1,ns:l})),O[_]===T&&(O[_]=m[_])}m=O}}else if(E&&"string"===typeof x&&"[object Array]"===b)(m=m.join(x))&&(m=this.extendTranslation(m,e,n,o));else{var I=!1,P=!1,A=void 0!==n.count&&"string"!==typeof n.count,R=t.hasDefaultValue(n),N=A?this.pluralResolver.getSuffix(d,n.count):"",M=n["defaultValue".concat(N)]||n.defaultValue;!this.isValidLookup(m)&&R&&(I=!0,m=M),this.isValidLookup(m)||(P=!0,m=c);var j=R&&M!==m&&this.options.updateMissing;if(P||I||j){if(this.logger.log(j?"updateKey":"missingKey",d,f,c,j?M:m),s){var D=this.resolve(c,i({},n,{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var B=0;B<L.length;B++)F.push(L[B]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(n.lng||this.language):F.push(n.lng||this.language);var U=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,j?r:m,j,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,j?r:m,j,n),a.emit("missingKey",e,f,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?F.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){U([e],c+t,n["defaultValue".concat(t)]||M)}))})):U(F,c,M))}m=this.extendTranslation(m,e,n,v,o),P&&m===c&&this.options.appendNamespaceToMissingKey&&(m="".concat(f,":").concat(c)),P&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(m))}return m}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!==typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,p="string"===typeof d?[d]:d;return void 0!==e&&null!==e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=N.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!==typeof s.count,d=void 0!==s.context&&"string"===typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!M["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(M["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,p=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(p,c,n,e,s);else f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&d&&p.push(l+i),d&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i);for(;u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(y);function D(e){return e.charAt(0).toUpperCase()+e.slice(1)}var F=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=g.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"===typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=D(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"===typeof e&&(e=e(t)),"string"===typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"===typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"===typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),L=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],B={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return L.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:B[t.fc]}}))})),e}var z=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=g.create("pluralResolver"),this.rules=U()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"===typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=g.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:I,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?_(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?_(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?_(t.nestingPrefix):t.nestingPrefixEscaped||_("$t("),this.nestingSuffix=t.nestingSuffix?_(t.nestingSuffix):t.nestingSuffixEscaped||_(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,a,s,u=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var f=function(e){if(e.indexOf(u.formatSeparator)<0){var o=O(t,c,e);return u.alwaysFormat?u.format(o,void 0,n,i({},r,t,{interpolationkey:e})):o}var a=e.split(u.formatSeparator),s=a.shift().trim(),l=a.join(u.formatSeparator).trim();return u.format(O(t,c,s),l,n,i({},r,t,{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?l(u.escape(e)):l(e)}}].forEach((function(t){for(s=0;o=t.regex.exec(e);){if(void 0===(a=f(o[1].trim())))if("function"===typeof d){var n=d(e,o,r);a="string"===typeof n?n:""}else{if(p){a=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),a=""}else"string"===typeof a||u.useRawValueToEscape||(a=w(a));if(e=e.replace(o[0],t.safeValue(a)),t.regex.lastIndex=0,++s>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i({},a);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,s)).replace(/'/g,'"');try{s=JSON.parse(o),t&&(s=i({},t,s))}catch(a){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),a),"".concat(e).concat(n).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(u.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!==typeof r)return r;"string"!==typeof r&&(r=w(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return o.format(e,t,a.lng,i({},a,{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var W=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=d(this,p(t).call(this)),P&&y.call(f(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=g.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return v(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){!function(e,t,n,r){var o=E(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[o],i),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"===typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"===typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void 0!==n&&null!==n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(y);function H(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"===typeof e[1]&&(t.defaultValue=e[1]),"string"===typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function $(e){return"string"===typeof e.ns&&(e.ns=[e.ns]),"string"===typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"===typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function q(){}var K=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=d(this,p(t).call(this)),P&&y.call(f(e)),e.options=$(n),e.services={},e.logger=g,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),d(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return v(t,e),u(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"===typeof e?new e:e:null}if("function"===typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},H(),this.options,$(t)),this.format=this.options.interpolation.format,n||(n=q),!this.options.isClone){this.modules.logger?g.init(r(this.modules.logger),this.options):g.init(null,this.options);var o=new F(this.options);this.store=new R(this.options.resources,this.options);var a=this.services;a.logger=g,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new z(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new V(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new W(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new j(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=b(),f=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,r=n,o="string"===typeof e?e:this.language;if("function"===typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=b();return e||(e=this.languages),t||(t=this.options.ns),n||(n=q),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&N.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=b();this.emit("languageChanging",e);var o=function(e){var o="string"===typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"===typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=b();return this.options.ns?("string"===typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=b();"string"===typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,o=i({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new j(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(y));t.a=K},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return v})),n.d(t,"b",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return y}));var r=n(264),o=n.n(r),i=n(265),a=n.n(i),s=n(139),u=n.n(s),c=n(0);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d,p={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0},h=n.n(c).a.createContext();function v(){return p}var m=function(){function e(){o()(this,e),this.usedNamespaces={}}return a()(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function g(){return d}var y={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p=f(f({},p),e)}(e.options.react),function(e){d=e}(e)}}},function(e,t,n){"use strict";n(47),n(286)},function(e,t){},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(e){var t=o,n=t.lib,r=n.Base,i=n.WordArray,a=t.x64={};a.Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=r.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),n=t.length,o=0;o<n;o++)t[o]=t[o].clone();return e}})}(),o)}()},function(e,t,n){var r=n(396),o=n(397),i=n(398),a=n(399),s=n(400);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(229);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(97)(Object,"create");e.exports=r},function(e,t,n){var r=n(420);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";var r,o,i,a=n(490),s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function u(){i=!1}function c(e){if(e){if(e!==r){if(e.length!==s.length)throw new Error("Custom alphabet for shortid must be "+s.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+s.length+" unique characters. These characters were not unique: "+t.join(", "));r=e,u()}}else r!==s&&(r=s,u())}function l(){return i||(i=function(){r||c(s);for(var e,t=r.split(""),n=[],o=a.nextValue();t.length>0;)o=a.nextValue(),e=Math.floor(o*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}e.exports={get:function(){return r||s},characters:function(e){return c(e),r},seed:function(e){a.seed(e),o!==e&&(u(),o=e)},lookup:function(e){return l()[e]},shuffled:l}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(75)),s=o(n(57)),u=o(n(18)),c=o(n(66)),l=o(n(69)),f=o(n(70)),d=o(n(71)),p=r(n(0)),h=o(n(10)),v=o(n(172)),m=o(n(525)),g=o(n(53)),y=o(n(527)),b=o(n(173)),w=o(n(532)),x=o(n(72)),E=n(29),C=o(n(88)),k=o(n(49)),O=o(n(535)),S=o(n(218)),_=n(536),T=o(n(99)),I=o(n(252)),P=o(n(537)),A=o(n(541)),R=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},N=(0,_.isStyleSupport)("webkitLineClamp"),M=(0,_.isStyleSupport)("textOverflow");var j=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){var e;return(0,c.default)(this,n),(e=t.apply(this,arguments)).contentRef=p.createRef(),e.state={edit:!1,copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1},e.getPrefixCls=function(){var t=e.props.prefixCls;return(0,e.context.getPrefixCls)("typography",t)},e.onExpandClick=function(t){var n=e.getEllipsis().onExpand;e.setState({expanded:!0}),n&&n(t)},e.onEditClick=function(){e.triggerEdit(!0)},e.onEditChange=function(t){var n=e.getEditable().onChange;n&&n(t),e.triggerEdit(!1)},e.onEditCancel=function(){e.triggerEdit(!1)},e.onCopyClick=function(t){t.preventDefault();var n=e.props,r=n.children,o=n.copyable,i=(0,u.default)({},"object"===(0,s.default)(o)?o:null);void 0===i.text&&(i.text=String(r)),(0,m.default)(i.text||""),e.setState({copied:!0},(function(){i.onCopy&&i.onCopy(),e.copyId=window.setTimeout((function(){e.setState({copied:!1})}),3e3)}))},e.setEditRef=function(t){e.editIcon=t},e.triggerEdit=function(t){var n=e.getEditable().onStart;t&&n&&n(),e.setState({edit:t},(function(){!t&&e.editIcon&&e.editIcon.focus()}))},e.resizeOnNextFrame=function(){S.default.cancel(e.rafId),e.rafId=(0,S.default)((function(){e.syncEllipsis()}))},e}return(0,l.default)(n,[{key:"componentDidMount",value:function(){this.setState({clientRendered:!0}),this.resizeOnNextFrame()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.getEllipsis(),r=this.getEllipsis(e);t===e.children&&n.rows===r.rows||this.resizeOnNextFrame()}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.copyId),S.default.cancel(this.rafId)}},{key:"getEditable",value:function(e){var t=this.state.edit,n=(e||this.props).editable;return n?(0,u.default)({editing:t},"object"===(0,s.default)(n)?n:null):{editing:t}}},{key:"getEllipsis",value:function(e){var t=(e||this.props).ellipsis;return t?(0,u.default)({rows:1,expandable:!1},"object"===(0,s.default)(t)?t:null):{}}},{key:"canUseCSSEllipsis",value:function(){var e=this.state.clientRendered,t=this.props,n=t.editable,r=t.copyable,o=this.getEllipsis(),i=o.rows,a=o.expandable,s=o.suffix,u=o.onEllipsis;return!s&&(!(n||r||a||!e||u)&&(1===i?M:N))}},{key:"syncEllipsis",value:function(){var e=this.state,t=e.ellipsisText,n=e.isEllipsis,r=e.expanded,o=this.getEllipsis(),i=o.rows,a=o.suffix,s=o.onEllipsis,u=this.props.children;if(i&&!(i<0)&&this.contentRef.current&&!r&&!this.canUseCSSEllipsis()){(0,k.default)((0,v.default)(u).every((function(e){return"string"===typeof e})),"Typography","`ellipsis` should use string as children only.");var c=(0,A.default)(this.contentRef.current,{rows:i,suffix:a},u,this.renderOperations(!0),"..."),l=c.content,f=c.text,d=c.ellipsis;t===f&&n===d||(this.setState({ellipsisText:f,ellipsisContent:l,isEllipsis:d}),n!==d&&s&&s(d))}}},{key:"renderExpand",value:function(e){var t,n=this.getEllipsis(),r=n.expandable,o=n.symbol,i=this.state,a=i.expanded,s=i.isEllipsis;return r&&(e||!a&&s)?(t=o||this.expandStr,p.createElement("a",{key:"expand",className:"".concat(this.getPrefixCls(),"-expand"),onClick:this.onExpandClick,"aria-label":this.expandStr},t)):null}},{key:"renderEdit",value:function(){var e=this.props.editable;if(e){var t=e.icon,n=e.tooltip,r=(0,v.default)(n)[0]||this.editStr,o="string"===typeof r?r:"";return p.createElement(T.default,{key:"edit",title:!1===n?"":r},p.createElement(O.default,{ref:this.setEditRef,className:"".concat(this.getPrefixCls(),"-edit"),onClick:this.onEditClick,"aria-label":o},t||p.createElement(y.default,{role:"button"})))}}},{key:"renderCopy",value:function(){var e=this.state.copied,t=this.props.copyable;if(t){var n=this.getPrefixCls(),r=t.tooltips,o=(0,v.default)(r);0===o.length&&(o=[this.copyStr,this.copiedStr]);var i=e?o[1]:o[0],a="string"===typeof i?i:"",s=(0,v.default)(t.icon);return p.createElement(T.default,{key:"copy",title:!1===r?"":i},p.createElement(O.default,{className:(0,h.default)("".concat(n,"-copy"),e&&"".concat(n,"-copy-success")),onClick:this.onCopyClick,"aria-label":a},e?s[1]||p.createElement(b.default,null):s[0]||p.createElement(w.default,null)))}}},{key:"renderEditInput",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style,o=this.context.direction,i=this.getEditable(),a=i.maxLength,s=i.autoSize;return p.createElement(P.default,{value:"string"===typeof t?t:"",onSave:this.onEditChange,onCancel:this.onEditCancel,prefixCls:this.getPrefixCls(),className:n,style:r,direction:o,maxLength:a,autoSize:s})}},{key:"renderOperations",value:function(e){return[this.renderExpand(e),this.renderEdit(),this.renderCopy()].filter((function(e){return e}))}},{key:"renderContent",value:function(){var e=this,t=this.state,n=t.ellipsisContent,r=t.isEllipsis,o=t.expanded,s=this.props,c=s.component,l=s.children,f=s.className,d=s.type,v=s.disabled,m=s.style,y=R(s,["component","children","className","type","disabled","style"]),b=this.context.direction,w=this.getEllipsis(),k=w.rows,O=w.suffix,S=this.getPrefixCls(),_=(0,g.default)(y,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard"].concat((0,a.default)(E.configConsumerProps))),T=this.canUseCSSEllipsis(),P=1===k&&T,A=k&&k>1&&T,N=l;if(k&&r&&!o&&!T){var M=y.title,j=M||"";M||"string"!==typeof l&&"number"!==typeof l||(j=String(l)),j=null===j||void 0===j?void 0:j.slice(String(n||"").length),N=p.createElement(p.Fragment,null,n,p.createElement("span",{title:j,"aria-hidden":"true"},"..."),O)}else N=p.createElement(p.Fragment,null,l,O);return N=function(e,t){var n=e.mark,r=e.code,o=e.underline,i=e.delete,a=e.strong,s=e.keyboard,u=t;function c(e,t){e&&(u=p.createElement(t,{},u))}return c(a,"strong"),c(o,"u"),c(i,"del"),c(r,"code"),c(n,"mark"),c(s,"kbd"),u}(this.props,N),p.createElement(C.default,{componentName:"Text"},(function(t){var n,r=t.edit,o=t.copy,a=t.copied,s=t.expand;return e.editStr=r,e.copyStr=o,e.copiedStr=a,e.expandStr=s,p.createElement(x.default,{onResize:e.resizeOnNextFrame,disabled:!k},p.createElement(I.default,(0,u.default)({className:(0,h.default)((n={},(0,i.default)(n,"".concat(S,"-").concat(d),d),(0,i.default)(n,"".concat(S,"-disabled"),v),(0,i.default)(n,"".concat(S,"-ellipsis"),k),(0,i.default)(n,"".concat(S,"-ellipsis-single-line"),P),(0,i.default)(n,"".concat(S,"-ellipsis-multiple-line"),A),n),f),style:(0,u.default)((0,u.default)({},m),{WebkitLineClamp:A?k:null}),component:c,ref:e.contentRef,direction:b},_),N,e.renderOperations()))}))}},{key:"render",value:function(){return this.getEditable().editing?this.renderEditInput():this.renderContent()}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.children,n=e.editable;return(0,k.default)(!n||"string"===typeof t,"Typography","When `editable` is enabled, the `children` should use string."),{}}}]),n}(p.Component);j.contextType=E.ConfigContext,j.defaultProps={children:""};var D=j;t.default=D},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(e){var t=o,n=t.lib,r=n.WordArray,i=n.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),u[o]=n(e.pow(r,1/3)),o++),r++}();var c=[],l=a.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],f=n[6],d=n[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var h=c[p-15],v=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,m=c[p-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[p]=v+c[p-7]+g+c[p-16]}var y=r&o^r&i^o&i,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[p]+c[p];d=f,f=l,l=s,s=a+w|0,a=i,i=o,o=r,r=w+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(l),t.HmacSHA256=i._createHmacHelper(l)}(Math),o.SHA256)}()},,,function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(316)},,function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(57)),a=o(n(75)),s=o(n(25)),u=o(n(18)),c=o(n(39)),l=r(n(0)),f=o(n(392)),d=o(n(10)),p=n(98),h=o(n(460)),v=n(90),m=o(n(53)),g=o(n(238)),y=n(29),b=n(77),w=o(n(49)),x=o(n(461)),E=o(n(468)),C=n(78),k=n(228),O=n(76),S=o(n(471)),_=o(n(472)),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},I=((0,b.tuple)("success","warning","error","validating",""),l.memo((function(e){return e.children}),(function(e,t){return e.value===t.value&&e.update===t.update})));var P=function(e){var t=e.name,n=e.fieldKey,r=e.noStyle,o=e.dependencies,b=e.prefixCls,P=e.style,A=e.className,R=e.shouldUpdate,N=e.hasFeedback,M=e.help,j=e.rules,D=e.validateStatus,F=e.children,L=e.required,B=e.label,U=e.messageVariables,z=e.trigger,V=void 0===z?"onChange":z,W=e.validateTrigger,H=e.hidden,$=T(e,["name","fieldKey","noStyle","dependencies","prefixCls","style","className","shouldUpdate","hasFeedback","help","rules","validateStatus","children","required","label","messageVariables","trigger","validateTrigger","hidden"]),q=(0,l.useRef)(!1),K=(0,l.useContext)(y.ConfigContext).getPrefixCls,G=(0,l.useContext)(C.FormContext),X=G.name,Y=G.requiredMark,J=(0,l.useContext)(C.FormItemContext).updateItemErrors,Q=l.useState(!!M),Z=(0,c.default)(Q,2),ee=Z[0],te=Z[1],ne=(0,S.default)({}),re=(0,c.default)(ne,2),oe=re[0],ie=re[1],ae=(0,l.useContext)(h.default).validateTrigger,se=void 0!==W?W:ae;function ue(e){q.current||te(e)}var ce=function(e){return null===e&&(0,w.default)(!1,"Form.Item","`null` is passed as `name` property"),!(void 0===e||null===e)}(t),le=(0,l.useRef)([]);l.useEffect((function(){return function(){q.current=!0,J(le.current.join("__SPLIT__"),[])}}),[]);var fe=K("form",b),de=r?J:function(e,t){ie((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,f.default)(n[e],t)?n:(0,u.default)((0,u.default)({},n),(0,s.default)({},e,t))}))},pe=(0,_.default)();function he(t,n,o,i){var c,f;if(r&&!H)return t;var p,h=[];Object.keys(oe).forEach((function(e){h=[].concat((0,a.default)(h),(0,a.default)(oe[e]||[]))})),void 0!==M&&null!==M?p=(0,k.toArray)(M):(p=o?o.errors:[],p=[].concat((0,a.default)(p),(0,a.default)(h)));var v="";void 0!==D?v=D:(null===o||void 0===o?void 0:o.validating)?v="validating":(null===(f=null===o||void 0===o?void 0:o.errors)||void 0===f?void 0:f.length)||h.length?v="error":(null===o||void 0===o?void 0:o.touched)&&(v="success");var y=(c={},(0,s.default)(c,"".concat(fe,"-item"),!0),(0,s.default)(c,"".concat(fe,"-item-with-help"),ee||M),(0,s.default)(c,"".concat(A),!!A),(0,s.default)(c,"".concat(fe,"-item-has-feedback"),v&&N),(0,s.default)(c,"".concat(fe,"-item-has-success"),"success"===v),(0,s.default)(c,"".concat(fe,"-item-has-warning"),"warning"===v),(0,s.default)(c,"".concat(fe,"-item-has-error"),"error"===v),(0,s.default)(c,"".concat(fe,"-item-is-validating"),"validating"===v),(0,s.default)(c,"".concat(fe,"-item-hidden"),H),c);return l.createElement(g.default,(0,u.default)({className:(0,d.default)(y),style:P,key:"row"},(0,m.default)($,["colon","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","normalize","preserve","required","tooltip","validateFirst","validateStatus","valuePropName","wrapperCol","_internalItemRender"])),l.createElement(x.default,(0,u.default)({htmlFor:n,required:i,requiredMark:Y},e,{prefixCls:fe})),l.createElement(E.default,(0,u.default)({},e,o,{errors:p,prefixCls:fe,status:v,onDomErrorVisibleChange:ue,validateStatus:v}),l.createElement(C.FormItemContext.Provider,{value:{updateItemErrors:de}},t)))}var ve="function"===typeof F,me=(0,l.useRef)(0);if(me.current+=1,!ce&&!ve&&!o)return he(F);var ge={};return"string"===typeof B&&(ge.label=B),U&&(ge=(0,u.default)((0,u.default)({},ge),U)),l.createElement(p.Field,(0,u.default)({},e,{messageVariables:ge,trigger:V,validateTrigger:se,onReset:function(){ue(!1)}}),(function(s,c,f){var d=c.errors,p=(0,k.toArray)(t).length&&c?c.name:[],h=(0,k.getFieldId)(p,X);if(r){if(le.current=(0,a.default)(p),n){var m=Array.isArray(n)?n:[n];le.current=[].concat((0,a.default)(p.slice(0,-1)),(0,a.default)(m))}J(le.current.join("__SPLIT__"),d)}var g=void 0!==L?L:!(!j||!j.some((function(e){if(e&&"object"===(0,i.default)(e)&&e.required)return!0;if("function"===typeof e){var t=e(f);return t&&t.required}return!1}))),y=(0,u.default)({},s),b=null;if((0,w.default)(!(R&&o),"Form.Item","`shouldUpdate` and `dependencies` shouldn't be used together. See https://ant.design/components/form/#dependencies."),Array.isArray(F)&&ce)(0,w.default)(!1,"Form.Item","`children` is array of render props cannot have `name`."),b=F;else if(ve&&(!R&&!o||ce))(0,w.default)(!(!R&&!o),"Form.Item","`children` of render props only work with `shouldUpdate` or `dependencies`."),(0,w.default)(!ce,"Form.Item","Do not use `name` with `children` of render props since it's not a field.");else if(!o||ve||ce)if((0,O.isValidElement)(F)){(0,w.default)(void 0===F.props.defaultValue,"Form.Item","`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");var x=(0,u.default)((0,u.default)({},F.props),y);x.id||(x.id=h),(0,v.supportRef)(F)&&(x.ref=pe(p,F)),new Set([].concat((0,a.default)((0,k.toArray)(V)),(0,a.default)((0,k.toArray)(se)))).forEach((function(e){x[e]=function(){for(var t,n,r,o,i,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];null===(r=y[e])||void 0===r||(t=r).call.apply(t,[y].concat(s)),null===(i=(o=F.props)[e])||void 0===i||(n=i).call.apply(n,[o].concat(s))}})),b=l.createElement(I,{value:y[e.valuePropName||"value"],update:me.current},(0,O.cloneElement)(F,x))}else ve&&(R||o)&&!ce?b=F(f):((0,w.default)(!p.length,"Form.Item","`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."),b=F);else(0,w.default)(!1,"Form.Item","Must set `name` or use render props when `dependencies` is set.");return he(b,h,c,g)}))};t.default=P},function(e,t,n){"use strict";var r=n(0),o=n(42),i=n.n(o),a=n(73),s=Object(r.forwardRef)((function(e,t){var n=e.didUpdate,o=e.getContainer,s=e.children,u=Object(r.useRef)();Object(r.useImperativeHandle)(t,(function(){return{}}));var c=Object(r.useRef)(!1);return!c.current&&Object(a.a)()&&(u.current=o(),c.current=!0),Object(r.useEffect)((function(){null===n||void 0===n||n(e)})),Object(r.useEffect)((function(){return function(){var e,t;null===(e=u.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(u.current)}}),[]),u.current?i.a.createPortal(s,u.current):null}));t.a=s},function(e,t,n){"use strict";t.a=function(){var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))}},function(e,t,n){"use strict";function r(e){var t="";if(!e)try{e=n(127)}catch(r){t=r.toString()}return{readFile:e?function(t){return new Promise((function(n,r){e.readFile(t,(function(e,t){return e?r(e):n(t)}))}))}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+t)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(250)),i=r(n(251)),a=o.default;a.Group=i.default,a.__ANT_CHECKBOX=!0;var s=a;t.default=s},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(256)),i=r(n(257));o.default.Dragger=i.default;var a=o.default;t.default=a},function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(175)),i=r(n(260));function a(e){return(0,i.default)((0,i.withWarn)(e))}var s=o.default;s.info=function(e){return(0,i.default)((0,i.withInfo)(e))},s.success=function(e){return(0,i.default)((0,i.withSuccess)(e))},s.error=function(e){return(0,i.default)((0,i.withError)(e))},s.warning=a,s.warn=a,s.confirm=function(e){return(0,i.default)((0,i.withConfirm)(e))},s.destroyAll=function(){for(;o.destroyFns.length;){var e=o.destroyFns.pop();e&&e()}},s.config=i.globalConfig;var u=s;t.default=u},,function(e,t,n){"use strict";n(47),n(283)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";n(47),n(285)},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)"undefined"!==typeof e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"===typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(o){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"===typeof e?r=Symbol.prototype.toString.call(e):"string"!==typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<r.length;++a){var s=r.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=r.charAt(a):s<128?o+=i[s]:s<2048?o+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?o+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(a)),o+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!==typeof n){if(o(t))t.push(n);else{if(!t||"object"!==typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(n);var s=t;return o(t)&&!o(n)&&(s=a(t,i)),o(t)&&o(n)?(n.forEach((function(n,o){if(r.call(t,o)){var a=t[o];a&&"object"===typeof a&&n&&"object"===typeof n?t[o]=e(a,n,i):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return r.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),s)}}},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(){var e=o,t=e.lib,n=t.WordArray,r=t.Hasher,i=e.algo,a=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],s=n[3],u=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+a[c];f+=c<20?1518500249+(o&i|~o&s):c<40?1859775393+(o^i^s):c<60?(o&i|o&s|i&s)-1894007588:(o^i^s)-899497514,u=s,s=i,i=o<<30|o>>>2,o=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s)}(),o.SHA1)}()},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),void function(){var e=o,t=e.lib.Base,n=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,o=4*r;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,u=a.words,c=0;c<r;c++)s[c]^=1549556828,u[c]^=909522486;i.sigBytes=a.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())}()},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.convertLegacyProps=function(e){if("danger"===e)return{danger:!0};return{type:e}},t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(39)),u=o(n(57)),c=r(n(0)),l=o(n(10)),f=o(n(53)),d=o(n(335)),p=n(29),h=o(n(382)),v=n(77),m=o(n(49)),g=o(n(89)),y=o(n(384)),b=n(76),w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},x=/^[\u4e00-\u9fa5]{2}$/,E=x.test.bind(x);function C(e){return"text"===e||"link"===e}function k(e,t){var n=!1,r=[];return c.Children.forEach(e,(function(e){var t=(0,u.default)(e),o="string"===t||"number"===t;if(n&&o){var i=r.length-1,a=r[i];r[i]="".concat(a).concat(e)}else r.push(e);n=o})),c.Children.map(r,(function(e){return function(e,t){if(null!=e){var n=t?" ":"";return"string"!==typeof e&&"number"!==typeof e&&"string"===typeof e.type&&E(e.props.children)?(0,b.cloneElement)(e,{children:e.props.children.split("").join(n)}):"string"===typeof e?(E(e)&&(e=e.split("").join(n)),c.createElement("span",null,e)):e}}(e,t)}))}(0,v.tuple)("default","primary","ghost","dashed","link","text"),(0,v.tuple)("circle","round"),(0,v.tuple)("submit","button","reset");var O=function(e,t){var n,r,o=e.loading,d=e.prefixCls,v=e.type,b=e.danger,x=e.shape,O=e.size,S=e.className,_=e.children,T=e.icon,I=e.ghost,P=e.block,A=w(e,["loading","prefixCls","type","danger","shape","size","className","children","icon","ghost","block"]),R=c.useContext(g.default),N=c.useState(!!o),M=(0,s.default)(N,2),j=M[0],D=M[1],F=c.useState(!1),L=(0,s.default)(F,2),B=L[0],U=L[1],z=c.useContext(p.ConfigContext),V=z.getPrefixCls,W=z.autoInsertSpaceInButton,H=z.direction,$=t||c.createRef(),q=c.useRef(),K=function(){return 1===c.Children.count(_)&&!T&&!C(v)};r="object"===(0,u.default)(o)&&o.delay?o.delay||!0:!!o,c.useEffect((function(){clearTimeout(q.current),"number"===typeof r?q.current=window.setTimeout((function(){D(r)}),r):D(r)}),[r]),c.useEffect((function(){if($&&$.current&&!1!==W){var e=$.current.textContent;K()&&E(e)?B||U(!0):B&&U(!1)}}),[$]);var G=function(t){var n=e.onClick;j||n&&n(t)};(0,m.default)(!("string"===typeof T&&T.length>2),"Button","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(T,"` at https://ant.design/components/icon")),(0,m.default)(!(I&&C(v)),"Button","`link` or `text` button can't be a `ghost` button.");var X=V("btn",d),Y=!1!==W,J="";switch(O||R){case"large":J="lg";break;case"small":J="sm"}var Q=j?"loading":T,Z=(0,l.default)(X,(n={},(0,a.default)(n,"".concat(X,"-").concat(v),v),(0,a.default)(n,"".concat(X,"-").concat(x),x),(0,a.default)(n,"".concat(X,"-").concat(J),J),(0,a.default)(n,"".concat(X,"-icon-only"),!_&&0!==_&&Q),(0,a.default)(n,"".concat(X,"-background-ghost"),I&&!C(v)),(0,a.default)(n,"".concat(X,"-loading"),j),(0,a.default)(n,"".concat(X,"-two-chinese-chars"),B&&Y),(0,a.default)(n,"".concat(X,"-block"),P),(0,a.default)(n,"".concat(X,"-dangerous"),!!b),(0,a.default)(n,"".concat(X,"-rtl"),"rtl"===H),n),S),ee=T&&!j?T:c.createElement(y.default,{existIcon:!!T,prefixCls:X,loading:!!j}),te=_||0===_?k(_,K()&&Y):null,ne=(0,f.default)(A,["htmlType","loading","navigate"]);if(void 0!==ne.href)return c.createElement("a",(0,i.default)({},ne,{className:Z,onClick:G,ref:$}),ee,te);var re=A,oe=re.htmlType,ie=w(re,["htmlType"]),ae=c.createElement("button",(0,i.default)({},(0,f.default)(ie,["loading"]),{type:oe,className:Z,onClick:G,ref:$}),ee,te);return C(v)?ae:c.createElement(h.default,null,ae)},S=c.forwardRef(O);S.displayName="Button",S.defaultProps={loading:!1,ghost:!1,block:!1,htmlType:"button"},S.Group=d.default,S.__ANT_BUTTON=!0;var _=S;t.default=_},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=o,t.note=i,t.resetWarned=function(){r={}},t.call=a,t.warningOnce=s,t.noteOnce=function(e,t){a(i,e,t)},t.default=void 0;var r={};function o(e,t){0}function i(e,t){0}function a(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function s(e,t){a(o,e,t)}var u=s;t.default=u},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.changeConfirmLocale=function(e){a=e?(0,o.default)((0,o.default)({},a),e):(0,o.default)({},i.default.Modal)},t.getConfirmLocale=function(){return a};var o=r(n(18)),i=r(n(109)),a=(0,o.default)({},i.default.Modal)},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.warning=function(e,t){(0,c.default)(e,"[@ant-design/icons] ".concat(t))},t.isIconDefinition=function(e){return"object"===(0,a.default)(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===(0,a.default)(e.icon)||"function"===typeof e.icon)},t.normalizeAttrs=f,t.generate=function e(t,n,r){if(!r)return u.default.createElement(t.tag,(0,i.default)({key:n},f(t.attrs)),(t.children||[]).map((function(r,o){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))})));return u.default.createElement(t.tag,(0,i.default)((0,i.default)({key:n},f(t.attrs)),r),(t.children||[]).map((function(r,o){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))})))},t.getSecondaryColor=function(e){return(0,s.generate)(e)[0]},t.normalizeTwoToneColors=function(e){if(!e)return[];return Array.isArray(e)?e:[e]},t.useInsertStyles=t.iconStyles=t.svgBaseProps=void 0;var i=o(n(211)),a=o(n(57)),s=n(118),u=r(n(0)),c=o(n(161)),l=n(176);function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}t.svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};var d="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";t.iconStyles=d;var p=!1;t.useInsertStyles=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;(0,u.useEffect)((function(){p||((0,l.insertCss)(e,{prepend:!0}),p=!0)}),[])}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(359))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=function(e){return+setTimeout(e,16)},o=function(e){return clearTimeout(e)};function i(e){return r(e)}"undefined"!==typeof window&&"requestAnimationFrame"in window&&(r=function(e){return window.requestAnimationFrame(e)},o=function(e){return window.cancelAnimationFrame(e)}),i.cancel=o},,function(e,t,n){var r=n(97)(n(67),"Map");e.exports=r},function(e,t,n){var r=n(67).Symbol;e.exports=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.responsiveMap=t.responsiveArray=void 0;var o=r(n(25)),i=r(n(18));t.responsiveArray=["xxl","xl","lg","md","sm","xs"];var a={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"};t.responsiveMap=a;var s=new Map,u=-1,c={},l={matchHandlers:{},dispatch:function(e){return c=e,s.forEach((function(e){return e(c)})),s.size>=1},subscribe:function(e){return s.size||this.register(),u+=1,s.set(u,e),e(c),u},unsubscribe:function(e){s.delete(e),s.size||this.unregister()},unregister:function(){var e=this;Object.keys(a).forEach((function(t){var n=a[t],r=e.matchHandlers[n];null===r||void 0===r||r.mql.removeListener(null===r||void 0===r?void 0:r.listener)})),s.clear()},register:function(){var e=this;Object.keys(a).forEach((function(t){var n=a[t],r=function(n){var r=n.matches;e.dispatch((0,i.default)((0,i.default)({},c),(0,o.default)({},t,r)))},s=window.matchMedia(n);s.addListener(r),e.matchHandlers[n]={mql:s,listener:r},r(s)}))}};t.default=l},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(18)),s=o(n(57)),u=r(n(0)),c=o(n(10)),l=o(n(239)),f=n(29),d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var p=["xs","sm","md","lg","xl","xxl"],h=u.forwardRef((function(e,t){var n,r=u.useContext(f.ConfigContext),o=r.getPrefixCls,h=r.direction,v=u.useContext(l.default),m=v.gutter,g=v.wrap,y=e.prefixCls,b=e.span,w=e.order,x=e.offset,E=e.push,C=e.pull,k=e.className,O=e.children,S=e.flex,_=e.style,T=d(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),I=o("col",y),P={};p.forEach((function(t){var n,r={},o=e[t];"number"===typeof o?r.span=o:"object"===(0,s.default)(o)&&(r=o||{}),delete T[t],P=(0,a.default)((0,a.default)({},P),(n={},(0,i.default)(n,"".concat(I,"-").concat(t,"-").concat(r.span),void 0!==r.span),(0,i.default)(n,"".concat(I,"-").concat(t,"-order-").concat(r.order),r.order||0===r.order),(0,i.default)(n,"".concat(I,"-").concat(t,"-offset-").concat(r.offset),r.offset||0===r.offset),(0,i.default)(n,"".concat(I,"-").concat(t,"-push-").concat(r.push),r.push||0===r.push),(0,i.default)(n,"".concat(I,"-").concat(t,"-pull-").concat(r.pull),r.pull||0===r.pull),(0,i.default)(n,"".concat(I,"-rtl"),"rtl"===h),n))}));var A=(0,c.default)(I,(n={},(0,i.default)(n,"".concat(I,"-").concat(b),void 0!==b),(0,i.default)(n,"".concat(I,"-order-").concat(w),w),(0,i.default)(n,"".concat(I,"-offset-").concat(x),x),(0,i.default)(n,"".concat(I,"-push-").concat(E),E),(0,i.default)(n,"".concat(I,"-pull-").concat(C),C),n),k,P),R=(0,a.default)({},_);return m&&(R=(0,a.default)((0,a.default)((0,a.default)({},m[0]>0?{paddingLeft:m[0]/2,paddingRight:m[0]/2}:{}),m[1]>0?{paddingTop:m[1]/2,paddingBottom:m[1]/2}:{}),R)),S&&(R.flex=function(e){return"number"===typeof e?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}(S),"auto"!==S||!1!==g||R.minWidth||(R.minWidth=0)),u.createElement("div",(0,a.default)({},T,{style:R,className:A,ref:t}),O)}));h.displayName="Col";var v=h;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return o.default.Children.forEach(t,(function(t){(void 0!==t&&null!==t||n.keepEmpty)&&(Array.isArray(t)?r=r.concat(e(t)):(0,i.isFragment)(t)&&t.props?r=r.concat(e(t.props.children,n)):r.push(t))})),r};var r,o=(r=n(0))&&r.__esModule?r:{default:r},i=n(91)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(530))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.validProgress=function(e){if(!e||e<0)return 0;if(e>100)return 100;return e},t.getSuccessPercent=function(e){var t=e.success,n=e.successPercent;t&&"progress"in t&&((0,o.default)(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),n=t.progress);t&&"percent"in t&&(n=t.percent);return n};var o=r(n(49))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.destroyFns=void 0;var i,a=o(n(25)),s=o(n(18)),u=r(n(0)),c=o(n(598)),l=o(n(10)),f=o(n(112)),d=o(n(580)),p=n(162),h=o(n(50)),v=n(159),m=o(n(88)),g=n(29),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};t.destroyFns=[];"undefined"!==typeof window&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",(function(e){i={x:e.pageX,y:e.pageY},setTimeout((function(){i=null}),100)}),!0);var b=function(e){var t,n=u.useContext(g.ConfigContext),r=n.getPopupContainer,o=n.getPrefixCls,d=n.direction,b=function(t){var n=e.onCancel;n&&n(t)},w=function(t){var n=e.onOk;n&&n(t)},x=function(t){var n=e.okText,r=e.okType,o=e.cancelText,i=e.confirmLoading;return u.createElement(u.Fragment,null,u.createElement(h.default,(0,s.default)({onClick:b},e.cancelButtonProps),o||t.cancelText),u.createElement(h.default,(0,s.default)({},(0,v.convertLegacyProps)(r),{loading:i,onClick:w},e.okButtonProps),n||t.okText))},E=e.prefixCls,C=e.footer,k=e.visible,O=e.wrapClassName,S=e.centered,_=e.getContainer,T=e.closeIcon,I=e.focusTriggerAfterClose,P=void 0===I||I,A=y(e,["prefixCls","footer","visible","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),R=o("modal",E),N=u.createElement(m.default,{componentName:"Modal",defaultLocale:(0,p.getConfirmLocale)()},x),M=u.createElement("span",{className:"".concat(R,"-close-x")},T||u.createElement(f.default,{className:"".concat(R,"-close-icon")})),j=(0,l.default)(O,(t={},(0,a.default)(t,"".concat(R,"-centered"),!!S),(0,a.default)(t,"".concat(R,"-wrap-rtl"),"rtl"===d),t));return u.createElement(c.default,(0,s.default)({},A,{getContainer:void 0===_?r:_,prefixCls:R,wrapClassName:j,footer:void 0===C?N:C,visible:k,mousePosition:i,onClose:b,closeIcon:M,focusTriggerAfterClose:P}))};b.useModal=d.default,b.defaultProps={width:520,transitionName:"zoom",maskTransitionName:"fade",confirmLoading:!1,visible:!1,okType:"primary"};var w=b;t.default=w},function(e,t){var n=[],r=[];function o(e,t){if(t=t||{},void 0===e)throw new Error("insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).");var o,i=!0===t.prepend?"prepend":"append",a=void 0!==t.container?t.container:document.querySelector("head"),s=n.indexOf(a);return-1===s&&(s=n.push(a)-1,r[s]={}),void 0!==r[s]&&void 0!==r[s][i]?o=r[s][i]:(o=r[s][i]=function(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}(),"prepend"===i?a.insertBefore(o,a.childNodes[0]):a.appendChild(o)),65279===e.charCodeAt(0)&&(e=e.substr(1,e.length)),o.styleSheet?o.styleSheet.cssText+=e:o.textContent+=e,o}e.exports=o,e.exports.insertCss=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(246).Col;t.default=r},function(e,t,n){"use strict";e.exports=n(489)},function(e,t,n){"use strict";var r=n(91),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),v=u(n),m=0;m<a.length;++m){var g=a[m];if(!i[g]&&(!r||!r[g])&&(!v||!v[g])&&(!s||!s[g])){var y=d(n,g);try{c(t,g,y)}catch(b){}}}}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(3),o=n(148);function i(){var t=e.Canvas||e.HTMLCanvasElement,n=e.Image||e.HTMLImageElement,i=e.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},a=Object(o.a)();return Object(r.a)({Canvas:t||function(){},CanvasRenderingContext2D:e.CanvasRenderingContext2D||function(){},Image:n||function(){},ImageData:e.ImageData||function(){},Video:e.HTMLVideoElement||function(){},createCanvasElement:function(){if(t)return new t;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},createImageElement:function(){if(n)return new n;throw new Error("createImageElement - missing Image implementation for nodejs environment")},fetch:i},a)}}).call(this,n(65))},function(e,t,n){"use strict";(function(r,o){function i(){return"object"===typeof r&&"undefined"!==typeof e&&"undefined"!==typeof o&&!!o.version}n.d(t,"a",(function(){return i}))}).call(this,n(65),n(108))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.create;Object.create},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){"use strict";n(47),n(281),n(86)},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={};function m(){}function g(){}function y(){}var b={};b[i]=function(){return this};var w=Object.getPrototypeOf,x=w&&w(w(I([])));x&&x!==n&&r.call(x,i)&&(b=x);var E=y.prototype=m.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var n=e[i];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return g.prototype=E.constructor=y,y.constructor=g,g.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},C(k.prototype),k.prototype[a]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new k(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(E),u(E,s,"Generator"),E[i]=function(){return this},E.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=I,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i=n(156),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},,,,,,,,,function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(128),function(){var e=i,t=e.lib.Hasher,n=e.x64,r=n.Word,o=n.WordArray,a=e.algo;function s(){return r.create.apply(r,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var l=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],f=n[6],d=n[7],p=r.high,h=r.low,v=o.high,m=o.low,g=i.high,y=i.low,b=a.high,w=a.low,x=s.high,E=s.low,C=l.high,k=l.low,O=f.high,S=f.low,_=d.high,T=d.low,I=p,P=h,A=v,R=m,N=g,M=y,j=b,D=w,F=x,L=E,B=C,U=k,z=O,V=S,W=_,H=T,$=0;$<80;$++){var q,K,G=c[$];if($<16)K=G.high=0|e[t+2*$],q=G.low=0|e[t+2*$+1];else{var X=c[$-15],Y=X.high,J=X.low,Q=(Y>>>1|J<<31)^(Y>>>8|J<<24)^Y>>>7,Z=(J>>>1|Y<<31)^(J>>>8|Y<<24)^(J>>>7|Y<<25),ee=c[$-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,oe=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),ie=c[$-7],ae=ie.high,se=ie.low,ue=c[$-16],ce=ue.high,le=ue.low;K=(K=(K=Q+ae+((q=Z+se)>>>0<Z>>>0?1:0))+re+((q+=oe)>>>0<oe>>>0?1:0))+ce+((q+=le)>>>0<le>>>0?1:0),G.high=K,G.low=q}var fe,de=F&B^~F&z,pe=L&U^~L&V,he=I&A^I&N^A&N,ve=P&R^P&M^R&M,me=(I>>>28|P<<4)^(I<<30|P>>>2)^(I<<25|P>>>7),ge=(P>>>28|I<<4)^(P<<30|I>>>2)^(P<<25|I>>>7),ye=(F>>>14|L<<18)^(F>>>18|L<<14)^(F<<23|L>>>9),be=(L>>>14|F<<18)^(L>>>18|F<<14)^(L<<23|F>>>9),we=u[$],xe=we.high,Ee=we.low,Ce=W+ye+((fe=H+be)>>>0<H>>>0?1:0),ke=ge+ve;W=z,H=V,z=B,V=U,B=F,U=L,F=j+(Ce=(Ce=(Ce=Ce+de+((fe+=pe)>>>0<pe>>>0?1:0))+xe+((fe+=Ee)>>>0<Ee>>>0?1:0))+K+((fe+=q)>>>0<q>>>0?1:0))+((L=D+fe|0)>>>0<D>>>0?1:0)|0,j=N,D=M,N=A,M=R,A=I,R=P,I=Ce+(me+he+(ke>>>0<ge>>>0?1:0))+((P=fe+ke|0)>>>0<fe>>>0?1:0)|0}h=r.low=h+P,r.high=p+I+(h>>>0<P>>>0?1:0),m=o.low=m+R,o.high=v+A+(m>>>0<R>>>0?1:0),y=i.low=y+M,i.high=g+N+(y>>>0<M>>>0?1:0),w=a.low=w+D,a.high=b+j+(w>>>0<D>>>0?1:0),E=s.low=E+L,s.high=x+F+(E>>>0<L>>>0?1:0),k=l.low=k+U,l.high=C+B+(k>>>0<U>>>0?1:0),S=f.low=S+V,f.high=O+z+(S>>>0<V>>>0?1:0),T=d.low=T+H,d.high=_+W+(T>>>0<H>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),i.SHA512)}()},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(56);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(56),o=n(321),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=n(200)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){s.headers[e]=r.merge(i)})),e.exports=s}).call(this,n(108))},function(e,t,n){"use strict";var r=n(56),o=n(322),i=n(197),a=n(324),s=n(327),u=n(328),c=n(201);e.exports=function(e){return new Promise((function(t,l){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",v=e.auth.password||"";d.Authorization="Basic "+btoa(h+":"+v)}var m=a(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),i(m,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,l,r),p=null}},p.onabort=function(){p&&(l(c("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){l(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),l(c(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var g=n(329),y=(e.withCredentials||u(m))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){"undefined"===typeof f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(b){if("json"!==e.responseType)throw b}"function"===typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),l(e),p=null)})),void 0===f&&(f=null),p.send(f)}))}},function(e,t,n){"use strict";var r=n(323);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";var r=n(56);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,(function(e){"undefined"!==typeof t[e]&&(n[e]=t[e])})),r.forEach(i,(function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!==typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!==typeof e[o]&&(n[o]=e[o])})),r.forEach(a,(function(r){"undefined"!==typeof t[r]?n[r]=t[r]:"undefined"!==typeof e[r]&&(n[r]=e[r])}));var s=o.concat(i).concat(a),u=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return r.forEach(u,(function(r){"undefined"!==typeof t[r]?n[r]=t[r]:"undefined"!==typeof e[r]&&(n[r]=e[r])})),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){var r=n(205);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(18)),i=r(n(343)),a=r(n(207)),s={lang:(0,o.default)({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},i.default),timePickerLocale:(0,o.default)({},a.default)};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(0).createContext)(void 0);t.default=r},function(e,t,n){var r=n(353);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(209)),i=r(n(211)),a=n(163),s={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var u=function(e){var t=e.icon,n=e.className,r=e.onClick,u=e.style,c=e.primaryColor,l=e.secondaryColor,f=(0,o.default)(e,["icon","className","onClick","style","primaryColor","secondaryColor"]),d=s;if(c&&(d={primaryColor:c,secondaryColor:l||(0,a.getSecondaryColor)(c)}),(0,a.useInsertStyles)(),(0,a.warning)((0,a.isIconDefinition)(t),"icon should be icon definiton, but got ".concat(t)),!(0,a.isIconDefinition)(t))return null;var p=t;return p&&"function"===typeof p.icon&&(p=(0,i.default)((0,i.default)({},p),{},{icon:p.icon(d.primaryColor,d.secondaryColor)})),(0,a.generate)(p.icon,"svg-".concat(p.name),(0,i.default)({className:n,onClick:r,style:u,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f))};u.displayName="IconReact",u.getTwoToneColors=function(){return(0,i.default)({},s)},u.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;s.primaryColor=t,s.secondaryColor=n||(0,a.getSecondaryColor)(t),s.calculated=!!n};var c=u;t.default=c},function(e,t,n){var r=n(25);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(355))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=s.useRef({}),n=s.useState([]),r=(0,a.default)(n,2),o=r[0],c=r[1];return[function(n){e.add(n,(function(e,n){var r=n.key;if(e&&!t.current[r]){var o=s.createElement(u.default,Object.assign({},n,{holder:e}));t.current[r]=o,c((function(e){return[].concat((0,i.default)(e),[o])}))}}))},s.createElement(s.Fragment,null,o)]};var i=o(n(75)),a=o(n(39)),s=r(n(0)),u=o(n(368))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(372))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(374))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(376))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(378))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var o=r(n(165)),i=0,a={};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=i++,r=t;function s(){(r-=1)<=0?(e(),delete a[n]):a[n]=(0,o.default)(s)}return a[n]=(0,o.default)(s),n}s.cancel=function(e){void 0!==e&&(o.default.cancel(a[e]),delete a[e])},s.ids=a},,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=function(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]},t.getFieldId=function(e,t){if(!e.length)return;var n=e.join("_");return t?"".concat(t,"_").concat(n):n}},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,n){var r=n(113),o=n(131);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(65))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t,n){var r=n(412),o=n(419),i=n(421),a=n(422),s=n(423);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(424),o=n(427),i=n(428);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,v=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<l;){var g=e[h],y=t[h];if(a)var b=c?a(y,g,h,t,e,u):a(g,y,h,e,t,u);if(void 0!==b){if(b)continue;v=!1;break}if(m){if(!o(t,(function(e,t){if(!i(m,t)&&(g===e||s(g,e,n,a,u)))return m.push(t)}))){v=!1;break}}else if(g!==y&&!s(g,y,n,a,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},function(e,t,n){(function(e){var r=n(67),o=n(445),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u}).call(this,n(154)(e))},function(e,t,n){var r=n(447),o=n(448),i=n(449),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(57)),u=o(n(39)),c=r(n(0)),l=o(n(10)),f=n(29),d=o(n(239)),p=n(77),h=r(n(170)),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},m=((0,p.tuple)("top","middle","bottom","stretch"),(0,p.tuple)("start","end","center","space-around","space-between"),c.forwardRef((function(e,t){var n,r=e.prefixCls,o=e.justify,p=e.align,m=e.className,g=e.style,y=e.children,b=e.gutter,w=void 0===b?0:b,x=e.wrap,E=v(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),C=c.useContext(f.ConfigContext),k=C.getPrefixCls,O=C.direction,S=c.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),_=(0,u.default)(S,2),T=_[0],I=_[1],P=c.useRef(w);c.useEffect((function(){var e=h.default.subscribe((function(e){var t=P.current||0;(!Array.isArray(t)&&"object"===(0,s.default)(t)||Array.isArray(t)&&("object"===(0,s.default)(t[0])||"object"===(0,s.default)(t[1])))&&I(e)}));return function(){return h.default.unsubscribe(e)}}),[]);var A=k("row",r),R=function(){var e=[0,0];return(Array.isArray(w)?w:[w,0]).forEach((function(t,n){if("object"===(0,s.default)(t))for(var r=0;r<h.responsiveArray.length;r++){var o=h.responsiveArray[r];if(T[o]&&void 0!==t[o]){e[n]=t[o];break}}else e[n]=t||0})),e}(),N=(0,l.default)(A,(n={},(0,a.default)(n,"".concat(A,"-no-wrap"),!1===x),(0,a.default)(n,"".concat(A,"-").concat(o),o),(0,a.default)(n,"".concat(A,"-").concat(p),p),(0,a.default)(n,"".concat(A,"-rtl"),"rtl"===O),n),m),M=(0,i.default)((0,i.default)((0,i.default)({},R[0]>0?{marginLeft:R[0]/-2,marginRight:R[0]/-2}:{}),R[1]>0?{marginTop:R[1]/-2,marginBottom:R[1]/2}:{}),g);return c.createElement(d.default.Provider,{value:{gutter:R,wrap:x}},c.createElement("div",(0,i.default)({},E,{className:N,style:M,ref:t}),y))})));m.displayName="Row";var g=m;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(0).createContext)({});t.default=r},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.errors,n=void 0===t?h:t,r=e.help,o=e.onDomErrorVisibleChange,v=(0,d.default)(),m=s.useContext(p.FormItemPrefixContext),g=m.prefixCls,y=m.status,b=(0,f.default)(n,(function(e){e&&Promise.resolve().then((function(){null===o||void 0===o||o(!0)})),v()}),!!r),w=(0,a.default)(b,2),x=w[0],E=w[1],C=(0,l.default)((function(){return E}),x,(function(e,t){return t})),k=s.useState(y),O=(0,a.default)(k,2),S=O[0],_=O[1];s.useEffect((function(){x&&y&&_(y)}),[x,y]);var T="".concat(g,"-item-explain");return s.createElement(c.default,{motionDeadline:500,visible:x,motionName:"show-help",onLeaveEnd:function(){null===o||void 0===o||o(!1)},motionAppear:!0,removeOnLeave:!0},(function(e){var t=e.className;return s.createElement("div",{className:(0,u.default)(T,(0,i.default)({},"".concat(T,"-").concat(S),S),t),key:"help"},C.map((function(e,t){return s.createElement("div",{key:t,role:"alert"},e)})))}))};var i=o(n(25)),a=o(n(39)),s=r(n(0)),u=o(n(10)),c=o(n(45)),l=o(n(469)),f=o(n(470)),d=o(n(115)),p=n(78),h=[]},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.hasPrefixSuffix=g,t.default=void 0;var i=o(n(25)),a=o(n(66)),s=o(n(69)),u=o(n(70)),c=o(n(71)),l=r(n(0)),f=o(n(10)),d=o(n(111)),p=n(77),h=n(116),v=n(76),m=(0,p.tuple)("text","input");function g(e){return!!(e.prefix||e.suffix||e.allowClear)}function y(e){return!(!e.addonBefore&&!e.addonAfter)}var b=function(e){(0,u.default)(n,e);var t=(0,c.default)(n);function n(){var e;return(0,a.default)(this,n),(e=t.apply(this,arguments)).containerRef=l.createRef(),e.onInputMouseUp=function(t){var n;if(null===(n=e.containerRef.current)||void 0===n?void 0:n.contains(t.target)){var r=e.props.triggerFocus;null===r||void 0===r||r()}},e}return(0,s.default)(n,[{key:"renderClearIcon",value:function(e){var t=this.props,n=t.allowClear,r=t.value,o=t.disabled,a=t.readOnly,s=t.handleReset;if(!n)return null;var u=!o&&!a&&r,c="".concat(e,"-clear-icon");return l.createElement(d.default,{onClick:s,className:(0,f.default)((0,i.default)({},"".concat(c,"-hidden"),!u),c),role:"button"})}},{key:"renderSuffix",value:function(e){var t=this.props,n=t.suffix,r=t.allowClear;return n||r?l.createElement("span",{className:"".concat(e,"-suffix")},this.renderClearIcon(e),n):null}},{key:"renderLabeledIcon",value:function(e,t){var n,r=this.props,o=r.focused,a=r.value,s=r.prefix,u=r.className,c=r.size,d=r.suffix,p=r.disabled,m=r.allowClear,b=r.direction,w=r.style,x=r.readOnly,E=r.bordered,C=this.renderSuffix(e);if(!g(this.props))return(0,v.cloneElement)(t,{value:a});var k=s?l.createElement("span",{className:"".concat(e,"-prefix")},s):null,O=(0,f.default)("".concat(e,"-affix-wrapper"),(n={},(0,i.default)(n,"".concat(e,"-affix-wrapper-focused"),o),(0,i.default)(n,"".concat(e,"-affix-wrapper-disabled"),p),(0,i.default)(n,"".concat(e,"-affix-wrapper-sm"),"small"===c),(0,i.default)(n,"".concat(e,"-affix-wrapper-lg"),"large"===c),(0,i.default)(n,"".concat(e,"-affix-wrapper-input-with-clear-btn"),d&&m&&a),(0,i.default)(n,"".concat(e,"-affix-wrapper-rtl"),"rtl"===b),(0,i.default)(n,"".concat(e,"-affix-wrapper-readonly"),x),(0,i.default)(n,"".concat(e,"-affix-wrapper-borderless"),!E),(0,i.default)(n,"".concat(u),!y(this.props)&&u),n));return l.createElement("span",{ref:this.containerRef,className:O,style:w,onMouseUp:this.onInputMouseUp},k,(0,v.cloneElement)(t,{style:null,value:a,className:(0,h.getInputClassName)(e,E,c,p)}),C)}},{key:"renderInputWithLabel",value:function(e,t){var n,r=this.props,o=r.addonBefore,a=r.addonAfter,s=r.style,u=r.size,c=r.className,d=r.direction;if(!y(this.props))return t;var p="".concat(e,"-group"),h="".concat(p,"-addon"),m=o?l.createElement("span",{className:h},o):null,g=a?l.createElement("span",{className:h},a):null,b=(0,f.default)("".concat(e,"-wrapper"),p,(0,i.default)({},"".concat(p,"-rtl"),"rtl"===d)),w=(0,f.default)("".concat(e,"-group-wrapper"),(n={},(0,i.default)(n,"".concat(e,"-group-wrapper-sm"),"small"===u),(0,i.default)(n,"".concat(e,"-group-wrapper-lg"),"large"===u),(0,i.default)(n,"".concat(e,"-group-wrapper-rtl"),"rtl"===d),n),c);return l.createElement("span",{className:w,style:s},l.createElement("span",{className:b},m,(0,v.cloneElement)(t,{style:null}),g))}},{key:"renderTextAreaWithClearIcon",value:function(e,t){var n,r=this.props,o=r.value,a=r.allowClear,s=r.className,u=r.style,c=r.direction,d=r.bordered;if(!a)return(0,v.cloneElement)(t,{value:o});var p=(0,f.default)("".concat(e,"-affix-wrapper"),"".concat(e,"-affix-wrapper-textarea-with-clear-btn"),(n={},(0,i.default)(n,"".concat(e,"-affix-wrapper-rtl"),"rtl"===c),(0,i.default)(n,"".concat(e,"-affix-wrapper-borderless"),!d),(0,i.default)(n,"".concat(s),!y(this.props)&&s),n));return l.createElement("span",{className:p,style:u},(0,v.cloneElement)(t,{style:null,value:o}),this.renderClearIcon(e))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.inputType,r=e.element;return n===m[0]?this.renderTextAreaWithClearIcon(t,r):this.renderInputWithLabel(t,this.renderLabeledIcon(t,r))}}]),n}(l.Component);t.default=b},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(476))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(75)),a=o(n(18)),s=o(n(25)),u=o(n(39)),c=r(n(0)),l=o(n(602)),f=o(n(53)),d=o(n(10)),p=o(n(478)),h=n(90),v=o(n(241)),m=n(29),g=n(116),y=o(n(89)),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},w=c.forwardRef((function(e,t){var n,r=e.prefixCls,o=e.bordered,w=void 0===o||o,x=e.showCount,E=void 0!==x&&x,C=e.maxLength,k=e.className,O=e.style,S=e.size,_=b(e,["prefixCls","bordered","showCount","maxLength","className","style","size"]),T=c.useContext(m.ConfigContext),I=T.getPrefixCls,P=T.direction,A=c.useContext(y.default),R=c.useRef(),N=c.useRef(null),M=(0,p.default)(_.defaultValue,{value:_.value}),j=(0,u.default)(M,2),D=j[0],F=j[1],L=c.useRef(_.value);c.useEffect((function(){void 0===_.value&&L.current===_.value||(F(_.value),L.current=_.value)}),[_.value,L.current]);var B=function(e,t){void 0===_.value&&(F(e),null===t||void 0===t||t())},U=I("input",r),z=c.createElement(l.default,(0,a.default)({},(0,f.default)(_,["allowClear"]),{maxLength:C,className:(0,d.default)((n={},(0,s.default)(n,"".concat(U,"-borderless"),!w),(0,s.default)(n,k,k&&!E),(0,s.default)(n,"".concat(U,"-sm"),"small"===A||"small"===S),(0,s.default)(n,"".concat(U,"-lg"),"large"===A||"large"===S),n)),style:E?null:O,prefixCls:U,onChange:function(e){B(e.target.value),(0,g.resolveOnChange)(R.current,e,_.onChange)},ref:(0,h.composeRef)(t,R)})),V=(0,g.fixControlledValue)(D),W=Number(C)>0;V=W?(0,i.default)(V).slice(0,C).join(""):V;var H=c.createElement(v.default,(0,a.default)({},_,{prefixCls:U,direction:P,inputType:"text",value:V,element:z,handleReset:function(e){B("",(function(){var e;null===(e=R.current)||void 0===e||e.focus()})),(0,g.resolveOnChange)(R.current,e,_.onChange)},ref:N,bordered:w}));if(E){var $=(0,i.default)(V).length,q="".concat($).concat(W?" / ".concat(C):"");return c.createElement("div",{className:(0,d.default)("".concat(U,"-textarea"),(0,s.default)({},"".concat(U,"-textarea-rtl"),"rtl"===P),"".concat(U,"-textarea-show-count"),k),style:O,"data-count":q},H)}return H}));t.default=w},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(480))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},,function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Row",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Col",{enumerable:!0,get:function(){return i.default}}),t.default=void 0;var o=r(n(238)),i=r(n(171)),a={useBreakpoint:r(n(247)).default};t.default=a},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(39)),i=n(0),a=r(n(170));var s=function(){var e=(0,i.useState)({}),t=(0,o.default)(e,2),n=t[0],r=t[1];return(0,i.useEffect)((function(){var e=a.default.subscribe((function(e){r(e)}));return function(){return a.default.unsubscribe(e)}}),[]),n};t.default=s},function(e,t,n){"use strict";n(47),n(488)},function(e,t,n){"use strict";n(47),n(518)},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(18)),s=r(n(0)),u=o(n(10)),c=o(n(520)),l=n(251),f=n(29),d=o(n(49)),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},h=function(e,t){var n,r=e.prefixCls,o=e.className,h=e.children,v=e.indeterminate,m=void 0!==v&&v,g=e.style,y=e.onMouseEnter,b=e.onMouseLeave,w=p(e,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave"]),x=s.useContext(f.ConfigContext),E=x.getPrefixCls,C=x.direction,k=s.useContext(l.GroupContext),O=s.useRef(w.value);s.useEffect((function(){null===k||void 0===k||k.registerValue(w.value),(0,d.default)("checked"in w||!!k||!("value"in w),"Checkbox","`value` is not a valid prop, do you mean `checked`?")}),[]),s.useEffect((function(){return w.value!==O.current&&(null===k||void 0===k||k.cancelValue(O.current),null===k||void 0===k||k.registerValue(w.value)),function(){return null===k||void 0===k?void 0:k.cancelValue(w.value)}}),[w.value]);var S=E("checkbox",r),_=(0,a.default)({},w);k&&(_.onChange=function(){w.onChange&&w.onChange.apply(w,arguments),k.toggleOption&&k.toggleOption({label:h,value:w.value})},_.name=k.name,_.checked=-1!==k.value.indexOf(w.value),_.disabled=w.disabled||k.disabled);var T=(0,u.default)((n={},(0,i.default)(n,"".concat(S,"-wrapper"),!0),(0,i.default)(n,"".concat(S,"-rtl"),"rtl"===C),(0,i.default)(n,"".concat(S,"-wrapper-checked"),_.checked),(0,i.default)(n,"".concat(S,"-wrapper-disabled"),_.disabled),n),o),I=(0,u.default)((0,i.default)({},"".concat(S,"-indeterminate"),m));return s.createElement("label",{className:T,style:g,onMouseEnter:y,onMouseLeave:b},s.createElement(c.default,(0,a.default)({},_,{prefixCls:S,className:I,ref:t})),void 0!==h&&s.createElement("span",null,h))},v=s.forwardRef(h);v.displayName="Checkbox";var m=v;t.default=m},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GroupContext=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(75)),u=o(n(39)),c=r(n(0)),l=o(n(10)),f=o(n(53)),d=o(n(250)),p=n(29),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},v=c.createContext(null);t.GroupContext=v;var m=function(e){var t=e.defaultValue,n=e.children,r=e.options,o=void 0===r?[]:r,m=e.prefixCls,g=e.className,y=e.style,b=e.onChange,w=h(e,["defaultValue","children","options","prefixCls","className","style","onChange"]),x=c.useContext(p.ConfigContext),E=x.getPrefixCls,C=x.direction,k=c.useState(w.value||t||[]),O=(0,u.default)(k,2),S=O[0],_=O[1],T=c.useState([]),I=(0,u.default)(T,2),P=I[0],A=I[1];c.useEffect((function(){"value"in w&&_(w.value||[])}),[w.value]);var R=function(){return o.map((function(e){return"string"===typeof e?{label:e,value:e}:e}))},N=E("checkbox",m),M="".concat(N,"-group"),j=(0,f.default)(w,["value","disabled"]);o&&o.length>0&&(n=R().map((function(e){return c.createElement(d.default,{prefixCls:N,key:e.value.toString(),disabled:"disabled"in e?e.disabled:w.disabled,value:e.value,checked:-1!==S.indexOf(e.value),onChange:e.onChange,className:"".concat(M,"-item"),style:e.style},e.label)})));var D={toggleOption:function(e){var t=S.indexOf(e.value),n=(0,s.default)(S);if(-1===t?n.push(e.value):n.splice(t,1),"value"in w||_(n),b){var r=R();b(n.filter((function(e){return-1!==P.indexOf(e)})).sort((function(e,t){return r.findIndex((function(t){return t.value===e}))-r.findIndex((function(e){return e.value===t}))})))}},value:S,disabled:w.disabled,name:w.name,registerValue:function(e){A((function(t){return[].concat((0,s.default)(t),[e])}))},cancelValue:function(e){A((function(t){return t.filter((function(t){return t!==e}))}))}},F=(0,l.default)(M,(0,a.default)({},"".concat(M,"-rtl"),"rtl"===C),g);return c.createElement("div",(0,i.default)({className:F,style:y},j),c.createElement(v.Provider,{value:D},n))},g=c.memo(m);t.default=g},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=r(n(0)),u=o(n(10)),c=n(90),l=n(29),f=o(n(49)),d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},p=function(e,t){var n=e.prefixCls,r=e.component,o=void 0===r?"article":r,p=e.className,h=e["aria-label"],v=e.setContentRef,m=e.children,g=d(e,["prefixCls","component","className","aria-label","setContentRef","children"]),y=t;return v&&((0,f.default)(!1,"Typography","`setContentRef` is deprecated. Please use `ref` instead."),y=(0,c.composeRef)(t,v)),s.createElement(l.ConfigConsumer,null,(function(e){var t=e.getPrefixCls,r=e.direction,c=o,l=t("typography",n),f=(0,u.default)(l,(0,a.default)({},"".concat(l,"-rtl"),"rtl"===r),p);return s.createElement(c,(0,i.default)({className:f,"aria-label":h,ref:y},g),m)}))},h=s.forwardRef(p);h.displayName="Typography";var v=h;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},o=r;t.default=o},function(e,t,n){"use strict";n(47),n(546),n(86),n(547),n(126)},function(e,t,n){"use strict";n(47),n(549),n(550)},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(75)),s=o(n(18)),u=o(n(39)),c=r(n(0)),l=o(n(599)),f=o(n(10)),d=o(n(257)),p=o(n(556)),h=n(258),v=o(n(88)),m=o(n(109)),g=n(29),y=o(n(49)),b=o(n(115)),w=o(n(579)),x=function(e,t){var n,r=e.fileList,o=e.defaultFileList,d=e.onRemove,x=e.showUploadList,E=e.listType,C=e.onPreview,k=e.onDownload,O=e.previewFile,S=e.disabled,_=e.locale,T=e.iconRender,I=e.isImageUrl,P=e.progress,A=e.prefixCls,R=e.className,N=e.type,M=e.children,j=e.style,D=e.itemRender,F=c.useState("drop"),L=(0,u.default)(F,2),B=L[0],U=L[1],z=(0,b.default)(),V=(0,w.default)(r||o||[],r),W=(0,u.default)(V,2),H=W[0],$=W[1],q=c.useRef();c.useEffect((function(){(0,y.default)("fileList"in e||!("value"in e),"Upload","`value` is not a valid prop, do you mean `fileList`?")}),[]);var K=function(t){$(t.fileList);var n=e.onChange;n&&n((0,s.default)((0,s.default)({},t),{fileList:(0,a.default)(t.fileList)}))},G=function(e){var t=(0,h.fileToObject)(e);t.status="uploading";var n=H().concat(),r=n.findIndex((function(e){return e.uid===t.uid}));-1===r?n.push(t):n[r]=t,K({file:t,fileList:n})},X=function(e,t,n){try{"string"===typeof e&&(e=JSON.parse(e))}catch(o){}var r=(0,h.getFileItem)(t,H());r&&(r.status="done",r.response=e,r.xhr=n,K({file:(0,s.default)({},r),fileList:H().concat()}))},Y=function(e,t){var n=(0,h.getFileItem)(t,H());n&&(n.percent=e.percent,K({event:e,file:(0,s.default)({},n),fileList:H().concat()}))},J=function(e,t,n){var r=(0,h.getFileItem)(n,H());r&&(r.error=e,r.response=t,r.status="error",K({file:(0,s.default)({},r),fileList:H().concat()}))},Q=function(e){Promise.resolve("function"===typeof d?d(e):d).then((function(t){if(!1!==t){var n=(0,h.removeFileItem)(e,H());n&&(e.status="removed",q.current&&q.current.abort(e),K({file:e,fileList:n}))}}))},Z=function(e){U(e.type)};c.useImperativeHandle(t,(function(){return{onStart:G,onSuccess:X,onProgress:Y,onError:J,fileList:H(),upload:q.current,forceUpdate:z}}));var ee=c.useContext(g.ConfigContext),te=ee.getPrefixCls,ne=ee.direction,re=te("upload",A),oe=(0,s.default)((0,s.default)({onStart:G,onError:J,onProgress:Y,onSuccess:X},e),{prefixCls:re,beforeUpload:function(t,n){var r=e.beforeUpload;if(!r)return!0;var o=r(t,n);if(!1===o){var i=[];return H().concat(n.map(h.fileToObject)).forEach((function(e){i.every((function(t){return t.uid!==e.uid}))&&i.push(e)})),K({file:t,fileList:i}),!1}return!o||!o.then||o}});delete oe.className,delete oe.style,M&&!S||delete oe.id;var ie=function(e){return x?c.createElement(v.default,{componentName:"Upload",defaultLocale:m.default.Upload},(function(t){var n="boolean"===typeof x?{}:x,r=n.showRemoveIcon,o=n.showPreviewIcon,i=n.showDownloadIcon,a=n.removeIcon,u=n.downloadIcon;return c.createElement(p.default,{listType:E,items:H(!0),previewFile:O,onPreview:C,onDownload:k,onRemove:Q,showRemoveIcon:!S&&r,showPreviewIcon:o,showDownloadIcon:i,removeIcon:a,downloadIcon:u,iconRender:T,locale:(0,s.default)((0,s.default)({},t),_),isImageUrl:I,progress:P,appendAction:e,itemRender:D})})):e};if("drag"===N){var ae,se=(0,f.default)(re,(ae={},(0,i.default)(ae,"".concat(re,"-drag"),!0),(0,i.default)(ae,"".concat(re,"-drag-uploading"),H().some((function(e){return"uploading"===e.status}))),(0,i.default)(ae,"".concat(re,"-drag-hover"),"dragover"===B),(0,i.default)(ae,"".concat(re,"-disabled"),S),(0,i.default)(ae,"".concat(re,"-rtl"),"rtl"===ne),ae),R);return c.createElement("span",null,c.createElement("div",{className:se,onDrop:Z,onDragOver:Z,onDragLeave:Z,style:j},c.createElement(l.default,(0,s.default)({},oe,{ref:q,className:"".concat(re,"-btn")}),c.createElement("div",{className:"".concat(re,"-drag-container")},M))),ie())}var ue=(0,f.default)(re,(n={},(0,i.default)(n,"".concat(re,"-select"),!0),(0,i.default)(n,"".concat(re,"-select-").concat(E),!0),(0,i.default)(n,"".concat(re,"-disabled"),S),(0,i.default)(n,"".concat(re,"-rtl"),"rtl"===ne),n)),ce=c.createElement("div",{className:ue,style:M?void 0:{display:"none"}},c.createElement(l.default,(0,s.default)({},oe,{ref:q})));return"picture-card"===E?c.createElement("span",{className:(0,f.default)("".concat(re,"-picture-card-wrapper"),R)},ie(ce)):c.createElement("span",{className:R},ce,ie())},E=c.forwardRef(x);E.Dragger=d.default,E.displayName="Upload",E.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",beforeUpload:h.T,showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0};var C=E;t.default=C},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=r(n(0)),s=o(n(256)),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},c=function(e,t){var n=e.style,r=e.height,o=u(e,["style","height"]);return a.createElement(s.default,(0,i.default)({ref:t},o,{type:"drag",style:(0,i.default)((0,i.default)({},n),{height:r})}))},l=a.forwardRef(c);l.displayName="Dragger";var f=l;t.default=f},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.T=function(){return!0},t.fileToObject=function(e){return(0,o.default)((0,o.default)({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})},t.getFileItem=function(e,t){var n=void 0!==e.uid?"uid":"name";return t.filter((function(t){return t[n]===e[n]}))[0]},t.removeFileItem=function(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter((function(t){return t[n]!==e[n]}));if(r.length===t.length)return null;return r},t.previewImage=function(e){return new Promise((function(t){if(e.type&&i(e.type)){var n=document.createElement("canvas");n.width=a,n.height=a,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(a,"px; height: ").concat(a,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),o=new Image;o.onload=function(){var e=o.width,i=o.height,s=a,u=a,c=0,l=0;e>i?l=-((u=i*(a/e))-s)/2:c=-((s=e*(a/i))-u)/2,r.drawImage(o,c,l,s,u);var f=n.toDataURL();document.body.removeChild(n),t(f)},o.src=window.URL.createObjectURL(e)}else t("")}))},t.isImageUrl=void 0;var o=r(n(18));var i=function(e){return 0===e.indexOf("image/")};t.isImageUrl=function(e){if(e.type&&!e.thumbUrl)return i(e.type);var t=e.thumbUrl||e.url,n=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/"),t=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(t)||[""])[0]}(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(t)&&!n};var a=200},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=r(n(0)),s=o(n(10)),u=o(n(175)),c=o(n(583)),l=o(n(49)),f=o(n(29)),d=function(e){var t=e.icon,n=e.onCancel,r=e.onOk,o=e.close,d=e.zIndex,p=e.afterClose,h=e.visible,v=e.keyboard,m=e.centered,g=e.getContainer,y=e.maskStyle,b=e.okText,w=e.okButtonProps,x=e.cancelText,E=e.cancelButtonProps,C=e.direction,k=e.prefixCls,O=e.rootPrefixCls,S=e.bodyStyle,_=e.closable,T=void 0!==_&&_,I=e.closeIcon,P=e.modalRender,A=e.focusTriggerAfterClose;(0,l.default)(!("string"===typeof t&&t.length>2),"Modal","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(t,"` at https://ant.design/components/icon"));var R=e.okType||"primary",N="".concat(k,"-confirm"),M=!("okCancel"in e)||e.okCancel,j=e.width||416,D=e.style||{},F=void 0===e.mask||e.mask,L=void 0!==e.maskClosable&&e.maskClosable,B=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),U=e.transitionName||"zoom",z=e.maskTransitionName||"fade",V=(0,s.default)(N,"".concat(N,"-").concat(e.type),(0,i.default)({},"".concat(N,"-rtl"),"rtl"===C),e.className),W=M&&a.createElement(c.default,{actionFn:n,closeModal:o,autoFocus:"cancel"===B,buttonProps:E,prefixCls:"".concat(O,"-btn")},x);return a.createElement(u.default,{prefixCls:k,className:V,wrapClassName:(0,s.default)((0,i.default)({},"".concat(N,"-centered"),!!e.centered)),onCancel:function(){return o({triggerCancel:!0})},visible:h,title:"",transitionName:U,footer:"",maskTransitionName:z,mask:F,maskClosable:L,maskStyle:y,style:D,width:j,zIndex:d,afterClose:p,keyboard:v,centered:m,getContainer:g,closable:T,closeIcon:I,modalRender:P,focusTriggerAfterClose:A},a.createElement("div",{className:"".concat(N,"-body-wrapper")},a.createElement(f.default,{prefixCls:O},a.createElement("div",{className:"".concat(N,"-body"),style:S},t,void 0===e.title?null:a.createElement("span",{className:"".concat(N,"-title")},e.title),a.createElement("div",{className:"".concat(N,"-content")},e.content))),a.createElement("div",{className:"".concat(N,"-btns")},W,a.createElement(c.default,{type:R,actionFn:r,closeModal:o,autoFocus:"ok"===B,buttonProps:w,prefixCls:"".concat(O,"-btn")},b))))};t.default=d},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=document.createElement("div");document.body.appendChild(t);var n=(0,i.default)((0,i.default)({},e),{close:u,visible:!0});function r(){var n=s.unmountComponentAtNode(t);n&&t.parentNode&&t.parentNode.removeChild(t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.some((function(e){return e&&e.triggerCancel}));e.onCancel&&a&&e.onCancel.apply(e,o);for(var c=0;c<p.destroyFns.length;c++){var l=p.destroyFns[c];if(l===u){p.destroyFns.splice(c,1);break}}}function o(e){var n=e.okText,r=e.cancelText,o=e.prefixCls,u=v(e,["okText","cancelText","prefixCls"]);setTimeout((function(){var e=(0,d.getConfirmLocale)();s.render(a.createElement(h.default,(0,i.default)({},u,{prefixCls:o||"".concat(g(),"-modal"),rootPrefixCls:g(),okText:n||(u.okCancel?e.okText:e.justOkText),cancelText:r||e.cancelText})),t)}))}function u(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];o(n=(0,i.default)((0,i.default)({},n),{visible:!1,afterClose:r.bind.apply(r,[this].concat(t))}))}return o(n),p.destroyFns.push(u),{destroy:u,update:function(e){n="function"===typeof e?e(n):(0,i.default)((0,i.default)({},n),e);o(n)}}},t.withWarn=function(e){return(0,i.default)({type:"warning",icon:a.createElement(f.default,null),okCancel:!1},e)},t.withInfo=function(e){return(0,i.default)({type:"info",icon:a.createElement(u.default,null),okCancel:!1},e)},t.withSuccess=function(e){return(0,i.default)({type:"success",icon:a.createElement(c.default,null),okCancel:!1},e)},t.withError=function(e){return(0,i.default)({type:"error",icon:a.createElement(l.default,null),okCancel:!1},e)},t.withConfirm=function(e){return(0,i.default)({type:"confirm",icon:a.createElement(f.default,null),okCancel:!0},e)},t.globalConfig=function(e){var t=e.rootPrefixCls;t&&(m=t)};var i=o(n(18)),a=r(n(0)),s=r(n(42)),u=o(n(217)),c=o(n(214)),l=o(n(215)),f=o(n(216)),d=n(162),p=n(175),h=o(n(259)),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},m="ant";function g(){return m}},function(e,t,n){"use strict";n.r(t);var r=n(21),o=n(4),i=n(23),a=n(26),s=n(30),u=n(36),c=n(0),l=n(42),f=n.n(l),d=n(10),p=n.n(d),h=n(45),v=n(13),m=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).closeTimer=null,e.close=function(t){t&&t.stopPropagation(),e.clearCloseTimer();var n=e.props,r=n.onClose,o=n.noticeKey;r&&r(o)},e.startCloseTimer=function(){e.props.duration&&(e.closeTimer=window.setTimeout((function(){e.close()}),1e3*e.props.duration))},e.clearCloseTimer=function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(e){this.props.duration===e.duration&&this.props.updateMark===e.updateMark||this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,o=t.closable,i=t.closeIcon,a=t.style,s=t.onClick,u=t.children,l=t.holder,d="".concat(n,"-notice"),h=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{}),m=c.createElement("div",Object.assign({className:p()(d,r,Object(v.a)({},"".concat(d,"-closable"),o)),style:a,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:s},h),c.createElement("div",{className:"".concat(d,"-content")},u),o?c.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(d,"-close")},i||c.createElement("span",{className:"".concat(d,"-close-x")})):null);return l?f.a.createPortal(m,l):m}}]),n}(c.Component);m.defaultProps={onClose:function(){},duration:1.5};var g=n(17),y=n(11);var b=0,w=Date.now();function x(){var e=b;return b+=1,"rcNotification_".concat(w,"_").concat(e)}var E=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).state={notices:[]},e.hookRefs=new Map,e.add=function(t,n){var r=t.key||x(),i=Object(o.a)(Object(o.a)({},t),{},{key:r}),a=e.props.maxCount;e.setState((function(e){var t=e.notices,o=t.map((function(e){return e.notice.key})).indexOf(r),s=t.concat();return-1!==o?s.splice(o,1,{notice:i,holderCallback:n}):(a&&t.length>=a&&(i.key=s[0].notice.key,i.updateMark=x(),i.userPassKey=r,s.shift()),s.push({notice:i,holderCallback:n})),{notices:s}}))},e.remove=function(t){e.setState((function(e){return{notices:e.notices.filter((function(e){var n=e.notice,r=n.key;return(n.userPassKey||r)!==t}))}}))},e.noticePropsMap={},e}return Object(a.a)(n,[{key:"getTransitionName",value:function(){var e=this.props,t=e.prefixCls,n=e.animation,r=this.props.transitionName;return!r&&n&&(r="".concat(t,"-").concat(n)),r}},{key:"render",value:function(){var e=this,t=this.state.notices,n=this.props,r=n.prefixCls,i=n.className,a=n.closeIcon,s=n.style,u=[];return t.forEach((function(n,i){var s=n.notice,c=n.holderCallback,l=i===t.length-1?s.updateMark:void 0,f=s.key,d=s.userPassKey,p=Object(o.a)(Object(o.a)(Object(o.a)({prefixCls:r,closeIcon:a},s),s.props),{},{key:f,noticeKey:d||f,updateMark:l,onClose:function(t){var n;e.remove(t),null===(n=s.onClose)||void 0===n||n.call(s)},onClick:s.onClick,children:s.content});u.push(f),e.noticePropsMap[f]={props:p,holderCallback:c}})),c.createElement("div",{className:p()(r,i),style:s},c.createElement(h.CSSMotionList,{keys:u,motionName:this.getTransitionName(),onVisibleChanged:function(t,n){var r=n.key;t||delete e.noticePropsMap[r]}},(function(t){var n=t.key,i=t.className,a=t.style,s=e.noticePropsMap[n],u=s.props,l=s.holderCallback;return l?c.createElement("div",{key:n,className:p()(i,"".concat(r,"-hook-holder")),style:Object(o.a)({},a),ref:function(t){"undefined"!==typeof n&&(t?(e.hookRefs.set(n,t),l(t,u)):e.hookRefs.delete(n))}}):c.createElement(m,Object.assign({},u,{className:p()(i,null===u||void 0===u?void 0:u.className),style:Object(o.a)(Object(o.a)({},a),null===u||void 0===u?void 0:u.style)}))})))}}]),n}(c.Component);E.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},E.newInstance=function(e,t){var n=e||{},o=n.getContainer,i=Object(r.a)(n,["getContainer"]),a=document.createElement("div");o?o().appendChild(a):document.body.appendChild(a);var s=!1;f.a.render(c.createElement(E,Object.assign({},i,{ref:function(e){s||(s=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){f.a.unmountComponentAtNode(a),a.parentNode&&a.parentNode.removeChild(a)},useNotification:function(){return function(e){var t=c.useRef({}),n=c.useState([]),r=Object(y.a)(n,2),o=r[0],i=r[1];return[function(n){e.add(n,(function(e,n){var r=n.key;if(e&&!t.current[r]){var o=c.createElement(m,Object.assign({},n,{holder:e}));t.current[r]=o,i((function(e){return[].concat(Object(g.a)(e),[o])}))}}))},c.createElement(c.Fragment,null,o)]}(e)}}))}})),a)};var C=E;t.default=C},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(23),o=n(26),i=[],a=i.forEach,s=i.slice;function u(e){return a.call(s.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var c=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l=function(e,t,n){var r=n||{};r.path=r.path||"/";var o=e+"="+encodeURIComponent(t);if(r.maxAge>0){var i=r.maxAge-0;if(isNaN(i))throw new Error("maxAge should be a Number");o+="; Max-Age="+Math.floor(i)}if(r.domain){if(!c.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain="+r.domain}if(r.path){if(!c.test(r.path))throw new TypeError("option path is invalid");o+="; Path="+r.path}if(r.expires){if("function"!==typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"===typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},f=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=l(e,encodeURIComponent(t),o)},d=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},p={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!==typeof document){var n=d(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!==typeof document&&f(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},h={name:"querystring",lookup:function(e){var t;if("undefined"!==typeof window)for(var n=window.location.search.substring(1).split("&"),r=0;r<n.length;r++){var o=n[r].indexOf("=");if(o>0)n[r].substring(0,o)===e.lookupQuerystring&&(t=n[r].substring(o+1))}return t}},v=null,m=function(){if(null!==v)return v;try{v="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(t){v=!1}return v},g={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&m()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&m()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},y=null,b=function(){if(null!==y)return y;try{y="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(t){y=!1}return y},w={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&b()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&b()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},x={name:"navigator",lookup:function(e){var t=[];if("undefined"!==typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},E={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!==typeof document?document.documentElement:null);return n&&"function"===typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},C={name:"path",lookup:function(e){var t;if("undefined"!==typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"===typeof e.lookupFromPathIndex){if("string"!==typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},k={name:"subdomain",lookup:function(e){var t;if("undefined"!==typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(t="number"===typeof e.lookupFromSubdomainIndex?n[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Object(o.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=u(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(p),this.addDetector(h),this.addDetector(g),this.addDetector(w),this.addDetector(x),this.addDetector(E),this.addDetector(C),this.addDetector(k)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"===typeof r&&(r=[r]),r&&(n=n.concat(r))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();O.type="languageDetector",t.a=O},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(128),n(290),n(291),n(95),n(96),n(157),n(136),n(292),n(195),n(293),n(294),n(295),n(158),n(296),n(87),n(52),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),i)}()},function(e,t,n){"use strict";var r=n(313);function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidTokenError",e.exports=function(e,t){if("string"!==typeof e)throw new o("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(i){throw new o("Invalid token specified: "+i.message)}},e.exports.InvalidTokenError=o},function(e,t,n){"use strict";(function(e){function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return(a=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function s(e){var t="function"===typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return a(e,arguments,r(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,e)})(e)}var u=/%[sdj%]/g,c=function(){};function l(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,o=t[0],i=t.length;if("function"===typeof o)return o.apply(null,t.slice(1));if("string"===typeof o){var a=String(o).replace(u,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(n){return"[Circular]"}break;default:return e}}));return a}return o}function d(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!==typeof e||e))}function p(e,t,n){var r=0,o=e.length;!function i(a){if(a&&a.length)n(a);else{var s=r;r+=1,s<o?t(e[s],i):n([])}}([])}"undefined"!==typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0});var h=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(s(Error));function v(e,t,n,r){if(t.first){var o=new Promise((function(t,o){p(function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n])})),t}(e),n,(function(e){return r(e),e.length?o(new h(e,l(e))):t()}))}));return o.catch((function(e){return e})),o}var i=t.firstFields||[];!0===i&&(i=Object.keys(e));var a=Object.keys(e),s=a.length,u=0,c=[],f=new Promise((function(t,o){var f=function(e){if(c.push.apply(c,e),++u===s)return r(c),c.length?o(new h(c,l(c))):t()};a.length||(r(c),t()),a.forEach((function(t){var r=e[t];-1!==i.indexOf(t)?p(r,n,f):function(e,t,n){var r=[],o=0,i=e.length;function a(e){r.push.apply(r,e),++o===i&&n(r)}e.forEach((function(e){t(e,a)}))}(r,n,f)}))}));return f.catch((function(e){return e})),f}function m(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"===typeof t?t():t,field:t.field||e.fullField}}}function g(e,t){if(t)for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];"object"===typeof o&&"object"===typeof e[r]?e[r]=n(n({},e[r]),o):e[r]=o}return e}function y(e,t,n,r,o,i){!e.required||n.hasOwnProperty(e.field)&&!d(t,i||e.type)||r.push(f(o.messages.required,e.fullField))}var b={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},w={integer:function(e){return w.number(e)&&parseInt(e,10)===e},float:function(e){return w.number(e)&&!w.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===typeof e&&!w.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&!!e.match(b.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(b.url)},hex:function(e){return"string"===typeof e&&!!e.match(b.hex)}};var x={required:y,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(f(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t)y(e,t,n,r,o);else{var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?w[i](t)||r.push(f(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&r.push(f(o.messages.types[i],e.fullField,e.type))}},range:function(e,t,n,r,o){var i="number"===typeof e.len,a="number"===typeof e.min,s="number"===typeof e.max,u=t,c=null,l="number"===typeof t,d="string"===typeof t,p=Array.isArray(t);if(l?c="number":d?c="string":p&&(c="array"),!c)return!1;p&&(u=t.length),d&&(u=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?u!==e.len&&r.push(f(o.messages[c].len,e.fullField,e.len)):a&&!s&&u<e.min?r.push(f(o.messages[c].min,e.fullField,e.min)):s&&!a&&u>e.max?r.push(f(o.messages[c].max,e.fullField,e.max)):a&&s&&(u<e.min||u>e.max)&&r.push(f(o.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&r.push(f(o.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,r,o){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(f(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(f(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function E(e,t,n,r,o){var i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t,i)&&!e.required)return n();x.required(e,t,r,a,o,i),d(t,i)||x.type(e,t,r,a,o)}n(a)}var C={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t,"string")&&!e.required)return n();x.required(e,t,r,i,o,"string"),d(t,"string")||(x.type(e,t,r,i,o),x.range(e,t,r,i,o),x.pattern(e,t,r,i,o),!0===e.whitespace&&x.whitespace(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&x.type(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&(x.type(e,t,r,i,o),x.range(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&x.type(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),d(t)||x.type(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&(x.type(e,t,r,i,o),x.range(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&(x.type(e,t,r,i,o),x.range(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if((void 0===t||null===t)&&!e.required)return n();x.required(e,t,r,i,o,"array"),void 0!==t&&null!==t&&(x.type(e,t,r,i,o),x.range(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&x.type(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o),void 0!==t&&x.enum(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t,"string")&&!e.required)return n();x.required(e,t,r,i,o),d(t,"string")||x.pattern(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t,"date")&&!e.required)return n();var a;if(x.required(e,t,r,i,o),!d(t,"date"))a=t instanceof Date?t:new Date(t),x.type(e,a,r,i,o),a&&x.range(e,a.getTime(),r,i,o)}n(i)},url:E,hex:E,email:E,required:function(e,t,n,r,o){var i=[],a=Array.isArray(t)?"array":typeof t;x.required(e,t,r,i,o,a),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();x.required(e,t,r,i,o)}n(i)}};function k(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var O=k();function S(e){this.rules=null,this._messages=O,this.define(e)}S.prototype={messages:function(e){return e&&(this._messages=g(k(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==typeof e||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var i,a,s=e,u=t,c=r;if("function"===typeof u&&(c=u,u={}),!this.rules||0===Object.keys(this.rules).length)return c&&c(),Promise.resolve();if(u.messages){var d=this.messages();d===O&&(d=k()),g(d,u.messages),u.messages=d}else u.messages=this.messages();var p={};(u.keys||Object.keys(this.rules)).forEach((function(t){i=o.rules[t],a=s[t],i.forEach((function(r){var i=r;"function"===typeof i.transform&&(s===e&&(s=n({},s)),a=s[t]=i.transform(a)),(i="function"===typeof i?{validator:i}:n({},i)).validator=o.getValidationMethod(i),i.field=t,i.fullField=i.fullField||t,i.type=o.getType(i),i.validator&&(p[t]=p[t]||[],p[t].push({rule:i,value:a,source:s,field:t}))}))}));var h={};return v(p,u,(function(e,t){var r,o=e.rule,i=("object"===o.type||"array"===o.type)&&("object"===typeof o.fields||"object"===typeof o.defaultField);function a(e,t){return n(n({},t),{},{fullField:o.fullField+"."+e})}function s(r){void 0===r&&(r=[]);var s=r;if(Array.isArray(s)||(s=[s]),!u.suppressWarning&&s.length&&S.warning("async-validator:",s),s.length&&void 0!==o.message&&(s=[].concat(o.message)),s=s.map(m(o)),u.first&&s.length)return h[o.field]=1,t(s);if(i){if(o.required&&!e.value)return void 0!==o.message?s=[].concat(o.message).map(m(o)):u.error&&(s=[u.error(o,f(u.messages.required,o.field))]),t(s);var c={};if(o.defaultField)for(var l in e.value)e.value.hasOwnProperty(l)&&(c[l]=o.defaultField);for(var d in c=n(n({},c),e.rule.fields))if(c.hasOwnProperty(d)){var p=Array.isArray(c[d])?c[d]:[c[d]];c[d]=p.map(a.bind(null,d))}var v=new S(c);v.messages(u.messages),e.rule.options&&(e.rule.options.messages=u.messages,e.rule.options.error=u.error),v.validate(e.value,e.rule.options||u,(function(e){var n=[];s&&s.length&&n.push.apply(n,s),e&&e.length&&n.push.apply(n,e),t(n.length?n:null)}))}else t(s)}i=i&&(o.required||!o.required&&e.value),o.field=e.field,o.asyncValidator?r=o.asyncValidator(o,e.value,s,e.source,u):o.validator&&(!0===(r=o.validator(o,e.value,s,e.source,u))?s():!1===r?s(o.message||o.field+" fails"):r instanceof Array?s(r):r instanceof Error&&s(r.message)),r&&r.then&&r.then((function(){return s()}),(function(e){return s(e)}))}),(function(e){!function(e){var t,n=[],r={};function o(e){var t;Array.isArray(e)?n=(t=n).concat.apply(t,e):n.push(e)}for(t=0;t<e.length;t++)o(e[t]);n.length?r=l(n):(n=null,r=null),c(n,r)}(e)}))},getType:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!==typeof e.validator&&e.type&&!C.hasOwnProperty(e.type))throw new Error(f("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if("function"===typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?C.required:C[this.getType(e)]||!1}},S.register=function(e,t){if("function"!==typeof t)throw new Error("Cannot register a validator by type, validator is not a function");C[e]=t},S.warning=c,S.messages=O,S.validators=C,t.a=S}).call(this,n(108))},function(e,t,n){var r=n(385),o=n(386),i=n(387),a=n(389);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(246).Row;t.default=r},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=r(n(0)),u=o(n(10)),c=n(29),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},f=function(e){return s.createElement(c.ConfigConsumer,null,(function(t){var n,r=t.getPrefixCls,o=t.direction,c=e.prefixCls,f=e.type,d=void 0===f?"horizontal":f,p=e.orientation,h=void 0===p?"center":p,v=e.className,m=e.children,g=e.dashed,y=e.plain,b=l(e,["prefixCls","type","orientation","className","children","dashed","plain"]),w=r("divider",c),x=h.length>0?"-".concat(h):h,E=!!m,C=(0,u.default)(w,"".concat(w,"-").concat(d),(n={},(0,a.default)(n,"".concat(w,"-with-text"),E),(0,a.default)(n,"".concat(w,"-with-text").concat(x),E),(0,a.default)(n,"".concat(w,"-dashed"),!!g),(0,a.default)(n,"".concat(w,"-plain"),!!y),(0,a.default)(n,"".concat(w,"-rtl"),"rtl"===o),n),v);return s.createElement("div",(0,i.default)({className:C},b,{role:"separator"}),m&&s.createElement("span",{className:"".concat(w,"-inner-text")},m))}))};t.default=f},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(252)),i=r(n(524)),a=r(n(542)),s=r(n(543)),u=r(n(544)),c=o.default;c.Text=i.default,c.Link=a.default,c.Title=s.default,c.Paragraph=u.default;var l=c;t.default=l},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(66)),u=o(n(69)),c=o(n(70)),l=o(n(71)),f=r(n(0)),d=o(n(10)),p=o(n(53)),h=o(n(586)),v=n(29),m=n(77),g=n(76),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},b=((0,m.tuple)("small","default","large"),null);var w=function(e){(0,c.default)(n,e);var t=(0,l.default)(n);function n(e){var r;(0,s.default)(this,n),(r=t.call(this,e)).debouncifyUpdateSpinning=function(e){var t=(e||r.props).delay;t&&(r.cancelExistingSpin(),r.updateSpinning=(0,h.default)(r.originalUpdateSpinning,t))},r.updateSpinning=function(){var e=r.props.spinning;r.state.spinning!==e&&r.setState({spinning:e})},r.renderSpin=function(e){var t,n=e.getPrefixCls,o=e.direction,s=r.props,u=s.prefixCls,c=s.className,l=s.size,h=s.tip,v=s.wrapperClassName,m=s.style,w=y(s,["prefixCls","className","size","tip","wrapperClassName","style"]),x=r.state.spinning,E=n("spin",u),C=(0,d.default)(E,(t={},(0,a.default)(t,"".concat(E,"-sm"),"small"===l),(0,a.default)(t,"".concat(E,"-lg"),"large"===l),(0,a.default)(t,"".concat(E,"-spinning"),x),(0,a.default)(t,"".concat(E,"-show-text"),!!h),(0,a.default)(t,"".concat(E,"-rtl"),"rtl"===o),t),c),k=(0,p.default)(w,["spinning","delay","indicator"]),O=f.createElement("div",(0,i.default)({},k,{style:m,className:C}),function(e,t){var n=t.indicator,r="".concat(e,"-dot");return null===n?null:(0,g.isValidElement)(n)?(0,g.cloneElement)(n,{className:(0,d.default)(n.props.className,r)}):(0,g.isValidElement)(b)?(0,g.cloneElement)(b,{className:(0,d.default)(b.props.className,r)}):f.createElement("span",{className:(0,d.default)(r,"".concat(e,"-dot-spin"))},f.createElement("i",{className:"".concat(e,"-dot-item")}),f.createElement("i",{className:"".concat(e,"-dot-item")}),f.createElement("i",{className:"".concat(e,"-dot-item")}),f.createElement("i",{className:"".concat(e,"-dot-item")}))}(E,r.props),h?f.createElement("div",{className:"".concat(E,"-text")},h):null);if(r.isNestedPattern()){var S=(0,d.default)("".concat(E,"-container"),(0,a.default)({},"".concat(E,"-blur"),x));return f.createElement("div",(0,i.default)({},k,{className:(0,d.default)("".concat(E,"-nested-loading"),v)}),x&&f.createElement("div",{key:"loading"},O),f.createElement("div",{className:S,key:"container"},r.props.children))}return O};var o=e.spinning,u=function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(o,e.delay);return r.state={spinning:o&&!u},r.originalUpdateSpinning=r.updateSpinning,r.debouncifyUpdateSpinning(e),r}return(0,u.default)(n,[{key:"componentDidMount",value:function(){this.updateSpinning()}},{key:"componentDidUpdate",value:function(){this.debouncifyUpdateSpinning(),this.updateSpinning()}},{key:"componentWillUnmount",value:function(){this.cancelExistingSpin()}},{key:"cancelExistingSpin",value:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()}},{key:"isNestedPattern",value:function(){return!(!this.props||"undefined"===typeof this.props.children)}},{key:"render",value:function(){return f.createElement(v.ConfigConsumer,null,this.renderSpin)}}],[{key:"setDefaultIndicator",value:function(e){b=e}}]),n}(f.Component);w.defaultProps={spinning:!0,size:"default",wrapperClassName:""};var x=w;t.default=x},function(e,t,n){},function(e,t,n){"use strict";var r=n(183),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,m="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function x(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var C=E.prototype=new x;C.constructor=E,r(C,w.prototype),C.isPureReactComponent=!0;var k={current:null},O=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)O.call(t,r)&&!S.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:k.current}}function T(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var I=/\/+/g,P=[];function A(e,t,n,r){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function N(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+j(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=t+j(o=e[u],u);s+=N(o,c,n,r)}else if(null===e||"object"!==typeof e?c=null:c="function"===typeof(c=m&&e[m]||e["@@iterator"])?c:null,"function"===typeof c)for(e=c.call(e),u=0;!(o=e.next()).done;)s+=N(o=o.value,c=t+j(o,u++),n,r);else if("object"===o)throw n=""+e,Error(g(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function M(e,t,n){return null==e?0:N(e,"",t,n)}function j(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(I,"$&/")+"/")+n)),r.push(e))}function L(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(I,"$&/")+"/"),M(e,F,t=A(t,i,r,o)),R(t)}var B={current:null};function U(){var e=B.current;if(null===e)throw Error(g(321));return e}var z={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;M(e,D,t=A(null,null,t,n)),R(t)},count:function(e){return M(e,(function(){return null}),null)},toArray:function(e){var t=[];return L(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(g(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=E,t.StrictMode=u,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(g(267,e));var o=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)O.call(t,l)&&!S.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return U().useCallback(e,t)},t.useContext=function(e,t){return U().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return U().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return U().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return U().useLayoutEffect(e,t)},t.useMemo=function(e,t){return U().useMemo(e,t)},t.useReducer=function(e,t,n){return U().useReducer(e,t,n)},t.useRef=function(e){return U().useRef(e)},t.useState=function(e){return U().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";var r=n(0),o=n(183),i=n(277);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var u=!1,c=null,l=!1,f=null,d={onError:function(e){u=!0,c=e}};function p(e,t,n,r,o,i,a,l,f){u=!1,c=null,s.apply(d,arguments)}var h=null,v=null,m=null;function g(e,t,n){var r=e.type||"unknown-event";e.currentTarget=m(n),function(e,t,n,r,o,i,s,d,h){if(p.apply(this,arguments),u){if(!u)throw Error(a(198));var v=c;u=!1,c=null,l||(l=!0,f=v)}}(r,t,void 0,e),e.currentTarget=null}var y=null,b={};function w(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var o=void 0,i=n[r],s=t,u=r;if(C.hasOwnProperty(u))throw Error(a(99,u));C[u]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&x(c[o],s,u);o=!0}else i.registrationName?(x(i.registrationName,s,u),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function x(e,t,n){if(k[e])throw Error(a(100,e));k[e]=t,O[e]=t.eventTypes[n].dependencies}var E=[],C={},k={},O={};function S(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var _=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),T=null,I=null,P=null;function A(e){if(e=v(e)){if("function"!==typeof T)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),T(e.stateNode,e.type,t))}}function R(e){I?P?P.push(e):P=[e]:I=e}function N(){if(I){var e=I,t=P;if(P=I=null,A(e),t)for(e=0;e<t.length;e++)A(t[e])}}function M(e,t){return e(t)}function j(e,t,n,r,o){return e(t,n,r,o)}function D(){}var F=M,L=!1,B=!1;function U(){null===I&&null===P||(D(),N())}function z(e,t,n){if(B)return e(t,n);B=!0;try{return F(e,t,n)}finally{B=!1,U()}}var V=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,W=Object.prototype.hasOwnProperty,H={},$={};function q(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){K[e]=new q(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];K[t]=new q(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){K[e]=new q(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){K[e]=new q(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){K[e]=new q(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){K[e]=new q(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){K[e]=new q(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){K[e]=new q(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){K[e]=new q(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function X(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,X);K[t]=new q(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,X);K[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,X);K[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){K[e]=new q(e,1,!1,e.toLowerCase(),null,!1)})),K.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){K[e]=new q(e,1,!1,e.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function J(e,t,n,r){var o=K.hasOwnProperty(t)?K[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!W.call($,e)||!W.call(H,e)&&(V.test(e)?$[e]=!0:(H[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var Q=/^(.*)[\\\/]/,Z="function"===typeof Symbol&&Symbol.for,ee=Z?Symbol.for("react.element"):60103,te=Z?Symbol.for("react.portal"):60106,ne=Z?Symbol.for("react.fragment"):60107,re=Z?Symbol.for("react.strict_mode"):60108,oe=Z?Symbol.for("react.profiler"):60114,ie=Z?Symbol.for("react.provider"):60109,ae=Z?Symbol.for("react.context"):60110,se=Z?Symbol.for("react.concurrent_mode"):60111,ue=Z?Symbol.for("react.forward_ref"):60112,ce=Z?Symbol.for("react.suspense"):60113,le=Z?Symbol.for("react.suspense_list"):60120,fe=Z?Symbol.for("react.memo"):60115,de=Z?Symbol.for("react.lazy"):60116,pe=Z?Symbol.for("react.block"):60121,he="function"===typeof Symbol&&Symbol.iterator;function ve(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=he&&e[he]||e["@@iterator"])?e:null}function me(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case le:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return me(e.type);case pe:return me(e.render);case de:if(e=1===e._status?e._result:null)return me(e)}return null}function ge(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=me(e.type);n=null,r&&(n=me(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Q,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ce(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ke(e,t){null!=(t=t.checked)&&J(e,"checked",t,!1)}function Oe(e,t){ke(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?_e(e,t.type,n):t.hasOwnProperty("defaultValue")&&_e(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function _e(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Te(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ie(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Pe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Re(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ne(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Me="http://www.w3.org/1999/xhtml",je="http://www.w3.org/2000/svg";function De(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?De(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Le,Be,Ue=(Be=function(e,t){if(e.namespaceURI!==je||"innerHTML"in e)e.innerHTML=t;else{for((Le=Le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return Be(e,t)}))}:Be);function ze(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ve(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},He={},$e={};function qe(e){if(He[e])return He[e];if(!We[e])return e;var t,n=We[e];for(t in n)if(n.hasOwnProperty(t)&&t in $e)return He[e]=n[t];return e}_&&($e=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);var Ke=qe("animationend"),Ge=qe("animationiteration"),Xe=qe("animationstart"),Ye=qe("transitionend"),Je="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qe=new("function"===typeof WeakMap?WeakMap:Map);function Ze(e){var t=Qe.get(e);return void 0===t&&(t=new Map,Qe.set(e,t)),t}function et(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function tt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function nt(e){if(et(e)!==e)throw Error(a(188))}function rt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=et(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return nt(o),e;if(i===r)return nt(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function ot(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function it(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var at=null;function st(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)g(e,t[r],n[r]);else t&&g(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function ut(e){if(null!==e&&(at=ot(at,e)),e=at,at=null,e){if(it(e,st),at)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function ct(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function lt(e){if(!_)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"===typeof t[e]),t}var ft=[];function dt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ft.length&&ft.push(e)}function pt(e,t,n,r){if(ft.length){var o=ft.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function ht(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=An(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=ct(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<E.length;u++){var c=E[u];c&&(c=c.extractEvents(r,t,i,o,a))&&(s=ot(s,c))}ut(s)}}function vt(e,t,n){if(!n.has(e)){switch(e){case"scroll":Xt(t,"scroll",!0);break;case"focus":case"blur":Xt(t,"focus",!0),Xt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":lt(e)&&Xt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Je.indexOf(e)&&Gt(e,t)}n.set(e,null)}}var mt,gt,yt,bt=!1,wt=[],xt=null,Et=null,Ct=null,kt=new Map,Ot=new Map,St=[],_t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Tt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function It(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Pt(e,t){switch(e){case"focus":case"blur":xt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":Ct=null;break;case"pointerover":case"pointerout":kt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function At(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=It(t,n,r,o,i),null!==t&&(null!==(t=Rn(t))&&gt(t)),e):(e.eventSystemFlags|=r,e)}function Rt(e){var t=An(e.target);if(null!==t){var n=et(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=tt(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){yt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Rn(t);return null!==n&&gt(n),e.blockedOn=t,!1}return!0}function Mt(e,t,n){Nt(e)&&n.delete(t)}function jt(){for(bt=!1;0<wt.length;){var e=wt[0];if(null!==e.blockedOn){null!==(e=Rn(e.blockedOn))&&mt(e);break}var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:wt.shift()}null!==xt&&Nt(xt)&&(xt=null),null!==Et&&Nt(Et)&&(Et=null),null!==Ct&&Nt(Ct)&&(Ct=null),kt.forEach(Mt),Ot.forEach(Mt)}function Dt(e,t){e.blockedOn===t&&(e.blockedOn=null,bt||(bt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jt)))}function Ft(e){function t(t){return Dt(t,e)}if(0<wt.length){Dt(wt[0],e);for(var n=1;n<wt.length;n++){var r=wt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==xt&&Dt(xt,e),null!==Et&&Dt(Et,e),null!==Ct&&Dt(Ct,e),kt.forEach(t),Ot.forEach(t),n=0;n<St.length;n++)(r=St[n]).blockedOn===e&&(r.blockedOn=null);for(;0<St.length&&null===(n=St[0]).blockedOn;)Rt(n),null===n.blockedOn&&St.shift()}var Lt={},Bt=new Map,Ut=new Map,zt=["abort","abort",Ke,"animationEnd",Ge,"animationIteration",Xe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ye,"transitionEnd","waiting","waiting"];function Vt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Ut.set(r,t),Bt.set(r,i),Lt[o]=i}}Vt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Vt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Vt(zt,2);for(var Wt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ht=0;Ht<Wt.length;Ht++)Ut.set(Wt[Ht],0);var $t=i.unstable_UserBlockingPriority,qt=i.unstable_runWithPriority,Kt=!0;function Gt(e,t){Xt(t,e,!1)}function Xt(e,t,n){var r=Ut.get(t);switch(void 0===r?2:r){case 0:r=Yt.bind(null,t,1,e);break;case 1:r=Jt.bind(null,t,1,e);break;default:r=Qt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Yt(e,t,n,r){L||D();var o=Qt,i=L;L=!0;try{j(o,e,t,n,r)}finally{(L=i)||U()}}function Jt(e,t,n,r){qt($t,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){if(Kt)if(0<wt.length&&-1<_t.indexOf(e))e=It(null,e,t,n,r),wt.push(e);else{var o=Zt(e,t,n,r);if(null===o)Pt(e,r);else if(-1<_t.indexOf(e))e=It(o,e,t,n,r),wt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return xt=At(xt,e,t,n,r,o),!0;case"dragenter":return Et=At(Et,e,t,n,r,o),!0;case"mouseover":return Ct=At(Ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return kt.set(i,At(kt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ot.set(i,At(Ot.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Pt(e,r),e=pt(e,r,null,t);try{z(ht,e)}finally{dt(e)}}}}function Zt(e,t,n,r){if(null!==(n=An(n=ct(r)))){var o=et(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=tt(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=pt(e,r,n,t);try{z(ht,e)}finally{dt(e)}return null}var en={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tn=["Webkit","ms","Moz","O"];function nn(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||en.hasOwnProperty(e)&&en[e]?(""+t).trim():t+"px"}function rn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=nn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(en).forEach((function(e){tn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),en[t]=en[e]}))}));var on=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(e,t){if(t){if(on[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62,""))}}function sn(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var un=Me;function cn(e,t){var n=Ze(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=O[t];for(var r=0;r<t.length;r++)vt(t[r],e,n)}function ln(){}function fn(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function dn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pn(e,t){var n,r=dn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dn(r)}}function hn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vn(){for(var e=window,t=fn();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=fn((e=t.contentWindow).document)}return t}function mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gn="$?",yn="$!",bn=null,wn=null;function xn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function En(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Cn="function"===typeof setTimeout?setTimeout:void 0,kn="function"===typeof clearTimeout?clearTimeout:void 0;function On(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Sn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===yn||n===gn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var _n=Math.random().toString(36).slice(2),Tn="__reactInternalInstance$"+_n,In="__reactEventHandlers$"+_n,Pn="__reactContainere$"+_n;function An(e){var t=e[Tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[Tn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Sn(e);null!==e;){if(n=e[Tn])return n;e=Sn(e)}return t}n=(e=n).parentNode}return null}function Rn(e){return!(e=e[Tn]||e[Pn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Nn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Mn(e){return e[In]||null}function jn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Dn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}function Fn(e,t,n){(t=Dn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=ot(n._dispatchListeners,t),n._dispatchInstances=ot(n._dispatchInstances,e))}function Ln(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=jn(t);for(t=n.length;0<t--;)Fn(n[t],"captured",e);for(t=0;t<n.length;t++)Fn(n[t],"bubbled",e)}}function Bn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Dn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=ot(n._dispatchListeners,t),n._dispatchInstances=ot(n._dispatchInstances,e))}function Un(e){e&&e.dispatchConfig.registrationName&&Bn(e._targetInst,null,e)}function zn(e){it(e,Ln)}var Vn=null,Wn=null,Hn=null;function $n(){if(Hn)return Hn;var e,t,n=Wn,r=n.length,o="value"in Vn?Vn.value:Vn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Hn=o.slice(e,1<t?1-t:void 0)}function qn(){return!0}function Kn(){return!1}function Gn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?qn:Kn,this.isPropagationStopped=Kn,this}function Xn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Yn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Jn(e){e.eventPool=[],e.getPooled=Xn,e.release=Yn}o(Gn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=qn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=qn)},persist:function(){this.isPersistent=qn},isPersistent:Kn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Kn,this._dispatchInstances=this._dispatchListeners=null}}),Gn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Gn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Jn(n),n},Jn(Gn);var Qn=Gn.extend({data:null}),Zn=Gn.extend({data:null}),er=[9,13,27,32],tr=_&&"CompositionEvent"in window,nr=null;_&&"documentMode"in document&&(nr=document.documentMode);var rr=_&&"TextEvent"in window&&!nr,or=_&&(!tr||nr&&8<nr&&11>=nr),ir=String.fromCharCode(32),ar={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},sr=!1;function ur(e,t){switch(e){case"keyup":return-1!==er.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function cr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var lr=!1;var fr={eventTypes:ar,extractEvents:function(e,t,n,r){var o;if(tr)e:{switch(e){case"compositionstart":var i=ar.compositionStart;break e;case"compositionend":i=ar.compositionEnd;break e;case"compositionupdate":i=ar.compositionUpdate;break e}i=void 0}else lr?ur(e,n)&&(i=ar.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=ar.compositionStart);return i?(or&&"ko"!==n.locale&&(lr||i!==ar.compositionStart?i===ar.compositionEnd&&lr&&(o=$n()):(Wn="value"in(Vn=r)?Vn.value:Vn.textContent,lr=!0)),i=Qn.getPooled(i,t,n,r),o?i.data=o:null!==(o=cr(n))&&(i.data=o),zn(i),o=i):o=null,(e=rr?function(e,t){switch(e){case"compositionend":return cr(t);case"keypress":return 32!==t.which?null:(sr=!0,ir);case"textInput":return(e=t.data)===ir&&sr?null:e;default:return null}}(e,n):function(e,t){if(lr)return"compositionend"===e||!tr&&ur(e,t)?(e=$n(),Hn=Wn=Vn=null,lr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return or&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Zn.getPooled(ar.beforeInput,t,n,r)).data=e,zn(t)):t=null,null===o?t:null===t?o:[o,t]}},dr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!dr[e.type]:"textarea"===t}var hr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function vr(e,t,n){return(e=Gn.getPooled(hr.change,e,t,n)).type="change",R(n),zn(e),e}var mr=null,gr=null;function yr(e){ut(e)}function br(e){if(xe(Nn(e)))return e}function wr(e,t){if("change"===e)return t}var xr=!1;function Er(){mr&&(mr.detachEvent("onpropertychange",Cr),gr=mr=null)}function Cr(e){if("value"===e.propertyName&&br(gr))if(e=vr(gr,e,ct(e)),L)ut(e);else{L=!0;try{M(yr,e)}finally{L=!1,U()}}}function kr(e,t,n){"focus"===e?(Er(),gr=n,(mr=t).attachEvent("onpropertychange",Cr)):"blur"===e&&Er()}function Or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return br(gr)}function Sr(e,t){if("click"===e)return br(t)}function _r(e,t){if("input"===e||"change"===e)return br(t)}_&&(xr=lt("input")&&(!document.documentMode||9<document.documentMode));var Tr={eventTypes:hr,_isInputEventSupported:xr,extractEvents:function(e,t,n,r){var o=t?Nn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=wr;else if(pr(o))if(xr)a=_r;else{a=Or;var s=kr}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Sr);if(a&&(a=a(e,t)))return vr(a,n,r);s&&s(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&_e(o,"number",o.value)}},Ir=Gn.extend({view:null,detail:null}),Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ar(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Rr(){return Ar}var Nr=0,Mr=0,jr=!1,Dr=!1,Fr=Ir.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Rr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Nr;return Nr=e.screenX,jr?"mousemove"===e.type?e.screenX-t:0:(jr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Mr;return Mr=e.screenY,Dr?"mousemove"===e.type?e.screenY-t:0:(Dr=!0,0)}}),Lr=Fr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Br={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ur={eventTypes:Br,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0===(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?An(t):null)&&(t!==et(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Fr,u=Br.mouseLeave,c=Br.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Lr,u=Br.pointerLeave,c=Br.pointerEnter,l="pointer");if(e=null==a?i:Nn(a),i=null==t?i:Nn(t),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=e,u.relatedTarget=i,(n=s.getPooled(c,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(c=l,a=0,e=s=r;e;e=jn(e))a++;for(e=0,t=c;t;t=jn(t))e++;for(;0<a-e;)s=jn(s),a--;for(;0<e-a;)c=jn(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=jn(s),c=jn(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=jn(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=jn(l);for(l=0;l<s.length;l++)Bn(s[l],"bubbled",u);for(l=r.length;0<l--;)Bn(r[l],"captured",n);return 0===(64&o)?[u]:[u,n]}};var zr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Vr=Object.prototype.hasOwnProperty;function Wr(e,t){if(zr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Vr.call(t,n[r])||!zr(e[n[r]],t[n[r]]))return!1;return!0}var Hr=_&&"documentMode"in document&&11>=document.documentMode,$r={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},qr=null,Kr=null,Gr=null,Xr=!1;function Yr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Xr||null==qr||qr!==fn(n)?null:("selectionStart"in(n=qr)&&mn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Gr&&Wr(Gr,n)?null:(Gr=n,(e=Gn.getPooled($r.select,Kr,e,t)).type="select",e.target=qr,zn(e),e))}var Jr={eventTypes:$r,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Ze(o),i=O.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Nn(t):window,e){case"focus":(pr(o)||"true"===o.contentEditable)&&(qr=o,Kr=t,Gr=null);break;case"blur":Gr=Kr=qr=null;break;case"mousedown":Xr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Xr=!1,Yr(n,r);case"selectionchange":if(Hr)break;case"keydown":case"keyup":return Yr(n,r)}return null}},Qr=Gn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zr=Gn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eo=Ir.extend({relatedTarget:null});function to(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var no={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ro={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},oo=Ir.extend({key:function(e){if(e.key){var t=no[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=to(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ro[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Rr,charCode:function(e){return"keypress"===e.type?to(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?to(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),io=Fr.extend({dataTransfer:null}),ao=Ir.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Rr}),so=Gn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),uo=Fr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),co={eventTypes:Lt,extractEvents:function(e,t,n,r){var o=Bt.get(e);if(!o)return null;switch(e){case"keypress":if(0===to(n))return null;case"keydown":case"keyup":e=oo;break;case"blur":case"focus":e=eo;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Fr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=io;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ao;break;case Ke:case Ge:case Xe:e=Qr;break;case Ye:e=so;break;case"scroll":e=Ir;break;case"wheel":e=uo;break;case"copy":case"cut":case"paste":e=Zr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Lr;break;default:e=Gn}return zn(t=e.getPooled(o,t,n,r)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=Mn,v=Rn,m=Nn,S({SimpleEventPlugin:co,EnterLeaveEventPlugin:Ur,ChangeEventPlugin:Tr,SelectEventPlugin:Jr,BeforeInputEventPlugin:fr});var lo=[],fo=-1;function po(e){0>fo||(e.current=lo[fo],lo[fo]=null,fo--)}function ho(e,t){fo++,lo[fo]=e.current,e.current=t}var vo={},mo={current:vo},go={current:!1},yo=vo;function bo(e,t){var n=e.type.contextTypes;if(!n)return vo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function wo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function xo(){po(go),po(mo)}function Eo(e,t,n){if(mo.current!==vo)throw Error(a(168));ho(mo,t),ho(go,n)}function Co(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,me(t)||"Unknown",i));return o({},n,{},r)}function ko(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vo,yo=mo.current,ho(mo,e),ho(go,go.current),!0}function Oo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Co(e,t,yo),r.__reactInternalMemoizedMergedChildContext=e,po(go),po(mo),ho(mo,e)):po(go),ho(go,n)}var So=i.unstable_runWithPriority,_o=i.unstable_scheduleCallback,To=i.unstable_cancelCallback,Io=i.unstable_requestPaint,Po=i.unstable_now,Ao=i.unstable_getCurrentPriorityLevel,Ro=i.unstable_ImmediatePriority,No=i.unstable_UserBlockingPriority,Mo=i.unstable_NormalPriority,jo=i.unstable_LowPriority,Do=i.unstable_IdlePriority,Fo={},Lo=i.unstable_shouldYield,Bo=void 0!==Io?Io:function(){},Uo=null,zo=null,Vo=!1,Wo=Po(),Ho=1e4>Wo?Po:function(){return Po()-Wo};function $o(){switch(Ao()){case Ro:return 99;case No:return 98;case Mo:return 97;case jo:return 96;case Do:return 95;default:throw Error(a(332))}}function qo(e){switch(e){case 99:return Ro;case 98:return No;case 97:return Mo;case 96:return jo;case 95:return Do;default:throw Error(a(332))}}function Ko(e,t){return e=qo(e),So(e,t)}function Go(e,t,n){return e=qo(e),_o(e,t,n)}function Xo(e){return null===Uo?(Uo=[e],zo=_o(Ro,Jo)):Uo.push(e),Fo}function Yo(){if(null!==zo){var e=zo;zo=null,To(e)}Jo()}function Jo(){if(!Vo&&null!==Uo){Vo=!0;var e=0;try{var t=Uo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Uo=null}catch(n){throw null!==Uo&&(Uo=Uo.slice(e+1)),_o(Ro,Yo),n}finally{Vo=!1}}}function Qo(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Zo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var ei={current:null},ti=null,ni=null,ri=null;function oi(){ri=ni=ti=null}function ii(e){var t=ei.current;po(ei),e.type._context._currentValue=t}function ai(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function si(e,t){ti=e,ri=ni=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Ma=!0),e.firstContext=null)}function ui(e,t){if(ri!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ri=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ni){if(null===ti)throw Error(a(308));ni=t,ti.dependencies={expirationTime:0,firstContext:t,responders:null}}else ni=ni.next=t;return e._currentValue}var ci=!1;function li(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function fi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function di(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function pi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function hi(e,t){var n=e.alternate;null!==n&&fi(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function vi(e,t,n,r){var i=e.updateQueue;ci=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,i.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var c=i.baseState,l=0,f=null,d=null,p=null;if(null!==u)for(var h=u;;){if((s=h.expirationTime)<r){var v={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===p?(d=p=v,f=c):p=p.next=v,s>l&&(l=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),pu(s,h.suspenseConfig);e:{var m=e,g=h;switch(s=t,v=n,g.tag){case 1:if("function"===typeof(m=g.payload)){c=m.call(v,c,s);break e}c=m;break e;case 3:m.effectTag=-4097&m.effectTag|64;case 0:if(null===(s="function"===typeof(m=g.payload)?m.call(v,c,s):m)||void 0===s)break e;c=o({},c,s);break e;case 2:ci=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===u){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=u,i.baseQueue=a=s,i.shared.pending=null}}null===p?f=c:p.next=d,i.baseState=f,i.baseQueue=p,hu(l),e.expirationTime=l,e.memoizedState=c}}function mi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!==typeof r)throw Error(a(191,r));r.call(o)}}}var gi=Y.ReactCurrentBatchConfig,yi=(new r.Component).refs;function bi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var wi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&et(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=eu(),o=gi.suspense;(o=di(r=tu(r,e,o),o)).payload=t,void 0!==n&&null!==n&&(o.callback=n),pi(e,o),nu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=eu(),o=gi.suspense;(o=di(r=tu(r,e,o),o)).tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),pi(e,o),nu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=eu(),r=gi.suspense;(r=di(n=tu(n,e,r),r)).tag=2,void 0!==t&&null!==t&&(r.callback=t),pi(e,r),nu(e,n)}};function xi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Wr(n,r)||!Wr(o,i))}function Ei(e,t,n){var r=!1,o=vo,i=t.contextType;return"object"===typeof i&&null!==i?i=ui(i):(o=wo(t)?yo:mo.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?bo(e,o):vo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=wi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ci(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wi.enqueueReplaceState(t,t.state,null)}function ki(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=yi,li(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=ui(i):(i=wo(t)?yo:mo.current,o.context=bo(e,i)),vi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(bi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&wi.enqueueReplaceState(o,o.state,null),vi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.effectTag|=4)}var Oi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===yi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function _i(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Ti(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Mu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Fu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=ju(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Lu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Du(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Fu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=ju(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case te:return(t=Lu(t,e.mode,n)).return=e,t}if(Oi(t)||ve(t))return(t=Du(t,e.mode,n,null)).return=e,t;_i(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case te:return n.key===o?l(e,t,n,r):null}if(Oi(n)||ve(n))return null!==o?null:f(e,t,n,r,null);_i(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Oi(r)||ve(r))return f(t,e=e.get(n)||null,r,o,null);_i(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var g=p(o,f,s[v],u);if(null===g){null===f&&(f=m);break}e&&f&&null===g.alternate&&t(o,f),a=i(g,a,v),null===l?c=g:l.sibling=g,l=g,f=m}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=d(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(m=h(f,o,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=i(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(o,e)})),c}function m(o,s,u,c){var l=ve(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,g=null,y=u.next();null!==v&&!y.done;m++,y=u.next()){v.index>m?(g=v,v=null):g=v.sibling;var b=p(o,v,y.value,c);if(null===b){null===v&&(v=g);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,m),null===f?l=b:f.sibling=b,f=b,v=g}if(y.done)return n(o,v),l;if(null===v){for(;!y.done;m++,y=u.next())null!==(y=d(o,y.value,c))&&(s=i(y,s,m),null===f?l=y:f.sibling=y,f=y);return l}for(v=r(o,v);!y.done;m++,y=u.next())null!==(y=h(v,o,m,y.value,c))&&(e&&null!==y.alternate&&v.delete(null===y.key?m:y.key),s=i(y,s,m),null===f?l=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"===typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var l="object"===typeof i&&null!==i;if(l)switch(i.$$typeof){case ee:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(i.type===ne){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}break;default:if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Si(e,c,i),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Du(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=ju(i.type,i.key,i.props,null,e.mode,u)).ref=Si(e,r,i),u.return=e,e=u)}return s(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Lu(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Fu(i,e.mode,u)).return=e,e=r),s(e);if(Oi(i))return v(e,r,i,u);if(ve(i))return m(e,r,i,u);if(l&&_i(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ii=Ti(!0),Pi=Ti(!1),Ai={},Ri={current:Ai},Ni={current:Ai},Mi={current:Ai};function ji(e){if(e===Ai)throw Error(a(174));return e}function Di(e,t){switch(ho(Mi,t),ho(Ni,e),ho(Ri,Ai),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fe(null,"");break;default:t=Fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}po(Ri),ho(Ri,t)}function Fi(){po(Ri),po(Ni),po(Mi)}function Li(e){ji(Mi.current);var t=ji(Ri.current),n=Fe(t,e.type);t!==n&&(ho(Ni,e),ho(Ri,n))}function Bi(e){Ni.current===e&&(po(Ri),po(Ni))}var Ui={current:0};function zi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===gn||n.data===yn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Vi(e,t){return{responder:e,props:t}}var Wi=Y.ReactCurrentDispatcher,Hi=Y.ReactCurrentBatchConfig,$i=0,qi=null,Ki=null,Gi=null,Xi=!1;function Yi(){throw Error(a(321))}function Ji(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Qi(e,t,n,r,o,i){if($i=i,qi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Wi.current=null===e||null===e.memoizedState?xa:Ea,e=n(r,o),t.expirationTime===$i){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Gi=Ki=null,t.updateQueue=null,Wi.current=Ca,e=n(r,o)}while(t.expirationTime===$i)}if(Wi.current=wa,t=null!==Ki&&null!==Ki.next,$i=0,Gi=Ki=qi=null,Xi=!1,t)throw Error(a(300));return e}function Zi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Gi?qi.memoizedState=Gi=e:Gi=Gi.next=e,Gi}function ea(){if(null===Ki){var e=qi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===Gi?qi.memoizedState:Gi.next;if(null!==t)Gi=t,Ki=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===Gi?qi.memoizedState=Gi=e:Gi=Gi.next=e}return Gi}function ta(e,t){return"function"===typeof t?t(e):t}function na(e){var t=ea(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ki,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.expirationTime;if(l<$i){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,l>qi.expirationTime&&(qi.expirationTime=l,hu(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),pu(l,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,zr(r,t.memoizedState)||(Ma=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ra(e){var t=ea(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);zr(i,t.memoizedState)||(Ma=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function oa(e){var t=Zi();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e}).dispatch=ba.bind(null,qi,e),[t.memoizedState,e]}function ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=qi.updateQueue)?(t={lastEffect:null},qi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function aa(){return ea().memoizedState}function sa(e,t,n,r){var o=Zi();qi.effectTag|=e,o.memoizedState=ia(1|t,n,void 0,void 0===r?null:r)}function ua(e,t,n,r){var o=ea();r=void 0===r?null:r;var i=void 0;if(null!==Ki){var a=Ki.memoizedState;if(i=a.destroy,null!==r&&Ji(r,a.deps))return void ia(t,n,i,r)}qi.effectTag|=e,o.memoizedState=ia(1|t,n,i,r)}function ca(e,t){return sa(516,4,e,t)}function la(e,t){return ua(516,4,e,t)}function fa(e,t){return ua(4,2,e,t)}function da(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function pa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ua(4,2,da.bind(null,t,e),n)}function ha(){}function va(e,t){return Zi().memoizedState=[e,void 0===t?null:t],e}function ma(e,t){var n=ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ji(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ga(e,t){var n=ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ji(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ya(e,t,n){var r=$o();Ko(98>r?98:r,(function(){e(!0)})),Ko(97<r?97:r,(function(){var r=Hi.suspense;Hi.suspense=void 0===t?null:t;try{e(!1),n()}finally{Hi.suspense=r}}))}function ba(e,t,n){var r=eu(),o=gi.suspense;o={expirationTime:r=tu(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===qi||null!==i&&i===qi)Xi=!0,o.expirationTime=$i,qi.expirationTime=$i;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.eagerReducer=i,o.eagerState=s,zr(s,a))return}catch(u){}nu(e,r)}}var wa={readContext:ui,useCallback:Yi,useContext:Yi,useEffect:Yi,useImperativeHandle:Yi,useLayoutEffect:Yi,useMemo:Yi,useReducer:Yi,useRef:Yi,useState:Yi,useDebugValue:Yi,useResponder:Yi,useDeferredValue:Yi,useTransition:Yi},xa={readContext:ui,useCallback:va,useContext:ui,useEffect:ca,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,sa(4,2,da.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sa(4,2,e,t)},useMemo:function(e,t){var n=Zi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ba.bind(null,qi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Zi().memoizedState=e},useState:oa,useDebugValue:ha,useResponder:Vi,useDeferredValue:function(e,t){var n=oa(e),r=n[0],o=n[1];return ca((function(){var n=Hi.suspense;Hi.suspense=void 0===t?null:t;try{o(e)}finally{Hi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=oa(!1),n=t[0];return t=t[1],[va(ya.bind(null,t,e),[t,e]),n]}},Ea={readContext:ui,useCallback:ma,useContext:ui,useEffect:la,useImperativeHandle:pa,useLayoutEffect:fa,useMemo:ga,useReducer:na,useRef:aa,useState:function(){return na(ta)},useDebugValue:ha,useResponder:Vi,useDeferredValue:function(e,t){var n=na(ta),r=n[0],o=n[1];return la((function(){var n=Hi.suspense;Hi.suspense=void 0===t?null:t;try{o(e)}finally{Hi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(ta),n=t[0];return t=t[1],[ma(ya.bind(null,t,e),[t,e]),n]}},Ca={readContext:ui,useCallback:ma,useContext:ui,useEffect:la,useImperativeHandle:pa,useLayoutEffect:fa,useMemo:ga,useReducer:ra,useRef:aa,useState:function(){return ra(ta)},useDebugValue:ha,useResponder:Vi,useDeferredValue:function(e,t){var n=ra(ta),r=n[0],o=n[1];return la((function(){var n=Hi.suspense;Hi.suspense=void 0===t?null:t;try{o(e)}finally{Hi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ra(ta),n=t[0];return t=t[1],[ma(ya.bind(null,t,e),[t,e]),n]}},ka=null,Oa=null,Sa=!1;function _a(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ta(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ia(e){if(Sa){var t=Oa;if(t){var n=t;if(!Ta(e,t)){if(!(t=On(n.nextSibling))||!Ta(e,t))return e.effectTag=-1025&e.effectTag|2,Sa=!1,void(ka=e);_a(ka,n)}ka=e,Oa=On(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Sa=!1,ka=e}}function Pa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ka=e}function Aa(e){if(e!==ka)return!1;if(!Sa)return Pa(e),Sa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!En(t,e.memoizedProps))for(t=Oa;t;)_a(e,t),t=On(t.nextSibling);if(Pa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Oa=On(e.nextSibling);break e}t--}else"$"!==n&&n!==yn&&n!==gn||t++}e=e.nextSibling}Oa=null}}else Oa=ka?On(e.stateNode.nextSibling):null;return!0}function Ra(){Oa=ka=null,Sa=!1}var Na=Y.ReactCurrentOwner,Ma=!1;function ja(e,t,n,r){t.child=null===e?Pi(t,null,n,r):Ii(t,e.child,n,r)}function Da(e,t,n,r,o){n=n.render;var i=t.ref;return si(t,o),r=Qi(e,t,n,r,i,o),null===e||Ma?(t.effectTag|=1,ja(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Qa(e,t,o))}function Fa(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Nu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ju(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,La(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Wr)(o,r)&&e.ref===t.ref)?Qa(e,t,i):(t.effectTag|=1,(e=Mu(a,r)).ref=t.ref,e.return=t,t.child=e)}function La(e,t,n,r,o,i){return null!==e&&Wr(e.memoizedProps,r)&&e.ref===t.ref&&(Ma=!1,o<i)?(t.expirationTime=e.expirationTime,Qa(e,t,i)):Ua(e,t,n,r,i)}function Ba(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ua(e,t,n,r,o){var i=wo(n)?yo:mo.current;return i=bo(t,i),si(t,o),n=Qi(e,t,n,r,i,o),null===e||Ma?(t.effectTag|=1,ja(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Qa(e,t,o))}function za(e,t,n,r,o){if(wo(n)){var i=!0;ko(t)}else i=!1;if(si(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Ei(t,n,r),ki(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ui(c):c=bo(t,c=wo(n)?yo:mo.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&Ci(t,a,r,c),ci=!1;var d=t.memoizedState;a.state=d,vi(t,r,a,o),u=t.memoizedState,s!==r||d!==u||go.current||ci?("function"===typeof l&&(bi(t,n,l,r),u=t.memoizedState),(s=ci||xi(t,n,s,r,d,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.effectTag|=4)):("function"===typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,fi(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Zo(t.type,s),u=a.context,"object"===typeof(c=n.contextType)&&null!==c?c=ui(c):c=bo(t,c=wo(n)?yo:mo.current),(f="function"===typeof(l=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&Ci(t,a,r,c),ci=!1,u=t.memoizedState,a.state=u,vi(t,r,a,o),d=t.memoizedState,s!==r||u!==d||go.current||ci?("function"===typeof l&&(bi(t,n,l,r),d=t.memoizedState),(l=ci||xi(t,n,s,r,u,d,c))?(f||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,c)),"function"===typeof a.componentDidUpdate&&(t.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=c,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Va(e,t,n,r,i,o)}function Va(e,t,n,r,o,i){Ba(e,t);var a=0!==(64&t.effectTag);if(!r&&!a)return o&&Oo(t,n,!1),Qa(e,t,i);r=t.stateNode,Na.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ii(t,e.child,null,i),t.child=Ii(t,null,s,i)):ja(e,t,s,i),t.memoizedState=r.state,o&&Oo(t,n,!0),t.child}function Wa(e){var t=e.stateNode;t.pendingContext?Eo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Eo(0,t.context,!1),Di(e,t.containerInfo)}var Ha,$a,qa,Ka={dehydrated:null,retryTime:0};function Ga(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Ui.current,s=!1;if((r=0!==(64&t.effectTag))||(r=0!==(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),ho(Ui,1&a),null===e){if(void 0!==i.fallback&&Ia(t),s){if(s=i.fallback,(i=Du(null,o,0,null)).return=t,0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Du(s,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ka,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Pi(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,s){if(i=i.fallback,(n=Mu(e,e.pendingProps)).return=t,0===(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(o=Mu(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ka,t.child=n,o}return n=Ii(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Du(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0===(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Du(s,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ka,t.child=i,n}return t.memoizedState=null,t.child=Ii(t,e,i.children,n)}function Xa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ai(e.return,t)}function Ya(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Ja(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ja(e,t,r.children,n),0!==(2&(r=Ui.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!==(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Xa(e,n);else if(19===e.tag)Xa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ho(Ui,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===zi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ya(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===zi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ya(t,!0,n,null,i,t.lastEffect);break;case"together":Ya(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Qa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&hu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Mu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Mu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Za(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function es(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return wo(t.type)&&xo(),null;case 3:return Fi(),po(go),po(mo),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Aa(t)||(t.effectTag|=4),null;case 5:Bi(t),n=ji(Mi.current);var i=t.type;if(null!==e&&null!=t.stateNode)$a(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=ji(Ri.current),Aa(t)){r=t.stateNode,i=t.type;var s=t.memoizedProps;switch(r[Tn]=t,r[In]=s,i){case"iframe":case"object":case"embed":Gt("load",r);break;case"video":case"audio":for(e=0;e<Je.length;e++)Gt(Je[e],r);break;case"source":Gt("error",r);break;case"img":case"image":case"link":Gt("error",r),Gt("load",r);break;case"form":Gt("reset",r),Gt("submit",r);break;case"details":Gt("toggle",r);break;case"input":Ce(r,s),Gt("invalid",r),cn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Gt("invalid",r),cn(n,"onChange");break;case"textarea":Ae(r,s),Gt("invalid",r),cn(n,"onChange")}for(var u in an(i,s),e=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"===typeof c?r.textContent!==c&&(e=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(e=["children",""+c]):k.hasOwnProperty(u)&&null!=c&&cn(n,u)}switch(i){case"input":we(r),Se(r,s,!0);break;case"textarea":we(r),Ne(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=ln)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===un&&(e=De(i)),e===un?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[Tn]=t,e[In]=r,Ha(e,t),t.stateNode=e,u=sn(i,r),i){case"iframe":case"object":case"embed":Gt("load",e),c=r;break;case"video":case"audio":for(c=0;c<Je.length;c++)Gt(Je[c],e);c=r;break;case"source":Gt("error",e),c=r;break;case"img":case"image":case"link":Gt("error",e),Gt("load",e),c=r;break;case"form":Gt("reset",e),Gt("submit",e),c=r;break;case"details":Gt("toggle",e),c=r;break;case"input":Ce(e,r),c=Ee(e,r),Gt("invalid",e),cn(n,"onChange");break;case"option":c=Te(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),Gt("invalid",e),cn(n,"onChange");break;case"textarea":Ae(e,r),c=Pe(e,r),Gt("invalid",e),cn(n,"onChange");break;default:c=r}an(i,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?rn(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&Ue(e,f):"children"===s?"string"===typeof f?("textarea"!==i||""!==f)&&ze(e,f):"number"===typeof f&&ze(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(k.hasOwnProperty(s)?null!=f&&cn(n,s):null!=f&&J(e,s,f,u))}switch(i){case"input":we(e),Se(e,r,!1);break;case"textarea":we(e),Ne(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Ie(e,!!r.multiple,n,!1):null!=r.defaultValue&&Ie(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof c.onClick&&(e.onclick=ln)}xn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)qa(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=ji(Mi.current),ji(Ri.current),Aa(t)?(n=t.stateNode,r=t.memoizedProps,n[Tn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Tn]=t,t.stateNode=n)}return null;case 13:return po(Ui),r=t.memoizedState,0!==(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Aa(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Ui.current)?js===Ts&&(js=Is):(js!==Ts&&js!==Is||(js=Ps),0!==Us&&null!==Rs&&(zu(Rs,Ms),Vu(Rs,Us)))),(n||r)&&(t.effectTag|=4),null);case 4:return Fi(),null;case 10:return ii(t),null;case 17:return wo(t.type)&&xo(),null;case 19:if(po(Ui),null===(r=t.memoizedState))return null;if(i=0!==(64&t.effectTag),null===(s=r.rendering)){if(i)Za(r,!1);else if(js!==Ts||null!==e&&0!==(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=zi(s))){for(t.effectTag|=64,Za(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,s=e.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return ho(Ui,1&Ui.current|2),t.child}s=s.sibling}}else{if(!i)if(null!==(e=zi(s))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Za(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ho()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Za(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Ho()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ho(),n.sibling=null,t=Ui.current,ho(Ui,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function ts(e){switch(e.tag){case 1:wo(e.type)&&xo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Fi(),po(go),po(mo),0!==(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Bi(e),null;case 13:return po(Ui),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return po(Ui),null;case 4:return Fi(),null;case 10:return ii(e),null;default:return null}}function ns(e,t){return{value:e,source:t,stack:ge(t)}}Ha=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$a=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var s,u,c=t.stateNode;switch(ji(Ri.current),e=null,n){case"input":a=Ee(c,a),r=Ee(c,r),e=[];break;case"option":a=Te(c,a),r=Te(c,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Pe(c,a),r=Pe(c,r),e=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(c.onclick=ln)}for(s in an(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(k.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(s,l)):"children"===s?c===l||"string"!==typeof l&&"number"!==typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(k.hasOwnProperty(s)?(null!=l&&cn(i,s),e||c===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},qa=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var rs="function"===typeof WeakSet?WeakSet:Set;function os(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ge(n)),null!==n&&me(n.type),t=t.value,null!==e&&1===e.tag&&me(e.type);try{console.error(t)}catch(o){setTimeout((function(){throw o}))}}function is(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Su(e,n)}else t.current=null}function as(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Zo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ss(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function us(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void us(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Zo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&mi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}mi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&xn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ft(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function ls(e,t,n){switch("function"===typeof Pu&&Pu(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Ko(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(i){Su(o,i)}}e=e.next}while(e!==r)}))}break;case 1:is(t),"function"===typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){Su(e,n)}}(t,n);break;case 5:is(t);break;case 4:ms(e,t,n)}}function fs(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&fs(t)}function ds(e){return 5===e.tag||3===e.tag||4===e.tag}function ps(e){e:{for(var t=e.return;null!==t;){if(ds(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(ze(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ds(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?hs(e,n,t):vs(e,n,t)}function hs(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=ln));else if(4!==r&&null!==(e=e.child))for(hs(e,t,n),e=e.sibling;null!==e;)hs(e,t,n),e=e.sibling}function vs(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(vs(e,t,n),e=e.sibling;null!==e;)vs(e,t,n),e=e.sibling}function ms(e,t,n){for(var r,o,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,l=n,f=c;;)if(ls(u,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(ls(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function gs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void ss(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[In]=r,"input"===e&&"radio"===r.type&&null!=r.name&&ke(n,r),sn(e,o),t=sn(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?rn(n,u):"dangerouslySetInnerHTML"===s?Ue(n,u):"children"===s?ze(n,u):J(n,s,u,t)}switch(e){case"input":Oe(n,r);break;case"textarea":Re(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Ie(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Ie(n,!!r.multiple,r.defaultValue,!0):Ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Ft(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Vs=Ho()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"===typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=void 0!==(o=e.memoizedProps.style)&&null!==o&&o.hasOwnProperty("display")?o.display:null,i.style.display=nn("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ys(t);case 19:return void ys(t);case 17:return}throw Error(a(163))}function ys(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new rs),t.forEach((function(t){var r=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var bs="function"===typeof WeakMap?WeakMap:Map;function ws(e,t,n){(n=di(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hs||(Hs=!0,$s=r),os(e,t)},n}function xs(e,t,n){(n=di(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return os(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===qs?qs=new Set([this]):qs.add(this),os(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Es,Cs=Math.ceil,ks=Y.ReactCurrentDispatcher,Os=Y.ReactCurrentOwner,Ss=16,_s=32,Ts=0,Is=3,Ps=4,As=0,Rs=null,Ns=null,Ms=0,js=Ts,Ds=null,Fs=1073741823,Ls=1073741823,Bs=null,Us=0,zs=!1,Vs=0,Ws=null,Hs=!1,$s=null,qs=null,Ks=!1,Gs=null,Xs=90,Ys=null,Js=0,Qs=null,Zs=0;function eu(){return 0!==(48&As)?1073741821-(Ho()/10|0):0!==Zs?Zs:Zs=1073741821-(Ho()/10|0)}function tu(e,t,n){if(0===(2&(t=t.mode)))return 1073741823;var r=$o();if(0===(4&t))return 99===r?1073741823:1073741822;if(0!==(As&Ss))return Ms;if(null!==n)e=Qo(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Qo(e,150,100);break;case 97:case 96:e=Qo(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Rs&&e===Ms&&--e,e}function nu(e,t){if(50<Js)throw Js=0,Qs=null,Error(a(185));if(null!==(e=ru(e,t))){var n=$o();1073741823===t?0!==(8&As)&&0===(48&As)?su(e):(iu(e),0===As&&Yo()):iu(e),0===(4&As)||98!==n&&99!==n||(null===Ys?Ys=new Map([[e,t]]):(void 0===(n=Ys.get(e))||n>t)&&Ys.set(e,t))}}function ru(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Rs===o&&(hu(t),js===Ps&&zu(o,Ms)),Vu(o,t)),o}function ou(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Uu(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function iu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Xo(su.bind(null,e));else{var t=ou(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=eu();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==Fo&&To(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Xo(su.bind(null,e)):Go(r,au.bind(null,e),{timeout:10*(1073741821-t)-Ho()}),e.callbackNode=t}}}function au(e,t){if(Zs=0,t)return Wu(e,t=eu()),iu(e),null;var n=ou(e);if(0!==n){if(t=e.callbackNode,0!==(48&As))throw Error(a(327));if(Cu(),e===Rs&&n===Ms||lu(e,n),null!==Ns){var r=As;As|=Ss;for(var o=du();;)try{mu();break}catch(u){fu(e,u)}if(oi(),As=r,ks.current=o,1===js)throw t=Ds,lu(e,n),zu(e,n),iu(e),t;if(null===Ns)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=js,Rs=null,r){case Ts:case 1:throw Error(a(345));case 2:Wu(e,2<n?2:n);break;case Is:if(zu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=bu(o)),1073741823===Fs&&10<(o=Vs+500-Ho())){if(zs){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,lu(e,n);break}}if(0!==(i=ou(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=Cn(wu.bind(null,e),o);break}wu(e);break;case Ps:if(zu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=bu(o)),zs&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,lu(e,n);break}if(0!==(o=ou(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ls?r=10*(1073741821-Ls)-Ho():1073741823===Fs?r=0:(r=10*(1073741821-Fs)-5e3,0>(r=(o=Ho())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cs(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=Cn(wu.bind(null,e),r);break}wu(e);break;case 5:if(1073741823!==Fs&&null!==Bs){i=Fs;var s=Bs;if(0>=(r=0|s.busyMinDurationMs)?r=0:(o=0|s.busyDelayMs,r=(i=Ho()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=o?0:o+r-i),10<r){zu(e,n),e.timeoutHandle=Cn(wu.bind(null,e),r);break}}wu(e);break;default:throw Error(a(329))}if(iu(e),e.callbackNode===t)return au.bind(null,e)}}return null}function su(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!==(48&As))throw Error(a(327));if(Cu(),e===Rs&&t===Ms||lu(e,t),null!==Ns){var n=As;As|=Ss;for(var r=du();;)try{vu();break}catch(o){fu(e,o)}if(oi(),As=n,ks.current=r,1===js)throw n=Ds,lu(e,t),zu(e,t),iu(e),n;if(null!==Ns)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Rs=null,wu(e),iu(e)}return null}function uu(e,t){var n=As;As|=1;try{return e(t)}finally{0===(As=n)&&Yo()}}function cu(e,t){var n=As;As&=-2,As|=8;try{return e(t)}finally{0===(As=n)&&Yo()}}function lu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,kn(n)),null!==Ns)for(n=Ns.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&xo();break;case 3:Fi(),po(go),po(mo);break;case 5:Bi(r);break;case 4:Fi();break;case 13:case 19:po(Ui);break;case 10:ii(r)}n=n.return}Rs=e,Ns=Mu(e.current,null),Ms=t,js=Ts,Ds=null,Ls=Fs=1073741823,Bs=null,Us=0,zs=!1}function fu(e,t){for(;;){try{if(oi(),Wi.current=wa,Xi)for(var n=qi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if($i=0,Gi=Ki=qi=null,Xi=!1,null===Ns||null===Ns.return)return js=1,Ds=t,Ns=null;e:{var o=e,i=Ns.return,a=Ns,s=t;if(t=Ms,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var u=s;if(0===(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!==(1&Ui.current),f=i;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var h=f.memoizedProps;d=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(d){var v=f.updateQueue;if(null===v){var m=new Set;m.add(u),f.updateQueue=m}else v.add(u);if(0===(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var g=di(1073741823,null);g.tag=2,pi(a,g)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new bs,s=new Set,y.set(u,s)):void 0===(s=y.get(u))&&(s=new Set,y.set(u,s)),!s.has(a)){s.add(a);var b=_u.bind(null,o,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((me(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ge(a))}5!==js&&(js=2),s=ns(s,a),f=i;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=t,hi(f,ws(f,u,t));break e;case 1:u=s;var w=f.type,x=f.stateNode;if(0===(64&f.effectTag)&&("function"===typeof w.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===qs||!qs.has(x)))){f.effectTag|=4096,f.expirationTime=t,hi(f,xs(f,u,t));break e}}f=f.return}while(null!==f)}Ns=yu(Ns)}catch(E){t=E;continue}break}}function du(){var e=ks.current;return ks.current=wa,null===e?wa:e}function pu(e,t){e<Fs&&2<e&&(Fs=e),null!==t&&e<Ls&&2<e&&(Ls=e,Bs=t)}function hu(e){e>Us&&(Us=e)}function vu(){for(;null!==Ns;)Ns=gu(Ns)}function mu(){for(;null!==Ns&&!Lo();)Ns=gu(Ns)}function gu(e){var t=Es(e.alternate,e,Ms);return e.memoizedProps=e.pendingProps,null===t&&(t=yu(e)),Os.current=null,t}function yu(e){Ns=e;do{var t=Ns.alternate;if(e=Ns.return,0===(2048&Ns.effectTag)){if(t=es(t,Ns,Ms),1===Ms||1!==Ns.childExpirationTime){for(var n=0,r=Ns.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}Ns.childExpirationTime=n}if(null!==t)return t;null!==e&&0===(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Ns.firstEffect),null!==Ns.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Ns.firstEffect),e.lastEffect=Ns.lastEffect),1<Ns.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Ns:e.firstEffect=Ns,e.lastEffect=Ns))}else{if(null!==(t=ts(Ns)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Ns.sibling))return t;Ns=e}while(null!==Ns);return js===Ts&&(js=5),null}function bu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function wu(e){var t=$o();return Ko(99,xu.bind(null,e,t)),null}function xu(e,t){do{Cu()}while(null!==Gs);if(0!==(48&As))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=bu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Rs&&(Ns=Rs=null,Ms=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=As;As|=_s,Os.current=null,bn=Kt;var s=vn();if(mn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(S){u=null;break e}var d=0,p=-1,h=-1,v=0,m=0,g=s,y=null;t:for(;;){for(var b;g!==u||0!==l&&3!==g.nodeType||(p=d+l),g!==f||0!==c&&3!==g.nodeType||(h=d+c),3===g.nodeType&&(d+=g.nodeValue.length),null!==(b=g.firstChild);)y=g,g=b;for(;;){if(g===s)break t;if(y===u&&++v===l&&(p=d),y===f&&++m===c&&(h=d),null!==(b=g.nextSibling))break;y=(g=y).parentNode}g=b}u=-1===p||-1===h?null:{start:p,end:h}}else u=null}u=u||{start:0,end:0}}else u=null;wn={activeElementDetached:null,focusedElem:s,selectionRange:u},Kt=!1,Ws=o;do{try{Eu()}catch(S){if(null===Ws)throw Error(a(330));Su(Ws,S),Ws=Ws.nextEffect}}while(null!==Ws);Ws=o;do{try{for(s=e,u=t;null!==Ws;){var w=Ws.effectTag;if(16&w&&ze(Ws.stateNode,""),128&w){var x=Ws.alternate;if(null!==x){var E=x.ref;null!==E&&("function"===typeof E?E(null):E.current=null)}}switch(1038&w){case 2:ps(Ws),Ws.effectTag&=-3;break;case 6:ps(Ws),Ws.effectTag&=-3,gs(Ws.alternate,Ws);break;case 1024:Ws.effectTag&=-1025;break;case 1028:Ws.effectTag&=-1025,gs(Ws.alternate,Ws);break;case 4:gs(Ws.alternate,Ws);break;case 8:ms(s,l=Ws,u),fs(l)}Ws=Ws.nextEffect}}catch(S){if(null===Ws)throw Error(a(330));Su(Ws,S),Ws=Ws.nextEffect}}while(null!==Ws);if(E=wn,x=vn(),w=E.focusedElem,u=E.selectionRange,x!==w&&w&&w.ownerDocument&&hn(w.ownerDocument.documentElement,w)){null!==u&&mn(w)&&(x=u.start,void 0===(E=u.end)&&(E=x),"selectionStart"in w?(w.selectionStart=x,w.selectionEnd=Math.min(E,w.value.length)):(E=(x=w.ownerDocument||document)&&x.defaultView||window).getSelection&&(E=E.getSelection(),l=w.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!E.extend&&s>u&&(l=u,u=s,s=l),l=pn(w,s),f=pn(w,u),l&&f&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((x=x.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),s>u?(E.addRange(x),E.extend(f.node,f.offset)):(x.setEnd(f.node,f.offset),E.addRange(x))))),x=[];for(E=w;E=E.parentNode;)1===E.nodeType&&x.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"===typeof w.focus&&w.focus(),w=0;w<x.length;w++)(E=x[w]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Kt=!!bn,wn=bn=null,e.current=n,Ws=o;do{try{for(w=e;null!==Ws;){var C=Ws.effectTag;if(36&C&&cs(w,Ws.alternate,Ws),128&C){x=void 0;var k=Ws.ref;if(null!==k){var O=Ws.stateNode;switch(Ws.tag){case 5:x=O;break;default:x=O}"function"===typeof k?k(x):k.current=x}}Ws=Ws.nextEffect}}catch(S){if(null===Ws)throw Error(a(330));Su(Ws,S),Ws=Ws.nextEffect}}while(null!==Ws);Ws=null,Bo(),As=i}else e.current=n;if(Ks)Ks=!1,Gs=e,Xs=t;else for(Ws=o;null!==Ws;)t=Ws.nextEffect,Ws.nextEffect=null,Ws=t;if(0===(t=e.firstPendingTime)&&(qs=null),1073741823===t?e===Qs?Js++:(Js=0,Qs=e):Js=0,"function"===typeof Iu&&Iu(n.stateNode,r),iu(e),Hs)throw Hs=!1,e=$s,$s=null,e;return 0!==(8&As)||Yo(),null}function Eu(){for(;null!==Ws;){var e=Ws.effectTag;0!==(256&e)&&as(Ws.alternate,Ws),0===(512&e)||Ks||(Ks=!0,Go(97,(function(){return Cu(),null}))),Ws=Ws.nextEffect}}function Cu(){if(90!==Xs){var e=97<Xs?97:Xs;return Xs=90,Ko(e,ku)}}function ku(){if(null===Gs)return!1;var e=Gs;if(Gs=null,0!==(48&As))throw Error(a(331));var t=As;for(As|=_s,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:ss(5,n),us(5,n)}}catch(r){if(null===e)throw Error(a(330));Su(e,r)}n=e.nextEffect,e.nextEffect=null,e=n}return As=t,Yo(),!0}function Ou(e,t,n){pi(e,t=ws(e,t=ns(n,t),1073741823)),null!==(e=ru(e,1073741823))&&iu(e)}function Su(e,t){if(3===e.tag)Ou(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ou(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r))){pi(n,e=xs(n,e=ns(t,e),1073741823)),null!==(n=ru(n,1073741823))&&iu(n);break}}n=n.return}}function _u(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Rs===e&&Ms===n?js===Ps||js===Is&&1073741823===Fs&&Ho()-Vs<500?lu(e,Ms):zs=!0:Uu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,iu(e)))}function Tu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=tu(t=eu(),e,null)),null!==(e=ru(e,t))&&iu(e)}Es=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||go.current)Ma=!0;else{if(r<n){switch(Ma=!1,t.tag){case 3:Wa(t),Ra();break;case 5:if(Li(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:wo(t.type)&&ko(t);break;case 4:Di(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,ho(ei,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ga(e,t,n):(ho(Ui,1&Ui.current),null!==(t=Qa(e,t,n))?t.sibling:null);ho(Ui,1&Ui.current);break;case 19:if(r=t.childExpirationTime>=n,0!==(64&e.effectTag)){if(r)return Ja(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),ho(Ui,Ui.current),!r)return null}return Qa(e,t,n)}Ma=!1}}else Ma=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=bo(t,mo.current),si(t,n),o=Qi(null,t,r,e,o,n),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,wo(r)){var i=!0;ko(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,li(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&bi(t,r,s,e),o.updater=wi,t.stateNode=o,o._reactInternalFiber=t,ki(t,r,e,n),t=Va(null,t,r,!0,i,n)}else t.tag=0,ja(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"===typeof e)return Nu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(o),e=Zo(o,e),i){case 0:t=Ua(null,t,o,e,n);break e;case 1:t=za(null,t,o,e,n);break e;case 11:t=Da(null,t,o,e,n);break e;case 14:t=Fa(null,t,o,Zo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 1:return r=t.type,o=t.pendingProps,za(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 3:if(Wa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,fi(e,t),vi(t,r,null,n),(r=t.memoizedState.element)===o)Ra(),t=Qa(e,t,n);else{if((o=t.stateNode.hydrate)&&(Oa=On(t.stateNode.containerInfo.firstChild),ka=t,o=Sa=!0),o)for(n=Pi(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else ja(e,t,r,n),Ra();t=t.child}return t;case 5:return Li(t),null===e&&Ia(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,En(r,o)?s=null:null!==i&&En(r,i)&&(t.effectTag|=16),Ba(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(ja(e,t,s,n),t=t.child),t;case 6:return null===e&&Ia(t),null;case 13:return Ga(e,t,n);case 4:return Di(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ii(t,null,r,n):ja(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Da(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 7:return ja(e,t,t.pendingProps,n),t.child;case 8:case 12:return ja(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(ho(ei,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=zr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!go.current){t=Qa(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&i)){1===u.tag&&((l=di(n,null)).tag=2,pi(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),ai(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}ja(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,si(t,n),r=r(o=ui(o,i.unstable_observedBits)),t.effectTag|=1,ja(e,t,r,n),t.child;case 14:return i=Zo(o=t.type,t.pendingProps),Fa(e,t,o,i=Zo(o.type,i),r,n);case 15:return La(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,wo(r)?(e=!0,ko(t)):e=!1,si(t,n),Ei(t,r,o),ki(t,r,o,n),Va(null,t,r,!0,e,n);case 19:return Ja(e,t,n)}throw Error(a(156,t.tag))};var Iu=null,Pu=null;function Au(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Ru(e,t,n,r){return new Au(e,t,n,r)}function Nu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mu(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ju(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)Nu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case ne:return Du(n.children,o,i,t);case se:s=8,o|=7;break;case re:s=8,o|=1;break;case oe:return(e=Ru(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case ce:return(e=Ru(13,n,t,o)).type=ce,e.elementType=ce,e.expirationTime=i,e;case le:return(e=Ru(19,n,t,o)).elementType=le,e.expirationTime=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case ie:s=10;break e;case ae:s=9;break e;case ue:s=11;break e;case fe:s=14;break e;case de:s=16,r=null;break e;case pe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ru(s,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Du(e,t,n,r){return(e=Ru(7,e,r,t)).expirationTime=n,e}function Fu(e,t,n){return(e=Ru(6,e,null,t)).expirationTime=n,e}function Lu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bu(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Uu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function zu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Vu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Wu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Hu(e,t,n,r){var o=t.current,i=eu(),s=gi.suspense;i=tu(i,o,s);e:if(n){t:{if(et(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(wo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(wo(c)){n=Co(n,c,u);break e}}n=u}else n=vo;return null===t.context?t.context=n:t.pendingContext=n,(t=di(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),pi(o,t),nu(o,i),i}function $u(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function qu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Ku(e,t){qu(e,t),(e=e.alternate)&&qu(e,t)}function Gu(e,t,n){var r=new Bu(e,t,n=null!=n&&!0===n.hydrate),o=Ru(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,li(o),e[Pn]=r.current,n&&0!==t&&function(e,t){var n=Ze(t);_t.forEach((function(e){vt(e,t,n)})),Tt.forEach((function(e){vt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Yu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=$u(a);s.call(e)}}Hu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=$u(a);u.call(e)}}cu((function(){Hu(t,a,e,o)}))}return $u(a)}function Ju(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Qu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xu(t))throw Error(a(200));return Ju(e,t,null,n)}Gu.prototype.render=function(e){Hu(e,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Hu(null,e,null,(function(){t[Pn]=null}))},mt=function(e){if(13===e.tag){var t=Qo(eu(),150,100);nu(e,t),Ku(e,t)}},gt=function(e){13===e.tag&&(nu(e,3),Ku(e,3))},yt=function(e){if(13===e.tag){var t=eu();nu(e,t=tu(t,e,null)),Ku(e,t)}},T=function(e,t,n){switch(t){case"input":if(Oe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Mn(r);if(!o)throw Error(a(90));xe(r),Oe(r,o)}}}break;case"textarea":Re(e,n);break;case"select":null!=(t=n.value)&&Ie(e,!!n.multiple,t,!1)}},M=uu,j=function(e,t,n,r,o){var i=As;As|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(As=i)&&Yo()}},D=function(){0===(49&As)&&(function(){if(null!==Ys){var e=Ys;Ys=null,e.forEach((function(e,t){Wu(t,e),iu(t)})),Yo()}}(),Cu())},F=function(e,t){var n=As;As|=2;try{return e(t)}finally{0===(As=n)&&Yo()}};var Zu={Events:[Rn,Nn,Mn,S,C,zn,function(e){it(e,Un)},R,N,Qt,ut,Cu,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Iu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64===(64&e.current.effectTag))}catch(r){}},Pu=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}})(o({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=rt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:An,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zu,t.createPortal=Qu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=rt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!==(48&As))throw Error(a(187));var n=As;As|=1;try{return Ko(99,e.bind(null,t))}finally{As=n,Yo()}},t.hydrate=function(e,t,n){if(!Xu(t))throw Error(a(200));return Yu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Xu(t))throw Error(a(200));return Yu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(a(40));return!!e._reactRootContainer&&(cu((function(){Yu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Pn]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_createPortal=function(e,t){return Qu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Yu(e,t,n,!1,r)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(278)},function(e,t,n){"use strict";var r,o,i,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,c=null,l=function e(){if(null!==u)try{var n=t.unstable_now();u(!0,n),u=null}catch(r){throw setTimeout(e,0),r}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(l,0))},o=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,h=window.setTimeout,v=window.clearTimeout;if("undefined"!==typeof console){var m=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof d&&"function"===typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var y=!1,b=null,w=-1,x=5,E=0;a=function(){return t.unstable_now()>=E},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<e?Math.floor(1e3/e):5};var C=new MessageChannel,k=C.port2;C.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();E=e+x;try{b(!0,e)?k.postMessage(null):(y=!1,b=null)}catch(n){throw k.postMessage(null),n}}else y=!1},r=function(e){b=e,y||(y=!0,k.postMessage(null))},o=function(e,n){w=h((function(){e(t.unstable_now())}),n)},i=function(){v(w),w=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>T(a,n))void 0!==u&&0>T(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>T(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var I=[],P=[],A=1,R=null,N=3,M=!1,j=!1,D=!1;function F(e){for(var t=S(P);null!==t;){if(null===t.callback)_(P);else{if(!(t.startTime<=e))break;_(P),t.sortIndex=t.expirationTime,O(I,t)}t=S(P)}}function L(e){if(D=!1,F(e),!j)if(null!==S(I))j=!0,r(B);else{var t=S(P);null!==t&&o(L,t.startTime-e)}}function B(e,n){j=!1,D&&(D=!1,i()),M=!0;var r=N;try{for(F(n),R=S(I);null!==R&&(!(R.expirationTime>n)||e&&!a());){var s=R.callback;if(null!==s){R.callback=null,N=R.priorityLevel;var u=s(R.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?R.callback=u:R===S(I)&&_(I),F(n)}else _(I);R=S(I)}if(null!==R)var c=!0;else{var l=S(P);null!==l&&o(L,l.startTime-n),c=!1}return c}finally{R=null,N=r,M=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||M||(j=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return S(I)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0<u?s+u:s,a="number"===typeof a.timeout?a.timeout:U(e)}else a=U(e),u=s;return e={id:A++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,O(P,e),null===S(I)&&e===S(P)&&(D?i():D=!0,o(L,u-s))):(e.sortIndex=a,O(I,e),j||M||(j=!0,r(B))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();F(e);var n=S(I);return n!==R&&null!==R&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<R.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},function(e,t,n){"use strict";n(280)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(156),o=n(186),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,s(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,o,i,a,u,l,f,p,h,v,m,g){var y,b=t;if("function"===typeof l?b=l(n,b):b instanceof Date?b=h(b):"comma"===o&&s(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?h(e):e})).join(",")),null===b){if(i)return u&&!m?u(n,d.encoder,g,"key"):n;b=""}if("string"===typeof(y=b)||"number"===typeof y||"boolean"===typeof y||"symbol"===typeof y||"bigint"===typeof y||r.isBuffer(b))return u?[v(m?n:u(n,d.encoder,g,"key"))+"="+v(u(b,d.encoder,g,"value"))]:[v(n)+"="+v(String(b))];var w,x=[];if("undefined"===typeof b)return x;if(s(l))w=l;else{var E=Object.keys(b);w=f?E.sort(f):E}for(var C=0;C<w.length;++C){var k=w[C],O=b[k];if(!a||null!==O){var S=s(b)?"function"===typeof o?o(n,k):n:n+(p?"."+k:"["+k+"]");c(x,e(O,S,o,i,a,u,l,f,p,h,v,m,g))}}return x};e.exports=function(e,t){var n,r=e,u=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if("undefined"!==typeof e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=d.filter;return("function"===typeof e.filter||s(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?d.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:d.encode,encoder:"function"===typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"===typeof u.filter?r=(0,u.filter)("",r):s(u.filter)&&(n=u.filter);var l,f=[];if("object"!==typeof r||null===r)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=a[l];n||(n=Object.keys(r)),u.sort&&n.sort(u.sort);for(var v=0;v<n.length;++v){var m=n[v];u.skipNulls&&null===r[m]||c(f,p(r[m],m,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.formatter,u.encodeValuesOnly,u.charset))}var g=f.join(u.delimiter),y=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),g.length>0?y+g:""}},function(e,t,n){"use strict";var r=n(156),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var f=0;n.depth>0&&null!==(s=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[c]=o:a={0:o}}o=a}return o}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var l="string"===typeof e?function(e,t){var n,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),p=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?h="utf-8":"utf8=%26%2310003%3B"===d[n]&&(h="iso-8859-1"),p=n,n=d.length);for(n=0;n<d.length;++n)if(n!==p){var v,m,g=d[n],y=g.indexOf("]="),b=-1===y?g.indexOf("="):y+1;-1===b?(v=t.decoder(g,a.decoder,h,"key"),m=t.strictNullHandling?null:""):(v=t.decoder(g.slice(0,b),a.decoder,h,"key"),m=r.maybeMap(u(g.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,h,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===h&&(m=s(m)),g.indexOf("[]=")>-1&&(m=i(m)?[m]:m),o.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(l),p=0;p<d.length;++p){var h=d[p],v=c(h,l[h],n,"string"===typeof e);f=r.merge(f,v,n)}return r.compact(f)}},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(){if("function"==typeof ArrayBuffer){var e=o.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!==typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],o=0;o<n;o++)r[o>>>2]|=e[o]<<24-o%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),o.lib.WordArray)}()},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(){var e=o,t=e.lib.WordArray,n=e.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var i=t[o>>>2]>>>16-o%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o<n;o++)r[o>>>1]|=e.charCodeAt(o)<<16-o%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],i=0;i<n;i+=2){var a=r(t[i>>>2]>>>16-i%4*8&65535);o.push(String.fromCharCode(a))}return o.join("")},parse:function(e){for(var n=e.length,o=[],i=0;i<n;i++)o[i>>>1]|=r(e.charCodeAt(i)<<16-i%2*16);return t.create(o,2*n)}}}(),o.enc.Utf16)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(136),function(){var e=i,t=e.lib.WordArray,n=e.algo,r=n.SHA256,o=n.SHA224=r.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=r._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=r._createHelper(o),e.HmacSHA224=r._createHmacHelper(o)}(),i.SHA224)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(128),n(195),function(){var e=i,t=e.x64,n=t.Word,r=t.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),i.SHA384)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(128),function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,n=0;n<24;n++){u[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var o=1,i=0;i<24;i++){for(var s=0,f=0,d=0;d<7;d++){if(1&o){var p=(1<<d)-1;p<32?f^=1<<p:s^=1<<p-32}128&o?o=o<<1^113:o<<=1}l[i]=a.create(s,f)}}();var f=[];!function(){for(var e=0;e<25;e++)f[e]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,o=0;o<r;o++){var i=e[t+2*o],a=e[t+2*o+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=n[o]).high^=a,T.low^=i}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var p=0,h=0,v=0;v<5;v++)p^=(T=n[d+5*v]).high,h^=T.low;var m=f[d];m.high=p,m.low=h}for(d=0;d<5;d++){var g=f[(d+4)%5],y=f[(d+1)%5],b=y.high,w=y.low;for(p=g.high^(b<<1|w>>>31),h=g.low^(w<<1|b>>>31),v=0;v<5;v++)(T=n[d+5*v]).high^=p,T.low^=h}for(var x=1;x<25;x++){var E=(T=n[x]).high,C=T.low,k=u[x];k<32?(p=E<<k|C>>>32-k,h=C<<k|E>>>32-k):(p=C<<k-32|E>>>64-k,h=E<<k-32|C>>>64-k);var O=f[c[x]];O.high=p,O.low=h}var S=f[0],_=n[0];for(S.high=_.high,S.low=_.low,d=0;d<5;d++)for(v=0;v<5;v++){var T=n[x=d+5*v],I=f[x],P=f[(d+1)%5+5*v],A=f[(d+2)%5+5*v];T.high=I.high^~P.high&A.high,T.low=I.low^~P.low&A.low}T=n[0];var R=l[s];T.high^=R.high,T.low^=R.low}},_doFinalize:function(){var t=this._data,n=t.words,o=(this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;n[o>>>5]|=1<<24-o%32,n[(e.ceil((o+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l<u;l++){var f=a[l],d=f.high,p=f.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(d)}return new r.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),i.SHA3)}()},function(e,t,n){!function(t,r){var o;e.exports=(o=n(35),function(e){var t=o,n=t.lib,r=n.WordArray,i=n.Hasher,a=t.algo,s=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=r.create([0,1518500249,1859775393,2400959708,2840853838]),d=r.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=i.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,o=e[r];e[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i,a,p,w,x,E,C,k,O,S,_,T=this._hash.words,I=f.words,P=d.words,A=s.words,R=u.words,N=c.words,M=l.words;for(E=i=T[0],C=a=T[1],k=p=T[2],O=w=T[3],S=x=T[4],n=0;n<80;n+=1)_=i+e[t+A[n]]|0,_+=n<16?h(a,p,w)+I[0]:n<32?v(a,p,w)+I[1]:n<48?m(a,p,w)+I[2]:n<64?g(a,p,w)+I[3]:y(a,p,w)+I[4],_=(_=b(_|=0,N[n]))+x|0,i=x,x=w,w=b(p,10),p=a,a=_,_=E+e[t+R[n]]|0,_+=n<16?y(C,k,O)+P[0]:n<32?g(C,k,O)+P[1]:n<48?m(C,k,O)+P[2]:n<64?v(C,k,O)+P[3]:h(C,k,O)+P[4],_=(_=b(_|=0,M[n]))+S|0,E=S,S=O,O=b(k,10),k=C,C=_;_=T[1]+p+O|0,T[1]=T[2]+w+S|0,T[2]=T[3]+x+E|0,T[3]=T[4]+i+C|0,T[4]=T[0]+a+k|0,T[0]=_},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,n){return e^t^n}function v(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=i._createHelper(p),t.HmacRIPEMD160=i._createHmacHelper(p)}(Math),o.RIPEMD160)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(157),n(158),function(){var e=i,t=e.lib,n=t.Base,r=t.WordArray,o=e.algo,a=o.SHA1,s=o.HMAC,u=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,o=s.create(n.hasher,e),i=r.create(),a=r.create([1]),u=i.words,c=a.words,l=n.keySize,f=n.iterations;u.length<l;){var d=o.update(t).finalize(a);o.reset();for(var p=d.words,h=p.length,v=d,m=1;m<f;m++){v=o.finalize(v),o.reset();for(var g=v.words,y=0;y<h;y++)p[y]^=g[y]}i.concat(d),c[0]++}return i.sigBytes=4*l,i}});e.PBKDF2=function(e,t,n){return u.create(n).compute(e,t)}}(),i.PBKDF2)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.mode.CFB=function(){var e=i.lib.BlockCipherMode.extend();function t(e,t,n,r){var o,i=this._iv;i?(o=i.slice(0),this._iv=void 0):o=this._prevBlock,r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize;t.call(this,e,n,o,r),this._prevBlock=e.slice(n,n+o)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize,i=e.slice(n,n+o);t.call(this,e,n,o,r),this._prevBlock=i}}),e}(),i.mode.CFB)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.mode.CTR=function(){var e=i.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=this._iv,i=this._counter;o&&(i=this._counter=o.slice(0),this._iv=void 0);var a=i.slice(0);n.encryptBlock(a,0),i[r-1]=i[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=a[s]}});return e.Decryptor=t,e}(),i.mode.CTR)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.mode.CTRGladman=function(){var e=i.lib.BlockCipherMode.extend();function t(e){if(255===(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var r=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,o=r.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var u=0;u<o;u++)e[t+u]^=s[u]}});return e.Decryptor=r,e}(),i.mode.CTRGladman)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.mode.OFB=function(){var e=i.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=this._iv,i=this._keystream;o&&(i=this._keystream=o.slice(0),this._iv=void 0),n.encryptBlock(i,0);for(var a=0;a<r;a++)e[t+a]^=i[a]}});return e.Decryptor=t,e}(),i.mode.OFB)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.mode.ECB=function(){var e=i.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),i.mode.ECB)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,o=r-n%r,i=n+o-1;e.clamp(),e.words[i>>>2]|=o<<24-i%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Ansix923)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.pad.Iso10126={pad:function(e,t){var n=4*t,r=n-e.sigBytes%n;e.concat(i.lib.WordArray.random(r-1)).concat(i.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Iso10126)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.pad.Iso97971={pad:function(e,t){e.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(e,t)},unpad:function(e){i.pad.ZeroPadding.unpad(e),e.sigBytes--}},i.pad.Iso97971)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},i.pad.ZeroPadding)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),i.pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(52),function(e){var t=i,n=t.lib.CipherParams,r=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return n.create({ciphertext:t})}}}(),i.format.Hex)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(95),n(96),n(87),n(52),function(){var e=i,t=e.lib.BlockCipher,n=e.algo,r=[],o=[],a=[],s=[],u=[],c=[],l=[],f=[],d=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var h=i^i<<1^i<<2^i<<3^i<<4;h=h>>>8^255&h^99,r[n]=h,o[h]=n;var v=e[n],m=e[v],g=e[m],y=257*e[h]^16843008*h;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,u[n]=y<<8|y>>>24,c[n]=y,y=16843009*g^65537*m^257*v^16843008*n,l[h]=y<<24|y>>>8,f[h]=y<<16|y>>>16,d[h]=y<<8|y>>>24,p[h]=y,n?(n=v^e[e[e[g^v]]],i^=e[e[i]]):n=i=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],a=0;a<o;a++)a<n?i[a]=t[a]:(c=i[a-1],a%n?n>6&&a%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=h[a/n|0]<<24),i[a]=i[a-n]^c);for(var s=this._invKeySchedule=[],u=0;u<o;u++){if(a=o-u,u%4)var c=i[a];else c=i[a-4];s[u]=u<4||a<=4?c:l[r[c>>>24]]^f[r[c>>>16&255]]^d[r[c>>>8&255]]^p[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,d,p,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,o,i,a,s){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],d=e[t+3]^n[3],p=4,h=1;h<u;h++){var v=r[c>>>24]^o[l>>>16&255]^i[f>>>8&255]^a[255&d]^n[p++],m=r[l>>>24]^o[f>>>16&255]^i[d>>>8&255]^a[255&c]^n[p++],g=r[f>>>24]^o[d>>>16&255]^i[c>>>8&255]^a[255&l]^n[p++],y=r[d>>>24]^o[c>>>16&255]^i[l>>>8&255]^a[255&f]^n[p++];c=v,l=m,f=g,d=y}v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^n[p++],m=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^n[p++],g=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^n[p++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[p++],e[t]=v,e[t+1]=m,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(v)}(),i.AES)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(95),n(96),n(87),n(52),function(){var e=i,t=e.lib,n=t.WordArray,r=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var o=this._subKeys=[],i=0;i<16;i++){var c=o[i]=[],l=u[i];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+l)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+l)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=o[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),d.call(this,1,1431655765);for(var r=0;r<16;r++){for(var o=n[r],i=this._lBlock,a=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((a^o[u])&l[u])>>>0];this._lBlock=a,this._rBlock=i^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,d.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function p(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=r._createHelper(f);var h=o.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),o=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(o))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(h)}(),i.TripleDES)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(95),n(96),n(87),n(52),function(){var e=i,t=e.lib.StreamCipher,n=e.algo,r=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],o=0;o<256;o++)r[o]=o;o=0;for(var i=0;o<256;o++){var a=o%n,s=t[a>>>2]>>>24-a%4*8&255;i=(i+r[o]+s)%256;var u=r[o];r[o]=r[i],r[i]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[n],e[n]=i,r|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,r}e.RC4=t._createHelper(r);var a=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),i.RC4)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(95),n(96),n(87),n(52),function(){var e=i,t=e.lib.StreamCipher,n=e.algo,r=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)o[n]^=r[n+4&7];if(t){var i=t.words,a=i[0],s=i[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(o[0]^=c,o[1]^=f,o[2]^=l,o[3]^=d,o[4]^=c,o[5]^=f,o[6]^=l,o[7]^=d,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(e,t){var n=this._X;u.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)r[o]=16711935&(r[o]<<8|r[o]>>>24)|4278255360&(r[o]<<24|r[o]>>>8),e[t+o]^=r[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),i.Rabbit)}()},function(e,t,n){!function(t,r,o){var i;e.exports=(i=n(35),n(95),n(96),n(87),n(52),function(){var e=i,t=e.lib.StreamCipher,n=e.algo,r=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)u.call(this);for(o=0;o<8;o++)r[o]^=n[o+4&7];if(t){var i=t.words,a=i[0],s=i[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,d=l<<16|65535&c;for(r[0]^=c,r[1]^=f,r[2]^=l,r[3]^=d,r[4]^=c,r[5]^=f,r[6]^=l,r[7]^=d,o=0;o<4;o++)u.call(this)}},_doProcessBlock:function(e,t){var n=this._X;u.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)r[o]=16711935&(r[o]<<8|r[o]>>>24)|4278255360&(r[o]<<24|r[o]>>>8),e[t+o]^=r[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,u=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=u^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),i.RabbitLegacy)}()},function(e,t,n){var r=n(314);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(n){return r(t)}}},function(e,t){function n(e){this.message=e}n.prototype=new Error,n.prototype.name="InvalidCharacterError",e.exports="undefined"!==typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,a=0,s="";o=t.charAt(a++);~o&&(r=i%4?64*r+o:o,i++%4)?s+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s}},function(e,t,n){!function(e){"use strict";var t={appName:"Netscape",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"},n={ASN1:null,Base64:null,Hex:null,crypto:null,href:null},r="0123456789abcdefghijklmnopqrstuvwxyz";function o(e){return r.charAt(e)}function i(e,t){return e&t}function a(e,t){return e|t}function s(e,t){return e^t}function u(e,t){return e&~t}function c(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function l(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="=";function p(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=f.charAt(n>>6)+f.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=f.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=f.charAt(n>>2)+f.charAt((3&n)<<4));(3&r.length)>0;)r+=d;return r}function h(e){var t,n="",r=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=d;++t){var a=f.indexOf(e.charAt(t));a<0||(0==r?(n+=o(a>>2),i=3&a,r=1):1==r?(n+=o(i<<2|a>>4),i=15&a,r=2):2==r?(n+=o(i),n+=o(a>>2),i=3&a,r=3):(n+=o(i<<2|a>>4),n+=o(15&a),r=0))}return 1==r&&(n+=o(i<<2)),n}var v,m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function g(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var y,b={decode:function(e){var t;if(void 0===v){var n="0123456789ABCDEF",r=" \f\n\r\t\xa0\u2028\u2029";for(v={},t=0;t<16;++t)v[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)v[n.charAt(t)]=t;for(t=0;t<r.length;++t)v[r.charAt(t)]=-1}var o=[],i=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=v[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);i|=s,++a>=2?(o[o.length]=i,i=0,a=0):i<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return o}},w={decode:function(e){var t;if(void 0===y){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="= \f\n\r\t\xa0\u2028\u2029";for(y=Object.create(null),t=0;t<64;++t)y[n.charAt(t)]=t;for(t=0;t<r.length;++t)y[r.charAt(t)]=-1}var o=[],i=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=y[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);i|=s,++a>=4?(o[o.length]=i>>16,o[o.length]=i>>8&255,o[o.length]=255&i,i=0,a=0):i<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:o[o.length]=i>>10;break;case 3:o[o.length]=i>>16,o[o.length]=i>>8&255}return o},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=w.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return w.decode(e)}},x=1e13,E=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,o=this.buf,i=o.length;for(n=0;n<i;++n)(r=o[n]*e+t)<x?t=0:r-=(t=0|r/x)*x,o[n]=r;t>0&&(o[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,o=r.length;for(t=0;t<o;++t)(n=r[t]-e)<0?(n+=x,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(x+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*x+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),C="\u2026",k=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,O=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function S(e,t){return e.length>t&&(e=e.substring(0,t)+C),e}var _,T=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset "+e+" on a stream of length "+this.enc.length);return"string"===typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",o=e;o<t;++o)if(r+=this.hexByte(this.get(o)),!0!==n)switch(15&o){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var o=this.get(r++);n+=o<128?String.fromCharCode(o):o>191&&o<224?String.fromCharCode((31&o)<<6|63&this.get(r++)):String.fromCharCode((15&o)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,o="",i=e;i<t;)n=this.get(i++),r=this.get(i++),o+=String.fromCharCode(n<<8|r);return o},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),o=(n?k:O).exec(r);return o?(n&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),r=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(r+=":"+o[5],o[6]&&(r+=":"+o[6],o[7]&&(r+="."+o[7]))),o[8]&&(r+=" UTC","Z"!=o[8]&&(r+=o[8],o[9]&&(r+=":"+o[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),o=r>127,i=o?255:0,a="";r==i&&++e<t;)r=this.get(e);if(0===(n=t-e))return o?-1:0;if(n>4){for(a=r,n<<=3;0==(128&(+a^i));)a=+a<<1,--n;a="("+n+" bit)\n"}o&&(r-=256);for(var s=new E(r),u=e+1;u<t;++u)s.mulAdd(256,this.get(u));return a+s.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),o="("+((t-e-1<<3)-r)+" bit)\n",i="",a=e+1;a<t;++a){for(var s=this.get(a),u=a==t-1?r:0,c=7;c>=u;--c)i+=s>>c&1?"1":"0";if(i.length>n)return o+S(i,n)}return o+i},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return S(this.parseStringISO(e,t),n);var r=t-e,o="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var i=e;i<t;++i)o+=this.hexByte(this.get(i));return r>n&&(o+=C),o},e.prototype.parseOID=function(e,t,n){for(var r="",o=new E,i=0,a=e;a<t;++a){var s=this.get(a);if(o.mulAdd(128,127&s),i+=7,!(128&s)){if(""===r)if((o=o.simplify())instanceof E)o.sub(80),r="2."+o.toString();else{var u=o<80?o<40?0:1:2;r=u+"."+(o-40*u)}else r+="."+o.toString();if(r.length>n)return S(r,n);o=new E,i=0}}return i>0&&(r+=".incomplete"),r},e}(),I=function(){function e(e,t,n,r,o){if(!(r instanceof P))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=o}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return S(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return S(this.stream.parseStringISO(t,t+n),e);case 30:return S(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substr(t,n)},e.decode=function(t){var n;n=t instanceof T?t:new T(t,0);var r=new T(n),o=new P(n),i=e.decodeLength(n),a=n.pos,s=a-r.pos,u=null,c=function(){var t=[];if(null!==i){for(var r=a+i;n.pos<r;)t[t.length]=e.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var o=e.decode(n);if(o.tag.isEOC())break;t[t.length]=o}i=a-n.pos}catch(s){throw new Error("Exception while decoding undefined length content: "+s)}return t};if(o.tagConstructed)u=c();else if(o.isUniversal()&&(3==o.tagNumber||4==o.tagNumber))try{if(3==o.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var l=0;l<u.length;++l)if(u[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(f){u=null}if(null===u){if(null===i)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(i)}return new e(r,s,i,o,u)},e}(),P=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!==(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new E;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),A=!0,R=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],N=(1<<26)/R[R.length-1],M=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,a="",s=this.t,u=this.DB-s*this.DB%t;if(s-- >0)for(u<this.DB&&(n=this[s]>>u)>0&&(i=!0,a=o(n));s>=0;)u<t?(n=(this[s]&(1<<u)-1)<<t-u,n|=this[--s]>>(u+=this.DB-t)):(n=this[s]>>(u-=t)&r,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(a+=o(n));return i?a:"0"},e.prototype.negate=function(){var t=B();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Y(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=B();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new D(t):new F(t),this.exp(e,n)},e.prototype.clone=function(){var e=B();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,o=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[o++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o,(o>0||n!=this.s)&&(t[o++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=B();return this.bitwiseTo(e,i,t),t},e.prototype.or=function(e){var t=B();return this.bitwiseTo(e,a,t),t},e.prototype.xor=function(e){var t=B();return this.bitwiseTo(e,s,t),t},e.prototype.andNot=function(e){var t=B();return this.bitwiseTo(e,u,t),t},e.prototype.not=function(){for(var e=B(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=B();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=B();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+c(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=l(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,a)},e.prototype.clearBit=function(e){return this.changeBit(e,u)},e.prototype.flipBit=function(e){return this.changeBit(e,s)},e.prototype.add=function(e){var t=B();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=B();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=B();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=B();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=B();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=B(),n=B();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,o=e.bitLength(),i=X(1);if(o<=0)return i;n=o<18?1:o<48?3:o<144?4:o<768?5:6,r=o<8?new D(t):t.isEven()?new L(t):new F(t);var a=[],s=3,u=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var l=B();for(r.sqrTo(a[1],l);s<=c;)a[s]=B(),r.mulTo(l,a[s-2],a[s]),s+=2}var f,d,p=e.t-1,h=!0,v=B();for(o=Y(e[p])-1;p>=0;){for(o>=u?f=e[p]>>o-u&c:(f=(e[p]&(1<<o+1)-1)<<u-o,p>0&&(f|=e[p-1]>>this.DB+o-u)),s=n;0==(1&f);)f>>=1,--s;if((o-=s)<0&&(o+=this.DB,--p),h)a[f].copyTo(i),h=!1;else{for(;s>1;)r.sqrTo(i,v),r.sqrTo(v,i),s-=2;s>0?r.sqrTo(i,v):(d=i,i=v,v=d),r.mulTo(v,a[f],i)}for(;p>=0&&0==(e[p]&1<<o);)r.sqrTo(i,v),d=i,i=v,v=d,--o<0&&(o=this.DB-1,--p)}return r.revert(i)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),o=this.clone(),i=X(1),a=X(0),s=X(0),u=X(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(t,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;o.isEven();)o.rShiftTo(1,o),n?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(t,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(o)>=0?(r.subTo(o,r),n&&i.subTo(s,i),a.subTo(u,a)):(o.subTo(r,o),n&&s.subTo(i,s),u.subTo(a,u))}return 0!=o.compareTo(e.ONE)?e.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},e.prototype.pow=function(e){return this.exp(e,new j)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var o=t.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return t;for(o<i&&(i=o),i>0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=R[R.length-1]){for(t=0;t<R.length;++t)if(n[0]==R[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<R.length;){for(var r=R[t],o=t+1;o<R.length&&r<N;)r*=R[o++];for(r=n.modInt(r);t<o;)if(r%R[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var o=t.length,i=!1,a=0;--o>=0;){var s=8==r?255&+t[o]:G(t,o);s<0?"-"==t.charAt(o)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&+t[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,o=(1<<r)-1,i=Math.floor(e/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)t[s+i+1]=this[s]>>r|a,a=(this[s]&o)<<n;for(s=i-1;s>=0;--s)t[s]=0;t[i]=a,t.t=this.t+i+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,o=this.DB-r,i=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&i)<<o,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&i)<<o),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),o=t.abs(),i=r.t;for(n.t=i+o.t;--i>=0;)n[i]=0;for(i=0;i<o.t;++i)n[i+r.t]=r.am(0,o[i],n,i,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var o=t.abs();if(!(o.t<=0)){var i=this.abs();if(i.t<o.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=B());var a=B(),s=this.s,u=t.s,c=this.DB-Y(o[o.t-1]);c>0?(o.lShiftTo(c,a),i.lShiftTo(c,r)):(o.copyTo(a),i.copyTo(r));var l=a.t,f=a[l-1];if(0!=f){var d=f*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),p=this.FV/d,h=(1<<this.F1)/d,v=1<<this.F2,m=r.t,g=m-l,y=null==n?B():n;for(a.dlShiftTo(g,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),e.ONE.dlShiftTo(l,y),y.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--g>=0;){var b=r[--m]==f?this.DM:Math.floor(r[m]*p+(r[m-1]+v)*h);if((r[m]+=a.am(0,b,r,g,0,l))<b)for(a.dlShiftTo(g,y),r.subTo(y,r);r[m]<--b;)r.subTo(y,r)}null!=n&&(r.drShiftTo(l,n),s!=u&&e.ZERO.subTo(n,n)),r.t=l,r.clamp(),c>0&&r.rShiftTo(c,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=B(),o=B(),i=n.convert(this),a=Y(t)-1;for(i.copyTo(r);--a>=0;)if(n.sqrTo(r,o),(t&1<<a)>0)n.mulTo(o,i,r);else{var s=r;r=o,o=s}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=X(n),o=B(),i=B(),a="";for(this.divRemTo(r,o,i);o.signum()>0;)a=(n+i.intValue()).toString(e).substr(1)+a,o.divRemTo(r,o,i);return i.intValue().toString(e)+a},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),o=Math.pow(n,r),i=!1,a=0,s=0,u=0;u<t.length;++u){var c=G(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(s=n*s+c,++a>=r&&(this.dMultiply(o),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),i&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),a,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var o=[],i=7&t;o.length=1+(t>>3),n.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,o,i=Math.min(e.t,this.t);for(r=0;r<i;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(o=e.s&this.DM,r=i;r<this.t;++r)n[r]=t(this[r],o);n.t=this.t}else{for(o=this.s&this.DM,r=i;r<e.t;++r)n[r]=t(o,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var o=n.t-this.t;r<o;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(o=Math.min(e.t,t);r<o;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var o=n.shiftRight(r);(t=t+1>>1)>R.length&&(t=R.length);for(var i=B(),a=0;a<t;++a){i.fromInt(R[Math.floor(Math.random()*R.length)]);var s=i.modPow(o,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(n)){for(var u=1;u++<r&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=B();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var o=n;n=r,r=o}var i=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)t(n);else{i<a&&(a=i),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var s=function e(){(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(e,0):(a>0&&r.lShiftTo(a,r),setTimeout((function(){t(r)}),0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,n,r,o){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),a,this),this.isEven()&&this.dAddOffset(1,0);var i=this,s=function r(){i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(e.ONE.shiftLeft(t-1),i),i.isProbablePrime(n)?setTimeout((function(){o()}),0):setTimeout(r,0)};setTimeout(s,0)}else{var u=[],c=7&t;u.length=1+(t>>3),n.nextBytes(u),c>0?u[0]&=(1<<c)-1:u[0]=0,this.fromString(u,256)}},e}(),j=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),D=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),F=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=B();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(M.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=B();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),L=function(){function e(e){this.m=e,this.r2=B(),this.q3=B(),M.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=B();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function B(){return new M(null)}function U(e,t){return new M(e,t)}function z(e,t,n,r,o,i){for(;--i>=0;){var a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o}function V(e,t,n,r,o,i){for(var a=32767&t,s=t>>15;--i>=0;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;o=((u=a*u+((32767&l)<<15)+n[r]+(1073741823&o))>>>30)+(l>>>15)+s*c+(o>>>30),n[r++]=1073741823&u}return o}function W(e,t,n,r,o,i){for(var a=16383&t,s=t>>14;--i>=0;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;o=((u=a*u+((16383&l)<<14)+n[r]+o)>>28)+(l>>14)+s*c,n[r++]=268435455&u}return o}A&&"Microsoft Internet Explorer"==t.appName?(M.prototype.am=V,_=30):A&&"Netscape"!=t.appName?(M.prototype.am=z,_=26):(M.prototype.am=W,_=28),M.prototype.DB=_,M.prototype.DM=(1<<_)-1,M.prototype.DV=1<<_;var H=52;M.prototype.FV=Math.pow(2,H),M.prototype.F1=H-_,M.prototype.F2=2*_-H;var $,q,K=[];for($="0".charCodeAt(0),q=0;q<=9;++q)K[$++]=q;for($="a".charCodeAt(0),q=10;q<36;++q)K[$++]=q;for($="A".charCodeAt(0),q=10;q<36;++q)K[$++]=q;function G(e,t){var n=K[e.charCodeAt(t)];return null==n?-1:n}function X(e){var t=B();return t.fromInt(e),t}function Y(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}M.ZERO=X(0),M.ONE=X(1);var J=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function Q(){return new J}var Z,ee,te=256,ne=null;if(null==ne){ne=[],ee=0;var re=void 0;if(n.crypto&&n.crypto.getRandomValues){var oe=new Uint32Array(256);for(n.crypto.getRandomValues(oe),re=0;re<oe.length;++re)ne[ee++]=255&oe[re]}var ie=function e(t){if(this.count=this.count||0,this.count>=256||ee>=te)n.removeEventListener?n.removeEventListener("mousemove",e,!1):n.detachEvent&&n.detachEvent("onmousemove",e);else try{var r=t.x+t.y;ne[ee++]=255&r,this.count+=1}catch(o){}};n.addEventListener?n.addEventListener("mousemove",ie,!1):n.attachEvent&&n.attachEvent("onmousemove",ie)}function ae(){if(null==Z){for(Z=Q();ee<te;){var e=Math.floor(65536*Math.random());ne[ee++]=255&e}for(Z.init(ne),ee=0;ee<ne.length;++ee)ne[ee]=0;ee=0}return Z.next()}var se=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=ae()},e}();function ue(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",o=0;o<n;o+=2)r+="ff";return U("0001"+r+"00"+e,16)}function ce(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var o=e.charCodeAt(r--);o<128?n[--t]=o:o>127&&o<2048?(n[--t]=63&o|128,n[--t]=o>>6|192):(n[--t]=63&o|128,n[--t]=o>>6&63|128,n[--t]=o>>12|224)}n[--t]=0;for(var i=new se,a=[];t>2;){for(a[0]=0;0==a[0];)i.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new M(n)}var le=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=U(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=ce(e,this.n.bitLength()+7>>3);if(null==t)return null;var n=this.doPublic(t);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=U(e,16),this.e=parseInt(t,16),this.d=U(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,o,i,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=U(e,16),this.e=parseInt(t,16),this.d=U(n,16),this.p=U(r,16),this.q=U(o,16),this.dmp1=U(i,16),this.dmq1=U(a,16),this.coeff=U(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new se,r=e>>1;this.e=parseInt(t,16);for(var o=new M(t,16);;){for(;this.p=new M(e-r,1,n),0!=this.p.subtract(M.ONE).gcd(o).compareTo(M.ONE)||!this.p.isProbablePrime(10););for(;this.q=new M(r,1,n),0!=this.q.subtract(M.ONE).gcd(o).compareTo(M.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var i=this.p;this.p=this.q,this.q=i}var a=this.p.subtract(M.ONE),s=this.q.subtract(M.ONE),u=a.multiply(s);if(0==u.gcd(o).compareTo(M.ONE)){this.n=this.p.multiply(this.q),this.d=o.modInverse(u),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=U(e,16),n=this.doPrivate(t);return null==n?null:fe(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new se,o=e>>1;this.e=parseInt(t,16);var i=new M(t,16),a=this,s=function t(){var s=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var r=a.p.subtract(M.ONE),o=a.q.subtract(M.ONE),s=r.multiply(o);0==s.gcd(i).compareTo(M.ONE)?(a.n=a.p.multiply(a.q),a.d=i.modInverse(s),a.dmp1=a.d.mod(r),a.dmq1=a.d.mod(o),a.coeff=a.q.modInverse(a.p),setTimeout((function(){n()}),0)):setTimeout(t,0)},u=function e(){a.q=B(),a.q.fromNumberAsync(o,1,r,(function(){a.q.subtract(M.ONE).gcda(i,(function(t){0==t.compareTo(M.ONE)&&a.q.isProbablePrime(10)?setTimeout(s,0):setTimeout(e,0)}))}))},c=function t(){a.p=B(),a.p.fromNumberAsync(e-o,1,r,(function(){a.p.subtract(M.ONE).gcda(i,(function(e){0==e.compareTo(M.ONE)&&a.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(t,0)}))}))};setTimeout(c,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,n){var r=ue(pe(n)+t(e).toString(),this.n.bitLength()/4);if(null==r)return null;var o=this.doPrivate(r);if(null==o)return null;var i=o.toString(16);return 0==(1&i.length)?i:"0"+i},e.prototype.verify=function(e,t,n){var r=U(t,16),o=this.doPublic(r);return null==o?null:he(o.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();function fe(e,t){for(var n=e.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var o="";++r<n.length;){var i=255&n[r];i<128?o+=String.fromCharCode(i):i>191&&i<224?(o+=String.fromCharCode((31&i)<<6|63&n[r+1]),++r):(o+=String.fromCharCode((15&i)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return o}var de={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function pe(e){return de[e]||""}function he(e){for(var t in de)if(de.hasOwnProperty(t)){var n=de[t],r=n.length;if(e.substr(0,r)==n)return e.substr(r)}return e}var ve={};ve.lang={extend:function(e,n,r){if(!n||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var o=function(){};if(o.prototype=n.prototype,e.prototype=new o,e.prototype.constructor=e,e.superclass=n.prototype,n.prototype.constructor==Object.prototype.constructor&&(n.prototype.constructor=n),r){var i;for(i in r)e.prototype[i]=r[i];var a=function(){},s=["toString","valueOf"];try{/MSIE/.test(t.userAgent)&&(a=function(e,t){for(i=0;i<s.length;i+=1){var n=s[i],r=t[n];"function"===typeof r&&r!=Object.prototype[n]&&(e[n]=r)}})}catch(u){}a(e.prototype,r)}}};var me={};"undefined"!=typeof me.asn1&&me.asn1||(me.asn1={}),me.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",o=0;o<n;o++)r+="f";t=new M(r,16).xor(e).add(M.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=me.asn1,n=t.DERBoolean,r=t.DERInteger,o=t.DERBitString,i=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,u=t.DEREnumerated,c=t.DERUTF8String,l=t.DERNumericString,f=t.DERPrintableString,d=t.DERTeletexString,p=t.DERIA5String,h=t.DERUTCTime,v=t.DERGeneralizedTime,m=t.DERSequence,g=t.DERSet,y=t.DERTaggedObject,b=t.ASN1Util.newObject,w=Object.keys(e);if(1!=w.length)throw"key of param shall be only one.";var x=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+x+":"))throw"undefined key: "+x;if("bool"==x)return new n(e[x]);if("int"==x)return new r(e[x]);if("bitstr"==x)return new o(e[x]);if("octstr"==x)return new i(e[x]);if("null"==x)return new a(e[x]);if("oid"==x)return new s(e[x]);if("enum"==x)return new u(e[x]);if("utf8str"==x)return new c(e[x]);if("numstr"==x)return new l(e[x]);if("prnstr"==x)return new f(e[x]);if("telstr"==x)return new d(e[x]);if("ia5str"==x)return new p(e[x]);if("utctime"==x)return new h(e[x]);if("gentime"==x)return new v(e[x]);if("seq"==x){for(var E=e[x],C=[],k=0;k<E.length;k++){var O=b(E[k]);C.push(O)}return new m({array:C})}if("set"==x){for(E=e[x],C=[],k=0;k<E.length;k++)O=b(E[k]),C.push(O);return new g({array:C})}if("tag"==x){var S=e[x];if("[object Array]"===Object.prototype.toString.call(S)&&3==S.length){var _=b(S[2]);return new y({tag:S[0],explicit:S[1],obj:_})}var T={};if(void 0!==S.explicit&&(T.explicit=S.explicit),void 0!==S.tag&&(T.tag=S.tag),void 0===S.obj)throw"obj shall be specified for 'tag'.";return T.obj=b(S.obj),new y(T)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},me.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),o=2;o<e.length;o+=2){var i=("00000000"+parseInt(e.substr(o,2),16).toString(2)).slice(-8);r+=i.substr(1,7),"0"==i.substr(0,1)&&(t=t+"."+new M(r,2).toString(10),r="")}return t},me.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new M(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var i="",a=0;a<o;a++)i+="0";for(r=i+r,a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),i=40*parseInt(o[0])+parseInt(o[1]);r+=t(i),o.splice(0,2);for(var a=0;a<o.length;a++)r+=n(o[a]);return r},me.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if("undefined"==typeof this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var t=this.hV.length/2,n=t.toString(16);if(n.length%2==1&&(n="0"+n),t<128)return n;var r=n.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+n},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},me.asn1.DERAbstractString=function(e){me.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("string"==typeof e?this.setString(e):"undefined"!=typeof e.str?this.setString(e.str):"undefined"!=typeof e.hex&&this.setStringHex(e.hex))},ve.lang.extend(me.asn1.DERAbstractString,me.asn1.ASN1Object),me.asn1.DERAbstractTime=function(e){me.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var r=this.zeroPadding,o=this.localDateToUTC(e),i=String(o.getFullYear());"utc"==t&&(i=i.substr(2,2));var a=i+r(String(o.getMonth()+1),2)+r(String(o.getDate()),2)+r(String(o.getHours()),2)+r(String(o.getMinutes()),2)+r(String(o.getSeconds()),2);if(!0===n){var s=o.getMilliseconds();if(0!=s){var u=r(String(s),3);a=a+"."+(u=u.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,r,o,i){var a=new Date(Date.UTC(e,t-1,n,r,o,i,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},ve.lang.extend(me.asn1.DERAbstractTime,me.asn1.ASN1Object),me.asn1.DERAbstractStructured=function(e){me.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,"undefined"!=typeof e&&"undefined"!=typeof e.array&&(this.asn1Array=e.array)},ve.lang.extend(me.asn1.DERAbstractStructured,me.asn1.ASN1Object),me.asn1.DERBoolean=function(){me.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},ve.lang.extend(me.asn1.DERBoolean,me.asn1.ASN1Object),me.asn1.DERInteger=function(e){me.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=me.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new M(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("undefined"!=typeof e.bigint?this.setByBigInteger(e.bigint):"undefined"!=typeof e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):"undefined"!=typeof e.hex&&this.setValueHex(e.hex))},ve.lang.extend(me.asn1.DERInteger,me.asn1.ASN1Object),me.asn1.DERBitString=function(e){if(void 0!==e&&"undefined"!==typeof e.obj){var t=me.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}me.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var o=e.substr(n,8),i=parseInt(o,2).toString(16);1==i.length&&(i="0"+i),r+=i}this.hTLV=null,this.isModified=!0,this.hV="0"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):"undefined"!=typeof e.hex?this.setHexValueIncludingUnusedBits(e.hex):"undefined"!=typeof e.bin?this.setByBinaryString(e.bin):"undefined"!=typeof e.array&&this.setByBooleanArray(e.array))},ve.lang.extend(me.asn1.DERBitString,me.asn1.ASN1Object),me.asn1.DEROctetString=function(e){if(void 0!==e&&"undefined"!==typeof e.obj){var t=me.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}me.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},ve.lang.extend(me.asn1.DEROctetString,me.asn1.DERAbstractString),me.asn1.DERNull=function(){me.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},ve.lang.extend(me.asn1.DERNull,me.asn1.ASN1Object),me.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new M(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var i="",a=0;a<o;a++)i+="0";for(r=i+r,a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n};me.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),i=40*parseInt(o[0])+parseInt(o[1]);r+=t(i),o.splice(0,2);for(var a=0;a<o.length;a++)r+=n(o[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(e){var t=me.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"===typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},ve.lang.extend(me.asn1.DERObjectIdentifier,me.asn1.ASN1Object),me.asn1.DEREnumerated=function(e){me.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=me.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new M(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("undefined"!=typeof e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):"undefined"!=typeof e.hex&&this.setValueHex(e.hex))},ve.lang.extend(me.asn1.DEREnumerated,me.asn1.ASN1Object),me.asn1.DERUTF8String=function(e){me.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},ve.lang.extend(me.asn1.DERUTF8String,me.asn1.DERAbstractString),me.asn1.DERNumericString=function(e){me.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},ve.lang.extend(me.asn1.DERNumericString,me.asn1.DERAbstractString),me.asn1.DERPrintableString=function(e){me.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},ve.lang.extend(me.asn1.DERPrintableString,me.asn1.DERAbstractString),me.asn1.DERTeletexString=function(e){me.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},ve.lang.extend(me.asn1.DERTeletexString,me.asn1.DERAbstractString),me.asn1.DERIA5String=function(e){me.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},ve.lang.extend(me.asn1.DERIA5String,me.asn1.DERAbstractString),me.asn1.DERUTCTime=function(e){me.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return"undefined"==typeof this.date&&"undefined"==typeof this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},ve.lang.extend(me.asn1.DERUTCTime,me.asn1.DERAbstractTime),me.asn1.DERGeneralizedTime=function(e){me.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},ve.lang.extend(me.asn1.DERGeneralizedTime,me.asn1.DERAbstractTime),me.asn1.DERSequence=function(e){me.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++)e+=this.asn1Array[t].getEncodedHex();return this.hV=e,this.hV}},ve.lang.extend(me.asn1.DERSequence,me.asn1.DERAbstractStructured),me.asn1.DERSet=function(e){me.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},"undefined"!=typeof e&&"undefined"!=typeof e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},ve.lang.extend(me.asn1.DERSet,me.asn1.DERAbstractStructured),me.asn1.DERTaggedObject=function(e){me.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof e&&("undefined"!=typeof e.tag&&(this.hT=e.tag),"undefined"!=typeof e.explicit&&(this.isExplicit=e.explicit),"undefined"!=typeof e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},ve.lang.extend(me.asn1.DERTaggedObject,me.asn1.ASN1Object);var ge=function(e){function t(n){var r=e.call(this)||this;return n&&("string"===typeof n?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return g(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?b.decode(e):w.unarmor(e),o=I.decode(r);if(3===o.sub.length&&(o=o.sub[2].sub[0]),9===o.sub.length){t=o.sub[1].getHexStringValue(),this.n=U(t,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var i=o.sub[3].getHexStringValue();this.d=U(i,16);var a=o.sub[4].getHexStringValue();this.p=U(a,16);var s=o.sub[5].getHexStringValue();this.q=U(s,16);var u=o.sub[6].getHexStringValue();this.dmp1=U(u,16);var c=o.sub[7].getHexStringValue();this.dmq1=U(c,16);var l=o.sub[8].getHexStringValue();this.coeff=U(l,16)}else{if(2!==o.sub.length)return!1;var f=o.sub[1].sub[0];t=f.sub[0].getHexStringValue(),this.n=U(t,16),n=f.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(d){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new me.asn1.DERInteger({int:0}),new me.asn1.DERInteger({bigint:this.n}),new me.asn1.DERInteger({int:this.e}),new me.asn1.DERInteger({bigint:this.d}),new me.asn1.DERInteger({bigint:this.p}),new me.asn1.DERInteger({bigint:this.q}),new me.asn1.DERInteger({bigint:this.dmp1}),new me.asn1.DERInteger({bigint:this.dmq1}),new me.asn1.DERInteger({bigint:this.coeff})]};return new me.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return p(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new me.asn1.DERSequence({array:[new me.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new me.asn1.DERNull]}),t=new me.asn1.DERSequence({array:[new me.asn1.DERInteger({bigint:this.n}),new me.asn1.DERInteger({int:this.e})]}),n=new me.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new me.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return p(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(le),ye=function(){function e(e){e=e||{},this.default_key_size=parseInt(e.default_key_size,10)||1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ge(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(h(e))}catch(t){return!1}},e.prototype.encrypt=function(e){try{return p(this.getKey().encrypt(e))}catch(t){return!1}},e.prototype.sign=function(e,t,n){try{return p(this.getKey().sign(e,t,n))}catch(r){return!1}},e.prototype.verify=function(e,t,n){try{return this.getKey().verify(e,h(t),n)}catch(r){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new ge,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version="3.0.0-rc.1",e}();n.JSEncrypt=ye,e.JSEncrypt=ye,e.default=ye,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";var r=n(56),o=n(196),i=n(317),a=n(202);function s(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=s(n(199));u.Axios=i,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=n(203),u.CancelToken=n(330),u.isCancel=n(198),u.all=function(e){return Promise.all(e)},u.spread=n(331),e.exports=u,e.exports.default=u},function(e,t,n){"use strict";var r=n(56),o=n(197),i=n(318),a=n(319),s=n(202);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,o){return this.request(r.merge(o||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(56);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(56),o=n(320),i=n(198),a=n(199);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(56);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(56);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(201);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(325),o=n(326);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(56),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(56);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(56);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(203);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=r(n(0)),u=o(n(10)),c=n(29),l=o(n(381)),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},d=function(e){return s.createElement(c.ConfigConsumer,null,(function(t){var n,r=t.getPrefixCls,o=t.direction,c=e.prefixCls,d=e.size,p=e.className,h=f(e,["prefixCls","size","className"]),v=r("btn-group",c),m="";switch(d){case"large":m="lg";break;case"small":m="sm";break;case"middle":case void 0:break;default:console.warn(new l.default(d))}var g=(0,u.default)(v,(n={},(0,a.default)(n,"".concat(v,"-").concat(m),m),(0,a.default)(n,"".concat(v,"-rtl"),"rtl"===o),n),p);return s.createElement("div",(0,i.default)({},h,{className:g}))}))};t.default=d},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function E(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case g:case m:case c:return e;default:return t}}case i:return t}}}function C(e){return E(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return C(e)||E(e)===f},t.isConcurrentMode=C,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===s||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===x||e.$$typeof===y)},t.typeOf=E},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ANT_MARK=void 0;var i=o(n(18)),a=o(n(66)),s=o(n(69)),u=o(n(70)),c=o(n(71)),l=r(n(0)),f=o(n(49)),d=n(162),p=o(n(208)),h="internalMark";t.ANT_MARK=h;var v=function(e){(0,u.default)(n,e);var t=(0,c.default)(n);function n(e){var r;return(0,a.default)(this,n),r=t.call(this,e),(0,d.changeConfirmLocale)(e.locale&&e.locale.Modal),(0,f.default)(e._ANT_MARK__===h,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),r}return(0,s.default)(n,[{key:"componentDidUpdate",value:function(e){var t=this.props.locale;e.locale!==t&&(0,d.changeConfirmLocale)(t&&t.Modal)}},{key:"componentWillUnmount",value:function(){(0,d.changeConfirmLocale)()}},{key:"render",value:function(){var e=this.props,t=e.locale,n=e.children;return l.createElement(p.default.Provider,{value:(0,i.default)((0,i.default)({},t),{exist:!0})},n)}}]),n}(l.Component);t.default=v,v.defaultProps={locale:{}}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(57),o=n(160);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?o(e):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};t.default=r},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(206)).default;t.default=o},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(109)).default;t.default=o},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.withConfigConsumer=function(e){return function(t){var n=function(n){return a.createElement(c,null,(function(r){var o=e.prefixCls,s=(0,r.getPrefixCls)(o,n.prefixCls);return a.createElement(t,(0,i.default)({},r,n,{prefixCls:s}))}))},r=t.constructor,o=r&&r.displayName||t.name||"Component";return n.displayName="withConfigConsumer(".concat(o,")"),n}},t.ConfigConsumer=t.ConfigContext=void 0;var i=o(n(18)),a=r(n(0)),s=o(n(347)),u=a.createContext({getPrefixCls:function(e,t){return t||(e?"ant-".concat(e):"ant")},renderEmpty:s.default});t.ConfigContext=u;var c=u.Consumer;t.ConfigConsumer=c},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(348)),s=n(29),u=function(e){return i.createElement(s.ConfigConsumer,null,(function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return i.createElement(a.default,{image:a.default.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return i.createElement(a.default,{image:a.default.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return i.createElement(a.default,null)}}))};t.default=u},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=r(n(0)),u=o(n(10)),c=n(29),l=o(n(88)),f=o(n(349)),d=o(n(350)),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},h=s.createElement(f.default,null),v=s.createElement(d.default,null),m=function(e){var t=e.className,n=e.prefixCls,r=e.image,o=void 0===r?h:r,f=e.description,d=e.children,m=e.imageStyle,g=p(e,["className","prefixCls","image","description","children","imageStyle"]),y=s.useContext(c.ConfigContext),b=y.getPrefixCls,w=y.direction;return s.createElement(l.default,{componentName:"Empty"},(function(e){var r,c=b("empty",n),l="undefined"!==typeof f?f:e.description,p="string"===typeof l?l:"empty",h=null;return h="string"===typeof o?s.createElement("img",{alt:p,src:o}):o,s.createElement("div",(0,i.default)({className:(0,u.default)(c,(r={},(0,a.default)(r,"".concat(c,"-normal"),o===v),(0,a.default)(r,"".concat(c,"-rtl"),"rtl"===w),r),t)},g),s.createElement("div",{className:"".concat(c,"-image"),style:m},h),l&&s.createElement("p",{className:"".concat(c,"-description")},l),d&&s.createElement("div",{className:"".concat(c,"-footer")},d))}))};m.PRESENTED_IMAGE_DEFAULT=h,m.PRESENTED_IMAGE_SIMPLE=v;var g=m;t.default=g},function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(0)),i=n(29),a=function(){var e=(0,o.useContext(i.ConfigContext).getPrefixCls)("empty-img-default");return o.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(24 31.67)"},o.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),o.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),o.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),o.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),o.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),o.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),o.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},o.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),o.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};t.default=a},function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(0)),i=n(29),a=function(){var e=(0,o.useContext(i.ConfigContext).getPrefixCls)("empty-img-simple");return o.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},o.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},o.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),o.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},o.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),o.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))};t.default=a},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(352)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="LoadingOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.setTwoToneColor=function(e){var t=(0,a.normalizeTwoToneColors)(e),n=(0,o.default)(t,2),r=n[0],s=n[1];return i.default.setTwoToneColors({primaryColor:r,secondaryColor:s})},t.getTwoToneColor=function(){var e=i.default.getTwoToneColors();if(!e.calculated)return e.primaryColor;return[e.primaryColor,e.secondaryColor]};var o=r(n(39)),i=r(n(210)),a=n(163)},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(356)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="ExclamationCircleFilled";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(358)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CloseCircleFilled";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(360)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CheckCircleFilled";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(362))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(363)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="InfoCircleFilled";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(){var n,r=null,o={add:function(e,t){null===r||void 0===r||r.component.add(e,t)}},f=(0,u.default)(o),d=(0,a.default)(f,2),p=d[0],h=d[1];var v=s.useRef({});return v.current.open=function(o){var a=o.prefixCls,s=n("message",a),u=o.key||(0,l.getKeyThenIncreaseKey)(),c=new Promise((function(n){var a=function(){return"function"===typeof o.onClose&&o.onClose(),n(!0)};e((0,i.default)((0,i.default)({},o),{prefixCls:s}),(function(e){var n=e.prefixCls,s=e.instance;r=s,p(t((0,i.default)((0,i.default)({},o),{key:u,onClose:a}),n))}))})),f=function(){r&&r.removeNotice(u)};return f.then=function(e,t){return c.then(e,t)},f.promise=c,f},["success","info","warning","error","loading"].forEach((function(e){return(0,l.attachTypeApi)(v.current,e)})),[v.current,s.createElement(c.ConfigConsumer,{key:"holder"},(function(e){return n=e.getPrefixCls,h}))]}};var i=o(n(18)),a=o(n(39)),s=r(n(0)),u=o(n(213)),c=n(29),l=n(20)},function(e,t,n){var r=n(205);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(66)),s=o(n(69)),u=o(n(70)),c=o(n(71)),l=r(n(0)),f=o(n(42)),d=o(n(10)),p=function(e){(0,u.default)(n,e);var t=(0,c.default)(n);function n(){var e;return(0,a.default)(this,n),(e=t.apply(this,arguments)).closeTimer=null,e.close=function(t){t&&t.stopPropagation(),e.clearCloseTimer();var n=e.props,r=n.onClose,o=n.noticeKey;r&&r(o)},e.startCloseTimer=function(){e.props.duration&&(e.closeTimer=window.setTimeout((function(){e.close()}),1e3*e.props.duration))},e.clearCloseTimer=function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)},e}return(0,s.default)(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(e){this.props.duration===e.duration&&this.props.updateMark===e.updateMark||this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,o=t.closable,a=t.closeIcon,s=t.style,u=t.onClick,c=t.children,p=t.holder,h="".concat(n,"-notice"),v=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{}),m=l.createElement("div",Object.assign({className:(0,d.default)(h,r,(0,i.default)({},"".concat(h,"-closable"),o)),style:s,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:u},v),l.createElement("div",{className:"".concat(h,"-content")},c),o?l.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(h,"-close")},a||l.createElement("span",{className:"".concat(h,"-close-x")})):null);return p?f.default.createPortal(m,p):m}}]),n}(l.Component);t.default=p,p.defaultProps={onClose:function(){},duration:1.5}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getInstance=void 0;var i,a,s=o(n(59)),u=o(n(18)),c=o(n(25)),l=r(n(0)),f=o(n(261)),d=o(n(112)),p=o(n(10)),h=o(n(214)),v=o(n(215)),m=o(n(216)),g=o(n(217)),y=o(n(380)),b=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},w={},x=4.5,E=24,C=24,k="ant-notification",O="topRight",S=!1;function _(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C;switch(e){case"topLeft":t={left:0,top:n,bottom:"auto"};break;case"topRight":t={right:0,top:n,bottom:"auto"};break;case"bottomLeft":t={left:0,top:"auto",bottom:r};break;default:t={right:0,top:"auto",bottom:r}}return t}function T(e,t){var n=e.placement,r=void 0===n?O:n,o=e.top,s=e.bottom,u=e.getContainer,h=void 0===u?i:u,v=e.closeIcon,m=void 0===v?a:v,g=e.prefixCls||k,y="".concat(g,"-notice"),b="".concat(g,"-").concat(r),x=w[b];if(x)Promise.resolve(x).then((function(e){t({prefixCls:y,instance:e})}));else{var E=l.createElement("span",{className:"".concat(g,"-close-x")},m||l.createElement(d.default,{className:"".concat(g,"-close-icon")})),C=(0,p.default)("".concat(g,"-").concat(r),(0,c.default)({},"".concat(g,"-rtl"),!0===S));w[b]=new Promise((function(e){f.default.newInstance({prefixCls:g,className:C,style:_(r,o,s),getContainer:h,closeIcon:E},(function(n){e(n),t({prefixCls:y,instance:n})}))}))}}var I={success:h.default,info:g.default,error:v.default,warning:m.default};function P(e,t){var n=void 0===e.duration?x:e.duration,r=null;e.icon?r=l.createElement("span",{className:"".concat(t,"-icon")},e.icon):e.type&&(r=l.createElement(I[e.type]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(e.type)}));var o=!e.description&&r?l.createElement("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:l.createElement("div",{className:r?"".concat(t,"-with-icon"):"",role:"alert"},r,l.createElement("div",{className:"".concat(t,"-message")},o,e.message),l.createElement("div",{className:"".concat(t,"-description")},e.description),e.btn?l.createElement("span",{className:"".concat(t,"-btn")},e.btn):null),duration:n,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},className:e.className}}var A={open:function(e){T(e,(function(t){var n=t.prefixCls;t.instance.notice(P(e,n))}))},close:function(e){Object.keys(w).forEach((function(t){return Promise.resolve(w[t]).then((function(t){t.removeNotice(e)}))}))},config:function(e){var t=e.duration,n=e.placement,r=e.bottom,o=e.top,s=e.getContainer,u=e.closeIcon,c=e.prefixCls;void 0!==c&&(k=c),void 0!==t&&(x=t),void 0!==n?O=n:e.rtl&&(O="topLeft"),void 0!==r&&(C=r),void 0!==o&&(E=o),void 0!==s&&(i=s),void 0!==u&&(a=u),void 0!==e.rtl&&(S=e.rtl)},destroy:function(){Object.keys(w).forEach((function(e){Promise.resolve(w[e]).then((function(e){e.destroy()})),delete w[e]}))}};["success","info","warning","error"].forEach((function(e){A[e]=function(t){return A.open((0,u.default)((0,u.default)({},t),{type:e}))}})),A.warn=A.warning,A.useNotification=(0,y.default)(T,P);t.getInstance=function(e){return b(void 0,void 0,void 0,s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))};var R=A;t.default=R},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(371)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CloseOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(373)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CheckCircleOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(375)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CloseCircleOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(377)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="ExclamationCircleOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(379)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="InfoCircleOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(){var n,r=null,o={add:function(e,t){null===r||void 0===r||r.component.add(e,t)}},l=(0,u.default)(o),f=(0,a.default)(l,2),d=f[0],p=f[1];var h=s.useRef({});return h.current.open=function(o){var a=o.prefixCls,s=n("notification",a);e((0,i.default)((0,i.default)({},o),{prefixCls:s}),(function(e){var n=e.prefixCls,i=e.instance;r=i,d(t(o,n))}))},["success","info","warning","error"].forEach((function(e){h.current[e]=function(t){return h.current.open((0,i.default)((0,i.default)({},t),{type:e}))}})),[h.current,s.createElement(c.ConfigConsumer,{key:"holder"},(function(e){return n=e.getPrefixCls,p}))]}};var i=o(n(18)),a=o(n(39)),s=r(n(0)),u=o(n(213)),c=n(29)},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(66));t.default=function e(t){return(0,o.default)(this,e),new Error("unreachable case: ".concat(JSON.stringify(t)))}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=o(n(66)),s=o(n(69)),u=o(n(160)),c=o(n(70)),l=o(n(71)),f=r(n(0)),d=o(n(383)),p=n(90),h=o(n(218)),v=n(29),m=n(76);function g(e){return!e||null===e.offsetParent}function y(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}var b=function(e){(0,c.default)(n,e);var t=(0,l.default)(n);function n(){var e;return(0,a.default)(this,n),(e=t.apply(this,arguments)).containerRef=f.createRef(),e.animationStart=!1,e.destroyed=!1,e.onClick=function(t,n){if(!(!t||g(t)||t.className.indexOf("-leave")>=0)){var r=e.props.insertExtraNode;e.extraNode=document.createElement("div");var o=(0,u.default)(e).extraNode,a=e.context.getPrefixCls;o.className="".concat(a(""),"-click-animating-node");var s=e.getAttributeName();t.setAttribute(s,"true"),i=i||document.createElement("style"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&y(n)&&!/rgba\((?:\d*, ){3}0\)/.test(n)&&"transparent"!==n&&(e.csp&&e.csp.nonce&&(i.nonce=e.csp.nonce),o.style.borderColor=n,i.innerHTML="\n [".concat(a(""),"-click-animating-without-extra-node='true']::after, .").concat(a(""),"-click-animating-node {\n --antd-wave-shadow-color: ").concat(n,";\n }"),document.body.contains(i)||document.body.appendChild(i)),r&&t.appendChild(o),d.default.addStartEventListener(t,e.onTransitionStart),d.default.addEndEventListener(t,e.onTransitionEnd)}},e.onTransitionStart=function(t){if(!e.destroyed){var n=e.containerRef.current;t&&t.target===n&&!e.animationStart&&e.resetEffect(n)}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!(t.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName&&!g(n.target)){e.resetEffect(t);var r=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout((function(){return e.onClick(t,r)}),0),h.default.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=(0,h.default)((function(){e.animationStart=!1}),10)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.renderWave=function(t){var n=t.csp,r=e.props.children;if(e.csp=n,!f.isValidElement(r))return r;var o=e.containerRef;return(0,p.supportRef)(r)&&(o=(0,p.composeRef)(r.ref,e.containerRef)),(0,m.cloneElement)(r,{ref:o})},e}return(0,s.default)(n,[{key:"componentDidMount",value:function(){var e=this.containerRef.current;e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var e=this.context.getPrefixCls,t=this.props.insertExtraNode;return"".concat(e(""),t?"-click-animating":"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(e){if(e&&e!==this.extraNode&&e instanceof Element){var t=this.props.insertExtraNode,n=this.getAttributeName();e.setAttribute(n,"false"),i&&(i.innerHTML=""),t&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),d.default.removeStartEventListener(e,this.onTransitionStart),d.default.removeEndEventListener(e,this.onTransitionEnd)}}},{key:"render",value:function(){return f.createElement(v.ConfigConsumer,null,this.renderWave)}}]),n}(f.Component);t.default=b,b.contextType=v.ConfigContext},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},o={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},i=[],a=[];function s(e,t,n){e.addEventListener(t,n,!1)}function u(e,t,n){e.removeEventListener(t,n,!1)}"undefined"!==typeof window&&"undefined"!==typeof document&&function(){var e=document.createElement("div").style;function t(t,n){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];for(var i in o)if(i in e){n.push(o[i]);break}}}"AnimationEvent"in window||(delete r.animationstart.animation,delete o.animationend.animation),"TransitionEvent"in window||(delete r.transitionstart.transition,delete o.transitionend.transition),t(r,i),t(o,a)}();var c={startEvents:i,addStartEventListener:function(e,t){0!==i.length?i.forEach((function(n){s(e,n,t)})):window.setTimeout(t,0)},removeStartEventListener:function(e,t){0!==i.length&&i.forEach((function(n){u(e,n,t)}))},endEvents:a,addEndEventListener:function(e,t){0!==a.length?a.forEach((function(n){s(e,n,t)})):window.setTimeout(t,0)},removeEndEventListener:function(e,t){0!==a.length&&a.forEach((function(n){u(e,n,t)}))}};t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(10)),s=r(n(45)),u=r(n(110)),c=function(){return{width:0,opacity:0,transform:"scale(0)"}},l=function(e){return{width:e.scrollWidth,opacity:1,transform:"scale(1)"}},f=function(e){var t=e.prefixCls,n=!!e.loading;return e.existIcon?i.createElement("span",{className:"".concat(t,"-loading-icon")},i.createElement(u.default,null)):i.createElement(s.default,{visible:n,motionName:"".concat(t,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:c,onAppearActive:l,onEnterStart:c,onEnterActive:l,onLeaveStart:l,onLeaveActive:c},(function(e,n){var r=e.className,o=e.style;return i.createElement("span",{className:"".concat(t,"-loading-icon"),style:o,ref:n},i.createElement(u.default,{className:(0,a.default)(r)}))}))};t.default=f},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(388);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"List",{enumerable:!0,get:function(){return l.List}}),Object.defineProperty(t,"useForm",{enumerable:!0,get:function(){return p.default}}),t.default=void 0;var i=o(n(18)),a=o(n(39)),s=o(n(25)),u=r(n(0)),c=o(n(10)),l=r(n(98)),f=n(29),d=n(78),p=o(n(391)),h=r(n(89)),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},m=function(e,t){var n,r=u.useContext(h.default),o=u.useContext(f.ConfigContext),m=o.getPrefixCls,g=o.direction,y=o.form,b=e.prefixCls,w=e.className,x=void 0===w?"":w,E=e.size,C=void 0===E?r:E,k=e.form,O=e.colon,S=e.labelAlign,_=e.labelCol,T=e.wrapperCol,I=e.hideRequiredMark,P=e.layout,A=void 0===P?"horizontal":P,R=e.scrollToFirstError,N=e.requiredMark,M=e.onFinishFailed,j=e.name,D=v(e,["prefixCls","className","size","form","colon","labelAlign","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name"]),F=(0,u.useMemo)((function(){return void 0!==N?N:y&&void 0!==y.requiredMark?y.requiredMark:!I}),[I,N,y]),L=m("form",b),B=(0,c.default)(L,(n={},(0,s.default)(n,"".concat(L,"-").concat(A),!0),(0,s.default)(n,"".concat(L,"-hide-required-mark"),!1===F),(0,s.default)(n,"".concat(L,"-rtl"),"rtl"===g),(0,s.default)(n,"".concat(L,"-").concat(C),C),n),x),U=(0,p.default)(k),z=(0,a.default)(U,1)[0],V=z.__INTERNAL__;V.name=j;var W=(0,u.useMemo)((function(){return{name:j,labelAlign:S,labelCol:_,wrapperCol:T,vertical:"vertical"===A,colon:O,requiredMark:F,itemRef:V.itemRef}}),[j,S,_,T,A,O,F]);u.useImperativeHandle(t,(function(){return z}));return u.createElement(h.SizeContextProvider,{size:C},u.createElement(d.FormContext.Provider,{value:W},u.createElement(l.default,(0,i.default)({id:j},D,{name:j,onFinishFailed:function(e){M&&M(e),R&&e.errorFields.length&&z.scrollToField(e.errorFields[0].name)},form:z,className:B}))))},g=u.forwardRef(m);t.default=g},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,u.useForm)(),n=(0,a.default)(t,1)[0],r=s.useRef({}),o=s.useMemo((function(){return e||(0,i.default)((0,i.default)({},n),{__INTERNAL__:{itemRef:function(e){return function(t){var n=f(e);t?r.current[n]=t:delete r.current[n]}}},scrollToField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,l.toArray)(e),r=(0,l.getFieldId)(n,o.__INTERNAL__.name),a=r?document.getElementById(r):null;a&&(0,c.default)(a,(0,i.default)({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:function(e){var t=f(e);return r.current[t]}})}),[e,n]);return[o]};var i=o(n(18)),a=o(n(39)),s=r(n(0)),u=n(98),c=o(n(604)),l=n(228);function f(e){return(0,l.toArray)(e).join("_")}},function(e,t,n){var r=n(393);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(394),o=n(114);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!==t&&n!==n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(395),o=n(234),i=n(429),a=n(433),s=n(455),u=n(169),c=n(235),l=n(236),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,m,g){var y=u(e),b=u(t),w=y?d:s(e),x=b?d:s(t),E=(w=w==f?p:w)==p,C=(x=x==f?p:x)==p,k=w==x;if(k&&c(e)){if(!c(t))return!1;y=!0,E=!1}if(k&&!E)return g||(g=new r),y||l(e)?o(e,t,n,v,m,g):i(e,t,w,n,v,m,g);if(!(1&n)){var O=E&&h.call(e,"__wrapped__"),S=C&&h.call(t,"__wrapped__");if(O||S){var _=O?e.value():e,T=S?t.value():t;return g||(g=new r),m(_,T,n,v,g)}}return!!k&&(g||(g=new r),a(e,t,n,v,m,g))}},function(e,t,n){var r=n(129),o=n(401),i=n(402),a=n(403),s=n(404),u=n(405);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(130),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(130);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(130);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(130);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(129);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(129),o=n(167),i=n(233);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(230),o=n(409),i=n(131),a=n(232),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:s).test(a(e))}},function(e,t,n){var r=n(168),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(u){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(410),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(67)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(413),o=n(129),i=n(167);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(414),o=n(415),i=n(416),a=n(417),s=n(418);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(132);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(132),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(132),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(132);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(133);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(133);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(133);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(133);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(233),o=n(425),i=n(426);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(168),o=n(430),i=n(229),a=n(234),s=n(431),u=n(432),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var h=1&r;if(p||(p=u),e.size!=t.size&&!h)return!1;var v=d.get(e);if(v)return v==t;r|=2,d.set(e,t);var m=a(p(e),p(t),r,c,f,d);return d.delete(e),m;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t,n){var r=n(67).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(434),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in t:o.call(t,d)))return!1}var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var v=!0;s.set(e,t),s.set(t,e);for(var m=u;++f<l;){var g=e[d=c[f]],y=t[d];if(i)var b=u?i(y,g,d,t,e,s):i(g,y,d,e,t,s);if(!(void 0===b?g===y||a(g,y,n,i,s):b)){v=!1;break}m||(m="constructor"==d)}if(v&&!m){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return s.delete(e),s.delete(t),v}},function(e,t,n){var r=n(435),o=n(437),i=n(440);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(436),o=n(169);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(438),o=n(439),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(441),o=n(450),i=n(454);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(442),o=n(443),i=n(169),a=n(235),s=n(446),u=n(236),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),d=!n&&!l&&!f&&u(e),p=n||l||f||d,h=p?r(e.length,String):[],v=h.length;for(var m in e)!t&&!c.call(e,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||h.push(m);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(444),o=n(114),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(113),o=n(114);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(113),o=n(237),i=n(114),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(231),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s}).call(this,n(154)(e))},function(e,t,n){var r=n(451),o=n(452),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(453)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(230),o=n(237);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(456),o=n(167),i=n(457),a=n(458),s=n(459),u=n(113),c=n(232),l="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",v=c(r),m=c(o),g=c(i),y=c(a),b=c(s),w=u;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=l||i&&w(i.resolve())!=f||a&&w(new a)!=d||s&&w(new s)!=p)&&(w=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return h;case m:return l;case g:return f;case y:return d;case b:return p}return t}),e.exports=w},function(e,t,n){var r=n(97)(n(67),"DataView");e.exports=r},function(e,t,n){var r=n(97)(n(67),"Promise");e.exports=r},function(e,t,n){var r=n(97)(n(67),"Set");e.exports=r},function(e,t,n){var r=n(97)(n(67),"WeakMap");e.exports=r},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HOOK_MARK=void 0;var i=o(n(0)),a=r(n(161));t.HOOK_MARK="RC_FORM_INTERNAL_HOOKS";var s=function(){(0,a.default)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},u=i.createContext({getFieldValue:s,getFieldsValue:s,getFieldError:s,getFieldsError:s,isFieldsTouched:s,isFieldTouched:s,isFieldValidating:s,isFieldsValidating:s,resetFields:s,setFields:s,setFieldsValue:s,validateFields:s,submit:s,getInternalHooks:function(){return s(),{dispatch:s,initEntityValue:s,registerField:s,useSubscribe:s,setInitialValues:s,setCallbacks:s,getFields:s,setValidateMessages:s,setPreserve:s}}});t.default=u},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(39)),u=o(n(57)),c=r(n(0)),l=o(n(10)),f=o(n(462)),d=o(n(171)),p=n(78),h=n(88),v=o(n(109)),m=o(n(99)),g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var y=function(e){var t=e.prefixCls,n=e.label,r=e.htmlFor,o=e.labelCol,y=e.labelAlign,b=e.colon,w=e.required,x=e.requiredMark,E=e.tooltip,C=(0,h.useLocaleReceiver)("Form"),k=(0,s.default)(C,1)[0];return n?c.createElement(p.FormContext.Consumer,{key:"label"},(function(e){var s,p,h=e.vertical,C=e.labelAlign,O=e.labelCol,S=e.colon,_=o||O||{},T=y||C,I="".concat(t,"-item-label"),P=(0,l.default)(I,"left"===T&&"".concat(I,"-left"),_.className),A=n,R=!0===b||!1!==S&&!1!==b;R&&!h&&"string"===typeof n&&""!==n.trim()&&(A=n.replace(/[:|\uff1a]\s*$/,""));var N=function(e){return e?"object"!==(0,u.default)(e)||c.isValidElement(e)?{title:e}:e:null}(E);if(N){var M=N.icon,j=void 0===M?c.createElement(f.default,null):M,D=g(N,["icon"]),F=c.createElement(m.default,D,c.cloneElement(j,{className:"".concat(t,"-item-tooltip")}));A=c.createElement(c.Fragment,null,A,F)}"optional"!==x||w||(A=c.createElement(c.Fragment,null,A,c.createElement("span",{className:"".concat(t,"-item-optional")},(null===k||void 0===k?void 0:k.optional)||(null===(p=v.default.Form)||void 0===p?void 0:p.optional))));var L=(0,l.default)((s={},(0,a.default)(s,"".concat(t,"-item-required"),w),(0,a.default)(s,"".concat(t,"-item-required-mark-optional"),"optional"===x),(0,a.default)(s,"".concat(t,"-item-no-colon"),!R),s));return c.createElement(d.default,(0,i.default)({},_,{className:P}),c.createElement("label",{htmlFor:r,className:L,title:"string"===typeof n?n:""},A))})):null};t.default=y},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(463))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(464)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="QuestionCircleOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.getOverflowOptions=c,t.default=function(e){var t=e.arrowWidth,n=void 0===t?5:t,r=e.horizontalArrowShift,a=void 0===r?16:r,s=e.verticalArrowShift,l=void 0===s?8:s,f=e.autoAdjustOverflow,d={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(a+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(l+n)]},topRight:{points:["br","tc"],offset:[a+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(l+n)]},bottomRight:{points:["tr","bc"],offset:[a+n,4]},rightBottom:{points:["bl","cr"],offset:[4,l+n]},bottomLeft:{points:["tl","bc"],offset:[-(a+n),4]},leftBottom:{points:["br","cl"],offset:[-4,l+n]}};return Object.keys(d).forEach((function(t){d[t]=e.arrowPointAtCenter?(0,o.default)((0,o.default)({},d[t]),{overflow:c(f),targetOffset:u}):(0,o.default)((0,o.default)({},i.placements[t]),{overflow:c(f)}),d[t].ignoreShake=!0})),d};var o=r(n(18)),i=n(466),a={adjustX:1,adjustY:1},s={adjustX:0,adjustY:0},u=[0,0];function c(e){return"boolean"===typeof e?e?a:s:(0,o.default)((0,o.default)({},s),e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.placements=void 0;var r={adjustX:1,adjustY:1},o=[0,0],i={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:o},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:o},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:o},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:o},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:o},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:o},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:o},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:o},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:o},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:o},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:o},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:o}};t.placements=i;var a=i;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PresetColorTypes=t.PresetStatusColorTypes=void 0;var r=n(77),o=(0,r.tuple)("success","processing","error","default","warning");t.PresetStatusColorTypes=o;var i=(0,r.tuple)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime");t.PresetColorTypes=i},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=r(n(0)),s=o(n(10)),u=o(n(110)),c=o(n(111)),l=o(n(164)),f=o(n(212)),d=o(n(171)),p=n(78),h=o(n(240)),v={success:l.default,warning:f.default,error:c.default,validating:u.default},m=function(e){var t=e.prefixCls,n=e.status,r=e.wrapperCol,o=e.children,u=e.help,c=e.errors,l=e.onDomErrorVisibleChange,f=e.hasFeedback,m=e._internalItemRender,g=e.validateStatus,y=e.extra,b="".concat(t,"-item"),w=a.useContext(p.FormContext),x=r||w.wrapperCol||{},E=(0,s.default)("".concat(b,"-control"),x.className);a.useEffect((function(){return function(){l(!1)}}),[]);var C=g&&v[g],k=f&&C?a.createElement("span",{className:"".concat(b,"-children-icon")},a.createElement(C,null)):null,O=(0,i.default)({},w);delete O.labelCol,delete O.wrapperCol;var S=a.createElement("div",{className:"".concat(b,"-control-input")},a.createElement("div",{className:"".concat(b,"-control-input-content")},o),k),_=a.createElement(p.FormItemPrefixContext.Provider,{value:{prefixCls:t,status:n}},a.createElement(h.default,{errors:c,help:u,onDomErrorVisibleChange:l})),T=y?a.createElement("div",{className:"".concat(b,"-extra")},y):null,I=m&&"pro_table_render"===m.mark&&m.render?m.render(e,{input:S,errorList:_,extra:T}):a.createElement(a.Fragment,null,S,_,T);return a.createElement(p.FormContext.Provider,{value:O},a.createElement(d.default,(0,i.default)({},x,{className:E}),I))};t.default=m},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=o.useRef({});"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t);return r.current.value};var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function i(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=i.useRef({errors:e,visible:!!e.length}),o=(0,a.default)(),s=function(){var n=r.current.visible,i=!!e.length,a=r.current.errors;r.current.errors=e,r.current.visible=i,n!==i?t(i):(a.length!==e.length||a.some((function(t,n){return t!==e[n]})))&&o()};i.useEffect((function(){if(!n){var e=setTimeout(s,10);return function(){return clearTimeout(e)}}}),[e]),n&&s();return[r.current.visible,r.current.errors]};var i=o(n(0)),a=r(n(115))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=a.useState(e),n=(0,i.default)(t,2),r=n[0],o=n[1],u=(0,a.useRef)(null),c=(0,a.useRef)([]),l=(0,a.useRef)(!1);return a.useEffect((function(){return function(){l.current=!0,s.default.cancel(u.current)}}),[]),[r,function(e){if(l.current)return;null===u.current&&(c.current=[],u.current=(0,s.default)((function(){u.current=null,o((function(e){var t=e;return c.current.forEach((function(e){t=e(t)})),t}))})));c.current.push(e)}]};var i=o(n(39)),a=r(n(0)),s=o(n(165))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=a.useContext(u.FormContext).itemRef,t=a.useRef({});return function(n,r){var o=r&&"object"===(0,i.default)(r)&&r.ref,a=n.join("_");return t.current.name===a&&t.current.originRef===o||(t.current.name=a,t.current.originRef=o,t.current.ref=(0,s.composeRef)(e(n),o)),t.current.ref}};var i=o(n(57)),a=r(n(0)),s=n(90),u=n(78)},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=r(n(0)),s=n(98),u=o(n(49)),c=n(29),l=n(78),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},d=function(e){var t=e.prefixCls,n=e.children,r=f(e,["prefixCls","children"]);(0,u.default)(!!r.name,"Form.List","Miss `name` prop.");var o=(0,a.useContext(c.ConfigContext).getPrefixCls)("form",t);return a.createElement(s.List,r,(function(e,t,r){return a.createElement(l.FormItemPrefixContext.Provider,{value:{prefixCls:o,status:"error"}},n(e.map((function(e){return(0,i.default)((0,i.default)({},e),{fieldKey:e.key})})),t,{errors:r.errors}))}))};t.default=d},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=r(n(0)),s=o(n(10)),u=n(29),c=function(e){return a.createElement(u.ConfigConsumer,null,(function(t){var n,r=t.getPrefixCls,o=t.direction,u=e.prefixCls,c=e.className,l=void 0===c?"":c,f=r("input-group",u),d=(0,s.default)(f,(n={},(0,i.default)(n,"".concat(f,"-lg"),"large"===e.size),(0,i.default)(n,"".concat(f,"-sm"),"small"===e.size),(0,i.default)(n,"".concat(f,"-compact"),e.compact),(0,i.default)(n,"".concat(f,"-rtl"),"rtl"===o),n),l);return a.createElement("span",{className:d,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children)}))};t.default=c},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(18)),s=r(n(0)),u=o(n(10)),c=n(90),l=o(n(242)),f=o(n(116)),d=o(n(50)),p=o(n(89)),h=n(29),v=n(76),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},g=s.forwardRef((function(e,t){var n,r,o=e.prefixCls,g=e.inputPrefixCls,y=e.className,b=e.size,w=e.suffix,x=e.enterButton,E=void 0!==x&&x,C=e.addonAfter,k=e.loading,O=e.disabled,S=e.onSearch,_=e.onChange,T=m(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange"]),I=s.useContext(h.ConfigContext),P=I.getPrefixCls,A=I.direction,R=s.useContext(p.default),N=b||R,M=s.useRef(null),j=function(e){var t;document.activeElement===(null===(t=M.current)||void 0===t?void 0:t.input)&&e.preventDefault()},D=function(e){var t;S&&S(null===(t=M.current)||void 0===t?void 0:t.input.value,e)},F=P("input-search",o),L=P("input",g),B="boolean"===typeof E||"undefined"===typeof E?s.createElement(l.default,null):null,U="".concat(F,"-button"),z=E||{},V=z.type&&!0===z.type.__ANT_BUTTON;r=V||"button"===z.type?(0,v.cloneElement)(z,(0,a.default)({onMouseDown:j,onClick:D,key:"enterButton"},V?{className:U,size:N}:{})):s.createElement(d.default,{className:U,type:E?"primary":void 0,size:N,disabled:O,key:"enterButton",onMouseDown:j,onClick:D,loading:k,icon:B},E),C&&(r=[r,(0,v.cloneElement)(C,{key:"addonAfter"})]);var W=(0,u.default)(F,(n={},(0,i.default)(n,"".concat(F,"-rtl"),"rtl"===A),(0,i.default)(n,"".concat(F,"-").concat(N),!!N),(0,i.default)(n,"".concat(F,"-with-button"),!!E),n),y);return s.createElement(f.default,(0,a.default)({ref:(0,c.composeRef)(M,t),onPressEnter:D},T,{size:N,prefixCls:L,addonAfter:r,suffix:w,onChange:function(e){e&&e.target&&"click"===e.type&&S&&S(e.target.value,e),_&&_(e)},className:W,disabled:O}))}));g.displayName="Search";var y=g;t.default=y},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(477)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="SearchOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t||{},r=n.defaultValue,i=n.value,s=n.onChange,u=n.postState,c=(p=o.useState((function(){return void 0!==i?i:void 0!==r?"function"===typeof r?r():r:"function"===typeof e?e():e})),h=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(p,h)||function(e,t){if(e){if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(p,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=c[0],f=c[1],d=void 0!==i?i:l;var p,h;u&&(d=u(d));var v=o.useRef(!0);return o.useEffect((function(){v.current?v.current=!1:void 0===i&&f(i)}),[i]),[d,function(e){f(e),d!==e&&s&&s(e,d)}]};var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(0));function i(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(39)),u=r(n(0)),c=o(n(10)),l=o(n(53)),f=o(n(244)),d=o(n(482)),p=n(29),h=o(n(116)),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},m={click:"onClick",hover:"onMouseOver"},g=u.forwardRef((function(e,t){var n=(0,u.useState)(!1),r=(0,s.default)(n,2),o=r[0],f=r[1],d=function(){e.disabled||f(!o)},g=function(n){var r=n.getPrefixCls,s=e.className,f=e.prefixCls,p=e.inputPrefixCls,g=e.size,y=e.visibilityToggle,b=v(e,["className","prefixCls","inputPrefixCls","size","visibilityToggle"]),w=r("input",p),x=r("input-password",f),E=y&&function(t){var n,r=e.action,i=e.iconRender,s=m[r]||"",c=(void 0===i?function(){return null}:i)(o),l=(n={},(0,a.default)(n,s,d),(0,a.default)(n,"className","".concat(t,"-icon")),(0,a.default)(n,"key","passwordIcon"),(0,a.default)(n,"onMouseDown",(function(e){e.preventDefault()})),(0,a.default)(n,"onMouseUp",(function(e){e.preventDefault()})),n);return u.cloneElement(u.isValidElement(c)?c:u.createElement("span",null,c),l)}(x),C=(0,c.default)(x,s,(0,a.default)({},"".concat(x,"-").concat(g),!!g)),k=(0,i.default)((0,i.default)({},(0,l.default)(b,["suffix","iconRender"])),{type:o?"text":"password",className:C,prefixCls:w,suffix:E});return g&&(k.size=g),u.createElement(h.default,(0,i.default)({ref:t},k))};return u.createElement(p.ConfigConsumer,null,g)}));g.defaultProps={action:"click",visibilityToggle:!0,iconRender:function(e){return e?u.createElement(f.default,null):u.createElement(d.default,null)}},g.displayName="Password";var y=g;t.default=y},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(481)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="EyeOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(483))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(484)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="EyeInvisibleOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"}},,function(e,t,n){"use strict";n(47),n(155)},function(e,t,n){"use strict";n(47),n(155)},function(e,t,n){},function(e,t,n){"use strict";var r=n(134),o=n(491),i=n(495),a=n(496)||0;function s(){return o(a)}e.exports=s,e.exports.generate=s,e.exports.seed=function(t){return r.seed(t),e.exports},e.exports.worker=function(t){return a=t,e.exports},e.exports.characters=function(e){return void 0!==e&&r.characters(e),r.shuffled()},e.exports.isValid=i},function(e,t,n){"use strict";var r=1;e.exports={nextValue:function(){return(r=(9301*r+49297)%233280)/233280},seed:function(e){r=e}}},function(e,t,n){"use strict";var r,o,i=n(492);n(134);e.exports=function(e){var t="",n=Math.floor(.001*(Date.now()-1567752802062));return n===o?r++:(r=0,o=n),t+=i(7),t+=i(e),r>0&&(t+=i(r)),t+=i(n)}},function(e,t,n){"use strict";var r=n(134),o=n(493),i=n(494);e.exports=function(e){for(var t,n=0,a="";!t;)a+=i(o,r.get(),1),t=e<Math.pow(16,n+1),n++;return a}},function(e,t,n){"use strict";var r,o="object"===typeof window&&(window.crypto||window.msCrypto);r=o&&o.getRandomValues?function(e){return o.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n<e;n++)t.push(Math.floor(256*Math.random()));return t},e.exports=r},function(e,t){e.exports=function(e,t,n){for(var r=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*r*n/t.length),i="";;)for(var a=e(o),s=o;s--;)if((i+=t[a[s]&r]||"").length===+n)return i}},function(e,t,n){"use strict";var r=n(134);e.exports=function(e){return!(!e||"string"!==typeof e||e.length<6)&&!new RegExp("[^"+r.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e)}},function(e,t,n){"use strict";e.exports=0},,,function(e,t,n){"use strict";var r=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SizeContextProvider=void 0;var o=r(n(0)),i=o.createContext("default");t.SizeContextProvider=function(e){var t=e.children,n=e.size;return o.createElement(i.Consumer,null,(function(e){return o.createElement(i.Provider,{value:n||e},t)}))};var a=i;t.default=a},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.className,n=e.direction,r=e.index,o=e.marginDirection,c=e.children,l=e.split,f=e.wrap,d=s.useContext(u.SpaceContext),p=d.horizontalSize,h=d.verticalSize,v=d.latestIndex,m={};"vertical"===n?r<v&&(m={marginBottom:p/(l?2:1)}):m=(0,a.default)((0,a.default)({},r<v&&(0,i.default)({},o,p/(l?2:1))),f&&{paddingBottom:h});if(null===c||void 0===c)return null;return s.createElement(s.Fragment,null,s.createElement("div",{className:t,style:m},c),r<v&&l&&s.createElement("span",{className:"".concat(t,"-split"),style:m},l))};var i=o(n(25)),a=o(n(18)),s=r(n(0)),u=n(104)},,function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(503))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(504)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="EllipsisOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(506))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(507)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="PlusOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"}},function(e,t,n){"use strict";n(47),n(509)},function(e,t,n){},,function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(512),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(65))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o=1,i={},a=!1,s=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){l(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&l(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){l(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){l(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(l,0,e)},u.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return i[o]=a,r(o),o++},u.clearImmediate=c}function c(e){delete i[e]}function l(e){if(a)setTimeout(l,0,e);else{var t=i[e];if(t){a=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{c(e),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,n(65),n(108))},,,,,,function(e,t,n){},,function(e,t,n){"use strict";n.r(t);var r=n(68),o=n(21),i=n(13),a=n(23),s=n(26),u=n(30),c=n(79),l=n(63),f=n(0),d=n.n(f),p=n(10),h=n.n(p);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var o=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var y=function(e){Object(u.a)(n,e);var t=g(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).handleChange=function(e){var t=r.props,n=t.disabled,o=t.onChange;n||("checked"in r.props||r.setState({checked:e.target.checked}),o&&o({target:m(m({},r.props),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e.nativeEvent}))},r.saveInput=function(e){r.input=e};var o="checked"in e?e.checked:e.defaultChecked;return r.state={checked:o},r}return Object(s.a)(n,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,a=t.className,s=t.style,u=t.name,c=t.id,l=t.type,f=t.disabled,p=t.readOnly,v=t.tabIndex,m=t.onClick,g=t.onFocus,y=t.onBlur,b=t.autoFocus,w=t.value,x=t.required,E=Object(o.a)(t,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","autoFocus","value","required"]),C=Object.keys(E).reduce((function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=E[t]),e}),{}),k=this.state.checked,O=h()(n,a,(e={},Object(i.a)(e,"".concat(n,"-checked"),k),Object(i.a)(e,"".concat(n,"-disabled"),f),e));return d.a.createElement("span",{className:O,style:s},d.a.createElement("input",Object(r.a)({name:u,id:c,type:l,required:x,readOnly:p,disabled:f,tabIndex:v,className:"".concat(n,"-input"),checked:!!k,onClick:m,onFocus:g,onBlur:y,onChange:this.handleChange,autoFocus:b,ref:this.saveInput,value:w},C)),d.a.createElement("span",{className:"".concat(n,"-inner")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return"checked"in e?m(m({},t),{},{checked:e.checked}):null}}]),n}(f.Component);y.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}},t.default=y},,function(e,t,n){"use strict";n(47),n(523),n(126),n(61)},function(e,t,n){},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(57)),s=r(n(0)),u=o(n(49)),c=o(n(135)),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},f=function(e){var t=e.ellipsis,n=l(e,["ellipsis"]);return(0,u.default)("object"!==(0,a.default)(t),"Typography.Text","`ellipsis` only supports boolean value."),s.createElement(c.default,(0,i.default)({},n,{ellipsis:!!t,component:"span"}))};t.default=f},function(e,t,n){"use strict";var r=n(526),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,u,c,l=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),c&&document.body.removeChild(c),a()}return l}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(528))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(529)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="EditOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(531)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CheckOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(533))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(534)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="CopyOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=r(n(0)),s=o(n(253)),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},c={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},l=a.forwardRef((function(e,t){var n=e.style,r=e.noStyle,o=e.disabled,l=u(e,["style","noStyle","disabled"]),f={};return r||(f=(0,i.default)({},c)),o&&(f.pointerEvents="none"),f=(0,i.default)((0,i.default)({},f),n),a.createElement("div",(0,i.default)({role:"button",tabIndex:0,ref:t},l,{onKeyDown:function(e){e.keyCode===s.default.ENTER&&e.preventDefault()},onKeyUp:function(t){var n=t.keyCode,r=e.onClick;n===s.default.ENTER&&r&&r()},style:f}))}));t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFlexSupported=t.isStyleSupport=void 0;var r=function(e){if("undefined"!==typeof window&&window.document&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};t.isStyleSupport=r;var o=r(["flex","webkitFlex","Flex","msFlex"]);t.isFlexSupported=o},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(39)),s=r(n(0)),u=o(n(10)),c=o(n(253)),l=o(n(538)),f=o(n(243)),d=function(e){var t=e.prefixCls,n=e["aria-label"],r=e.className,o=e.style,d=e.direction,p=e.maxLength,h=e.autoSize,v=void 0===h||h,m=e.value,g=e.onSave,y=e.onCancel,b=s.useRef(),w=s.useRef(!1),x=s.useRef(),E=s.useState(m),C=(0,a.default)(E,2),k=C[0],O=C[1];s.useEffect((function(){O(m)}),[m]),s.useEffect((function(){if(b.current&&b.current.resizableTextArea){var e=b.current.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}}),[b.current]);var S=function(){g(k.trim())},_=(0,u.default)(t,"".concat(t,"-edit-content"),(0,i.default)({},"".concat(t,"-rtl"),"rtl"===d),r);return s.createElement("div",{className:_,style:o},s.createElement(f.default,{ref:b,maxLength:p,value:k,onChange:function(e){var t=e.target;O(t.value.replace(/[\n\r]/g,""))},onKeyDown:function(e){var t=e.keyCode;w.current||(x.current=t)},onKeyUp:function(e){var t=e.keyCode,n=e.ctrlKey,r=e.altKey,o=e.metaKey,i=e.shiftKey;x.current!==t||w.current||n||r||o||i||(t===c.default.ENTER?S():t===c.default.ESC&&y())},onCompositionStart:function(){w.current=!0},onCompositionEnd:function(){w.current=!1},onBlur:function(){S()},"aria-label":n,autoSize:v}),s.createElement(l.default,{className:"".concat(t,"-edit-content-confirm")}))};t.default=d},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(539))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(540)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="EnterOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=n(42),s=o(n(0)),u=r(n(172)),c={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function l(e){if(!e)return 0;var t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}t.default=function(e,t,n,r,o){i||((i=document.createElement("div")).setAttribute("aria-hidden","true"),document.body.appendChild(i));var f,d=t.rows,p=t.suffix,h=void 0===p?"":p,v=window.getComputedStyle(e),m=(f=v,Array.prototype.slice.apply(f).map((function(e){return"".concat(e,": ").concat(f.getPropertyValue(e),";")})).join("")),g=l(v.lineHeight),y=Math.round(g*(d+1)+l(v.paddingTop)+l(v.paddingBottom));i.setAttribute("style",m),i.style.position="fixed",i.style.left="0",i.style.height="auto",i.style.minHeight="auto",i.style.maxHeight="auto",i.style.top="-999999px",i.style.zIndex="-1000",i.style.textOverflow="clip",i.style.whiteSpace="normal",i.style.webkitLineClamp="none";var b=function(e){var t=[];return e.forEach((function(e){var n=t[t.length-1];"string"===typeof e&&"string"===typeof n?t[t.length-1]+=e:t.push(e)})),t}((0,u.default)(n));function w(){return i.offsetHeight<y}if((0,a.render)(s.createElement("div",{style:c},s.createElement("span",{style:c},b,h),s.createElement("span",{style:c},r)),i),w())return(0,a.unmountComponentAtNode)(i),{content:n,text:i.innerHTML,ellipsis:!1};var x=Array.prototype.slice.apply(i.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter((function(e){return 8!==e.nodeType})),E=Array.prototype.slice.apply(i.childNodes[0].childNodes[1].cloneNode(!0).childNodes);(0,a.unmountComponentAtNode)(i);var C=[];i.innerHTML="";var k=document.createElement("span");i.appendChild(k);var O=document.createTextNode(o+h);function S(e){k.insertBefore(e,O)}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=Math.floor((n+r)/2),a=t.slice(0,i);if(e.textContent=a,n>=r-1)for(var s=r;s>=n;s-=1){var u=t.slice(0,s);if(e.textContent=u,w()||!u)return s===t.length?{finished:!1,reactNode:t}:{finished:!0,reactNode:u}}return w()?_(e,t,i,r,i):_(e,t,n,i,o)}function T(e,t){var n=e.nodeType;if(1===n)return S(e),w()?{finished:!1,reactNode:b[t]}:(k.removeChild(e),{finished:!0,reactNode:null});if(3===n){var r=e.textContent||"",o=document.createTextNode(r);return S(o),_(o,r)}return{finished:!1,reactNode:null}}return k.appendChild(O),E.forEach((function(e){i.appendChild(e)})),x.some((function(e,t){var n=T(e,t),r=n.finished,o=n.reactNode;return o&&C.push(o),r})),{content:C,text:i.innerHTML,ellipsis:!0}}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(57)),s=r(n(0)),u=o(n(49)),c=o(n(135)),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},f=function(e,t){var n=e.ellipsis,r=e.rel,o=l(e,["ellipsis","rel"]);(0,u.default)("object"!==(0,a.default)(n),"Typography.Link","`ellipsis` only supports boolean value.");var f=s.useRef(null);s.useImperativeHandle(t,(function(){var e;return null===(e=f.current)||void 0===e?void 0:e.contentRef.current}));var d=(0,i.default)((0,i.default)({},o),{rel:void 0===r&&"_blank"===o.target?"noopener noreferrer":r});return delete d.navigate,s.createElement(c.default,(0,i.default)({},d,{ref:f,ellipsis:!!n,component:"a"}))},d=s.forwardRef(f);t.default=d},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=r(n(0)),s=o(n(49)),u=o(n(135)),c=n(77),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},f=(0,c.tupleNum)(1,2,3,4,5),d=function(e){var t,n=e.level,r=void 0===n?1:n,o=l(e,["level"]);return-1!==f.indexOf(r)?t="h".concat(r):((0,s.default)(!1,"Typography.Title","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version."),t="h1"),a.createElement(u.default,(0,i.default)({},o,{component:t}))};t.default=d},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=r(n(0)),s=o(n(135)),u=function(e){return a.createElement(s.default,(0,i.default)({},e,{component:"div"}))};t.default=u},,function(e,t,n){},function(e,t,n){"use strict";n(47),n(548)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n(47),n(551)},function(e,t,n){},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,o=e.removeIcon,d=e.loading,p=e.multiple,h=e.prefixCls,v=n;n||(v=i.createElement(l.default,null));var m=null;if(void 0!==t)m=t;else if(d)m=i.createElement(s.default,{spin:!0});else{var g="".concat(h,"-suffix");m=function(e){var t=e.open,n=e.showSearch;return t&&n?i.createElement(f.default,{className:g}):i.createElement(a.default,{className:g})}}var y=null;y=void 0!==r?r:p?i.createElement(u.default,null):null;var b=null;b=void 0!==o?o:i.createElement(c.default,null);return{clearIcon:v,suffixIcon:m,itemIcon:y,removeIcon:b}};var i=o(n(0)),a=r(n(553)),s=r(n(110)),u=r(n(173)),c=r(n(112)),l=r(n(111)),f=r(n(242))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(554))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(555)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="DownOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(75)),a=o(n(25)),s=o(n(39)),u=o(n(18)),c=r(n(0)),l=r(n(45)),f=o(n(10)),d=o(n(110)),p=o(n(557)),h=o(n(560)),v=o(n(563)),m=n(76),g=n(258),y=o(n(566)),b=n(29),w=o(n(50)),x=o(n(115)),E=o(n(567)),C=(0,u.default)({},y.default);delete C.onAppearEnd,delete C.onEnterEnd,delete C.onLeaveEnd;var k=function(e,t){var n,r=e.listType,o=e.previewFile,g=e.onPreview,y=e.onDownload,k=e.onRemove,O=e.locale,S=e.iconRender,_=e.isImageUrl,T=e.prefixCls,I=e.items,P=void 0===I?[]:I,A=e.showPreviewIcon,R=e.showRemoveIcon,N=e.showDownloadIcon,M=e.removeIcon,j=e.downloadIcon,D=e.progress,F=e.appendAction,L=e.itemRender,B=(0,x.default)(),U=c.useState(!1),z=(0,s.default)(U,2),V=z[0],W=z[1];c.useEffect((function(){"picture"!==r&&"picture-card"!==r||(P||[]).forEach((function(e){"undefined"!==typeof document&&"undefined"!==typeof window&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",o&&o(e.originFileObj).then((function(t){e.thumbUrl=t||"",B()})))}))}),[r,P,o]),c.useEffect((function(){W(!0)}),[]);var H=function(e,t){if(g)return t.preventDefault(),g(e)},$=function(e){"function"===typeof y?y(e):e.url&&window.open(e.url)},q=function(e){k&&k(e)},K=function(e){if(S)return S(e,r);var t="uploading"===e.status,n=_&&_(e)?c.createElement(h.default,null):c.createElement(v.default,null),o=t?c.createElement(d.default,null):c.createElement(p.default,null);return"picture"===r?o=t?c.createElement(d.default,null):n:"picture-card"===r&&(o=t?O.uploading:n),o},G=function(e,t,n,r){var o={type:"text",size:"small",title:r,onClick:function(n){t(),(0,m.isValidElement)(e)&&e.props.onClick&&e.props.onClick(n)},className:"".concat(n,"-list-item-card-actions-btn")};if((0,m.isValidElement)(e)){var i=(0,m.cloneElement)(e,(0,u.default)((0,u.default)({},e.props),{onClick:function(){}}));return c.createElement(w.default,(0,u.default)({},o,{icon:i}))}return c.createElement(w.default,o,c.createElement("span",null,e))};c.useImperativeHandle(t,(function(){return{handlePreview:H,handleDownload:$}}));var X=c.useContext(b.ConfigContext),Y=X.getPrefixCls,J=X.direction,Q=Y("upload",T),Z=(0,f.default)((n={},(0,a.default)(n,"".concat(Q,"-list"),!0),(0,a.default)(n,"".concat(Q,"-list-").concat(r),!0),(0,a.default)(n,"".concat(Q,"-list-rtl"),"rtl"===J),n)),ee=(0,i.default)(P.map((function(e){return{key:e.uid,file:e}}))),te="picture-card"===r?"animate-inline":"animate",ne={motionName:"".concat(Q,"-").concat(te),keys:ee,motionAppear:V};return"picture-card"!==r&&(ne=(0,u.default)((0,u.default)({},C),ne)),c.createElement("div",{className:Z},c.createElement(l.CSSMotionList,(0,u.default)({},ne,{component:!1}),(function(e){var t=e.key,n=e.file,o=e.className,i=e.style;return c.createElement(E.default,{key:t,locale:O,prefixCls:Q,className:o,style:i,file:n,items:P,progress:D,listType:r,isImgUrl:_,showPreviewIcon:A,showRemoveIcon:R,showDownloadIcon:N,removeIcon:M,downloadIcon:j,iconRender:K,actionIconRender:G,itemRender:L,onPreview:H,onDownload:$,onClose:q})})),F&&c.createElement(l.default,ne,(function(e){var t=e.className,n=e.style;return(0,m.cloneElement)(F,(function(e){return{className:(0,f.default)(e.className,t),style:(0,u.default)((0,u.default)({},n),e.style)}}))})))},O=c.forwardRef(k);O.displayName="UploadList",O.defaultProps={listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:g.previewImage,isImageUrl:g.isImageUrl};var S=O;t.default=S},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(558))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(559)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="PaperClipOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(561))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(562)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="PictureTwoTone";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(564))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(565)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="FileTwoTone";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){return{height:0,opacity:0}},o=function(e){return{height:e.scrollHeight,opacity:1}},i=function(e,t){return"height"===t.propertyName},a={motionName:"ant-motion-collapse",onAppearStart:r,onEnterStart:r,onAppearActive:o,onEnterActive:o,onLeaveStart:function(e){return{height:e.offsetHeight}},onLeaveActive:r,onAppearEnd:i,onEnterEnd:i,onLeaveEnd:i,motionDeadline:500};t.default=a},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(25)),s=o(n(39)),u=r(n(0)),c=o(n(45)),l=o(n(10)),f=o(n(244)),d=o(n(568)),p=o(n(571)),h=o(n(99)),v=o(n(574)),m=u.forwardRef((function(e,t){var n,r=e.prefixCls,o=e.className,m=e.style,g=e.locale,y=e.listType,b=e.file,w=e.items,x=e.progress,E=e.iconRender,C=e.actionIconRender,k=e.itemRender,O=e.isImgUrl,S=e.showPreviewIcon,_=e.showRemoveIcon,T=e.showDownloadIcon,I=e.removeIcon,P=e.downloadIcon,A=e.onPreview,R=e.onDownload,N=e.onClose,M=u.useState(!1),j=(0,s.default)(M,2),D=j[0],F=j[1],L=u.useRef();u.useEffect((function(){return L.current=setTimeout((function(){F(!0)}),300),function(){window.clearTimeout(L.current)}}),[]);var B="".concat(r,"-span"),U=E(b),z=u.createElement("div",{className:"".concat(r,"-text-icon")},U);if("picture"===y||"picture-card"===y)if("uploading"===b.status||!b.thumbUrl&&!b.url){var V,W=(0,l.default)((V={},(0,a.default)(V,"".concat(r,"-list-item-thumbnail"),!0),(0,a.default)(V,"".concat(r,"-list-item-file"),"uploading"!==b.status),V));z=u.createElement("div",{className:W},U)}else{var H,$=(null===O||void 0===O?void 0:O(b))?u.createElement("img",{src:b.thumbUrl||b.url,alt:b.name,className:"".concat(r,"-list-item-image")}):U,q=(0,l.default)((H={},(0,a.default)(H,"".concat(r,"-list-item-thumbnail"),!0),(0,a.default)(H,"".concat(r,"-list-item-file"),O&&!O(b)),H));z=u.createElement("a",{className:q,onClick:function(e){return A(b,e)},href:b.url||b.thumbUrl,target:"_blank",rel:"noopener noreferrer"},$)}var K,G=(0,l.default)((n={},(0,a.default)(n,"".concat(r,"-list-item"),!0),(0,a.default)(n,"".concat(r,"-list-item-").concat(b.status),!0),(0,a.default)(n,"".concat(r,"-list-item-list-type-").concat(y),!0),n)),X="string"===typeof b.linkProps?JSON.parse(b.linkProps):b.linkProps,Y=_?C(("function"===typeof I?I(b):I)||u.createElement(d.default,null),(function(){return N(b)}),r,g.removeFile):null,J=T&&"done"===b.status?C(("function"===typeof P?P(b):P)||u.createElement(p.default,null),(function(){return R(b)}),r,g.downloadFile):null,Q="picture-card"!==y&&u.createElement("span",{key:"download-delete",className:(0,l.default)("".concat(r,"-list-item-card-actions"),{picture:"picture"===y})},J,Y),Z=(0,l.default)("".concat(r,"-list-item-name")),ee=b.url?[u.createElement("a",(0,i.default)({key:"view",target:"_blank",rel:"noopener noreferrer",className:Z,title:b.name},X,{href:b.url,onClick:function(e){return A(b,e)}}),b.name),Q]:[u.createElement("span",{key:"view",className:Z,onClick:function(e){return A(b,e)},title:b.name},b.name),Q],te=S?u.createElement("a",{href:b.url||b.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:b.url||b.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:function(e){return A(b,e)},title:g.previewFile},u.createElement(f.default,null)):null,ne="picture-card"===y&&"uploading"!==b.status&&u.createElement("span",{className:"".concat(r,"-list-item-actions")},te,"done"===b.status&&J,Y);K=b.response&&"string"===typeof b.response?b.response:b.error&&b.error.statusText||g.uploadError;var re=u.createElement("span",{className:B},z,ee),oe=u.createElement("div",{className:G},u.createElement("div",{className:"".concat(r,"-list-item-info")},re),ne,D&&u.createElement(c.default,{motionName:"fade",visible:"uploading"===b.status},(function(e){var t=e.className,n="percent"in b?u.createElement(v.default,(0,i.default)({},x,{type:"line",percent:b.percent})):null;return u.createElement("div",{className:(0,l.default)("".concat(r,"-list-item-progress"),t)},n)}))),ie=(0,l.default)("".concat(r,"-list-").concat(y,"-container"),o),ae="error"===b.status?u.createElement(h.default,{title:K,getPopupContainer:function(e){return e.parentNode}},oe):oe;return u.createElement("div",{className:ie,style:m,ref:t},k?k(ae,b,w):ae)}));t.default=m},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(569))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(570)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="DeleteOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(r=n(572))&&r.__esModule?r:{default:r};t.default=o,e.exports=o},function(e,t,n){"use strict";var r=n(9),o=n(12);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=r(n(573)),s=r(n(41)),u=function(e,t){return i.createElement(s.default,Object.assign({},e,{ref:t,icon:a.default}))};u.displayName="DownloadOutlined";var c=i.forwardRef(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"}},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(575)).default;t.default=o},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=o(n(18)),s=o(n(66)),u=o(n(69)),c=o(n(160)),l=o(n(70)),f=o(n(71)),d=r(n(0)),p=o(n(10)),h=o(n(53)),v=o(n(112)),m=o(n(173)),g=o(n(164)),y=o(n(111)),b=n(29),w=n(77),x=o(n(49)),E=o(n(576)),C=o(n(577)),k=o(n(578)),O=n(174),S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},_=((0,w.tuple)("line","circle","dashboard"),(0,w.tuple)("normal","exception","active","success")),T=function(e){(0,l.default)(n,e);var t=(0,f.default)(n);function n(){var e;return(0,s.default)(this,n),(e=t.apply(this,arguments)).renderProgress=function(t){var n,r,o=t.getPrefixCls,s=t.direction,u=(0,c.default)(e).props,l=u.prefixCls,f=u.className,v=u.size,m=u.type,g=u.steps,y=u.showInfo,b=u.strokeColor,w=S(u,["prefixCls","className","size","type","steps","showInfo","strokeColor"]),O=o("progress",l),_=e.getProgressStatus(),T=e.renderProcessInfo(O,_);(0,x.default)(!("successPercent"in u),"Progress","`successPercent` is deprecated. Please use `success.percent` instead."),"line"===m?r=g?d.createElement(k.default,(0,a.default)({},e.props,{strokeColor:"string"===typeof b?b:void 0,prefixCls:O,steps:g}),T):d.createElement(E.default,(0,a.default)({},e.props,{prefixCls:O,direction:s}),T):"circle"!==m&&"dashboard"!==m||(r=d.createElement(C.default,(0,a.default)({},e.props,{prefixCls:O,progressStatus:_}),T));var I=(0,p.default)(O,(n={},(0,i.default)(n,"".concat(O,"-").concat(("dashboard"===m?"circle":g&&"steps")||m),!0),(0,i.default)(n,"".concat(O,"-status-").concat(_),!0),(0,i.default)(n,"".concat(O,"-show-info"),y),(0,i.default)(n,"".concat(O,"-").concat(v),v),(0,i.default)(n,"".concat(O,"-rtl"),"rtl"===s),n),f);return d.createElement("div",(0,a.default)({},(0,h.default)(w,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeColor","strokeLinecap","percent","steps","success","successPercent"]),{className:I}),r)},e}return(0,u.default)(n,[{key:"getPercentNumber",value:function(){var e=this.props.percent,t=void 0===e?0:e,n=(0,O.getSuccessPercent)(this.props);return parseInt(void 0!==n?n.toString():t.toString(),10)}},{key:"getProgressStatus",value:function(){var e=this.props.status;return _.indexOf(e)<0&&this.getPercentNumber()>=100?"success":e||"normal"}},{key:"renderProcessInfo",value:function(e,t){var n,r=this.props,o=r.showInfo,i=r.format,a=r.type,s=r.percent,u=(0,O.getSuccessPercent)(this.props);if(!o)return null;var c="line"===a;return i||"exception"!==t&&"success"!==t?n=(i||function(e){return"".concat(e,"%")})((0,O.validProgress)(s),(0,O.validProgress)(u)):"exception"===t?n=c?d.createElement(y.default,null):d.createElement(v.default,null):"success"===t&&(n=c?d.createElement(g.default,null):d.createElement(m.default,null)),d.createElement("span",{className:"".concat(e,"-text"),title:"string"===typeof n?n:void 0},n)}},{key:"render",value:function(){return d.createElement(b.ConfigConsumer,null,this.renderProgress)}}]),n}(d.Component);t.default=T,T.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:null,size:"default",gapDegree:void 0,strokeLinecap:"round"}},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.handleGradient=t.sortGradient=void 0;var i=o(n(18)),a=r(n(0)),s=n(118),u=n(174),c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},l=function(e){var t=[];return Object.keys(e).forEach((function(n){var r=parseFloat(n.replace(/%/g,""));isNaN(r)||t.push({key:r,value:e[n]})})),(t=t.sort((function(e,t){return e.key-t.key}))).map((function(e){var t=e.key,n=e.value;return"".concat(n," ").concat(t,"%")})).join(", ")};t.sortGradient=l;var f=function(e,t){var n=e.from,r=void 0===n?s.presetPrimaryColors.blue:n,o=e.to,i=void 0===o?s.presetPrimaryColors.blue:o,a=e.direction,u=void 0===a?"rtl"===t?"to left":"to right":a,f=c(e,["from","to","direction"]);if(0!==Object.keys(f).length){var d=l(f);return{backgroundImage:"linear-gradient(".concat(u,", ").concat(d,")")}}return{backgroundImage:"linear-gradient(".concat(u,", ").concat(r,", ").concat(i,")")}};t.handleGradient=f;var d=function(e){var t=e.prefixCls,n=e.direction,r=e.percent,o=e.strokeWidth,s=e.size,c=e.strokeColor,l=e.strokeLinecap,d=e.children,p=e.trailColor,h=e.success,v=c&&"string"!==typeof c?f(c,n):{background:c},m=p?{backgroundColor:p}:void 0,g=(0,i.default)({width:"".concat((0,u.validProgress)(r),"%"),height:o||("small"===s?6:8),borderRadius:"square"===l?0:""},v),y=(0,u.getSuccessPercent)(e),b={width:"".concat((0,u.validProgress)(y),"%"),height:o||("small"===s?6:8),borderRadius:"square"===l?0:"",backgroundColor:null===h||void 0===h?void 0:h.strokeColor},w=void 0!==y?a.createElement("div",{className:"".concat(t,"-success-bg"),style:b}):null;return a.createElement(a.Fragment,null,a.createElement("div",{className:"".concat(t,"-outer")},a.createElement("div",{className:"".concat(t,"-inner"),style:m},a.createElement("div",{className:"".concat(t,"-bg"),style:g}),w)),d)};t.default=d},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=r(n(0)),s=n(601),u=n(118),c=o(n(10)),l=n(174);function f(e){var t=e.percent,n=e.success,r=e.successPercent,o=(0,l.validProgress)(t),i=(0,l.getSuccessPercent)({success:n,successPercent:r});return i?[(0,l.validProgress)(i),(0,l.validProgress)(o-(0,l.validProgress)(i))]:o}var d=function(e){var t=e.prefixCls,n=e.width,r=e.strokeWidth,o=e.trailColor,d=e.strokeLinecap,p=e.gapPosition,h=e.gapDegree,v=e.type,m=e.children,g=n||120,y={width:g,height:g,fontSize:.15*g+6},b=r||6,w=p||"dashboard"===v&&"bottom"||"top",x=function(e){var t=e.success,n=e.strokeColor,r=e.successPercent,o=n||null;return(0,l.getSuccessPercent)({success:t,successPercent:r})?[u.presetPrimaryColors.green,o]:o}(e),E="[object Object]"===Object.prototype.toString.call(x),C=(0,c.default)("".concat(t,"-inner"),(0,i.default)({},"".concat(t,"-circle-gradient"),E));return a.createElement("div",{className:C,style:y},a.createElement(s.Circle,{percent:f(e),strokeWidth:b,trailWidth:b,strokeColor:x,strokeLinecap:d,trailColor:o,prefixCls:t,gapDegree:h||0===h?h:"dashboard"===v?75:void 0,gapPosition:w}),m)};t.default=d},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(25)),a=r(n(0)),s=o(n(10)),u=function(e){for(var t=e.size,n=e.steps,r=e.percent,o=void 0===r?0:r,u=e.strokeWidth,c=void 0===u?8:u,l=e.strokeColor,f=e.trailColor,d=e.prefixCls,p=e.children,h=Math.floor(n*(o/100)),v="small"===t?2:14,m=[],g=0;g<n;g+=1)m.push(a.createElement("div",{key:g,className:(0,s.default)("".concat(d,"-steps-item"),(0,i.default)({},"".concat(d,"-steps-item-active"),g<=h-1)),style:{backgroundColor:g<=h-1?l:f,width:v,height:c}}));return a.createElement("div",{className:"".concat(d,"-steps-outer")},m,p)};t.default=u},function(e,t,n){"use strict";var r=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.useRef)(e),r=(0,a.default)(),s=(0,o.useRef)();function u(e){n.current=e,r()}function c(){i.default.cancel(s.current)}return(0,o.useEffect)((function(){var e;t&&(e=t,c(),s.current=(0,i.default)((function(){u(e)})))}),[t]),(0,o.useEffect)((function(){return function(){c()}}),[]),[function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return t||n.current;return n.current},u]};var o=n(0),i=r(n(165)),a=r(n(115))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(0,s.default)(),t=(0,i.default)(e,2),n=t[0],r=t[1];function o(e){return function(t){l+=1;var n,o=a.createRef(),i=a.createElement(u.default,{key:"modal-".concat(l),config:e(t),ref:o,afterClose:function(){n()}});return n=r(i),{destroy:function(){o.current&&o.current.destroy()},update:function(e){o.current&&o.current.update(e)}}}}return[{info:o(c.withInfo),success:o(c.withSuccess),error:o(c.withError),warning:o(c.withWarn),confirm:o(c.withConfirm)},a.createElement(a.Fragment,null,n)]};var i=o(n(39)),a=r(n(0)),s=o(n(581)),u=o(n(582)),c=n(260),l=0},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=s.useState([]),t=(0,a.default)(e,2),n=t[0],r=t[1];return[n,function(e){return r((function(t){return[].concat((0,i.default)(t),[e])})),function(){r((function(t){return t.filter((function(t){return t!==e}))}))}}]};var i=o(n(75)),a=o(n(39)),s=r(n(0))},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(39)),s=r(n(0)),u=o(n(259)),c=o(n(109)),l=o(n(88)),f=n(29),d=function(e,t){var n=e.afterClose,r=e.config,o=s.useState(!0),d=(0,a.default)(o,2),p=d[0],h=d[1],v=s.useState(r),m=(0,a.default)(v,2),g=m[0],y=m[1],b=s.useContext(f.ConfigContext),w=b.direction,x=b.getPrefixCls,E=x("modal"),C=x();function k(){h(!1);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.some((function(e){return e&&e.triggerCancel}));g.onCancel&&r&&g.onCancel()}return s.useImperativeHandle(t,(function(){return{destroy:k,update:function(e){y((function(t){return(0,i.default)((0,i.default)({},t),e)}))}}})),s.createElement(l.default,{componentName:"Modal",defaultLocale:c.default.Modal},(function(e){return s.createElement(u.default,(0,i.default)({prefixCls:E,rootPrefixCls:C},g,{close:k,visible:p,afterClose:n,okText:g.okText||(g.okCancel?e.okText:e.justOkText),direction:w,cancelText:g.cancelText||e.cancelText}))}))},p=s.forwardRef(d);t.default=p},function(e,t,n){"use strict";var r=n(12),o=n(9);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(18)),a=o(n(39)),s=r(n(0)),u=o(n(50)),c=n(159),l=function(e){var t=s.useRef(!1),n=s.useRef(),r=s.useState(!1),o=(0,a.default)(r,2),l=o[0],f=o[1];s.useEffect((function(){var t;if(e.autoFocus){var r=n.current;t=setTimeout((function(){return r.focus()}))}return function(){t&&clearTimeout(t)}}),[]);var d=e.type,p=e.children,h=e.prefixCls,v=e.buttonProps;return s.createElement(u.default,(0,i.default)({},(0,c.convertLegacyProps)(d),{onClick:function(){var n=e.actionFn,r=e.closeModal;if(!t.current)if(t.current=!0,n){var o;if(n.length)o=n(r),t.current=!1;else if(!(o=n()))return void r();!function(n){var r=e.closeModal;n&&n.then&&(f(!0),n.then((function(){r.apply(void 0,arguments)}),(function(e){console.error(e),f(!1),t.current=!1})))}(o)}else r()},loading:l,prefixCls:h},v,{ref:n}),p)};t.default=l},function(e,t,n){"use strict";n(47),n(585)},function(e,t,n){},function(e,t,n){var r=n(131),o=n(587),i=n(588),a=Math.max,s=Math.min;e.exports=function(e,t,n){var u,c,l,f,d,p,h=0,v=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=u,r=c;return u=c=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(x,t),v?y(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=l}function x(){var e=o();if(w(e))return E(e);d=setTimeout(x,function(e){var n=t-(e-p);return m?s(n,l-(e-h)):n}(e))}function E(e){return d=void 0,g&&u?y(e):(u=c=void 0,f)}function C(){var e=o(),n=w(e);if(u=arguments,c=this,p=e,n){if(void 0===d)return b(p);if(m)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(v=!!n.leading,l=(m="maxWait"in n)?a(i(n.maxWait)||0,t):l,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=c=d=void 0},C.flush=function(){return void 0===d?f:E(o())},C}},function(e,t,n){var r=n(67);e.exports=function(){return r.Date.now()}},function(e,t,n){var r=n(131),o=n(589),i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){var r=n(113),o=n(114);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"Option",(function(){return oe})),n.d(t,"OptGroup",(function(){return ae}));var r=n(23),o=n(26),i=n(30),a=n(36),s=n(0),u=n(13),c=n(21),l=n(11),f=n(22),d=n(81);var p=n(10),h=n.n(p),v=n(72);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=s.forwardRef((function(e,t){var n=e.height,r=e.offset,o=e.children,i=e.prefixCls,a=e.onInnerResize,u={},c={display:"flex",flexDirection:"column"};return void 0!==r&&(u={height:n,position:"relative",overflow:"hidden"},c=g(g({},c),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),s.createElement("div",{style:u},s.createElement(v.default,{onResize:function(e){e.offsetHeight&&a&&a()}},s.createElement("div",{style:c,className:h()(y({},"".concat(i,"-holder-inner"),i)),ref:t},o)))}));b.displayName="Filler";var w=b,x=n(34);function E(e){return(E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==E(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function I(e){return"touches"in e?e.touches[0].pageY:e.pageY}var P=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(i,e);var t,n,r,o=S(i);function i(){var e;return C(this,i),(e=o.apply(this,arguments)).moveRaf=null,e.scrollbarRef=s.createRef(),e.thumbRef=s.createRef(),e.visibleTimeout=null,e.state={dragging:!1,pageY:null,startTop:null,visible:!1},e.delayHidden=function(){clearTimeout(e.visibleTimeout),e.setState({visible:!0}),e.visibleTimeout=setTimeout((function(){e.setState({visible:!1})}),2e3)},e.onScrollbarTouchStart=function(e){e.preventDefault()},e.onContainerMouseDown=function(e){e.stopPropagation(),e.preventDefault()},e.patchEvents=function(){window.addEventListener("mousemove",e.onMouseMove),window.addEventListener("mouseup",e.onMouseUp),e.thumbRef.current.addEventListener("touchmove",e.onMouseMove),e.thumbRef.current.addEventListener("touchend",e.onMouseUp)},e.removeEvents=function(){window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp),e.scrollbarRef.current.removeEventListener("touchstart",e.onScrollbarTouchStart),e.thumbRef.current.removeEventListener("touchstart",e.onMouseDown),e.thumbRef.current.removeEventListener("touchmove",e.onMouseMove),e.thumbRef.current.removeEventListener("touchend",e.onMouseUp),x.a.cancel(e.moveRaf)},e.onMouseDown=function(t){var n=e.props.onStartMove;e.setState({dragging:!0,pageY:I(t),startTop:e.getTop()}),n(),e.patchEvents(),t.stopPropagation(),t.preventDefault()},e.onMouseMove=function(t){var n=e.state,r=n.dragging,o=n.pageY,i=n.startTop,a=e.props.onScroll;if(x.a.cancel(e.moveRaf),r){var s=i+(I(t)-o),u=e.getEnableScrollRange(),c=e.getEnableHeightRange(),l=c?s/c:0,f=Math.ceil(l*u);e.moveRaf=Object(x.a)((function(){a(f)}))}},e.onMouseUp=function(){var t=e.props.onStopMove;e.setState({dragging:!1}),t(),e.removeEvents()},e.getSpinHeight=function(){var t=e.props,n=t.height,r=n/t.count*10;return r=Math.max(r,20),r=Math.min(r,n/2),Math.floor(r)},e.getEnableScrollRange=function(){var t=e.props;return t.scrollHeight-t.height||0},e.getEnableHeightRange=function(){return e.props.height-e.getSpinHeight()||0},e.getTop=function(){var t=e.props.scrollTop,n=e.getEnableScrollRange(),r=e.getEnableHeightRange();return 0===t||0===n?0:t/n*r},e.getVisible=function(){var t=e.state.visible,n=e.props;return!(n.height>=n.scrollHeight)&&t},e}return t=i,(n=[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e,t,n,r=this.state.dragging,o=this.props.prefixCls,i=this.getSpinHeight(),a=this.getTop(),u=this.getVisible();return s.createElement("div",{ref:this.scrollbarRef,className:"".concat(o,"-scrollbar"),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:u?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},s.createElement("div",{ref:this.thumbRef,className:h()("".concat(o,"-scrollbar-thumb"),(e={},t="".concat(o,"-scrollbar-thumb-moving"),n=r,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),style:{width:"100%",height:i,top:a,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}])&&k(t.prototype,n),r&&k(t,r),i}(s.Component);function A(e){var t=e.children,n=e.setRef,r=s.useCallback((function(e){n(e)}),[]);return s.cloneElement(t,{ref:r})}var R=n(80);function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var M=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maps={},this.maps.prototype=null}var t,n,r;return t=e,(n=[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}])&&N(t.prototype,n),r&&N(t,r),e}();function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e){return(F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U(e,t,n){var r=L(s.useState(e),2),o=r[0],i=r[1],a=L(s.useState(null),2),u=a[0],c=a[1];return s.useEffect((function(){var r=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i<a?(r=e,o=t):(r=t,o=e);var s={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):s}for(var c=null,l=1!==Math.abs(i-a),f=0;f<o.length;f+=1){var d=u(r[f]);if(d!==u(o[f])){c=f,l=l||d!==u(o[f+1]);break}}return null===c?null:{index:c,multiple:l}}(o||[],e||[],t);void 0!==(null===r||void 0===r?void 0:r.index)&&(null===n||void 0===n||n(r.index),c(e[r.index])),i(e)}),[e]),[u]}function z(e){return(z="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var V="object"===("undefined"===typeof navigator?"undefined":z(navigator))&&/Firefox/i.test(navigator.userAgent),W=function(e,t){var n=Object(s.useRef)(!1),r=Object(s.useRef)(null);function o(){clearTimeout(r.current),n.current=!0,r.current=setTimeout((function(){n.current=!1}),50)}var i=Object(s.useRef)({top:e,bottom:t});return i.current.top=e,i.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e<0&&i.current.top||e>0&&i.current.bottom;return t&&a?(clearTimeout(r.current),n.current=!1):a&&!n.current||o(),!n.current&&a}};function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Y=[],J={overflowY:"auto",overflowAnchor:"none"};var Q=s.forwardRef((function(e,t){var n=e.prefixCls,r=void 0===n?"rc-virtual-list":n,o=e.className,i=e.height,a=e.itemHeight,u=e.fullHeight,c=void 0===u||u,l=e.style,f=e.data,d=e.children,p=e.itemKey,v=e.virtual,m=e.component,g=void 0===m?"div":m,y=e.onScroll,b=X(e,["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll"]),E=!(!1===v||!i||!a),C=E&&f&&a*f.length>i,k=K(Object(s.useState)(0),2),O=k[0],S=k[1],_=K(Object(s.useState)(!1),2),T=_[0],I=_[1],N=h()(r,o),D=f||Y,L=Object(s.useRef)(),B=Object(s.useRef)(),z=Object(s.useRef)(),H=s.useCallback((function(e){return"function"===typeof p?p(e):e[p]}),[p]),G={getKey:H};function Q(e){S((function(t){var n=function(e){var t=Math.max(e,0);Number.isNaN(pe.current)||(t=Math.min(t,pe.current));return t}("function"===typeof e?e(t):e);return L.current.scrollTop=n,n}))}var Z=Object(s.useRef)({start:0,end:D.length}),ee=Object(s.useRef)(),te=K(U(D,H),1)[0];ee.current=te;var ne=K(function(e,t,n){var r=j(s.useState(0),2),o=r[0],i=r[1],a=Object(s.useRef)(new Map),u=Object(s.useRef)(new M),c=Object(s.useRef)(0);function l(){c.current+=1;var e=c.current;Promise.resolve().then((function(){e===c.current&&(a.current.forEach((function(e,t){if(e&&e.offsetParent){var n=Object(R.a)(e),r=n.offsetHeight;u.current.get(t)!==r&&u.current.set(t,n.offsetHeight)}})),i((function(e){return e+1})))}))}return[function(r,o){var i=e(r),s=a.current.get(i);o?(a.current.set(i,o),l()):a.current.delete(i),!s!==!o&&(o?null===t||void 0===t||t(r):null===n||void 0===n||n(r))},l,u.current,o]}(H,null,null),4),re=ne[0],oe=ne[1],ie=ne[2],ae=ne[3],se=s.useMemo((function(){if(!E)return{scrollHeight:void 0,start:0,end:D.length-1,offset:void 0};var e;if(!C)return{scrollHeight:(null===(e=B.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:D.length-1,offset:void 0};for(var t,n,r,o=0,s=D.length,u=0;u<s;u+=1){var c=D[u],l=H(c),f=ie.get(l),d=o+(void 0===f?a:f);d>=O&&void 0===t&&(t=u,n=o),d>O+i&&void 0===r&&(r=u),o=d}return void 0===t&&(t=0,n=0),void 0===r&&(r=D.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,D.length),offset:n}}),[C,E,O,D,ae,i]),ue=se.scrollHeight,ce=se.start,le=se.end,fe=se.offset;Z.current.start=ce,Z.current.end=le;var de=ue-i,pe=Object(s.useRef)(de);pe.current=de;var he=O<=0,ve=O>=de,me=W(he,ve),ge=K(function(e,t,n,r){var o=Object(s.useRef)(0),i=Object(s.useRef)(null),a=Object(s.useRef)(null),u=Object(s.useRef)(!1),c=W(t,n);return[function(t){if(e){x.a.cancel(i.current);var n=t.deltaY;o.current+=n,a.current=n,c(n)||(V||t.preventDefault(),i.current=Object(x.a)((function(){var e=u.current?10:1;r(o.current*e),o.current=0})))}},function(t){e&&(u.current=t.detail===a.current)}]}(E,he,ve,(function(e){Q((function(t){return t+e}))})),2),ye=ge[0],be=ge[1];!function(e,t,n){var r,o=Object(s.useRef)(!1),i=Object(s.useRef)(0),a=Object(s.useRef)(null),u=Object(s.useRef)(null),c=function(e){if(o.current){var t=Math.ceil(e.touches[0].pageY),r=i.current-t;i.current=t,n(r)&&e.preventDefault(),clearInterval(u.current),u.current=setInterval((function(){(!n(r*=.9333333333333333,!0)||Math.abs(r)<=.1)&&clearInterval(u.current)}),16)}},l=function(){o.current=!1,r()},f=function(e){r(),1!==e.touches.length||o.current||(o.current=!0,i.current=Math.ceil(e.touches[0].pageY),a.current=e.target,a.current.addEventListener("touchmove",c),a.current.addEventListener("touchend",l))};r=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",l))},s.useLayoutEffect((function(){return e&&t.current.addEventListener("touchstart",f),function(){t.current.removeEventListener("touchstart",f),r(),clearInterval(u.current)}}),[e])}(E,L,(function(e,t){return!me(e,t)&&(ye({preventDefault:function(){},deltaY:e}),!0)})),s.useLayoutEffect((function(){function e(e){E&&e.preventDefault()}return L.current.addEventListener("wheel",ye),L.current.addEventListener("DOMMouseScroll",be),L.current.addEventListener("MozMousePixelScroll",e),function(){L.current.removeEventListener("wheel",ye),L.current.removeEventListener("DOMMouseScroll",be),L.current.removeEventListener("MozMousePixelScroll",e)}}),[E]);var we=function(e,t,n,r,o,i,a,u){var c=s.useRef();return function(s){if(null!==s&&void 0!==s){if(x.a.cancel(c.current),"number"===typeof s)a(s);else if(s&&"object"===F(s)){var l,f=s.align;l="index"in s?s.index:t.findIndex((function(e){return o(e)===s.key}));var d=s.offset,p=void 0===d?0:d;!function s(u,d){if(!(u<0)&&e.current){var h=e.current.clientHeight,v=!1,m=d;if(h){for(var g=d||f,y=0,b=0,w=0,E=0;E<=l;E+=1){var C=o(t[E]);b=y;var k=n.get(C);y=w=b+(void 0===k?r:k),E===l&&void 0===k&&(v=!0)}var O=null;switch(g){case"top":O=b-p;break;case"bottom":O=w-h+p;break;default:var S=e.current.scrollTop;b<S?m="top":w>S+h&&(m="bottom")}null!==O&&O!==e.current.scrollTop&&a(O)}c.current=Object(x.a)((function(){v&&i(),s(u-1,m)}))}}(3)}}else u()}}(L,D,ie,a,H,oe,Q,(function(){var e;null===(e=z.current)||void 0===e||e.delayHidden()}));s.useImperativeHandle(t,(function(){return{scrollTo:we}}));var xe=function(e,t,n,r,o,i){var a=i.getKey;return e.slice(t,n+1).map((function(e,n){var i=o(e,t+n,{}),u=a(e);return s.createElement(A,{key:u,setRef:function(t){return r(e,t)}},i)}))}(D,ce,le,re,d,G),Ee=null;return i&&(Ee=$(q({},c?"height":"maxHeight",i),J),E&&(Ee.overflowY="hidden",T&&(Ee.pointerEvents="none"))),s.createElement("div",Object.assign({style:$($({},l),{},{position:"relative"}),className:N},b),s.createElement(g,{className:"".concat(r,"-holder"),style:Ee,ref:L,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==O&&Q(t),null===y||void 0===y||y(e)}},s.createElement(w,{prefixCls:r,height:ue,offset:fe,onInnerResize:oe,ref:B},xe)),E&&s.createElement(P,{ref:z,prefixCls:r,scrollTop:O,height:i,scrollHeight:ue,count:D.length,onScroll:function(e){Q(e)},onStartMove:function(){I(!0)},onStopMove:function(){I(!1)}}))}));Q.displayName="List";var Z=Q,ee=function(e){var t,n=e.className,r=e.customizeIcon,o=e.customizeIconProps,i=e.onMouseDown,a=e.onClick,u=e.children;return t="function"===typeof r?r(o):r,s.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),i&&i(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},void 0!==t?t:s.createElement("span",{className:h()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},u))},te=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,o=e.flattenOptions,i=e.childrenAsData,a=e.values,p=e.searchValue,v=e.multiple,m=e.defaultActiveFirstOption,g=e.height,y=e.itemHeight,b=e.notFoundContent,w=e.open,x=e.menuItemSelectedIcon,E=e.virtual,C=e.onSelect,k=e.onToggleOpen,O=e.onActiveValue,S=e.onScroll,_=e.onMouseEnter,T="".concat(n,"-item"),I=function(e,t,n){var r=s.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value}((function(){return o}),[w,o],(function(e,t){return t[0]&&e[1]!==t[1]})),P=s.useRef(null),A=function(e){e.preventDefault()},R=function(e){P.current&&P.current.scrollTo({index:e})},N=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r<n;r+=1){var o=(e+r*t+n)%n,i=I[o],a=i.group,s=i.data;if(!a&&!s.disabled)return o}return-1},M=s.useState((function(){return N(0)})),j=Object(l.a)(M,2),D=j[0],F=j[1],L=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];F(e);var n={source:t?"keyboard":"mouse"},r=I[e];r?O(r.data.value,e,n):O(null,-1,n)};s.useEffect((function(){L(!1!==m?N(0):-1)}),[I.length,p]),s.useEffect((function(){var e,t=setTimeout((function(){if(!v&&w&&1===a.size){var e=Array.from(a)[0],t=I.findIndex((function(t){return t.data.value===e}));L(t),R(t)}}));w&&(null===(e=P.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[w]);var B=function(e){void 0!==e&&C(e,{selected:!a.has(e)}),v||k(!1)};if(s.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case f.a.UP:case f.a.DOWN:var n=0;if(t===f.a.UP?n=-1:t===f.a.DOWN&&(n=1),0!==n){var r=N(D+n,n);R(r),L(r,!0)}break;case f.a.ENTER:var o=I[D];o&&!o.data.disabled?B(o.data.value):B(void 0),w&&e.preventDefault();break;case f.a.ESC:k(!1)}},onKeyUp:function(){},scrollTo:function(e){R(e)}}})),0===I.length)return s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(T,"-empty"),onMouseDown:A},b);function U(e){var t=I[e];if(!t)return null;var n=t.data||{},o=n.value,u=n.label,c=n.children,l=Object(d.a)(n,!0),f=i?c:u;return t?s.createElement("div",Object.assign({"aria-label":"string"===typeof f?f:null},l,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":a.has(o)}),o):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},U(D-1),U(D),U(D+1)),s.createElement(Z,{itemKey:"key",ref:P,data:I,height:g,itemHeight:y,fullHeight:!1,onMouseDown:A,onScroll:S,virtual:E,onMouseEnter:_},(function(e,t){var n,r=e.group,o=e.groupOption,l=e.data,f=l.label,d=l.key;if(r)return s.createElement("div",{className:h()(T,"".concat(T,"-group"))},void 0!==f?f:d);var p=l.disabled,v=l.value,m=l.title,g=l.children,y=l.style,b=l.className,w=Object(c.a)(l,["disabled","value","title","children","style","className"]),E=a.has(v),C="".concat(T,"-option"),k=h()(T,C,b,(n={},Object(u.a)(n,"".concat(C,"-grouped"),o),Object(u.a)(n,"".concat(C,"-active"),D===t&&!p),Object(u.a)(n,"".concat(C,"-disabled"),p),Object(u.a)(n,"".concat(C,"-selected"),E),n)),O=!x||"function"===typeof x||E,S=(i?g:f)||v,_="string"===typeof S||"number"===typeof S?S.toString():void 0;return void 0!==m&&(_=m),s.createElement("div",Object.assign({},w,{"aria-selected":E,className:k,title:_,onMouseMove:function(){D===t||p||L(t)},onClick:function(){p||B(v)},style:y}),s.createElement("div",{className:"".concat(C,"-content")},S),s.isValidElement(x)||E,O&&s.createElement(ee,{className:"".concat(T,"-option-state"),customizeIcon:x,customizeIconProps:{isSelected:E}},E?"\u2713":null))})))}));te.displayName="OptionList";var ne=te,re=function(){return null};re.isSelectOption=!0;var oe=re,ie=function(){return null};ie.isSelectOptGroup=!0;var ae=ie,se=n(4),ue=n(58);function ce(e){var t=e.key,n=e.props,r=n.children,o=n.value,i=Object(c.a)(n,["children","value"]);return Object(se.a)({key:t,value:void 0!==o?o:t,children:r},i)}function le(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(ue.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,o=e.key,i=e.props,a=i.children,u=Object(c.a)(i,["children"]);return t||!r?ce(e):Object(se.a)(Object(se.a)({key:"__RC_SELECT_GRP__".concat(null===o?n:o,"__"),label:o},u),{},{options:le(a)})})).filter((function(e){return e}))}var fe=n(143),de=n(142),pe=n(102),he=n(144);var ve=n(17),me=n(37),ge=n(33);function ye(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function be(e,t){var n,r=Object(ve.a)(t);for(n=e.length-1;n>=0&&e[n].disabled;n-=1);var o=null;return-1!==n&&(o=r[n],r.splice(n,1)),{values:r,removedValue:o}}var we="undefined"!==typeof window&&window.document&&window.document.documentElement,xe=0;function Ee(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!==r&&void 0!==r?r:void 0!==n?n:"rc-index-key-".concat(t)}function Ce(e){var t=Object(se.a)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Object(ge.a)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.prevValueOptions,o=void 0===r?[]:r,i=new Map;return t.forEach((function(e){if(!e.group){var t=e.data;i.set(t.value,t)}})),e.map((function(e){var t=i.get(e);return t||(t=Object(se.a)({},o.find((function(t){return t._INTERNAL_OPTION_VALUE_===e})))),Ce(t)}))}function Oe(e){return ye(e).join("")}function Se(e,t){if(!t||!t.length)return null;var n=!1;var r=function e(t,r){var o,i=(o=r,Object(fe.a)(o)||Object(de.a)(o)||Object(pe.a)(o)||Object(he.a)()),a=i[0],s=i.slice(1);if(!a)return[t];var u=t.split(a);return n=n||u.length>1,u.reduce((function(t,n){return[].concat(Object(ve.a)(t),Object(ve.a)(e(n,s)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}var _e=n(105),Te=n(45),Ie=n(62),Pe=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,o=e.inputElement,i=e.disabled,a=e.tabIndex,u=e.autoFocus,c=e.autoComplete,l=e.editable,f=e.accessibilityIndex,d=e.value,p=e.maxLength,h=e.onKeyDown,v=e.onMouseDown,m=e.onChange,g=e.onPaste,y=e.onCompositionStart,b=e.onCompositionEnd,w=e.open,x=e.attrs,E=o||s.createElement("input",null),C=E,k=C.ref,O=C.props,S=O.onKeyDown,_=O.onChange,T=O.onMouseDown,I=O.onCompositionStart,P=O.onCompositionEnd,A=O.style;return E=s.cloneElement(E,Object(se.a)(Object(se.a)({id:r,ref:Object(Ie.a)(t,k),disabled:i,tabIndex:a,autoComplete:c||"off",type:"search",autoFocus:u,className:"".concat(n,"-selection-search-input"),style:Object(se.a)(Object(se.a)({},A),{},{opacity:l?null:0}),role:"combobox","aria-expanded":w,"aria-haspopup":"listbox","aria-owns":"".concat(r,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(r,"_list"),"aria-activedescendant":"".concat(r,"_list_").concat(f)},x),{},{value:l?d:"",maxLength:p,readOnly:!l,unselectable:l?null:"on",onKeyDown:function(e){h(e),S&&S(e)},onMouseDown:function(e){v(e),T&&T(e)},onChange:function(e){m(e),_&&_(e)},onCompositionStart:function(e){y(e),I&&I(e)},onCompositionEnd:function(e){b(e),P&&P(e)},onPaste:g}))}));Pe.displayName="Input";var Ae=Pe;function Re(e,t){we?s.useLayoutEffect(e,t):s.useEffect(e,t)}var Ne="__RC_SELECT_MAX_REST_COUNT__",Me=function(e){var t=e.id,n=e.prefixCls,r=e.values,o=e.open,i=e.searchValue,a=e.inputRef,f=e.placeholder,p=e.disabled,v=e.mode,m=e.showSearch,g=e.autoFocus,y=e.autoComplete,b=e.accessibilityIndex,w=e.tabIndex,x=e.removeIcon,E=e.choiceTransitionName,C=e.maxTagCount,k=e.maxTagTextLength,O=e.maxTagPlaceholder,S=void 0===O?function(e){return"+ ".concat(e.length," ...")}:O,_=e.tagRender,T=e.onSelect,I=e.onInputChange,P=e.onInputPaste,A=e.onInputKeyDown,R=e.onInputMouseDown,N=e.onInputCompositionStart,M=e.onInputCompositionEnd,j=Object(s.useState)(!1),D=Object(l.a)(j,2),F=D[0],L=D[1],B=s.useRef(null),U=Object(s.useState)(0),z=Object(l.a)(U,2),V=z[0],W=z[1],H=Object(s.useState)(!1),$=Object(l.a)(H,2),q=$[0],K=$[1];s.useEffect((function(){L(!0)}),[]);var G=o||"tags"===v?i:"",X="tags"===v||m&&(o||q);Re((function(){W(B.current.scrollWidth)}),[G]);var Y,J=r;"number"===typeof C&&(Y=r.length-C,J=r.slice(0,C)),"number"===typeof k&&(J=J.map((function(e){var t=e.label,n=Object(c.a)(e,["label"]),r=t;if("string"===typeof t||"number"===typeof t){var o=String(r);o.length>k&&(r="".concat(o.slice(0,k),"..."))}return Object(se.a)(Object(se.a)({},n),{},{label:r})}))),Y>0&&J.push({key:Ne,label:"function"===typeof S?S(r.slice(C)):S});var Q=s.createElement(Te.CSSMotionList,{component:!1,keys:J,motionName:E,motionAppear:F},(function(e){var t=e.key,r=e.label,o=e.value,i=e.disabled,a=e.className,c=e.style,l=t||o,f=!p&&t!==Ne&&!i,d=function(e){e.preventDefault(),e.stopPropagation()},v=function(e){e&&e.stopPropagation(),T(o,{selected:!1})};return"function"===typeof _?s.createElement("span",{key:l,onMouseDown:d,className:a,style:c},_({label:r,value:o,disabled:i,closable:f,onClose:v})):s.createElement("span",{key:l,className:h()(a,"".concat(n,"-selection-item"),Object(u.a)({},"".concat(n,"-selection-item-disabled"),i)),style:c},s.createElement("span",{className:"".concat(n,"-selection-item-content")},r),f&&s.createElement(ee,{className:"".concat(n,"-selection-item-remove"),onMouseDown:d,onClick:v,customizeIcon:x},"\xd7"))}));return s.createElement(s.Fragment,null,Q,s.createElement("span",{className:"".concat(n,"-selection-search"),style:{width:V},onFocus:function(){K(!0)},onBlur:function(){K(!1)}},s.createElement(Ae,{ref:a,open:o,prefixCls:n,id:t,inputElement:null,disabled:p,autoFocus:g,autoComplete:y,editable:X,accessibilityIndex:b,value:G,onKeyDown:A,onMouseDown:R,onChange:I,onPaste:P,onCompositionStart:N,onCompositionEnd:M,tabIndex:w,attrs:Object(d.a)(e,!0)}),s.createElement("span",{ref:B,className:"".concat(n,"-selection-search-mirror"),"aria-hidden":!0},G,"\xa0")),!r.length&&!G&&s.createElement("span",{className:"".concat(n,"-selection-placeholder")},f))},je=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,o=e.inputRef,i=e.disabled,a=e.autoFocus,u=e.autoComplete,c=e.accessibilityIndex,f=e.mode,p=e.open,h=e.values,v=e.placeholder,m=e.tabIndex,g=e.showSearch,y=e.searchValue,b=e.activeValue,w=e.maxLength,x=e.onInputKeyDown,E=e.onInputMouseDown,C=e.onInputChange,k=e.onInputPaste,O=e.onInputCompositionStart,S=e.onInputCompositionEnd,_=s.useState(!1),T=Object(l.a)(_,2),I=T[0],P=T[1],A="combobox"===f,R=A||g,N=h[0],M=y||"";A&&b&&!I&&(M=b),s.useEffect((function(){A&&P(!1)}),[A,b]);var j=!("combobox"!==f&&!p)&&!!M,D=!N||"string"!==typeof N.label&&"number"!==typeof N.label?void 0:N.label.toString();return s.createElement(s.Fragment,null,s.createElement("span",{className:"".concat(n,"-selection-search")},s.createElement(Ae,{ref:o,prefixCls:n,id:r,open:p,inputElement:t,disabled:i,autoFocus:a,autoComplete:u,editable:R,accessibilityIndex:c,value:M,onKeyDown:x,onMouseDown:E,onChange:function(e){P(!0),C(e)},onPaste:k,onCompositionStart:O,onCompositionEnd:S,tabIndex:m,attrs:Object(d.a)(e,!0),maxLength:A?w:void 0})),!A&&N&&!j&&s.createElement("span",{className:"".concat(n,"-selection-item"),title:D},N.label),!N&&!j&&s.createElement("span",{className:"".concat(n,"-selection-placeholder")},v))};function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=s.useRef(null),n=s.useRef(null);function r(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return s.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},r]}var Fe=s.forwardRef((function(e,t){var n=Object(s.useRef)(null),r=Object(s.useRef)(!1),o=e.prefixCls,i=e.multiple,a=e.open,u=e.mode,c=e.showSearch,d=e.tokenWithEnter,p=e.onSearch,h=e.onSearchSubmit,v=e.onToggleOpen,m=e.onInputKeyDown,g=e.domRef;s.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var y=De(0),b=Object(l.a)(y,2),w=b[0],x=b[1],E=Object(s.useRef)(null),C={inputRef:n,onInputKeyDown:function(e){var t=e.which;t!==f.a.UP&&t!==f.a.DOWN||e.preventDefault(),m&&m(e),t!==f.a.ENTER||"tags"!==u||r.current||a||h(e.target.value),[f.a.SHIFT,f.a.TAB,f.a.BACKSPACE,f.a.ESC].includes(t)||v(!0)},onInputMouseDown:function(){x(!0)},onInputChange:function(e){var t=e.target.value;if(d&&E.current&&/[\r\n]/.test(E.current)){var n=E.current.replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,E.current)}E.current=null,function(e){!1!==p(e,!0,r.current)&&v(!0)}(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");E.current=t},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(){r.current=!1}},k=i?s.createElement(Me,Object.assign({},e,C)):s.createElement(je,Object.assign({},e,C));return s.createElement("div",{ref:g,className:"".concat(o,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=w();e.target===n.current||t||e.preventDefault(),("combobox"===u||c&&t)&&a||(a&&p("",!0,!1),v())}},k)}));Fe.displayName="Selector";var Le=Fe,Be=n(82),Ue=s.forwardRef((function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),o=e.children,i=e.popupElement,a=e.containerWidth,l=e.animation,f=e.transitionName,d=e.dropdownStyle,p=e.dropdownClassName,v=e.direction,m=void 0===v?"ltr":v,g=e.dropdownMatchSelectWidth,y=void 0===g||g,b=e.dropdownRender,w=e.dropdownAlign,x=e.getPopupContainer,E=e.empty,C=e.getTriggerDOMNode,k=Object(c.a)(e,["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode"]),O="".concat(n,"-dropdown"),S=i;b&&(S=b(i));var _=s.useMemo((function(){return function(e){var t="number"!==typeof e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(y)}),[y]),T=l?"".concat(O,"-").concat(l):f,I=s.useRef(null);s.useImperativeHandle(t,(function(){return{getPopupElement:function(){return I.current}}}));var P=Object(se.a)({minWidth:a},d);return"number"===typeof y?P.width=y:y&&(P.width=a),s.createElement(Be.a,Object.assign({},k,{showAction:[],hideAction:[],popupPlacement:"rtl"===m?"bottomRight":"bottomLeft",builtinPlacements:_,prefixCls:O,popupTransitionName:T,popup:s.createElement("div",{ref:I},S),popupAlign:w,popupVisible:r,getPopupContainer:x,popupClassName:h()(p,Object(u.a)({},"".concat(O,"-empty"),E)),popupStyle:P,getTriggerDOMNode:C}),o)}));Ue.displayName="SelectTrigger";var ze=Ue;var Ve=["removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown"];var We=function(e){var t=e.mode,n=e.options,r=e.children,o=e.backfill,i=e.allowClear,a=e.placeholder,u=e.getInputElement,c=e.showSearch,l=e.onSearch,f=e.defaultOpen,d=e.autoFocus,p=e.labelInValue,h=e.value,v=e.inputValue,m=e.optionLabelProp,g="multiple"===t||"tags"===t,y=void 0!==c?c:g||"combobox"===t,b=n||le(r);if(Object(ge.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var w=b.some((function(e){return e.options?e.options.some((function(e){return"number"===typeof("value"in e?e.value:e.key)})):"number"===typeof("value"in e?e.value:e.key)}));Object(ge.a)(!w,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ge.a)("combobox"!==t||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ge.a)("combobox"===t||!o,"`backfill` only works with `combobox` mode."),Object(ge.a)("combobox"===t||!u,"`getInputElement` only work with `combobox` mode."),Object(ge.b)("combobox"!==t||!u||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),l&&!y&&"combobox"!==t&&"tags"!==t&&Object(ge.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ge.b)(!f||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),void 0!==h&&null!==h){var x=ye(h);Object(ge.a)(!p||x.every((function(e){return"object"===Object(me.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(ge.a)(!g||Array.isArray(h),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var E=null;Object(ue.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(ue.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(E=t.type,!1)})):(E=t,!0))})),E&&Object(ge.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(ge.a)(void 0===v,"`inputValue` is deprecated, please use `searchValue` instead.")}},He=function(e){var t=e.prefixCls,n=e.components.optionList,r=e.convertChildrenToData,o=e.flattenOptions,i=e.getLabeledValue,a=e.filterOptions,d=e.isValueDisabled,p=e.findValueOption,v=(e.warningProps,e.fillOptionsWithMissingValue),m=e.omitDOMProps;return s.forwardRef((function(e,g){var y,b=e.prefixCls,w=void 0===b?t:b,x=e.className,E=e.id,C=e.open,k=e.defaultOpen,O=e.options,S=e.children,_=e.mode,T=e.value,I=e.defaultValue,P=e.labelInValue,A=e.showSearch,R=e.inputValue,N=e.searchValue,M=e.filterOption,j=e.filterSort,D=e.optionFilterProp,F=void 0===D?"value":D,L=e.autoClearSearchValue,B=void 0===L||L,U=e.onSearch,z=e.allowClear,V=e.clearIcon,W=e.showArrow,H=e.inputIcon,$=e.menuItemSelectedIcon,q=e.disabled,K=e.loading,G=e.defaultActiveFirstOption,X=e.notFoundContent,Y=void 0===X?"Not Found":X,J=e.optionLabelProp,Q=e.backfill,Z=e.getInputElement,te=e.getPopupContainer,ne=e.listHeight,re=void 0===ne?200:ne,oe=e.listItemHeight,ie=void 0===oe?20:oe,ae=e.animation,ue=e.transitionName,ce=e.virtual,le=e.dropdownStyle,fe=e.dropdownClassName,de=e.dropdownMatchSelectWidth,pe=e.dropdownRender,he=e.dropdownAlign,me=e.showAction,ge=void 0===me?[]:me,ye=e.direction,Ee=e.tokenSeparators,Ce=e.tagRender,ke=e.onPopupScroll,Oe=e.onDropdownVisibleChange,Te=e.onFocus,Ie=e.onBlur,Pe=e.onKeyUp,Ae=e.onKeyDown,Ne=e.onMouseDown,Me=e.onChange,je=e.onSelect,Fe=e.onDeselect,Be=e.onClear,Ue=e.internalProps,We=void 0===Ue?{}:Ue,He=Object(c.a)(e,["prefixCls","className","id","open","defaultOpen","options","children","mode","value","defaultValue","labelInValue","showSearch","inputValue","searchValue","filterOption","filterSort","optionFilterProp","autoClearSearchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","menuItemSelectedIcon","disabled","loading","defaultActiveFirstOption","notFoundContent","optionLabelProp","backfill","getInputElement","getPopupContainer","listHeight","listItemHeight","animation","transitionName","virtual","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","onChange","onSelect","onDeselect","onClear","internalProps"]),$e="RC_SELECT_INTERNAL_PROPS_MARK"===We.mark,qe=m?m(He):He;Ve.forEach((function(e){delete qe[e]}));var Ke=Object(s.useRef)(null),Ge=Object(s.useRef)(null),Xe=Object(s.useRef)(null),Ye=Object(s.useRef)(null),Je=Object(s.useMemo)((function(){return(Ee||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[Ee]),Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=s.useState(!1),n=Object(l.a)(t,2),r=n[0],o=n[1],i=s.useRef(null),a=function(){window.clearTimeout(i.current)};return s.useEffect((function(){return a}),[]),[r,function(t,n){a(),i.current=window.setTimeout((function(){o(t),n&&n()}),e)},a]}(),Ze=Object(l.a)(Qe,3),et=Ze[0],tt=Ze[1],nt=Ze[2],rt=Object(s.useState)(),ot=Object(l.a)(rt,2),it=ot[0],at=ot[1];Object(s.useEffect)((function(){at("rc_select_".concat(function(){var e;return we?(e=xe,xe+=1):e="TEST_OR_SSR",e}()))}),[]);var st=E||it,ut=J;void 0===ut&&(ut=O?"label":"children");var ct="combobox"!==_&&P,lt="tags"===_||"multiple"===_,ft=void 0!==A?A:lt||"combobox"===_,dt=Object(s.useRef)(null);s.useImperativeHandle(g,(function(){return{focus:Xe.current.focus,blur:Xe.current.blur}}));var pt=Object(_e.a)(I,{value:T}),ht=Object(l.a)(pt,2),vt=ht[0],mt=ht[1],gt=Object(s.useMemo)((function(){return function(e,t){var n=t.labelInValue,r=t.combobox;if(void 0===e||""===e&&r)return[];var o=Array.isArray(e)?e:[e];return n?o.map((function(e){var t=e.key,n=e.value;return void 0!==n?n:t})):o}(vt,{labelInValue:ct,combobox:"combobox"===_})}),[vt,ct]),yt=Object(s.useMemo)((function(){return new Set(gt)}),[gt]),bt=Object(s.useState)(null),wt=Object(l.a)(bt,2),xt=wt[0],Et=wt[1],Ct=Object(s.useState)(""),kt=Object(l.a)(Ct,2),Ot=kt[0],St=kt[1],_t=Ot;"combobox"===_&&void 0!==vt?_t=vt:void 0!==N?_t=N:R&&(_t=R);var Tt=Object(s.useMemo)((function(){var e=O;return void 0===e&&(e=r(S)),"tags"===_&&v&&(e=v(e,vt,ut,P)),e||[]}),[O,S,_,vt]),It=Object(s.useMemo)((function(){return o(Tt,e)}),[Tt]),Pt=function(e,t){var n=s.useRef(null),r=s.useMemo((function(){var e=new Map;return t.forEach((function(t){var n=t.data.value;e.set(n,t)})),e}),[e,t]);return n.current=r,function(e){return e.map((function(e){return n.current.get(e)})).filter(Boolean)}}(gt,It),At=Object(s.useMemo)((function(){if(!_t||!ft)return Object(ve.a)(Tt);var e=a(_t,Tt,{optionFilterProp:F,filterOption:"combobox"===_&&void 0===M?function(){return!0}:M});return"tags"===_&&e.every((function(e){return e[F]!==_t}))&&e.unshift({value:_t,label:_t,key:"__RC_SELECT_TAG_PLACEHOLDER__"}),j&&Array.isArray(e)?Object(ve.a)(e).sort(j):e}),[Tt,_t,_,ft,j]),Rt=Object(s.useMemo)((function(){return o(At,e)}),[At]);Object(s.useEffect)((function(){Ye.current&&Ye.current.scrollTo&&Ye.current.scrollTo(0)}),[_t]);var Nt=Object(s.useMemo)((function(){var e=gt.map((function(e){var t=Pt([e]),n=i(e,{options:t,prevValue:vt,labelInValue:ct,optionLabelProp:ut});return Object(se.a)(Object(se.a)({},n),{},{disabled:d(e,t)})}));return _||1!==e.length||null!==e[0].value||null!==e[0].label?e:[]}),[vt,Tt,_]);Nt=function(e){var t=s.useRef(e);return s.useMemo((function(){var n=new Map;t.current.forEach((function(e){var t=e.value,r=e.label;t!==r&&n.set(t,r)}));var r=e.map((function(e){var t=n.get(e.value);return e.value===e.label&&t?Object(se.a)(Object(se.a)({},e),{},{label:t}):e}));return t.current=r,r}),[e])}(Nt);var Mt=function(e,t,n){var r=Pt([e]),o=p([e],r)[0];if(!We.skipTriggerSelect){var a=ct?i(e,{options:r,prevValue:vt,labelInValue:ct,optionLabelProp:ut}):e;t&&je?je(a,o):!t&&Fe&&Fe(a,o)}$e&&(t&&We.onRawSelect?We.onRawSelect(e,o,n):!t&&We.onRawDeselect&&We.onRawDeselect(e,o,n))},jt=Object(s.useState)([]),Dt=Object(l.a)(jt,2),Ft=Dt[0],Lt=Dt[1],Bt=function(e){if(!$e||!We.skipTriggerChange){var t=Pt(e),n=function(e,t){var n=t.optionLabelProp,r=t.labelInValue,o=t.prevValue,i=t.options,a=t.getLabeledValue,s=e;return r&&(s=s.map((function(e){return a(e,{options:i,prevValue:o,labelInValue:r,optionLabelProp:n})}))),s}(Array.from(e),{labelInValue:ct,options:t,getLabeledValue:i,prevValue:vt,optionLabelProp:ut}),r=lt?n:n[0];if(Me&&(0!==gt.length||0!==n.length)){var o=p(e,t,{prevValueOptions:Ft});Lt(o.map((function(t,n){var r=Object(se.a)({},t);return Object.defineProperty(r,"_INTERNAL_OPTION_VALUE_",{get:function(){return e[n]}}),r}))),Me(r,lt?o:o[0])}mt(r)}},Ut=function(e,t){var n,r=t.selected,o=t.source;q||(lt?(n=new Set(gt),r?n.add(e):n.delete(e)):(n=new Set).add(e),(lt||!lt&&Array.from(gt)[0]!==e)&&Bt(Array.from(n)),Mt(e,!lt||r,o),"combobox"===_?(St(String(e)),Et("")):lt&&!B||(St(""),Et("")))},zt="combobox"===_&&Z&&Z()||null,Vt=Object(_e.a)(void 0,{defaultValue:k,value:C}),Wt=Object(l.a)(Vt,2),Ht=Wt[0],$t=Wt[1],qt=Ht,Kt=!Y&&!At.length;(q||Kt&&qt&&"combobox"===_)&&(qt=!1);var Gt=!Kt&&qt,Xt=function(e){var t=void 0!==e?e:!qt;Ht===t||q||($t(t),Oe&&Oe(t))};!function(e,t,n){var r=s.useRef(null);r.current={elements:e.filter((function(e){return e})),open:t,triggerOpen:n},s.useEffect((function(){function e(e){var t=e.target;r.current.open&&r.current.elements.every((function(e){return!e.contains(t)&&e!==t}))&&r.current.triggerOpen(!1)}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}([Ke.current,Ge.current&&Ge.current.getPopupElement()],Gt,Xt);var Yt=function(e,t,n){var r=!0,o=e;Et(null);var i=n?null:Se(e,Ee),a=i;if("combobox"===_)t&&Bt([o]);else if(i){o="","tags"!==_&&(a=i.map((function(e){var t=It.find((function(t){return t.data[ut]===e}));return t?t.data.value:null})).filter((function(e){return null!==e})));var s=Array.from(new Set([].concat(Object(ve.a)(gt),Object(ve.a)(a))));Bt(s),s.forEach((function(e){Mt(e,!0,"input")})),Xt(!1),r=!1}return St(o),U&&_t!==o&&U(o),r};Object(s.useEffect)((function(){Ht&&q&&$t(!1)}),[q]),Object(s.useEffect)((function(){qt||lt||"combobox"===_||Yt("",!1,!1)}),[qt]);var Jt=De(),Qt=Object(l.a)(Jt,2),Zt=Qt[0],en=Qt[1],tn=Object(s.useRef)(!1),nn=[];Object(s.useEffect)((function(){return function(){nn.forEach((function(e){return clearTimeout(e)})),nn.splice(0,nn.length)}}),[]);var rn=Object(s.useState)(0),on=Object(l.a)(rn,2),an=on[0],sn=on[1],un=void 0!==G?G:"combobox"!==_,cn=Object(s.useState)(null),ln=Object(l.a)(cn,2),fn=ln[0],dn=ln[1],pn=Object(s.useState)({}),hn=Object(l.a)(pn,2)[1];Re((function(){if(Gt){var e=Math.ceil(Ke.current.offsetWidth);fn!==e&&dn(e)}}),[Gt]);var vn,mn=s.createElement(n,{ref:Ye,prefixCls:w,id:st,open:qt,childrenAsData:!O,options:At,flattenOptions:Rt,multiple:lt,values:yt,height:re,itemHeight:ie,onSelect:function(e,t){Ut(e,Object(se.a)(Object(se.a)({},t),{},{source:"option"}))},onToggleOpen:Xt,onActiveValue:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source,o=void 0===r?"keyboard":r;sn(t),Q&&"combobox"===_&&null!==e&&"keyboard"===o&&Et(String(e))},defaultActiveFirstOption:un,notFoundContent:Y,onScroll:ke,searchValue:_t,menuItemSelectedIcon:$,virtual:!1!==ce&&!1!==de,onMouseEnter:function(){hn({})}});!q&&z&&(gt.length||_t)&&(vn=s.createElement(ee,{className:"".concat(w,"-clear"),onMouseDown:function(){$e&&We.onClear&&We.onClear(),Be&&Be(),Bt([]),Yt("",!1,!1)},customizeIcon:V},"\xd7"));var gn,yn=void 0!==W?W:K||!lt&&"combobox"!==_;yn&&(gn=s.createElement(ee,{className:h()("".concat(w,"-arrow"),Object(u.a)({},"".concat(w,"-arrow-loading"),K)),customizeIcon:H,customizeIconProps:{loading:K,searchValue:_t,open:qt,focused:et,showSearch:ft}}));var bn=h()(w,x,(y={},Object(u.a)(y,"".concat(w,"-focused"),et),Object(u.a)(y,"".concat(w,"-multiple"),lt),Object(u.a)(y,"".concat(w,"-single"),!lt),Object(u.a)(y,"".concat(w,"-allow-clear"),z),Object(u.a)(y,"".concat(w,"-show-arrow"),yn),Object(u.a)(y,"".concat(w,"-disabled"),q),Object(u.a)(y,"".concat(w,"-loading"),K),Object(u.a)(y,"".concat(w,"-open"),qt),Object(u.a)(y,"".concat(w,"-customize-input"),zt),Object(u.a)(y,"".concat(w,"-show-search"),ft),y));return s.createElement("div",Object.assign({className:bn},qe,{ref:Ke,onMouseDown:function(e){var t=e.target,n=Ge.current&&Ge.current.getPopupElement();if(n&&n.contains(t)){var r=setTimeout((function(){var e=nn.indexOf(r);-1!==e&&nn.splice(e,1),nt(),n.contains(document.activeElement)||Xe.current.focus()}));nn.push(r)}if(Ne){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];Ne.apply(void 0,[e].concat(i))}},onKeyDown:function(e){var t,n=Zt(),r=e.which;if(qt||r!==f.a.ENTER||Xt(!0),en(!!_t),r===f.a.BACKSPACE&&!n&&lt&&!_t&&gt.length){var o=be(Nt,gt);null!==o.removedValue&&(Bt(o.values),Mt(o.removedValue,!1,"input"))}for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];qt&&Ye.current&&(t=Ye.current).onKeyDown.apply(t,[e].concat(a));Ae&&Ae.apply(void 0,[e].concat(a))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o;qt&&Ye.current&&(o=Ye.current).onKeyUp.apply(o,[e].concat(n));Pe&&Pe.apply(void 0,[e].concat(n))},onFocus:function(){tt(!0),q||(Te&&!tn.current&&Te.apply(void 0,arguments),ge.includes("focus")&&Xt(!0)),tn.current=!0},onBlur:function(){tt(!1,(function(){tn.current=!1,Xt(!1)})),q||(_t&&("tags"===_?(Yt("",!1,!1),Bt(Array.from(new Set([].concat(Object(ve.a)(gt),[_t]))))):"multiple"===_&&St("")),Ie&&Ie.apply(void 0,arguments))}}),et&&!qt&&s.createElement("span",{style:{width:0,height:0,display:"flex",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(gt.join(", "))),s.createElement(ze,{ref:Ge,disabled:q,prefixCls:w,visible:Gt,popupElement:mn,containerWidth:fn,animation:ae,transitionName:ue,dropdownStyle:le,dropdownClassName:fe,direction:ye,dropdownMatchSelectWidth:de,dropdownRender:pe,dropdownAlign:he,getPopupContainer:te,empty:!Tt.length,getTriggerDOMNode:function(){return dt.current}},s.createElement(Le,Object.assign({},e,{domRef:dt,prefixCls:w,inputElement:zt,ref:Xe,id:st,showSearch:ft,mode:_,accessibilityIndex:an,multiple:lt,tagRender:Ce,values:Nt,open:qt,onToggleOpen:Xt,searchValue:_t,activeValue:xt,onSearch:Yt,onSearchSubmit:function(e){var t=Array.from(new Set([].concat(Object(ve.a)(gt),[e])));Bt(t),t.forEach((function(e){Mt(e,!0,"input")})),St("")},onSelect:function(e,t){Ut(e,Object(se.a)(Object(se.a)({},t),{},{source:"selection"}))},tokenWithEnter:Je}))),gn,vn)}))}({prefixCls:"rc-select",components:{optionList:ne},convertChildrenToData:le,flattenOptions:function(e){var t=[];return function e(n,r){n.forEach((function(n){r||!("options"in n)?t.push({key:Ee(n,t.length),groupOption:r,data:n}):(t.push({key:Ee(n,t.length),group:!0,data:n}),e(n.options,!0))}))}(e,!1),t},getLabeledValue:function(e,t){var n,r=t.options,o=t.prevValue,i=t.labelInValue,a=t.optionLabelProp,s=ke([e],r)[0],u={value:e},c=ye(o);return i&&(n=c.find((function(t){return"object"===Object(me.a)(t)&&"value"in t?t.value===e:t.key===e}))),n&&"object"===Object(me.a)(n)&&"label"in n?(u.label=n.label,s&&"string"===typeof n.label&&"string"===typeof s[a]&&n.label.trim()!==s[a].trim()&&Object(ge.a)(!1,"`label` of `value` is not same as `label` in Select options.")):u.label=s&&a in s?s[a]:e,u.key=u.value,u},filterOptions:function(e,t,n){var r,o=n.optionFilterProp,i=n.filterOption,a=[];return!1===i?Object(ve.a)(t):(r="function"===typeof i?i:function(e){return function(t,n){var r=t.toLowerCase();return"options"in n?Oe(n.label).toLowerCase().includes(r):Oe(n[e]).toLowerCase().includes(r)}}(o),t.forEach((function(t){if("options"in t)if(r(e,t))a.push(t);else{var n=t.options.filter((function(t){return r(e,t)}));n.length&&a.push(Object(se.a)(Object(se.a)({},t),{},{options:n}))}else r(e,Ce(t))&&a.push(t)})),a)},isValueDisabled:function(e,t){return ke([e],t)[0].disabled},findValueOption:ke,warningProps:We,fillOptionsWithMissingValue:function(e,t,n,r){var o=ye(t).slice().sort(),i=Object(ve.a)(e),a=new Set;return e.forEach((function(e){e.options?e.options.forEach((function(e){a.add(e.value)})):a.add(e.value)})),o.forEach((function(e){var t,o=r?e.value:e;a.has(o)||i.push(r?(t={},Object(u.a)(t,n,e.label),Object(u.a)(t,"value",o),t):{value:o})})),i}}),$e=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(o.a)(n,[{key:"render",value:function(){return s.createElement(He,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);$e.Option=oe,$e.OptGroup=ae;var qe=$e;t.default=qe},function(e,t,n){"use strict";n.r(t),n.d(t,"TabPane",(function(){return at}));var r=n(13),o=n(11),i=n(37),a=n(21),s=n(4),u=n(0),c=n(10),l=n.n(c),f=n(58),d=n(147),p=n(105),h=n(17),v=n(34),m=n(72);function g(e){var t=Object(u.useRef)(),n=Object(u.useRef)(!1);return Object(u.useEffect)((function(){return function(){n.current=!0,v.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n.current||(v.a.cancel(t.current),t.current=Object(v.a)((function(){e.apply(void 0,o)})))}}var y=n(22);function b(e,t){var n,o=e.prefixCls,i=e.id,a=e.active,s=e.rtl,c=e.tab,f=c.key,d=c.tab,p=c.disabled,h=c.closeIcon,v=e.tabBarGutter,m=e.tabPosition,g=e.closable,b=e.renderWrapper,w=e.removeAriaLabel,x=e.editable,E=e.onClick,C=e.onRemove,k=e.onFocus,O="".concat(o,"-tab");u.useEffect((function(){return C}),[]);var S={};"top"===m||"bottom"===m?S[s?"marginLeft":"marginRight"]=v:S.marginBottom=v;var _=x&&!1!==g&&!p;function T(e){p||E(e)}var I=u.createElement("div",{key:f,ref:t,className:l()(O,(n={},Object(r.a)(n,"".concat(O,"-with-remove"),_),Object(r.a)(n,"".concat(O,"-active"),a),Object(r.a)(n,"".concat(O,"-disabled"),p),n)),style:S,onClick:T},u.createElement("div",{role:"tab","aria-selected":a,id:i&&"".concat(i,"-tab-").concat(f),className:"".concat(O,"-btn"),"aria-controls":i&&"".concat(i,"-panel-").concat(f),"aria-disabled":p,tabIndex:p?null:0,onClick:function(e){e.stopPropagation(),T(e)},onKeyDown:function(e){[y.a.SPACE,y.a.ENTER].includes(e.which)&&(e.preventDefault(),T(e))},onFocus:k},d),_&&u.createElement("button",{type:"button","aria-label":w||"remove",tabIndex:0,className:"".concat(O,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),x.onEdit("remove",{key:f,event:t})}},h||x.removeIcon||"\xd7"));return b&&(I=b(I)),I}var w=u.forwardRef(b),x={width:0,height:0,left:0,top:0};var E={width:0,height:0,left:0,top:0,right:0};var C=n(23),k=n(26),O=n(40),S=n(30),_=n(36),T=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=u.createContext(null),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.render=function(){return u.createElement(I.Provider,{value:this.props.store},this.props.children)},t}(u.Component),A=n(121),R=n.n(A),N=n(179),M=n.n(N),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return(D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var F=function(){return{}};function L(e,t){void 0===t&&(t={});var n=!!e,r=e||F;return function(o){var i=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.unsubscribe=null,o.handleChange=function(){if(o.unsubscribe){var e=r(o.store.getState(),o.props);o.setState({subscribed:e})}},o.store=o.context,o.state={subscribed:r(o.store.getState(),e),store:o.store,props:e},o}return j(i,t),i.getDerivedStateFromProps=function(t,n){return e&&2===e.length&&t!==n.props?{subscribed:r(n.store.getState(),t),props:t}:{props:t}},i.prototype.componentDidMount=function(){this.trySubscribe()},i.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},i.prototype.shouldComponentUpdate=function(e,t){return!R()(this.props,e)||!R()(this.state.subscribed,t.subscribed)},i.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},i.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},i.prototype.render=function(){var e=D(D(D({},this.props),this.state.subscribed),{store:this.store});return u.createElement(o,D({},e,{ref:this.props.miniStoreForwardedRef}))},i.displayName="Connect("+function(e){return e.displayName||e.name||"Component"}(o)+")",i.contextType=I,i}(u.Component);if(t.forwardRef){var a=u.forwardRef((function(e,t){return u.createElement(i,D({},e,{miniStoreForwardedRef:t}))}));return M()(a,o)}return M()(i,o)}}var B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var U=n(53),z=n(68);function V(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t<e.length;t++)e[t]&&e[t].apply&&e[t].apply(this,arguments)}}var W=/iPhone/i,H=/iPod/i,$=/iPad/i,q=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,G=/\bAndroid(?:.+)SD4930UR\b/i,X=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Y=/Windows Phone/i,J=/\bWindows(?:.+)ARM\b/i,Q=/BlackBerry/i,Z=/BB10/i,ee=/Opera Mini/i,te=/\b(CriOS|Chrome)(?:.+)Mobile/i,ne=/Mobile(?:.+)Firefox\b/i;function re(e,t){return e.test(t)}function oe(e){var t=e||("undefined"!==typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if("undefined"!==typeof n[1]){var r=n;t=Object(o.a)(r,1)[0]}if("undefined"!==typeof(n=t.split("Twitter"))[1]){var i=n;t=Object(o.a)(i,1)[0]}var a={apple:{phone:re(W,t)&&!re(Y,t),ipod:re(H,t),tablet:!re(W,t)&&re($,t)&&!re(Y,t),device:(re(W,t)||re(H,t)||re($,t))&&!re(Y,t)},amazon:{phone:re(G,t),tablet:!re(G,t)&&re(X,t),device:re(G,t)||re(X,t)},android:{phone:!re(Y,t)&&re(G,t)||!re(Y,t)&&re(q,t),tablet:!re(Y,t)&&!re(G,t)&&!re(q,t)&&(re(X,t)||re(K,t)),device:!re(Y,t)&&(re(G,t)||re(X,t)||re(q,t)||re(K,t))||re(/\bokhttp\b/i,t)},windows:{phone:re(Y,t),tablet:re(J,t),device:re(Y,t)||re(J,t)},other:{blackberry:re(Q,t),blackberry10:re(Z,t),opera:re(ee,t),firefox:re(ne,t),chrome:re(te,t),device:re(Q,t)||re(Z,t)||re(ee,t)||re(ne,t)||re(te,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var ie=Object(s.a)(Object(s.a)({},oe()),{},{isMobile:oe});function ae(){}function se(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function ue(e){return"".concat(e,"-menu-")}function ce(e,t){var n=-1;u.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?u.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}function le(e,t,n){e&&!n.find&&u.Children.forEach(e,(function(e){if(e){var r=e.type;if(!r||!(r.isSubMenu||r.isMenuItem||r.isMenuItemGroup))return;-1!==t.indexOf(e.key)?n.find=!0:e.props.children&&le(e.props.children,t,n)}}))}var fe=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],de=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"===typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),o=r.marginLeft,i=r.marginRight;n+=+o.replace("px","")+ +i.replace("px","")}n=+n.toFixed(6)}return n||0},pe=function(e,t,n){e&&"object"===Object(i.a)(e.style)&&(e.style[t]=n)},he=n(42),ve=n(103),me=n(82),ge=n(45),ye={adjustX:1,adjustY:1},be={topLeft:{points:["bl","tl"],overflow:ye,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ye,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ye,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ye,offset:[4,0]}},we={topLeft:{points:["bl","tl"],overflow:ye,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ye,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ye,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ye,offset:[4,0]}},xe=0,Ee={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ce=function(e,t,n){var o=ue(t),i=e.getState();e.setState({defaultActiveFirst:Object(s.a)(Object(s.a)({},i.defaultActiveFirst),{},Object(r.a)({},o,n))})},ke=function(e){Object(S.a)(n,e);var t=Object(_.a)(n);function n(e){var r;Object(C.a)(this,n),(r=t.call(this,e)).onDestroy=function(e){r.props.onDestroy(e)},r.onKeyDown=function(e){var t=e.keyCode,n=r.menuInstance,o=r.props.store,i=r.getVisible();if(t===y.a.ENTER)return r.onTitleClick(e),Ce(o,r.props.eventKey,!0),!0;if(t===y.a.RIGHT)return i?n.onKeyDown(e):(r.triggerOpenChange(!0),Ce(o,r.props.eventKey,!0)),!0;if(t===y.a.LEFT){var a;if(!i)return;return(a=n.onKeyDown(e))||(r.triggerOpenChange(!1),a=!0),a}return!i||t!==y.a.UP&&t!==y.a.DOWN?void 0:n.onKeyDown(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onPopupVisibleChange=function(e){r.triggerOpenChange(e,e?"mouseenter":"mouseleave")},r.onMouseEnter=function(e){var t=r.props,n=t.eventKey,o=t.onMouseEnter,i=t.store;Ce(i,r.props.eventKey,!1),o({key:n,domEvent:e})},r.onMouseLeave=function(e){var t=r.props,n=t.parentMenu,o=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(O.a)(r),i({key:o,domEvent:e})},r.onTitleMouseEnter=function(e){var t=r.props,n=t.eventKey,o=t.onItemHover,i=t.onTitleMouseEnter;o({key:n,hover:!0}),i({key:n,domEvent:e})},r.onTitleMouseLeave=function(e){var t=r.props,n=t.parentMenu,o=t.eventKey,i=t.onItemHover,a=t.onTitleMouseLeave;n.subMenuInstance=Object(O.a)(r),i({key:o,hover:!1}),a({key:o,domEvent:e})},r.onTitleClick=function(e){var t=Object(O.a)(r).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(r.triggerOpenChange(!r.getVisible(),"click"),Ce(t.store,r.props.eventKey,!1))},r.onSubMenuClick=function(e){"function"===typeof r.props.onClick&&r.props.onClick(r.addKeyPath(e))},r.onSelect=function(e){r.props.onSelect(e)},r.onDeselect=function(e){r.props.onDeselect(e)},r.getPrefixCls=function(){return"".concat(r.props.rootPrefixCls,"-submenu")},r.getActiveClassName=function(){return"".concat(r.getPrefixCls(),"-active")},r.getDisabledClassName=function(){return"".concat(r.getPrefixCls(),"-disabled")},r.getSelectedClassName=function(){return"".concat(r.getPrefixCls(),"-selected")},r.getOpenClassName=function(){return"".concat(r.props.rootPrefixCls,"-submenu-open")},r.getVisible=function(){return r.state.isOpen},r.getMode=function(){return r.state.mode},r.saveMenuInstance=function(e){r.menuInstance=e},r.addKeyPath=function(e){return Object(s.a)(Object(s.a)({},e),{},{keyPath:(e.keyPath||[]).concat(r.props.eventKey)})},r.triggerOpenChange=function(e,t){var n=r.props.eventKey,o=function(){r.onOpenChange({key:n,item:Object(O.a)(r),trigger:t,open:e})};"mouseenter"===t?r.mouseenterTimeout=setTimeout((function(){o()}),0):o()},r.isChildrenSelected=function(){var e={find:!1};return le(r.props.children,r.props.selectedKeys,e),e.find},r.isInlineMode=function(){return"inline"===r.getMode()},r.adjustWidth=function(){if(r.subMenuTitle&&r.menuInstance){var e=he.findDOMNode(r.menuInstance);e.offsetWidth>=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(O.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(O.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[ue(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(O.a)(r).haveRendered,o=r.props,i=o.motion,a=o.rootPrefixCls;return Object(s.a)(Object(s.a)({},i),{},{leavedClassName:"".concat(a,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var o=e.store,i=e.eventKey,a=o.getState().defaultActiveFirst;r.isRootMenu=!1;var u=!1;return a&&(u=a[i]),Ce(o,i,u),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,o=t.manualRef,i=t.isOpen,a=function(){e.setState({mode:n,isOpen:i})},s=i!==this.state.isOpen,u=n!==this.state.mode;(u||s)&&(v.a.cancel(this.updateStateRaf),u?this.updateStateRaf=Object(v.a)(a):a()),o&&o(this),"horizontal"===n&&(null===r||void 0===r?void 0:r.isRootMenu)&&i&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),v.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return u.createElement(je,Object.assign({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,o=t.visible,i=t.forceSubMenuRender,a=t.direction,s=this.getMotion(n,o);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||o||i,!this.haveOpened)return u.createElement("div",null);var c=l()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===a));return this.isInlineMode()?u.createElement(ge.default,Object.assign({visible:t.visible},s),(function(t){var n=t.className,r=t.style,o=l()(c,n);return e.renderPopupMenu(o,r)})):this.renderPopupMenu(c)}},{key:"render",value:function(){var e,t,n,o=Object(s.a)({},this.props),i=this.getVisible(),a=this.getPrefixCls(),c=this.isInlineMode(),f=this.getMode(),d=l()(a,"".concat(a,"-").concat(f),(e={},Object(r.a)(e,o.className,!!o.className),Object(r.a)(e,this.getOpenClassName(),i),Object(r.a)(e,this.getActiveClassName(),o.active||i&&!c),Object(r.a)(e,this.getDisabledClassName(),o.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(o.eventKey?this.internalMenuId="".concat(o.eventKey,"$Menu"):(xe+=1,this.internalMenuId="$__$".concat(xe,"$Menu")));var p={},h={},v={};o.disabled||(p={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},h={onClick:this.onTitleClick},v={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var m={},g="rtl"===o.direction;c&&(g?m.paddingRight=o.inlineIndent*o.level:m.paddingLeft=o.inlineIndent*o.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==f&&(b=this.props.expandIcon,"function"===typeof this.props.expandIcon&&(b=u.createElement(this.props.expandIcon,Object(s.a)({},this.props))));var w=u.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:m,className:"".concat(a,"-title"),role:"button"},v,h,{"aria-expanded":i},y,{"aria-haspopup":"true",title:"string"===typeof o.title?o.title:void 0}),o.title,b||u.createElement("i",{className:"".concat(a,"-arrow")})),x=this.renderChildren(),E=(null===(t=o.parentMenu)||void 0===t?void 0:t.isRootMenu)?o.parentMenu.props.getPopupContainer:function(e){return e.parentNode},C=Ee[f],k=o.popupOffset?{offset:o.popupOffset}:{},O=l()((n={},Object(r.a)(n,o.popupClassName,o.popupClassName&&!c),Object(r.a)(n,"".concat(a,"-rtl"),g),n)),S=o.disabled,_=o.triggerSubMenuAction,T=o.subMenuOpenDelay,I=o.forceSubMenuRender,P=o.subMenuCloseDelay,A=o.builtinPlacements;fe.forEach((function(e){return delete o[e]})),delete o.onClick;var R=g?Object.assign({},we,A):Object.assign({},be,A);delete o.direction;var N=this.getBaseProps(),M=c?null:this.getMotion(N.mode,N.visible);return u.createElement("li",Object.assign({},o,p,{className:d,role:"menuitem"}),u.createElement(me.a,{prefixCls:a,popupClassName:l()("".concat(a,"-popup"),O),getPopupContainer:E,builtinPlacements:R,popupPlacement:C,popupVisible:!c&&i,popupAlign:k,popup:c?null:x,action:S||c?[]:[_],mouseEnterDelay:T,mouseLeaveDelay:P,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:I,popupMotion:M},w),c?x:null)}}]),n}(u.Component);ke.defaultProps={onMouseEnter:ae,onMouseLeave:ae,onTitleMouseEnter:ae,onTitleMouseLeave:ae,onTitleClick:ae,manualRef:ae,mode:"vertical",title:""};var Oe=L((function(e,t){var n=e.openKeys,r=e.activeKey,o=e.selectedKeys,i=t.eventKey,a=t.subMenuKey;return{isOpen:n.indexOf(i)>-1,active:r[a]===i,selectedKeys:o}}))(ke);Oe.isSubMenu=!0;var Se=Oe,_e="menuitem-overflowed",Te=function(e){Object(S.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=he.findDOMNode(Object(O.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var o=e.props,i=o.overflowedIndicator,c=o.level,l=o.mode,f=o.prefixCls,d=o.theme;if(1!==c||"horizontal"!==l)return null;var p=e.props.children[0].props,h=(p.children,p.title,p.style),v=Object(a.a)(p,["children","title","style"]),m=Object(s.a)({},h),g="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?m=Object(s.a)(Object(s.a)({},m),{},{display:"none"}):r&&(m=Object(s.a)(Object(s.a)({},m),{},{visibility:"hidden",position:"absolute"}),g="".concat(g,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(f,"-").concat(d):"",w={};return fe.forEach((function(e){void 0!==v[e]&&(w[e]=v[e])})),u.createElement(Se,Object.assign({title:i,className:"".concat(f,"-overflowed-submenu"),popupClassName:b},w,{key:g,eventKey:y,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=he.findDOMNode(Object(O.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];pe(r,"display","inline-block");var o=e.getMenuItemNodes(),i=o.filter((function(e){return e.className.split(" ").indexOf(_e)>=0}));i.forEach((function(e){pe(e,"display","inline-block")})),e.menuItemSizes=o.map((function(e){return de(e,!0)})),i.forEach((function(e){pe(e,"display","none")})),e.overflowedIndicatorWidth=de(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),pe(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=he.findDOMNode(Object(O.a)(e));if(t){var n=de(t);e.overflowedItems=[];var r,o=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(o+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(k.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=he.findDOMNode(this);if(!t)return;this.resizeObserver=new ve.a((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!==typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,o,i){var a=o;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(o.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(i>n&&(a=u.cloneElement(o,{style:{display:"none"},eventKey:"".concat(o.props.eventKey,"-hidden"),className:"".concat(_e)})),i===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return u.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(o.props.eventKey,t.overflowedItems)));var c=[].concat(Object(h.a)(r),[s,a]);return i===e.length-1&&c.push(t.getOverflowedSubMenuItem(o.props.eventKey,[],!0)),c}return[].concat(Object(h.a)(r),[a])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(a.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),o=t;return u.createElement(o,Object.assign({},r),this.renderChildren(n))}}]),n}(u.Component);Te.defaultProps={tag:"div",className:""};var Ie=Te;function Pe(e,t,n){var o=e.getState();e.setState({activeKey:Object(s.a)(Object(s.a)({},o.activeKey),{},Object(r.a)({},t,n))})}function Ae(e){return e.eventKey||"0-menu-"}function Re(e,t){var n,r=t,o=e.children,i=e.eventKey;if(r&&(ce(o,(function(e,t){e&&e.props&&!e.props.disabled&&r===se(e,i,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(ce(o,(function(e,t){r||!e||e.props.disabled||(r=se(e,i,t))})),r):r}function Ne(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var Me=function(e){Object(S.a)(n,e);var t=Object(_.a)(n);function n(e){var o;return Object(C.a)(this,n),(o=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(o.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==y.a.UP&&r!==y.a.DOWN||(i=o.step(r===y.a.UP?-1:1)),i?(e.preventDefault(),Pe(o.props.store,Ae(o.props),i.props.eventKey),"function"===typeof t&&t(i),1):void 0},o.onItemHover=function(e){var t=e.key,n=e.hover;Pe(o.props.store,Ae(o.props),n?t:null)},o.onDeselect=function(e){o.props.onDeselect(e)},o.onSelect=function(e){o.props.onSelect(e)},o.onClick=function(e){o.props.onClick(e)},o.onOpenChange=function(e){o.props.onOpenChange(e)},o.onDestroy=function(e){o.props.onDestroy(e)},o.getFlatInstanceArray=function(){return o.instanceArray},o.step=function(e){var t=o.getFlatInstanceArray(),n=o.props.store.getState().activeKey[Ae(o.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),o.props.defaultActiveFirst||-1===i||(a=t.slice(i,r-1)).length&&!a.every((function(e){return!!e.props.disabled}))){var a,s=(i+1)%r,u=s;do{var c=t[u];if(c&&!c.props.disabled)return c;u=(u+1)%r}while(u!==s);return null}},o.renderCommonMenuItem=function(e,t,n){var r=o.props.store.getState(),i=Object(O.a)(o).props,a=se(e,i.eventKey,t),c=e.props;if(!c||"string"===typeof e.type)return e;var l=a===r.activeKey,f=Object(s.a)(Object(s.a)({mode:c.mode||i.mode,level:i.level,inlineIndent:i.inlineIndent,renderMenuItem:o.renderMenuItem,rootPrefixCls:i.prefixCls,index:t,parentMenu:i.parentMenu,manualRef:c.disabled?void 0:V(e.ref,Ne.bind(Object(O.a)(o))),eventKey:a,active:!c.disabled&&l,multiple:i.multiple,onClick:function(e){(c.onClick||ae)(e),o.onClick(e)},onItemHover:o.onItemHover,motion:i.motion,subMenuOpenDelay:i.subMenuOpenDelay,subMenuCloseDelay:i.subMenuCloseDelay,forceSubMenuRender:i.forceSubMenuRender,onOpenChange:o.onOpenChange,onDeselect:o.onDeselect,onSelect:o.onSelect,builtinPlacements:i.builtinPlacements,itemIcon:c.itemIcon||o.props.itemIcon,expandIcon:c.expandIcon||o.props.expandIcon},n),{},{direction:i.direction});return("inline"===i.mode||ie.any)&&(f.triggerSubMenuAction="click"),u.cloneElement(e,Object(s.a)(Object(s.a)({},f),{},{key:a||t}))},o.renderMenuItem=function(e,t,n){if(!e)return null;var r=o.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:o.props.triggerSubMenuAction,subMenuKey:n};return o.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(s.a)(Object(s.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,Re(e,e.activeKey)))}),o.instanceArray=[],o}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!R()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[Ae(t)],r=Re(t,n);if(r!==n)Pe(t.store,Ae(t),r);else if("activeKey"in e){r!==Re(e,e.activeKey)&&Pe(t.store,Ae(t),r)}}},{key:"render",value:function(){var e=this,t=Object(z.a)({},this.props);this.instanceArray=[];var n={className:l()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,o=t.eventKey,i=t.visible,a=t.level,s=t.mode,c=t.overflowedIndicator,d=t.theme;return fe.forEach((function(e){return delete t[e]})),delete t.onClick,u.createElement(Ie,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:a,theme:d,visible:i,overflowedIndicator:c},n),Object(f.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,o||"0-menu-")})))}}]),n}(u.Component);Me.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ae};var je=L()(Me),De=n(33);function Fe(e,t,n){var r=e.prefixCls,o=e.motion,a=e.defaultMotions,s=void 0===a?{}:a,u=e.openAnimation,c=e.openTransitionName,l=t.switchingModeFromInline;if(o)return o;if("object"===Object(i.a)(u)&&u)Object(De.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"===typeof u)return{motionName:"".concat(r,"-open-").concat(u)};if(c)return{motionName:c};var f=s[n];return f||(l?null:s.other)}var Le=function(e){Object(S.a)(n,e);var t=Object(_.a)(n);function n(e){var r;Object(C.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(O.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,o=e.key;n=t.multiple?n.concat([o]):[o],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(s.a)(Object(s.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(O.a)(r),o=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(o.setState({openKeys:[]}),i([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(O.a)(r).props,n=r.store.getState().openKeys.concat(),o=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}o=o||t};Array.isArray(e)?e.forEach(i):i(e),o&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(O.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),o=e.key,i=n.indexOf(o);-1!==i&&n.splice(i,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(s.a)(Object(s.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,o="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&o.indexOf("anticon")>=0;(t||i)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var o=e.defaultSelectedKeys,i=e.defaultOpenKeys;return"selectedKeys"in e&&(o=e.selectedKeys||[]),"openKeys"in e&&(i=e.openKeys||[]),r.store=function(e){var t=e,n=[];return{setState:function(e){t=B(B({},t),e);for(var r=0;r<n.length;r++)n[r]()},getState:function(){return t},subscribe:function(e){return n.push(e),function(){var t=n.indexOf(e);n.splice(t,1)}}}}({selectedKeys:o,openKeys:i,activeKey:{"0-menu-":Re(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,o=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&o([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(s.a)({},Object(U.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(s.a)(Object(s.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Fe(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,u.createElement(P,{store:this.store},u.createElement(je,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,o=r.getState(),i={},a={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(a.switchingModeFromInline=!0),"openKeys"in e?i.openKeys=e.openKeys:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(a.switchingModeFromInline=!0,a.inlineOpenKeys=o.openKeys,i.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(i.openKeys=t.inlineOpenKeys,a.inlineOpenKeys=[])),Object.keys(i).length&&r.setState(i),a}}]),n}(u.Component);Le.defaultProps={selectable:!0,onClick:ae,onSelect:ae,onOpenChange:ae,onDeselect:ae,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:u.createElement("span",null,"\xb7\xb7\xb7")};var Be=Le,Ue=function(e){Object(S.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===y.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,o=n.onItemHover,i=n.onMouseLeave;o({key:r,hover:!1}),i({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,o=n.onItemHover,i=n.onMouseEnter;o({key:r,hover:!0}),i({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,o=n.multiple,i=n.onClick,a=n.onSelect,s=n.onDeselect,u=n.isSelected,c={key:r,keyPath:[r],item:Object(O.a)(e),domEvent:t};i(c),o?u?s(c):a(c):u||a(c)},e.saveNode=function(t){e.node=t},e}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(s.a)({},this.props),n=l()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),o=Object(s.a)(Object(s.a)({},t.attribute),{},{title:"string"===typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?o=Object(s.a)(Object(s.a)({},o),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(o.role="none");var i={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},a=Object(s.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?a.paddingRight=t.inlineIndent*t.level:a.paddingLeft=t.inlineIndent*t.level),fe.forEach((function(e){return delete t[e]})),delete t.direction;var c=this.props.itemIcon;return"function"===typeof this.props.itemIcon&&(c=u.createElement(this.props.itemIcon,this.props)),u.createElement("li",Object.assign({},Object(U.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),o,i,{style:a,ref:this.saveNode}),t.children,c)}}]),n}(u.Component);Ue.isMenuItem=!0,Ue.defaultProps={onSelect:ae,onMouseEnter:ae,onMouseLeave:ae,manualRef:ae};var ze=L((function(e,t){var n=e.activeKey,r=e.selectedKeys,o=t.eventKey;return{active:n[t.subMenuKey]===o,isSelected:-1!==r.indexOf(o)}}))(Ue),Ve=function(e){Object(S.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(k.a)(n,[{key:"render",value:function(){var e=Object(z.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,o="".concat(r,"-item-group-title"),i="".concat(r,"-item-group-list"),a=e.title,s=e.children;return fe.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,u.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),u.createElement("div",{className:o,title:"string"===typeof a?a:void 0},a),u.createElement("ul",{className:i},u.Children.map(s,this.renderInnerMenuItem)))}}]),n}(u.Component);Ve.isMenuItemGroup=!0,Ve.defaultProps={disabled:!0};var We=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return u.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};We.defaultProps={disabled:!0,className:"",style:{}};var He=Be,$e={adjustX:1,adjustY:1},qe=[0,0],Ke={topLeft:{points:["bl","tl"],overflow:$e,offset:[0,-4],targetOffset:qe},topCenter:{points:["bc","tc"],overflow:$e,offset:[0,-4],targetOffset:qe},topRight:{points:["br","tr"],overflow:$e,offset:[0,-4],targetOffset:qe},bottomLeft:{points:["tl","bl"],overflow:$e,offset:[0,4],targetOffset:qe},bottomCenter:{points:["tc","bc"],overflow:$e,offset:[0,4],targetOffset:qe},bottomRight:{points:["tr","br"],overflow:$e,offset:[0,4],targetOffset:qe}};var Ge=u.forwardRef((function(e,t){var n=e.arrow,i=void 0!==n&&n,s=e.prefixCls,c=void 0===s?"rc-dropdown":s,f=e.transitionName,d=e.animation,p=e.align,h=e.placement,v=void 0===h?"bottomLeft":h,m=e.placements,g=void 0===m?Ke:m,y=e.getPopupContainer,b=e.showAction,w=e.hideAction,x=e.overlayClassName,E=e.overlayStyle,C=e.visible,k=e.trigger,O=void 0===k?["hover"]:k,S=Object(a.a)(e,["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger"]),_=u.useState(),T=Object(o.a)(_,2),I=T[0],P=T[1],A="visible"in e?C:I,R=u.useRef(null);u.useImperativeHandle(t,(function(){return R.current}));var N=function(){var t=e.overlay;return"function"===typeof t?t():t},M=function(t){var n=e.onOverlayClick,r=N().props;P(!1),n&&n(t),r.onClick&&r.onClick(t)},j=function(){var e=N(),t={prefixCls:"".concat(c,"-menu"),onClick:M};return"string"===typeof e.type&&delete t.prefixCls,u.createElement(u.Fragment,null,i&&u.createElement("div",{className:"".concat(c,"-arrow")}),u.cloneElement(e,t))},D=w;return D||-1===O.indexOf("contextMenu")||(D=["click"]),u.createElement(me.a,Object.assign({},S,{prefixCls:c,ref:R,popupClassName:l()(x,Object(r.a)({},"".concat(c,"-show-arrow"),i)),popupStyle:E,builtinPlacements:g,action:O,showAction:b,hideAction:D||[],popupPlacement:v,popupAlign:p,popupTransitionName:f,popupAnimation:d,popupVisible:A,stretch:function(){var t=e.minOverlayWidthMatchTrigger,n=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?t:!n}()?"minWidth":"",popup:"function"===typeof e.overlay?j:j(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;P(t),"function"===typeof n&&n(t)},getPopupContainer:y}),function(){var t=e.children,n=t.props?t.props:{},r=l()(n.className,function(){var t=e.openClassName;return void 0!==t?t:"".concat(c,"-open")}());return I&&t?u.cloneElement(t,{className:r}):t}())}));function Xe(e,t){var n=e.prefixCls,r=e.editable,o=e.locale,i=e.style;return r&&!1!==r.showAdd?u.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:i,"aria-label":(null===o||void 0===o?void 0:o.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}var Ye=u.forwardRef(Xe);function Je(e,t){var n=e.prefixCls,i=e.id,a=e.tabs,s=e.locale,c=e.mobile,f=e.moreIcon,d=void 0===f?"More":f,p=e.moreTransitionName,h=e.style,v=e.className,m=e.editable,g=e.tabBarGutter,b=e.rtl,w=e.onTabClick,x=Object(u.useState)(!1),E=Object(o.a)(x,2),C=E[0],k=E[1],O=Object(u.useState)(null),S=Object(o.a)(O,2),_=S[0],T=S[1],I="".concat(i,"-more-popup"),P="".concat(n,"-dropdown"),A=null!==_?"".concat(I,"-").concat(_):null,R=null===s||void 0===s?void 0:s.dropdownAriaLabel,N=u.createElement(He,{onClick:function(e){var t=e.key,n=e.domEvent;w(t,n),k(!1)},id:I,tabIndex:-1,role:"listbox","aria-activedescendant":A,selectedKeys:[_],"aria-label":void 0!==R?R:"expanded dropdown"},a.map((function(e){return u.createElement(ze,{key:e.key,id:"".concat(I,"-").concat(e.key),role:"option","aria-controls":i&&"".concat(i,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function M(e){for(var t=a.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===_}))||0,r=t.length,o=0;o<r;o+=1){var i=t[n=(n+e+r)%r];if(!i.disabled)return void T(i.key)}}Object(u.useEffect)((function(){var e=document.getElementById(A);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[_]),Object(u.useEffect)((function(){C||T(null)}),[C]);var j=Object(r.a)({},b?"marginLeft":"marginRight",g);a.length||(j.visibility="hidden",j.order=1);var D=l()(Object(r.a)({},"".concat(P,"-rtl"),b)),F=c?null:u.createElement(Ge,{prefixCls:P,overlay:N,trigger:["hover"],visible:C,transitionName:p,onVisibleChange:k,overlayClassName:D,mouseEnterDelay:.1,mouseLeaveDelay:.1},u.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:j,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":I,id:"".concat(i,"-more"),"aria-expanded":C,onKeyDown:function(e){var t=e.which;if(C)switch(t){case y.a.UP:M(-1),e.preventDefault();break;case y.a.DOWN:M(1),e.preventDefault();break;case y.a.ESC:k(!1);break;case y.a.SPACE:case y.a.ENTER:null!==_&&w(_,e)}else[y.a.DOWN,y.a.SPACE,y.a.ENTER].includes(t)&&(k(!0),e.preventDefault())}},d));return u.createElement("div",{className:l()("".concat(n,"-nav-operations"),v),style:h,ref:t},F,u.createElement(Ye,{prefixCls:n,locale:s,editable:m}))}var Qe=u.forwardRef(Je),Ze=Object(u.createContext)(null),et=Math.pow(.995,20);function tt(e,t){var n=u.useRef(e),r=u.useState({}),i=Object(o.a)(r,2)[1];return[n.current,function(e){var r="function"===typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,i({})}]}var nt=function(e){var t,n=e.position,r=e.prefixCls,o=e.extra;if(!o)return null;var i=o;return"right"===n&&(t=i.right||!i.left&&i||null),"left"===n&&(t=i.left||null),t?u.createElement("div",{className:"".concat(r,"-extra-content")},t):null};function rt(e,t){var n,i=u.useContext(Ze),a=i.prefixCls,c=i.tabs,f=e.className,d=e.style,p=e.id,y=e.animated,b=e.activeKey,C=e.rtl,k=e.extra,O=e.editable,S=e.locale,_=e.tabPosition,T=e.tabBarGutter,I=e.children,P=e.onTabClick,A=e.onTabScroll,R=Object(u.useRef)(),N=Object(u.useRef)(),M=Object(u.useRef)(),j=Object(u.useRef)(),D=function(){var e=Object(u.useRef)(new Map);return[function(t){return e.current.has(t)||e.current.set(t,u.createRef()),e.current.get(t)},function(t){e.current.delete(t)}]}(),F=Object(o.a)(D,2),L=F[0],B=F[1],U="top"===_||"bottom"===_,z=tt(0,(function(e,t){U&&A&&A({direction:e>t?"left":"right"})})),V=Object(o.a)(z,2),W=V[0],H=V[1],$=tt(0,(function(e,t){!U&&A&&A({direction:e>t?"top":"bottom"})})),q=Object(o.a)($,2),K=q[0],G=q[1],X=Object(u.useState)(0),Y=Object(o.a)(X,2),J=Y[0],Q=Y[1],Z=Object(u.useState)(0),ee=Object(o.a)(Z,2),te=ee[0],ne=ee[1],re=Object(u.useState)(0),oe=Object(o.a)(re,2),ie=oe[0],ae=oe[1],se=Object(u.useState)(0),ue=Object(o.a)(se,2),ce=ue[0],le=ue[1],fe=Object(u.useState)(null),de=Object(o.a)(fe,2),pe=de[0],he=de[1],ve=Object(u.useState)(null),me=Object(o.a)(ve,2),ge=me[0],ye=me[1],be=Object(u.useState)(0),we=Object(o.a)(be,2),xe=we[0],Ee=we[1],Ce=Object(u.useState)(0),ke=Object(o.a)(Ce,2),Oe=ke[0],Se=ke[1],_e=function(e){var t=Object(u.useRef)([]),n=Object(u.useState)({}),r=Object(o.a)(n,2)[1],i=Object(u.useRef)("function"===typeof e?e():e),a=g((function(){var e=i.current;t.current.forEach((function(t){e=t(e)})),t.current=[],i.current=e,r({})}));return[i.current,function(e){t.current.push(e),a()}]}(new Map),Te=Object(o.a)(_e,2),Ie=Te[0],Pe=Te[1],Ae=function(e,t,n){return Object(u.useMemo)((function(){for(var n,r=new Map,o=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||x,i=o.left+o.width,a=0;a<e.length;a+=1){var u,c=e[a].key,l=t.get(c);l||(l=t.get(null===(u=e[a-1])||void 0===u?void 0:u.key)||x);var f=r.get(c)||Object(s.a)({},l);f.right=i-f.left-f.width,r.set(c,f)}return r}),[e.map((function(e){return e.key})).join("_"),t,n])}(c,Ie,J),Re="".concat(a,"-nav-operations-hidden"),Ne=0,Me=0;function je(e){return e<Ne?Ne:e>Me?Me:e}U?C?(Ne=0,Me=Math.max(0,J-pe)):(Ne=Math.min(0,pe-J),Me=0):(Ne=Math.min(0,ge-te),Me=0);var De=Object(u.useRef)(),Fe=Object(u.useState)(),Le=Object(o.a)(Fe,2),Be=Le[0],Ue=Le[1];function ze(){Ue(Date.now())}function Ve(){window.clearTimeout(De.current)}function We(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=Ae.get(e)||{width:0,height:0,left:0,right:0,top:0};if(U){var n=W;C?t.right<W?n=t.right:t.right+t.width>W+pe&&(n=t.right+t.width-pe):t.left<-W?n=-t.left:t.left+t.width>-W+pe&&(n=-(t.left+t.width-pe)),G(0),H(je(n))}else{var r=K;t.top<-K?r=-t.top:t.top+t.height>-K+ge&&(r=-(t.top+t.height-ge)),H(0),G(je(r))}}!function(e,t){var n=Object(u.useState)(),r=Object(o.a)(n,2),i=r[0],a=r[1],s=Object(u.useState)(0),c=Object(o.a)(s,2),l=c[0],f=c[1],d=Object(u.useState)(0),p=Object(o.a)(d,2),h=p[0],v=p[1],m=Object(u.useState)(),g=Object(o.a)(m,2),y=g[0],b=g[1],w=Object(u.useRef)(),x=Object(u.useRef)(),E=Object(u.useRef)(null);E.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;a({x:n,y:r}),window.clearInterval(w.current)},onTouchMove:function(e){if(i){e.preventDefault();var n=e.touches[0],r=n.screenX,o=n.screenY;a({x:r,y:o});var s=r-i.x,u=o-i.y;t(s,u);var c=Date.now();f(c),v(c-l),b({x:s,y:u})}},onTouchEnd:function(){if(i&&(a(null),b(null),y)){var e=y.x/h,n=y.y/h,r=Math.abs(e),o=Math.abs(n);if(Math.max(r,o)<.1)return;var s=e,u=n;w.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(u)<.01?window.clearInterval(w.current):t(20*(s*=et),20*(u*=et))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,o=0,i=Math.abs(n),a=Math.abs(r);i===a?o="x"===x.current?n:r:i>a?(o=n,x.current="x"):(o=r,x.current="y"),t(-o,-o)&&e.preventDefault()}},u.useEffect((function(){function t(e){E.current.onTouchMove(e)}function n(e){E.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){E.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){E.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){function n(e,t){e((function(e){return je(e+t)}))}if(U){if(pe>=J)return!1;n(H,e)}else{if(ge>=te)return!1;n(G,t)}return Ve(),ze(),!0})),Object(u.useEffect)((function(){return Ve(),Be&&(De.current=window.setTimeout((function(){Ue(0)}),100)),Ve}),[Be]);var He=function(e,t,n,r,o){var i,a,s,c=o.tabs,l=o.tabPosition,f=o.rtl;["top","bottom"].includes(l)?(i="width",a=f?"right":"left",s=Math.abs(t.left)):(i="height",a="top",s=-t.top);var d=t[i],p=n[i],h=r[i],v=d;return p+h>d&&(v=d-h),Object(u.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;r<t;r+=1){var o=e.get(c[r].key)||E;if(o[a]+o[i]>s+v){n=r-1;break}}for(var u=0,l=t-1;l>=0;l-=1)if((e.get(c[l].key)||E)[a]<s){u=l+1;break}return[u,n]}),[e,s,v,l,c.map((function(e){return e.key})).join("_"),f])}(Ae,{width:pe,height:ge,left:W,top:K},{width:ie,height:ce},{width:xe,height:Oe},Object(s.a)(Object(s.a)({},e),{},{tabs:c})),$e=Object(o.a)(He,2),qe=$e[0],Ke=$e[1],Ge=c.map((function(e){var t=e.key;return u.createElement(w,{id:p,prefixCls:a,key:t,rtl:C,tab:e,closable:e.closable,editable:O,active:t===b,tabPosition:_,tabBarGutter:T,renderWrapper:I,removeAriaLabel:null===S||void 0===S?void 0:S.removeAriaLabel,ref:L(t),onClick:function(e){P(t,e)},onRemove:function(){B(t)},onFocus:function(){We(t),ze(),C||(R.current.scrollLeft=0),R.current.scrollTop=0}})})),Xe=g((function(){var e,t,n,r,o,i,a,s,u,l=(null===(e=R.current)||void 0===e?void 0:e.offsetWidth)||0,f=(null===(t=R.current)||void 0===t?void 0:t.offsetHeight)||0,d=(null===(n=j.current)||void 0===n?void 0:n.offsetWidth)||0,p=(null===(r=j.current)||void 0===r?void 0:r.offsetHeight)||0,h=(null===(o=M.current)||void 0===o?void 0:o.offsetWidth)||0,v=(null===(i=M.current)||void 0===i?void 0:i.offsetHeight)||0;he(l),ye(f),Ee(d),Se(p);var m=((null===(a=N.current)||void 0===a?void 0:a.offsetWidth)||0)-d,g=((null===(s=N.current)||void 0===s?void 0:s.offsetHeight)||0)-p;Q(m),ne(g);var y=null===(u=M.current)||void 0===u?void 0:u.className.includes(Re);ae(m-(y?0:h)),le(g-(y?0:v)),Pe((function(){var e=new Map;return c.forEach((function(t){var n=t.key,r=L(n).current;r&&e.set(n,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),e}))})),Je=c.slice(0,qe),rt=c.slice(Ke+1),ot=[].concat(Object(h.a)(Je),Object(h.a)(rt)),it=Object(u.useState)(),at=Object(o.a)(it,2),st=at[0],ut=at[1],ct=Ae.get(b),lt=Object(u.useRef)();function ft(){v.a.cancel(lt.current)}Object(u.useEffect)((function(){var e={};return ct&&(U?(C?e.right=ct.right:e.left=ct.left,e.width=ct.width):(e.top=ct.top,e.height=ct.height)),ft(),lt.current=Object(v.a)((function(){ut(e)})),ft}),[ct,U,C]),Object(u.useEffect)((function(){We()}),[b,ct,Ae,U]),Object(u.useEffect)((function(){Xe()}),[C,T,b,c.map((function(e){return e.key})).join("_")]);var dt,pt,ht,vt,mt=!!ot.length,gt="".concat(a,"-nav-wrap");return U?C?(pt=W>0,dt=W+pe<J):(dt=W<0,pt=-W+pe<J):(ht=K<0,vt=-K+ge<te),u.createElement("div",{ref:t,role:"tablist",className:l()("".concat(a,"-nav"),f),style:d,onKeyDown:function(){ze()}},u.createElement(nt,{position:"left",extra:k,prefixCls:a}),u.createElement(m.default,{onResize:Xe},u.createElement("div",{className:l()(gt,(n={},Object(r.a)(n,"".concat(gt,"-ping-left"),dt),Object(r.a)(n,"".concat(gt,"-ping-right"),pt),Object(r.a)(n,"".concat(gt,"-ping-top"),ht),Object(r.a)(n,"".concat(gt,"-ping-bottom"),vt),n)),ref:R},u.createElement(m.default,{onResize:Xe},u.createElement("div",{ref:N,className:"".concat(a,"-nav-list"),style:{transform:"translate(".concat(W,"px, ").concat(K,"px)"),transition:Be?"none":void 0}},Ge,u.createElement(Ye,{ref:j,prefixCls:a,locale:S,editable:O,style:{visibility:mt?"hidden":null}}),u.createElement("div",{className:l()("".concat(a,"-ink-bar"),Object(r.a)({},"".concat(a,"-ink-bar-animated"),y.inkBar)),style:st}))))),u.createElement(Qe,Object.assign({},e,{ref:M,prefixCls:a,tabs:ot,className:!mt&&Re})),u.createElement(nt,{position:"right",extra:k,prefixCls:a}))}var ot=u.forwardRef(rt);function it(e){var t=e.id,n=e.activeKey,o=e.animated,i=e.tabPosition,a=e.rtl,s=e.destroyInactiveTabPane,c=u.useContext(Ze),f=c.prefixCls,d=c.tabs,p=o.tabPane,h=d.findIndex((function(e){return e.key===n}));return u.createElement("div",{className:l()("".concat(f,"-content-holder"))},u.createElement("div",{className:l()("".concat(f,"-content"),"".concat(f,"-content-").concat(i),Object(r.a)({},"".concat(f,"-content-animated"),p)),style:h&&p?Object(r.a)({},a?"marginRight":"marginLeft","-".concat(h,"00%")):null},d.map((function(e){return u.cloneElement(e.node,{key:e.key,prefixCls:f,tabKey:e.key,id:t,animated:p,active:e.key===n,destroyInactiveTabPane:s})}))))}function at(e){var t=e.prefixCls,n=e.forceRender,r=e.className,i=e.style,a=e.id,c=e.active,f=e.animated,d=e.destroyInactiveTabPane,p=e.tabKey,h=e.children,v=u.useState(n),m=Object(o.a)(v,2),g=m[0],y=m[1];u.useEffect((function(){c?y(!0):d&&y(!1)}),[c,d]);var b={};return c||(f?(b.visibility="hidden",b.height=0,b.overflowY="hidden"):b.display="none"),u.createElement("div",{id:a&&"".concat(a,"-panel-").concat(p),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":a&&"".concat(a,"-tab-").concat(p),"aria-hidden":!c,style:Object(s.a)(Object(s.a)({},b),i),className:l()("".concat(t,"-tabpane"),c&&"".concat(t,"-tabpane-active"),r)},(c||g||n)&&h)}var st=0;function ut(e,t){var n,c,h=e.id,v=e.prefixCls,m=void 0===v?"rc-tabs":v,g=e.className,y=e.children,b=e.direction,w=e.activeKey,x=e.defaultActiveKey,E=e.editable,C=e.animated,k=void 0===C?{inkBar:!0,tabPane:!1}:C,O=e.tabPosition,S=void 0===O?"top":O,_=e.tabBarGutter,T=e.tabBarStyle,I=e.tabBarExtraContent,P=e.locale,A=e.moreIcon,R=e.moreTransitionName,N=e.destroyInactiveTabPane,M=e.renderTabBar,j=e.onChange,D=e.onTabClick,F=e.onTabScroll,L=Object(a.a)(e,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),B=function(e){return Object(f.a)(e).map((function(e){if(u.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return Object(s.a)(Object(s.a)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(y),U="rtl"===b;c=!1===k?{inkBar:!1,tabPane:!1}:!0===k?{inkBar:!0,tabPane:!0}:Object(s.a)({inkBar:!0,tabPane:!1},"object"===Object(i.a)(k)?k:{});var z=Object(u.useState)(!1),V=Object(o.a)(z,2),W=V[0],H=V[1];Object(u.useEffect)((function(){H(Object(d.a)())}),[]);var $=Object(p.a)((function(){var e;return null===(e=B[0])||void 0===e?void 0:e.key}),{value:w,defaultValue:x}),q=Object(o.a)($,2),K=q[0],G=q[1],X=Object(u.useState)((function(){return B.findIndex((function(e){return e.key===K}))})),Y=Object(o.a)(X,2),J=Y[0],Q=Y[1];Object(u.useEffect)((function(){var e,t=B.findIndex((function(e){return e.key===K}));-1===t&&(t=Math.max(0,Math.min(J,B.length-1)),G(null===(e=B[t])||void 0===e?void 0:e.key));Q(t)}),[B.map((function(e){return e.key})).join("_"),K,J]);var Z=Object(p.a)(null,{value:h}),ee=Object(o.a)(Z,2),te=ee[0],ne=ee[1],re=S;W&&!["left","right"].includes(S)&&(re="top"),Object(u.useEffect)((function(){h||(ne("rc-tabs-".concat(st)),st+=1)}),[]);var oe,ie={id:te,activeKey:K,animated:c,tabPosition:re,rtl:U,mobile:W},ae=Object(s.a)(Object(s.a)({},ie),{},{editable:E,locale:P,moreIcon:A,moreTransitionName:R,tabBarGutter:_,onTabClick:function(e,t){null===D||void 0===D||D(e,t),G(e),null===j||void 0===j||j(e)},onTabScroll:F,extra:I,style:T,panes:y});return oe=M?M(ae,ot):u.createElement(ot,Object.assign({},ae)),u.createElement(Ze.Provider,{value:{tabs:B,prefixCls:m}},u.createElement("div",Object.assign({ref:t,id:h,className:l()(m,"".concat(m,"-").concat(re),(n={},Object(r.a)(n,"".concat(m,"-mobile"),W),Object(r.a)(n,"".concat(m,"-editable"),E),Object(r.a)(n,"".concat(m,"-rtl"),U),n),g)},L),oe,u.createElement(it,Object.assign({destroyInactiveTabPane:N},ie,{animated:c}))))}var ct=u.forwardRef(ut);ct.TabPane=at;var lt=ct;t.default=lt},function(e,t,n){"use strict";n.r(t);var r,o=n(11),i=n(0),a=n(34),s=n(146);var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.element,r=void 0===n?document.body:n,o={},i=Object.keys(e);return i.forEach((function(e){o[e]=r.style[e]})),i.forEach((function(t){r.style[t]=e[t]})),o};var c={},l=function(e){if(document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth||e){var t="ant-scrolling-effect",n=new RegExp("".concat(t),"g"),o=document.body.className;if(e){if(!n.test(o))return;return u(c),c={},void(document.body.className=o.replace(n,"").trim())}var i=function(e){if("undefined"===typeof document)return 0;if(e||void 0===r){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),o=n.style;o.position="absolute",o.top=0,o.left=0,o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;i===a&&(a=n.clientWidth),document.body.removeChild(n),r=i-a}return r}();if(i&&(c=u({position:"relative",width:"calc(100% - ".concat(i,"px)")}),!n.test(o))){var a="".concat(o," ").concat(t);document.body.className=a.trim()}}},f=n(73);function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==y(t)&&"function"!==typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e){return(y="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var b=0,w=Object(f.a)();var x={},E=function(e){if(!w)return null;if(e){if("string"===typeof e)return document.querySelectorAll(e)[0];if("function"===typeof e)return e();if("object"===y(e)&&e instanceof window.HTMLElement)return e}return document.body},C=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(c,e);var t,n,r,o=h(c);function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=o.call(this,e)).componentRef=i.createRef(),t.attachToParent=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||t.container&&!t.container.parentNode){var n=E(t.props.getContainer);return!!n&&(n.appendChild(t.container),!0)}return!0},t.getContainer=function(){return w?(t.container||(t.container=document.createElement("div"),t.attachToParent(!0)),t.setWrapperClassName(),t.container):null},t.setWrapperClassName=function(){var e=t.props.wrapperClassName;t.container&&e&&e!==t.container.className&&(t.container.className=e)},t.removeCurrentContainer=function(){var e,n;null===(e=t.container)||void 0===e||null===(n=e.parentNode)||void 0===n||n.removeChild(t.container)},t.switchScrollingEffect=function(){1!==b||Object.keys(x).length?b||(u(x),x={},l(!0)):(l(),x=u({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}))};var n=e.visible,r=e.getContainer;return w&&E(r)===document.body&&(b=n?b+1:b),t.state={_self:m(t)},t}return t=c,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t._self,o=e.visible,i=e.getContainer;if(n){var a=n.visible,s=n.getContainer;o!==a&&w&&E(i)===document.body&&(b=o&&!a?b+1:b-1),("function"===typeof i&&"function"===typeof s?i.toString()!==s.toString():i!==s)&&r.removeCurrentContainer()}return{prevProps:e}}}],(n=[{key:"componentDidMount",value:function(){var e=this;this.attachToParent()||(this.rafId=Object(a.a)((function(){e.forceUpdate()})))}},{key:"componentDidUpdate",value:function(){this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visible,n=e.getContainer;w&&E(n)===document.body&&(b=t&&b?b-1:b),this.removeCurrentContainer(),a.a.cancel(this.rafId)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.forceRender,r=e.visible,o=null,a={getOpenCount:function(){return b},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect};return(n||r||this.componentRef.current)&&(o=i.createElement(s.a,{getContainer:this.getContainer,ref:this.componentRef},t(a))),o}}])&&d(t.prototype,n),r&&d(t,r),c}(i.Component),k=n(4),O=n(10),S=n.n(O),_=n(22),T=n(74),I=n(45);function P(e){var t=e.prefixCls,n=e.style,r=e.visible,o=e.maskProps,a=e.motionName;return i.createElement(I.default,{key:"mask",visible:r,motionName:a,leavedClassName:"".concat(t,"-mask-hidden")},(function(e){var r=e.className,a=e.style;return i.createElement("div",Object.assign({style:Object(k.a)(Object(k.a)({},a),n),className:S()("".concat(t,"-mask"),r)},o))}))}function A(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}var R=-1;function N(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var o=e.document;"number"!==typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}var M=i.memo((function(e){return e.children}),(function(e,t){return!t.visible})),j={width:0,height:0,overflow:"hidden",outline:"none"},D=i.forwardRef((function(e,t){var n=e.closable,r=e.prefixCls,a=e.width,s=e.height,u=e.footer,c=e.title,l=e.closeIcon,f=e.style,d=e.className,p=e.visible,h=e.forceRender,v=e.bodyStyle,m=e.bodyProps,g=e.children,y=e.destroyOnClose,b=e.modalRender,w=e.motionName,x=e.ariaId,E=e.onClose,C=e.onVisibleChanged,O=e.onMouseDown,_=e.onMouseUp,T=e.mousePosition,P=Object(i.useRef)(),A=Object(i.useRef)(),R=Object(i.useRef)();i.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=P.current)||void 0===e||e.focus()},getDOM:function(){return R.current},changeActive:function(e){var t=document.activeElement;e&&t===A.current?P.current.focus():e||t!==P.current||A.current.focus()}}}));var D,F,L,B=i.useState(),U=Object(o.a)(B,2),z=U[0],V=U[1],W={};function H(){var e=function(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=N(o),n.top+=N(o,!0),n}(R.current);V(T?"".concat(T.x-e.left,"px ").concat(T.y-e.top,"px"):"")}void 0!==a&&(W.width=a),void 0!==s&&(W.height=s),z&&(W.transformOrigin=z),u&&(D=i.createElement("div",{className:"".concat(r,"-footer")},u)),c&&(F=i.createElement("div",{className:"".concat(r,"-header")},i.createElement("div",{className:"".concat(r,"-title"),id:x},c))),n&&(L=i.createElement("button",{type:"button",onClick:E,"aria-label":"Close",className:"".concat(r,"-close")},l||i.createElement("span",{className:"".concat(r,"-close-x")})));var $=i.createElement("div",{className:"".concat(r,"-content")},L,F,i.createElement("div",Object.assign({className:"".concat(r,"-body"),style:v},m),g),D);return i.createElement(I.default,{visible:p,onVisibleChanged:C,onAppearPrepare:H,onEnterPrepare:H,forceRender:h,motionName:w,removeOnLeave:y,ref:R},(function(e,t){var n=e.className,o=e.style;return i.createElement("div",{key:"dialog-element",role:"document",ref:t,style:Object(k.a)(Object(k.a)(Object(k.a)({},o),f),W),className:S()(r,d,n),onMouseDown:O,onMouseUp:_},i.createElement("div",{tabIndex:0,ref:P,style:j,"aria-hidden":"true"}),i.createElement(M,{visible:p},b?b($):$),i.createElement("div",{tabIndex:0,ref:A,style:j,"aria-hidden":"true"}))}))}));D.displayName="Content";var F=D;function L(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,r=e.zIndex,a=e.visible,s=void 0!==a&&a,u=e.keyboard,c=void 0===u||u,l=e.focusTriggerAfterClose,f=void 0===l||l,d=e.switchScrollingEffect,p=void 0===d?function(){}:d,h=e.title,v=e.wrapStyle,m=e.wrapClassName,g=e.wrapProps,y=e.onClose,b=e.afterClose,w=e.transitionName,x=e.animation,E=e.closable,C=void 0===E||E,O=e.mask,I=void 0===O||O,N=e.maskTransitionName,M=e.maskAnimation,j=e.maskClosable,D=void 0===j||j,L=e.maskStyle,B=e.maskProps,U=Object(i.useRef)(),z=Object(i.useRef)(),V=Object(i.useRef)(),W=i.useState(s),H=Object(o.a)(W,2),$=H[0],q=H[1],K=Object(i.useRef)();function G(e){null===y||void 0===y||y(e)}K.current||(K.current="rcDialogTitle".concat(R+=1));var X=Object(i.useRef)(!1),Y=Object(i.useRef)(),J=null;return D&&(J=function(e){X.current?X.current=!1:Object(T.a)(V.current.getDOM(),e.target)||G(e)}),Object(i.useEffect)((function(){s&&(q(!0),p())}),[s]),Object(i.useEffect)((function(){return function(){p(),clearTimeout(Y.current)}}),[]),i.createElement("div",{className:"".concat(n,"-root")},i.createElement(P,{prefixCls:n,visible:I&&s,motionName:A(n,N,M),style:Object(k.a)({zIndex:r},L),maskProps:B}),i.createElement("div",Object.assign({tabIndex:-1,onKeyDown:function(e){if(c&&e.keyCode===_.a.ESC)return e.stopPropagation(),void G(e);s&&e.keyCode===_.a.TAB&&V.current.changeActive(!e.shiftKey)},className:S()("".concat(n,"-wrap"),m),ref:z,onClick:J,role:"dialog","aria-labelledby":h?K.current:null,style:Object(k.a)(Object(k.a)({zIndex:r},v),{},{display:$?null:"none"})},g),i.createElement(F,Object.assign({},e,{onMouseDown:function(){clearTimeout(Y.current),X.current=!0},onMouseUp:function(){Y.current=setTimeout((function(){X.current=!1}))},ref:V,closable:C,ariaId:K.current,prefixCls:n,visible:s,onClose:G,onVisibleChanged:function(e){if(e){var t;if(!Object(T.a)(z.current,document.activeElement))U.current=document.activeElement,null===(t=V.current)||void 0===t||t.focus()}else{if(q(!1),p(),I&&U.current&&f){try{U.current.focus({preventScroll:!0})}catch(n){}U.current=null}null===b||void 0===b||b()}},motionName:A(n,w,x)}))))}var B=function(e){var t=e.visible,n=e.getContainer,r=e.forceRender,a=e.destroyOnClose,s=void 0!==a&&a,u=e.afterClose,c=i.useState(t),l=Object(o.a)(c,2),f=l[0],d=l[1];return i.useEffect((function(){t&&d(!0)}),[t]),!1===n?i.createElement(L,Object.assign({},e,{getOpenCount:function(){return 2}})):r||!s||f?i.createElement(C,{visible:t,forceRender:r,getContainer:n},(function(t){return i.createElement(L,Object.assign({},e,{destroyOnClose:s,afterClose:function(){null===u||void 0===u||u(),d(!1)}},t))})):null};B.displayName="Dialog";var U=B;t.default=U},function(e,t,n){"use strict";n.r(t);var r=n(23),o=n(26),i=n(30),a=n(36),s=n(0),u=n.n(s),c=n(13),l=n(21),f=n(11),d=n(10),p=n.n(d),h=n(81);function v(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function m(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append("".concat(t,"[]"),e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),v(t)):e.onSuccess(v(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var g=+new Date,y=0;function b(){return"rc-upload-".concat(g,"-").concat(++y)}var w=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",i=o.replace(/\/.*$/,"");return n.some((function(e){var t,n,a=e.trim();return"."===a.charAt(0)?(t=r.toLowerCase(),n=a.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(a)?i===a.replace(/\/.*$/,""):o===a}))}return!0};var x=function(e,t,n){var r=function e(r,o){r.path=o||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var o=Array.prototype.slice.apply(n);r=r.concat(o),o.length?e():t(r)}))}()}(r,(function(t){t.forEach((function(t){e(t,"".concat(o).concat(r.name,"/"))}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},E=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).state={uid:b()},e.reqs={},e.onChange=function(t){var n=t.target.files;e.uploadFiles(n),e.reset()},e.onClick=function(t){var n=e.fileInput;if(n){var r=e.props,o=r.children,i=r.onClick;if(o&&"button"===o.type){var a=n.parentNode;a.focus(),a.querySelector("button").blur()}n.click(),i&&i(t)}},e.onKeyDown=function(t){"Enter"===t.key&&e.onClick(t)},e.onFileDrop=function(t){var n=e.props.multiple;if(t.preventDefault(),"dragover"!==t.type)if(e.props.directory)x(Array.prototype.slice.call(t.dataTransfer.items),e.uploadFiles,(function(t){return w(t,e.props.accept)}));else{var r=Array.prototype.slice.call(t.dataTransfer.files).filter((function(t){return w(t,e.props.accept)}));!1===n&&(r=r.slice(0,1)),e.uploadFiles(r)}},e.uploadFiles=function(t){var n=Array.prototype.slice.call(t);n.map((function(e){return e.uid=b(),e})).forEach((function(t){e.upload(t,n)}))},e.saveFileInput=function(t){e.fileInput=t},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(e,t){var n=this,r=this.props;if(r.beforeUpload){var o=r.beforeUpload(e,t);o&&"boolean"!==typeof o&&o.then?o.then((function(t){var r=Object.prototype.toString.call(t);"[object File]"!==r&&"[object Blob]"!==r?n.post(e):n.post(t)})).catch((function(e){console.log(e)})):!1!==o&&Promise.resolve().then((function(){n.post(e)}))}else Promise.resolve().then((function(){n.post(e)}))}},{key:"post",value:function(e){var t=this;if(this._isMounted){var n=this.props,r=n.onStart,o=n.onProgress,i=n.transformFile,a=void 0===i?function(e){return e}:i;new Promise((function(t){var r=n.action;return"function"===typeof r&&(r=r(e)),t(r)})).then((function(i){var s=e.uid,u=n.customRequest||m;Promise.resolve(a(e)).then((function(e){var t=n.data;return"function"===typeof t&&(t=t(e)),Promise.all([e,t])})).catch((function(e){console.error(e)})).then((function(a){var c=Object(f.a)(a,2),l=c[0],d=c[1],p={action:i,filename:n.name,data:d,file:l,headers:n.headers,withCredentials:n.withCredentials,method:n.method||"post",onProgress:o?function(t){o(t,e)}:null,onSuccess:function(r,o){delete t.reqs[s],n.onSuccess(r,e,o)},onError:function(r,o){delete t.reqs[s],n.onError(r,o,e)}};r(e),t.reqs[s]=u(p)}))}))}}},{key:"reset",value:function(){this.setState({uid:b()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:"render",value:function(){var e,t=this.props,n=t.component,r=t.prefixCls,o=t.className,i=t.disabled,a=t.id,s=t.style,f=t.multiple,d=t.accept,v=t.children,m=t.directory,g=t.openFileDialogOnClick,y=t.onMouseEnter,b=t.onMouseLeave,w=Object(l.a)(t,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),x=p()((e={},Object(c.a)(e,r,!0),Object(c.a)(e,"".concat(r,"-disabled"),i),Object(c.a)(e,o,o),e)),E=m?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},C=i?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return u.a.createElement(n,Object.assign({},C,{className:x,role:"button",style:s}),u.a.createElement("input",Object.assign({},Object(h.a)(w,{aria:!0,data:!0}),{id:a,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d},E,{multiple:f,onChange:this.onChange})),v)}}]),n}(s.Component);function C(){}var k=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).saveUploader=function(t){e.uploader=t},e}return Object(o.a)(n,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return u.a.createElement(E,Object.assign({},this.props,{ref:this.saveUploader}))}}]),n}(s.Component);k.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:C,onError:C,onSuccess:C,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var O=k;t.default=O},function(e,t,n){"use strict";n.r(t);var r=n(37),o=n(4),i=n(21),a=n(0),s=n(82),u={adjustX:1,adjustY:1},c=[0,0],l={left:{points:["cr","cl"],overflow:u,offset:[-4,0],targetOffset:c},right:{points:["cl","cr"],overflow:u,offset:[4,0],targetOffset:c},top:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:c},bottom:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:c},topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:c},leftTop:{points:["tr","tl"],overflow:u,offset:[-4,0],targetOffset:c},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:c},rightTop:{points:["tl","tr"],overflow:u,offset:[4,0],targetOffset:c},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:c},rightBottom:{points:["bl","br"],overflow:u,offset:[4,0],targetOffset:c},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:c},leftBottom:{points:["br","bl"],overflow:u,offset:[-4,0],targetOffset:c}},f=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,o=e.overlayInnerStyle;return a.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:o},"function"===typeof t?t():t)},d=Object(a.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,c=void 0===u?["hover"]:u,d=e.mouseEnterDelay,p=void 0===d?0:d,h=e.mouseLeaveDelay,v=void 0===h?.1:h,m=e.overlayStyle,g=e.prefixCls,y=void 0===g?"rc-tooltip":g,b=e.children,w=e.onVisibleChange,x=e.afterVisibleChange,E=e.transitionName,C=e.animation,k=e.placement,O=void 0===k?"right":k,S=e.align,_=void 0===S?{}:S,T=e.destroyTooltipOnHide,I=void 0!==T&&T,P=e.defaultVisible,A=e.getTooltipContainer,R=e.overlayInnerStyle,N=Object(i.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),M=Object(a.useRef)(null);Object(a.useImperativeHandle)(t,(function(){return M.current}));var j=Object(o.a)({},N);"visible"in e&&(j.popupVisible=e.visible);var D=!1,F=!1;if("boolean"===typeof I)D=I;else if(I&&"object"===Object(r.a)(I)){var L=I.keepParent;D=!0===L,F=!1===L}return a.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,o=e.id;return[a.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),a.createElement(f,{key:"content",prefixCls:y,id:o,overlay:r,overlayInnerStyle:R})]},action:c,builtinPlacements:l,popupPlacement:O,ref:M,popupAlign:_,getPopupContainer:A,onPopupVisibleChange:w,afterPopupVisibleChange:x,popupTransitionName:E,popupAnimation:C,defaultPopupVisible:P,destroyPopupOnHide:D,autoDestroy:F,mouseLeaveDelay:v,popupStyle:m,mouseEnterDelay:p},j),b)}));t.default=d},function(e,t,n){"use strict";n.r(t),n.d(t,"Line",(function(){return f})),n.d(t,"Circle",(function(){return g}));var r=n(11),o=n(21),i=n(0),a=n(10),s=n.n(a),u={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},c=function(e){var t=e.map((function(){return Object(i.useRef)()})),n=Object(i.useRef)(null);return Object(i.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(o){var i=t[o].current;if(i){r=!0;var a=i.style;a.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(a.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]},l=function(e){var t=e.className,n=e.percent,a=e.prefixCls,u=e.strokeColor,l=e.strokeLinecap,f=e.strokeWidth,d=e.style,p=e.trailColor,h=e.trailWidth,v=e.transition,m=Object(o.a)(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete m.gapPosition;var g=Array.isArray(n)?n:[n],y=Array.isArray(u)?u:[u],b=c(g),w=Object(r.a)(b,1)[0],x=f/2,E=100-f/2,C="M ".concat("round"===l?x:0,",").concat(x,"\n L ").concat("round"===l?E:100,",").concat(x),k="0 0 100 ".concat(f),O=0;return i.createElement("svg",Object.assign({className:s()("".concat(a,"-line"),t),viewBox:k,preserveAspectRatio:"none",style:d},m),i.createElement("path",{className:"".concat(a,"-line-trail"),d:C,strokeLinecap:l,stroke:p,strokeWidth:h||f,fillOpacity:"0"}),g.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(O,"px"),transition:v||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},r=y[t]||y[y.length-1];return O+=e,i.createElement("path",{key:t,className:"".concat(a,"-line-path"),d:C,strokeLinecap:l,stroke:r,strokeWidth:f,fillOpacity:"0",ref:w[t],style:n})})))};l.defaultProps=u,l.displayName="Line";var f=l,d=0;function p(e){return+e.replace("%","")}function h(e){return Array.isArray(e)?e:[e]}function v(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0,a=50-r/2,s=0,u=-a,c=0,l=-2*a;switch(i){case"left":s=-a,u=0,c=2*a,l=0;break;case"right":s=a,u=0,c=-2*a,l=0;break;case"bottom":u=a,l=2*a}var f="M 50,50 m ".concat(s,",").concat(u,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(c,",").concat(-l,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(-c,",").concat(l),d=2*Math.PI*a,p={stroke:n,strokeDasharray:"".concat(t/100*(d-o),"px ").concat(d,"px"),strokeDashoffset:"-".concat(o/2+e/100*(d-o),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:f,pathStyle:p}}var m=function(e){var t=e.prefixCls,n=e.strokeWidth,a=e.trailWidth,u=e.gapDegree,l=e.gapPosition,f=e.trailColor,m=e.strokeLinecap,g=e.style,y=e.className,b=e.strokeColor,w=e.percent,x=Object(o.a)(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),E=i.useMemo((function(){return d+=1}),[]),C=v(0,100,f,n,u,l),k=C.pathString,O=C.pathStyle,S=h(w),_=h(b),T=_.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),I=c(S),P=Object(r.a)(I,1)[0];return i.createElement("svg",Object.assign({className:s()("".concat(t,"-circle"),y),viewBox:"0 0 100 100",style:g},x),T&&i.createElement("defs",null,i.createElement("linearGradient",{id:"".concat(t,"-gradient-").concat(E),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(T).sort((function(e,t){return p(e)-p(t)})).map((function(e,t){return i.createElement("stop",{key:t,offset:e,stopColor:T[e]})})))),i.createElement("path",{className:"".concat(t,"-circle-trail"),d:k,stroke:f,strokeLinecap:m,strokeWidth:a||n,fillOpacity:"0",style:O}),function(){var e=0;return S.map((function(r,o){var a=_[o]||_[_.length-1],s="[object Object]"===Object.prototype.toString.call(a)?"url(#".concat(t,"-gradient-").concat(E,")"):"",c=v(e,r,a,n,u,l);return e+=r,i.createElement("path",{key:o,className:"".concat(t,"-circle-path"),d:c.pathString,stroke:s,strokeLinecap:m,strokeWidth:n,opacity:0===r?0:1,fillOpacity:"0",style:c.pathStyle,ref:P[o]})}))}().reverse())};m.defaultProps=u,m.displayName="Circle";var g=m;t.default={Line:f,Circle:g}},function(e,t,n){"use strict";n.r(t),n.d(t,"ResizableTextArea",(function(){return C}));var r,o,i=n(23),a=n(26),s=n(30),u=n(79),c=n(63),l=n(0),f=n(13),d=n(72),p=n(53),h=n(10),v=n.n(h),m="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",g=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"],y={};function b(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&y[n])return y[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=g.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),u={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(y[n]=u),u}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(o||(o={}));var C=function(e){Object(s.a)(n,e);var t=E(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===o.NONE&&("function"===typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r||((r=document.createElement("textarea")).setAttribute("tab-index","-1"),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),e.getAttribute("wrap")?r.setAttribute("wrap",e.getAttribute("wrap")):r.removeAttribute("wrap");var i=b(e,t),a=i.paddingSize,s=i.borderSize,u=i.boxSizing,c=i.sizingStyle;r.setAttribute("style","".concat(c,";").concat(m)),r.value=e.value||e.placeholder||"";var l,f=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,p=r.scrollHeight;if("border-box"===u?p+=s:"content-box"===u&&(p-=a),null!==n||null!==o){r.value=" ";var h=r.scrollHeight-a;null!==n&&(f=h*n,"border-box"===u&&(f=f+a+s),p=Math.max(f,p)),null!==o&&(d=h*o,"border-box"===u&&(d=d+a+s),l=p>d?"":"hidden",p=Math.min(d,p))}return{height:p,minHeight:f,maxHeight:d,overflowY:l}}(a.textArea,!1,t,n);a.setState({textareaStyles:i,resizeStatus:o.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:o.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:o.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,r=e.autoSize,i=e.onResize,s=e.className,u=e.disabled,c=a.state,h=c.textareaStyles,m=c.resizeStatus,g=Object(p.default)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),y=v()(n,s,Object(f.a)({},"".concat(n,"-disabled"),u));"value"in g&&(g.value=g.value||"");var b=x(x(x({},a.props.style),h),m===o.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(d.default,{onResize:a.handleResize,disabled:!(r||i)},l.createElement("textarea",Object.assign({},g,{className:y,style:b,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:o.NONE},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.resizeTextarea()}},{key:"componentDidUpdate",value:function(e){e.value!==this.props.value&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(n){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component);function k(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var O=function(e){Object(s.a)(n,e);var t=k(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,o=t.onKeyDown;13===e.keyCode&&n&&n(e),o&&o(e)};var o="undefined"===typeof e.value||null===e.value?e.defaultValue:e.value;return r.state={value:o},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(C,Object.assign({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=O},,function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function a(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}n.r(t);var s=function(e,t){var n=window,o=t.scrollMode,s=t.block,u=t.inline,c=t.boundary,l=t.skipOverflowHiddenElements,f="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,p=[],h=e;r(h)&&f(h);){if((h=h.parentNode)===d){p.push(h);break}h===document.body&&i(h)&&!i(document.documentElement)||i(h,l)&&p.push(h)}for(var v=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),w=b.height,x=b.width,E=b.top,C=b.right,k=b.bottom,O=b.left,S="start"===s||"nearest"===s?E:"end"===s?k:E+w/2,_="center"===u?O+x/2:"end"===u?C:O,T=[],I=0;I<p.length;I++){var P=p[I],A=P.getBoundingClientRect(),R=A.height,N=A.width,M=A.top,j=A.right,D=A.bottom,F=A.left;if("if-needed"===o&&E>=0&&O>=0&&k<=m&&C<=v&&E>=M&&k<=D&&O>=F&&C<=j)return T;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),U=parseInt(L.borderTopWidth,10),z=parseInt(L.borderRightWidth,10),V=parseInt(L.borderBottomWidth,10),W=0,H=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-z:0,q="offsetHeight"in P?P.offsetHeight-P.clientHeight-U-V:0;if(d===P)W="start"===s?S:"end"===s?S-m:"nearest"===s?a(y,y+m,m,U,V,y+S,y+S+w,w):S-m/2,H="start"===u?_:"center"===u?_-v/2:"end"===u?_-v:a(g,g+v,v,B,z,g+_,g+_+x,x),W=Math.max(0,W+y),H=Math.max(0,H+g);else{W="start"===s?S-M-U:"end"===s?S-D+V+q:"nearest"===s?a(M,D,R,U,V+q,S,S+w,w):S-(M+R/2)+q/2,H="start"===u?_-F-B:"center"===u?_-(F+N/2)+$/2:"end"===u?_-j+z+$:a(F,j,N,B,z+$,_,_+x,x);var K=P.scrollLeft,G=P.scrollTop;S+=G-(W=Math.max(0,Math.min(G+W,P.scrollHeight-R+q))),_+=K-(H=Math.max(0,Math.min(K+H,P.scrollWidth-N+$)))}T.push({el:P,top:W,left:H})}return T};function u(e){return e===Object(e)&&0!==Object.keys(e).length}t.default=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(u(t)&&"function"===typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:u(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,o=e.top,i=e.left;r.scroll&&n?r.scroll({top:o,left:i,behavior:t}):(r.scrollTop=o,r.scrollLeft=i)}))}(s(e,r),r.behavior)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Cn}));var r="_authing_token",o="_authing_user",i=function(){function e(e){this.options=e,this.token=null,this.user=null}return e.prototype.setToken=function(e){"undefined"!==typeof localStorage?localStorage.setItem(r,e):this.token=e},e.prototype.getToken=function(){return"undefined"!==typeof localStorage?localStorage.getItem(r)||"":this.token},e.prototype.getUser=function(){return"undefined"!==typeof localStorage?localStorage.getItem(o)?JSON.parse(localStorage.getItem(o)):null:this.user},e.prototype.setUser=function(e){"undefined"!==typeof localStorage?(localStorage.setItem(o,JSON.stringify(e)),localStorage.setItem(r,e.token)):(this.user=e,this.token=e.token)},e.prototype.clearUser=function(){"undefined"!==typeof localStorage?(localStorage.removeItem(o),localStorage.removeItem(r)):(this.user=null,this.token=null)},e}(),a=n(136),s=n.n(a),u=n(266),c=n.n(u),l=n(2),f=n.n(l),d=n(5),p=n(6),h=n(27);function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function w(e){return(w="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){return!t||"object"!==w(t)&&"function"!==typeof t?v(e):t}function E(e){var t=b();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function C(e,t,n){return(C=b()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&m(o,n.prototype),o}).apply(null,arguments)}function k(e){var t="function"===typeof Map?new Map:void 0;return(k=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return C(e,arguments,y(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),m(r,e)})(e)}var O=function(e){g(n,e);var t=E(n);function n(e){var r;return Object(h.a)(this,n),(r=t.call(this,e)).code=n.code,r.name=r.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(v(r),r.constructor),r}return n}(k(Error));O.code="ERR_JOSE_GENERIC";var S=function(e){g(n,e);var t=E(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified";return Object(h.a)(this,n),(r=t.call(this,e)).code=n.code,r.claim=o,r.reason=i,r}return n}(O);S.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var _=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);_.code="ERR_JOSE_ALG_NOT_ALLOWED";var T=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);T.code="ERR_JOSE_NOT_SUPPORTED";var I=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e.message="decryption operation failed",e}return n}(O);I.code="ERR_JWE_DECRYPTION_FAILED";var P=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);P.code="ERR_JWE_INVALID";var A=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);A.code="ERR_JWS_INVALID";var R=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);R.code="ERR_JWT_INVALID";var N=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);N.code="ERR_JWK_INVALID";var M=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(O);M.code="ERR_JWKS_INVALID";var j=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e.message="no applicable key found in the JSON Web Key Set",e}return n}(O);j.code="ERR_JWKS_NO_MATCHING_KEY";var D=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e.message="multiple matching keys found in the JSON Web Key Set",e}return n}(O);D.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var F=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e.message="signature verification failed",e}return n}(O);F.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";var L=function(e){g(n,e);var t=E(n);function n(){var e;return Object(h.a)(this,n),(e=t.apply(this,arguments)).code=n.code,e}return n}(S);L.code="ERR_JWT_EXPIRED";var B=n(100);function U(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(B.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}var z=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t.filter(Boolean);if(0===o.length||1===o.length)return!0;var i,a=U(o);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=Object.keys(s);if(r&&0!==r.size)for(var c=0,l=u;c<l.length;c++){var f=l[c];if(r.has(f))return!1;r.add(f)}else r=new Set(u)}}catch(d){a.e(d)}finally{a.f()}return!0};function V(e){if("object"!==typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}var W=new TextEncoder,H=new TextDecoder,$=Math.pow(2,32);function q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return e+t.length}),0),o=new Uint8Array(r),i=0;return t.forEach((function(e){o.set(e,i),i+=e.length})),o}function K(e,t){return q(W.encode(e),new Uint8Array([0]),t)}function G(e,t,n){if(t<0||t>=$)throw new RangeError("value must be >= 0 and <= ".concat($-1,". Received ").concat(t));e.set([t>>>24,t>>>16,t>>>8,255&t],n)}function X(e){var t=Math.floor(e/$),n=e%$,r=new Uint8Array(8);return G(r,t,0),G(r,n,4),r}function Y(e){var t=new Uint8Array(4);return G(t,e),t}function J(e){return q(Y(e.length),e)}function Q(e,t,n,r){return Z.apply(this,arguments)}function Z(){return(Z=Object(d.a)(f.a.mark((function e(t,n,r,o){var i,a,s,u;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=Math.ceil((r>>3)/32),s=1;case 2:if(!(s<=i)){e.next=22;break}if((u=new Uint8Array(4+n.length+o.length)).set(Y(s)),u.set(n,4),u.set(o,4+n.length),a){e.next=13;break}return e.next=10,t("sha256",u);case 10:a=e.sent,e.next=19;break;case 13:return e.t0=q,e.t1=a,e.next=17,t("sha256",u);case 17:e.t2=e.sent,a=(0,e.t0)(e.t1,e.t2);case 19:s++,e.next=2;break;case 22:return a=a.slice(0,r>>3),e.abrupt("return",a);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ee=function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;throw new Error("unable to locate global object")}(),te=function(e){var t=e;t instanceof Uint8Array&&(t=H.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return new Uint8Array(ee.atob(t).split("").map((function(e){return e.charCodeAt(0)})))}catch(n){throw new TypeError("The input to be decoded is not correctly encoded.")}},ne=new Map([["A128CBC-HS256",128],["A128GCM",96],["A128GCMKW",96],["A192CBC-HS384",128],["A192GCM",96],["A192GCMKW",96],["A256CBC-HS512",128],["A256GCM",96],["A256GCMKW",96]]),re=function(e){return function(t){var n=ne.get(t);if(!n)throw new T("Unsupported JWE Algorithm: ".concat(t));return e(new Uint8Array(n>>3))}},oe=function(e,t){if(t.length<<3!==ne.get(e))throw new P("Invalid Initialization Vector length")},ie=function(e,t){var n;switch(e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":if(n=parseInt(e.substr(-3),10),!(t instanceof Uint8Array))throw new TypeError("".concat(e," content encryption requires Uint8Array as key input"));break;case"A128GCM":case"A192GCM":case"A256GCM":n=parseInt(e.substr(1,3),10);break;default:throw new T("Content Encryption Algorithm ".concat(e," is not supported either by JOSE or your javascript runtime"))}if(t instanceof Uint8Array){if(t.length<<3!==n)throw new P("Invalid Content Encryption Key length")}else{if(void 0===t.algorithm)throw new TypeError("Invalid Content Encryption Key type");if(t.algorithm.length!==n)throw new P("Invalid Content Encryption Key length")}},ae=function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");for(var n=e.length,r=0,o=-1;++o<n;)r|=e[o]^t[o];return 0===r},se=ee.crypto;function ue(e){return"undefined"!==typeof ee.CryptoKey&&(null!=e&&e instanceof ee.CryptoKey)}var ce=function(e){for(var t="Key must be ",n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(r.length>2){var i=r.pop();t+="one of type ".concat(r.join(", "),", or ").concat(i,".")}else 2===r.length?t+="one of type ".concat(r[0]," or ").concat(r[1],"."):t+="of type ".concat(r[0],".");return null==e?t+=" Received ".concat(e):"function"===typeof e&&e.name?t+=" Received function ".concat(e.name):"object"===typeof e&&null!=e&&e.constructor&&e.constructor.name&&(t+=" Received an instance of ".concat(e.constructor.name)),t};function le(e,t,n,r,o,i){return fe.apply(this,arguments)}function fe(){return(fe=Object(d.a)(f.a.mark((function e(t,n,r,o,i,a){var s,u,c,l,d,p,h;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=parseInt(t.substr(1,3),10),e.next=3,se.subtle.importKey("raw",n.subarray(s>>3),"AES-CBC",!1,["decrypt"]);case 3:return u=e.sent,e.next=6,se.subtle.importKey("raw",n.subarray(0,s>>3),{hash:{name:"SHA-".concat(s<<1)},name:"HMAC"},!1,["sign"]);case 6:return c=e.sent,l=q(a,o,r,X(a.length<<3)),e.t0=Uint8Array,e.next=11,se.subtle.sign("HMAC",c,l);case 11:e.t1=e.sent.slice(0,s>>3),d=new e.t0(e.t1);try{p=ae(i,d)}catch(f){}if(p){e.next=16;break}throw new I;case 16:return e.prev=16,e.t2=Uint8Array,e.next=20,se.subtle.decrypt({iv:o,name:"AES-CBC"},u,r);case 20:e.t3=e.sent,h=new e.t2(e.t3),e.next=26;break;case 24:e.prev=24,e.t4=e.catch(16);case 26:if(h){e.next=28;break}throw new I;case 28:return e.abrupt("return",h);case 29:case"end":return e.stop()}}),e,null,[[16,24]])})))).apply(this,arguments)}function de(e,t,n,r,o){return pe.apply(this,arguments)}function pe(){return(pe=Object(d.a)(f.a.mark((function e(t,n,r,o,i){var a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof Uint8Array)){e.next=6;break}return e.next=3,se.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=t;case 7:return a=e.t0,e.prev=8,e.t1=Uint8Array,e.next=12,se.subtle.decrypt({additionalData:i,iv:r,name:"AES-GCM",tagLength:128},a,q(n,o));case 12:return e.t2=e.sent,e.abrupt("return",new e.t1(e.t2));case 16:throw e.prev=16,e.t3=e.catch(8),new I;case 19:case"end":return e.stop()}}),e,null,[[8,16]])})))).apply(this,arguments)}var he=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r,o,i,a){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ue(n)||n instanceof Uint8Array){e.next=2;break}throw new TypeError(ce(n,"CryptoKey","Uint8Array"));case 2:if(ie(t,n),oe(t,o),"CBC"!==t.substr(4,3)){e.next=6;break}return e.abrupt("return",le(t,n,r,o,i,a));case 6:return e.abrupt("return",de(n,r,o,i,a));case 7:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i,a){return e.apply(this,arguments)}}(),ve=function(){var e=Object(d.a)(f.a.mark((function e(){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new T('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation, e.g. using the "pako" module.');case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),me=n(32),ge=[{hash:{name:"SHA-256"},name:"HMAC"},!0,["sign"]];function ye(e,t){if(e.algorithm.length!==parseInt(t.substr(1,3),10))throw new TypeError("invalid key size for alg: ".concat(t))}function be(e,t){if(ue(e))return e;if(e instanceof Uint8Array)return se.subtle.importKey("raw",e,"AES-KW",!0,[t]);throw new TypeError(ce(e,"CryptoKey","Uint8Array"))}var we=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r){var o,i,a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,be(n,"unwrapKey");case 2:return ye(i=e.sent,t),e.next=6,(o=se.subtle).unwrapKey.apply(o,["raw",r,i,"AES-KW"].concat(Object(me.a)(ge)));case 6:return a=e.sent,e.t0=Uint8Array,e.next=10,se.subtle.exportKey("raw",a);case 10:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 12:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),xe=function(){var e=Object(d.a)(f.a.mark((function e(t,n){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="SHA-".concat(t.substr(-3)),e.t0=Uint8Array,e.next=4,se.subtle.digest(r,n);case 4:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ee=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r,o){var i,a,s,u,c=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=c.length>4&&void 0!==c[4]?c[4]:new Uint8Array(0),a=c.length>5&&void 0!==c[5]?c[5]:new Uint8Array(0),ue(t)){e.next=4;break}throw new TypeError(ce(t,"CryptoKey"));case 4:if(ue(n)){e.next=6;break}throw new TypeError(ce(n,"CryptoKey"));case 6:if(s=q(J(W.encode(r)),J(i),J(a),Y(o)),n.usages.includes("deriveBits")){e.next=9;break}throw new TypeError('ECDH-ES private key "usages" must include "deriveBits"');case 9:return e.t0=Uint8Array,e.next=12,se.subtle.deriveBits({name:"ECDH",public:t},n,Math.ceil(parseInt(n.algorithm.namedCurve.substr(-3),10)/8)<<3);case 12:return e.t1=e.sent,u=new e.t0(e.t1),e.abrupt("return",Q(xe,u,o,s));case 15:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),Ce=function(e){if(!ue(e))throw new TypeError(ce(e,"CryptoKey"));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)},ke=se.getRandomValues.bind(se);function Oe(e){if(!(e instanceof Uint8Array)||e.length<8)throw new P("PBES2 Salt Input must be 8 or more octets")}function Se(e){if(e instanceof Uint8Array)return se.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(ue(e))return e;throw new TypeError(ce(e,"CryptoKey","Uint8Array"))}var _e=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r,o,i){var a,s,u,c,l,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Oe(i),a=K(t,i),s=parseInt(t.substr(13,3),10),u={hash:{name:"SHA-".concat(t.substr(8,3))},iterations:o,name:"PBKDF2",salt:a},c={length:s,name:"AES-KW"},e.next=7,Se(n);case 7:if(!(l=e.sent).usages.includes("deriveBits")){e.next=16;break}return e.t0=Uint8Array,e.next=12,se.subtle.deriveBits(u,l,s);case 12:e.t1=e.sent,d=new e.t0(e.t1),e.next=23;break;case 16:if(!l.usages.includes("deriveKey")){e.next=22;break}return e.next=19,se.subtle.deriveKey(u,l,c,!1,["unwrapKey"]);case 19:d=e.sent,e.next=23;break;case 22:throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');case 23:return e.abrupt("return",we(t.substr(-6),d,r));case 24:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i){return e.apply(this,arguments)}}();function Te(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new T("alg ".concat(e," is not supported either by JOSE or your javascript runtime"))}}var Ie=function(e,t){if(e.startsWith("HS")){var n=parseInt(e.substr(-3),10),r=t.algorithm.length;if("number"!==typeof r||r<n)throw new TypeError("".concat(e," requires symmetric keys to be ").concat(n," bits or larger"))}if(e.startsWith("RS")||e.startsWith("PS")){var o=t.algorithm.modulusLength;if("number"!==typeof o||o<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}},Pe=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r){var o,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ue(n)){e.next=2;break}throw new TypeError(ce(n,"CryptoKey"));case 2:if(Ie(t,n),!n.usages.includes("decrypt")){e.next=9;break}return e.t0=Uint8Array,e.next=7,se.subtle.decrypt(Te(t),n,r);case 7:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 9:if(!n.usages.includes("unwrapKey")){e.next=18;break}return e.next=12,(o=se.subtle).unwrapKey.apply(o,["raw",r,n,Te(t)].concat(Object(me.a)(ge)));case 12:return i=e.sent,e.t2=Uint8Array,e.next=16,se.subtle.exportKey("raw",i);case 16:return e.t3=e.sent,e.abrupt("return",new e.t2(e.t3));case 18:throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation');case 19:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();re(ke);var Ae=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r,o,i){var a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.substr(0,7),e.abrupt("return",he(a,n,r,o,i,new Uint8Array(0)));case 2:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i){return e.apply(this,arguments)}}(),Re=new Map([["A128CBC-HS256",256],["A128GCM",128],["A192CBC-HS384",384],["A192GCM",192],["A256CBC-HS512",512],["A256GCM",256]]),Ne=function(e){return function(t){var n=Re.get(t);if(!n)throw new T("Unsupported JWE Algorithm: ".concat(t));return e(new Uint8Array(n>>3))}};function Me(e){var t,n;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:{name:"SHA-".concat(e.alg.substr(-3))}},n=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new T("".concat(e.alg," keys cannot be imported as CryptoKey instances"));case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},n=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},n=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},n=["deriveBits"];break;default:throw new T('unsupported or invalid JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:{name:"SHA-".concat(e.alg.substr(-3))}},n=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-".concat(e.alg.substr(-3))}},n=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:{name:"SHA-".concat(parseInt(e.alg.substr(-3),10)||1)}},n=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new T('unsupported or invalid JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":case"ES384":case"ES512":t={name:"ECDSA",namedCurve:e.crv},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new T('unsupported or invalid JWK "alg" (Algorithm) Parameter value')}break;default:throw new T('unsupported or invalid JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:n}}var je=function(){var e=Object(d.a)(f.a.mark((function e(t){var n,r,o,i,a,s,u;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Me(t),i=o.algorithm,a=o.keyUsages,s="jwk",delete(u=Object(p.a)({},t)).alg,"PBKDF2"===i.name&&(s="raw",u=te(t.k)),e.abrupt("return",se.subtle.importKey(s,u,i,null!==(n=t.ext)&&void 0!==n&&n,null!==(r=t.key_ops)&&void 0!==r?r:a));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function De(e,t,n){return Fe.apply(this,arguments)}function Fe(){return(Fe=Object(d.a)(f.a.mark((function e(t,n,r){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V(t)){e.next=2;break}throw new TypeError("JWK must be an object");case 2:if(n||(n=t.alg),"string"===typeof n&&n){e.next=5;break}throw new TypeError('"alg" argument is required when "jwk.alg" is not present');case 5:e.t0=t.kty,e.next="oct"===e.t0?8:"RSA"===e.t0?14:"EC"===e.t0||"OKP"===e.t0?16:17;break;case 8:if("string"===typeof t.k&&t.k){e.next=10;break}throw new TypeError('missing "k" (Key Value) Parameter value');case 10:if(null!==r&&void 0!==r||(r=!0!==t.ext),!r){e.next=13;break}return e.abrupt("return",je(Object(p.a)(Object(p.a)({},t),{},{alg:n,ext:!1})));case 13:return e.abrupt("return",te(t.k));case 14:if(void 0===t.oth){e.next=16;break}throw new T('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case 16:return e.abrupt("return",je(Object(p.a)(Object(p.a)({},t),{},{alg:n})));case 17:throw new T('unsupported "kty" (Key Type) Parameter value');case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Le=function(e,t,n){if(!(t instanceof Uint8Array)&&!(null===t||void 0===t?void 0:t.type))throw new TypeError(ce(t,"KeyObject","CryptoKey","Uint8Array"));if(e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||e.match(/^A\d{3}(?:GCM)?KW$/)){if(t instanceof Uint8Array||"secret"===t.type)return;throw new TypeError('CryptoKey or KeyObject instances for symmetric algorithms must be of type "secret"')}if(t instanceof Uint8Array)throw new TypeError(ce(t,"KeyObject","CryptoKey"));if("secret"===t.type)throw new TypeError('CryptoKey or KeyObject instances for asymmetric algorithms must not be of type "secret"');if("sign"===n&&"public"===t.type)throw new TypeError('CryptoKey or KeyObject instances for asymmetric algorithm signing must be of type "private"');if("decrypt"===n&&"public"===t.type)throw new TypeError('CryptoKey or KeyObject instances for asymmetric algorithm decryption must be of type "private"')};function Be(e){if(!e)throw new P("JWE Encrypted Key missing")}function Ue(e,t,n){if(void 0===e[t])throw new P("JOSE Header ".concat(n," (").concat(t,") missing"))}function ze(){return(ze=Object(d.a)(f.a.mark((function e(t,n,r,o){var i,a,s,u,c,l,d,p,h;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Le(t,n,"decrypt"),e.t0=t,e.next="dir"===e.t0?4:"ECDH-ES"===e.t0?7:"ECDH-ES+A128KW"===e.t0||"ECDH-ES+A192KW"===e.t0||"ECDH-ES+A256KW"===e.t0?9:"RSA1_5"===e.t0||"RSA-OAEP"===e.t0||"RSA-OAEP-256"===e.t0||"RSA-OAEP-384"===e.t0||"RSA-OAEP-512"===e.t0?25:"PBES2-HS256+A128KW"===e.t0||"PBES2-HS384+A192KW"===e.t0||"PBES2-HS512+A256KW"===e.t0?27:"A128KW"===e.t0||"A192KW"===e.t0||"A256KW"===e.t0?33:"A128GCMKW"===e.t0||"A192GCMKW"===e.t0||"A256GCMKW"===e.t0?35:41;break;case 4:if(void 0===r){e.next=6;break}throw new P("Encountered unexpected JWE Encrypted Key");case 6:return e.abrupt("return",n);case 7:if(void 0===r){e.next=9;break}throw new P("Encountered unexpected JWE Encrypted Key");case 9:if(Ue(o,"epk","Ephemeral Public Key"),Ce(n)){e.next=12;break}throw new T("ECDH-ES with the provided key is not allowed or not supported by your javascript runtime");case 12:return e.next=14,De(o.epk,t);case 14:return i=e.sent,void 0!==o.apu&&(a=te(o.apu)),void 0!==o.apv&&(s=te(o.apv)),e.next=19,Ee(i,n,"ECDH-ES"===t?o.enc:t,parseInt(t.substr(-5,3),10)||Re.get(o.enc),a,s);case 19:if(u=e.sent,"ECDH-ES"!==t){e.next=22;break}return e.abrupt("return",u);case 22:return Be(r),c=t.substr(-6),e.abrupt("return",we(c,u,r));case 25:return Be(r),e.abrupt("return",Pe(t,n,r));case 27:return Be(r),Ue(o,"p2c","PBES2 Count"),Ue(o,"p2s","PBES2 Salt"),l=o.p2c,d=te(o.p2s),e.abrupt("return",_e(t,n,r,l,d));case 33:return Be(r),e.abrupt("return",we(t,n,r));case 35:return Be(r),Ue(o,"iv","Initialization Vector"),Ue(o,"tag","Authentication Tag"),p=te(o.iv),h=te(o.tag),e.abrupt("return",Ae(t,n,r,p,h));case 41:throw new T('unsupported or invalid "alg" (JWE Algorithm) header value');case 42:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ve=function(e,t,n,r){return ze.apply(this,arguments)};var We=function(e,t,n,r,o){if(void 0!==o.crit&&void 0===r.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some((function(e){return"string"!==typeof e||0===e.length})))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');var i;i=void 0!==n?new Map([].concat(Object(me.a)(Object.entries(n)),Object(me.a)(t.entries()))):t;var a,s=U(r.crit);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(!i.has(u))throw new T('Extension Header Parameter "'.concat(u,'" is not recognized'));if(void 0===o[u])throw new e('Extension Header Parameter "'.concat(u,'" is missing'));if(i.get(u)&&void 0===r[u])throw new e('Extension Header Parameter "'.concat(u,'" MUST be integrity protected'))}}catch(c){s.e(c)}finally{s.f()}return new Set(r.crit)},He=function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some((function(e){return"string"!==typeof e}))))throw new TypeError('"'.concat(e,'" option must be an array of strings'));if(t)return new Set(t)},$e=Ne(ke),qe=We.bind(void 0,P,new Map),Ke=He.bind(void 0,"keyManagementAlgorithms"),Ge=He.bind(void 0,"contentEncryptionAlgorithms");function Xe(){return(Xe=Object(d.a)(f.a.mark((function e(t,n,r){var o,i,a,s,u,c,l,d,h,v,m,g,y,b,w,x;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V(t)){e.next=2;break}throw new P("Flattened JWE must be an object");case 2:if(void 0!==t.protected||void 0!==t.header||void 0!==t.unprotected){e.next=4;break}throw new P("JOSE Header missing");case 4:if("string"===typeof t.iv){e.next=6;break}throw new P("JWE Initialization Vector missing or incorrect type");case 6:if("string"===typeof t.ciphertext){e.next=8;break}throw new P("JWE Ciphertext missing or incorrect type");case 8:if("string"===typeof t.tag){e.next=10;break}throw new P("JWE Authentication Tag missing or incorrect type");case 10:if(void 0===t.protected||"string"===typeof t.protected){e.next=12;break}throw new P("JWE Protected Header incorrect type");case 12:if(void 0===t.encrypted_key||"string"===typeof t.encrypted_key){e.next=14;break}throw new P("JWE Encrypted Key incorrect type");case 14:if(void 0===t.aad||"string"===typeof t.aad){e.next=16;break}throw new P("JWE AAD incorrect type");case 16:if(void 0===t.header||V(t.header)){e.next=18;break}throw new P("JWE Shared Unprotected Header incorrect type");case 18:if(void 0===t.unprotected||V(t.unprotected)){e.next=20;break}throw new P("JWE Per-Recipient Unprotected Header incorrect type");case 20:if(t.protected&&(a=te(t.protected),i=JSON.parse(H.decode(a))),z(i,t.header,t.unprotected)){e.next=23;break}throw new P("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");case 23:if(s=Object(p.a)(Object(p.a)(Object(p.a)({},i),t.header),t.unprotected),qe(null===r||void 0===r?void 0:r.crit,i,s),void 0===s.zip){e.next=30;break}if(i&&i.zip){e.next=28;break}throw new P('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');case 28:if("DEF"===s.zip){e.next=30;break}throw new T('unsupported JWE "zip" (Compression Algorithm) Header Parameter value');case 30:if(u=s.alg,c=s.enc,"string"===typeof u&&u){e.next=33;break}throw new P("missing JWE Algorithm (alg) in JWE Header");case 33:if("string"===typeof c&&c){e.next=35;break}throw new P("missing JWE Encryption Algorithm (enc) in JWE Header");case 35:if(l=r&&Ke(r.keyManagementAlgorithms),d=r&&Ge(r.contentEncryptionAlgorithms),!l||l.has(u)){e.next=39;break}throw new _('"alg" (Algorithm) Header Parameter not allowed');case 39:if(!d||d.has(c)){e.next=41;break}throw new _('"enc" (Encryption Algorithm) Header Parameter not allowed');case 41:if(void 0!==t.encrypted_key&&(h=te(t.encrypted_key)),"function"!==typeof n){e.next=46;break}return e.next=45,n(i,t);case 45:n=e.sent;case 46:return e.prev=46,e.next=49,Ve(u,n,h,s);case 49:v=e.sent,e.next=57;break;case 52:if(e.prev=52,e.t0=e.catch(46),!(e.t0 instanceof TypeError)){e.next=56;break}throw e.t0;case 56:v=$e(c);case 57:return m=te(t.iv),g=te(t.tag),y=W.encode(null!==(o=t.protected)&&void 0!==o?o:""),b=void 0!==t.aad?q(y,W.encode("."),W.encode(t.aad)):y,e.next=63,he(c,v,te(t.ciphertext),m,g,b);case 63:if(w=e.sent,"DEF"!==s.zip){e.next=68;break}return e.next=67,((null===r||void 0===r?void 0:r.inflateRaw)||ve)(w);case 67:w=e.sent;case 68:return x={plaintext:w},void 0!==t.protected&&(x.protectedHeader=i),void 0!==t.aad&&(x.additionalAuthenticatedData=te(t.aad)),void 0!==t.unprotected&&(x.sharedUnprotectedHeader=t.unprotected),void 0!==t.header&&(x.unprotectedHeader=t.header),e.abrupt("return",x);case 74:case"end":return e.stop()}}),e,null,[[46,52]])})))).apply(this,arguments)}var Ye=function(e,t,n){return Xe.apply(this,arguments)};function Je(e,t,n){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(d.a)(f.a.mark((function e(t,n,r){var o,i,a,s,u,c,l;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof Uint8Array&&(t=H.decode(t)),"string"===typeof t){e.next=3;break}throw new P("Compact JWE must be a string or Uint8Array");case 3:if(o=t.split("."),i=o[0],a=o[1],s=o[2],u=o[3],c=o[4],5===o.length){e.next=6;break}throw new P("Invalid Compact JWE");case 6:return e.next=8,Ye({ciphertext:u||void 0,iv:s||void 0,protected:i||void 0,tag:c||void 0,encrypted_key:a||void 0},n,r);case 8:return l=e.sent,e.abrupt("return",{plaintext:l.plaintext,protectedHeader:l.protectedHeader});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}n(44),n(38);Ne(ke);re(ke),We.bind(void 0,P,new Map);function Ze(e){switch(e){case"HS256":return{hash:{name:"SHA-256"},name:"HMAC"};case"HS384":return{hash:{name:"SHA-384"},name:"HMAC"};case"HS512":return{hash:{name:"SHA-512"},name:"HMAC"};case"PS256":return{hash:{name:"SHA-256"},name:"RSA-PSS",saltLength:32};case"PS384":return{hash:{name:"SHA-384"},name:"RSA-PSS",saltLength:48};case"PS512":return{hash:{name:"SHA-512"},name:"RSA-PSS",saltLength:64};case"RS256":return{hash:{name:"SHA-256"},name:"RSASSA-PKCS1-v1_5"};case"RS384":return{hash:{name:"SHA-384"},name:"RSASSA-PKCS1-v1_5"};case"RS512":return{hash:{name:"SHA-512"},name:"RSASSA-PKCS1-v1_5"};case"ES256":return{hash:{name:"SHA-256"},name:"ECDSA",namedCurve:"P-256"};case"ES384":return{hash:{name:"SHA-384"},name:"ECDSA",namedCurve:"P-384"};case"ES512":return{hash:{name:"SHA-512"},name:"ECDSA",namedCurve:"P-521"};default:throw new T("alg ".concat(e," is not supported either by JOSE or your javascript runtime"))}}function et(e,t,n){if(ue(t))return t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(ce(t,"CryptoKey"));return se.subtle.importKey("raw",t,{hash:{name:"SHA-".concat(e.substr(-3))},name:"HMAC"},!1,[n])}throw new TypeError(ce(t,"CryptoKey","Uint8Array"))}We.bind(void 0,A,new Map([["b64",!0]]));var tt=function(){var e=Object(d.a)(f.a.mark((function e(t,n,r,o){var i,a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(t,n,"verify");case 2:return i=e.sent,Ie(t,i),a=Ze(t),e.prev=5,e.next=8,se.subtle.verify(a,i,r,o);case 8:return e.abrupt("return",e.sent);case 11:return e.prev=11,e.t0=e.catch(5),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[5,11]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),nt=We.bind(void 0,A,new Map([["b64",!0]])),rt=He.bind(void 0,"algorithms");function ot(){return(ot=Object(d.a)(f.a.mark((function e(t,n,r){var o,i,a,s,u,c,l,d,h,v,m,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V(t)){e.next=2;break}throw new A("Flattened JWS must be an object");case 2:if(void 0!==t.protected||void 0!==t.header){e.next=4;break}throw new A('Flattened JWS must have either of the "protected" or "header" members');case 4:if(void 0===t.protected||"string"===typeof t.protected){e.next=6;break}throw new A("JWS Protected Header incorrect type");case 6:if(void 0!==t.payload){e.next=8;break}throw new A("JWS Payload missing");case 8:if("string"===typeof t.signature){e.next=10;break}throw new A("JWS Signature missing or incorrect type");case 10:if(void 0===t.header||V(t.header)){e.next=12;break}throw new A("JWS Unprotected Header incorrect type");case 12:if(i={},t.protected&&(a=te(t.protected),i=JSON.parse(H.decode(a))),z(i,t.header)){e.next=16;break}throw new A("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");case 16:if(s=Object(p.a)(Object(p.a)({},i),t.header),u=nt(null===r||void 0===r?void 0:r.crit,i,s),c=!0,!u.has("b64")){e.next=23;break}if("boolean"===typeof(c=i.b64)){e.next=23;break}throw new A('The "b64" (base64url-encode payload) Header Parameter must be a boolean');case 23:if("string"===typeof(l=s.alg)&&l){e.next=26;break}throw new A('JWS "alg" (Algorithm) Header Parameter missing or invalid');case 26:if(!(d=r&&rt(r.algorithms))||d.has(l)){e.next=29;break}throw new _('"alg" (Algorithm) Header Parameter not allowed');case 29:if(!c){e.next=34;break}if("string"===typeof t.payload){e.next=32;break}throw new A("JWS Payload must be a string");case 32:e.next=36;break;case 34:if("string"===typeof t.payload||t.payload instanceof Uint8Array){e.next=36;break}throw new A("JWS Payload must be a string or an Uint8Array instance");case 36:if("function"!==typeof n){e.next=40;break}return e.next=39,n(i,t);case 39:n=e.sent;case 40:return Le(l,n,"verify"),h=q(W.encode(null!==(o=t.protected)&&void 0!==o?o:""),W.encode("."),"string"===typeof t.payload?W.encode(t.payload):t.payload),v=te(t.signature),e.next=45,tt(l,n,v,h);case 45:if(e.sent){e.next=48;break}throw new F;case 48:return m=c?te(t.payload):"string"===typeof t.payload?W.encode(t.payload):t.payload,g={payload:m},void 0!==t.protected&&(g.protectedHeader=i),void 0!==t.header&&(g.unprotectedHeader=t.header),e.abrupt("return",g);case 53:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var it=function(e,t,n){return ot.apply(this,arguments)};function at(e,t,n){return st.apply(this,arguments)}function st(){return(st=Object(d.a)(f.a.mark((function e(t,n,r){var o,i,a,s,u;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof Uint8Array&&(t=H.decode(t)),"string"===typeof t){e.next=3;break}throw new A("Compact JWS must be a string or Uint8Array");case 3:if(o=t.split("."),i=o[0],a=o[1],s=o[2],3===o.length){e.next=6;break}throw new A("Invalid Compact JWS");case 6:return e.next=8,it({payload:a||void 0,protected:i||void 0,signature:s||void 0},n,r);case 8:return u=e.sent,e.abrupt("return",{payload:u.payload,protectedHeader:u.protectedHeader});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}new WeakMap;var ut=n(7),ct=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},lt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ft=function(e,t,n){return ct(void 0,void 0,void 0,(function(){var r,o;return lt(this,(function(i){switch(i.label){case 0:return r=ut.Bb,[4,t.getToken()];case 1:return o=i.sent(),[2,e.request({query:r,token:o,variables:n})]}}))}))},dt=function(e,t,n){return ct(void 0,void 0,void 0,(function(){var r,o;return lt(this,(function(i){switch(i.label){case 0:return r=ut.Wb,[4,t.getToken()];case 1:return o=i.sent(),[2,e.request({query:r,token:o,variables:n})]}}))}))},pt=function(e,t,n){return ct(void 0,void 0,void 0,(function(){var r,o;return lt(this,(function(i){switch(i.label){case 0:return r=ut.wb,[4,t.getToken()];case 1:return o=i.sent(),[2,e.request({query:r,token:o,variables:n})]}}))}))},ht=n(140),vt=n.n(ht),mt=n(84),gt=function(){return(gt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},yt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},bt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},wt=function(){function e(e,t){this.endpoint=e,this.options=t,this.axios=vt.a.create({withCredentials:!0})}return e.prototype.request=function(e){var t,n;return yt(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,d,p,h,v,m=this;return bt(this,(function(g){switch(g.label){case 0:r=e.query,o=e.token,i=e.variables,(a={"content-type":"application/json"})[this.options.headers["app-id"]]=this.options.appId||"",a[this.options.headers["tenant-id"]]=this.options.tenantId,a[this.options.headers["userpool-id"]]=this.options.userPoolId||"",a[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",a[this.options.headers["sdk-version"]]="js:4.21.8",a[this.options.headers.lang]=this.options.lang||"",o&&(a.Authorization="Bearer "+o),s=null,u=null,g.label=1;case 1:return g.trys.push([1,3,,4]),[4,this.axios({url:this.endpoint,data:{query:r,variables:i},method:"post",headers:gt({},Object(mt.pickBy)(a,(function(e){return!!e}))),timeout:this.options.timeout})];case 2:return c=g.sent().data,s=c.data,u=c.errors,[3,4];case 3:throw l=g.sent(),f=l.code||(null===(t=null===l||void 0===l?void 0:l.response)||void 0===t?void 0:t.status),d=l.message||(null===(n=null===l||void 0===l?void 0:l.response)||void 0===n?void 0:n.data),this.options.onError(f||500,l.message,d),{code:f||500,message:l.message,data:d};case 4:if((null===u||void 0===u?void 0:u.length)>0)throw p=null,h=null,v=null,u.map((function(e){var t=e.message,n=t.code,r=t.message,o=t.data;h=n,p=r,v=o,m.options.onError(n,r,v)})),{code:h,message:p,data:v};return[2,s]}}))}))},e}(),xt=n(64),Et=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ct=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},kt=n(315).JSEncrypt;var Ot=function(e,t){var n=void 0===t?{w:585,h:649}:t,r=n.w,o=n.h,i=void 0!==window.screenLeft?window.screenLeft:window.screenX,a=void 0!==window.screenTop?window.screenTop:window.screenY,s=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,u=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,c=s/window.screen.availWidth,l=(s-r)/2/c+i,f=(u-o)/2/c+a,d=window.open(e,"_blank","\n toolbar=no,\n menubar=no,\n scrollbars=no,\n resizable=no,\n location=no,\n status=no\n width="+r/c+",\n height="+o/c+",\n top="+f+",\n left="+l+"\n ");null===d||void 0===d||d.focus()},St=function(e,t){var n=document.createElement("style"),r="\n ."+e+" {\n "+t+"\n }\n ",o=document.createTextNode(r);n.appendChild(o),document.head.appendChild(n)},_t=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},Tt=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t],o=r.dataType,i=r.value;o===ut.Sb.Number||o===ut.Sb.Boolean?r.value=JSON.parse(i):o===ut.Sb.Datetime?r.value=new Date(parseInt(i)):o===ut.Sb.Object&&(r.value=JSON.parse(i))}return e},It=function(e){for(var t=0,n=e=e||[];t<n.length;t++){var r=(c=n[t]).dataType,o=c.value;r===ut.Sb.Number||r===ut.Sb.Boolean?c.value=JSON.parse(o):r===ut.Sb.Datetime?c.value="string"!=typeof(i=o)||isNaN(i)||isNaN(parseFloat(i))?new Date(o):new Date(parseInt(o)):r===ut.Sb.Object&&(c.value=JSON.parse(o))}for(var i,a={},s=0,u=e;s<u.length;s++){var c;a[(c=u[s]).key]=c.value}return a},Pt=function(){return"undefined"!==typeof navigator&&/MicroMessenger/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)},At=function(){return Pt()||"undefined"!==typeof navigator&&/Lark/i.test(navigator.userAgent)};function Rt(e){for(var t=[],n=97;n<123;n++)t.push(String.fromCharCode(n));for(var r=[];e--;){var o=Math.floor(16*Math.random());r.push(t[o])}return r.join("")}var Nt=function(e,t){return new Promise((function(n,r){var o=new FormData;o.append("file",e,e instanceof Blob?"personal.jpeg":void 0);var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===this.readyState)try{var e=JSON.parse(this.responseText),t=e.code,o=e.message,i=e.data;200!==t&&r({code:t,message:o}),n(i)}catch(a){t=500,o="\u4e0a\u4f20\u56fe\u7247\u5931\u8d25, error = "+a.message;r({code:t,message:o})}},i.open("POST",t),i.send(o)}))};function Mt(e){var t=e.url,n=e.accept,r=e.multiple;return new Promise((function(e,o){var i=document.createElement("input");i.type="file",i.accept=n,i.multiple=r,i.onchange=function(){var n=i.files;if(r){for(var a=[],s=0;s<n.length;)a.push(Nt(n[s],t)),s++;Promise.all(a).then((function(t){return e(t)})).catch((function(e){return o(e)}))}else{var u=n[0];Nt(u,t).then((function(t){return e(t)})).catch((function(e){return o(e)}))}},i.click()}))}var jt=function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];t.push({key:o,value:e[o]})}return t};function Dt(e){void 0===e&&(e=30);for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,o=0;o<e;o++)t+=n.charAt(Math.floor(Math.random()*r));return t}var Ft=function(){function e(e){this.options=e}return Object.defineProperty(e.prototype,"appHost",{get:function(){var e=this.options,t=e.appHost,n=e.domain,r=e.host;return t?t.replace(/\/$/,""):n?new URL(this.options.host).protocol+"//"+this.options.domain:r},enumerable:!1,configurable:!0}),e}(),Lt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Bt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ut=function(){function e(e,t,n,r){this.options=e,this.tokenProvider=t,this.httpClient=n,this.scene=r,this.baseClient=new Ft(e)}return e.prototype.startScanning=function(e,t){return Lt(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h,v,m,g,y,b,w,x,E,C,k,O,S,_,T,I,P,A,R,N,M,j,D,F,L,B,U,z,V,W,H,$,q,K,G,X=this;return Bt(this,(function(Y){return n=(t=t||{}).autoExchangeUserInfo,r=void 0!==n&&n,o=t.size,i=void 0===o?{height:240,width:240}:o,a=t.containerSize,s=void 0===a?{height:300,width:300}:a,u=t.interval,c=void 0===u?800:u,l=t.onStart,f=t.onResult,d=t.onScanned,p=t.onExpired,h=t.onSuccess,v=t.onCancel,m=t.onError,g=t.onCodeShow,y=t.onCodeLoaded,b=t.onCodeLoadFailed,w=t.tips,x=void 0===w?{}:w,E=t.context,C=t.customData,k=this.options.lang,O="zh-CN"===k,S=x.title,_=void 0===S?O?"\u4f7f\u7528 <strong> "+("APP_AUTH"===this.scene?"APP":"\u5fae\u4fe1")+" </strong> \u626b\u7801\u767b\u5f55":"use <strong> "+("APP_AUTH"===this.scene?"APP":"Wechat")+" </strong> scan code login":S,T=x.canceled,I=void 0===T?O?"\u7528\u6237\u53d6\u6d88\u6388\u6743":"User cancel authorization":T,P=x.expired,A=void 0===P?O?"\u4e8c\u7ef4\u7801\u5df2\u8fc7\u671f":"QR code has expired":P,R=x.succeed,N=void 0===R?O?"\u626b\u7801\u6210\u529f":"Scan code successfully":R,M=x.retry,j=void 0===M?O?"\u91cd\u8bd5":"Retry":M,D=document.getElementById(e),L=!1,D?D.style.position="relative":((D=document.createElement("div")).id=e,St("__authing-qrcode-node-mount","z-index: 65535;position: fixed;background: #fff;width: "+s.width+"px;height: "+s.height+"px;left: 50%;margin-left: -"+s.width/2+"px;display: flex;justify-content: center;align-items: center;top: 50%;margin-top: -"+s.height/2+"px;border: 1px solid #ccc;"),D.classList.add("__authing-qrcode-node-mount"),document.getElementsByTagName("body")[0].appendChild(D),L=!0),B=document.createElement("style"),U="#authing__retry a:hover{outline:0px;text-decoration:none;}#authing__spinner{position:absolute;left:50%;margin-left:-6px;}.spinner{margin:100px auto;width:20px;height:20px;position:relative}.container1>div,.container2>div,.container3>div{width:6px;height:6px;background-color:#00a1ea;border-radius:100%;position:absolute;-webkit-animation:bouncedelay 1.2s infinite ease-in-out;animation:bouncedelay 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1.0s;animation-delay:-1.0s}.container1 .circle2{-webkit-animation-delay:-0.9s;animation-delay:-0.9s}.container2 .circle2{-webkit-animation-delay:-0.8s;animation-delay:-0.8s}.container3 .circle2{-webkit-animation-delay:-0.7s;animation-delay:-0.7s}.container1 .circle3{-webkit-animation-delay:-0.6s;animation-delay:-0.6s}.container2 .circle3{-webkit-animation-delay:-0.5s;animation-delay:-0.5s}.container3 .circle3{-webkit-animation-delay:-0.4s;animation-delay:-0.4s}.container1 .circle4{-webkit-animation-delay:-0.3s;animation-delay:-0.3s}.container2 .circle4{-webkit-animation-delay:-0.2s;animation-delay:-0.2s}.container3 .circle4{-webkit-animation-delay:-0.1s;animation-delay:-0.1s}@-webkit-keyframes bouncedelay{0%,80%,100%{-webkit-transform:scale(0.0)}40%{-webkit-transform:scale(1.0)}}@keyframes bouncedelay{0%,80%,100%{transform:scale(0.0);-webkit-transform:scale(0.0)}40%{transform:scale(1.0);-webkit-transform:scale(1.0)}}",B.type="text/css",B.style?B.style.cssText=U:B.innerHTML=U,document.getElementsByTagName("head")[0].appendChild(B),z=function(){D.innerHTML='<div id="authing__spinner" class="spinner"><div class="spinner-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div></div>'},V=function(){var e=document.getElementById("authing__spinner");e&&D.removeChild(e)},W=function(e){var t;try{t=JSON.parse(e).message||e}catch(r){t=e}var n=document.createElement("span");return n.className="authing__heading-subtitle",L?(St("__authing__heading-subtitle-style","display: block;font-weight: 400;font-size: 12px;color: #888;"),n.classList.add("__authing__heading-subtitle-style")):(St("__authing__heading-subtitle-style","display: block;font-weight: 400;font-size: 15px;color: #888;line-height: 48px;"),n.classList.add("__authing__heading-subtitle-style")),n.innerHTML=t,n},H=function(e){return new Promise((function(t){var n=document.createElement("img");n.src=e,n.width=i.width,n.height=i.height,n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){t(n)}}))},$=function(e){return new Promise((function(t){var n=document.createElement("img");n.src=e,n.setAttribute("crossOrigin","Anonymous"),n.width=i.width/2.4,n.height=i.height/2.4,n.onload=function(){n.style.display="inline",t(n)},n.onerror=function(){t(n)}}))},q=function(e,t,n){var r="authing__retry";document.getElementById(r)&&document.getElementById(r).remove();var o=document.createElement("div");o.id=r,St("__authing-shadow-style","text-align:center;width: "+i.width+"px;height: "+i.height+"px;position: absolute;left: 50%;top: 0px;margin-left: -"+i.width/2+"px;background-color: rgba(0,0,0, 0.5);line-height:"+i.height+"px;color:#fff;font-weight:600;"),o.classList.add("__authing-shadow-style");var a=document.createElement("a");return a.innerHTML=e,a.style.color="#fff",a.style.borderBottom="1px solid #fff",a.style.cursor="pointer",t&&a.addEventListener("click",t),a.id=n,o.appendChild(a),o},K=function(e,t){var n="authing__retry";document.getElementById(n)&&document.getElementById(n).remove();var r=document.createElement("div");St("__authing-shadow-style-position","text-align:center;width: "+i.width+"px;height: "+i.height+"px;position: absolute;left: 50%;top: 0px;margin-left: -"+i.width/2+"px;line-height:"+i.height+"px;color:#fff;font-weight:600;display: flex;\n align-items: center; /*\u5782\u76f4\u5c45\u4e2d*/\n justify-content: center; /*\u6c34\u5e73\u5c45\u4e2d*/"),r.classList.add("__authing-shadow-style-position"),r.id=n;var o=document.createElement("img");return o.id="authing__scanned-user",o.src=t,o.style.width="100px",o.style.height="100px",r.appendChild(o),r},(G=function(){return Lt(X,void 0,void 0,(function(){var e,t,n,o,s,w,x,k,O,S,T,P,R,M,B,U,X,Y,J,Q,Z,ee,te=this;return Bt(this,(function(ne){switch(ne.label){case 0:z(),e=null,t=null,n=null,ne.label=1;case 1:return ne.trys.push([1,3,,4]),[4,this.geneCode({context:E,customData:C})];case 2:return o=ne.sent(),e=o.random,t=o.url,n=o.customLogo,[3,4];case 3:return s=ne.sent(),function(e,t,n){Lt(this,void 0,void 0,(function(){var r,o,i;return Bt(this,(function(a){switch(a.label){case 0:return r=W(t),(F=document.createElement("div")).id="authing__qrcode-wrapper",F.style.textAlign="center",F.style.position="relative",[4,H("https://usercontents.authing.cn/0ab3a1bf19c0d7106673e494d532f91a.png")];case 1:return(o=a.sent()).style.marginTop=L?"16px":"12px",o.onload=function(){V()},i=q(j,(function(){G()}),n||"__authing_retry_btn"),F.appendChild(o),F.appendChild(i),F.appendChild(r),e.appendChild(F),[2]}}))}))}(D,(s=s).message),b&&b(s),[2];case 4:return y&&y(e,t),(F=document.createElement("div")).id="authing__qrcode-wrapper",F.style.textAlign="center",F.style.position="relative",F.style.margin="auto",[4,H(t)];case 5:return w=ne.sent(),n?[4,$(n)]:[3,7];case 6:x=ne.sent(),ne.label=7;case 7:(k=document.createElement("canvas")).width=i.width,k.height=i.height,O=k.getContext("2d"),t&&O.drawImage(w,0,0,i.width,i.height),S=function(e){var t=e.width/2,n=e.height/2,r=e.width/2.4,o=e.height/2.4;return{x:t-r/2,y:n-o/2,ww:r,hh:o}}(i),T=S.x,P=S.y,R=S.ww,M=S.hh,O.save(),function(e,t,n,r,o,i){e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath()}(O,T,P,R,M,R/2),O.clip();try{x&&O.drawImage(x,T,P,R,M)}catch(a){console.log("Draw stop, check qrcodeLogo",x)}O.restore();try{B=k.toDataURL(),(U=document.createElement("img")).src=B,F.appendChild(U)}catch(u){F.appendChild(k)}return V(),g&&g(e,t),X=function(e,t){var n=q(N,null,"__authing_success_tip");(F.appendChild(n),h)&&(r?e.token||te.exchangeUserInfo(t).then((function(e){te.tokenProvider.setUser(e),h(e,t)})):h(e,t))},Y=function(e){var t=K(e.nickname,e.photo);F.appendChild(t),d&&d(e)},J=function(){var e=q(I,null,"__authing_success_tip");F.appendChild(e),v&&v()},Q=function(){var e=q(A,(function(){F.innerHTML="",G()}),"__authing_success_tip");F.appendChild(e),p&&p()},Z=function(e){var t=e.message;m&&m(t)},this.startPolling(e,{interval:c,onStart:l,onResult:f,onScanned:Y,onExpired:Q,onSuccess:X,onCancel:J,onError:Z}),ee=W(_),F.appendChild(ee),D.appendChild(F),[2]}}))}))})(),[2]}))}))},e.prototype.geneCode=function(e){return Lt(this,void 0,void 0,(function(){var t,n,r,o;return Bt(this,(function(i){switch(i.label){case 0:return n=(t=e||{}).context,r=t.customData,o=this.baseClient.appHost+"/api/v2/qrcode/gene",[4,this.httpClient.request({method:"POST",url:o,data:{autoMergeQrCode:!1,scene:this.scene,context:n,params:r}})];case 1:return[2,i.sent()]}}))}))},e.prototype.checkStatus=function(e){return Lt(this,void 0,void 0,(function(){var t;return Bt(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/qrcode/check?random="+e,[4,this.httpClient.request({method:"GET",url:t})];case 1:return[2,n.sent()]}}))}))},e.prototype.exchangeUserInfo=function(e){return Lt(this,void 0,void 0,(function(){var t;return Bt(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/qrcode/userinfo",[4,this.httpClient.request({method:"POST",url:t,data:{ticket:e}})];case 1:return[2,n.sent()]}}))}))},e.prototype.startPolling=function(e,t){return Lt(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h=this;return Bt(this,(function(v){return n=(t=t||{}).interval,r=void 0===n?800:n,o=t.onStart,i=t.onResult,a=t.onScanned,s=t.onExpired,u=t.onSuccess,c=t.onCancel,l=t.onError,f=!1,d=!1,[2,p=setInterval((function(){return Lt(h,void 0,void 0,(function(){var t,n,r,h,v;return Bt(this,(function(m){switch(m.label){case 0:o&&!d&&(o(p),d=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),[4,this.checkStatus(e)];case 2:return t=m.sent(),n=t.status,r=t.ticket,h=t.userInfo,i&&i(t),-1===n&&(clearInterval(p),s&&s()),1===n&&a&&!f&&(a(h),f=!0),2===n&&(clearInterval(p),u&&u(h,r)),3===n&&(clearInterval(p),c&&c()),[3,4];case 3:return v=m.sent(),l&&l(v),clearInterval(p),[2];case 4:return[2]}}))}))}),r)]}))}))},e.prototype.stopPolling=function(e){return Lt(this,void 0,void 0,(function(){return Bt(this,(function(t){return clearInterval(e),[2]}))}))},e}(),zt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Vt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Wt=function(){function e(e,t,n){this.options=e,this.tokenProvider=t,this.httpClient=n,this.baseClient=new Ft(e)}return e.prototype.getMfaAuthenticators=function(e){return void 0===e&&(e={type:"totp",source:"SELF"}),zt(this,void 0,void 0,(function(){var t,n,r,o,i;return Vt(this,(function(a){switch(a.label){case 0:return t=e.type,n=e.mfaToken,r=e.source,o=this.baseClient.appHost+"/api/v2/mfa/authenticator",i={},n&&(i.authorization="Bearer "+n),[4,this.httpClient.request({method:"GET",url:o,params:{type:t,source:r},headers:i})];case 1:return[2,a.sent()]}}))}))},e.prototype.assosicateMfaAuthenticator=function(e){return void 0===e&&(e={authenticatorType:"totp",source:"SELF"}),zt(this,void 0,void 0,(function(){var t,n,r,o,i;return Vt(this,(function(a){switch(a.label){case 0:return t=e.authenticatorType,n=e.mfaToken,r=e.source,o={},n&&(o.authorization="Bearer "+n),i=this.baseClient.appHost+"/api/v2/mfa/totp/associate",[4,this.httpClient.request({method:"POST",url:i,data:{authenticator_type:t,source:r},headers:o})];case 1:return[2,a.sent()]}}))}))},e.prototype.deleteMfaAuthenticator=function(){return zt(this,void 0,void 0,(function(){var e;return Vt(this,(function(t){switch(t.label){case 0:return e=this.baseClient.appHost+"/api/v2/mfa/totp/associate",[4,this.httpClient.request({method:"DELETE",url:e})];case 1:return t.sent(),[2,{code:200,message:"TOTP MFA \u89e3\u7ed1\u6210\u529f"}]}}))}))},e.prototype.confirmAssosicateMfaAuthenticator=function(e){return void 0===e&&(e={authenticatorType:"totp",source:"SELF"}),zt(this,void 0,void 0,(function(){var t,n,r,o,i,a;return Vt(this,(function(s){switch(s.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/associate/confirm",n=e.authenticatorType,r=e.totp,o=e.source,i=e.mfaToken,a={},i&&(a.authorization="Bearer "+i),[4,this.httpClient.request({method:"POST",url:t,data:{authenticator_type:n,totp:r,source:o}})];case 1:return s.sent(),[2,{code:200,message:"TOTP MFA \u7ed1\u5b9a\u6210\u529f"}]}}))}))},e.prototype.verifyTotpMfa=function(e){return zt(this,void 0,void 0,(function(){var t;return Vt(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/verify",[4,this.httpClient.request({method:"POST",url:t,data:{totp:e.totp},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.verifyAppSmsMfa=function(e){return zt(this,void 0,void 0,(function(){var t;return Vt(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/applications/mfa/sms/verify",[4,this.httpClient.request({method:"POST",url:t,data:{phone:e.phone,code:e.code},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.verifyAppEmailMfa=function(e){return zt(this,void 0,void 0,(function(){var t;return Vt(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/applications/mfa/email/verify",[4,this.httpClient.request({method:"POST",url:t,data:{email:e.email,code:e.code},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.phoneOrEmailBindable=function(e){var t=e.phone,n=e.email,r=e.mfaToken;return zt(this,void 0,void 0,(function(){var e;return Vt(this,(function(o){switch(o.label){case 0:return e=this.baseClient.appHost+"/api/v2/applications/mfa/check",[4,this.httpClient.request({method:"POST",url:e,data:{email:n,phone:t},headers:{authorization:"Bearer "+r}})];case 1:return[2,o.sent()]}}))}))},e.prototype.verifyTotpRecoveryCode=function(e){return zt(this,void 0,void 0,(function(){var t;return Vt(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/recovery",[4,this.httpClient.request({method:"POST",url:t,data:{recoveryCode:e.recoveryCode},headers:{authorization:"Bearer "+e.mfaToken}})];case 1:return[2,n.sent()]}}))}))},e.prototype.associateFaceByUrl=function(e){return zt(this,void 0,void 0,(function(){var t,n,r,o,i;return Vt(this,(function(a){switch(a.label){case 0:return t=e.baseFace,n=e.compareFace,r=e.mfaToken,o={},r&&(o.authorization="Bearer "+r),i=this.baseClient.appHost+"/api/v2/mfa/face/associate",[4,this.httpClient.request({method:"POST",url:i,data:{photoA:t,photoB:n,isExternal:!0},headers:o})];case 1:return[2,a.sent()]}}))}))},e.prototype.associateFaceByLocalFile=function(e){return zt(this,void 0,void 0,(function(){var t,n,r,o;return Vt(this,(function(i){switch(i.label){case 0:t={},e&&(t.authorization="Bearer "+e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Mt({accept:".jpeg,.jpg,.png,.bmp",url:this.baseClient.appHost+"/api/v2/upload?folder=face-photo&private=true"})];case 2:return r=i.sent().key,n=r,[3,4];case 3:return o=i.sent(),this.options.onError(o.code,o.message),[3,4];case 4:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/mfa/face/associate",data:{photoA:n,photoB:n},headers:t})];case 5:return[2,i.sent()]}}))}))},e.prototype.associateFaceByBlob=function(e){return zt(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l;return Vt(this,(function(f){switch(f.label){case 0:t=e.baseFace,n=e.compareFace,r=e.mfaToken,o={},r&&(o.authorization="Bearer "+r),s=this.baseClient.appHost+"/api/v2/upload?folder=face-photo&private=true",f.label=1;case 1:return f.trys.push([1,6,,7]),[4,Nt(t,s)];case 2:return u=f.sent().key,i=u,n?[4,Nt(n,s)]:[3,4];case 3:return c=f.sent().key,a=c,[3,5];case 4:a=u,f.label=5;case 5:return[3,7];case 6:return l=f.sent(),this.options.onError(l.code,l.message),[3,7];case 7:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/mfa/face/associate",data:{photoA:i,photoB:a},headers:o})];case 8:return[2,f.sent()]}}))}))},e.prototype.verifyFaceMfa=function(e,t){return zt(this,void 0,void 0,(function(){var n;return Vt(this,(function(r){switch(r.label){case 0:return n=this.baseClient.appHost+"/api/v2/mfa/face/verify",[4,this.httpClient.request({method:"POST",url:n,data:{photo:e},headers:{authorization:"Bearer "+t}})];case 1:return[2,r.sent()]}}))}))},e}(),Ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$t=function(){return($t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},qt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Kt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Gt=function(){function e(e,t){this.options=e,this.tokenProvider=t,this.axios=vt.a.create({withCredentials:!0})}return e.prototype.request=function(e){return qt(this,void 0,void 0,(function(){var t,n,r,o,i;return Kt(this,(function(a){switch(a.label){case 0:return(t={})[this.options.headers["app-id"]]=this.options.appId||"",t[this.options.headers["tenant-id"]]=this.options.tenantId,t[this.options.headers["userpool-id"]]=this.options.userPoolId||"",t[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",t[this.options.headers["sdk-version"]]="js:4.21.8",t[this.options.headers.lang]=this.options.lang||"",e&&e.headers&&e.headers.authorization?[3,2]:[4,this.tokenProvider.getToken()];case 1:return(n=a.sent())&&(t.Authorization="Bearer "+n),[3,3];case 2:t.authorization=e.headers.authorization,a.label=3;case 3:return e.headers=t,e.timeout=this.options.timeout,[4,this.axios.request($t($t({},e),{headers:$t({},Object(mt.pickBy)(e.headers,(function(e){return!!e})))}))];case 4:if(r=a.sent().data,o=r.code,i=r.message,200!==o)throw this.options.onError(o,i,r.data),new Error(JSON.stringify({code:o,message:i,data:r.data}));return[2,r.data]}}))}))},e}(),Xt=function(e){function t(t,n){return e.call(this,t,n)||this}return Ht(t,e),t.prototype.request=function(e){return qt(this,void 0,void 0,(function(){var t;return Kt(this,(function(n){switch(n.label){case 0:return(t={})[this.options.headers["app-id"]]=this.options.appId||"",t[this.options.headers["userpool-id"]]=t[this.options.headers["tenant-id"]]=this.options.tenantId,this.options.userPoolId,t[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",t[this.options.headers["sdk-version"]]="js:4.21.8",t[this.options.headers.lang]=this.options.lang||"",e.headers=$t($t({},t),e.headers),e.timeout=this.options.timeout,[4,this.axios.request($t($t({},e),{headers:$t({},Object(mt.pickBy)(e.headers,(function(e){return!!e})))}))];case 1:return[2,n.sent().data]}}))}))},t}(Gt),Yt=n(267),Jt=n.n(Yt),Qt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Zt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},en=function(){function e(e,t,n){this.options=e,this.tokenProvider=t,this.httpClient=n,this.baseClient=new Ft(e)}return e.prototype.authorize=function(e,t){return Qt(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,l,f,d,p,h,v,m,g,y,b=this;return Zt(this,(function(w){return n=(t=t||{}).position,r=t.popup,o=void 0===r||r,i=t.onSuccess,a=t.onError,s=t.authorization_params,u=t.authorizationParams,c=t.context,l=t.customData,f=t.withIdentities,d=void 0!==f&&f,p=t.protocol,h=void 0===p?"oidc":p,(v=t.uuid)||(v=Dt(20)),m={from_guard:"1",app_id:this.options.appId,authorization_params:JSON.stringify(s||u),with_identities:d?"1":"0",protocol:h,uuid:v},c&&(m.context=JSON.stringify(c)),l&&(m.custom_data=JSON.stringify(l)),g=this.baseClient.appHost+"/connections/social/"+e+"?"+_t(m),y=function(e){var t=e.data,n=t.code,r=t.message,o=t.data,s=t.event,u=(s=s||{}).source,c=s.eventType;if("authing"===u&&"socialLogin"===c){try{var l=JSON.parse(r);r=l.message,n=l.code}catch(e){}200===n?(b.tokenProvider.setUser(o),i&&i(o)):a&&a(n,r),window.removeEventListener("message",y)}},window.addEventListener("message",y),At()?window.location.href=g:o?Ot(g,n):window.open(g),[2]}))}))},e}(),tn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},nn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},rn=function(){function e(e,t){this.options=e,this.baseClient=new Ft(this.options),this.httpClient=t}return e.prototype.getPublicKey=function(){return tn(this,void 0,void 0,(function(){var e,t,n;return nn(this,(function(r){switch(r.label){case 0:return this.options.publicKey?[2,this.options.publicKey]:this.publicKey?[2,this.publicKey]:(e=this.baseClient.appHost+"/api/v2/.well-known",[4,this.httpClient.request({method:"GET",url:e})]);case 1:return t=r.sent(),n=t.publicKey,this.publicKey=n,[2,this.publicKey]}}))}))},e}(),on=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},an=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},sn=function(){function e(e,t,n){this.options=e,this.baseClient=new Ft(e),this.tokenProvider=t,this.httpClient=n}return e.prototype.initProviderContext=function(e){return on(this,void 0,void 0,(function(){return an(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/applications/"+e+"/public-config"})];case 1:return[2,t.sent()]}}))}))},e.prototype.getProviderConfigAndError=function(e,t,n){var r,o,i=null===(o=null===(r=t.identityProviders)||void 0===r?void 0:r.find((function(t){return t.protocol===e&&t.identifier===n})))||void 0===o?void 0:o.config;if(!i)throw new Error("\u8eab\u4efd\u6e90\u914d\u7f6e\u4e0d\u5b58\u5728");return i},e.prototype.getLoginUrl=function(e,t,n,r){var o=this.getProviderConfigAndError(e,t,n);switch(e){case xt.b.OIDC:var i=_t({state:r,client_id:(o=o).clientId,redirect_uri:o.redirectUri,scope:o.scopes,response_type:o.responseType,nonce:Rt(32)});return o.authorizationEdpoint+"?"+i;case xt.b.SAML:return(o=o).samlRequest;case xt.b.CAS:return(o=o).casConnectionLoginUrl;case xt.b.OAUTH:return(o=o).authUrl;case xt.b.AZURE_AD:return(o=o).authorizationUrl;default:return""}},e.prototype.authorize=function(e,t,n){return on(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,d,p=this;return an(this,(function(h){switch(h.label){case 0:return r=(n=n||{}).position,o=n.popup,i=void 0===o||o,a=n.onSuccess,s=n.onError,u=this.options.appId,[4,this.initProviderContext(u)];case 1:return c=h.sent(),l=Rt(32),e!==xt.b.OIDC?[3,3]:[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/connections/oidc/start-interaction",data:{state:l,protocol:e,userPoolId:c.userPoolId,appId:u,referer:window.location.href,connection:{providerIentifier:t}}})];case 2:h.sent(),h.label=3;case 3:return f=this.getLoginUrl(e,c,t,l),d=function(e){var t=e.data,n=t.code,r=t.message,o=t.data,i=t.event,u=(i=i||{}).source,c=i.eventType;if("authing"===u&&"enterpriseLogin"===c){try{var l=JSON.parse(r);r=l.message,n=l.code}catch(e){}200===n?(p.tokenProvider.setUser(o),a&&a(o)):s&&s(n,r),window.removeEventListener("message",d)}},window.addEventListener("message",d),Pt()?window.location.href=f:i?Ot(f,r):window.open(f),[2]}}))}))},e}(),un=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},cn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},ln=function(){function e(e,t,n){this.options=e,this.tokenProvider=t,this.httpClient=n,this.baseClient=new Ft(e)}return e.prototype.detail=function(){return un(this,void 0,void 0,(function(){var e;return cn(this,(function(t){switch(t.label){case 0:return e=this.baseClient.appHost+"/api/v2/users/principal_authentication",[4,this.httpClient.request({method:"GET",url:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.authenticate=function(e){return un(this,void 0,void 0,(function(){var t,n;return cn(this,(function(r){switch(r.label){case 0:return t=this.baseClient.appHost+"/api/v2/users/principal_authentication",n="P"===e.type?{type:"P",name:e.name,idCard:e.idCard,ext:e.bankCard}:{type:"E",name:e.enterpriseName,idCard:e.enterpriseCode,ext:e.legalPersonName},[4,this.httpClient.request({method:"POST",url:t,data:n})];case 1:return r.sent(),[2,!0]}}))}))},e}();function fn(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t}function dn(e){var t=e.substring("-----BEGIN PRIVATE KEY-----".length,e.length-"-----END PRIVATE KEY-----".length),n=fn(window.atob(t));return window.crypto.subtle.importKey("pkcs8",n,{name:"ECDH",namedCurve:"P-256"},!0,["deriveBits"])}function pn(e){var t=e.substring("-----BEGIN PRIVATE KEY-----".length,e.length-"-----END PRIVATE KEY-----".length),n=fn(window.atob(t));return window.crypto.subtle.importKey("pkcs8",n,{name:"RSA-OAEP",hash:"SHA-1"},!0,["decrypt"])}function hn(e){var t=fn(e);return window.crypto.subtle.importKey("raw",t,{name:"HMAC",hash:"SHA-256"},!0,["verify"])}function vn(e){var t=fn(e);return window.crypto.subtle.importKey("raw",t,"AES-KW",!0,["unwrapKey"])}var mn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},gn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},yn=function(){function e(e,t,r){var o=this;this.naiveHttpClient=t,this.baseClient=r,this.keystore=this.naiveHttpClient.request({url:this.baseClient.appHost+"/oidc/.well-known/jwks.json",method:"GET"}).then((function(t){return mn(o,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,d,p,h,v,m,g,y,b,w,x,E,C,k,O,S;return gn(this,(function(_){switch(_.label){case 0:r=[],o=0,i=t.keys,_.label=1;case 1:return o<i.length?(a=i[o],u=(s=r).push,C={alg:[a.alg]},[4,De(a)]):[3,4];case 2:u.apply(s,[(C.key=_.sent(),C)]),_.label=3;case 3:return o++,[3,1];case 4:return e.secret?(c=["A128KW","A192KW","A256KW"],"undefined"===typeof window?[3,7]:(f=(l=r).push,k={alg:["HS256"]},[4,hn(e.secret)])):[3,8];case 5:return f.apply(l,[(k.key=_.sent(),k)]),p=(d=r).push,O={alg:c},[4,vn(e.secret)];case 6:return p.apply(d,[(O.key=_.sent(),O)]),[3,8];case 7:h=n(127),v=h.createSecretKey(Buffer.from(e.secret)),r.push({alg:["HS256"],key:v}),r.push({alg:c,key:v}),_.label=8;case 8:if(!e.privateKeys)return[3,13];m=0,g=e.privateKeys,_.label=9;case 9:return m<g.length?(y=g[m],"undefined"===typeof window?[3,11]:(b={"RSA-OAEP":pn,"ECDH-ES":dn},x=(w=r).push,S={alg:[y.alg],kid:y.kid},[4,b[y.alg](y.pkcs8Key)])):[3,13];case 10:return x.apply(w,[(S.key=_.sent(),S)]),[3,12];case 11:E=n(127),r.push({alg:[y.alg],kid:y.kid,key:E.createPrivateKey(y.pkcs8Key)}),_.label=12;case 12:return m++,[3,9];case 13:return[2,r]}}))}))})).catch((function(e){return console.error("\u670d\u52a1\u5668 JWKS \u7aef\u70b9\u8bf7\u6c42\u5931\u8d25"),console.error(e),[]}))}return e.prototype.getKeyFor=function(e){return mn(this,void 0,void 0,(function(){var t,n,r,o,i,a;return gn(this,(function(s){switch(s.label){case 0:return t=e.alg,n=e.kid,[4,this.keystore];case 1:for(r=s.sent(),o=0,i=r;o<i.length;o++)if(a=i[o],(!n||!a.kid||n===a.kid)&&(!t||a.alg.includes(t)))return[2,a.key];throw new Error("No suitable key found for {alg="+t+", kid="+n+"}")}}))}))},e}(),bn=function(){return(bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},wn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},xn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},En={appId:void 0,tenantId:void 0,appHost:void 0,protocol:"oidc",tokenEndPointAuthMethod:"client_secret_post",introspectionEndPointAuthMethod:"client_secret_post",revocationEndPointAuthMethod:"client_secret_post",timeout:1e4,onError:function(e,t,n){throw{code:e,message:t,data:n}},requestFrom:"sdk",encryptFunction:function(e,t){return Et(void 0,void 0,void 0,(function(){return Ct(this,(function(n){return[2,new Promise((function(n,r){var o=new kt({});o.setPublicKey(t);var i=o.encrypt(e);i?n(i):r(i)}))]}))}))},host:"https://core.authing.cn",headers:{"userpool-id":"x-authing-userpool-id","app-id":"x-authing-app-id","request-from":"x-authing-request-from","sdk-version":"x-authing-sdk-version","tenant-id":"x-authing-app-tenant-id",lang:"x-authing-lang"},lang:"zh-CN"},Cn=function(){function e(e){Object.keys(e).forEach((function(t){return!e[t]&&delete e[t]})),this.options=Object.assign({},En,e),this.baseClient=new Ft(this.options);var t=this.baseClient.appHost+"/graphql/v2";this.graphqlClient=new(this.options.graphqlClient||wt)(t,this.options),this.tokenProvider=new(this.options.tokenProvider||i)(this.options),this.httpClient=new(this.options.httpClient||Gt)(this.options,this.tokenProvider),this.naiveHttpClient=new Xt(this.options,this.tokenProvider),this.publicKeyManager=new rn(this.options,this.httpClient),this.wxqrcode=new Ut(this.options,this.tokenProvider,this.httpClient,"WXAPP_AUTH"),this.qrcode=new Ut(this.options,this.tokenProvider,this.httpClient,"APP_AUTH"),this.wechatmpqrcode=new Ut(this.options,this.tokenProvider,this.httpClient,"WECHATMP_AUTH"),this.mfa=new Wt(this.options,this.tokenProvider,this.httpClient),this.social=new en(this.options,this.tokenProvider,this.httpClient),this.enterprise=new sn(this.options,this.tokenProvider,this.httpClient),this.principal=new ln(this.options,this.tokenProvider,this.httpClient),this.keyManager=new yn(this.options,this.naiveHttpClient,this.baseClient),this.options.token&&this.setToken(this.options.token)}return e.prototype.checkLoggedIn=function(){var e,t=this.tokenProvider.getUser();if(t)return t.id;var n=this.tokenProvider.getToken();if(!n)throw new Error("\u8bf7\u5148\u767b\u5f55\uff01");var r=Jt()(n),o=r.sub||(null===(e=r.data)||void 0===e?void 0:e.id);if(!o)throw new Error("\u4e0d\u5408\u6cd5\u7684 accessToken");return o},e.prototype.setCurrentUser=function(e){this.tokenProvider.setUser(e)},e.prototype.setToken=function(e){this.tokenProvider.setToken(e)},e.prototype.registerByEmail=function(e,t,n,r){return wn(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,f,d,p,h,v,m,g;return xn(this,(function(y){switch(y.label){case 0:return n=n||{},o=(r=r||{}).forceLogin,i=void 0!==o&&o,a=r.generateToken,s=void 0!==a&&a,u=r.clientIp,c=r.params,l=r.context,f=r.customData,p=(d=this.options).encryptFunction,h=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,p.apply(d,h.concat([y.sent()]))];case 2:return t=y.sent(),v=null,f?v=JSON.stringify(jt(f)):c&&(v=JSON.stringify(c)),m=null,l&&(m=JSON.stringify(l)),[4,(b=this.graphqlClient,w=this.tokenProvider,x={input:{email:e,password:t,profile:n,forceLogin:i,generateToken:s,clientIp:u,params:v,context:m}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.qb,[4,w.getToken()];case 1:return t=n.sent(),[2,b.request({query:e,token:t,variables:x})]}}))})))];case 3:return g=y.sent().registerByEmail,this.setCurrentUser(g),[2,g]}var b,w,x}))}))},e.prototype.registerByUsername=function(e,t,n,r){return wn(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,f,d,p,h,v,m,g;return xn(this,(function(y){switch(y.label){case 0:return n=n||{},o=(r=r||{}).forceLogin,i=void 0!==o&&o,a=r.generateToken,s=void 0!==a&&a,u=r.clientIp,c=r.params,l=r.context,f=r.customData,p=(d=this.options).encryptFunction,h=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,p.apply(d,h.concat([y.sent()]))];case 2:return t=y.sent(),v=null,f?v=JSON.stringify(jt(f)):c&&(v=JSON.stringify(c)),m=null,l&&(m=JSON.stringify(l)),[4,(b=this.graphqlClient,w=this.tokenProvider,x={input:{username:e,password:t,profile:n,forceLogin:i,generateToken:s,clientIp:u,params:v,context:m}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.sb,t=w.getToken(),[2,b.request({query:e,token:t,variables:x})]}))})))];case 3:return g=y.sent().registerByUsername,this.setCurrentUser(g),[2,g]}var b,w,x}))}))},e.prototype.registerByPhoneCode=function(e,t,n,r,o){return wn(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,d,p,h,v,m,g,y;return xn(this,(function(b){switch(b.label){case 0:return r=r||{},i=(o=o||{}).forceLogin,a=void 0!==i&&i,s=o.generateToken,u=void 0!==s&&s,c=o.clientIp,l=o.params,f=o.context,d=o.customData,n?(h=(p=this.options).encryptFunction,v=[n],[4,this.publicKeyManager.getPublicKey()]):[3,3];case 1:return[4,h.apply(p,v.concat([b.sent()]))];case 2:n=b.sent(),b.label=3;case 3:return m=null,d?m=JSON.stringify(jt(d)):l&&(m=JSON.stringify(l)),g=null,f&&(g=JSON.stringify(f)),[4,(w=this.graphqlClient,x=this.tokenProvider,E={input:{phone:e,code:t,password:n,profile:r,forceLogin:a,generateToken:u,clientIp:c,params:m,context:g}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.rb,t=x.getToken(),[2,w.request({query:e,token:t,variables:E})]}))})))];case 4:return y=b.sent().registerByPhoneCode,this.setCurrentUser(y),[2,y]}var w,x,E}))}))},e.prototype.checkPasswordStrength=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,r=this.tokenProvider,o={password:e},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.p,[4,r.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:o})]}}))})))];case 1:return[2,t.sent().checkPasswordStrength]}var n,r,o}))}))},e.prototype.sendSmsCode=function(e){return wn(this,void 0,void 0,(function(){var t;return xn(this,(function(n){switch(n.label){case 0:return t=this.baseClient.appHost+"/api/v2/sms/send",[4,this.httpClient.request({method:"POST",url:t,data:{phone:e}})];case 1:return[2,n.sent()]}}))}))},e.prototype.loginByEmail=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,d,p,h,v;return xn(this,(function(m){switch(m.label){case 0:return r=(n=n||{}).autoRegister,o=void 0!==r&&r,i=n.captchaCode,a=n.clientIp,s=n.params,u=n.context,c=n.customData,f=(l=this.options).encryptFunction,d=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(l,d.concat([m.sent()]))];case 2:return t=m.sent(),p=null,c?p=JSON.stringify(jt(c)):s&&(p=JSON.stringify(s)),h=null,u&&(h=JSON.stringify(u)),[4,(g=this.graphqlClient,y=this.tokenProvider,b={input:{email:e,password:t,autoRegister:o,captchaCode:i,clientIp:a,params:p,context:h}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.ab,t=y.getToken(),[2,g.request({query:e,token:t,variables:b})]}))})))];case 3:return v=m.sent().loginByEmail,this.setCurrentUser(v),[2,v]}var g,y,b}))}))},e.prototype.loginByUsername=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,d,p,h,v;return xn(this,(function(m){switch(m.label){case 0:return r=(n=n||{}).autoRegister,o=void 0!==r&&r,i=n.captchaCode,a=n.clientIp,s=n.params,u=n.context,c=n.customData,f=(l=this.options).encryptFunction,d=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(l,d.concat([m.sent()]))];case 2:return t=m.sent(),p=null,c?p=JSON.stringify(jt(c)):s&&(p=JSON.stringify(s)),h=null,u&&(h=JSON.stringify(u)),[4,(g=this.graphqlClient,y=this.tokenProvider,b={input:{username:e,password:t,autoRegister:o,captchaCode:i,clientIp:a,params:p,context:h}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.eb,t=y.getToken(),[2,g.request({query:e,token:t,variables:b})]}))})))];case 3:return v=m.sent().loginByUsername,this.setCurrentUser(v),[2,v]}var g,y,b}))}))},e.prototype.loginByPhoneCode=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i,a,s,u,c;return xn(this,(function(l){switch(l.label){case 0:return r=(n=n||{}).clientIp,o=n.params,i=n.context,a=n.customData,s=null,a?s=JSON.stringify(jt(a)):o&&(s=JSON.stringify(o)),u=null,i&&(u=JSON.stringify(i)),[4,(f=this.graphqlClient,d=this.tokenProvider,p={input:{phone:e,code:t,clientIp:r,params:s,context:u}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.bb,t=d.getToken(),[2,f.request({query:e,token:t,variables:p})]}))})))];case 1:return c=l.sent().loginByPhoneCode,this.setCurrentUser(c),[2,c]}var f,d,p}))}))},e.prototype.loginByPhonePassword=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i,a,s,u,c,l,f,d,p,h,v;return xn(this,(function(m){switch(m.label){case 0:return r=(n=n||{}).captchaCode,o=n.autoRegister,i=void 0!==o&&o,a=n.clientIp,s=n.params,u=n.context,c=n.customData,f=(l=this.options).encryptFunction,d=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(l,d.concat([m.sent()]))];case 2:return t=m.sent(),p=null,c?p=JSON.stringify(jt(c)):s&&(p=JSON.stringify(s)),h=null,u&&(h=JSON.stringify(u)),[4,(g=this.graphqlClient,y=this.tokenProvider,b={input:{phone:e,password:t,captchaCode:r,autoRegister:i,clientIp:a,params:p,context:h}},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.cb,t=y.getToken(),[2,g.request({query:e,token:t,variables:b})]}))})))];case 3:return v=m.sent().loginByPhonePassword,this.setCurrentUser(v),[2,v]}var g,y,b}))}))},e.prototype.loginBySubAccount=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i,a,s,u;return xn(this,(function(c){switch(c.label){case 0:return r=(n=n||{}).captchaCode,o=n.clientIp,a=(i=this.options).encryptFunction,s=[t],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,a.apply(i,s.concat([c.sent()]))];case 2:return t=c.sent(),[4,(l=this.graphqlClient,f=this.tokenProvider,d={account:e,password:t,captchaCode:r,clientIp:o},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){return e=ut.db,t=f.getToken(),[2,l.request({query:e,token:t,variables:d})]}))})))];case 3:return u=c.sent().loginBySubAccount,this.setCurrentUser(u),[2,u]}var l,f,d}))}))},e.prototype.checkLoginStatus=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,r=this.tokenProvider,o={token:e},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.o,[4,r.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:o})]}}))})))];case 1:return[2,t.sent().checkLoginStatus]}var n,r,o}))}))},e.prototype.sendEmail=function(e,t){return wn(this,void 0,void 0,(function(){return xn(this,(function(n){switch(n.label){case 0:return[4,(r=this.graphqlClient,o=this.tokenProvider,i={email:e,scene:t},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.Lb,[4,o.getToken()];case 1:return t=n.sent(),[4,r.request({query:e,token:t,variables:i})];case 2:return[2,n.sent()]}}))})))];case 1:return[2,n.sent().sendEmail]}var r,o,i}))}))},e.prototype.resetPasswordByPhoneCode=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i;return xn(this,(function(a){switch(a.label){case 0:return o=(r=this.options).encryptFunction,i=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,o.apply(r,i.concat([a.sent()]))];case 2:return n=a.sent(),[4,ft(this.graphqlClient,this.tokenProvider,{phone:e,code:t,newPassword:n})];case 3:return[2,a.sent().resetPassword]}}))}))},e.prototype.resetPasswordByEmailCode=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o,i;return xn(this,(function(a){switch(a.label){case 0:return o=(r=this.options).encryptFunction,i=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,o.apply(r,i.concat([a.sent()]))];case 2:return n=a.sent(),[4,ft(this.graphqlClient,this.tokenProvider,{email:e,code:t,newPassword:n})];case 3:return[2,a.sent().resetPassword]}}))}))},e.prototype.resetPasswordByFirstLoginToken=function(e){return wn(this,void 0,void 0,(function(){var t,n,r,o,i;return xn(this,(function(a){switch(a.label){case 0:return t=e.token,n=e.password,o=(r=this.options).encryptFunction,i=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,o.apply(r,i.concat([a.sent()]))];case 2:return n=a.sent(),[4,(s=this.graphqlClient,u=this.tokenProvider,c={token:t,password:n},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.zb,[4,u.getToken()];case 1:return t=n.sent(),[2,s.request({query:e,token:t,variables:c})]}}))})))];case 3:return[2,a.sent().resetPasswordByFirstLoginToken]}var s,u,c}))}))},e.prototype.resetPasswordByForceResetToken=function(e){return wn(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c;return xn(this,(function(l){switch(l.label){case 0:return t=e.token,n=e.newPassword,r=e.oldPassword,i=(o=this.options).encryptFunction,a=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,i.apply(o,a.concat([l.sent()]))];case 2:return n=l.sent(),u=(s=this.options).encryptFunction,c=[r],[4,this.publicKeyManager.getPublicKey()];case 3:return[4,u.apply(s,c.concat([l.sent()]))];case 4:return r=l.sent(),[4,(f=this.graphqlClient,d=this.tokenProvider,p={token:t,oldPassword:r,newPassword:n},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.Ab,[4,d.getToken()];case 1:return t=n.sent(),[2,f.request({query:e,token:t,variables:p})]}}))})))];case 5:return[2,l.sent().resetPasswordByForceResetToken]}var f,d,p}))}))},e.prototype.updateProfile=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t=this.checkLoggedIn(),e&&e.password&&delete e.password,[4,(o=this.graphqlClient,i=this.tokenProvider,a={id:t,input:e},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.gc,[4,i.getToken()];case 1:return t=n.sent(),[2,o.request({query:e,token:t,variables:a})]}}))})))];case 1:return n=r.sent().updateUser,this.setCurrentUser(n),[2,n]}var o,i,a}))}))},e.prototype.updatePassword=function(e,t){return wn(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c;return xn(this,(function(l){switch(l.label){case 0:return(n=e)?(o=(r=this.options).encryptFunction,i=[e],[4,this.publicKeyManager.getPublicKey()]):[3,3];case 1:return[4,o.apply(r,i.concat([l.sent()]))];case 2:n=l.sent(),l.label=3;case 3:return e=n,(a=t)?(u=(s=this.options).encryptFunction,c=[t],[4,this.publicKeyManager.getPublicKey()]):[3,6];case 4:return[4,u.apply(s,c.concat([l.sent()]))];case 5:a=l.sent(),l.label=6;case 6:return t=a,[4,(f=this.graphqlClient,d=this.tokenProvider,p={newPassword:e,oldPassword:t},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.cc,[4,d.getToken()];case 1:return t=n.sent(),[2,f.request({query:e,token:t,variables:p})]}}))})))];case 7:return[2,l.sent().updatePassword]}var f,d,p}))}))},e.prototype.updatePhone=function(e,t,n,r){return wn(this,void 0,void 0,(function(){return xn(this,(function(o){switch(o.label){case 0:return[4,(i=this.graphqlClient,a=this.tokenProvider,s={phone:e,phoneCode:t,oldPhone:n,oldPhoneCode:r},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.dc,[4,a.getToken()];case 1:return t=n.sent(),[2,i.request({query:e,token:t,variables:s})]}}))})))];case 1:return[2,o.sent().updatePhone]}var i,a,s}))}))},e.prototype.updateEmail=function(e,t,n,r){return wn(this,void 0,void 0,(function(){return xn(this,(function(o){switch(o.label){case 0:return[4,(i=this.graphqlClient,a=this.tokenProvider,s={email:e,emailCode:t,oldEmail:n,oldEmailCode:r},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.Zb,[4,a.getToken()];case 1:return t=n.sent(),[2,i.request({query:e,token:t,variables:s})]}}))})))];case 1:return[2,o.sent().updateEmail]}var i,a,s}))}))},e.prototype.refreshToken=function(){return wn(this,void 0,void 0,(function(){var e;return xn(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,r=this.tokenProvider,o={},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.pb,[4,r.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:o})]}}))})))];case 1:return e=t.sent().refreshToken,this.setToken(e.token),[2,e]}var n,r,o}))}))},e.prototype.linkAccount=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/users/link",data:{primaryUserToken:e.primaryUserToken,secondaryUserToken:e.secondaryUserToken}})];case 1:return t.sent(),[2,{code:200,message:"\u7ed1\u5b9a\u6210\u529f"}]}}))}))},e.prototype.unLinkAccount=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/users/unlink",data:{primaryUserToken:e.primaryUserToken,provider:e.provider}})];case 1:return t.sent(),[2,{code:200,message:"\u89e3\u7ed1\u6210\u529f"}]}}))}))},e.prototype.bindPhone=function(e,t){return wn(this,void 0,void 0,(function(){var n;return xn(this,(function(r){switch(r.label){case 0:return[4,(o=this.graphqlClient,i=this.tokenProvider,a={phone:e,phoneCode:t},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.n,[4,i.getToken()];case 1:return t=n.sent(),[2,o.request({query:e,token:t,variables:a})]}}))})))];case 1:return n=r.sent().bindPhone,this.setCurrentUser(n),[2,n]}var o,i,a}))}))},e.prototype.unbindPhone=function(){return wn(this,void 0,void 0,(function(){var e;return xn(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,r=this.tokenProvider,o={},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.Yb,[4,r.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:o})]}}))})))];case 1:return e=t.sent().unbindPhone,this.setCurrentUser(e),[2,e]}var n,r,o}))}))},e.prototype.bindEmail=function(e,t){return wn(this,void 0,void 0,(function(){var n;return xn(this,(function(r){switch(r.label){case 0:return[4,(o=this.graphqlClient,i=this.tokenProvider,a={email:e,emailCode:t},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.m,[4,i.getToken()];case 1:return t=n.sent(),[2,o.request({query:e,token:t,variables:a})]}}))})))];case 1:return n=r.sent().bindEmail,this.setCurrentUser(n),[2,n]}var o,i,a}))}))},e.prototype.unbindEmail=function(){return wn(this,void 0,void 0,(function(){var e;return xn(this,(function(t){switch(t.label){case 0:return[4,(n=this.graphqlClient,r=this.tokenProvider,o={},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.Xb,[4,r.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:o})]}}))})))];case 1:return e=t.sent().unbindEmail,this.setCurrentUser(e),[2,e]}var n,r,o}))}))},e.prototype.getCurrentUser=function(){return wn(this,void 0,void 0,(function(){var e;return xn(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(n=this.graphqlClient,r=this.tokenProvider,o={},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.kc,[4,r.getToken()];case 1:return t=i.sent(),[4,n.request({query:e,token:t,variables:o})];case 2:return[2,i.sent()]}}))})))];case 1:return e=t.sent().user,this.setCurrentUser(e),[2,e];case 2:return t.sent(),[2,null];case 3:return[2]}var n,r,o}))}))},e.prototype.logout=function(){return wn(this,void 0,void 0,(function(){return xn(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/logout?app_id="+this.options.appId,withCredentials:!0})];case 1:return e.sent(),this.tokenProvider.clearUser(),[2]}}))}))},e.prototype.listUdv=function(){return wn(this,void 0,void 0,(function(){var e,t;return xn(this,(function(n){switch(n.label){case 0:return e=this.checkLoggedIn(),[4,dt(this.graphqlClient,this.tokenProvider,{targetType:ut.Ub.User,targetId:e})];case 1:return t=n.sent().udv,[2,Tt(t)]}}))}))},e.prototype.setUdv=function(e,t){return wn(this,void 0,void 0,(function(){var n,r;return xn(this,(function(o){switch(o.label){case 0:return n=this.checkLoggedIn(),t=JSON.stringify(t),[4,(i=this.graphqlClient,a=this.tokenProvider,s={targetType:ut.Ub.User,targetId:n,key:e,value:t},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.Rb,[4,a.getToken()];case 1:return t=n.sent(),[2,i.request({query:e,token:t,variables:s})]}}))})))];case 1:return r=o.sent().setUdv,[2,Tt(r)]}var i,a,s}))}))},e.prototype.removeUdv=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t=this.checkLoggedIn(),[4,pt(this.graphqlClient,this.tokenProvider,{targetType:ut.Ub.User,targetId:t,key:e})];case 1:return n=r.sent().removeUdv,[2,Tt(n)]}}))}))},e.prototype.listOrgs=function(){return wn(this,void 0,void 0,(function(){return xn(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/users/me/orgs"})];case 1:return[2,e.sent()]}}))}))},e.prototype.listDepartments=function(){return wn(this,void 0,void 0,(function(){var e;return xn(this,(function(t){switch(t.label){case 0:return e=this.checkLoggedIn(),[4,(n=this.graphqlClient,r=this.tokenProvider,o={id:e},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(i){switch(i.label){case 0:return e=ut.K,[4,r.getToken()];case 1:return t=i.sent(),[2,n.request({query:e,token:t,variables:o})]}}))})))];case 1:return[2,t.sent().user.departments]}var n,r,o}))}))},e.prototype.loginByLdap=function(e,t,n){return wn(this,void 0,void 0,(function(){var r,o;return xn(this,(function(i){switch(i.label){case 0:return n=n||{},r=this.baseClient.appHost+"/api/v2/ldap/verify-user",[4,this.httpClient.request({method:"POST",url:r,data:{username:e,password:t}})];case 1:return o=i.sent(),this.setCurrentUser(o),[2,o]}}))}))},e.prototype.loginByAd=function(e,t){return wn(this,void 0,void 0,(function(){var n,r,o,i;return xn(this,(function(a){switch(a.label){case 0:return n=new URL(this.baseClient.appHost).hostname.split(".").slice(1).join("."),r=this.options.websocketHost||"https://ws."+n,o=r+"/api/v2/ad/verify-user",[4,this.httpClient.request({method:"POST",url:o,data:{username:e,password:t}})];case 1:return i=a.sent(),this.setCurrentUser(i),[2,i]}}))}))},e.prototype.uploadPhoto=function(e,t){var n=this;Mt({accept:e=e||"image/*",url:this.baseClient.appHost+"/api/v2/upload?folder=avatar"}).then((function(e){var n=e.url;return t(n)})).catch((function(e){var t=e.code,r=e.message;return n.options.onError(t,r)}))},e.prototype.updateAvatar=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:return[4,this.uploadAvatar(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.uploadAvatar=function(e){return wn(this,void 0,void 0,(function(){var t,n,r,o=this;return xn(this,(function(i){switch(i.label){case 0:return t=(e||{}).accept,this.checkLoggedIn(),[4,new Promise((function(e){o.uploadPhoto(t,(function(t){e(t)}))}))];case 1:return n=i.sent(),[4,this.updateProfile({photo:n})];case 2:return r=i.sent(),this.setCurrentUser(r),[2,r]}}))}))},e.prototype.getUdfValue=function(){return wn(this,void 0,void 0,(function(){var e,t;return xn(this,(function(n){switch(n.label){case 0:return e=this.checkLoggedIn(),[4,dt(this.graphqlClient,this.tokenProvider,{targetType:ut.Ub.User,targetId:e})];case 1:return t=n.sent().udv,[2,It(t)]}}))}))},e.prototype.setUdfValue=function(e){return wn(this,void 0,void 0,(function(){var t;return xn(this,(function(n){switch(n.label){case 0:if(0===Object.keys(e).length)throw new Error("empty udf value list");return t=this.checkLoggedIn(),[4,(r=this.graphqlClient,o=this.tokenProvider,i={targetType:ut.Ub.User,targetId:t,udvList:Object.keys(e).map((function(t){return{key:t,value:JSON.stringify(e[t])}}))},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.Qb,[4,o.getToken()];case 1:return t=n.sent(),[2,r.request({query:e,token:t,variables:i})]}}))})))];case 1:return[2,n.sent().setUdvBatch]}var r,o,i}))}))},e.prototype.removeUdfValue=function(e){return wn(this,void 0,void 0,(function(){var t;return xn(this,(function(n){switch(n.label){case 0:return t=this.checkLoggedIn(),[4,pt(this.graphqlClient,this.tokenProvider,{targetType:ut.Ub.User,targetId:t,key:e})];case 1:return n.sent(),[2]}}))}))},e.prototype.getSecurityLevel=function(){return wn(this,void 0,void 0,(function(){return xn(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/users/me/security-level"})];case 1:return[2,e.sent()]}}))}))},e.prototype.listAuthorizedResources=function(e,t){return wn(this,void 0,void 0,(function(){var n,r,o,i,a,s;return xn(this,(function(u){switch(u.label){case 0:return n=this.checkLoggedIn(),r=(t||{}).resourceType,[4,(c=this.graphqlClient,l=this.tokenProvider,f={id:n,namespace:e,resourceType:r},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.Z,[4,l.getToken()];case 1:return t=n.sent(),[2,c.request({query:e,token:t,variables:f})]}}))})))];case 1:if(!(o=u.sent().user))throw new Error("\u7528\u6237\u4e0d\u5b58\u5728");return i=o.authorizedResources,a=i.list,s=i.totalCount,[2,{list:a=a.map((function(e){for(var t in e)e[t]||delete e[t];return e})),totalCount:s}]}var c,l,f}))}))},e.prototype.isUserExists=function(e){return wn(this,void 0,void 0,(function(){var t,n,r,o;return xn(this,(function(i){switch(i.label){case 0:return t=e.username,n=e.email,r=e.phone,o=e.externalId,[4,(a=this.graphqlClient,s=this.tokenProvider,u={username:t,email:n,phone:r,externalId:o},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.U,[4,s.getToken()];case 1:return t=n.sent(),[2,a.request({query:e,token:t,variables:u})]}}))})))];case 1:return[2,i.sent().isUserExists]}var a,s,u}))}))},e.prototype.computedPasswordSecurityLevel=function(e){if("string"!==typeof e)throw"password must be a `string`";var t=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{12,}$/g),n=new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)[^]{8,}$/g);return null!==e.match(t)?xt.a.HIGH:null!==e.match(n)?xt.a.MIDDLE:xt.a.LOW},e.prototype._generateTokenRequest=function(e){var t={};return Object.keys(e).map((function(n){"undefined"!==typeof e[n]&&(t[n]=e[n])})),new URLSearchParams(t).toString()},e.prototype._generateBasicAuthToken=function(e,t){var n=e||this.options.appId,r=t||this.options.secret;return"Basic "+Buffer.from(n+":"+r).toString("base64")},e.prototype._getAccessTokenByCodeWithClientSecretPost=function(e,t){return wn(this,void 0,void 0,(function(){var n,r;return xn(this,(function(o){switch(o.label){case 0:return n=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,grant_type:"authorization_code",code:e,redirect_uri:this.options.redirectUri,code_verifier:t}),r="","oidc"===this.options.protocol?r=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(r=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:r,data:n,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,o.sent()]}}))}))},e.prototype._getAccessTokenByCodeWithClientSecretBasic=function(e,t){return wn(this,void 0,void 0,(function(){var n,r;return xn(this,(function(o){switch(o.label){case 0:return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),r=this._generateTokenRequest({grant_type:"authorization_code",code:e,redirect_uri:this.options.redirectUri,code_verifier:t}),[4,this.naiveHttpClient.request({data:r,method:"POST",url:n,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,o.sent()]}}))}))},e.prototype._getAccessTokenByCodeWithNone=function(e,t){return wn(this,void 0,void 0,(function(){var n,r;return xn(this,(function(o){switch(o.label){case 0:return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),r=this._generateTokenRequest({client_id:this.options.appId,grant_type:"authorization_code",code:e,redirect_uri:this.options.redirectUri,code_verifier:t}),[4,this.naiveHttpClient.request({method:"POST",url:n,data:r})];case 1:return[2,o.sent()]}}))}))},e.prototype.getAccessTokenByCode=function(e,t){return wn(this,void 0,void 0,(function(){return xn(this,(function(n){switch(n.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.tokenEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.tokenEndPointAuthMethod?[3,2]:[4,this._getAccessTokenByCodeWithClientSecretPost(e,null===t||void 0===t?void 0:t.codeVerifier)];case 1:return[2,n.sent()];case 2:return"client_secret_basic"!==this.options.tokenEndPointAuthMethod?[3,4]:[4,this._getAccessTokenByCodeWithClientSecretBasic(e,null===t||void 0===t?void 0:t.codeVerifier)];case 3:return[2,n.sent()];case 4:return"none"!==this.options.tokenEndPointAuthMethod?[3,6]:[4,this._getAccessTokenByCodeWithNone(e,null===t||void 0===t?void 0:t.codeVerifier)];case 5:return[2,n.sent()];case 6:return[2]}}))}))},e.prototype.generateCodeChallenge=function(){return Dt(43)},e.prototype.getCodeChallengeDigest=function(e){if(!e)throw new Error("\u8bf7\u63d0\u4f9b options \u53c2\u6570\uff0coptions.codeChallenge \u4e3a\u4e00\u4e2a\u957f\u5ea6\u5927\u4e8e\u7b49\u4e8e 43 \u7684\u5b57\u7b26\u4e32\uff0coptions.method \u53ef\u9009\u503c\u4e3a S256\u3001plain");if(!e.codeChallenge)throw new Error("\u8bf7\u63d0\u4f9b options.codeChallenge\uff0c\u503c\u4e3a\u4e00\u4e2a\u957f\u5ea6\u5927\u4e8e\u7b49\u4e8e 43 \u7684\u5b57\u7b26\u4e32");var t=e.method,n=void 0===t?"S256":t;if("S256"===n)return s()(e.codeChallenge).toString(c.a.enc.Base64).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");if("plain"===n)return e.codeChallenge;throw new Error("\u4e0d\u652f\u6301\u7684 options.method\uff0c\u53ef\u9009\u503c\u4e3a S256\u3001plain")},e.prototype.getAccessTokenByClientCredentials=function(e,t){return wn(this,void 0,void 0,(function(){var n,r,o,i;return xn(this,(function(a){switch(a.label){case 0:if(!e)throw new Error("\u8bf7\u4f20\u5165 scope \u53c2\u6570\uff0c\u8bf7\u770b\u6587\u6863\uff1ahttps://docs.authing.cn/v2/guides/authorization/m2m-authz.html");if(!t)throw new Error("\u8bf7\u5728\u8c03\u7528\u672c\u65b9\u6cd5\u65f6\u4f20\u5165 { accessKey: string, accessSecret: string }\uff0c\u8bf7\u770b\u6587\u6863\uff1ahttps://docs.authing.cn/v2/guides/authorization/m2m-authz.html");return n=(null===t||void 0===t?void 0:t.accessKey)||this.options.appId,r=(null===t||void 0===t?void 0:t.accessSecret)||this.options.secret,o=this._generateTokenRequest({client_id:n,client_secret:r,grant_type:"client_credentials",scope:e}),i="","oidc"===this.options.protocol?i=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(i=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:i,data:o,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,a.sent()]}}))}))},e.prototype.getUserInfoByAccessToken=function(e,t){return wn(this,void 0,void 0,(function(){var n;return xn(this,(function(r){switch(r.label){case 0:if(t){if(t.method&&!["POST","GET"].includes(t.method))throw new Error("options.method \u53c2\u6570\u7684\u53ef\u9009\u503c\u4e3a POST\u3001GET\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165");if(t.tokenPlace&&!["query","header","body"].includes(t.tokenPlace))throw new Error("options.tokenPlace \u53c2\u6570\u7684\u53ef\u9009\u503c\u4e3a query\u3001header\u3001body\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165");if("GET"===t.method&&"body"===t.tokenPlace)throw new Error("options.method \u53c2\u6570\u4e3a GET \u65f6\uff0coptions.tokenPlace \u53c2\u6570\u4e0d\u80fd\u4e3a body");t.method=t.method||"GET",t.tokenPlace=t.tokenPlace||"query"}return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/me":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/me"),"POST"!==(null===t||void 0===t?void 0:t.method)?[3,7]:"header"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,2]:[4,this.naiveHttpClient.request({method:"POST",url:n,headers:{Authorization:"Bearer "+e}})];case 1:return[2,r.sent()];case 2:return"query"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,4]:[4,this.naiveHttpClient.request({method:"POST",url:n,params:{access_token:e}})];case 3:return[2,r.sent()];case 4:return"body"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,6]:[4,this.naiveHttpClient.request({method:"POST",url:n,data:_t({access_token:e})})];case 5:return[2,r.sent()];case 6:return[3,14];case 7:return"GET"!==(null===t||void 0===t?void 0:t.method)?[3,12]:"header"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,9]:[4,this.naiveHttpClient.request({method:"GET",url:n,headers:{Authorization:"Bearer "+e}})];case 8:return[2,r.sent()];case 9:return"query"!==(null===t||void 0===t?void 0:t.tokenPlace)?[3,11]:[4,this.naiveHttpClient.request({method:"GET",url:n,params:{access_token:e}})];case 10:return[2,r.sent()];case 11:return[3,14];case 12:return[4,this.naiveHttpClient.request({method:"GET",url:n,params:{access_token:e}})];case 13:return[2,r.sent()];case 14:return[2]}}))}))},e.prototype.buildAuthorizeUrl=function(e){if(!this.baseClient.appHost)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u5e94\u7528\u57df\u540d appHost \u53c2\u6570\uff0c\u5f62\u5982\uff1ahttps://app1.authing.cn");if("oidc"===this.options.protocol)return this._buildOidcAuthorizeUrl(e);if("oauth"===this.options.protocol)return this._buildOauthAuthorizeUrl(e);if("saml"===this.options.protocol)return this._buildSamlAuthorizeUrl();if("cas"===this.options.protocol)return this._buildCasAuthorizeUrl(e);throw new Error("\u4e0d\u652f\u6301\u7684\u534f\u8bae\u7c7b\u578b\uff0c\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 protocol \u53c2\u6570\uff0c\u53ef\u9009\u503c\u4e3a oidc\u3001oauth\u3001saml\u3001cas")},e.prototype._buildOidcAuthorizeUrl=function(e){var t={appId:"client_id",scope:"scope",state:"state",nonce:"nonce",responseMode:"response_mode",responseType:"response_type",redirectUri:"redirect_uri",codeChallenge:"code_challenge",codeChallengeMethod:"code_challenge_method"},n={nonce:Math.random().toString().slice(2),state:Math.random().toString().slice(2),scope:"openid profile email phone address",client_id:this.options.appId,redirect_uri:this.options.redirectUri,response_type:"code"};Object.keys(t).forEach((function(r){e&&e[r]&&("scope"===r&&e.scope.includes("offline_access")&&(n.prompt="consent"),n[t[r]]=e[r])}));var r=new URLSearchParams(n);return this.baseClient.appHost+"/oidc/auth?"+r.toString()},e.prototype._buildOauthAuthorizeUrl=function(e){var t={appId:"client_id",scope:"scope",state:"state",responseType:"response_type",redirectUri:"redirect_uri"},n={state:Math.random().toString().slice(2),scope:"user",client_id:this.options.appId,redirect_uri:this.options.redirectUri,response_type:"code"};Object.keys(t).forEach((function(r){e&&e[r]&&(n[t[r]]=e[r])}));var r=new URLSearchParams(n);return this.baseClient.appHost+"/oauth/auth?"+r.toString()},e.prototype._buildSamlAuthorizeUrl=function(){return this.baseClient.appHost+"/api/v2/saml-idp/"+this.options.appId},e.prototype._buildCasAuthorizeUrl=function(e){return(null===e||void 0===e?void 0:e.service)?this.baseClient.appHost+"/cas-idp/"+this.options.appId+"?service="+(null===e||void 0===e?void 0:e.service):this.baseClient.appHost+"/cas-idp/"+this.options.appId},e.prototype._buildCasLogoutUrl=function(e){return(null===e||void 0===e?void 0:e.redirectUri)?this.baseClient.appHost+"/cas-idp/logout?url="+e.redirectUri:this.baseClient.appHost+"/cas-idp/logout"},e.prototype._buildOidcLogoutUrl=function(e){if(e&&(!e.idToken||!e.redirectUri))throw new Error("\u5fc5\u987b\u540c\u65f6\u4f20\u5165 idToken \u548c redirectUri \u53c2\u6570\uff0c\u6216\u8005\u540c\u65f6\u90fd\u4e0d\u4f20\u5165");return(null===e||void 0===e?void 0:e.redirectUri)?this.baseClient.appHost+"/oidc/session/end?id_token_hint="+e.idToken+"&post_logout_redirect_uri="+e.redirectUri:this.baseClient.appHost+"/oidc/session/end"},e.prototype._buildEasyLogoutUrl=function(e){return(null===e||void 0===e?void 0:e.redirectUri)?this.baseClient.appHost+"/login/profile/logout?redirect_uri="+e.redirectUri:this.baseClient.appHost+"/login/profile/logout"},e.prototype.buildLogoutUrl=function(e){return"cas"===this.options.protocol?this._buildCasLogoutUrl(e):"oidc"===this.options.protocol&&(null===e||void 0===e?void 0:e.expert)?this._buildOidcLogoutUrl(e):this._buildEasyLogoutUrl(e)},e.prototype._getNewAccessTokenByRefreshTokenWithClientSecretPost=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,grant_type:"refresh_token",refresh_token:e}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},e.prototype._getNewAccessTokenByRefreshTokenWithClientSecretBasic=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token"),n=this._generateTokenRequest({grant_type:"refresh_token",refresh_token:e}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:t,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},e.prototype._getNewAccessTokenByRefreshTokenWithNone=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token"),n=this._generateTokenRequest({client_id:this.options.appId,grant_type:"refresh_token",refresh_token:e}),[4,this.naiveHttpClient.request({method:"POST",url:t,data:n})];case 1:return[2,r.sent()]}}))}))},e.prototype.getNewAccessTokenByRefreshToken=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.tokenEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.tokenEndPointAuthMethod?[3,2]:[4,this._getNewAccessTokenByRefreshTokenWithClientSecretPost(e)];case 1:return[2,t.sent()];case 2:return"client_secret_basic"!==this.options.tokenEndPointAuthMethod?[3,4]:[4,this._getNewAccessTokenByRefreshTokenWithClientSecretBasic(e)];case 3:return[2,t.sent()];case 4:return"none"!==this.options.tokenEndPointAuthMethod?[3,6]:[4,this._getNewAccessTokenByRefreshTokenWithNone(e)];case 5:return[2,t.sent()];case 6:return[2]}}))}))},e.prototype._revokeTokenWithClientSecretPost=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,token:e}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token/revocation":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token/revocation"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},e.prototype._revokeTokenWithClientSecretBasic=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:if(t="","oidc"===this.options.protocol)t=this.baseClient.appHost+"/oidc/token/revocation";else if("oauth"===this.options.protocol)throw new Error("OAuth 2.0 \u6682\u4e0d\u652f\u6301\u7528 client_secret_basic \u6a21\u5f0f\u8eab\u4efd\u9a8c\u8bc1\u64a4\u56de Token");return n=this._generateTokenRequest({token:e}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:t,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},e.prototype._revokeTokenWithNone=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token/revocation":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token/revocation"),n=this._generateTokenRequest({client_id:this.options.appId,token:e}),[4,this.naiveHttpClient.request({method:"POST",url:t,data:n})];case 1:return[2,r.sent()]}}))}))},e.prototype.revokeToken=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.revocationEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.revocationEndPointAuthMethod?[3,2]:[4,this._revokeTokenWithClientSecretPost(e)];case 1:return t.sent(),[2,!0];case 2:return"client_secret_basic"!==this.options.revocationEndPointAuthMethod?[3,4]:[4,this._revokeTokenWithClientSecretBasic(e)];case 3:return t.sent(),[2,!0];case 4:return"none"!==this.options.revocationEndPointAuthMethod?[3,6]:[4,this._revokeTokenWithNone(e)];case 5:return t.sent(),[2,!0];case 6:throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 revocationEndPointAuthMethod \u53c2\u6570\u53ef\u9009\u503c\u4e3a client_secret_base\u3001client_secret_post\u3001none\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570")}}))}))},e.prototype._introspectTokenWithClientSecretPost=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,token:e}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token/introspection"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:t,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},e.prototype._introspectTokenWithClientSecretBasic=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token/introspection"),n=this._generateTokenRequest({token:e}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:t,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},e.prototype._introspectTokenWithNone=function(e){return wn(this,void 0,void 0,(function(){var t,n;return xn(this,(function(r){switch(r.label){case 0:return t="","oidc"===this.options.protocol?t=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(t=this.baseClient.appHost+"/oauth/token/introspection"),n=this._generateTokenRequest({client_id:this.options.appId,token:e}),[4,this.naiveHttpClient.request({method:"POST",url:t,data:n})];case 1:return[2,r.sent()]}}))}))},e.prototype.introspectToken=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 protocol \u53c2\u6570\u5fc5\u987b\u4e3a oauth \u6216 oidc\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570");if(!this.options.secret&&"none"!==this.options.introspectionEndPointAuthMethod)throw new Error("\u8bf7\u5728\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165 appId \u548c secret \u53c2\u6570");return"client_secret_post"!==this.options.introspectionEndPointAuthMethod?[3,2]:[4,this._introspectTokenWithClientSecretPost(e)];case 1:return[2,t.sent()];case 2:return"client_secret_basic"!==this.options.introspectionEndPointAuthMethod?[3,4]:[4,this._introspectTokenWithClientSecretBasic(e)];case 3:return[2,t.sent()];case 4:return"none"!==this.options.introspectionEndPointAuthMethod?[3,6]:[4,this._introspectTokenWithNone(e)];case 5:return[2,t.sent()];case 6:throw new Error("\u521d\u59cb\u5316 AuthenticationClient \u65f6\u4f20\u5165\u7684 introspectionEndPointAuthMethod \u53c2\u6570\u53ef\u9009\u503c\u4e3a client_secret_base\u3001client_secret_post\u3001none\uff0c\u8bf7\u68c0\u67e5\u53c2\u6570")}}))}))},e.prototype.validateTicketV1=function(e,t){return wn(this,void 0,void 0,(function(){var n,r,o;return xn(this,(function(i){switch(i.label){case 0:return n=this.baseClient.appHost+"/cas-idp/"+this.options.appId+"/validate",[4,this.naiveHttpClient.request({method:"GET",url:n,params:{service:t,ticket:e}})];case 1:return r=i.sent(),o=r.split("\n")[0],[2,bn({valid:"yes"===o},"yes"!==o&&{message:"ticket \u4e0d\u5408\u6cd5"})]}}))}))},e.prototype.validateTicketV2=function(e,t,n){return void 0===n&&(n="JSON"),wn(this,void 0,void 0,(function(){var r;return xn(this,(function(o){switch(o.label){case 0:if(!e)throw new Error("\u8bf7\u4f20\u5165 ticket \u4e00\u6b21\u6027\u7968\u636e");if(!t)throw new Error("\u8bf7\u4f20\u5165 service \u670d\u52a1\u5730\u5740");if("XML"!==n&&"JSON"!==n)throw new Error("format \u53c2\u6570\u53ef\u9009\u503c\u4e3a XML\u3001JSON\uff0c\u8bf7\u68c0\u67e5\u8f93\u5165");return r=this.baseClient.appHost+"/cas-idp/"+this.options.appId+"/serviceValidate",[4,this.naiveHttpClient.request({method:"GET",url:r,params:{service:t,ticket:e,format:n}})];case 1:return[2,o.sent()]}}))}))},e.prototype.hasRole=function(e,t){return wn(this,void 0,void 0,(function(){var n,r,o;return xn(this,(function(i){switch(i.label){case 0:return[4,(a=this.graphqlClient,s=this.tokenProvider,u={id:this.checkLoggedIn(),namespace:t},ct(void 0,void 0,void 0,(function(){var e,t;return lt(this,(function(n){switch(n.label){case 0:return e=ut.M,[4,s.getToken()];case 1:return t=n.sent(),[2,a.request({query:e,token:t,variables:u})]}}))})))];case 1:return(n=i.sent().user)?(r=n.roles).totalCount<1?[2,!1]:(o=!1,r.list.forEach((function(t){t.code===e&&(o=!0)})),[2,o]):[2,!1]}var a,s,u}))}))},e.prototype.listApplications=function(e){return wn(this,void 0,void 0,(function(){var t,n,r,o,i;return xn(this,(function(a){switch(a.label){case 0:return n=(t=e||{}).page,r=void 0===n?1:n,o=t.limit,i=void 0===o?10:o,[4,this.httpClient.request({url:this.baseClient.appHost+"/api/v2/users/me/applications/allowed?page="+r+"&limit="+i,method:"GET"})];case 1:return[2,a.sent()]}}))}))},e.prototype.validateToken=function(e){return wn(this,void 0,void 0,(function(){return xn(this,(function(t){switch(t.label){case 0:if(!e)throw new Error("\u8bf7\u5728\u4f20\u5165\u7684\u53c2\u6570\u5bf9\u8c61\u4e2d\u5305\u542b accessToken \u6216 idToken \u5b57\u6bb5");if(e.accessToken&&e.idToken)throw new Error("accessToken \u548c idToken \u53ea\u80fd\u4f20\u5165\u4e00\u4e2a\uff0c\u4e0d\u80fd\u540c\u65f6\u4f20\u5165");return e.idToken?[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/api/v2/oidc/validate_token",method:"GET",params:{id_token:e.idToken}})]:[3,2];case 1:return[2,t.sent()];case 2:return e.accessToken?[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/api/v2/oidc/validate_token",method:"GET",params:{access_token:e.accessToken}})]:[3,4];case 3:return[2,t.sent()];case 4:return[2]}}))}))},e.prototype.trackSession=function(){return wn(this,void 0,void 0,(function(){return xn(this,(function(e){switch(e.label){case 0:return[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/cas/session",method:"GET"})];case 1:return[2,e.sent()]}}))}))},e.prototype.validateTokenLocally=function(e){return wn(this,void 0,void 0,(function(){var t,n=this;return xn(this,(function(r){switch(r.label){case 0:return[4,at(e,(function(e){return n.keyManager.getKeyFor({alg:e.alg,kid:e.kid})}))];case 1:return t=r.sent().payload,[2,JSON.parse((new TextDecoder).decode(t))]}}))}))},e.prototype.decryptTokenLocally=function(e){return wn(this,void 0,void 0,(function(){var t,n=this;return xn(this,(function(r){switch(r.label){case 0:return[4,Je(e,(function(e){return n.keyManager.getKeyFor({alg:e.alg,kid:e.kid})}))];case 1:return t=r.sent().plaintext,[2,this.validateTokenLocally((new TextDecoder).decode(t))]}}))}))},e.prototype.setLang=function(e){this.options.lang=e},e}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(269),o=n.n(r),i=n(139),a=n.n(i),s=n(0),u=n(125);function c(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"===typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var l={};function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"===typeof t[0]&&l[t[0]]||("string"===typeof t[0]&&(l[t[0]]=new Date),c.apply(void 0,t))}function d(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return f("i18n.languages were undefined or empty",t.languages),!0;var r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!t.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))))}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=Object(s.useContext)(u.a)||{},i=r.i18n,a=r.defaultNS,c=n||i||Object(u.d)();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new u.b),!c){f("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},h=[l,{},!1];return h.t=l,h.i18n={},h.ready=!1,h}c.options.react&&void 0!==c.options.react.wait&&f("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var m=v(v(v({},Object(u.c)()),c.options.react),t),g=m.useSuspense,y=e||a||c.options&&c.options.defaultNS;y="string"===typeof y?[y]:y||["translation"],c.reportNamespaces.addUsedNamespaces&&c.reportNamespaces.addUsedNamespaces(y);var b=(c.isInitialized||c.initializedStoreOnce)&&y.every((function(e){return p(e,c,m)}));function w(){return c.getFixedT(null,"fallback"===m.nsMode?y:y[0])}var x=Object(s.useState)(w),E=o()(x,2),C=E[0],k=E[1],O=Object(s.useRef)(!0);Object(s.useEffect)((function(){var e=m.bindI18n,t=m.bindI18nStore;function n(){O.current&&k(w)}return O.current=!0,b||g||d(c,y,(function(){O.current&&k(w)})),e&&c&&c.on(e,n),t&&c&&c.store.on(t,n),function(){O.current=!1,e&&c&&e.split(" ").forEach((function(e){return c.off(e,n)})),t&&c&&t.split(" ").forEach((function(e){return c.store.off(e,n)}))}}),[c,y.join()]);var S=Object(s.useRef)(!0);Object(s.useEffect)((function(){O.current&&!S.current&&k(w),S.current=!1}),[c]);var _=[C,c,b];if(_.t=C,_.i18n=c,_.ready=b,b)return _;if(!b&&!g)return _;throw new Promise((function(e){d(c,y,(function(){e()}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(182),o=n(0);function i(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={loading:!1});var i=Object(o.useRef)(0),a=function(){var e=Object(o.useRef)(!1),t=Object(o.useCallback)((function(){return e.current}),[]);return Object(o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),t}(),s=Object(o.useState)(n),u=s[0],c=s[1],l=Object(o.useCallback)((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=++i.current;return u.loading||c((function(e){return Object(r.a)(Object(r.a)({},e),{loading:!0})})),e.apply(void 0,t).then((function(e){return a()&&o===i.current&&c({value:e,loading:!1}),e}),(function(e){return a()&&o===i.current&&c({error:e,loading:!1}),e}))}),t);return[u,l]}},function(e,t,n){"use strict";var r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},i=n(83),a=function(e,t){return r.createElement(i.a,Object.assign({},e,{ref:t,icon:o}))};a.displayName="UserOutlined";t.a=r.forwardRef(a)},function(e,t,n){"use strict";var r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},i=n(83),a=function(e,t){return r.createElement(i.a,Object.assign({},e,{ref:t,icon:o}))};a.displayName="LockOutlined";t.a=r.forwardRef(a)},function(e,t,n){"use strict";var r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},i=n(83),a=function(e,t){return r.createElement(i.a,Object.assign({},e,{ref:t,icon:o}))};a.displayName="SafetyOutlined";t.a=r.forwardRef(a)},function(e,t,n){"use strict";var r=n(0),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},i=n(83),a=function(e,t){return r.createElement(i.a,Object.assign({},e,{ref:t,icon:o}))};a.displayName="PlusOutlined";t.a=r.forwardRef(a)}]]);
3
- //# sourceMappingURL=2.bbae9fdb.chunk.js.map