@ckeditor/ckeditor5-ai 46.1.0-alpha.0 → 46.1.0-alpha.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 (170) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +9 -9
  150. package/src/adapters/aiadapter.js +1 -1
  151. package/src/adapters/aitextadapter.js +1 -1
  152. package/src/adapters/awstextadapter.js +1 -1
  153. package/src/adapters/openaitextadapter.js +1 -1
  154. package/src/aiassistant.js +1 -1
  155. package/src/aiassistantediting.js +1 -1
  156. package/src/aiassistantui.js +1 -1
  157. package/src/index.js +1 -1
  158. package/src/legacyerrors.js +1 -1
  159. package/src/ui/aiassistantcontroller.js +2 -2
  160. package/src/ui/form/aiformcontentarea.js +1 -1
  161. package/src/ui/form/aiformerrorview.js +1 -1
  162. package/src/ui/form/aiformpromptview.js +1 -1
  163. package/src/ui/form/aiformtoolbarview.js +1 -1
  164. package/src/ui/form/aiformview.js +1 -1
  165. package/src/ui/form/aihistorylistitemview.js +1 -1
  166. package/src/ui/form/aihistorylistview.js +1 -1
  167. package/src/ui/form/prompthistory.js +1 -1
  168. package/src/ui/showaiassistantcommand.js +1 -1
  169. package/src/utils/common-translations.js +1 -1
  170. package/src/utils/normalizecommandsconfig.js +1 -1
package/build/ai.js CHANGED
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(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 a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>b,AIAssistant:()=>je,AIAssistantUI:()=>$e,AIRequestError:()=>w,AITextAdapter:()=>We,AWSTextAdapter:()=>gc,OpenAITextAdapter:()=>Je,ShowAIAssistantCommand:()=>A,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=f;function d(){const e=["afterInit","markerToElement","_getTableRowCountFromContent","conversion","href","getColumnIndexes","filter","updateMarker","isAtEnd","markerRange","isPremiumPlugin","DataTransfer","_resetContentOfSelectedTableCells","insertContent","contentInsertion","9kIVoMr","isCollapsed","fromCharCode","getChild","element","config","2264YQiQkY","map","first","ai.useTheme","2525022hNTOkU","markerToHighlight","text/html","setData","init","createPositionAfter","table","setSelection","get","getSelectedBlocks","hideFakeVisualSelection","createUIElement","_getDefaultInsertBelowPosition","removeMarker","createRange","model","getMarkersGroup","span","length","document","from","331988jkymKn","off","addMarker","editingDowncast","getChildren","change","220xnJwbB","markers","isOfficialPlugin","for","plugins","end","_prepareTableInsertBelowPosition","ai-ui","lowest","resultRange","showFakeVisualSelection","11ZlPQyd","editing","canEditAt","_getAISelection","260118lhvFZQ","167574QpHLdV","20fnnhuw","isContent","deleteContent","findAncestor","TableUtils","forEach","13573jptrty","ck-fake-ai-selection","paste","createPositionAt","ck-ai-assistant-ui_theme","schema","has","getRange","data","getLastPosition","insertRows","pop","createSelection","fire","getSelectedTableCells","push","165204CYWeLj","selection","insertContentBelow","editor","getRows","getRowIndexes","parse","once","addClass","ck-fake-ai-selection_collapsed","last","getLastMatchingPosition","getFirstRange","start","10784556mkPdvU","_createEmptyTableRows","getRanges","join","_pasteHTMLUsingClipboard","AIAssistantEditing","pluginName"];return(d=function(){return e})()}!function(e){const t=f,n=e();for(;;)try{if(811262===-parseInt(t(266))/1+parseInt(t(336))/2+parseInt(t(326))/3*(-parseInt(t(357))/4)+parseInt(t(268))/5*(parseInt(t(267))/6)+-parseInt(t(274))/7*(parseInt(t(332))/8)+-parseInt(t(290))/9*(parseInt(t(363))/10)+parseInt(t(262))/11*(parseInt(t(304))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const l=globalThis[u(322)],h=u(370);function f(e,t){const n=d();return(f=function(e,t){return n[e-=260]})(e,t)}class p extends e.Plugin{static get[u(310)](){return u(309)}static get[u(365)](){return!0}static get[u(321)](){return!0}[u(340)](){const e=u,{editor:t}=this,n=[e(275)];t[e(331)][e(344)](e(335))&&n[e(289)](e(278)),t[e(314)][e(366)](e(360))[e(337)]({model:h,view:{classes:n,priority:12}}),t[e(314)][e(366)](e(360))[e(312)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(320)][r(327)])return null;const i=n[r(347)](r(353));return n[r(298)]([r(275),r(299)],i),i}})}[u(311)](){!async function(e){const t=g([110,65,55,121,117,114,103,79,72,98,90,118,68,112,108,82,107,74,115,99,100,73,67,109,56,54,111,80,87,120,57,50,102,49,113,70,48,76,97,83,88,51,78,71,119,84,77,75,52,106,86,116,89,85,66,81,105,53,122,104,101,69]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],s=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),o={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),s[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](d(e)):null}function d(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function l(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function h(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=f;return e[t(333)](e=>String[t(328)](e))[t(307)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([110]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await s,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],l(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(o())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function f(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?h(l(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(s(),e),()=>{const e=o();return null==e?(s(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const t=g([108,108,99,116,45])+h(l(e)),r=p(h(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function o(){const t=g([108,108,99,116,45])+h(l(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{f(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),s[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function o(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,s,o]=r;return t(i),await n(i,s,o),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](d(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),o,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,s)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1756944e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=f,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(315)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(261)](){const e=u,t=this[e(293)][e(351)];t[e(362)](n=>{const r=e,i=t[r(355)][r(291)][r(306)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(364)][r(280)](i))n[r(318)](i,{range:e});else if(e[r(303)][r(319)]){const s=e[r(303)][r(301)](({item:e})=>!t[r(279)][r(269)](e),{boundaries:e});n[r(359)](i,{usingOperation:!1,affectsData:!1,range:n[r(350)](s,e[r(368)])})}else n[r(359)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(346)](){const e=u,t=this[e(293)][e(351)],n=Array[e(356)](this[e(293)][e(351)][e(364)][e(352)](h));n[e(354)]&&t[e(362)](t=>{const r=e;n[r(273)](e=>{t[r(349)](e)})})}[u(324)](e,t){const n=u,r=this[n(265)](),i=t||r[n(302)]();this[n(293)][n(351)][n(264)](i)&&this[n(293)][n(351)][n(362)](s=>{const o=n;this[o(346)](),t||this[o(323)](s,r),this[o(308)]({insertAt:i,writer:s,html:e})})}[u(292)](e){const t=u,{model:n}=this[t(293)],r=this[t(265)]();n[t(362)](()=>{const n=t,i=this[n(369)](e,r)||this[n(348)](r);this[n(324)](e,i)})}[u(265)](){const e=u,t=this[e(293)][e(351)],n=Array[e(356)](t[e(364)][e(352)](h))[e(333)](t=>t[e(281)]());return t[e(286)](n)}[u(308)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(293)][r(263)],s=this[r(293)][r(367)][r(344)](a.ClipboardPipeline),o=new l;o[r(339)](r(338),t);const d=new ClipboardEvent(r(276),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(343)](n);const f=(t,n)=>{const i=r;n[i(260)]&&e[i(343)](n[i(260)])};s[r(297)](r(325),f,{priority:r(371)}),i[r(355)][r(287)](r(276),h),s[r(358)](r(325),f)}[u(348)](e){const t=u,{model:n}=this[t(293)],r=Array[t(356)](e[t(345)]());return r[t(354)]?n[t(341)](r[t(285)]()):e[t(283)]()}[u(369)](e,t){const n=u,{model:r,plugins:i}=this[n(293)];if(i[n(280)](n(272))){const s=i[n(344)](n(272))[n(288)](t);if(s[n(354)]){const t=this[n(313)](e),i=this[n(305)](s,t);return r[n(277)](i,0)}}return null}[u(313)](e){const t=u,n=this[t(293)][t(367)][t(344)](t(272)),r=this[t(293)][t(282)][t(296)](e),i=Array[t(356)](r[t(361)]())[t(317)](e=>e.is(t(330),t(342)));let s=0;return i[t(273)](e=>{s+=n[t(294)](e)}),s}[u(305)](e,t){const n=u,r=this[n(293)][n(367)][n(344)](n(272)),i=r[n(295)](e),s=r[n(316)](e),o=i[n(300)]+1,a=s[n(334)],c=e[0][n(271)](n(342));for(let e=0;e<t;e++)r[n(284)](c,{at:o});return c[n(329)](o)[n(329)](a)}[u(323)](e,t){const n=u,{plugins:r}=this[n(293)],{model:i}=e;r[n(280)](n(272))&&r[n(344)](n(272))[n(288)](t)[n(354)]&&i[n(270)](t)}}var m=y;function g(){var e=["afterInit","isOfficialPlugin","aiadapter-text-adapter-not-set","AIAdapter","isPremiumPlugin","2104035WsStTl","1189754NeRXsI","35iHFkwj","textAdapter","353790NMPjuM","809958EFefDj","AIRequestError","4556430SdyXVq","pluginName","name","24CVBQvL","732180PICViA","809365pBapre"];return(g=function(){return e})()}function y(e,t){var n=g();return(y=function(e,t){return n[e-=238]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(758893===parseInt(t(254))/1+-parseInt(t(250))/2+-parseInt(t(249))/3+parseInt(t(242))/4+-parseInt(t(243))/5+-parseInt(t(253))/6*(parseInt(t(251))/7)+parseInt(t(241))/8*(parseInt(t(238))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);class b extends e.Plugin{static get[m(239)](){return m(247)}static get[m(245)](){return!0}static get[m(248)](){return!0}[m(244)](){var e=m;if(!this[e(252)])throw new i.CKEditorError(e(246),null)}}class w extends Error{constructor(e){var t=m;super(e),this[t(240)]=t(255)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=S;function S(e,t){const n=E();return(S=function(e,t){return n[e-=129]})(e,t)}function E(){const e=["length","getSelectedBlocks","8133QuZbzR","getFirstRange","263512yFpfjn","model","change:isEnabled","_hasContext","plugins","560TSFkGV","hasContent","16800IVxoHP","3644sxoJEY","5tipyda","set","4509yhYUUY","add","name","values","getRanges","custom","_commandDefinitions","from","569724HrwcbK","3947461hyOSvP","includes","917983JlZzco","isCollapsed","refresh","getItems","24KVIUaK","8LvYrbQ","element","config","change:_hasContext","editor","document","ai.aiAssistant.disabledElements","execute","enabledCommandsIds","isEmpty","showUI","requiresContent","selection","get","isEnabled"];return(E=function(){return e})()}!function(e){const t=S,n=e();for(;;)try{if(644093===parseInt(t(131))/1+parseInt(t(174))/2*(-parseInt(t(167))/3)+parseInt(t(169))/4*(parseInt(t(132))/5)+parseInt(t(142))/6+-parseInt(t(143))/7*(-parseInt(t(150))/8)+parseInt(t(134))/9*(parseInt(t(130))/10)+-parseInt(t(145))/11*(parseInt(t(149))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(E);class A extends e.Command{[k(140)];constructor(e,t){const n=k;super(e),this[n(140)]=t,this[n(133)](n(158),[]),this.on(n(153),(e,t,r)=>{const i=n;this[i(164)]&&(this[i(158)]=I(this[i(140)],r))}),this[n(133)](n(172),!1),this.on(n(171),(e,t,r)=>{const i=n;this[i(158)]=r?I(this[i(140)],this[i(172)]):[]})}[k(147)](){const e=k,t=this[e(154)][e(170)];this[e(172)]=function(t){const n=e,r=t[n(155)][n(162)];return r[n(146)]?0!==[...r[n(166)]()][n(165)]&&![...r[n(166)]()][0][n(159)]:!!t[n(129)](r[n(168)]())}(t);const n=t[e(155)][e(162)],r=this[e(154)][e(152)][e(163)](e(156));for(const t of n[e(138)]())for(const n of t[e(148)]())if(n.is(e(151))&&r[e(144)](n[e(136)]))return void(this[e(164)]=!1);this[e(164)]=!0}[k(157)](e="",t="",n=k(139)){const r=k;this[r(154)][r(173)][r(163)]($e)[r(160)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(137)]())(t||!1===i[n(161)])&&r[n(135)](i.id);return Array[n(141)](r)}const _=x;function x(e,t){const n=R();return(x=function(e,t){return n[e-=374]})(e,t)}function R(){const e=["1406454TfZdVK","get","custom","stringify","markers","previousContext","div","value","previousQuery","mainAction","startsWith","659106IgPVwp","createElement","view","data","length","serializeToString","isRendered","```html","editor","toView","parseFromString","42055750QPvXeF","previousActionId","text/html","initialContext","domConverter","rename","reset","4008195ZDrJsq","_normalizeResponseHeadings","editing","push","finishProcessing","from","name","_sanitizeHTML","message","handleError","viewToDom","previousLabel","submitPrompt","once","startProcessing","_sanitizationContainer","config","_domParser","render","stopListening","listenTo","processor","_stripMarkdownSyntax","catch","childNodes","set:currentContext","isProcessing","6796sFGGHX","remove","exec","finally","body","element","setContentOf","nodeType","_handleQuery","64kZWkeu","<h1></h1>","3370563ZZDgnS","trim","921gPgUOh","destroy","toModel","updateView","_isH1TagSupportEnabled","document","tryAgainEvent","14oGcIWt","currentResponse","querySelector","ELEMENT_NODE","237959SEeNyp","_xmlSerializer","```","clear","textAdapter","then","htmlProcessor","reverse","_parseAndNormalizeContent","substring","set","abort","endsWith","makeRequest","ai.aiAssistant.preserveComments","stopProcessing","prompt","currentContext","match","innerHTML"];return(R=function(){return e})()}!function(e){const t=x,n=e();for(;;)try{if(877858===-parseInt(t(431))/1*(parseInt(t(427))/2)+-parseInt(t(420))/3*(parseInt(t(407))/4)+-parseInt(t(380))/5+-parseInt(t(451))/6+parseInt(t(418))/7+-parseInt(t(416))/8*(parseInt(t(462))/9)+parseInt(t(473))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(R);const P=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class C extends((0,i.ObservableMixin)()){[_(470)];[_(435)];[_(464)];[_(395)];[_(397)];[_(432)];constructor(e,t,n){const r=_;super(),this[r(470)]=e,this[r(435)]=t,this[r(395)]=document[r(463)](r(457)),this[r(397)]=new DOMParser,this[r(432)]=new XMLSerializer,this[r(464)]=n,this[r(441)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(405),(e,t,n)=>{const i=r;this[i(464)][i(458)]=this[i(387)](n)}),this[r(400)](this[r(464)],r(392),(e,t)=>{const n=r,i=this[n(448)]||this[n(376)];this[n(415)](t,i,n(453))}),this[r(400)](this[r(464)],r(426),()=>{const e=r;this[e(464)][e(447)]=this[e(391)],this[e(415)](this[e(459)],this[e(456)],this[e(374)],this[e(391)])}),this[r(400)](this[r(464)],r(446),()=>{this[r(446)]()})}[_(421)](){this[_(399)]()}async[_(423)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(464)][s(447)]=r,this[s(464)][s(460)]=i,this[s(376)]=n,t&&(this[s(464)][s(468)]?this[s(415)](t,n,e,r):this[s(464)][s(393)](s(398),()=>{this[s(415)](t,n,e,r)}))}[_(446)](){const e=_;this[e(406)]&&(this[e(406)]=!1,this[e(464)][e(384)](),this[e(435)][e(442)]())}[_(379)](){const e=_;this[e(376)]="",this[e(448)]="",this[e(428)]="",this[e(456)]="",this[e(459)]="",this[e(391)]="",this[e(374)]=void 0,this[e(464)][e(379)](),this[e(446)]()}async[_(415)](e,t,n,r){const i=_;return this[i(406)]=!0,this[i(464)][i(394)](),this[i(456)]=t,this[i(459)]=e,this[i(391)]=r||e,this[i(374)]=n,new Promise(r=>{const s=i;this[s(435)][s(444)]({query:e,context:t,onData:e=>{const t=s;this[t(428)]=e,this[t(448)]=this[t(439)](this[t(428)])},actionId:n})[s(436)](()=>{const e=s;!this[e(448)]&&this[e(428)]&&(this[e(448)]=this[e(439)](this[e(428)],!0))})[s(403)](e=>{const t=s;e instanceof w?this[t(464)][t(389)](e[t(388)]):this[t(464)][t(389)](),r()})[s(410)](()=>{this[s(446)](),r()})})}[_(439)](e,t=!1){const n=_,r=P[n(409)](e);e=r?e[n(440)](r[1][n(466)]):e[n(466)]<100&&!t?"":this[n(402)](e);const i=this[n(397)][n(472)](e,n(375));if(r){const e=Array[n(385)](i[n(411)][n(404)]);e[n(438)]();for(const t of e){if(t[n(414)]==Node[n(430)])break;t[n(408)]()}}const s=this[n(470)][n(465)][n(401)][n(471)](this[n(432)][n(467)](i[n(411)]));this[n(424)]()||this[n(381)](s);const o=this[n(470)][n(396)][n(452)](n(445)),a=this[n(470)][n(465)][n(422)](s);return o||a[n(455)][n(434)](),this[n(470)][n(465)][n(454)](a)}[_(381)](e){const t=_,n=new c.ViewUpcastWriter(this[t(470)][t(382)][t(464)][t(425)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(412))&&r[t(449)](n)&&(i[t(383)](n),"h1"==n[t(386)]&&(s=!0));if(s)for(const e of i)n[t(378)]("h"+(parseInt(e[t(386)][1])+1),e)}[_(424)](){const e=_,{data:t,editing:n}=this[e(470)],r=t[e(437)][e(471)](e(417)),i=t[e(471)](t[e(422)](r));return!!n[e(464)][e(377)][e(390)](i)[e(429)]("h1")}[_(387)](e){const t=_;return this[t(470)][t(382)][t(464)][t(377)][t(413)](this[t(395)],e),this[t(395)][t(450)]}[_(402)](e){const t=_,n=e[t(419)]();return n[t(461)](t(469))?n[t(443)](t(433))?n[t(440)](7,n[t(466)]-3):n[t(440)](7):e}}const T=O;function M(){const e=["_CONTENT","ck-hidden","extendTemplate","isVisible","set","ck-ai-form__toolbar","stopButton","_createButton","1859074PCupma","65768EQkARG","locale","AI_","mainAction","label","2hYwsQW","3432378QWLygC","102717VghwaA","addMany","replaceButton","234xFCSWq","542890ZmSJcw","toUpperCase","insert","Stop","items","tryAgainButton","bind","REPLACE","1457684AswvAj","replace","1418535WPjiYC","Try again","ck-button-action","insertButton","5BElOha","Insert below","bindTemplate"];return(M=function(){return e})()}function O(e,t){const n=M();return(O=function(e,t){return n[e-=113]})(e,t)}!function(e){const t=O,n=e();for(;;)try{if(363375===-parseInt(t(117))/1+-parseInt(t(115))/2*(parseInt(t(131))/3)+-parseInt(t(129))/4*(-parseInt(t(135))/5)+parseInt(t(116))/6+-parseInt(t(146))/7+parseInt(t(147))/8*(parseInt(t(120))/9)+parseInt(t(121))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(M);const N={REPLACE:T(130),INSERT:T(123)};class L extends s.ToolbarView{constructor(e){const t=T;super(e),this[t(142)](t(141),!1),this[t(142)](t(113),N[t(128)]),this[t(119)]=this[t(145)]("",t(133)),this[t(119)][t(127)](t(114)).to(this,t(113),n=>v(e,t(149)+n[t(122)]()+t(138))),this[t(134)]=this[t(145)](v(e,t(136))),this[t(126)]=this[t(145)](v(e,t(132))),this[t(144)]=this[t(145)](v(e,t(124)));const n=this[t(137)];this[t(140)]({attributes:{class:[t(143),n.if(t(141),t(139),e=>!e)]}}),this[t(125)][t(118)]([this[t(119)],this[t(134)],this[t(126)],this[t(144)]])}[T(145)](e,t){const n=T,r=new s.ButtonView(this[n(148)]);return r[n(142)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=F;function D(){const e=["text/plain","style","getSelection","33298ETjJDR","position","clipboard","isVisible","-9999px","execute","createRange","execCommand","ck-ai-form__copy-button-wrapper","smooth","7304479UgjgbJ","write","mousedown","bindTemplate","scrollTo","setEndBefore","24yRHNFl","ck-content","change:value","addRange","contentFieldView","locale","icon","appendLoader","remove","copy","wheel","body","301360fxwVqJ","createElement"," ck-ai-form__copy-button--copied","bind","31317QzQcvl","left","firstElementChild","lastElementChild",".ck-ai-form__loader","<span>]</span>","isProcessing","26665LQcrID","ck-ai-form__content-area--processing","ClipboardItem","Copy","28jfNlwR","ck-ai-form__content-area-wrapper","ck-ai-form__content-field","focus","change:isProcessing","textContent","copyButtonView","innerHTML","ck-ai-form__copy-button","loaderView","listenTo","setTemplate","ck-ai-form__content-area","text/html","absolute","32PKAwBm","setStartAfter","AI is writing...","scrollHeight","set","div","_copyHTMLToClipboard","ck-hidden","1978405fxbJeT","setContent","222IrQKjy","removeAllRanges","ck-reset_all-excluded","72xOhAoL","742496xSrMIl","appendChild","ck-ai-form__loader","isEnabled","_createCopyButton","class","_createLoader","22pShKjy","render","element","querySelector","<span>[</span>","value"];return(D=function(){return e})()}!function(e){const t=F,n=e();for(;;)try{if(223812===parseInt(t(267))/1*(-parseInt(t(258))/2)+parseInt(t(211))/3*(parseInt(t(237))/4)+-parseInt(t(218))/5*(-parseInt(t(247))/6)+-parseInt(t(222))/7*(parseInt(t(251))/8)+-parseInt(t(250))/9*(parseInt(t(207))/10)+parseInt(t(245))/11*(parseInt(t(283))/12)+parseInt(t(277))/13)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D);class U extends s.View{[$(199)];[$(228)];constructor(e,t=""){const n=$;super(e),this[n(241)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(280)];this[n(199)]=new B(e,t),this[n(228)]=this[n(255)](),this[n(233)]({tag:n(242),attributes:{class:["ck",n(223),r.if(n(270),n(244),e=>!e)],tabindex:"-1"},children:[{tag:n(242),attributes:{class:["ck",n(234),r.if(n(217),n(219))]},children:[this[n(199)],{tag:n(242),attributes:{class:["ck",n(275)]},children:[this[n(228)]]}]}]})}[$(259)](){const e=$;super[e(259)](),this[e(263)]&&this[e(199)][e(246)](this[e(263)]);let t=!1;this.on(e(197),(n,r,i)=>{const s=e,o=!this[s(199)][s(260)][s(261)](s(215));this[s(199)][s(246)](i),this[s(217)]&&o&&!t&&this[s(260)][s(281)]({top:this[s(260)][s(240)],behavior:s(276)})}),this.on(e(226),(n,r,i)=>{const s=e;t=!1,i?(this[s(263)]=null,this[s(199)][s(202)]()):this[s(263)]||this[s(199)][s(246)]("")}),this[e(232)](this[e(260)],e(205),()=>{t=!0}),this[e(232)](this[e(260)],e(279),()=>{t=!0})}[$(225)](){const e=$;this[e(260)][e(225)]()}[$(255)](){const e=$,n=this[e(200)],r=new s.ButtonView(this[e(200)]),i=e(230);return r[e(241)]({label:v(n,e(221)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(210)](e(270)).to(this,e(263),e=>!!e),r[e(210)](e(254)).to(this,e(217),e=>!e),r.on(e(272),()=>{const n=e;this[n(243)](this[n(199)][n(260)]),r[n(201)]=t.IconCheck,r[n(256)]=i+n(209),this[n(225)](),setTimeout(()=>{const e=n;r[e(201)]=t.IconCopy,r[e(256)]=i},1e3)}),r}[$(243)](e){const t=$,{window:n,document:r}=i.global;if(n[t(220)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(229)]],{type:t(235)}),"text/plain":new r([e[t(227)]||""],{type:t(264)})})];navigator[t(269)][t(278)](s)}else{const i=r[t(208)](t(242));i[t(265)][t(268)]=t(236),i[t(265)][t(212)]=t(271),i[t(229)]=t(262)+e[t(229)]+t(216),r[t(206)][t(252)](i);const s=r[t(273)]();s[t(238)](i[t(213)]),s[t(282)](i[t(214)]);const o=n[t(266)]();o[t(248)](),o[t(198)](s),r[t(274)](t(204)),i[t(203)]()}}}function F(e,t){const n=D();return(F=function(e,t){return n[e-=196]})(e,t)}class B extends s.View{constructor(e,t=""){const n=$;super(e),this[n(231)]=this[n(257)](),this[n(233)]({tag:n(242),attributes:{class:["ck",n(196),t,n(249),n(224)]}})}[$(246)](e){const t=$;this[t(260)][t(229)]=e}[$(202)](){const e=$;this[e(260)][e(252)](this[e(231)][e(260)])}[$(257)](){const e=$,t=new s.View,n=this[e(200)],r=new s.SpinnerView;return r[e(270)]=!0,t[e(233)]({tag:e(242),attributes:{class:["ck",e(253)]},children:[r,{text:v(n,e(239))}]}),t[e(259)](),t}}!function(e){const t=H,n=e();for(;;)try{if(831087===parseInt(t(405))/1*(-parseInt(t(410))/2)+-parseInt(t(398))/3*(-parseInt(t(409))/4)+-parseInt(t(404))/5*(-parseInt(t(407))/6)+-parseInt(t(399))/7+parseInt(t(400))/8+parseInt(t(406))/9+parseInt(t(401))/10*(-parseInt(t(415))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);class j extends s.View{constructor(e,n=""){const r=H;super(e);const i=new s.IconView,o=this[r(413)];this[r(408)](r(412),n),i[r(411)]=t.IconError,this[r(403)]({tag:r(414),attributes:{class:["ck",r(402)]},children:[i,{text:o.to(r(412))}]})}}function H(e,t){const n=q();return(H=function(e,t){return n[e-=398]})(e,t)}function q(){const e=["74776ZmfiwP","content","text","bindTemplate","div","124718JKoyhh","3qkaZef","11551995idgvwD","10548400tsOTRR","130ljfrBW","ck-ai-form__error","setTemplate","5480xzdKnU","19zhhHvq","1457424BHobBK","2562epLuqe","set","5562640nuByuK"];return(q=function(){return e})()}const V=z;function z(e,t){const n=G();return(z=function(e,t){return n[e-=151]})(e,t)}function G(){const e=["isOn","children","submit","609420yayQyO","ck-ai-form__submit","focusableChildren","rtl","render","fire","minRows","window","_createSubmitButton","focusCycler","element","isEmpty","67189WnVyWL","submitButtonView","execute","showHistoryButtonView","fieldWrapperChildren","locale","2916738myyimV","left","keystrokes","6ljHJvw","enter","ck-ai-form__toggle-history","isEnabled","uiLanguageDirection","fieldView","queryView","requestAnimationFrame","27060uBpDce","value","add","filteredView","focusLast","style","History","focus","target","1619288MqBPJj","isVisible","bind","resultsView","13413ZWAvFb","maxRows","set","1136420QrhAqO","excludeScrollbarsAndBorders","Submit","right","300ETngRb","focusFirst","update","_createShowHistoryButton","width"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(175990===-parseInt(t(153))/1*(-parseInt(t(162))/2)+-parseInt(t(183))/3+parseInt(t(186))/4+parseInt(t(190))/5*(-parseInt(t(170))/6)+parseInt(t(198))/7+parseInt(t(179))/8+-parseInt(t(159))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(154)];[V(156)];constructor(e,t){const n=V;super(e,t),this[n(168)][n(167)][n(204)]=1,this[n(168)][n(167)][n(184)]=3,this[n(154)]=this[n(206)](),this[n(156)]=this[n(193)](),this[n(200)][n(172)](this[n(156)],1),this[n(200)][n(172)](this[n(154)])}[V(202)](){const e=V;super[e(202)](),this[e(168)][e(157)][e(172)](this[e(156)]),this[e(196)][e(172)](this[e(154)]),this[e(161)][e(185)](e(163),(t,n)=>{const r=e;t[r(178)]==this[r(168)][r(167)][r(151)]&&(this[r(197)](),n())})}[V(206)](){const e=V,n=new s.ButtonView(this[e(158)]),r=this[e(158)];return n[e(185)]({icon:t.IconSubmit,label:v(r,e(188)),isVisible:!0,tooltip:!0,class:e(199)}),n.on(e(155),()=>{this[e(197)]()}),n[e(181)](e(165)).to(this[e(168)][e(167)],e(152),this,e(165),(e,t)=>!e&&t),n}[V(193)](){const e=V,n=new s.ButtonView(this[e(158)]),r=this[e(182)],o=this[e(158)];n[e(185)]({label:v(o,e(176)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(164)}),n[e(181)](e(195)).to(r,e(180)),n[e(181)](e(165)).to(this,e(165)),n.on(e(155),()=>{const t=e;r[t(180)]=!r[t(180)],r[t(180)]?this[t(173)][t(177)]():this[t(177)]()});const a=()=>{const t=e;i.global[t(205)][t(169)](()=>{const e=t;if((0,i.isVisible)(this[e(151)])){const t=new i.Rect(this[e(168)][e(167)][e(151)]),r=t[e(194)],s=e(201)===o[e(166)]?e(160):e(189);t[e(187)](),n[e(151)][e(175)][s]=r-t[e(194)]+1+"px"}})};return this[e(168)][e(167)].on(e(192),a),this.on(e(202),a),n}[V(197)](){const e=V,t=this[e(168)][e(167)][e(151)][e(171)];this[e(203)](e(197),t)}[V(177)](e){const t=V;-1===e?this[t(207)][t(174)]():this[t(207)][t(191)]()}}const K=Q;function Q(e,t){const n=J();return(Q=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(325705===parseInt(t(468))/1+-parseInt(t(465))/2*(-parseInt(t(461))/3)+-parseInt(t(466))/4*(-parseInt(t(458))/5)+parseInt(t(447))/6+-parseInt(t(459))/7+-parseInt(t(455))/8*(-parseInt(t(454))/9)+parseInt(t(467))/10*(-parseInt(t(449))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Y extends s.ListView{[K(457)];[K(445)];constructor(e){const t=K;super(e),this[t(445)]=this[t(462)](),this[t(457)]=new s.ListItemGroupView,this[t(457)][t(452)][t(446)](this[t(445)],1),this[t(457)][t(464)]=v(e,t(443)),this[t(457)][t(450)][t(444)](t(463)).to(this),this[t(450)][t(446)](this[t(457)])}[K(451)](){const e=K;let t=0;for(const n of this[e(450)])t+=n[e(450)][e(453)];return{resultsCount:t,totalItemsCount:t}}[K(462)](){const e=K,t=this[e(442)],n=new s.ButtonView(this[e(442)]);return n[e(448)]({label:"("+v(t,e(460))+")",withText:!0}),n.on(e(463),()=>this[e(469)](e(456))),n}}function J(){const e=["22XveWol","items","filter","children","length","36NvDHbo","77432mmPLZh","clearHistory","historyGroupView","2150665iYsOso","3253369jxTDoT","Clear","745407TRukMC","_createClearHistoryButton","execute","label","2nvqbYM","4cFfBjz","3737050gXuUaY","312698lwlUEp","fire","locale","Prompt history","delegate","clearHistoryButton","add","3047196lrjgFO","set"];return(J=function(){return e})()}const Z={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function X(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(X).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Z[e]||"'")}(X(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=294]})(e,t)}function ne(){const e=["children","229cYAQaA","7233608wpTIfl","13458960lGkCqp","fire","set","add","execute","367056tepite","prompt","9mnVpfz","locale","374dQLyhA","6hodclr","3896496tiltYt","9464700jluDMv","6429500TitENQ"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(934006===-parseInt(t(308))/1*(parseInt(t(302))/2)+-parseInt(t(304))/3+parseInt(t(298))/4+parseInt(t(306))/5+-parseInt(t(303))/6*(parseInt(t(305))/7)+parseInt(t(309))/8*(parseInt(t(300))/9)+parseInt(t(310))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(301)],n);this[t(307)][t(296)](r),r[t(295)]({label:e[t(299)],withText:!0}),r.on(t(297),()=>{const n=t;this[n(294)](n(297),{value:ee(e[n(299)])})})}}const ie=ce;!function(e){const t=ce,n=e();for(;;)try{if(377267===-parseInt(t(349))/1+-parseInt(t(370))/2*(parseInt(t(358))/3)+parseInt(t(367))/4+-parseInt(t(361))/5+parseInt(t(357))/6+-parseInt(t(359))/7+parseInt(t(366))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oe);const se=ie(348);function oe(){const e=["prompt","parse","getItem","_loadFromSessionStorage","trim","492054ueLwwU","39aUgOXj","3502058lLzhKC","add","191290UxRDEc","_saveToSessionStorage","setItem","stringify","map","11279160nrMPEG","2482556MCfpIt","last","remove","101240VfGXYz","length","CKEditor/AIFormView/PromptHistory","538664sjouBQ","toLowerCase","addMany"];return(oe=function(){return e})()}class ae extends i.Collection{constructor(){const e=ie;super(),this[e(355)](),this.on(e(360),(t,n)=>{const r=e,i=ue(n[r(352)]);for(const e of this)if(e!=n&&ue(e[r(352)])===i){this[r(369)](e);break}this[r(371)]>20&&this[r(369)](this[r(368)]),this[r(362)]()}),this.on(e(369),()=>{this[e(362)]()})}[ie(355)](){const e=ie,t=sessionStorage[e(354)](se)||"[]";this[e(351)](JSON[e(353)](t))}[ie(362)](){const e=ie;sessionStorage[e(363)](se,JSON[e(364)](this[e(365)](e=>e)))}}function ce(e,t){const n=oe();return(ce=function(e,t){return n[e-=348]})(e,t)}function ue(e){const t=ie;return e[t(350)]()[t(356)]()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return X(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["ck-hidden","prompt","isEnabled","clearHistory","fieldView","reset","clear","isVisible","Ask AI to improve generated text","12478304UuCSZq","execute","listenTo","items","tryAgainButton","insertContentBelow","value","_createToolbar","6cyRXJB","add","ck-ai-form-content","7269344yDvevh","element","stopButton","set","118296RTOAOc","toolbar","tab","insertButton","div","focusCycler","text","950bjegVE","bindTemplate","focusFirst","render","createCollection","startProcessing","bindTo","stopProcessing","queryView","shift + tab","focus","AI_ERROR_FAILED","replaceContent","submitPrompt","isError","Empty history","promptView","search","_createHistoryView","errorView","focusTracker","tryAgainEvent","keystrokes","label","focusLast","handleError","_promptHistory","copyButtonView","fire","delegate","contentArea","REPLACE","trim","isProcessing","bind","submit","mainAction","4888599kqfWWU","replaceButton","1832896vyFIss","7HPpHKo","high","5326190pnOOiL","historyGroupView","Ask AI to edit or generate","finishProcessing","setTemplate","locale","_createPromptView","_focusables","chain","186376MhyvEt","ck-ai-form","Ask AI and your prompts will be listed here for you to use later."];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=304]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(973567===parseInt(t(339))/1+-parseInt(t(327))/2+parseInt(t(325))/3+parseInt(t(362))/4+-parseInt(t(330))/5*(-parseInt(t(359))/6)+-parseInt(t(328))/7*(parseInt(t(351))/8)+-parseInt(t(366))/9*(parseInt(t(373))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(308)];[he(310)];[he(318)];[he(367)];[he(304)];[he(307)];[he(337)];[he(371)];[he(314)];constructor(e,t,n=""){const r=he;super(e),this[r(365)](r(344),!0),this[r(365)](r(321),!1),this[r(365)](r(343),""),this[r(365)](r(357),""),this[r(365)](r(387),!1),this[r(365)](r(324),N[r(319)]),this[r(314)]=new ae,this[r(307)]=new j(e),this[r(318)]=new U(e,n),this[r(318)][r(322)](r(321)).to(this),this[r(318)][r(322)](r(357)).to(this),this[r(367)]=this[r(358)](),this[r(367)][r(322)](r(324)).to(this),this[r(304)]=this[r(336)](),this[r(308)]=new i.FocusTracker,this[r(310)]=new i.KeystrokeHandler,this[r(337)]=this[r(377)]([this[r(318)],this[r(318)][r(315)],this[r(367)],this[r(304)]]),this[r(371)]=new s.FocusCycler({focusables:this[r(337)],focusTracker:this[r(308)],keystrokeHandler:this[r(310)],actions:{focusPrevious:r(382),focusNext:r(368)}}),this[r(371)][r(338)](this[r(304)][r(371)]),this[r(304)][r(381)][r(346)][r(322)](r(357)).to(this,r(343));const o=this[r(374)];this[r(334)]({tag:r(370),attributes:{class:["ck",r(340),t],tabindex:"-1"},children:[{tag:r(370),attributes:{class:["ck",r(361)]},children:[{tag:r(370),attributes:{class:[o.if(r(387),r(342),e=>!e)]},children:[this[r(307)]]},this[r(318)],this[r(367)],this[r(304)]]}]})}[he(376)](){const e=he;super[e(376)](),this[e(308)][e(360)](this[e(318)][e(363)]),this[e(308)][e(360)](this[e(318)][e(315)][e(363)]),this[e(308)][e(360)](this[e(367)][e(363)]),this[e(308)][e(360)](this[e(304)][e(363)]),this[e(310)][e(353)](this[e(363)])}[he(383)](e=1){const t=he;-1===e?this[t(371)][t(312)]():this[t(371)][t(375)]()}[he(347)](){const e=he;this[e(343)]="",this[e(357)]="",this[e(387)]=!1,this[e(304)][e(347)](),this[e(318)][e(349)]=!1,this[e(367)][e(349)]=!1}[he(336)](){const e=he,t=this[e(335)],n=new W(t,{queryView:{label:v(t,e(332)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(388)),secondary:v(t,e(341))}}},filteredView:this[e(306)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(322)](e(344)).to(this,e(344),this,e(321),(e,t)=>e&&!t),this[e(353)](n,e(323),(t,n)=>{const r=e;this[r(343)]=n;const i=le(n);this[r(316)](r(386),i),n[r(320)]()&&this[r(314)][r(360)]({prompt:i},0)},{priority:e(329)}),n}[he(306)](){const e=he,t=new Y(this[e(335)]);return t[e(331)][e(354)][e(379)](this[e(314)]).as(re),t.on(e(345),()=>{const t=e;this[t(314)][t(348)](),this[t(304)][t(305)](""),this[t(304)][t(383)]()}),t}[he(358)](){const e=he,t=new L(this[e(335)]);return t[e(326)][e(322)](e(344)).to(this,e(344),this,e(321),this,e(357),(e,t,n)=>e&&!t&&!!n),t[e(326)][e(317)](e(352)).to(this,e(385)),t[e(369)][e(322)](e(344)).to(this,e(344),this,e(321),this,e(357),(e,t,n)=>e&&!t&&!!n),t[e(369)][e(317)](e(352)).to(this,e(356)),t[e(355)][e(322)](e(344)).to(this,e(344),this,e(321),(e,t)=>e&&!t),t[e(355)][e(317)](e(352)).to(this,e(309)),t[e(364)][e(322)](e(344)).to(this,e(321)),t[e(364)][e(317)](e(352)).to(this,e(380)),t}[he(378)](){const e=he;this[e(357)]="",this[e(387)]=!1,this[e(321)]=!0,this[e(318)][e(349)]=!0,this[e(367)][e(349)]=!0,this[e(318)][e(383)]()}[he(333)](){const e=he,t=this[e(335)];this[e(321)]=!1,this[e(343)]="",this[e(304)][e(347)](),this[e(357)]&&(this[e(304)][e(381)][e(311)]=v(t,e(350)))}[he(313)](e){const t=he,n=this[t(335)];this[t(333)](),this[t(387)]=!0,this[t(307)][t(372)]=e||v(n,t(384)),this[t(357)]||(this[t(318)][t(349)]=!1)}}var ge=n(673),ye=n.n(ge),be=n(545),we=n.n(be),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=we(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ee(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=we(),Pe.insertStyleElement=Ie();ye()(Re.A,Pe);Re.A&&Re.A.locals&&Re.A.locals;var Ce=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ee(),Te.insert=ke().bind(null,"head"),Te.domAPI=we(),Te.insertStyleElement=Ie();ye()(Ce.A,Te);Ce.A&&Ce.A.locals&&Ce.A.locals;const Me=Oe;function Oe(e,t){const n=Ne();return(Oe=function(e,t){return n[e-=134]})(e,t)}function Ne(){const e=["groupId","1897165kYrGcJ","isCollapsed","isEnabled","model","from","command:","sort","includes","333936NPXHCx","values","selection","trim","showFakeVisualSelection","contentArea","_forceMarkersCopy","_commandDefinitions","_getMenuBarGroupButtons","insertContent","change:isError","buttonView","ck-ai-assistant-button ","custom","groupLabel","bind","aiAssistant","init","_initView","AIAssistantUI","wasMoved","order","invalid","editor","_populateMenuBarMenu","aiLicenseKeyUsageLimit","domainLimit","change","hide","950DDoIPf","isOfficialPlugin","429NqNSes","updateView","fieldView","comment","getSelectedElement","105292zUnJAk","aiLicenseKeyInvalid","licenseKey","filter","getSelectedBlocks","requiresContent","forEach","length","57695tRoyUW","hideFakeVisualSelection","insertContentBelow","_initAriaAiStatusChangeAnnouncements","label","AI is writing","push","body","EDITOR_TOP_SIDE","prompt","</p>","render","menuView","announce","change:isProcessing","queryView","_getResolvedCommandsDefinitions","menuitemcheckbox","updatePosition","children","ai.aiAssistant.disabledElements","AI Commands","112MXxSHJ","media","usageLimit","fire","showUI","AI Assistant","currentContext","_aiAdapter","getRanges","hideUI","83941RqnNKJ","plugins","update","isPremiumPlugin","textAdapter","listenTo","333AjXEOw","trialLimit","config","ck-ai-commands-dropdown ","items","componentFactory","menuBar:aiAssistant","INSERT","aiCommands","change:enabledCommandsIds","_onExecute","delegate","define","polite","copy","ai-commands-config-order-collision","Error during AI content generation: %0","add","buttons","showAIAssistant","reset","ck-ai-assistant-ui","panelView","schema","execute","<p>","focus","commands","document","ai.useTheme","aiLicenseKeyNotAllowed","menuPanelClass","featureNotAllowed","20YFuHoA","splice","map","locale","show","_formView","isOn","text","_aiAssistantController","tableOfContents","REPLACE","isFlat","aiLicenseKeyValid","rawHtml","16076pUptDL","enabledCommandsIds","set","aiLicenseKeyTrialLimit","3516udDlpy","change:value","addMany","DataTransfer","menuBar:aiCommands","text/html","replace","getLimitElement","get","destroy","Generated content: %0","view","aiLicenseKeyDomainLimit","AIAssistant","source","19112WCKQYD","getData","evaluationLimit","_licenseKeyCheckInterval","_dialog","_createAIAssistantUIButton","pluginName","replaceContent","setSelection","aiLicenseKeyExpired","editing","ai.aiAssistant.contentAreaCssClass","requires","_showLicenseError","once","_uiCssClasses","errorView","ai.aiAssistant.commands"," ck-ai-assistant-ui_theme","expired","promptView","aiLicenseKeyEvaluationLimit"];return(Ne=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(730437===parseInt(t(201))/1*(-parseInt(t(301))/2)+parseInt(t(296))/3*(parseInt(t(215))/4)+-parseInt(t(257))/5+parseInt(t(265))/6*(-parseInt(t(152))/7)+parseInt(t(234))/8*(parseInt(t(168))/9)+-parseInt(t(294))/10*(-parseInt(t(309))/11)+-parseInt(t(219))/12*(-parseInt(t(162))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ne);const Le=globalThis[Me(222)];class $e extends e.Plugin{[Me(303)];[Me(237)];[Me(238)];[Me(206)];[Me(159)];[Me(209)];[Me(249)]="";static get[Me(240)](){return Me(284)}static get[Me(295)](){return!0}static get[Me(165)](){return!0}static get[Me(246)](){return[a.ClipboardMarkersUtils,p,b,s.Dialog]}constructor(e){const t=Me;super(e),e[t(170)][t(180)](t(150),[t(153),t(214),t(210)]),e[t(170)][t(180)](t(245),""),e[t(170)][t(180)](t(197),!0),this[t(249)]=t(189)+(e[t(170)][t(227)](t(197))?t(252):"")}[Me(282)](){const e=Me,{editor:n}=this;this[e(159)]=n[e(163)][e(227)](b),this[e(238)]=n[e(163)][e(227)](s.Dialog),this[e(206)]=null,this[e(272)]=this[e(146)]();const r=new A(n,Array[e(261)](this[e(272)][e(266)]()));n[e(195)][e(185)](e(187),r),n.ui[e(173)][e(185)](e(176),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(217)]({class:a(171)+this[a(249)]}),c[a(276)][a(217)]({label:v(i,a(151)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(192),e=>this[a(178)](e[a(233)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(230)][a(137)],function(e){const t=a,n=o(e[t(170)][t(227)](t(251)),e[t(204)]),r=Ue(e,n)[t(304)](e=>e[t(195)][t(308)]);return 1===r[t(308)]?Ue(e,r[0][t(195)])[t(203)](e=>({id:e.id,label:e[t(134)]})):r[t(203)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(203)](e=>({id:e.id,label:e[r(134)]}))}})}(n),{ariaLabel:v(i,a(151))}),c[a(142)][a(199)]=a(171)+this[a(249)],r.on(a(177),u),c[a(142)][a(248)](a(141),u),c;function u(){const e=a;c[e(259)]=r[e(216)][e(308)]>0;for(const t of c[e(142)][e(186)])t[e(259)]=r[e(216)][e(264)](t.id)}}),n.ui[e(173)][e(185)](e(223),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(276)][a(217)]({label:v(i,a(151)),icon:t.IconMagicWand}),c[a(280)](a(259)).to(r,a(216),e=>e[a(308)]>0);const u=o(n[a(170)][a(227)](a(251)),i);return this[a(289)](r,c,u,e=>this[a(178)](e)),c}),n.ui[e(173)][e(185)](e(281),()=>{const t=e,n=this[t(239)](s.ButtonView);return n[t(217)]({tooltip:!0,class:t(277)+this[t(249)]}),n}),n.ui[e(173)][e(185)](e(174),()=>{const t=e,n=this[t(239)](s.MenuBarMenuListItemButtonView);return n[t(217)]({role:t(147)}),n}),this[e(303)]=this[e(288)][e(170)][e(227)](e(303));const i=this[e(288)];this[e(237)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(213)==s||t(302)==s||t(243)==s||t(231)==s||t(198)==s||t(255)==s||t(218)==s||t(290)==s){delete i[r],n=s,clearInterval(this[t(237)]),this[t(237)]=void 0;break}}t(302)==n&&i[t(247)](t(287)),t(243)==n&&i[t(247)](t(253)),t(231)==n&&i[t(247)](t(291)),t(198)==n&&i[t(247)](t(200),t(232)),t(255)==n&&i[t(247)](t(236)),t(218)==n&&i[t(247)](t(169)),t(290)==n&&i[t(247)](t(154))},1e3)}[Me(228)](){const e=Me;super[e(228)](),this[e(237)]&&clearInterval(this[e(237)])}[Me(156)](e="",n="",r=Me(278)){const i=Me,o=this[i(288)],u=o[i(244)][i(230)],d=o[i(163)][i(227)](p),l=o[i(163)][i(227)](a.ClipboardMarkersUtils);d[i(269)]();const h=new Le,f=new ClipboardEvent(i(182),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(271)](i(299),()=>{const e=i;u[e(196)][e(155)](e(182),g)}),this[i(206)]||(this[i(283)](),this[i(209)]=new C(o,this[i(159)][i(166)],this[i(206)]));let y=m[i(235)](i(224));const b=o[i(260)][i(196)][i(267)],w=Array[i(261)](b[i(160)]());1===w[i(308)]&&w[0][i(212)]&&!b[i(300)]()&&""!==y[i(225)](/&nbsp;/g,"")[i(268)]()&&(y=i(193)+y+i(140)),this[i(209)][i(297)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:N[o[i(260)][i(196)][i(267)][i(258)]?i(175):i(211)]}),i(281)!==this[i(238)].id?this[i(238)][i(205)]({id:i(281),icon:t.IconRobotPencil,title:v(this[i(288)][i(204)],i(157)),content:this[i(206)],position:s.DialogViewPosition[i(138)],onShow:()=>{const e=i;this[e(206)][e(194)]()},onHide:()=>{const e=i;this[e(209)][e(188)](),d[e(310)]()}}):this[i(238)][i(230)][i(285)]||this[i(238)][i(230)][i(148)]()}[Me(161)](){const e=Me;this[e(238)][e(293)]()}[Me(146)](){const e=Me,t=new Map,n=o(this[e(288)][e(170)][e(227)](e(251)),this[e(288)][e(204)]);for(const r of n)for(const n of r[e(195)])t[e(217)](n.id,{...n,groupId:r[e(256)],groupLabel:r[e(279)]||r[e(256)]});return t}[Me(239)](e){const n=Me,r=this[n(288)],i=r[n(195)][n(227)](n(187)),s=new e(r[n(204)]);return s[n(217)]({label:v(r[n(204)],n(157)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(280)](n(259)).to(i),s[n(280)](n(207)).to(this[n(238)],"id",e=>n(281)===e),this[n(167)](s,n(192),()=>{const e=n;s[e(207)]?this[e(161)]():i[e(192)]()}),s}[Me(283)](){const e=Me,t=this[e(288)][e(163)][e(227)](p);this[e(206)]=new me(this[e(288)][e(204)],this[e(249)],this[e(288)][e(170)][e(227)](e(245))),this[e(206)].on(e(220),()=>{const t=e;this[t(238)][t(230)][t(285)]||this[t(238)][t(230)][t(148)]()}),this[e(206)][e(254)][e(145)][e(298)].on(e(164),()=>{const t=e;this[t(238)][t(230)][t(285)]||this[t(238)][t(230)][t(148)]()}),this[e(167)](this[e(206)],e(241),()=>{const n=e;t[n(274)](this[n(209)][n(158)]),this[n(161)]()}),this[e(167)](this[e(206)],e(311),()=>{const n=e;t[n(311)](this[n(209)][n(158)]),this[n(161)]()}),this[e(312)]()}[Me(312)](){const e=Me,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(288)];this[e(206)][e(270)].on(e(144),(r,i,s)=>{const o=e,a=this[o(209)][o(158)];s?n[o(143)](v(t,o(135))):a&&n[o(143)](v(t,o(229),a),{politeness:o(181),isUnsafeHTML:!0})}),this[e(206)].on(e(275),(r,i,s)=>{const o=e;if(s){const e=this[o(206)][o(250)][o(208)];n[o(143)](v(t,o(184),e))}})}[Me(178)](e){const t=Me,n=this[t(272)][t(227)](e),r=this[t(288)],s=r[t(260)][t(196)][t(267)],o=r[t(195)][t(227)](t(187)),a=r[t(163)][t(227)](p),c=("_ungrouppedCommands"!==n[t(256)]?n[t(279)]+": ":"")+n[t(134)];if(!1!==n[t(306)]&&s[t(258)]){const e=(0,i.first)(s[t(305)]())||r[t(260)][t(191)][t(226)](s);r[t(260)][t(292)](n=>{n[t(242)](e,"in")})}a[t(269)](),o[t(192)](n[t(139)],c,t(262)+e)}[Me(289)](e,t,n,r){const i=Me,o=this[i(288)],a=o[i(204)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(304)](e=>e[i(195)][i(308)]);1===u[i(308)]?this[i(273)]({command:e,commands:u[0][i(195)],parentMenuView:t,onExecute:r})[i(307)](e=>c[i(172)][i(185)](e)):u[i(307)](({groupId:n,groupLabel:o,commands:u})=>{const d=i,l=new s.MenuBarMenuListItemView(a,t),h=new s.MenuBarMenuView(a),f=new s.MenuBarMenuListView(a),p=this[d(273)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(276)][d(217)]({label:o||n}),h[d(179)](d(192)).to(t),f[d(172)][d(221)](p),h[d(190)][d(149)][d(185)](f),l[d(149)][d(185)](h),c[d(172)][d(185)](l)}),t[i(190)][i(149)][i(185)](c)}[Me(273)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Me,o=this[i(288)],a=o[i(204)];return Ue(o,t)[i(203)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(217)]({label:t[o(134)]}),u[o(179)](o(192)).to(n),u.on(o(192),()=>r(t.id)),u[o(280)](o(259)).to(e,o(216),e=>e[o(264)](t.id)),c[o(149)][o(185)](u),c})}}function De(e,t){const n=Me;return void 0!==e[n(286)]&&void 0===t[n(286)]?1:void 0===e[n(286)]&&void 0!==t[n(286)]?-1:void 0!==e[n(286)]&&void 0!==t[n(286)]?e[n(286)]-t[n(286)]:0}function Ue(e,t){const n=Me;t[n(263)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(286)]){if(o[n(286)]in r)throw new i.CKEditorError(n(183),e,{conflictingDefinitions:[o,r[o[n(286)]]]});r[o[n(286)]]=o,s[n(202)](o[n(286)],0,o)}else s[n(136)](o);return s}const Fe=Be;function Be(e,t){const n=He();return(Be=function(e,t){return n[e-=236]})(e,t)}!function(e){const t=Be,n=e();for(;;)try{if(683110===parseInt(t(255))/1+-parseInt(t(279))/2+parseInt(t(262))/3*(parseInt(t(238))/4)+-parseInt(t(256))/5*(parseInt(t(289))/6)+parseInt(t(328))/7+-parseInt(t(239))/8+-parseInt(t(277))/9*(-parseInt(t(250))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(He);class je extends e.Plugin{static get[Fe(254)](){return[$e,p]}static get[Fe(325)](){return Fe(315)}static get[Fe(338)](){return!0}static get[Fe(267)](){return!0}constructor(e){const t=Fe;super(e);const n=e[t(266)],r=e[t(271)];n[t(312)](t(241),!0),n[t(312)](t(331),qe(r)),n[t(312)](t(268),[]),n[t(312)](t(247),[]);let i=o(n[t(243)](t(331)),r);const s=n[t(243)](t(268)),a=n[t(243)](t(247));s[t(322)](e=>{const n=t,r=i[n(344)](t=>t[n(317)]===e[n(317)]);r?r[n(286)]=r[n(286)][n(281)](e[n(286)]):i[n(260)](e)}),i=i[t(246)](e=>!a[t(276)](e[t(317)])),i[t(322)](e=>{const n=t;e[n(286)]=e[n(286)][n(246)](e=>!a[n(276)](e.id))}),n[t(258)](t(331),i)}}function He(){const e=["simplifyLanguage","Friendly","generate","Translate","119452CZBGWY","4587744srrALb","makeShorter","ai.aiAssistant.preserveComments","Business","get","Confident","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","filter","ai.aiAssistant.removeCommands","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Simplify language","3963230TnOgCU","Improve writing","business","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","requires","805469sOsUVR","5StsGma","legal","set","Improve using friendly, comforting language, to convey understanding and empathy.","push","French","30izuYkO","English","Portuguese","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","config","isPremiumPlugin","ai.aiAssistant.extraCommandGroups","translateEnglish","Arabic","locale","Rewrite this content as a legal professional using valid legal terminology.","Journalism","friendly","translateArabic","includes","36xoKfAD","improveWriting","1352748kwdTwh","German","concat","continue","Continue","Spanish","Legal","commands","Generate from selection","Rewrite this content as a business professional with formal language.","6789390xWlwVR","Make shorter","Translate the content to Portuguese language.","Edit or review","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Translate the content to Simplified Chinese language.","Change tone","Make longer","Translate the content to Spanish language.","Professional","Translate the content to German language.","makeLonger","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Translate the content to French language.","direct","professional","translateGerman","poetic","Poetic","translateHindi","Improve this content by using descriptive language and inserting more information and more detailed explanations.","translateSpanish","editOrReview","define","Translate the content to English language.","Direct","AIAssistant","Summarize","groupId","Change style","translatePortuguese","changeTone","changeStyle","forEach","translate","casual","pluginName","translateFrench","Casual","2625882IftePo","summarize","Simplified Chinese","ai.aiAssistant.commands","Improve using casual, informal language to convey a casual conversation with a real person.","Translate the content to Hindi language.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Hindi","Improve using direct language, using only the essential information.","confident","isOfficialPlugin","journalism","Improve using compelling, optimistic language to convey confidence in the writing.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Translate the content to Arabic language.","translateChinese","find"];return(He=function(){return e})()}function qe(e){const t=Fe;return[{groupId:t(311),groupLabel:v(e,t(292)),commands:[{id:t(278),label:v(e,t(251)),prompt:t(253)},{id:t(240),label:v(e,t(290)),prompt:t(334)},{id:t(300),label:v(e,t(296)),prompt:t(309)},{id:t(345),label:v(e,t(249)),prompt:t(248)}]},{groupId:t(236),groupLabel:v(e,t(287)),commands:[{id:t(329),label:v(e,t(316)),prompt:t(245)},{id:t(282),label:v(e,t(283)),prompt:t(265)}]},{groupId:t(320),groupLabel:v(e,t(295)),commands:[{id:t(304),label:v(e,t(298)),prompt:t(341)},{id:t(324),label:v(e,t(327)),prompt:t(332)},{id:t(303),label:v(e,t(314)),prompt:t(336)},{id:t(337),label:v(e,t(244)),prompt:t(340)},{id:t(274),label:v(e,t(346)),prompt:t(259)}]},{groupId:t(321),groupLabel:v(e,t(318)),commands:[{id:t(252),label:v(e,t(242)),prompt:t(288)},{id:t(257),label:v(e,t(285)),prompt:t(272)},{id:t(339),label:v(e,t(273)),prompt:t(293)},{id:t(306),label:v(e,t(307)),prompt:t(301)}]},{groupId:t(323),groupLabel:v(e,t(237)),commands:[{id:t(269),label:v(e,t(263)),prompt:t(313)},{id:t(310),label:v(e,t(284)),prompt:t(297)},{id:t(319),label:v(e,t(264)),prompt:t(291)},{id:t(305),label:v(e,t(280)),prompt:t(299)},{id:t(326),label:v(e,t(261)),prompt:t(302)},{id:t(343),label:v(e,t(330)),prompt:t(294)},{id:t(308),label:v(e,t(335)),prompt:t(333)},{id:t(275),label:v(e,t(270)),prompt:t(342)}]}]}const Ve=ze;function ze(e,t){const n=Ge();return(ze=function(e,t){return n[e-=279]})(e,t)}function Ge(){const e=["editor","resolve","aitextadapter-send-request-failed","application/json","sendRequest","91uKzyhc","assign","catch","reject","requires","aborted","init","AI_ERROR_GET_PARAMETERS","2141975aGQOlU","AbortError","object","9bRRiCi","abortController","abort","locale","_prepareRequestParameters","1185116pVASgv","9572iDapQc","619416IAgWtu","signal","18dfdVum","get","91932oTMBCE","makeRequest","plugins","1491YzjVCd","AI_ERROR_GET_HEADERS","21147830ncOzWK","7382190dPanvc","_prepareRequestHeaders","error","name","textAdapter"];return(Ge=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(692168===parseInt(t(316))/1+-parseInt(t(310))/2+-parseInt(t(281))/3*(parseInt(t(311))/4)+parseInt(t(302))/5*(-parseInt(t(314))/6)+-parseInt(t(294))/7*(-parseInt(t(312))/8)+parseInt(t(305))/9*(parseInt(t(284))/10)+parseInt(t(283))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[Ve(306)];static get[Ve(298)](){return[b]}constructor(e){const t=Ve;super(e),this[t(306)]=new AbortController}[Ve(300)](){const e=Ve;this[e(289)][e(280)][e(315)](b)[e(288)]=this}[Ve(307)](){const e=Ve;this[e(306)][e(313)][e(299)]||(this[e(306)][e(307)](),this[e(306)]=new AbortController)}async[Ve(279)](e){const t=Ve;return this[t(293)](e)[t(296)](e=>{const n=t;if(e instanceof w)return Promise[n(297)](e);if(n(303)==e[n(287)])return Promise[n(290)]();throw console[n(286)](e),new i.CKEditorError(n(291),null)})}async[Ve(285)](e,t){const n=Ve,r=this[n(289)][n(308)],i={"Content-Type":n(292)};if(n(304)==typeof e)Object[n(295)](i,e);else if(e)try{const r=await e(t);Object[n(295)](i,r)}catch{return Promise[n(297)](new w(v(r,n(282))))}return i}async[Ve(309)](e,t){const n=Ve,r=this[n(289)][n(308)];if(n(304)==typeof e)return e;try{return await e(t)}catch{return Promise[n(297)](new w(v(r,n(301))))}}}const Ke=Qe;function Qe(e,t){const n=Ye();return(Qe=function(e,t){return n[e-=355]})(e,t)}function Ye(){const e=["_isBufferIncomplete","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","AI_ERROR_CONTEXT_LENGTH","84QfAAHR","define","107895pMmpRK","json","10Qgqqyb","read","get","13245656urWSZZ","text","gpt-4o","content","6906vOqtCn","https://api.openai.com/v1/chat/completions","229044pCxPsk","_readStaticResponse","abortController","pluginName","split","_readStreamableResponse","ai.openAI.requestParameters","stringify","_cleanUpData","decode","join","config","Instruction:\n","parse","\nYou must keep the text formatting.\n\nContent:\n","body","signal","721070LnDWIa","_requestParameters","user","POST","getReader","length","sendRequest","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","[DONE]","_prepareRequestParameters","_requestHeaders","delta","replace","context_length_exceeded","editor","filter","AI_ERROR_MODERATION","system","locale","stream","map","message","ai.openAI.requestHeaders","5137470NTJopF","OpenAITextAdapter","8340327wuQhjx","includes","_apiUrl","data: ","choices","reject","Moderation","_prepareRequestHeaders","prepareMessages","ai.openAI.apiUrl","10577tyAPVA","resolve"];return(Ye=function(){return e})()}!function(e){const t=Qe,n=e();for(;;)try{if(892095===parseInt(t(401))/1+parseInt(t(418))/2+-parseInt(t(371))/3+-parseInt(t(388))/4*(parseInt(t(390))/5)+-parseInt(t(399))/6*(-parseInt(t(383))/7)+parseInt(t(395))/8+-parseInt(t(373))/9*(parseInt(t(392))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ye);class Je extends We{[Ke(375)];[Ke(358)];[Ke(419)];static get[Ke(404)](){return Ke(372)}constructor(e){const t=Ke;super(e),e[t(412)][t(389)](t(382),t(400)),e[t(412)][t(394)](t(407))||e[t(412)][t(389)](t(407),{model:t(397),temperature:1,top_p:1,stream:!0}),this[t(375)]=e[t(412)][t(394)](t(382)),this[t(358)]=e[t(412)][t(394)](t(370))||{},this[t(419)]=e[t(412)][t(394)](t(407))}async[Ke(424)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(362)][i(366)],o=await this[i(381)](e,t,r),a=await this[i(380)](this[i(358)],r),c=await this[i(357)](this[i(419)],r),u={messages:o,...c},d={method:i(421),headers:a,body:JSON[i(408)](u),signal:this[i(403)][i(417)]},l=await fetch(this[i(375)],d);if(l.ok)return c[i(367)]?await this[i(406)](l,n):await this[i(402)](l,n),Promise[i(384)]();{const e=await l[i(396)]();return e[i(374)](i(361))?Promise[i(378)](new w(v(s,i(387)))):e[i(374)](i(379))?Promise[i(378)](new w(v(s,i(364)))):Promise[i(378)](new Error(e))}}async[Ke(381)](e,t,n){const r=Ke;let i,s;return t?(i=r(355),s=r(413)+e+r(415)+t):(i=r(386),s=e),[{role:r(365),content:i},{role:r(420),content:s}]}async[Ke(406)](e,t){const n=Ke,r=e[n(416)][n(422)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(393)](),d=s+i[n(410)](u);let l="";c=e;try{l=this[n(409)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(385)](o)||o&&(a+=o,o="",t(a))}return Promise[n(384)]()}async[Ke(402)](e,t){const n=Ke;return t((await e[n(391)]())[n(377)][0][n(369)][n(398)]),Promise[n(384)]()}[Ke(385)](e){const t=Ke,n=e[t(405)]("<")[t(423)]!==e[t(405)](">")[t(423)],r=e[t(423)]<30;return n&&r}[Ke(409)](e){const t=Ke;return e[t(405)](/\n(?![^{]*\})/g)[t(368)](e=>e[t(360)](t(376),""))[t(363)](e=>e&&e[t(423)]>0&&t(356)!==e)[t(368)](e=>{const n=t,{choices:r}=JSON[n(414)](e);if(r[0]?.[n(359)]?.[n(398)])return r[0][n(359)][n(398)]})[t(363)](e=>e)[t(411)]("")}}var Ze,Xe,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,st;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(st||(st={}));class ot{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new ot({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return ot.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!ot.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!ot.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[lt]=o),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),bt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!bt(e))return!1;return!0},wt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:bt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Et(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):It[e](...r)},Pt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Ct=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Pt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Mt(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Nt=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},Lt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Ct(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,o)},...null!=c&&{properties:Ot(c,o)},url:Nt(a,o)}},$t=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Ct(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Dt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Ct(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Lt(n,t);if(e)return e}else if("error"===n.type)$t(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=Dt(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Ft=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ft(t))return!1;return!0}return!!bt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Bt=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Ft,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Bt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}wt.aws=Ht;const Vt=/\d{12}\.ddb/;const zt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Qt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Yt)||[],a=(await e.defaultUserAgentProvider()).map(Yt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Vt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Yt)||[],d=await e.userAgentAppId();d&&a.push(Yt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Gt]=s[Gt]?`${s[zt]} ${h}`:h),s[zt]=l):s[Gt]=l,t({...r,request:i})},Yt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Jt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Zt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Zt||(Zt={}));const Xt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Xt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},sn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class on{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Xt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||an)(i));return(o.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),bn=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},wn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await wn(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),bn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Xt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),xn)}}}const Pn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Cn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Pn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Mn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Nn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Ln=[500,502,503,504],$n=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Dn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Fn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Nn.includes(e.name)||$n.includes(e?.code||"")||Dn.includes(e?.code||"")||Ln.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Fn(e.cause,t+1);class Bn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Bn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Bn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",Vn="amz-sdk-request",zn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return zn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,zn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Bn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qn;const Yn=new Uint8Array(16);function Jn(){if(!Qn&&(Qn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qn(Yn)}const Zn=[];for(let e=0;e<256;++e)Zn.push((e+256).toString(16).slice(1));function Xn(e,t=0){return Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Jn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Xn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>sr[t.step]-sr[e.step]||or[t.priority||"normal"]-or[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=nr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},sr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},or={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function br(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const wr={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===wr.supported&&(wr.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),wr.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),br(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)},xr=e=>"function"==typeof e?e():e;class Rr{constructor(e,t){this.name=e,this.traits=t}}class Pr extends Rr{constructor(e,t,n){super(e,t),this.name=e,this.traits=t,this.valueSchema=n,this.symbol=Pr.symbol}static[Symbol.hasInstance](e){const t=Pr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Pr.symbol}return t}}Pr.symbol=Symbol.for("@smithy/core/schema::ListSchema");class Cr extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.keySchema=n,this.valueSchema=r,this.symbol=Cr.symbol}static[Symbol.hasInstance](e){const t=Cr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Cr.symbol}return t}}Cr.symbol=Symbol.for("@smithy/core/schema::MapSchema");const Tr={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class Mr extends Rr{constructor(e,t,n){super(e,n),this.name=e,this.schemaRef=t,this.traits=n,this.symbol=Mr.symbol}static[Symbol.hasInstance](e){const t=Mr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Mr.symbol}return t}}Mr.symbol=Symbol.for("@smithy/core/schema::SimpleSchema");class Or extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.memberNames=n,this.memberList=r,this.symbol=Or.symbol,this.members={};for(let e=0;e<n.length;++e)this.members[n[e]]=Array.isArray(r[e])?r[e]:[r[e],0]}static[Symbol.hasInstance](e){const t=Or.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Or.symbol}return t}}Or.symbol=Symbol.for("@smithy/core/schema::StructureSchema");class Nr{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Nr.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=xr(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,Nr.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Nr)return this.name=i.name,this.traits=i.traits,this._isMemberSchema=i._isMemberSchema,this.schema=i.schema,this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.ref=i.ref,void(this.memberName=t??i.memberName);if(this.schema=xr(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=("object"==typeof this.schema?this.schema?.name:void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(!0)} must initialize with memberName argument.`)}static[Symbol.hasInstance](e){const t=Nr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Nr.symbol}return t}static of(e,t){return e instanceof Nr?e:new Nr(e,t)}static translateTraits(e){if("object"==typeof e)return e;const t={};return 1&~(e|=0)||(t.httpLabel=1),1==(e>>1&1)&&(t.idempotent=1),1==(e>>2&1)&&(t.idempotencyToken=1),1==(e>>3&1)&&(t.sensitive=1),1==(e>>4&1)&&(t.httpPayload=1),1==(e>>5&1)&&(t.httpResponseCode=1),1==(e>>6&1)&&(t.httpQueryParams=1),t}static memberFrom(e,t){return e instanceof Nr?(e.memberName=t,e._isMemberSchema=!0,e):new Nr(e,t)}getSchema(){return this.schema instanceof Nr?this.schema=this.schema.getSchema():this.schema instanceof Mr?xr(this.schema.schemaRef):xr(this.schema)}getName(e=!1){return!e&&this.name&&this.name.includes("#")?this.name.split("#")[1]:this.name||void 0}getMemberName(){if(!this.isMemberSchema())throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(!0)}`);return this.memberName}isMemberSchema(){return this._isMemberSchema}isUnitSchema(){return"unit"===this.getSchema()}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=Tr.LIST_MODIFIER&&e<Tr.MAP_MODIFIER:e instanceof Pr}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Tr.MAP_MODIFIER&&e<=255:e instanceof Cr}isDocumentSchema(){return this.getSchema()===Tr.DOCUMENT}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Or}isBlobSchema(){return this.getSchema()===Tr.BLOB||this.getSchema()===Tr.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Tr.TIMESTAMP_DEFAULT&&e<=Tr.TIMESTAMP_EPOCH_SECONDS}isStringSchema(){return this.getSchema()===Tr.STRING}isBooleanSchema(){return this.getSchema()===Tr.BOOLEAN}isNumericSchema(){return this.getSchema()===Tr.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Tr.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Tr.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Tr.STREAMING_BLOB}isIdempotencyToken(){return"number"==typeof this.traits?!(4&~this.traits):"object"==typeof this.traits&&!!this.traits.idempotencyToken}getMergedTraits(){return this.normalizedTraits||(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()}),this.normalizedTraits}getMemberTraits(){return Nr.translateTraits(this.memberTraits)}getOwnTraits(){return Nr.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?Nr.memberFrom([63&e,0],"key"):Nr.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return Nr.memberFrom([63&e,0],"value");if(this.isListSchema())return Nr.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return Nr.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return Nr.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return e in this.getSchema().members}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!(e in t.members))throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a member with name=${e}.`);return Nr.memberFrom(t.members[e],e)}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have members.`)}getMemberSchemas(){const{schema:e}=this,t=e;if(!t||"object"!=typeof t)return{};if("members"in t){const e={};for(const n of t.memberNames)e[n]=this.getMemberSchema(n);return e}return{}}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],Nr.memberFrom([e.memberList[t],0],e.memberNames[t])]}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Tr).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Tr.MAP_MODIFIER:return`${r}Map`;case Tr.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Nr.symbol=Symbol.for("@smithy/core/schema::NormalizedSchema");const Lr="***SensitiveInformation***";function $r(e,t){if(null==t)return t;const n=Nr.of(e);if(n.getMergedTraits().sensitive)return Lr;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=$r(i,e[t]));return r}return t}class Dr{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Ur}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Ur{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=void 0,this._outputFilterSensitiveLog=void 0,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends Dr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(e._operationSchema?$r.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?$r.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Fr="***SensitiveInformation***";class Br extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Br.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Br?Br.isInstance(e):!!Br.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const jr=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Hr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qr=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Vr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),zr=e=>null!=e;class Gr{trace(){}debug(){}info(){}warn(){}error(){}}function Wr(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,Qr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Yr(r,null,s,e):r[e]=s[e];return r}const Kr=(e,t)=>{const n={};for(const r in t)Yr(n,e,t,r);return n},Qr=(e,t,n)=>Wr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Yr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Jr,o=Zr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Jr=e=>null!=e,Zr=e=>e,Xr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),ei=e=>ti(e,32),ti=(e,t)=>{const n=Xr(e);if(void 0!==n&&ni(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ni=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ri=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return si.warn(ii(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ii=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),si={warn:console.warn},oi=e=>e?.body instanceof ReadableStream,ai=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,ci=e=>{const t={error:e,errorType:ui(e)},n=hi(e.$response);return n&&(t.retryAfterHint=n),t},ui=e=>Un(e)?"THROTTLING":Fn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Fn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",di={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},li=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!ai(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[Vn]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=ci(t);if(o=tr(t),d&&oi(u))throw(n.logger instanceof Gr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise(e=>setTimeout(e,s))}}})(e),di)}}),hi=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const fi=(pi=3e5,e=>mi(e)&&e.expiration.getTime()-Date.now()<pi);var pi;const mi=e=>void 0!==e.expiration,gi=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),yi="X-Amz-Date",bi="X-Amz-Signature",wi="X-Amz-Security-Token",vi="authorization",ki=yi.toLowerCase(),Si=[vi,ki,"date"],Ei=bi.toLowerCase(),Ai="x-amz-content-sha256",Ii=wi.toLowerCase(),_i={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},xi=/^proxy-/,Ri=/^sec-/,Pi="AWS4-HMAC-SHA256",Ci="AWS4-HMAC-SHA256-PAYLOAD",Ti="aws4_request",Mi={},Oi=[],Ni=(e,t,n)=>`${e}/${t}/${n}/${Ti}`,Li=(e,t,n)=>{const r=new e(t);return r.update(gi(n)),r.digest()},$i=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in _i||t?.has(s)||xi.test(s)||Ri.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Di=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===Ai)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(gi(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ui{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=lr(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ji.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Bi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Fi;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Fi||(Fi={}));const Bi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ji{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Hi(t),new ji(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Hi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Hi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const qi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))Si.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Vi=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class zi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Ei)continue;const i=mr(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${mr(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(gi(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Vi(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Gi extends zi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s}),this.headerFormatter=new Ui}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ni(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(qi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[wi]=d.sessionToken),m.query["X-Amz-Algorithm"]=Pi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[yi]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=$i(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[bi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Di(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ni(a,o,s??this.service),d=await Di({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[Ci,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(gi(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=qi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ni(d,a,s??this.service);c.headers[ki]=u,o.sessionToken&&(c.headers[Ii]=o.sessionToken);const h=await Di(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(Ai,c.headers)&&this.applyChecksum&&(c.headers[Ai]=h);const f=$i(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[vi]=`${Pi} Credential=${o.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Pi),s=new this.sha256(await n);return s.update(gi(i)),Ir(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Ir(await Li(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Mi)return Mi[s];for(Oi.push(s);Oi.length>50;)delete Mi[Oi.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Ti])o=await Li(e,o,t);return Mi[s]=o})(this.sha256,e,n,t,r||this.service)}}const Wi=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,fi,mi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const Ki=async(e,t,n)=>({operation:Xt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Qi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Yi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Ji="3.823.0";var Zi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Xi(e){return e instanceof Uint8Array?e:"string"==typeof e?Zi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function es(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ts={name:"SHA-256"},ns={name:"HMAC",hash:ts},rs=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const is={};function ss(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:is}var os=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!es(e)){var t=Xi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return ss().crypto.subtle.sign(ns,t,e.toHash).then(function(e){return new Uint8Array(e)})}):es(this.toHash)?Promise.resolve(rs):Promise.resolve().then(function(){return ss().crypto.subtle.digest(ts,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){ss().crypto.subtle.importKey("raw",Xi(e.secret),ns,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function as(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}function cs(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function us(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var ds=64,ls=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),hs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],fs=Math.pow(2,53)-1,ps=function(){function e(){this.state=Int32Array.from(hs),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>fs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ds&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%ds>=56){for(var r=this.bufferLength;r<ds;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<ds;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(ls[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),ms=function(){function e(e){this.secret=e,this.hash=new ps,this.reset()}return e.prototype.update=function(e){if(!es(e)&&!this.error)try{this.hash.update(Xi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return as(this,void 0,void 0,function(){return cs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ps,this.secret){this.outer=new ps;var e=function(e){var t=Xi(e);if(t.byteLength>ds){var n=new ps;n.update(t),t=n.digest()}var r=new Uint8Array(ds);return r.set(t),r}(this.secret),t=new Uint8Array(ds);t.set(e);for(var n=0;n<ds;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var gs=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ys(e){return e&&gs.every(function(t){return"function"==typeof e[t]})}var bs=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&ys(e.crypto.subtle)}(ss())?this.hash=new ms(e):this.hash=new os(e)}return e.prototype.update=function(e,t){this.hash.update(Xi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ws=n(369),vs=n.n(ws);const ks=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};!function(){function e(){this.crc32=new Es}e.prototype.update=function(e){es(e)||this.crc32.update(Xi(e))},e.prototype.digest=function(){return as(this,void 0,void 0,function(){return cs(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new Es}}();var Ss,Es=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=us(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^As[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),As=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class Is{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&_s(t),new Is(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&_s(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function _s(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class xs{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Is.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ds.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Rs,value:!0};break;case 1:t[i]={type:Rs,value:!1};break;case 2:t[i]={type:Ps,value:e.getInt8(n++)};break;case 3:t[i]={type:Cs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Ts,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Ms,value:new Is(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Os,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:Ns,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Ls,value:new Date(new Is(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:$s,value:`${Ir(o.subarray(0,4))}-${Ir(o.subarray(4,6))}-${Ir(o.subarray(6,8))}-${Ir(o.subarray(8,10))}-${Ir(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ss||(Ss={}));const Rs="boolean",Ps="byte",Cs="short",Ts="integer",Ms="long",Os="binary",Ns="string",Ls="timestamp",$s="uuid",Ds=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Us{constructor(e,t){this.headerMarshaller=new xs(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new Es;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new Es).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Fs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Bs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class js{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Hs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function qs(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class Vs{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Us(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new js({messageStream:new Fs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:qs(t,this.utfEncoder)})}serialize(e,t){return new Bs({messageStream:new Hs({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class zs{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Vs({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Gs(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const Gs=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Ws=e=>new zs(e),Ks="function"==typeof TextEncoder?new TextEncoder:null,Qs=e=>{if("string"==typeof e){if(Ks)return Ks.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Ys=e=>new Date(Date.now()+e),Js=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Zs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ys(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Xs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class eo{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=Xs("context",e.context),n=Xs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Xs("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:Ys(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Js(t.$response);if(n){const r=Xs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Zs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Js(e);if(n){const e=Xs("config",t.config);e.systemClockOffset=Zs(n,e.systemClockOffset)}}}const to="required",no="fn",ro="argv",io="ref",so=!0,oo="isSet",ao="booleanEquals",co="error",uo="endpoint",lo="tree",ho="PartitionResult",fo={[to]:!1,type:"String"},po={[to]:!0,default:!1,type:"Boolean"},mo={[io]:"Endpoint"},go={[no]:ao,[ro]:[{[io]:"UseFIPS"},!0]},yo={[no]:ao,[ro]:[{[io]:"UseDualStack"},!0]},bo={},wo={[no]:"getAttr",[ro]:[{[io]:ho},"supportsFIPS"]},vo={[no]:ao,[ro]:[!0,{[no]:"getAttr",[ro]:[{[io]:ho},"supportsDualStack"]}]},ko=[go],So=[yo],Eo=[{[io]:"Region"}],Ao={version:"1.0",parameters:{Region:fo,UseDualStack:po,UseFIPS:po,Endpoint:fo},rules:[{conditions:[{[no]:oo,[ro]:[mo]}],rules:[{conditions:ko,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:co},{rules:[{conditions:So,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:co},{endpoint:{url:mo,properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{rules:[{conditions:[{[no]:oo,[ro]:Eo}],rules:[{conditions:[{[no]:"aws.partition",[ro]:Eo,assign:ho}],rules:[{conditions:[go,yo],rules:[{conditions:[{[no]:ao,[ro]:[so,wo]},vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:co}],type:lo},{conditions:ko,rules:[{conditions:[{[no]:ao,[ro]:[wo,so]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS is enabled but this partition does not support FIPS",type:co}],type:lo},{conditions:So,rules:[{conditions:[vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"DualStack is enabled but this partition does not support DualStack",type:co}],type:lo},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo}],type:lo},{error:"Invalid Configuration: Missing Region",type:co}],type:lo}]},Io=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),_o=(e,t={})=>Io.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(Ao,{endpointParams:e,logger:t.logger}));wt.aws=Ht;Error;const xo=["in-region","cross-region","mobile","standard","legacy"],Ro=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Po=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Ro()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${xo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(qr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_o,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new eo}],logger:e?.logger??new Gr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Qs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ks({serviceId:r.serviceId,clientVersion:Ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Ws,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Mn),sha256:e?.sha256??bs,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},Co=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Vr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class To extends ar{config;constructor(...[e]){const t=Po(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Sn(await en(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=Wi(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Co(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Qt(l),Jt)}})),this.middlewareStack.use(li(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),sn)}}))(this.config,{httpAuthSchemeParametersProvider:Ki,identityProviderConfigProvider:async e=>new on({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Mo extends Br{constructor(e){super(e),Object.setPrototypeOf(this,Mo.prototype)}}class Oo extends Mo{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}var No;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));class Lo extends Mo{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Lo.prototype)}}class $o extends Mo{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,$o.prototype)}}class Do extends Mo{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,Do.prototype)}}class Uo extends Mo{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Uo.prototype)}}class Fo extends Mo{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Fo.prototype)}}class Bo extends Mo{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Bo.prototype)}}class jo extends Mo{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,jo.prototype)}}var Ho;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));var qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={}));var Vo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Vo||(Vo={}));var zo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(zo||(zo={}));var Go;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Go||(Go={}));var Wo,Ko;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Wo||(Wo={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Ko||(Ko={}));var Qo,Yo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Qo||(Qo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Yo||(Yo={}));var Jo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));var Zo,Xo,ea,ta,na,ra;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Zo||(Zo={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Xo||(Xo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(ta||(ta={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={}));class ia extends Mo{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ia.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class sa extends Mo{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,sa.prototype)}}class oa extends Mo{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,oa.prototype)}}var aa,ca,ua,da;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(aa||(aa={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(ca||(ca={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));class la extends Mo{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,la.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(da||(da={}));var ha,fa,pa;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(ha||(ha={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(fa||(fa={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(pa||(pa={}));const ma=e=>({...e,...e.body&&{body:Fr}}),ga=e=>({...e,...e.body&&{body:Fr}}),ya=e=>({...e,...e.body&&{body:Fr}}),ba=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),wa=(e,t)=>((e,t)=>_r(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),va=async(e,t)=>{const n=await wa(e,t);return n.message=n.message??n.Message,n};function ka(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Sa(e,t){return new Ea(e,t)}class Ea{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>ka(e)).join("/"):ka(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const Aa=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[Xa]:e[Xa],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},Ia=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[oc]:e[Xa],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},_a=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Za(e),[ec]:[,e.headers[tc]],[ic]:[,e.headers[dc]]}),r=await _r(e.body,t);return n.body=r,n},xa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Za(e),[ec]:[,e.headers[ac]],[ic]:[,e.headers[dc]]}),r=e.body;return n.body=qa(r,t),n},Ra=async(e,t)=>{const n={...e,body:await va(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await Ta(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Oa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ua(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Fa(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ja(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ha(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Na(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await La(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Da(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ba(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await $a(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Ma(n,t);default:const i=n.body;return Pa({output:e,parsedBody:i,errorCode:r})}},Pa=(Ca=Mo,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Hr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw jr(o,t)})({output:e,parsedBody:t,exceptionCtor:Ca,errorCode:n})});var Ca;const Ta=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Oo({$metadata:Za(e),...n});return jr(s,e.body)},Ma=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Uo({$metadata:Za(e),...n});return jr(s,e.body)},Oa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Lo({$metadata:Za(e),...n});return jr(s,e.body)},Na=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalStatusCode:ei,resourceName:ri});Object.assign(n,i);const s=new ia({$metadata:Za(e),...n});return jr(s,e.body)},La=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new sa({$metadata:Za(e),...n});return jr(s,e.body)},$a=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalMessage:ri,originalStatusCode:ei});Object.assign(n,i);const s=new la({$metadata:Za(e),...n});return jr(s,e.body)},Da=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new oa({$metadata:Za(e),...n});return jr(s,e.body)},Ua=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Fo({$metadata:Za(e),...n});return jr(s,e.body)},Fa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Bo({$metadata:Za(e),...n});return jr(s,e.body)},Ba=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new jo({$metadata:Za(e),...n});return jr(s,e.body)},ja=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new $o({$metadata:Za(e),...n});return jr(s,e.body)},Ha=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Do({$metadata:Za(e),...n});return jr(s,e.body)},qa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Wa(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Va(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await za(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ya(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Qa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Ga(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ka(n.serviceUnavailableException,t)}:{$unknown:e}),Va=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Oa(n,t)},za=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return $a(n,t)},Ga=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Da(n,t)},Wa=async(e,t)=>{const n={},r=await wa(e.body,t);return Object.assign(n,Ja(r,t)),n},Ka=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Ba(n,t)},Qa=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return ja(n,t)},Ya=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Ha(n,t)},Ja=(e,t)=>Kr(e,{bytes:t.base64Decoder}),Za=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Xa="accept",ec="contentType",tc="content-type",nc="guardrailIdentifier",rc="guardrailVersion",ic="performanceConfigLatency",sc="trace",oc="x-amzn-bedrock-accept",ac="x-amzn-bedrock-content-type",cc="x-amzn-bedrock-guardrailidentifier",uc="x-amzn-bedrock-guardrailversion",dc="x-amzn-bedrock-performanceconfig-latency",lc="x-amzn-bedrock-trace";class hc extends(Dr.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Cn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ya,ba).ser(Ia).de(xa).build()){}class fc extends(Dr.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Cn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(ma,ga).ser(Aa).de(_a).build()){}const pc=mc;function mc(e,t){const n=yc();return(mc=function(e,t){return n[e-=454]})(e,t)}!function(e){const t=mc,n=e();for(;;)try{if(282652===-parseInt(t(471))/1+parseInt(t(511))/2*(parseInt(t(494))/3)+parseInt(t(520))/4*(-parseInt(t(507))/5)+parseInt(t(476))/6*(-parseInt(t(510))/7)+-parseInt(t(503))/8*(-parseInt(t(491))/9)+parseInt(t(506))/10*(parseInt(t(475))/11)+parseInt(t(505))/12*(parseInt(t(484))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(yc);class gc extends We{[pc(486)];[pc(466)];[pc(536)];[pc(529)];static get[pc(488)](){return pc(473)}constructor(e){const t=pc;super(e),e[t(485)][t(487)](t(461))||e[t(485)][t(480)](t(461),{model:t(458),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(504),stream:!0}),this[t(486)]=e[t(485)][t(487)](t(502)),this[t(536)]=e[t(485)][t(487)](t(459)),this[t(466)]=e[t(485)][t(487)](t(514)),this[t(529)]=e[t(485)][t(487)](t(461))}async[pc(535)]({query:e,context:t,onData:n,actionId:r}){const i=pc,{model:s,stream:o,...a}=await this[i(454)](this[i(529)],r),c={prompt:await this[i(522)](e,t,s,r),...a};this[i(486)]?await this[i(493)](c,s,o,n,r):await this[i(527)](c,s,o,n)}async[pc(522)](e,t,n,r){const i=pc;let s,o;return t?(s=i(462),o=i(468)+e+i(519)+t):(s=i(517),o=e),i(501)==this[i(469)](n)?i(534)+s+i(457)+o+i(499):i(467)+s+"\n"+o+i(516)}[pc(469)](e){const t=pc;if(/^anthropic\.claude/[t(525)](e))return t(530);if(/^ai21\.j2/[t(525)](e))return t(523);if(/^cohere\.command/[t(525)](e))return t(495);if(/^meta\.llama/[t(525)](e))return t(501);throw new w(v(this[t(521)][t(532)],t(497),e))}async[pc(493)](e,t,n,r,i){const s=pc,o={method:s(526),headers:await this[s(472)](this[s(466)],i),body:JSON[s(455)]({...e,model:t,stream:n}),signal:this[s(463)][s(474)]},a=await fetch(this[s(486)],o);n?await this[s(500)](a,t,r):await this[s(465)](a,t,r)}async[pc(527)](e,t,n,r){const i=pc,s=new To(this[i(536)]),o={body:JSON[i(455)](e),contentType:i(492),accept:i(492),modelId:t};let a;if(n){const e=new hc(o);a=await s[i(518)](e,{abortSignal:this[i(463)][i(474)]}),await this[i(508)](a,t,r)}else{const e=new fc(o);a=await s[i(518)](e,{abortSignal:this[i(463)][i(474)]}),await this[i(465)](a,t,r)}}async[pc(508)](e,t,n){const r=pc,i=e[r(483)],s=new TextDecoder(r(515));let o="";for await(const e of i)if(e[r(460)]){const i=s[r(477)](e[r(460)][r(489)]),a=JSON[r(533)](i);o+=this[r(498)](a,t),n(o)}return Promise[r(456)]()}async[pc(500)](e,t,n){const r=pc,i=e[r(483)],s=new TextDecoder(r(515)),o=i[r(479)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(528)]();if(u=e,u)break;const d=(a+s[r(477)](i))[r(470)]("\n")[r(496)](e=>{const t=r;try{return a="",JSON[t(533)](e)}catch{return a=e,null}})[r(524)](e=>null!==e);d[r(509)]&&(c+=d[r(496)](e=>this[r(498)](e,t))[r(531)](""),n(c))}return Promise[r(456)]()}async[pc(465)](e,t,n){const r=pc;let i;return i=e instanceof Response?await e[r(490)]():JSON[r(533)](new TextDecoder(r(515))[r(477)](e[r(483)])),n(this[r(498)](i,t)),Promise[r(456)]()}[pc(498)](e,t){const n=pc;switch(this[n(469)](t)){case n(530):return e[n(482)];case n(523):return e[n(464)][0][n(512)][n(513)];case n(495):return e[n(478)][0][n(513)];case n(501):return e[n(481)]}}}function yc(){const e=["_prepareRequestHeaders","AWSTextAdapter","signal","11PimIAv","6804NrWTHI","decode","generations","getReader","define","generation","completion","body","3302QBsVpw","config","_apiUrl","get","pluginName","bytes","json","218853TgeRwl","application/json","_processProxyRequest","9837FcJZvb","cohere.command","map","AI_ERROR_UNSUPPORTED_MODEL","_getGeneratedText","\n[/INST]","_readStreamableResponse","meta.llama","ai.aws.apiUrl","96gfqIQT","bedrock-2023-05-31","10716FxGueD","2124690PDGPQc","115pASWGV","_readAsyncIterableResponse","length","1092lYrskJ","130UIkTGN","data","text","ai.aws.requestHeaders","utf-8","\n\nAssistant:","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","send","\nYou must keep the text formatting.\n\nContent:\n","9304WDRcoF","editor","preparePrompt","ai21.j2","filter","test","POST","_processAWSRequest","read","_requestParameters","anthropic.claude","join","locale","parse","<<SYS>>\n","sendRequest","_bedrockClientConfig","_prepareRequestParameters","stringify","resolve","\n<</SYS>>\n[INST]\n","anthropic.claude-v2","ai.aws.bedrockClientConfig","chunk","ai.aws.requestParameters","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","abortController","completions","_readStaticResponse","_requestHeaders","Human:\n","Instruction:\n","getModelFamily","split","431176cTXwGO"];return(yc=function(){return e})()}function bc(e,t){var n=wc();return(bc=function(e,t){return n[e-=295]})(e,t)}function wc(){var e=["910asjRaQ","1106KSiPtz","72GBQUPq","43448GHTCtd","9254883bZFCNH","2953782MYkDTP","5154364lHvrVs","48fOniSw","1393487qJcqce","63378wgtCST","3caAoTY","587650kATIsP"];return(wc=function(){return e})()}!function(e){for(var t=bc,n=e();;)try{if(749055===parseInt(t(304))/1+-parseInt(t(301))/2+-parseInt(t(306))/3*(-parseInt(t(302))/4)+-parseInt(t(295))/5*(-parseInt(t(298))/6)+-parseInt(t(297))/7*(-parseInt(t(299))/8)+-parseInt(t(305))/9*(-parseInt(t(296))/10)+parseInt(t(300))/11*(-parseInt(t(303))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
5
+ */(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(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 a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>y,AIAssistant:()=>He,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>cc,OpenAITextAdapter:()=>Ye,ShowAIAssistantCommand:()=>S,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=d;function d(e,t){const n=p();return(d=function(e,t){return n[e-=261]})(e,t)}!function(e){const t=d,n=e();for(;;)try{if(998700===parseInt(t(321))/1+-parseInt(t(290))/2*(-parseInt(t(297))/3)+-parseInt(t(331))/4+parseInt(t(371))/5*(parseInt(t(348))/6)+-parseInt(t(275))/7*(parseInt(t(356))/8)+parseInt(t(323))/9+parseInt(t(314))/10*(-parseInt(t(293))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(p);const l=globalThis[u(346)],h=u(368);class f extends e.Plugin{static get[u(289)](){return u(265)}static get[u(313)](){return!0}static get[u(274)](){return!0}[u(359)](){const e=u,{editor:t}=this,n=[e(340)];t[e(363)][e(344)](e(280))&&n[e(352)](e(335)),t[e(357)][e(303)](e(262))[e(349)]({model:h,view:{classes:n,priority:12}}),t[e(357)][e(303)](e(262))[e(351)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(360)][r(366)])return null;const i=n[r(355)](r(278));return n[r(296)]([r(340),r(310)],i),i}})}[u(270)](){!async function(e){const t=g([110,65,55,121,117,114,103,79,72,98,90,118,68,112,108,82,107,74,115,99,100,73,67,109,56,54,111,80,87,120,57,50,102,49,113,70,48,76,97,83,88,51,78,71,119,84,77,75,52,106,86,116,89,85,66,81,105,53,122,104,101,69]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],s=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),o={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),s[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(e)):null}function l(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=d;return e[t(367)](e=>String[t(273)](e))[t(364)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([110]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await s,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(o())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(s(),e),()=>{const e=o();return null==e?(s(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function o(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),s[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function o(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,s,o]=r;return t(i),await n(i,s,o),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),o,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,s)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1757376e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=d,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(298)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(333)](){const e=u,t=this[e(336)][e(294)];t[e(339)](n=>{const r=e,i=t[r(358)][r(271)][r(311)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(354)][r(309)](i))n[r(305)](i,{range:e});else if(e[r(276)][r(370)]){const s=e[r(276)][r(324)](({item:e})=>!t[r(308)][r(330)](e),{boundaries:e});n[r(287)](i,{usingOperation:!1,affectsData:!1,range:n[r(325)](s,e[r(317)])})}else n[r(287)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(337)](){const e=u,t=this[e(336)][e(294)],n=Array[e(304)](this[e(336)][e(294)][e(354)][e(322)](h));n[e(345)]&&t[e(339)](t=>{const r=e;n[r(288)](e=>{t[r(318)](e)})})}[u(327)](e,t){const n=u,r=this[n(338)](),i=t||r[n(316)]();this[n(336)][n(294)][n(299)](i)&&this[n(336)][n(294)][n(339)](s=>{const o=n;this[o(337)](),t||this[o(291)](s,r),this[o(361)]({insertAt:i,writer:s,html:e})})}[u(264)](e){const t=u,{model:n}=this[t(336)],r=this[t(338)]();n[t(339)](()=>{const n=t,i=this[n(295)](e,r)||this[n(302)](r);this[n(327)](e,i)})}[u(338)](){const e=u,t=this[e(336)][e(294)],n=Array[e(304)](t[e(354)][e(322)](h))[e(367)](t=>t[e(328)]());return t[e(347)](n)}[u(361)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(336)][r(263)],s=this[r(336)][r(343)][r(344)](a.ClipboardPipeline),o=new l;o[r(341)](r(285),t);const d=new ClipboardEvent(r(306),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(286)](n);const f=(t,n)=>{const i=r;n[i(272)]&&e[i(286)](n[i(272)])};s[r(267)](r(320),f,{priority:r(315)}),i[r(358)][r(332)](r(306),h),s[r(365)](r(320),f)}[u(302)](e){const t=u,{model:n}=this[t(336)],r=Array[t(304)](e[t(300)]());return r[t(345)]?n[t(369)](r[t(307)]()):e[t(261)]()}[u(295)](e,t){const n=u,{model:r,plugins:i}=this[n(336)];if(i[n(309)](n(342))){const s=i[n(344)](n(342))[n(362)](t);if(s[n(345)]){const t=this[n(353)](e),i=this[n(292)](s,t);return r[n(283)](i,0)}}return null}[u(353)](e){const t=u,n=this[t(336)][t(343)][t(344)](t(342)),r=this[t(336)][t(281)][t(319)](e),i=Array[t(304)](r[t(284)]())[t(301)](e=>e.is(t(268),t(312)));let s=0;return i[t(288)](e=>{s+=n[t(282)](e)}),s}[u(292)](e,t){const n=u,r=this[n(336)][n(343)][n(344)](n(342)),i=r[n(269)](e),s=r[n(329)](e),o=i[n(279)]+1,a=s[n(266)],c=e[0][n(350)](n(312));for(let e=0;e<t;e++)r[n(326)](c,{at:o});return c[n(277)](o)[n(277)](a)}[u(291)](e,t){const n=u,{plugins:r}=this[n(336)],{model:i}=e;r[n(309)](n(342))&&r[n(344)](n(342))[n(362)](t)[n(345)]&&i[n(334)](t)}}function p(){const e=["parse","contentInsertion","1682428fbkCeI","getMarkersGroup","11038509hplOGR","getLastMatchingPosition","createRange","insertRows","insertContent","getRange","getColumnIndexes","isContent","5040832XCoeYp","fire","showFakeVisualSelection","deleteContent","ck-ai-assistant-ui_theme","editor","hideFakeVisualSelection","_getAISelection","change","ck-fake-ai-selection","setData","TableUtils","plugins","get","length","DataTransfer","createSelection","18924UrMtCL","markerToHighlight","findAncestor","markerToElement","push","_getTableRowCountFromContent","markers","createUIElement","3179912SlmrVL","conversion","document","init","markerRange","_pasteHTMLUsingClipboard","getSelectedTableCells","config","join","off","isCollapsed","map","ai-ui","createPositionAfter","isAtEnd","2885QDDeTp","getLastPosition","editingDowncast","editing","insertContentBelow","AIAssistantEditing","first","once","element","getRowIndexes","afterInit","selection","resultRange","fromCharCode","isPremiumPlugin","7QrsAEV","start","getChild","span","last","ai.useTheme","data","getRows","createPositionAt","getChildren","text/html","setSelection","addMarker","forEach","pluginName","460YkgDtZ","_resetContentOfSelectedTableCells","_createEmptyTableRows","208164cfxdRn","model","_prepareTableInsertBelowPosition","addClass","2589HWkykq","href","canEditAt","getSelectedBlocks","filter","_getDefaultInsertBelowPosition","for","from","updateMarker","paste","pop","schema","has","ck-fake-ai-selection_collapsed","getRanges","table","isOfficialPlugin","1200mTwhqW","lowest","getFirstRange","end","removeMarker"];return(p=function(){return e})()}var m=g;function g(e,t){var n=w();return(g=function(e,t){return n[e-=487]})(e,t)}!function(e){for(var t=g,n=e();;)try{if(362376===parseInt(t(490))/1*(-parseInt(t(497))/2)+parseInt(t(492))/3+parseInt(t(488))/4+-parseInt(t(502))/5+-parseInt(t(504))/6*(parseInt(t(498))/7)+-parseInt(t(495))/8*(parseInt(t(503))/9)+parseInt(t(500))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(w);class y extends e.Plugin{static get[m(493)](){return m(489)}static get[m(505)](){return!0}static get[m(494)](){return!0}[m(499)](){var e=m;if(!this[e(487)])throw new i.CKEditorError(e(496),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(501)]=t(491)}}function w(){var e=["name","3003065dvEXKM","73602piMJNt","54762BfZCJj","isOfficialPlugin","textAdapter","2530144WsLNUu","AIAdapter","3oMKfWu","AIRequestError","1523256tyGXsn","pluginName","isPremiumPlugin","328IxofzP","aiadapter-text-adapter-not-set","234626GwzFyo","413oinnuE","afterInit","10484310ascpkA"];return(w=function(){return e})()}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=E;!function(e){const t=E,n=e();for(;;)try{if(270979===parseInt(t(470))/1*(-parseInt(t(452))/2)+parseInt(t(488))/3*(-parseInt(t(454))/4)+parseInt(t(487))/5+parseInt(t(468))/6+parseInt(t(477))/7*(parseInt(t(464))/8)+parseInt(t(489))/9*(parseInt(t(462))/10)+-parseInt(t(474))/11*(-parseInt(t(466))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class S extends e.Command{[k(469)];constructor(e,t){const n=k;super(e),this[n(469)]=t,this[n(467)](n(472),[]),this.on(n(494),(e,t,r)=>{const i=n;this[i(476)]&&(this[i(472)]=I(this[i(469)],r))}),this[n(467)](n(457),!1),this.on(n(491),(e,t,r)=>{const i=n;this[i(472)]=r?I(this[i(469)],this[i(457)]):[]})}[k(495)](){const e=k,t=this[e(481)][e(485)];this[e(457)]=function(t){const n=e,r=t[n(458)][n(490)];return r[n(473)]?0!==[...r[n(465)]()][n(480)]&&![...r[n(465)]()][0][n(475)]:!!t[n(496)](r[n(493)]())}(t);const n=t[e(458)][e(490)],r=this[e(481)][e(456)][e(497)](e(478));for(const t of n[e(459)]())for(const n of t[e(482)]())if(n.is(e(461))&&r[e(455)](n[e(486)]))return void(this[e(476)]=!1);this[e(476)]=!0}[k(479)](e="",t="",n=k(492)){const r=k;this[r(481)][r(460)][r(497)]($e)[r(484)](e,t,n)}}function E(e,t){const n=A();return(E=function(e,t){return n[e-=452]})(e,t)}function A(){const e=["config","_hasContext","document","getRanges","plugins","element","426180XSRCfQ","add","8VYzIZa","getSelectedBlocks","12jWsjLt","set","565296gYUsom","_commandDefinitions","587oaEWdr","from","enabledCommandsIds","isCollapsed","10615xIULog","isEmpty","isEnabled","3366013Xcnexy","ai.aiAssistant.disabledElements","execute","length","editor","getItems","requiresContent","showUI","model","name","50410bzMnux","1193394SxozpM","27sfUTeA","selection","change:isEnabled","custom","getFirstRange","change:_hasContext","refresh","hasContent","get","154eOKOZD","values","4BzGQkP","includes"];return(A=function(){return e})()}function I(e,t){const n=k,r=new Set;for(const i of e[n(453)]())(t||!1===i[n(483)])&&r[n(463)](i.id);return Array[n(471)](r)}const _=M;function x(){const e=["handleError","abort","domConverter","editing","previousContext","then","ELEMENT_NODE","processor","tryAgainEvent","div","set","295907TxmCZp","text/html","1790IYUdWr","mainAction","textAdapter","toView","102cnhNPa","initialContext","body","rename","344802bccNkW","viewToDom","reverse","reset","element","remove","document","previousActionId","<h1></h1>","415384vLaQbL","listenTo","ai.aiAssistant.preserveComments","nodeType","data","```html","trim","parseFromString","from","4807860DfCcmd","_handleQuery","editor","isRendered","push","90KZhOEb","length","isProcessing","updateView","view","currentContext","once","markers","destroy","serializeToString","startProcessing","_isH1TagSupportEnabled","get","clear","_sanitizeHTML","custom","112123qttXeZ","config","set:currentContext","_sanitizationContainer","finally","match","startsWith","innerHTML","substring","currentResponse","_normalizeResponseHeadings","setContentOf","htmlProcessor","render","catch","stopProcessing","_stripMarkdownSyntax","```","prompt","_parseAndNormalizeContent","stopListening","submitPrompt","previousLabel","finishProcessing","previousQuery","_domParser","12bFVgjW","message","querySelector","toModel","value","stringify","makeRequest","2729220BUYHxs","536508MrlXBW","name","endsWith","_xmlSerializer","createElement","exec","childNodes"];return(x=function(){return e})()}function M(e,t){const n=x();return(M=function(e,t){return n[e-=500]})(e,t)}!function(e){const t=M,n=e();for(;;)try{if(655997===-parseInt(t(555))/1+-parseInt(t(529))/2*(parseInt(t(565))/3)+parseInt(t(536))/4+parseInt(t(583))/5+-parseInt(t(561))/6*(-parseInt(t(537))/7)+parseInt(t(574))/8*(parseInt(t(588))/9)+parseInt(t(557))/10*(-parseInt(t(503))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const R=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(585)];[_(559)];[_(592)];[_(506)];[_(528)];[_(540)];constructor(e,t,n){const r=_;super(),this[r(585)]=e,this[r(559)]=t,this[r(506)]=document[r(541)](r(553)),this[r(528)]=new DOMParser,this[r(540)]=new XMLSerializer,this[r(592)]=n,this[r(554)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(505),(e,t,n)=>{const i=r;this[i(592)][i(533)]=this[i(501)](n)}),this[r(575)](this[r(592)],r(524),(e,t)=>{const n=r,i=this[n(593)]||this[n(562)];this[n(584)](t,i,n(502))}),this[r(575)](this[r(592)],r(552),()=>{const e=r;this[e(592)][e(521)]=this[e(525)],this[e(584)](this[e(527)],this[e(548)],this[e(572)],this[e(525)])}),this[r(575)](this[r(592)],r(518),()=>{this[r(518)]()})}[_(596)](){this[_(523)]()}async[_(591)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(592)][s(521)]=r,this[s(592)][s(558)]=i,this[s(562)]=n,t&&(this[s(592)][s(586)]?this[s(584)](t,n,e,r):this[s(592)][s(594)](s(516),()=>{this[s(584)](t,n,e,r)}))}[_(518)](){const e=_;this[e(590)]&&(this[e(590)]=!1,this[e(592)][e(526)](),this[e(559)][e(545)]())}[_(568)](){const e=_;this[e(562)]="",this[e(593)]="",this[e(512)]="",this[e(548)]="",this[e(527)]="",this[e(525)]="",this[e(572)]=void 0,this[e(592)][e(568)](),this[e(518)]()}async[_(584)](e,t,n,r){const i=_;return this[i(590)]=!0,this[i(592)][i(598)](),this[i(548)]=t,this[i(527)]=e,this[i(525)]=r||e,this[i(572)]=n,new Promise(r=>{const s=i;this[s(559)][s(535)]({query:e,context:t,onData:e=>{const t=s;this[t(512)]=e,this[t(593)]=this[t(522)](this[t(512)])},actionId:n})[s(549)](()=>{const e=s;!this[e(593)]&&this[e(512)]&&(this[e(593)]=this[e(522)](this[e(512)],!0))})[s(517)](e=>{const t=s;e instanceof b?this[t(592)][t(544)](e[t(530)]):this[t(592)][t(544)](),r()})[s(507)](()=>{this[s(518)](),r()})})}[_(522)](e,t=!1){const n=_,r=R[n(542)](e);e=r?e[n(511)](r[1][n(589)]):e[n(589)]<100&&!t?"":this[n(519)](e);const i=this[n(528)][n(581)](e,n(556));if(r){const e=Array[n(582)](i[n(563)][n(543)]);e[n(567)]();for(const t of e){if(t[n(577)]==Node[n(550)])break;t[n(570)]()}}const s=this[n(585)][n(578)][n(551)][n(560)](this[n(540)][n(597)](i[n(563)]));this[n(599)]()||this[n(513)](s);const o=this[n(585)][n(504)][n(600)](n(576)),a=this[n(585)][n(578)][n(532)](s);return o||a[n(595)][n(500)](),this[n(585)][n(578)][n(534)](a)}[_(513)](e){const t=_,n=new c.ViewUpcastWriter(this[t(585)][t(547)][t(592)][t(571)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(569))&&r[t(508)](n)&&(i[t(587)](n),"h1"==n[t(538)]&&(s=!0));if(s)for(const e of i)n[t(564)]("h"+(parseInt(e[t(538)][1])+1),e)}[_(599)](){const e=_,{data:t,editing:n}=this[e(585)],r=t[e(515)][e(560)](e(573)),i=t[e(560)](t[e(532)](r));return!!n[e(592)][e(546)][e(566)](i)[e(531)]("h1")}[_(501)](e){const t=_;return this[t(585)][t(547)][t(592)][t(546)][t(514)](this[t(506)],e),this[t(506)][t(510)]}[_(519)](e){const t=_,n=e[t(580)]();return n[t(509)](t(579))?n[t(539)](t(520))?n[t(511)](7,n[t(589)]-3):n[t(511)](7):e}}const C=N;function T(){const e=["ck-hidden","Stop","9875QGMEgZ","tryAgainButton","AI_","117187gcNSXS","extendTemplate","Try again","replace","insertButton","bind","ck-ai-form__toolbar","replaceButton","mainAction","3715187ODypvM","930186CxtOVW","locale","bindTemplate","isVisible","insert","_CONTENT","680ZNLCYa","items","4681722ZEwoWX","Insert below","1204880aekuuz","addMany","ck-button-action","4884867VLFGZr","70fPLTfK","toUpperCase","16nQdYUD","label","set","stopButton","_createButton","REPLACE"];return(T=function(){return e})()}!function(e){const t=N,n=e();for(;;)try{if(592133===-parseInt(t(169))/1+-parseInt(t(189))/2+-parseInt(t(179))/3+parseInt(t(185))/4*(-parseInt(t(166))/5)+-parseInt(t(187))/6+-parseInt(t(178))/7*(parseInt(t(158))/8)+-parseInt(t(155))/9*(-parseInt(t(156))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(T);const O={REPLACE:C(172),INSERT:C(183)};function N(e,t){const n=T();return(N=function(e,t){return n[e-=155]})(e,t)}class L extends s.ToolbarView{constructor(e){const t=C;super(e),this[t(160)](t(182),!1),this[t(160)](t(177),O[t(163)]),this[t(176)]=this[t(162)]("",t(191)),this[t(176)][t(174)](t(159)).to(this,t(177),n=>v(e,t(168)+n[t(157)]()+t(184))),this[t(173)]=this[t(162)](v(e,t(188))),this[t(167)]=this[t(162)](v(e,t(171))),this[t(161)]=this[t(162)](v(e,t(165)));const n=this[t(181)];this[t(170)]({attributes:{class:[t(175),n.if(t(182),t(164),e=>!e)]}}),this[t(186)][t(190)]([this[t(176)],this[t(173)],this[t(167)],this[t(161)]])}[C(162)](e,t){const n=C,r=new s.ButtonView(this[n(180)]);return r[n(160)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=D;function D(e,t){const n=U();return(D=function(e,t){return n[e-=474]})(e,t)}function U(){const e=["ck-ai-form__content-field","execCommand","-9999px","ck-ai-form__content-area--processing","contentFieldView","_copyHTMLToClipboard","ck-ai-form__copy-button","change:value","102392UMtHEl","createRange","element","ck-reset_all-excluded","1258500zNkAQu","scrollTo","setStartAfter","render","3049914crWOfN","isProcessing","div","addRange","ck-ai-form__content-area","ck-ai-form__content-area-wrapper","<span>]</span>","ck-hidden","createElement","getSelection","appendLoader","_createLoader","Copy","text/html","innerHTML","clipboard","write","querySelector","value","setTemplate","class","loaderView","absolute","focus","369ScZiQh","text/plain","remove","icon","<span>[</span>","bindTemplate","ck-ai-form__loader","AI is writing...","set"," ck-ai-form__copy-button--copied","lastElementChild","setEndBefore","change:isProcessing","156190ZsQEQS","copyButtonView","smooth","ck-ai-form__copy-button-wrapper","body","textContent","setContent","appendChild","mousedown","193397icBKPJ","scrollHeight","isEnabled","locale",".ck-ai-form__loader","position","listenTo","style","isVisible","_createCopyButton","copy","ClipboardItem","removeAllRanges","ck-content","execute","bind","2237552zkbXlq","93SolNcP","wheel","1902530oUlFBA","firstElementChild","left","6DBrcsG"];return(U=function(){return e})()}!function(e){const t=D,n=e();for(;;)try{if(558861===parseInt(t(524))/1*(-parseInt(t(546))/2)+parseInt(t(541))/3*(parseInt(t(555))/4)+-parseInt(t(474))/5+parseInt(t(478))/6+-parseInt(t(543))/7+-parseInt(t(540))/8+parseInt(t(502))/9*(parseInt(t(515))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(U);class F extends s.View{[$(551)];[$(516)];constructor(e,t=""){const n=$;super(e),this[n(510)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(507)];this[n(551)]=new B(e,t),this[n(516)]=this[n(533)](),this[n(497)]({tag:n(480),attributes:{class:["ck",n(483),r.if(n(532),n(485),e=>!e)],tabindex:"-1"},children:[{tag:n(480),attributes:{class:["ck",n(482),r.if(n(479),n(550))]},children:[this[n(551)],{tag:n(480),attributes:{class:["ck",n(518)]},children:[this[n(516)]]}]}]})}[$(477)](){const e=$;super[e(477)](),this[e(496)]&&this[e(551)][e(521)](this[e(496)]);let t=!1;this.on(e(554),(n,r,i)=>{const s=e,o=!this[s(551)][s(557)][s(495)](s(528));this[s(551)][s(521)](i),this[s(479)]&&o&&!t&&this[s(557)][s(475)]({top:this[s(557)][s(525)],behavior:s(517)})}),this.on(e(514),(n,r,i)=>{const s=e;t=!1,i?(this[s(496)]=null,this[s(551)][s(488)]()):this[s(496)]||this[s(551)][s(521)]("")}),this[e(530)](this[e(557)],e(542),()=>{t=!0}),this[e(530)](this[e(557)],e(523),()=>{t=!0})}[$(501)](){const e=$;this[e(557)][e(501)]()}[$(533)](){const e=$,n=this[e(527)],r=new s.ButtonView(this[e(527)]),i=e(553);return r[e(510)]({label:v(n,e(490)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(539)](e(532)).to(this,e(496),e=>!!e),r[e(539)](e(526)).to(this,e(479),e=>!e),r.on(e(538),()=>{const n=e;this[n(552)](this[n(551)][n(557)]),r[n(505)]=t.IconCheck,r[n(498)]=i+n(511),this[n(501)](),setTimeout(()=>{const e=n;r[e(505)]=t.IconCopy,r[e(498)]=i},1e3)}),r}[$(552)](e){const t=$,{window:n,document:r}=i.global;if(n[t(535)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(492)]],{type:t(491)}),"text/plain":new r([e[t(520)]||""],{type:t(503)})})];navigator[t(493)][t(494)](s)}else{const i=r[t(486)](t(480));i[t(531)][t(529)]=t(500),i[t(531)][t(545)]=t(549),i[t(492)]=t(506)+e[t(492)]+t(484),r[t(519)][t(522)](i);const s=r[t(556)]();s[t(476)](i[t(544)]),s[t(513)](i[t(512)]);const o=n[t(487)]();o[t(536)](),o[t(481)](s),r[t(548)](t(534)),i[t(504)]()}}}class B extends s.View{constructor(e,t=""){const n=$;super(e),this[n(499)]=this[n(489)](),this[n(497)]({tag:n(480),attributes:{class:["ck",n(537),t,n(558),n(547)]}})}[$(521)](e){const t=$;this[t(557)][t(492)]=e}[$(488)](){const e=$;this[e(557)][e(522)](this[e(499)][e(557)])}[$(489)](){const e=$,t=new s.View,n=this[e(527)],r=new s.SpinnerView;return r[e(532)]=!0,t[e(497)]({tag:e(480),attributes:{class:["ck",e(508)]},children:[r,{text:v(n,e(509))}]}),t[e(477)](),t}}function j(){const e=["30UIQITU","text","set","33272iHbtYE","5RJGsNo","2052387EUmpBg","179988GbGbFj","div","8joIrtB","ck-ai-form__error","bindTemplate","13kohdvo","9771288lirvxI","924343CyPjst","5npZMeP","content","setTemplate","27EFDFfn","48814PZmuas","616286SPXoGM"];return(j=function(){return e})()}function H(e,t){const n=j();return(H=function(e,t){return n[e-=375]})(e,t)}!function(e){const t=H,n=e();for(;;)try{if(119205===parseInt(t(386))/1*(-parseInt(t(380))/2)+-parseInt(t(379))/3*(parseInt(t(385))/4)+-parseInt(t(376))/5*(-parseInt(t(388))/6)+-parseInt(t(375))/7*(parseInt(t(390))/8)+-parseInt(t(387))/9+parseInt(t(382))/10*(-parseInt(t(381))/11)+parseInt(t(394))/12*(parseInt(t(393))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class q extends s.View{constructor(e,n=""){const r=H;super(e);const i=new s.IconView,o=this[r(392)];this[r(384)](r(383),n),i[r(377)]=t.IconError,this[r(378)]({tag:r(389),attributes:{class:["ck",r(391)]},children:[i,{text:o.to(r(383))}]})}}function z(e,t){const n=G();return(z=function(e,t){return n[e-=267]})(e,t)}const V=z;function G(){const e=["focusableChildren","2232bDbNsY","ck-ai-form__submit","target","504082KVaaro","filteredView","2307308PGMiLM","72963nPxHjX","add","children","focusFirst","Submit","set","3666845xFGncO","minRows","execute","bind","focusLast","rtl","resultsView","window","_createSubmitButton","32514nbMhyr","4124457gLocNq","fire","requestAnimationFrame","enter","excludeScrollbarsAndBorders","style","width","uiLanguageDirection","locale","isOn","keystrokes","submit","focus","showHistoryButtonView","_createShowHistoryButton","isVisible","isEmpty","focusCycler","85NRgWiz","3lMSnvH","isEnabled","8vUiyND","maxRows","update","ck-ai-form__toggle-history","left","queryView","History","10oKBdlF","value","render","fieldWrapperChildren","element","right","submitButtonView","fieldView","944028vXIhrJ"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(385252===-parseInt(t(282))/1+parseInt(t(277))/2+parseInt(t(320))/3*(parseInt(t(284))/4)+-parseInt(t(319))/5*(-parseInt(t(300))/6)+-parseInt(t(291))/7*(-parseInt(t(322))/8)+-parseInt(t(301))/9*(-parseInt(t(269))/10)+parseInt(t(285))/11*(-parseInt(t(279))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(275)];[V(314)];constructor(e,t){const n=V;super(e,t),this[n(267)][n(276)][n(292)]=1,this[n(267)][n(276)][n(323)]=3,this[n(275)]=this[n(299)](),this[n(314)]=this[n(315)](),this[n(278)][n(286)](this[n(314)],1),this[n(278)][n(286)](this[n(275)])}[V(271)](){const e=V;super[e(271)](),this[e(267)][e(272)][e(286)](this[e(314)]),this[e(287)][e(286)](this[e(275)]),this[e(311)][e(290)](e(304),(t,n)=>{const r=e;t[r(281)]==this[r(267)][r(276)][r(273)]&&(this[r(312)](),n())})}[V(299)](){const e=V,n=new s.ButtonView(this[e(309)]),r=this[e(309)];return n[e(290)]({icon:t.IconSubmit,label:v(r,e(289)),isVisible:!0,tooltip:!0,class:e(280)}),n.on(e(293),()=>{this[e(312)]()}),n[e(294)](e(321)).to(this[e(267)][e(276)],e(317),this,e(321),(e,t)=>!e&&t),n}[V(315)](){const e=V,n=new s.ButtonView(this[e(309)]),r=this[e(297)],o=this[e(309)];n[e(290)]({label:v(o,e(268)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(325)}),n[e(294)](e(310)).to(r,e(316)),n[e(294)](e(321)).to(this,e(321)),n.on(e(293),()=>{const t=e;r[t(316)]=!r[t(316)],r[t(316)]?this[t(283)][t(313)]():this[t(313)]()});const a=()=>{const t=e;i.global[t(298)][t(303)](()=>{const e=t;if((0,i.isVisible)(this[e(273)])){const t=new i.Rect(this[e(267)][e(276)][e(273)]),r=t[e(307)],s=e(296)===o[e(308)]?e(326):e(274);t[e(305)](),n[e(273)][e(306)][s]=r-t[e(307)]+1+"px"}})};return this[e(267)][e(276)].on(e(324),a),this.on(e(271),a),n}[V(312)](){const e=V,t=this[e(267)][e(276)][e(273)][e(270)];this[e(302)](e(312),t)}[V(313)](e){const t=V;-1===e?this[t(318)][t(295)]():this[t(318)][t(288)]()}}const K=Q;function Z(){const e=["8490XtBJyx","historyGroupView","length","execute","1299307UFYCZr","add","filter","639206tAFIrn","Clear","1862667IcyAax","locale","clearHistoryButton","items","set","label","delegate","6808146kcLgGr","Prompt history","children","709472BoDhJs","812PgertW","21TqVxun","1741134ZjcLxN","clearHistory","_createClearHistoryButton","fire"];return(Z=function(){return e})()}function Q(e,t){const n=Z();return(Q=function(e,t){return n[e-=385]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(710996===parseInt(t(408))/1+-parseInt(t(385))/2+parseInt(t(400))/3+parseInt(t(398))/4*(parseInt(t(404))/5)+-parseInt(t(394))/6+-parseInt(t(399))/7*(parseInt(t(397))/8)+parseInt(t(387))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Z);class Y extends s.ListView{[K(405)];[K(389)];constructor(e){const t=K;super(e),this[t(389)]=this[t(402)](),this[t(405)]=new s.ListItemGroupView,this[t(405)][t(396)][t(409)](this[t(389)],1),this[t(405)][t(392)]=v(e,t(395)),this[t(405)][t(390)][t(393)](t(407)).to(this),this[t(390)][t(409)](this[t(405)])}[K(410)](){const e=K;let t=0;for(const n of this[e(390)])t+=n[e(390)][e(406)];return{resultsCount:t,totalItemsCount:t}}[K(402)](){const e=K,t=this[e(388)],n=new s.ButtonView(this[e(388)]);return n[e(391)]({label:"("+v(t,e(386))+")",withText:!0}),n.on(e(407),()=>this[e(403)](e(401))),n}}const J={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function X(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(X).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>J[e]||"'")}(X(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=305]})(e,t)}function ne(){const e=["set","execute","children","add","1288070bfMxNv","560599xrtnXs","1989747LrDsKz","locale","1032bQglif","7237384WRWibS","38556fvDCFA","29931AZqUgT","prompt","fire","40jSBxWe","134GIRMgd","6BxwIHZ","2680564uzQkuC"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(456652===parseInt(t(309))/1+-parseInt(t(319))/2*(-parseInt(t(315))/3)+parseInt(t(321))/4+parseInt(t(308))/5*(parseInt(t(320))/6)+-parseInt(t(314))/7*(-parseInt(t(312))/8)+parseInt(t(310))/9+parseInt(t(318))/10*(-parseInt(t(313))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(311)],n);this[t(306)][t(307)](r),r[t(322)]({label:e[t(316)],withText:!0}),r.on(t(305),()=>{const n=t;this[n(317)](n(305),{value:ee(e[n(316)])})})}}const ie=se;function se(e,t){const n=ce();return(se=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=se,n=e();for(;;)try{if(825133===-parseInt(t(466))/1+parseInt(t(456))/2*(-parseInt(t(458))/3)+-parseInt(t(463))/4+parseInt(t(450))/5*(parseInt(t(453))/6)+parseInt(t(446))/7+-parseInt(t(461))/8*(parseInt(t(443))/9)+parseInt(t(449))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const oe=ie(455);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(465)](),this.on(e(445),(t,n)=>{const r=e,i=ue(n[r(464)]);for(const e of this)if(e!=n&&ue(e[r(464)])===i){this[r(452)](e);break}this[r(448)]>20&&this[r(452)](this[r(442)]),this[r(444)]()}),this.on(e(452),()=>{this[e(444)]()})}[ie(465)](){const e=ie,t=sessionStorage[e(459)](oe)||"[]";this[e(447)](JSON[e(462)](t))}[ie(444)](){const e=ie;sessionStorage[e(454)](oe,JSON[e(451)](this[e(460)](e=>e)))}}function ce(){const e=["stringify","remove","24xJwCsV","setItem","CKEditor/AIFormView/PromptHistory","1356598lOISkh","toLowerCase","6MzZNGJ","getItem","map","2807776oFnHFv","parse","1978188dRLUVs","prompt","_loadFromSessionStorage","47271jYUMbW","trim","last","27kfjzOE","_saveToSessionStorage","add","6962886WIMGIr","addMany","length","12776950xozyFe","1880090mzWxmZ"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(457)]()[t(467)]()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return X(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["setTemplate","prompt","stopProcessing","reset","insertContentBelow","mainAction","shift + tab","7657430txyeFO","isEnabled","tab","chain","replaceButton","copyButtonView","_promptHistory","replaceContent","high","keystrokes","AI_ERROR_FAILED","ck-hidden","2846058nvKOnY","bindTo","delegate","isVisible","toolbar","submit","fieldView","text","focusLast","_createToolbar","REPLACE","_createHistoryView","Ask AI and your prompts will be listed here for you to use later.","focusCycler","_createPromptView","set","add","queryView","historyGroupView","div","startProcessing","element","execute","errorView","ck-ai-form","search","23973eRzFdk","stopButton","isProcessing","Ask AI to improve generated text","focusFirst","tryAgainButton","listenTo","390KdPNrn","value","promptView","1972srYnat","9VYdxtg","label","submitPrompt","isError","focus","tryAgainEvent","Ask AI to edit or generate","clearHistory","locale","8514280WuoGtD","bind","fire","handleError","Empty history","1869746ijzOGU","_focusables","ck-ai-form-content","finishProcessing","bindTemplate","11350ZMxloS","contentArea","insertButton","createCollection","render","items","trim","clear","4360153kOggMP","focusTracker"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=153]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(983533===parseInt(t(192))/1+-parseInt(t(174))/2*(parseInt(t(167))/3)+-parseInt(t(177))/4*(-parseInt(t(197))/5)+parseInt(t(226))/6+-parseInt(t(205))/7+-parseInt(t(187))/8+parseInt(t(178))/9*(parseInt(t(214))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(206)];[he(223)];[he(198)];[he(230)];[he(176)];[he(164)];[he(193)];[he(154)];[he(220)];constructor(e,t,n=""){const r=he;super(e),this[r(156)](r(215),!0),this[r(156)](r(169),!1),this[r(156)](r(208),""),this[r(156)](r(175),""),this[r(156)](r(181),!1),this[r(156)](r(212),O[r(236)]),this[r(220)]=new ae,this[r(164)]=new q(e),this[r(198)]=new F(e,n),this[r(198)][r(188)](r(169)).to(this),this[r(198)][r(188)](r(175)).to(this),this[r(230)]=this[r(235)](),this[r(230)][r(188)](r(212)).to(this),this[r(176)]=this[r(155)](),this[r(206)]=new i.FocusTracker,this[r(223)]=new i.KeystrokeHandler,this[r(193)]=this[r(200)]([this[r(198)],this[r(198)][r(219)],this[r(230)],this[r(176)]]),this[r(154)]=new s.FocusCycler({focusables:this[r(193)],focusTracker:this[r(206)],keystrokeHandler:this[r(223)],actions:{focusPrevious:r(213),focusNext:r(216)}}),this[r(154)][r(217)](this[r(176)][r(154)]),this[r(176)][r(158)][r(232)][r(188)](r(175)).to(this,r(208));const o=this[r(196)];this[r(207)]({tag:r(160),attributes:{class:["ck",r(165),t],tabindex:"-1"},children:[{tag:r(160),attributes:{class:["ck",r(194)]},children:[{tag:r(160),attributes:{class:[o.if(r(181),r(225),e=>!e)]},children:[this[r(164)]]},this[r(198)],this[r(230)],this[r(176)]]}]})}[he(201)](){const e=he;super[e(201)](),this[e(206)][e(157)](this[e(198)][e(162)]),this[e(206)][e(157)](this[e(198)][e(219)][e(162)]),this[e(206)][e(157)](this[e(230)][e(162)]),this[e(206)][e(157)](this[e(176)][e(162)]),this[e(223)][e(173)](this[e(162)])}[he(182)](e=1){const t=he;-1===e?this[t(154)][t(234)]():this[t(154)][t(171)]()}[he(210)](){const e=he;this[e(208)]="",this[e(175)]="",this[e(181)]=!1,this[e(176)][e(210)](),this[e(198)][e(229)]=!1,this[e(230)][e(229)]=!1}[he(155)](){const e=he,t=this[e(186)],n=new W(t,{queryView:{label:v(t,e(184)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(191)),secondary:v(t,e(153))}}},filteredView:this[e(237)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(188)](e(215)).to(this,e(215),this,e(169),(e,t)=>e&&!t),this[e(173)](n,e(231),(t,n)=>{const r=e;this[r(208)]=n;const i=le(n);this[r(189)](r(180),i),n[r(203)]()&&this[r(220)][r(157)]({prompt:i},0)},{priority:e(222)}),n}[he(237)](){const e=he,t=new Y(this[e(186)]);return t[e(159)][e(202)][e(227)](this[e(220)]).as(re),t.on(e(185),()=>{const t=e;this[t(220)][t(204)](),this[t(176)][t(166)](""),this[t(176)][t(182)]()}),t}[he(235)](){const e=he,t=new L(this[e(186)]);return t[e(218)][e(188)](e(215)).to(this,e(215),this,e(169),this,e(175),(e,t,n)=>e&&!t&&!!n),t[e(218)][e(228)](e(163)).to(this,e(221)),t[e(199)][e(188)](e(215)).to(this,e(215),this,e(169),this,e(175),(e,t,n)=>e&&!t&&!!n),t[e(199)][e(228)](e(163)).to(this,e(211)),t[e(172)][e(188)](e(215)).to(this,e(215),this,e(169),(e,t)=>e&&!t),t[e(172)][e(228)](e(163)).to(this,e(183)),t[e(168)][e(188)](e(215)).to(this,e(169)),t[e(168)][e(228)](e(163)).to(this,e(209)),t}[he(161)](){const e=he;this[e(175)]="",this[e(181)]=!1,this[e(169)]=!0,this[e(198)][e(229)]=!0,this[e(230)][e(229)]=!0,this[e(198)][e(182)]()}[he(195)](){const e=he,t=this[e(186)];this[e(169)]=!1,this[e(208)]="",this[e(176)][e(210)](),this[e(175)]&&(this[e(176)][e(158)][e(179)]=v(t,e(170)))}[he(190)](e){const t=he,n=this[t(186)];this[t(195)](),this[t(181)]=!0,this[t(164)][t(233)]=e||v(n,t(224)),this[t(175)]||(this[t(198)][t(229)]=!1)}}var ge=n(673),ye=n.n(ge),be=n(545),we=n.n(be),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=we(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Me=n(181),Re={attributes:{"data-cke":!0}};Re.setAttributes=Ee(),Re.insert=ke().bind(null,"head"),Re.domAPI=we(),Re.insertStyleElement=Ie();ye()(Me.A,Re);Me.A&&Me.A.locals&&Me.A.locals;var Pe=n(676),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=we(),Ce.insertStyleElement=Ie();ye()(Pe.A,Ce);Pe.A&&Pe.A.locals&&Pe.A.locals;const Te=Oe;function Oe(e,t){const n=Ne();return(Oe=function(e,t){return n[e-=393]})(e,t)}function Ne(){const e=["isPremiumPlugin","wasMoved","27wBwLKJ","rawHtml","componentFactory","values","updatePosition","custom","184855qZTytg","replace","editing","addMany","_initView","show","licenseKey","ck-ai-commands-dropdown ","filter","getRanges","Generated content: %0","ai.useTheme","pluginName","reset","aiLicenseKeyEvaluationLimit","3992990YDMstg","1023QDUvLi","_populateMenuBarMenu","isCollapsed","_uiCssClasses","735168FWYDQZ","REPLACE","336PLkgQl","change:value","plugins","menuView","command:","once","push","isOfficialPlugin","model","textAdapter","change","474KIzSOH","1kzHIUB","_onExecute","DataTransfer","aiLicenseKeyValid","AI Commands","showUI","AIAssistantUI","isEnabled","listenTo","config","render","enabledCommandsIds","sort","requires","_aiAssistantController","add","_dialog","ai.aiAssistant.contentAreaCssClass","_commandDefinitions","<p>","get","bind","usageLimit","splice","order","evaluationLimit","text","length","hideUI","menuBar:aiAssistant","ck-ai-assistant-button ","comment","children","aiLicenseKeyNotAllowed","_initAriaAiStatusChangeAnnouncements","commands","_getResolvedCommandsDefinitions","_showLicenseError","getLimitElement","execute","isFlat","buttonView","schema","insertContent","featureNotAllowed","getData","source","buttons","_licenseKeyCheckInterval","insertContentBelow","hide","_aiAdapter","panelView","aiLicenseKeyInvalid","map","init","label","errorView","copy","AIAssistant","selection","groupId","AI Assistant","trialLimit","aiCommands","invalid","125237fmCwqr","getSelectedBlocks","EDITOR_TOP_SIDE","document","showAIAssistant","384610qeEBxy","_createAIAssistantUIButton","requiresContent","replaceContent","ai.aiAssistant.commands","aiLicenseKeyExpired","menuPanelClass","</p>","change:isError","INSERT","_getMenuBarGroupButtons","menuBar:aiCommands","queryView","contentArea","Error during AI content generation: %0","AI is writing","media","domainLimit","_forceMarkersCopy","define","isOn","ai.aiAssistant.disabledElements","text/html","getSelectedElement","from","prompt","currentContext","aiLicenseKeyDomainLimit","editor","updateView","polite","menuitemcheckbox","_formView","showFakeVisualSelection","includes","body","locale","announce","setSelection","focus","update","items","expired","fire","trim","delegate","destroy","set","ck-ai-assistant-ui","11871890ATqeHp","change:enabledCommandsIds","ai-commands-config-order-collision","3644Fsemfa","aiLicenseKeyTrialLimit","forEach","view","hideFakeVisualSelection","aiLicenseKeyUsageLimit","change:isProcessing","tableOfContents","fieldView","aiAssistant"," ck-ai-assistant-ui_theme","promptView","groupLabel"];return(Ne=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(815670===-parseInt(t(418))/1*(parseInt(t(489))/2)+-parseInt(t(400))/3*(parseInt(t(541))/4)+parseInt(t(399))/5+parseInt(t(417))/6*(-parseInt(t(484))/7)+-parseInt(t(404))/8*(-parseInt(t(556))/9)+parseInt(t(538))/10+parseInt(t(562))/11*(parseInt(t(406))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ne);const Le=globalThis[Te(420)];class $e extends e.Plugin{[Te(568)];[Te(466)];[Te(434)];[Te(521)];[Te(469)];[Te(432)];[Te(403)]="";static get[Te(396)](){return Te(424)}static get[Te(413)](){return!0}static get[Te(554)](){return!0}static get[Te(431)](){return[a.ClipboardMarkersUtils,f,y,s.Dialog]}constructor(e){const t=Te;super(e),e[t(427)][t(508)](t(510),[t(505),t(557),t(548)]),e[t(427)][t(508)](t(435),""),e[t(427)][t(508)](t(395),!0),this[t(403)]=t(537)+(e[t(427)][t(438)](t(395))?t(551):"")}[Te(473)](){const e=Te,{editor:n}=this;this[e(469)]=n[e(408)][e(438)](y),this[e(434)]=n[e(408)][e(438)](s.Dialog),this[e(521)]=null,this[e(436)]=this[e(454)]();const r=new S(n,Array[e(513)](this[e(436)][e(559)]()));n[e(453)][e(433)](e(488),r),n.ui[e(558)][e(433)](e(482),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(536)]({class:a(569)+this[a(403)]}),c[a(459)][a(536)]({label:v(i,a(422)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(457),e=>this[a(419)](e[a(464)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(544)][a(524)],function(e){const t=a,n=o(e[t(427)][t(438)](t(493)),e[t(525)]),r=Ue(e,n)[t(570)](e=>e[t(453)][t(445)]);return 1===r[t(445)]?Ue(e,r[0][t(453)])[t(472)](e=>({id:e.id,label:e[t(474)]})):r[t(472)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(472)](e=>({id:e.id,label:e[r(474)]}))}})}(n),{ariaLabel:v(i,a(422))}),c[a(409)][a(495)]=a(569)+this[a(403)],r.on(a(539),u),c[a(409)][a(411)](a(428),u),c;function u(){const e=a;c[e(425)]=r[e(429)][e(445)]>0;for(const t of c[e(409)][e(465)])t[e(425)]=r[e(429)][e(523)](t.id)}}),n.ui[e(558)][e(433)](e(500),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(459)][a(536)]({label:v(i,a(422)),icon:t.IconMagicWand}),c[a(439)](a(425)).to(r,a(429),e=>e[a(445)]>0);const u=o(n[a(427)][a(438)](a(493)),i);return this[a(401)](r,c,u,e=>this[a(419)](e)),c}),n.ui[e(558)][e(433)](e(550),()=>{const t=e,n=this[t(490)](s.ButtonView);return n[t(536)]({tooltip:!0,class:t(448)+this[t(403)]}),n}),n.ui[e(558)][e(433)](e(447),()=>{const t=e,n=this[t(490)](s.MenuBarMenuListItemButtonView);return n[t(536)]({role:t(520)}),n}),this[e(568)]=this[e(517)][e(427)][e(438)](e(568));const i=this[e(517)];this[e(466)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(421)==s||t(471)==s||t(494)==s||t(516)==s||t(451)==s||t(398)==s||t(542)==s||t(546)==s){delete i[r],n=s,clearInterval(this[t(466)]),this[t(466)]=void 0;break}}t(471)==n&&i[t(455)](t(483)),t(494)==n&&i[t(455)](t(531)),t(516)==n&&i[t(455)](t(506)),t(451)==n&&i[t(455)](t(462),t(477)),t(398)==n&&i[t(455)](t(443)),t(542)==n&&i[t(455)](t(481)),t(546)==n&&i[t(455)](t(440))},1e3)}[Te(535)](){const e=Te;super[e(535)](),this[e(466)]&&clearInterval(this[e(466)])}[Te(423)](e="",n="",r=Te(561)){const i=Te,o=this[i(517)],u=o[i(564)][i(544)],d=o[i(408)][i(438)](f),l=o[i(408)][i(438)](a.ClipboardMarkersUtils);d[i(522)]();const h=new Le,p=new ClipboardEvent(i(476),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,p,{dataTransfer:m});l[i(507)](i(449),()=>{const e=i;u[e(487)][e(532)](e(476),g)}),this[i(521)]||(this[i(566)](),this[i(432)]=new P(o,this[i(469)][i(415)],this[i(521)]));let y=m[i(463)](i(511));const b=o[i(414)][i(487)][i(478)],w=Array[i(513)](b[i(393)]());1===w[i(445)]&&w[0][i(458)]&&!b[i(512)]()&&""!==y[i(563)](/&nbsp;/g,"")[i(533)]()&&(y=i(437)+y+i(496)),this[i(432)][i(518)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:O[o[i(414)][i(487)][i(478)][i(402)]?i(498):i(405)]}),i(550)!==this[i(434)].id?this[i(434)][i(567)]({id:i(550),icon:t.IconRobotPencil,title:v(this[i(517)][i(525)],i(480)),content:this[i(521)],position:s.DialogViewPosition[i(486)],onShow:()=>{const e=i;this[e(521)][e(528)]()},onHide:()=>{const e=i;this[e(432)][e(397)](),d[e(545)]()}}):this[i(434)][i(544)][i(555)]||this[i(434)][i(544)][i(560)]()}[Te(446)](){const e=Te;this[e(434)][e(468)]()}[Te(454)](){const e=Te,t=new Map,n=o(this[e(517)][e(427)][e(438)](e(493)),this[e(517)][e(525)]);for(const r of n)for(const n of r[e(453)])t[e(536)](n.id,{...n,groupId:r[e(479)],groupLabel:r[e(553)]||r[e(479)]});return t}[Te(490)](e){const n=Te,r=this[n(517)],i=r[n(453)][n(438)](n(488)),s=new e(r[n(525)]);return s[n(536)]({label:v(r[n(525)],n(480)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(439)](n(425)).to(i),s[n(439)](n(509)).to(this[n(434)],"id",e=>n(550)===e),this[n(426)](s,n(457),()=>{const e=n;s[e(509)]?this[e(446)]():i[e(457)]()}),s}[Te(566)](){const e=Te,t=this[e(517)][e(408)][e(438)](f);this[e(521)]=new me(this[e(517)][e(525)],this[e(403)],this[e(517)][e(427)][e(438)](e(435))),this[e(521)].on(e(407),()=>{const t=e;this[t(434)][t(544)][t(555)]||this[t(434)][t(544)][t(560)]()}),this[e(521)][e(552)][e(501)][e(549)].on(e(529),()=>{const t=e;this[t(434)][t(544)][t(555)]||this[t(434)][t(544)][t(560)]()}),this[e(426)](this[e(521)],e(492),()=>{const n=e;t[n(461)](this[n(432)][n(515)]),this[n(446)]()}),this[e(426)](this[e(521)],e(467),()=>{const n=e;t[n(467)](this[n(432)][n(515)]),this[n(446)]()}),this[e(452)]()}[Te(452)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(517)];this[e(521)][e(502)].on(e(547),(r,i,s)=>{const o=e,a=this[o(432)][o(515)];s?n[o(526)](v(t,o(504))):a&&n[o(526)](v(t,o(394),a),{politeness:o(519),isUnsafeHTML:!0})}),this[e(521)].on(e(497),(r,i,s)=>{const o=e;if(s){const e=this[o(521)][o(475)][o(444)];n[o(526)](v(t,o(503),e))}})}[Te(419)](e){const t=Te,n=this[t(436)][t(438)](e),r=this[t(517)],s=r[t(414)][t(487)][t(478)],o=r[t(453)][t(438)](t(488)),a=r[t(408)][t(438)](f),c=("_ungrouppedCommands"!==n[t(479)]?n[t(553)]+": ":"")+n[t(474)];if(!1!==n[t(491)]&&s[t(402)]){const e=(0,i.first)(s[t(485)]())||r[t(414)][t(460)][t(456)](s);r[t(414)][t(416)](n=>{n[t(527)](e,"in")})}a[t(522)](),o[t(457)](n[t(514)],c,t(410)+e)}[Te(401)](e,t,n,r){const i=Te,o=this[i(517)],a=o[i(525)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(570)](e=>e[i(453)][i(445)]);1===u[i(445)]?this[i(499)]({command:e,commands:u[0][i(453)],parentMenuView:t,onExecute:r})[i(543)](e=>c[i(530)][i(433)](e)):u[i(543)](({groupId:n,groupLabel:o,commands:u})=>{const d=i,l=new s.MenuBarMenuListItemView(a,t),h=new s.MenuBarMenuView(a),f=new s.MenuBarMenuListView(a),p=this[d(499)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(459)][d(536)]({label:o||n}),h[d(534)](d(457)).to(t),f[d(530)][d(565)](p),h[d(470)][d(450)][d(433)](f),l[d(450)][d(433)](h),c[d(530)][d(433)](l)}),t[i(470)][i(450)][i(433)](c)}[Te(499)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(517)],a=o[i(525)];return Ue(o,t)[i(472)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(536)]({label:t[o(474)]}),u[o(534)](o(457)).to(n),u.on(o(457),()=>r(t.id)),u[o(439)](o(425)).to(e,o(429),e=>e[o(523)](t.id)),c[o(450)][o(433)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(442)]&&void 0===t[n(442)]?1:void 0===e[n(442)]&&void 0!==t[n(442)]?-1:void 0!==e[n(442)]&&void 0!==t[n(442)]?e[n(442)]-t[n(442)]:0}function Ue(e,t){const n=Te;t[n(430)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(442)]){if(o[n(442)]in r)throw new i.CKEditorError(n(540),e,{conflictingDefinitions:[o,r[o[n(442)]]]});r[o[n(442)]]=o,s[n(441)](o[n(442)],0,o)}else s[n(412)](o);return s}function Fe(){const e=["190jstMWu","Casual","translate","Translate the content to English language.","translateArabic","summarize","Friendly","casual","Translate the content to Spanish language.","concat","ai.aiAssistant.removeCommands","isOfficialPlugin","292478NvhBzD","isPremiumPlugin","Change style","Portuguese","ai.aiAssistant.preserveComments","config","Continue","French","Summarize","requires","professional","11960OfweEv","poetic","changeTone","Translate the content to German language.","translateFrench","Make shorter","Simplify language","generate","translateChinese","Journalism","push","translateGerman","set","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Professional","Translate the content to Simplified Chinese language.","friendly","Rewrite this content as a business professional with formal language.","filter","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Translate the content to Arabic language.","translatePortuguese","groupId","get","journalism","Edit or review","2429DRbOza","simplifyLanguage","German","AIAssistant","Change tone","Direct","continue","507782CykmiA","Generate from selection","Business","Confident","Poetic","improveWriting","Translate the content to Portuguese language.","find","editOrReview","locale","Improve using direct language, using only the essential information.","105oHNUDB","Improve using friendly, comforting language, to convey understanding and empathy.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","3319432vWFBTd","confident","translateHindi","business","3016695nuaiUB","Legal","105612YXTYpb","Improve using compelling, optimistic language to convey confidence in the writing.","Improve writing","legal","Make longer","translateSpanish","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Simplified Chinese","ai.aiAssistant.extraCommandGroups","makeShorter","1847475THcuqt","ai.aiAssistant.commands","Translate the content to Hindi language.","makeLonger","English","Rewrite this content as a legal professional using valid legal terminology.","direct","forEach","Arabic","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Rewrite this content as a journalist using engaging language to convey the importance of the information.","changeStyle","Translate the content to French language.","Improve using casual, informal language to convey a casual conversation with a real person.","Translate","Spanish","translateEnglish","includes","commands","define","1qIHVLo","Improve this content by using descriptive language and inserting more information and more detailed explanations.","pluginName","Hindi"];return(Fe=function(){return e})()}const Be=je;function je(e,t){const n=Fe();return(je=function(e,t){return n[e-=125]})(e,t)}!function(e){const t=je,n=e();for(;;)try{if(750186===parseInt(t(181))/1*(parseInt(t(197))/2)+parseInt(t(149))/3+parseInt(t(145))/4+parseInt(t(142))/5*(parseInt(t(151))/6)+-parseInt(t(236))/7*(parseInt(t(208))/8)+-parseInt(t(161))/9+-parseInt(t(185))/10*(parseInt(t(131))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Fe);class He extends e.Plugin{static get[Be(206)](){return[$e,f]}static get[Be(183)](){return Be(127)}static get[Be(196)](){return!0}static get[Be(198)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(202)],r=e[t(140)];n[t(180)](t(201),!0),n[t(180)](t(162),qe(r)),n[t(180)](t(159),[]),n[t(180)](t(195),[]);let i=o(n[t(233)](t(162)),r);const s=n[t(233)](t(159)),a=n[t(233)](t(195));s[t(168)](e=>{const n=t,r=i[n(138)](t=>t[n(232)]===e[n(232)]);r?r[n(179)]=r[n(179)][n(194)](e[n(179)]):i[n(218)](e)}),i=i[t(228)](e=>!a[t(178)](e[t(232)])),i[t(168)](e=>{const n=t;e[n(179)]=e[n(179)][n(228)](e=>!a[n(178)](e.id))}),n[t(220)](t(162),i)}}function qe(e){const t=Be;return[{groupId:t(139),groupLabel:v(e,t(235)),commands:[{id:t(136),label:v(e,t(153)),prompt:t(223)},{id:t(160),label:v(e,t(213)),prompt:t(222)},{id:t(164),label:v(e,t(155)),prompt:t(182)},{id:t(125),label:v(e,t(214)),prompt:t(221)}]},{groupId:t(215),groupLabel:v(e,t(132)),commands:[{id:t(190),label:v(e,t(205)),prompt:t(229)},{id:t(130),label:v(e,t(203)),prompt:t(157)}]},{groupId:t(210),groupLabel:v(e,t(128)),commands:[{id:t(207),label:v(e,t(224)),prompt:t(144)},{id:t(192),label:v(e,t(186)),prompt:t(174)},{id:t(167),label:v(e,t(129)),prompt:t(141)},{id:t(146),label:v(e,t(134)),prompt:t(152)},{id:t(226),label:v(e,t(191)),prompt:t(143)}]},{groupId:t(172),groupLabel:v(e,t(199)),commands:[{id:t(148),label:v(e,t(133)),prompt:t(227)},{id:t(154),label:v(e,t(150)),prompt:t(166)},{id:t(234),label:v(e,t(217)),prompt:t(171)},{id:t(209),label:v(e,t(135)),prompt:t(170)}]},{groupId:t(187),groupLabel:v(e,t(175)),commands:[{id:t(177),label:v(e,t(165)),prompt:t(188)},{id:t(156),label:v(e,t(176)),prompt:t(193)},{id:t(231),label:v(e,t(200)),prompt:t(137)},{id:t(219),label:v(e,t(126)),prompt:t(211)},{id:t(212),label:v(e,t(204)),prompt:t(173)},{id:t(216),label:v(e,t(158)),prompt:t(225)},{id:t(147),label:v(e,t(184)),prompt:t(163)},{id:t(189),label:v(e,t(169)),prompt:t(230)}]}]}const ze=Ve;function Ve(e,t){const n=Ge();return(Ve=function(e,t){return n[e-=198]})(e,t)}function Ge(){const e=["object","locale","name","application/json","48MrWruA","_prepareRequestParameters","get","1101954pvRXEX","AbortError","requires","abortController","_prepareRequestHeaders","catch","makeRequest","aitextadapter-send-request-failed","init","assign","AI_ERROR_GET_PARAMETERS","1984788JhtWiO","plugins","aborted","1630UeHnab","552108fDNekM","resolve","abort","signal","6424kBlpOP","58scLGpM","sendRequest","textAdapter","error","reject","editor","3526428pvbsTK","46674JAEAgZ","4070010PqMEmP","AI_ERROR_GET_HEADERS"];return(Ge=function(){return e})()}!function(e){const t=Ve,n=e();for(;;)try{if(499877===parseInt(t(221))/1*(parseInt(t(220))/2)+-parseInt(t(216))/3+parseInt(t(227))/4+-parseInt(t(229))/5+parseInt(t(212))/6+parseInt(t(201))/7*(parseInt(t(198))/8)+-parseInt(t(228))/9*(parseInt(t(215))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[ze(204)];static get[ze(203)](){return[y]}constructor(e){const t=ze;super(e),this[t(204)]=new AbortController}[ze(209)](){const e=ze;this[e(226)][e(213)][e(200)](y)[e(223)]=this}[ze(218)](){const e=ze;this[e(204)][e(219)][e(214)]||(this[e(204)][e(218)](),this[e(204)]=new AbortController)}async[ze(207)](e){const t=ze;return this[t(222)](e)[t(206)](e=>{const n=t;if(e instanceof b)return Promise[n(225)](e);if(n(202)==e[n(233)])return Promise[n(217)]();throw console[n(224)](e),new i.CKEditorError(n(208),null)})}async[ze(205)](e,t){const n=ze,r=this[n(226)][n(232)],i={"Content-Type":n(234)};if(n(231)==typeof e)Object[n(210)](i,e);else if(e)try{const r=await e(t);Object[n(210)](i,r)}catch{return Promise[n(225)](new b(v(r,n(230))))}return i}async[ze(199)](e,t){const n=ze,r=this[n(226)][n(232)];if(n(231)==typeof e)return e;try{return await e(t)}catch{return Promise[n(225)](new b(v(r,n(211))))}}}const Ke=Qe;function Ze(){const e=["gpt-4o","\nYou must keep the text formatting.\n\nContent:\n","_readStaticResponse","902790KyCklc","get","length","stringify","prepareMessages","473814jUOMMy","ai.openAI.apiUrl","16098489XZeFzx","define","content","getReader","text","stream","sendRequest","body","1289304dchbFq","parse","choices","signal","OpenAITextAdapter","system","AI_ERROR_CONTEXT_LENGTH","decode","_requestParameters","message","delta","_requestHeaders","split","editor","[DONE]","resolve","json","read","config","filter","replace","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","abortController","_prepareRequestParameters","data: ","user","ai.openAI.requestHeaders","pluginName","join","locale","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","4eleCrr","https://api.openai.com/v1/chat/completions","5107780RfJoPI","includes","reject","5pSSBBo","context_length_exceeded","map","8qRoVGm","_cleanUpData","AI_ERROR_MODERATION","ai.openAI.requestParameters","_apiUrl","_readStreamableResponse","11371472gXBECt","POST","1107417sjczYv","_prepareRequestHeaders","Moderation","Instruction:\n","_isBufferIncomplete"];return(Ze=function(){return e})()}function Qe(e,t){const n=Ze();return(Qe=function(e,t){return n[e-=103]})(e,t)}!function(e){const t=Qe,n=e();for(;;)try{if(963067===parseInt(t(149))/1+parseInt(t(159))/2+parseInt(t(136))/3*(parseInt(t(120))/4)+-parseInt(t(125))/5*(-parseInt(t(144))/6)+parseInt(t(134))/7+parseInt(t(128))/8*(-parseInt(t(151))/9)+-parseInt(t(122))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ze);class Ye extends We{[Ke(132)];[Ke(170)];[Ke(167)];static get[Ke(116)](){return Ke(163)}constructor(e){const t=Ke;super(e),e[t(107)][t(152)](t(150),t(121)),e[t(107)][t(145)](t(131))||e[t(107)][t(152)](t(131),{model:t(141),temperature:1,top_p:1,stream:!0}),this[t(132)]=e[t(107)][t(145)](t(150)),this[t(170)]=e[t(107)][t(145)](t(115))||{},this[t(167)]=e[t(107)][t(145)](t(131))}async[Ke(157)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(172)][i(118)],o=await this[i(148)](e,t,r),a=await this[i(137)](this[i(170)],r),c=await this[i(112)](this[i(167)],r),u={messages:o,...c},d={method:i(135),headers:a,body:JSON[i(147)](u),signal:this[i(111)][i(162)]},l=await fetch(this[i(132)],d);if(l.ok)return c[i(156)]?await this[i(133)](l,n):await this[i(143)](l,n),Promise[i(104)]();{const e=await l[i(155)]();return e[i(123)](i(126))?Promise[i(124)](new b(v(s,i(165)))):e[i(123)](i(138))?Promise[i(124)](new b(v(s,i(130)))):Promise[i(124)](new Error(e))}}async[Ke(148)](e,t,n){const r=Ke;let i,s;return t?(i=r(119),s=r(139)+e+r(142)+t):(i=r(110),s=e),[{role:r(164),content:i},{role:r(114),content:s}]}async[Ke(133)](e,t){const n=Ke,r=e[n(158)][n(154)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(106)](),d=s+i[n(166)](u);let l="";c=e;try{l=this[n(129)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(140)](o)||o&&(a+=o,o="",t(a))}return Promise[n(104)]()}async[Ke(143)](e,t){const n=Ke;return t((await e[n(105)]())[n(161)][0][n(168)][n(153)]),Promise[n(104)]()}[Ke(140)](e){const t=Ke,n=e[t(171)]("<")[t(146)]!==e[t(171)](">")[t(146)],r=e[t(146)]<30;return n&&r}[Ke(129)](e){const t=Ke;return e[t(171)](/\n(?![^{]*\})/g)[t(127)](e=>e[t(109)](t(113),""))[t(108)](e=>e&&e[t(146)]>0&&t(103)!==e)[t(127)](e=>{const n=t,{choices:r}=JSON[n(160)](e);if(r[0]?.[n(169)]?.[n(153)])return r[0][n(169)][n(153)]})[t(108)](e=>e)[t(117)]("")}}class Je{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new Je({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return Je.clone(this)}}const Xe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},et=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!Je.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),Xe)}}),tt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},nt="X-Amzn-Trace-Id",rt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},it=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!Je.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===nt.toLowerCase())??nt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[nt]=o),t({...n,request:r})})(e),rt)}}),st=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const ot={},at=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ct=(e,t=!1)=>{if(!t)return at.test(e);const n=e.split(".");for(const e of n)if(!ct(e))return!1;return!0},ut=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),dt=e=>ut.test(e)||e.startsWith("[")&&e.endsWith("]"),lt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!lt(t))return!1;return!0}return!!ct(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!dt(e)))};let ht=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),ft="";const pt={isVirtualHostableS3Bucket:lt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=ht;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function mt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}ot.aws=pt;const gt=/\d{12}\.ddb/;const yt="user-agent",bt="x-amz-user-agent",wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const kt=e=>(t,n)=>async r=>{const{request:i}=r;if(!Je.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(St)||[],a=(await e.defaultUserAgentProvider()).map(St);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&mt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?mt(e,"RETRY_MODE_ADAPTIVE","F"):mt(e,"RETRY_MODE_STANDARD","E"):mt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(gt)&&mt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":mt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":mt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":mt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&mt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))mt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(St)||[],d=await e.userAgentAppId();d&&a.push(St([`app/${d}`]));const l=(ft?[ft]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[bt]=s[bt]?`${s[yt]} ${h}`:h),s[yt]=l):s[bt]=l,t({...r,request:i})},St=e=>{const t=e[0].split("/").map(e=>e.replace(wt,"-")).join("/"),n=e[1]?.replace(vt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Et={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},At=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),It=e=>At(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,_t="__smithy_context",xt=e=>e[_t]||(e[_t]={});const Mt=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=xt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},Rt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class Pt{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Ct=e=>e=>{throw e},Tt=(e,t)=>{},Ot={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Nt=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!Je.isInstance(n.request))return e(n);const r=xt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||Ct)(i));return(o.successHandler||Tt)(a.response,i),a},Ot)}}),Lt="content-length";const $t={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Dt=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(Je.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(Lt))try{const t=n(e);r.headers={...r.headers,[Lt]:String(t)}}catch(e){}}return e({...t,request:r})}),$t)}}),Ut=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Ft=async e=>{};const Bt=e=>{if("string"==typeof e)return Bt(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},jt=e=>"object"==typeof e?"url"in e?Bt(e.url):e:Bt(e);var Ht;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Ht||(Ht={}));const qt=Ht.STANDARD,zt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Vt=["TimeoutError","RequestTimeout","RequestTimeoutException"],Gt=[500,502,503,504],Wt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Kt=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Zt=e=>429===e.$metadata?.httpStatusCode||zt.includes(e.name)||1==e.$retryable?.throttling,Qt=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Vt.includes(e.name)||Wt.includes(e?.code||"")||Kt.includes(e?.code||"")||Gt.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Qt(e.cause,t+1);class Yt{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Yt.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Zt(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Yt.setTimeoutFn=setTimeout;const Jt=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class Xt{constructor(e){this.maxAttempts=e,this.mode=Ht.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Jt({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,Jt({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class en{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Ht.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Yt,this.standardRetryStrategy=new Xt(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}class tn{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}class nn{trace(){}debug(){}info(){}warn(){}error(){}}const rn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let sn;const on=new Uint8Array(16);function an(){if(!sn&&(sn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sn(on)}const cn=[];for(let e=0;e<256;++e)cn.push((e+256).toString(16).slice(1));function un(e,t=0){return cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]}const dn=function(e,t,n){if(rn.randomUUID&&!t&&!e)return rn.randomUUID();const r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return un(r)},ln=e=>e?.body instanceof ReadableStream,hn=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),fn=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,pn=e=>{const t={error:e,errorType:mn(e)},n=bn(e.$response);return n&&(t.retryAfterHint=n),t},mn=e=>Zt(e)?"THROTTLING":Qt(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Qt(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",gn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},yn=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!fn(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=Je.isInstance(u);for(d&&(u.headers["amz-sdk-invocation-id"]=dn());;)try{d&&(u.headers["amz-sdk-request"]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=pn(t);if(o=hn(t),d&&ln(u))throw(n.logger instanceof nn?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise(e=>setTimeout(e,s))}}})(e),gn)}}),bn=e=>{if(!tn.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)},wn=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},vn=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,kn=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of wn(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of wn(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${vn(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>Sn[t.step]-Sn[e.step]||En[t.priority||"normal"]-En[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=wn(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${vn(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${vn(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${vn(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=wn(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${vn(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${vn(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${vn(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(kn()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=wn(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of wn(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=wn(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(kn());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return vn(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},Sn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},En={high:3,normal:2,low:1};class An{constructor(e){this.config=e,this.middlewareStack=kn()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const In=(_n=3e5,e=>xn(e)&&e.expiration.getTime()-Date.now()<_n);var _n;const xn=e=>void 0!==e.expiration,Mn={},Rn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Mn[e]=t,Rn[t]=e}function Pn(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Rn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Rn[r]}return t}function Cn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Mn[e[n]];return t}const Tn=e=>(new TextEncoder).encode(e),On=e=>"string"==typeof e?Tn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Nn="X-Amz-Date",Ln="X-Amz-Signature",$n="X-Amz-Security-Token",Dn="authorization",Un=Nn.toLowerCase(),Fn=[Dn,Un,"date"],Bn=Ln.toLowerCase(),jn="x-amz-content-sha256",Hn=$n.toLowerCase(),qn={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},zn=/^proxy-/,Vn=/^sec-/,Gn="AWS4-HMAC-SHA256",Wn="AWS4-HMAC-SHA256-PAYLOAD",Kn="aws4_request",Zn={},Qn=[],Yn=(e,t,n)=>`${e}/${t}/${n}/${Kn}`,Jn=(e,t,n)=>{const r=new e(t);return r.update(On(n)),r.digest()},Xn=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in qn||t?.has(s)||zn.test(s)||Vn.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},er=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===jn)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(On(t)),Cn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class tr{format(e){const t=[];for(const n of Object.keys(e)){const r=Tn(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=Tn(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ir.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!rr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Pn(e.value.replace(/\-/g,"")),1),d}}}var nr;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(nr||(nr={}));const rr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ir{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&sr(t),new ir(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&sr(e),parseInt(Cn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function sr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const or=e=>{e=Je.clone(e);for(const t of Object.keys(e.headers))Fn.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ar=e=>encodeURIComponent(e).replace(/[!'()*]/g,cr),cr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ur=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class dr{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Ut(n),this.credentialProvider=Ut(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Bn)continue;const i=ar(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ar(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${ar(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(On(n));return`${r}\n${e}\n${t}\n${Cn(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ar(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,ur(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class lr extends dr{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s}),this.headerFormatter=new tr}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Yn(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=Je.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(or(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[$n]=d.sessionToken),m.query["X-Amz-Algorithm"]=Gn,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[Nn]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Xn(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[Ln]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await er(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Yn(a,o,s??this.service),d=await er({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Cn(await l.digest()),f=[Wn,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(On(e)),Cn(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=or(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Yn(d,a,s??this.service);c.headers[Un]=u,o.sessionToken&&(c.headers[Hn]=o.sessionToken);const h=await er(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(jn,c.headers)&&this.applyChecksum&&(c.headers[jn]=h);const f=Xn(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[Dn]=`${Gn} Credential=${o.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Gn),s=new this.sha256(await n);return s.update(On(i)),Cn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Cn(await Jn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Zn)return Zn[s];for(Qn.push(s);Qn.length>50;)delete Zn[Qn.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Kn])o=await Jn(e,o,t);return Zn[s]=o})(this.sha256,e,n,t,r||this.service)}}const hr=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,In,xn):n?st(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?st(e.signer):e.regionInfoProvider?()=>st(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||lr)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await st(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||lr)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const fr=async(e,t,n)=>({operation:xt(t).operation,region:await Ut(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const pr=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},mr={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},gr="3.823.0";var yr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function br(e){return e instanceof Uint8Array?e:"string"==typeof e?yr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function wr(e){return"string"==typeof e?0===e.length:0===e.byteLength}var vr={name:"SHA-256"},kr={name:"HMAC",hash:vr},Sr=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Er={};function Ar(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Er}var Ir=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!wr(e)){var t=br(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Ar().crypto.subtle.sign(kr,t,e.toHash).then(function(e){return new Uint8Array(e)})}):wr(this.toHash)?Promise.resolve(Sr):Promise.resolve().then(function(){return Ar().crypto.subtle.digest(vr,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Ar().crypto.subtle.importKey("raw",br(e.secret),kr,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function _r(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}function xr(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Mr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Rr=64,Pr=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Cr=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Tr=Math.pow(2,53)-1,Or=function(){function e(){this.state=Int32Array.from(Cr),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>Tr)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Rr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Rr>=56){for(var r=this.bufferLength;r<Rr;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<Rr;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(Pr[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),Nr=function(){function e(e){this.secret=e,this.hash=new Or,this.reset()}return e.prototype.update=function(e){if(!wr(e)&&!this.error)try{this.hash.update(br(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return _r(this,void 0,void 0,function(){return xr(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Or,this.secret){this.outer=new Or;var e=function(e){var t=br(e);if(t.byteLength>Rr){var n=new Or;n.update(t),t=n.digest()}var r=new Uint8Array(Rr);return r.set(t),r}(this.secret),t=new Uint8Array(Rr);t.set(e);for(var n=0;n<Rr;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var Lr=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function $r(e){return e&&Lr.every(function(t){return"function"==typeof e[t]})}var Dr=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&$r(e.crypto.subtle)}(Ar())?this.hash=new Nr(e):this.hash=new Ir(e)}return e.prototype.update=function(e,t){this.hash.update(br(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),Ur=n(369),Fr=n.n(Ur);const Br=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?Fr().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};var jr;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(jr||(jr={}));!function(){function e(){this.crc32=new qr}e.prototype.update=function(e){wr(e)||this.crc32.update(br(e))},e.prototype.digest=function(){return _r(this,void 0,void 0,function(){return xr(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new qr}}();var Hr,qr=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Mr(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^zr[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),zr=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class Vr{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Gr(t),new Vr(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Gr(e),parseInt(Cn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Gr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Wr{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Vr.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Pn(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Kr,value:!0};break;case 1:t[i]={type:Kr,value:!1};break;case 2:t[i]={type:Zr,value:e.getInt8(n++)};break;case 3:t[i]={type:Qr,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Yr,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Jr,value:new Vr(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Xr,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:ei,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:ti,value:new Date(new Vr(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:ni,value:`${Cn(o.subarray(0,4))}-${Cn(o.subarray(4,6))}-${Cn(o.subarray(6,8))}-${Cn(o.subarray(8,10))}-${Cn(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Hr||(Hr={}));const Kr="boolean",Zr="byte",Qr="short",Yr="integer",Jr="long",Xr="binary",ei="string",ti="timestamp",ni="uuid",ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ii{constructor(e,t){this.headerMarshaller=new Wr(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new qr;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new qr).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class si{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class oi{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class ai{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class ci{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function ui(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class di{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new ii(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new si({messageStream:new oi({inputStream:n,decoder:this.eventStreamCodec}),deserializer:ui(t,this.utfEncoder)})}serialize(e,t){return new ai({messageStream:new ci({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class li{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new di({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=hi(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const hi=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,fi=e=>new li(e);function pi(e,t){return new Request(e,t)}function mi(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const gi={supported:void 0};class yi{static create(e){return"function"==typeof e?.handle?e:new yi(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===gi.supported&&(gi.supported=Boolean("undefined"!=typeof Request&&"keepalive"in pi("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ar(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ar(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ar(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),gi.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=pi(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new tn({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new tn({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),mi(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const bi={},wi=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);bi[n]=e,wi[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;bi[n]=r,wi[r]=n}for(let e=0;e<10;e++){bi[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;bi[t]=n,wi[n]=t}bi["+"]=62,wi[62]="+",bi["/"]=63,wi[63]="/";const vi=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in bi))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=bi[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},ki=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=vi(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Si="function"==typeof TextEncoder?new TextEncoder:null,Ei=e=>{if("string"==typeof e){if(Si)return Si.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Ai=e=>new Date(Date.now()+e),Ii=e=>tn.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,_i=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ai(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},xi=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Mi{async sign(e,t,n){if(!Je.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=xi("context",e.context),n=xi("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=xi("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:Ai(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Ii(t.$response);if(n){const r=xi("config",e.config),i=r.systemClockOffset;r.systemClockOffset=_i(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Ii(e);if(n){const e=xi("config",t.config);e.systemClockOffset=_i(n,e.systemClockOffset)}}}function Ri(e){let t;t="string"==typeof e?Tn(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=wi[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const Pi=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};const Ci="endpoints";function Ti(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Ti(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ti).join(", ")})`:JSON.stringify(e,null,2)}class Oi extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ni=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new Oi(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Oi(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new Oi(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e);var Li;!function(e){e.HTTP="http",e.HTTPS="https"}(Li||(Li={}));const $i={[Li.HTTP]:80,[Li.HTTPS]:443},Di={booleanEquals:(e,t)=>e===t,getAttr:Ni,isSet:e=>null!=e,isValidHostLabel:ct,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(Li).includes(c))return null;const u=dt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${$i[c]}`)||"string"==typeof e&&e.includes(`${r}:${$i[c]}`)?`:${$i[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},Ui=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Ni(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},Fi=(e,t,n)=>{if("string"==typeof e)return Ui(e,n);if(e.fn)return Bi(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Oi(`'${t}': ${String(e)} is not a string, function or reference.`)},Bi=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:Fi(e,"arg",n)),i=e.split(".");return i[0]in ot&&null!=i[1]?ot[i[0]][i[1]](...r):Di[e](...r)},ji=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Oi(`'${e}' is already defined in Reference Record.`);const r=Bi(t,n);return n.logger?.debug?.(`${Ci} evaluateCondition: ${Ti(t)} = ${Ti(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Hi=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=ji(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${Ci} assign: ${i.name} := ${Ti(i.value)}`))}return{result:!0,referenceRecord:n}},qi=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=Fi(e,"Header value entry",t);if("string"!=typeof r)throw new Oi(`Header '${n}' value '${r}' is not a string`);return r})}),{}),zi=(e,t)=>{if(Array.isArray(e))return e.map(e=>zi(e,t));switch(typeof e){case"string":return Ui(e,t);case"object":if(null===e)throw new Oi(`Unexpected endpoint property: ${e}`);return Vi(e,t);case"boolean":return e;default:throw new Oi("Unexpected endpoint property type: "+typeof e)}},Vi=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:zi(r,t)}),{}),Gi=(e,t)=>{const n=Fi(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new Oi("Endpoint URL must be a string, got "+typeof n)},Wi=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${Ci} Resolving endpoint from template: ${Ti(r)}`),{...null!=u&&{headers:qi(u,o)},...null!=c&&{properties:Vi(c,o)},url:Gi(a,o)}},Ki=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(i)throw new Oi(Fi(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Zi=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(i)return Qi(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Qi=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Wi(n,t);if(e)return e}else if("error"===n.type)Ki(n,t);else{if("tree"!==n.type)throw new Oi(`Unknown endpoint rule: ${n}`);{const e=Zi(n,t);if(e)return e}}throw new Oi("Rules evaluation failed")},Yi="required",Ji="fn",Xi="argv",es="ref",ts=!0,ns="isSet",rs="booleanEquals",is="error",ss="endpoint",os="tree",as="PartitionResult",cs={[Yi]:!1,type:"String"},us={[Yi]:!0,default:!1,type:"Boolean"},ds={[es]:"Endpoint"},ls={[Ji]:rs,[Xi]:[{[es]:"UseFIPS"},!0]},hs={[Ji]:rs,[Xi]:[{[es]:"UseDualStack"},!0]},fs={},ps={[Ji]:"getAttr",[Xi]:[{[es]:as},"supportsFIPS"]},ms={[Ji]:rs,[Xi]:[!0,{[Ji]:"getAttr",[Xi]:[{[es]:as},"supportsDualStack"]}]},gs=[ls],ys=[hs],bs=[{[es]:"Region"}],ws={version:"1.0",parameters:{Region:cs,UseDualStack:us,UseFIPS:us,Endpoint:cs},rules:[{conditions:[{[Ji]:ns,[Xi]:[ds]}],rules:[{conditions:gs,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:is},{rules:[{conditions:ys,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:is},{endpoint:{url:ds,properties:fs,headers:fs},type:ss}],type:os}],type:os},{rules:[{conditions:[{[Ji]:ns,[Xi]:bs}],rules:[{conditions:[{[Ji]:"aws.partition",[Xi]:bs,assign:as}],rules:[{conditions:[ls,hs],rules:[{conditions:[{[Ji]:rs,[Xi]:[ts,ps]},ms],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:is}],type:os},{conditions:gs,rules:[{conditions:[{[Ji]:rs,[Xi]:[ps,ts]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"FIPS is enabled but this partition does not support FIPS",type:is}],type:os},{conditions:ys,rules:[{conditions:[ms],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"DualStack is enabled but this partition does not support DualStack",type:is}],type:os},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os}],type:os},{error:"Invalid Configuration: Missing Region",type:is}],type:os}]},vs=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ks=(e,t={})=>vs.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${Ci} Initial EndpointParams: ${Ti(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new Oi(`Missing required parameter: '${e}'`);const c=Qi(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Ci} Resolved endpoint: ${Ti(c)}`),c})(ws,{endpointParams:e,logger:t.logger}));ot.aws=pt;const Ss=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Es=["in-region","cross-region","mobile","standard","legacy"],As=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?Fr().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Is=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(As()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Es.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Ss),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??vi,base64Encoder:e?.base64Encoder??Ri,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ks,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pr,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Mi}],logger:e?.logger??new nn,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Bt,utf8Decoder:e?.utf8Decoder??Tn,utf8Encoder:e?.utf8Encoder??Pi}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ei,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Br({serviceId:r.serviceId,clientVersion:gr}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??fi,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:yi.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||qt),sha256:e?.sha256??Dr,streamCollector:e?.streamCollector??ki,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i};var _s;!function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(_s||(_s={}));const xs=e=>Object.assign((e=>{const t=[];for(const n in _s){const r=_s[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),Ms=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),xs(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class Rs extends An{config;constructor(...[e]){const t=Is(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=st(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ut(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ut(n)()===Ht.ADAPTIVE?new en(i):new Xt(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return It(t);const e=await t();return It(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!At(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>jt(await Ut(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:Ut(r??!1),useFipsEndpoint:Ut(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Ft(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=hr(e);return Object.assign(t,{authSchemePreference:Ut(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Ms(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(kt(l),Et)}})),this.middlewareStack.use(yn(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(et(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},tt)}})),this.middlewareStack.use(it(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(Mt(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Rt)}}))(this.config,{httpAuthSchemeParametersProvider:fr,identityProviderConfigProvider:async e=>new Pt({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}const Ps=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],Cs={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ts={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Os(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(tn.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:Ps(/^x-[\w-]+-request-?id$/,n),extendedRequestId:Ps(/^x-[\w-]+-id-2$/,n),cfId:Ps(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),Cs),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),Ts)}}}const Ns=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ls=/(\d+\.){3}\d+/,$s=/\.\./,Ds=e=>Ns.test(e)&&!Ls.test(e)&&!$s.test(e),Us=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Fs=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},Bs=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Fs(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Us(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Ds(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},js=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Ft(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jt(e)),n.isCustomEndpoint=!0)}const i=await Bs(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=xt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},Hs={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ts.name},qs=(e,t)=>({applyToStack:n=>{n.addRelativeTo(js({config:e,instructions:t}),Hs)}}),zs=e=>"function"==typeof e?e():e;class Vs{constructor(e,t){this.name=e,this.traits=t}}class Gs extends Vs{constructor(e,t,n){super(e,t),this.name=e,this.traits=t,this.valueSchema=n,this.symbol=Gs.symbol}static[Symbol.hasInstance](e){const t=Gs.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Gs.symbol}return t}}Gs.symbol=Symbol.for("@smithy/core/schema::ListSchema");class Ws extends Vs{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.keySchema=n,this.valueSchema=r,this.symbol=Ws.symbol}static[Symbol.hasInstance](e){const t=Ws.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Ws.symbol}return t}}Ws.symbol=Symbol.for("@smithy/core/schema::MapSchema");const Ks={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class Zs extends Vs{constructor(e,t,n){super(e,n),this.name=e,this.schemaRef=t,this.traits=n,this.symbol=Zs.symbol}static[Symbol.hasInstance](e){const t=Zs.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Zs.symbol}return t}}Zs.symbol=Symbol.for("@smithy/core/schema::SimpleSchema");class Qs extends Vs{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.memberNames=n,this.memberList=r,this.symbol=Qs.symbol,this.members={};for(let e=0;e<n.length;++e)this.members[n[e]]=Array.isArray(r[e])?r[e]:[r[e],0]}static[Symbol.hasInstance](e){const t=Qs.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Qs.symbol}return t}}Qs.symbol=Symbol.for("@smithy/core/schema::StructureSchema");class Ys{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Ys.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=zs(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,Ys.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Ys)return this.name=i.name,this.traits=i.traits,this._isMemberSchema=i._isMemberSchema,this.schema=i.schema,this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.ref=i.ref,void(this.memberName=t??i.memberName);if(this.schema=zs(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=("object"==typeof this.schema?this.schema?.name:void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(!0)} must initialize with memberName argument.`)}static[Symbol.hasInstance](e){const t=Ys.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Ys.symbol}return t}static of(e,t){return e instanceof Ys?e:new Ys(e,t)}static translateTraits(e){if("object"==typeof e)return e;const t={};return 1&~(e|=0)||(t.httpLabel=1),1==(e>>1&1)&&(t.idempotent=1),1==(e>>2&1)&&(t.idempotencyToken=1),1==(e>>3&1)&&(t.sensitive=1),1==(e>>4&1)&&(t.httpPayload=1),1==(e>>5&1)&&(t.httpResponseCode=1),1==(e>>6&1)&&(t.httpQueryParams=1),t}static memberFrom(e,t){return e instanceof Ys?(e.memberName=t,e._isMemberSchema=!0,e):new Ys(e,t)}getSchema(){return this.schema instanceof Ys?this.schema=this.schema.getSchema():this.schema instanceof Zs?zs(this.schema.schemaRef):zs(this.schema)}getName(e=!1){return!e&&this.name&&this.name.includes("#")?this.name.split("#")[1]:this.name||void 0}getMemberName(){if(!this.isMemberSchema())throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(!0)}`);return this.memberName}isMemberSchema(){return this._isMemberSchema}isUnitSchema(){return"unit"===this.getSchema()}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=Ks.LIST_MODIFIER&&e<Ks.MAP_MODIFIER:e instanceof Gs}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Ks.MAP_MODIFIER&&e<=255:e instanceof Ws}isDocumentSchema(){return this.getSchema()===Ks.DOCUMENT}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Qs}isBlobSchema(){return this.getSchema()===Ks.BLOB||this.getSchema()===Ks.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Ks.TIMESTAMP_DEFAULT&&e<=Ks.TIMESTAMP_EPOCH_SECONDS}isStringSchema(){return this.getSchema()===Ks.STRING}isBooleanSchema(){return this.getSchema()===Ks.BOOLEAN}isNumericSchema(){return this.getSchema()===Ks.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Ks.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Ks.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Ks.STREAMING_BLOB}isIdempotencyToken(){return"number"==typeof this.traits?!(4&~this.traits):"object"==typeof this.traits&&!!this.traits.idempotencyToken}getMergedTraits(){return this.normalizedTraits||(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()}),this.normalizedTraits}getMemberTraits(){return Ys.translateTraits(this.memberTraits)}getOwnTraits(){return Ys.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return Ys.memberFrom([Ks.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?Ys.memberFrom([63&e,0],"key"):Ys.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return Ys.memberFrom([63&e,0],"value");if(this.isListSchema())return Ys.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return Ys.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return Ys.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return Ys.memberFrom([Ks.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return e in this.getSchema().members}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!(e in t.members))throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a member with name=${e}.`);return Ys.memberFrom(t.members[e],e)}if(this.isDocumentSchema())return Ys.memberFrom([Ks.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have members.`)}getMemberSchemas(){const{schema:e}=this,t=e;if(!t||"object"!=typeof t)return{};if("members"in t){const e={};for(const n of t.memberNames)e[n]=this.getMemberSchema(n);return e}return{}}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],Ys.memberFrom([e.memberList[t],0],e.memberNames[t])]}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Ks).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Ks.MAP_MODIFIER:return`${r}Map`;case Ks.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Ys.symbol=Symbol.for("@smithy/core/schema::NormalizedSchema");const Js="***SensitiveInformation***";function Xs(e,t){if(null==t)return t;const n=Ys.of(e);if(n.getMergedTraits().sensitive)return Js;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Js}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Js}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=Xs(i,e[t]));return r}return t}class eo{constructor(){this.middlewareStack=kn()}static classBuilder(){return new to}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[_t]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class to{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=void 0,this._outputFilterSensitiveLog=void 0,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends eo{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(e._operationSchema?Xs.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?Xs.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const no="***SensitiveInformation***";class ro extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return ro.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===ro?ro.isInstance(e):!!ro.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const io=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e};class so extends ro{constructor(e){super(e),Object.setPrototypeOf(this,so.prototype)}}class oo extends so{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,oo.prototype)}}var ao;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(ao||(ao={}));class co extends so{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,co.prototype)}}class uo extends so{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,uo.prototype)}}class lo extends so{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,lo.prototype)}}class ho extends so{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,ho.prototype)}}class fo extends so{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,fo.prototype)}}class po extends so{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,po.prototype)}}class mo extends so{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,mo.prototype)}}var go;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(go||(go={}));var yo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(yo||(yo={}));var bo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(bo||(bo={}));var wo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(wo||(wo={}));var vo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(vo||(vo={}));var ko,So;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(ko||(ko={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(So||(So={}));var Eo,Ao;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Eo||(Eo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Ao||(Ao={}));var Io;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Io||(Io={}));var _o,xo,Mo,Ro,Po,Co;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(_o||(_o={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(xo||(xo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(Mo||(Mo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Po||(Po={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Co||(Co={}));class To extends so{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,To.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Oo extends so{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}class No extends so{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,No.prototype)}}var Lo,$o,Do,Uo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));class Fo extends so{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Fo.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Bo,jo,Ho;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));const qo=e=>({...e,...e.body&&{body:no}}),zo=e=>({...e,...e.body&&{body:no}}),Vo=e=>({...e,...e.body&&{body:no}}),Go=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}});class Wo extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?Wo.mutate(vi(e)):Wo.mutate(Tn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Wo.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?Ri(e):Pi(e)}(this,e)}}const Ko=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Wo.mutate(e);if(!e)return Wo.mutate(new Uint8Array);const n=t.streamCollector(e);return Wo.mutate(await n)},Zo=(e,t)=>((e,t)=>Ko(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),Qo=async(e,t)=>{const n=await Zo(e,t);return n.message=n.message??n.Message,n};function Yo(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Jo(e,t){return new Xo(e,t)}class Xo{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new Je({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>Yo(e)).join("/"):Yo(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}function ea(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,na(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?ra(r,null,s,e):r[e]=s[e];return r}const ta=(e,t)=>{const n={};for(const r in t)ra(n,e,t,r);return n},na=(e,t,n)=>ea(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),ra=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=ia,o=sa,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},ia=e=>null!=e,sa=e=>e,oa=e=>null!=e,aa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),ca=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),ua=e=>da(e,32),da=(e,t)=>{const n=ca(e);if(void 0!==n&&la(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},la=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ha=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return pa.warn(fa(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},fa=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),pa={warn:console.warn},ma=async(e,t)=>{const n=Jo(e,t),r=ea({},oa,{[Ga]:e[Va]||"application/octet-stream",[za]:e[za],[nc]:e[Qa],[Xa]:e[Wa],[ec]:e[Ka],[tc]:e[Za]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{const n=Jo(e,t),r=ea({},oa,{[Ga]:e[Va]||"application/octet-stream",[Ya]:e[za],[nc]:e[Qa],[Xa]:e[Wa],[ec]:e[Ka],[tc]:e[Za]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=ea({$metadata:qa(e),[Va]:[,e.headers[Ga]],[Za]:[,e.headers[tc]]}),r=await Ko(e.body,t);return n.body=r,n},ba=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=ea({$metadata:qa(e),[Va]:[,e.headers[Ja]],[Za]:[,e.headers[tc]]}),r=e.body;return n.body=Na(r,t),n},wa=async(e,t)=>{const n={...e,body:await Qo(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await Sa(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Aa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Pa(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ta(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Oa(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Ia(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await _a(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Ma(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ca(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await xa(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Ea(n,t);default:const i=n.body;return va({output:e,parsedBody:i,errorCode:r})}},va=(ka=so,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=aa(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw io(o,t)})({output:e,parsedBody:t,exceptionCtor:ka,errorCode:n})});var ka;const Sa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new oo({$metadata:qa(e),...n});return io(s,e.body)},Ea=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new ho({$metadata:qa(e),...n});return io(s,e.body)},Aa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new co({$metadata:qa(e),...n});return io(s,e.body)},Ia=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha,originalStatusCode:ua,resourceName:ha});Object.assign(n,i);const s=new To({$metadata:qa(e),...n});return io(s,e.body)},_a=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new Oo({$metadata:qa(e),...n});return io(s,e.body)},xa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha,originalMessage:ha,originalStatusCode:ua});Object.assign(n,i);const s=new Fo({$metadata:qa(e),...n});return io(s,e.body)},Ma=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new No({$metadata:qa(e),...n});return io(s,e.body)},Ra=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new fo({$metadata:qa(e),...n});return io(s,e.body)},Pa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new po({$metadata:qa(e),...n});return io(s,e.body)},Ca=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new mo({$metadata:qa(e),...n});return io(s,e.body)},Ta=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new uo({$metadata:qa(e),...n});return io(s,e.body)},Oa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new lo({$metadata:qa(e),...n});return io(s,e.body)},Na=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Ua(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await ja(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Ba(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Da(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Fa(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Aa(n,t)},$a=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return xa(n,t)},Da=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Ma(n,t)},Ua=async(e,t)=>{const n={},r=await Zo(e.body,t);return Object.assign(n,Ha(r,t)),n},Fa=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Ca(n,t)},Ba=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Ta(n,t)},ja=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Oa(n,t)},Ha=(e,t)=>ta(e,{bytes:t.base64Decoder}),qa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),za="accept",Va="contentType",Ga="content-type",Wa="guardrailIdentifier",Ka="guardrailVersion",Za="performanceConfigLatency",Qa="trace",Ya="x-amzn-bedrock-accept",Ja="x-amzn-bedrock-content-type",Xa="x-amzn-bedrock-guardrailidentifier",ec="x-amzn-bedrock-guardrailversion",tc="x-amzn-bedrock-performanceconfig-latency",nc="x-amzn-bedrock-trace";class rc extends(eo.classBuilder().ep(mr).m(function(e,t,n,r){return[Os(n,this.serialize,this.deserialize),qs(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(Vo,Go).ser(ga).de(ba).build()){}class ic extends(eo.classBuilder().ep(mr).m(function(e,t,n,r){return[Os(n,this.serialize,this.deserialize),qs(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(qo,zo).ser(ma).de(ya).build()){}const sc=ac;function oc(){const e=["getReader","_readAsyncIterableResponse","body","Human:\n","utf-8","_processProxyRequest","ai.aws.apiUrl","signal","61618CHaIud","anthropic.claude-v2","parse","<<SYS>>\n","define","generations","_prepareRequestParameters","_getGeneratedText","data","AI_ERROR_UNSUPPORTED_MODEL","join","pluginName","sendRequest","_readStaticResponse","_apiUrl","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","chunk","generation","ai.aws.requestParameters","6BUgtNd","json","_readStreamableResponse","get","bytes","filter","abortController","application/json","stringify","2860515ntMWWK","cohere.command","decode","20KLXeim","ai.aws.requestHeaders","8amdMTJ","bedrock-2023-05-31","editor","test","locale","getModelFamily","\n[/INST]","POST","AWSTextAdapter","config","meta.llama","preparePrompt","ai21.j2","_prepareRequestHeaders","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","completion","Instruction:\n","read","_bedrockClientConfig","send","_requestParameters","split","completions","4609629nuPGDD","text","1870363VNlUby","\nYou must keep the text formatting.\n\nContent:\n","\n<</SYS>>\n[INST]\n","843uIelXr","1172795VPzApD","_requestHeaders","resolve","ai.aws.bedrockClientConfig","_processAWSRequest","\n\nAssistant:","map","991760ofWqQo","anthropic.claude","length","254kWvjBT"];return(oc=function(){return e})()}function ac(e,t){const n=oc();return(ac=function(e,t){return n[e-=271]})(e,t)}!function(e){const t=ac,n=e();for(;;)try{if(275842===parseInt(t(282))/1+-parseInt(t(273))/2*(parseInt(t(343))/3)+parseInt(t(351))/4+parseInt(t(344))/5*(-parseInt(t(301))/6)+parseInt(t(310))/7+-parseInt(t(315))/8*(parseInt(t(338))/9)+parseInt(t(313))/10*(parseInt(t(340))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oc);class cc extends We{[sc(296)];[sc(345)];[sc(333)];[sc(335)];static get[sc(293)](){return sc(323)}constructor(e){const t=sc;super(e),e[t(324)][t(304)](t(300))||e[t(324)][t(286)](t(300),{model:t(283),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(316),stream:!0}),this[t(296)]=e[t(324)][t(304)](t(280)),this[t(333)]=e[t(324)][t(304)](t(347)),this[t(345)]=e[t(324)][t(304)](t(314)),this[t(335)]=e[t(324)][t(304)](t(300))}async[sc(294)]({query:e,context:t,onData:n,actionId:r}){const i=sc,{model:s,stream:o,...a}=await this[i(288)](this[i(335)],r),c={prompt:await this[i(326)](e,t,s,r),...a};this[i(296)]?await this[i(279)](c,s,o,n,r):await this[i(348)](c,s,o,n)}async[sc(326)](e,t,n,r){const i=sc;let s,o;return t?(s=i(297),o=i(331)+e+i(341)+t):(s=i(329),o=e),i(325)==this[i(320)](n)?i(285)+s+i(342)+o+i(321):i(277)+s+"\n"+o+i(349)}[sc(320)](e){const t=sc;if(/^anthropic\.claude/[t(318)](e))return t(271);if(/^ai21\.j2/[t(318)](e))return t(327);if(/^cohere\.command/[t(318)](e))return t(311);if(/^meta\.llama/[t(318)](e))return t(325);throw new b(v(this[t(317)][t(319)],t(291),e))}async[sc(279)](e,t,n,r,i){const s=sc,o={method:s(322),headers:await this[s(328)](this[s(345)],i),body:JSON[s(309)]({...e,model:t,stream:n}),signal:this[s(307)][s(281)]},a=await fetch(this[s(296)],o);n?await this[s(303)](a,t,r):await this[s(295)](a,t,r)}async[sc(348)](e,t,n,r){const i=sc,s=new Rs(this[i(333)]),o={body:JSON[i(309)](e),contentType:i(308),accept:i(308),modelId:t};let a;if(n){const e=new rc(o);a=await s[i(334)](e,{abortSignal:this[i(307)][i(281)]}),await this[i(275)](a,t,r)}else{const e=new ic(o);a=await s[i(334)](e,{abortSignal:this[i(307)][i(281)]}),await this[i(295)](a,t,r)}}async[sc(275)](e,t,n){const r=sc,i=e[r(276)],s=new TextDecoder(r(278));let o="";for await(const e of i)if(e[r(298)]){const i=s[r(312)](e[r(298)][r(305)]),a=JSON[r(284)](i);o+=this[r(289)](a,t),n(o)}return Promise[r(346)]()}async[sc(303)](e,t,n){const r=sc,i=e[r(276)],s=new TextDecoder(r(278)),o=i[r(274)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(332)]();if(u=e,u)break;const d=(a+s[r(312)](i))[r(336)]("\n")[r(350)](e=>{const t=r;try{return a="",JSON[t(284)](e)}catch{return a=e,null}})[r(306)](e=>null!==e);d[r(272)]&&(c+=d[r(350)](e=>this[r(289)](e,t))[r(292)](""),n(c))}return Promise[r(346)]()}async[sc(295)](e,t,n){const r=sc;let i;return i=e instanceof Response?await e[r(302)]():JSON[r(284)](new TextDecoder(r(278))[r(312)](e[r(276)])),n(this[r(289)](i,t)),Promise[r(346)]()}[sc(289)](e,t){const n=sc;switch(this[n(320)](t)){case n(271):return e[n(330)];case n(327):return e[n(337)][0][n(290)][n(339)];case n(311):return e[n(287)][0][n(339)];case n(325):return e[n(299)]}}}function uc(e,t){var n=dc();return(uc=function(e,t){return n[e-=279]})(e,t)}function dc(){var e=["3793668aBZpQc","453691raajHI","4hlqdkG","4179025REoEgW","402028jpTGhW","1195953sJuQZE","245763KtsIXs","170RLmrWo","184tcBMHT","7jfoExi","299570mAKLTH"];return(dc=function(){return e})()}!function(e){for(var t=uc,n=e();;)try{if(450777===-parseInt(t(285))/1+-parseInt(t(283))/2+-parseInt(t(289))/3+-parseInt(t(286))/4*(-parseInt(t(287))/5)+parseInt(t(284))/6*(-parseInt(t(282))/7)+-parseInt(t(281))/8*(-parseInt(t(279))/9)+-parseInt(t(280))/10*(-parseInt(t(288))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(dc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();