@ckeditor/ckeditor5-ai 46.0.0-alpha.1 → 46.0.0-alpha.2

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 (171) 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.d.ts +1 -2
  154. package/src/adapters/openaitextadapter.js +1 -1
  155. package/src/aiassistant.js +1 -1
  156. package/src/aiassistantediting.js +1 -1
  157. package/src/aiassistantui.js +1 -1
  158. package/src/index.js +1 -1
  159. package/src/legacyerrors.js +1 -1
  160. package/src/ui/aiassistantcontroller.js +2 -2
  161. package/src/ui/form/aiformcontentarea.js +1 -1
  162. package/src/ui/form/aiformerrorview.js +1 -1
  163. package/src/ui/form/aiformpromptview.js +1 -1
  164. package/src/ui/form/aiformtoolbarview.js +1 -1
  165. package/src/ui/form/aiformview.js +1 -1
  166. package/src/ui/form/aihistorylistitemview.js +1 -1
  167. package/src/ui/form/aihistorylistview.js +1 -1
  168. package/src/ui/form/prompthistory.js +1 -1
  169. package/src/ui/showaiassistantcommand.js +1 -1
  170. package/src/utils/common-translations.js +1 -1
  171. 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",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",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"},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(t.test instanceof Array)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(t.test instanceof Array)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(t.test instanceof Array)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(t.test instanceof Array)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:[/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:"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:[/[^-]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:()=>w,AIAssistant:()=>qe,AIAssistantUI:()=>Ne,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>uc,OpenAITextAdapter:()=>Ye,ShowAIAssistantCommand:()=>S,getDefaultAICommands:()=>He});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=["deleteContent","markerRange","pop","ck-ai-assistant-ui_theme","last","_getDefaultInsertBelowPosition","data","join","ai-ui","getColumnIndexes","resultRange","isOfficialPlugin","push","first","length","element","parse","from","fire","filter","editing","getLastMatchingPosition","getMarkersGroup","afterInit","103956YyVGSa","_getAISelection","_pasteHTMLUsingClipboard","addClass","has","once","setSelection","isPremiumPlugin","lowest","getChildren","isAtEnd","off","insertContent","getRange","model","editor","for","table","_createEmptyTableRows","AIAssistantEditing","pluginName","getRanges","getRows","getFirstRange","getChild","change","insertRows","createUIElement","DataTransfer","markerToElement","href","createRange","updateMarker","map","1676409fJpeUl","createPositionAfter","addMarker","getLastPosition","paste","init","TableUtils","hideFakeVisualSelection","2553622oztoQQ","27580JJAqUq","ck-fake-ai-selection","isCollapsed","256326gmcqYn","start","fromCharCode","_resetContentOfSelectedTableCells","ai.useTheme","15230INlFYs","showFakeVisualSelection","contentInsertion","_getTableRowCountFromContent","schema","setData","ck-fake-ai-selection_collapsed","removeMarker","isContent","text/html","forEach","getSelectedBlocks","config","canEditAt","createPositionAt","span","117XllDMF","plugins","2123gBAnSD","document","get","createSelection","conversion","40xRhTNJ","215aCsHxi","selection","insertContentBelow","_prepareTableInsertBelowPosition","end","getRowIndexes","3mGNvsi","editingDowncast","markers","getSelectedTableCells","findAncestor","3070914LAybip","markerToHighlight"];return(d=function(){return e})()}!function(e){const t=f,n=e();for(;;)try{if(666906===-parseInt(t(375))/1+-parseInt(t(371))/2*(-parseInt(t(410))/3)+-parseInt(t(372))/4*(parseInt(t(404))/5)+-parseInt(t(415))/6+parseInt(t(363))/7*(-parseInt(t(403))/8)+-parseInt(t(396))/9*(parseInt(t(380))/10)+parseInt(t(398))/11*(parseInt(t(329))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const l=globalThis[u(357)],h=u(425);function f(e,t){const n=d();return(f=function(e,t){return n[e-=323]})(e,t)}class p extends e.Plugin{static get[u(349)](){return u(348)}static get[u(428)](){return!0}static get[u(336)](){return!0}[u(368)](){const e=u,{editor:t}=this,n=[e(373)];t[e(392)][e(400)](e(379))&&n[e(429)](e(420)),t[e(402)][e(345)](e(411))[e(416)]({model:h,view:{classes:n,priority:12}}),t[e(402)][e(345)](e(411))[e(358)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(418)][r(374)])return null;const i=n[r(356)](r(395));return n[r(332)]([r(373),r(386)],i),i}})}[u(328)](){!async function(e){const t=g([110,73,74,87,55,65,100,75,53,102,118,86,120,97,72,52,104,98,103,49,107,90,122,106,67,108,69,71,105,82,85,119,84,57,116,115,79,56,50,78,77,80,81,112,83,101,76,114,99,113,109,68,51,121,54,70,66,48,88,89,117,111]),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(362)](e=>String[t(377)](e))[t(424)]("")}!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:1751414400;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(359)]);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(381)](){const e=u,t=this[e(344)][e(343)];t[e(354)](n=>{const r=e,i=t[r(399)][r(405)][r(350)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(412)][r(333)](i))n[r(361)](i,{range:e});else if(e[r(376)][r(339)]){const s=e[r(376)][r(326)](({item:e})=>!t[r(384)][r(388)](e),{boundaries:e});n[r(365)](i,{usingOperation:!1,affectsData:!1,range:n[r(360)](s,e[r(408)])})}else n[r(365)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(370)](){const e=u,t=this[e(344)][e(343)],n=Array[e(434)](this[e(344)][e(343)][e(412)][e(327)](h));n[e(431)]&&t[e(354)](t=>{const r=e;n[r(390)](e=>{t[r(387)](e)})})}[u(341)](e,t){const n=u,r=this[n(330)](),i=t||r[n(352)]();this[n(344)][n(343)][n(393)](i)&&this[n(344)][n(343)][n(354)](s=>{const o=n;this[o(370)](),t||this[o(378)](s,r),this[o(331)]({insertAt:i,writer:s,html:e})})}[u(406)](e){const t=u,{model:n}=this[t(344)],r=this[t(330)]();n[t(354)](()=>{const n=t,i=this[n(407)](e,r)||this[n(422)](r);this[n(341)](e,i)})}[u(330)](){const e=u,t=this[e(344)][e(343)],n=Array[e(434)](t[e(412)][e(327)](h))[e(362)](t=>t[e(342)]());return t[e(401)](n)}[u(331)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(344)][r(325)],s=this[r(344)][r(397)][r(400)](a.ClipboardPipeline),o=new l;o[r(385)](r(389),t);const d=new ClipboardEvent(r(367),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(335)](n);const f=(t,n)=>{const i=r;n[i(427)]&&e[i(335)](n[i(427)])};s[r(334)](r(382),f,{priority:r(337)}),i[r(399)][r(323)](r(367),h),s[r(340)](r(382),f)}[u(422)](e){const t=u,{model:n}=this[t(344)],r=Array[t(434)](e[t(391)]());return r[t(431)]?n[t(364)](r[t(419)]()):e[t(366)]()}[u(407)](e,t){const n=u,{model:r,plugins:i}=this[n(344)];if(i[n(333)](n(369))){const s=i[n(400)](n(369))[n(413)](t);if(s[n(431)]){const t=this[n(383)](e),i=this[n(347)](s,t);return r[n(394)](i,0)}}return null}[u(383)](e){const t=u,n=this[t(344)][t(397)][t(400)](t(369)),r=this[t(344)][t(423)][t(433)](e),i=Array[t(434)](r[t(338)]())[t(324)](e=>e.is(t(432),t(346)));let s=0;return i[t(390)](e=>{s+=n[t(351)](e)}),s}[u(347)](e,t){const n=u,r=this[n(344)][n(397)][n(400)](n(369)),i=r[n(409)](e),s=r[n(426)](e),o=i[n(421)]+1,a=s[n(430)],c=e[0][n(414)](n(346));for(let e=0;e<t;e++)r[n(355)](c,{at:o});return c[n(353)](o)[n(353)](a)}[u(378)](e,t){const n=u,{plugins:r}=this[n(344)],{model:i}=e;r[n(333)](n(369))&&r[n(400)](n(369))[n(413)](t)[n(431)]&&i[n(417)](t)}}function m(){var e=["textAdapter","name","isOfficialPlugin","260258XWqPHI","13969088cSEwRZ","afterInit","12oCIdGQ","60OOLCcM","9PFsmTI","1695357wjBOqb","3050405BGdLzF","isPremiumPlugin","AIRequestError","pluginName","148663qhSqVa","3704253PLOWZD","AIAdapter","aiadapter-text-adapter-not-set","11500332xPqBAp"];return(m=function(){return e})()}var g=y;function y(e,t){var n=m();return(y=function(e,t){return n[e-=314]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(989832===parseInt(t(321))/1+parseInt(t(329))/2*(-parseInt(t(315))/3)+parseInt(t(332))/4*(-parseInt(t(317))/5)+parseInt(t(325))/6+parseInt(t(322))/7+parseInt(t(330))/8+-parseInt(t(316))/9*(parseInt(t(314))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(m);class w extends e.Plugin{static get[g(320)](){return g(323)}static get[g(328)](){return!0}static get[g(318)](){return!0}[g(331)](){var e=g;if(!this[e(326)])throw new i.CKEditorError(e(324),null)}}class b extends Error{constructor(e){var t=g;super(e),this[t(327)]=t(319)}}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=A;!function(e){const t=A,n=e();for(;;)try{if(272611===-parseInt(t(436))/1+parseInt(t(423))/2*(-parseInt(t(437))/3)+parseInt(t(456))/4*(parseInt(t(414))/5)+-parseInt(t(445))/6+parseInt(t(449))/7+-parseInt(t(434))/8+-parseInt(t(421))/9*(-parseInt(t(453))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(I);class S extends e.Command{[k(429)];constructor(e,t){const n=k;super(e),this[n(429)]=t,this[n(447)](n(428),[]),this.on(n(433),(e,t,r)=>{const i=n;this[i(444)]&&(this[i(428)]=E(this[i(429)],r))}),this[n(447)](n(435),!1),this.on(n(426),(e,t,r)=>{const i=n;this[i(428)]=r?E(this[i(429)],this[i(435)]):[]})}[k(452)](){const e=k,t=this[e(424)][e(420)];this[e(435)]=function(t){const n=e,r=t[n(451)][n(427)];return r[n(446)]?0!==[...r[n(418)]()][n(430)]&&![...r[n(418)]()][0][n(438)]:!!t[n(440)](r[n(431)]())}(t);const n=t[e(451)][e(427)],r=this[e(424)][e(441)][e(443)](e(432));for(const t of n[e(415)]())for(const n of t[e(416)]())if(n.is(e(439))&&r[e(419)](n[e(422)]))return void(this[e(444)]=!1);this[e(444)]=!0}[k(455)](e="",t="",n=k(448)){const r=k;this[r(424)][r(457)][r(443)](Ne)[r(454)](e,t,n)}}function E(e,t){const n=k,r=new Set;for(const i of e[n(425)]())(t||!1===i[n(450)])&&r[n(442)](i.id);return Array[n(417)](r)}function A(e,t){const n=I();return(A=function(e,t){return n[e-=414]})(e,t)}function I(){const e=["ai.aiAssistant.disabledElements","change:_hasContext","2785248RQnpPr","_hasContext","94949tQkbLa","9jnlrkJ","isEmpty","element","hasContent","config","add","get","isEnabled","2497482rfXMId","isCollapsed","set","custom","109249WMeKTm","requiresContent","document","refresh","10458350yUgyCi","showUI","execute","298436PuTVQA","plugins","30tbrJre","getRanges","getItems","from","getSelectedBlocks","includes","model","9ErETpl","name","251422WzPuVM","editor","values","change:isEnabled","selection","enabledCommandsIds","_commandDefinitions","length","getFirstRange"];return(I=function(){return e})()}function x(){const e=["stringify","reset","_sanitizeHTML","markers","stopListening","body","querySelector","_isH1TagSupportEnabled","text/html","_xmlSerializer","parseFromString","toView","innerHTML","domConverter","previousQuery","finishProcessing","updateView","set:currentContext","data","<h1></h1>","finally","isRendered","htmlProcessor","nodeType","startProcessing","ELEMENT_NODE","destroy","previousLabel","textAdapter","abort","createElement","previousActionId","message","trim","previousContext","294tRHvYM","handleError","1440929WjkonY","submitPrompt","tryAgainEvent","ai.aiAssistant.preserveComments","18eUtThB","set","endsWith","mainAction","editing","toModel","currentResponse","value","54557226nexIWN","element","1174131BUWOSP","childNodes","prompt","_parseAndNormalizeContent","setContentOf","editor","_normalizeResponseHeadings","length","```","currentContext","2695705KYeURJ","rename","viewToDom","stopProcessing","_handleQuery","serializeToString","document","makeRequest","push","match","isProcessing","remove","startsWith","get","initialContext","19254kuweUa","substring","name","_stripMarkdownSyntax","processor","```html","listenTo","exec","_sanitizationContainer","render","from","catch","clear","once","config","5596776mtJYEz","div","12195504PdeqmI","reverse","_domParser","view","then","custom"];return(x=function(){return e})()}const _=R;function R(e,t){const n=x();return(R=function(e,t){return n[e-=417]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(855643===-parseInt(t(476))/1+-parseInt(t(515))/2*(-parseInt(t(474))/3)+-parseInt(t(431))/4+parseInt(t(500))/5*(-parseInt(t(480))/6)+-parseInt(t(490))/7+-parseInt(t(433))/8+parseInt(t(488))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(495)];[_(467)];[_(436)];[_(424)];[_(435)];[_(448)];constructor(e,t,n){const r=_;super(),this[r(495)]=e,this[r(467)]=t,this[r(424)]=document[r(469)](r(432)),this[r(435)]=new DOMParser,this[r(448)]=new XMLSerializer,this[r(436)]=n,this[r(481)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(456),(e,t,n)=>{const i=r;this[i(436)][i(487)]=this[i(441)](n)}),this[r(422)](this[r(436)],r(477),(e,t)=>{const n=r,i=this[n(499)]||this[n(514)];this[n(504)](t,i,n(438))}),this[r(422)](this[r(436)],r(478),()=>{const e=r;this[e(436)][e(492)]=this[e(466)],this[e(504)](this[e(453)],this[e(473)],this[e(470)],this[e(466)])}),this[r(422)](this[r(436)],r(503),()=>{this[r(503)]()})}[_(465)](){this[_(443)]()}async[_(455)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(436)][s(492)]=r,this[s(436)][s(483)]=i,this[s(514)]=n,t&&(this[s(436)][s(460)]?this[s(504)](t,n,e,r):this[s(436)][s(429)](s(425),()=>{this[s(504)](t,n,e,r)}))}[_(503)](){const e=_;this[e(510)]&&(this[e(510)]=!1,this[e(436)][e(454)](),this[e(467)][e(468)]())}[_(440)](){const e=_;this[e(514)]="",this[e(499)]="",this[e(486)]="",this[e(473)]="",this[e(453)]="",this[e(466)]="",this[e(470)]=void 0,this[e(436)][e(440)](),this[e(503)]()}async[_(504)](e,t,n,r){const i=_;return this[i(510)]=!0,this[i(436)][i(463)](),this[i(473)]=t,this[i(453)]=e,this[i(466)]=r||e,this[i(470)]=n,new Promise(r=>{const s=i;this[s(467)][s(507)]({query:e,context:t,onData:e=>{const t=s;this[t(486)]=e,this[t(499)]=this[t(493)](this[t(486)])},actionId:n})[s(437)](()=>{const e=s;!this[e(499)]&&this[e(486)]&&(this[e(499)]=this[e(493)](this[e(486)],!0))})[s(427)](e=>{const t=s;e instanceof b?this[t(436)][t(475)](e[t(471)]):this[t(436)][t(475)](),r()})[s(459)](()=>{this[s(503)](),r()})})}[_(493)](e,t=!1){const n=_,r=C[n(423)](e);e=r?e[n(417)](r[1][n(497)]):e[n(497)]<100&&!t?"":this[n(419)](e);const i=this[n(435)][n(449)](e,n(447));if(r){const e=Array[n(426)](i[n(444)][n(491)]);e[n(434)]();for(const t of e){if(t[n(462)]==Node[n(464)])break;t[n(511)]()}}const s=this[n(495)][n(457)][n(420)][n(450)](this[n(448)][n(505)](i[n(444)]));this[n(446)]()||this[n(496)](s);const o=this[n(495)][n(430)][n(513)](n(479)),a=this[n(495)][n(457)][n(485)](s);return o||a[n(442)][n(428)](),this[n(495)][n(457)][n(439)](a)}[_(496)](e){const t=_,n=new c.ViewUpcastWriter(this[t(495)][t(484)][t(436)][t(506)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(489))&&r[t(509)](n)&&(i[t(508)](n),"h1"==n[t(418)]&&(s=!0));if(s)for(const e of i)n[t(501)]("h"+(parseInt(e[t(418)][1])+1),e)}[_(446)](){const e=_,{data:t,editing:n}=this[e(495)],r=t[e(461)][e(450)](e(458)),i=t[e(450)](t[e(485)](r));return!!n[e(436)][e(452)][e(502)](i)[e(445)]("h1")}[_(441)](e){const t=_;return this[t(495)][t(484)][t(436)][t(452)][t(494)](this[t(424)],e),this[t(424)][t(451)]}[_(419)](e){const t=_,n=e[t(472)]();return n[t(512)](t(421))?n[t(482)](t(498))?n[t(417)](7,n[t(497)]-3):n[t(417)](7):e}}const M=T;function T(e,t){const n=$();return(T=function(e,t){return n[e-=372]})(e,t)}!function(e){const t=T,n=e();for(;;)try{if(901236===parseInt(t(398))/1*(-parseInt(t(378))/2)+-parseInt(t(381))/3+parseInt(t(393))/4*(parseInt(t(407))/5)+-parseInt(t(402))/6*(-parseInt(t(384))/7)+parseInt(t(383))/8*(-parseInt(t(400))/9)+-parseInt(t(397))/10*(-parseInt(t(394))/11)+parseInt(t(409))/12*(parseInt(t(388))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}($);const O={REPLACE:M(387),INSERT:M(389)};class L extends s.ToolbarView{constructor(e){const t=M;super(e),this[t(403)](t(376),!1),this[t(403)](t(373),O[t(375)]),this[t(385)]=this[t(391)]("",t(411)),this[t(385)][t(379)](t(392)).to(this,t(373),n=>v(e,t(396)+n[t(408)]()+t(390))),this[t(405)]=this[t(391)](v(e,t(374))),this[t(406)]=this[t(391)](v(e,t(404))),this[t(401)]=this[t(391)](v(e,t(380)));const n=this[t(372)];this[t(410)]({attributes:{class:[t(395),n.if(t(376),t(399),e=>!e)]}}),this[t(382)][t(386)]([this[t(385)],this[t(405)],this[t(406)],this[t(401)]])}[M(391)](e,t){const n=M,r=new s.ButtonView(this[n(377)]);return r[n(403)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}function $(){const e=["items","96GdOojj","319123hMsDCn","replaceButton","addMany","replace","11623001qLvBcw","insert","_CONTENT","_createButton","label","24TGJdXs","10119703sVawVa","ck-ai-form__toolbar","AI_","10APgSId","2NUDMRe","ck-hidden","534231ilJGdo","stopButton","42LOddmB","set","Try again","insertButton","tryAgainButton","1258080RfhRCB","toUpperCase","24hqKHUb","extendTemplate","ck-button-action","bindTemplate","mainAction","Insert below","REPLACE","isVisible","locale","1321982uvNSBy","bind","Stop","4804260zgVEQE"];return($=function(){return e})()}const N=D;function D(e,t){const n=U();return(D=function(e,t){return n[e-=370]})(e,t)}function U(){const e=["<span>]</span>","render","smooth","504453vpxjWo","locale","ck-hidden","isProcessing","setStartAfter","ck-ai-form__content-area","focus","isVisible","execCommand","addRange","body","absolute","clipboard","ck-ai-form__content-area-wrapper","_createCopyButton","3281730sHUscl","123963uoeIYp","text/html","ck-ai-form__loader","1141nbPOXt","<span>[</span>","4KEbAbZ","text/plain","value","ClipboardItem","remove","mousedown","ck-ai-form__content-area--processing","left","ck-content","13528EXSuKV","ck-ai-form__content-field","_createLoader","createRange","copy","textContent","appendChild","setContent","firstElementChild","change:isProcessing","scrollHeight","ck-reset_all-excluded","getSelection","appendLoader",".ck-ai-form__loader","createElement","copyButtonView","set","div","bind","isEnabled","execute","listenTo","style","innerHTML","write","loaderView","contentFieldView","2073834IcZIlk","scrollTo","removeAllRanges","querySelector","290WYKbRd","bindTemplate","610726CByzeG","setTemplate"," ck-ai-form__copy-button--copied","Copy","AI is writing...","position","wheel","setEndBefore","change:value","ck-ai-form__copy-button","class","636HmACmo","-9999px","ck-ai-form__copy-button-wrapper","element","lastElementChild","icon","_copyHTMLToClipboard"];return(U=function(){return e})()}!function(e){const t=D,n=e();for(;;)try{if(165517===-parseInt(t(383))/1+parseInt(t(431))/2+parseInt(t(452))/3*(parseInt(t(388))/4)+parseInt(t(429))/5*(-parseInt(t(442))/6)+-parseInt(t(386))/7*(parseInt(t(397))/8)+-parseInt(t(425))/9+parseInt(t(382))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(U);class B extends s.View{[N(424)];[N(413)];constructor(e,t=""){const n=N;super(e),this[n(414)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(430)];this[n(424)]=new F(e,t),this[n(413)]=this[n(381)](),this[n(432)]({tag:n(415),attributes:{class:["ck",n(380),r.if(n(374),n(454),e=>!e)],tabindex:"-1"},children:[{tag:n(415),attributes:{class:["ck",n(372),r.if(n(370),n(394))]},children:[this[n(424)],{tag:n(415),attributes:{class:["ck",n(444)]},children:[this[n(413)]]}]}]})}[N(450)](){const e=N;super[e(450)](),this[e(390)]&&this[e(424)][e(404)](this[e(390)]);let t=!1;this.on(e(439),(n,r,i)=>{const s=e,o=!this[s(424)][s(445)][s(428)](s(411));this[s(424)][s(404)](i),this[s(370)]&&o&&!t&&this[s(445)][s(426)]({top:this[s(445)][s(407)],behavior:s(451)})}),this.on(e(406),(n,r,i)=>{const s=e;t=!1,i?(this[s(390)]=null,this[s(424)][s(410)]()):this[s(390)]||this[s(424)][s(404)]("")}),this[e(419)](this[e(445)],e(437),()=>{t=!0}),this[e(419)](this[e(445)],e(393),()=>{t=!0})}[N(373)](){const e=N;this[e(445)][e(373)]()}[N(381)](){const e=N,n=this[e(453)],r=new s.ButtonView(this[e(453)]),i=e(440);return r[e(414)]({label:v(n,e(434)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(416)](e(374)).to(this,e(390),e=>!!e),r[e(416)](e(417)).to(this,e(370),e=>!e),r.on(e(418),()=>{const n=e;this[n(448)](this[n(424)][n(445)]),r[n(447)]=t.IconCheck,r[n(441)]=i+n(433),this[n(373)](),setTimeout(()=>{const e=n;r[e(447)]=t.IconCopy,r[e(441)]=i},1e3)}),r}[N(448)](e){const t=N,{window:n,document:r}=i.global;if(n[t(391)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(421)]],{type:t(384)}),"text/plain":new r([e[t(402)]||""],{type:t(389)})})];navigator[t(379)][t(422)](s)}else{const i=r[t(412)](t(415));i[t(420)][t(436)]=t(378),i[t(420)][t(395)]=t(443),i[t(421)]=t(387)+e[t(421)]+t(449),r[t(377)][t(403)](i);const s=r[t(400)]();s[t(371)](i[t(405)]),s[t(438)](i[t(446)]);const o=n[t(409)]();o[t(427)](),o[t(376)](s),r[t(375)](t(401)),i[t(392)]()}}}class F extends s.View{constructor(e,t=""){const n=N;super(e),this[n(423)]=this[n(399)](),this[n(432)]({tag:n(415),attributes:{class:["ck",n(396),t,n(408),n(398)]}})}[N(404)](e){const t=N;this[t(445)][t(421)]=e}[N(410)](){const e=N;this[e(445)][e(403)](this[e(423)][e(445)])}[N(399)](){const e=N,t=new s.View,n=this[e(453)],r=new s.SpinnerView;return r[e(374)]=!0,t[e(432)]({tag:e(415),attributes:{class:["ck",e(385)]},children:[r,{text:v(n,e(435))}]}),t[e(450)](),t}}function j(){const e=["54919887LwDfzC","bindTemplate","set","3166808wzjGFG","ck-ai-form__error","2113quCQxA","7632nZdfdt","3850szrKsl","2314461AvRTdz","9FITDhG","10869890ctFZSz","setTemplate","text","4bRFxvt","content","div","6017190XoLtiN","6JXCQUu"];return(j=function(){return e})()}function q(e,t){const n=j();return(q=function(e,t){return n[e-=367]})(e,t)}!function(e){const t=q,n=e();for(;;)try{if(610175===-parseInt(t(374))/1*(parseInt(t(382))/2)+-parseInt(t(377))/3+-parseInt(t(372))/4+parseInt(t(367))/5*(-parseInt(t(368))/6)+parseInt(t(376))/7*(-parseInt(t(375))/8)+-parseInt(t(378))/9*(parseInt(t(379))/10)+parseInt(t(369))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class H extends s.View{constructor(e,n=""){const r=q;super(e);const i=new s.IconView,o=this[r(370)];this[r(371)](r(381),n),i[r(383)]=t.IconError,this[r(380)]({tag:r(384),attributes:{class:["ck",r(373)]},children:[i,{text:o.to(r(381))}]})}}function z(e,t){const n=G();return(z=function(e,t){return n[e-=242]})(e,t)}const V=z;function G(){const e=["ck-ai-form__submit","fieldView","add","uiLanguageDirection","2107254RDtAwM","isEmpty","children","3084606JfWntB","queryView","keystrokes","focusCycler","submit","History","maxRows","1560201nMTnrQ","target","resultsView","excludeScrollbarsAndBorders","requestAnimationFrame","Submit","execute","enter","isVisible","1370586vNRcUf","4897200wvQkFL","focusLast","ck-ai-form__toggle-history","focusFirst","fieldWrapperChildren","fire","render","isOn","style","left","set","element","width","update","value","right","1aAuMFq","227781vEiPAA","_createShowHistoryButton","locale","2700472GoHSKk","focusableChildren","submitButtonView","bind","minRows","focus","window","showHistoryButtonView","isEnabled","filteredView","688jmzbRO","rtl","_createSubmitButton"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(597793===parseInt(t(286))/1*(parseInt(t(269))/2)+-parseInt(t(260))/3+-parseInt(t(290))/4+-parseInt(t(270))/5+parseInt(t(250))/6+-parseInt(t(253))/7+parseInt(t(243))/8*(parseInt(t(287))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(292)];[V(297)];constructor(e,t){const n=V;super(e,t),this[n(254)][n(247)][n(294)]=1,this[n(254)][n(247)][n(259)]=3,this[n(292)]=this[n(245)](),this[n(297)]=this[n(288)](),this[n(291)][n(248)](this[n(297)],1),this[n(291)][n(248)](this[n(292)])}[V(276)](){const e=V;super[e(276)](),this[e(254)][e(274)][e(248)](this[e(297)]),this[e(252)][e(248)](this[e(292)]),this[e(255)][e(280)](e(267),(t,n)=>{const r=e;t[r(261)]==this[r(254)][r(247)][r(281)]&&(this[r(257)](),n())})}[V(245)](){const e=V,n=new s.ButtonView(this[e(289)]),r=this[e(289)];return n[e(280)]({icon:t.IconSubmit,label:v(r,e(265)),isVisible:!0,tooltip:!0,class:e(246)}),n.on(e(266),()=>{this[e(257)]()}),n[e(293)](e(298)).to(this[e(254)][e(247)],e(251),this,e(298),(e,t)=>!e&&t),n}[V(288)](){const e=V,n=new s.ButtonView(this[e(289)]),r=this[e(262)],o=this[e(289)];n[e(280)]({label:v(o,e(258)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(272)}),n[e(293)](e(277)).to(r,e(268)),n[e(293)](e(298)).to(this,e(298)),n.on(e(266),()=>{const t=e;r[t(268)]=!r[t(268)],r[t(268)]?this[t(242)][t(295)]():this[t(295)]()});const a=()=>{const t=e;i.global[t(296)][t(264)](()=>{const e=t;if((0,i.isVisible)(this[e(281)])){const t=new i.Rect(this[e(254)][e(247)][e(281)]),r=t[e(282)],s=e(244)===o[e(249)]?e(279):e(285);t[e(263)](),n[e(281)][e(278)][s]=r-t[e(282)]+1+"px"}})};return this[e(254)][e(247)].on(e(283),a),this.on(e(276),a),n}[V(257)](){const e=V,t=this[e(254)][e(247)][e(281)][e(284)];this[e(275)](e(257),t)}[V(295)](e){const t=V;-1===e?this[t(256)][t(271)]():this[t(256)][t(273)]()}}const K=Q;function Q(e,t){const n=J();return(Q=function(e,t){return n[e-=286]})(e,t)}function J(){const e=["set","Prompt history","14YILSZc","add","4gdHvNP","8hZAnyA","length","1932MCQHIM","execute","17817306GHJJuQ","locale","2856201bWxDjk","3522726CxDstd","children","historyGroupView","14255dbiYub","4996733vqHLNL","delegate","130538zgaxjm","fire","12FeVQrk","label","350ikNHap","Clear","_createClearHistoryButton","items","filter","162734qEYkcl","clearHistoryButton","clearHistory"];return(J=function(){return e})()}!function(e){const t=Q,n=e();for(;;)try{if(618136===-parseInt(t(296))/1*(parseInt(t(310))/2)+parseInt(t(289))/3*(-parseInt(t(312))/4)+-parseInt(t(293))/5*(-parseInt(t(315))/6)+-parseInt(t(294))/7*(parseInt(t(313))/8)+parseInt(t(290))/9+-parseInt(t(300))/10*(-parseInt(t(305))/11)+-parseInt(t(298))/12*(-parseInt(t(287))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Y extends s.ListView{[K(292)];[K(306)];constructor(e){const t=K;super(e),this[t(306)]=this[t(302)](),this[t(292)]=new s.ListItemGroupView,this[t(292)][t(291)][t(311)](this[t(306)],1),this[t(292)][t(299)]=v(e,t(309)),this[t(292)][t(303)][t(295)](t(286)).to(this),this[t(303)][t(311)](this[t(292)])}[K(304)](){const e=K;let t=0;for(const n of this[e(303)])t+=n[e(303)][e(314)];return{resultsCount:t,totalItemsCount:t}}[K(302)](){const e=K,t=this[e(288)],n=new s.ButtonView(this[e(288)]);return n[e(308)]({label:"("+v(t,e(301))+")",withText:!0}),n.on(e(286),()=>this[e(297)](e(307))),n}}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(){const e=["set","11310462rqMmbq","867699kyJnSR","16SdITLV","14591860OnYDns","prompt","3QxIqOw","6904328yAdQix","execute","40892592qUPQbD","children","2EANzAN","1948847FbtGeL","6UhcycW","add","locale","fire","8679595hbWehA","11IjEumn"];return(te=function(){return e})()}function ne(e,t){const n=te();return(ne=function(e,t){return n[e-=244]})(e,t)}!function(e){const t=ne,n=e();for(;;)try{if(999284===parseInt(t(253))/1*(parseInt(t(252))/2)+-parseInt(t(247))/3*(-parseInt(t(248))/4)+parseInt(t(258))/5*(-parseInt(t(254))/6)+parseInt(t(262))/7*(-parseInt(t(244))/8)+parseInt(t(261))/9+-parseInt(t(245))/10*(-parseInt(t(259))/11)+-parseInt(t(250))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(te);class re extends s.ListItemView{constructor(e){const t=ne;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(256)],n);this[t(251)][t(255)](r),r[t(260)]({label:e[t(246)],withText:!0}),r.on(t(249),()=>{const n=t;this[n(257)](n(249),{value:ee(e[n(246)])})})}}function ie(){const e=["168sCVRCN","6ujrPhL","prompt","remove","_saveToSessionStorage","stringify","773903ygnNOb","3005185xlpcUO","setItem","trim","107987QgfOqM","940ysyleO","toLowerCase","8EzZdLt","map","1IWumwp","_loadFromSessionStorage","add","1012846ZVMjSW","CKEditor/AIFormView/PromptHistory","length","addMany","getItem","parse","5589279HbaBQo","last","4462752PUoTQi","1628313Wqqmeh","8cgglHJ"];return(ie=function(){return e})()}const se=oe;function oe(e,t){const n=ie();return(oe=function(e,t){return n[e-=116]})(e,t)}!function(e){const t=oe,n=e();for(;;)try{if(592581===parseInt(t(133))/1*(parseInt(t(136))/2)+parseInt(t(116))/3*(-parseInt(t(131))/4)+-parseInt(t(125))/5*(parseInt(t(119))/6)+parseInt(t(144))/7+-parseInt(t(117))/8*(parseInt(t(142))/9)+-parseInt(t(129))/10*(-parseInt(t(128))/11)+-parseInt(t(118))/12*(-parseInt(t(124))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ie);const ae=se(137);class ce extends i.Collection{constructor(){const e=se;super(),this[e(134)](),this.on(e(135),(t,n)=>{const r=e,i=ue(n[r(120)]);for(const e of this)if(e!=n&&ue(e[r(120)])===i){this[r(121)](e);break}this[r(138)]>20&&this[r(121)](this[r(143)]),this[r(122)]()}),this.on(e(121),()=>{this[e(122)]()})}[se(134)](){const e=se,t=sessionStorage[e(140)](ae)||"[]";this[e(139)](JSON[e(141)](t))}[se(122)](){const e=se;sessionStorage[e(126)](ae,JSON[e(123)](this[e(132)](e=>e)))}}function ue(e){const t=se;return e[t(130)]()[t(127)]()}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=["focus","4622xLcheu","477sSqEnO","Empty history","_focusables","chain","Ask AI to edit or generate","focusFirst","4935032KqbgaA","focusTracker","execute","items","keystrokes","startProcessing","reset","queryView","contentArea","tryAgainButton","_createPromptView","listenTo","focusLast","stopProcessing","render","text","set","REPLACE","setTemplate","Ask AI and your prompts will be listed here for you to use later.","submitPrompt","isEnabled","element","replaceContent","submit","errorView","shift + tab","_createToolbar","mainAction","isError","914608YpBLed","131hVauFU","clear","ck-ai-form","ck-ai-form-content","div","createCollection","trim","promptView","tab","4687445UVRoKY","add","fire","_createHistoryView","isProcessing","prompt","ck-hidden","toolbar","finishProcessing","1296942QPlCEy","locale","replaceButton","insertButton","tryAgainEvent","label","value","delegate","Ask AI to improve generated text","copyButtonView","AI_ERROR_FAILED","focusCycler","2832660rrZEYn","isVisible","high","fieldView","handleError","historyGroupView","bindTemplate","stopButton","insertContentBelow","_promptHistory","bind","clearHistory","search","bindTo","7aPXGWF","460010rYCgQO"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=130]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(808085===parseInt(t(184))/1*(parseInt(t(146))/2)+parseInt(t(214))/3+parseInt(t(183))/4+parseInt(t(193))/5+parseInt(t(202))/6+parseInt(t(143))/7*(parseInt(t(153))/8)+parseInt(t(147))/9*(-parseInt(t(144))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(154)];[he(157)];[he(161)];[he(200)];[he(191)];[he(178)];[he(149)];[he(213)];[he(138)];constructor(e,t,n=""){const r=he;super(e),this[r(169)](r(174),!0),this[r(169)](r(197),!1),this[r(169)](r(198),""),this[r(169)](r(208),""),this[r(169)](r(182),!1),this[r(169)](r(181),O[r(170)]),this[r(138)]=new ce,this[r(178)]=new H(e),this[r(161)]=new B(e,n),this[r(161)][r(139)](r(197)).to(this),this[r(161)][r(139)](r(208)).to(this),this[r(200)]=this[r(180)](),this[r(200)][r(139)](r(181)).to(this),this[r(191)]=this[r(163)](),this[r(154)]=new i.FocusTracker,this[r(157)]=new i.KeystrokeHandler,this[r(149)]=this[r(189)]([this[r(161)],this[r(161)][r(211)],this[r(200)],this[r(191)]]),this[r(213)]=new s.FocusCycler({focusables:this[r(149)],focusTracker:this[r(154)],keystrokeHandler:this[r(157)],actions:{focusPrevious:r(179),focusNext:r(192)}}),this[r(213)][r(150)](this[r(191)][r(213)]),this[r(191)][r(160)][r(132)][r(139)](r(208)).to(this,r(198));const o=this[r(135)];this[r(171)]({tag:r(188),attributes:{class:["ck",r(186),t],tabindex:"-1"},children:[{tag:r(188),attributes:{class:["ck",r(187)]},children:[{tag:r(188),attributes:{class:[o.if(r(182),r(199),e=>!e)]},children:[this[r(178)]]},this[r(161)],this[r(200)],this[r(191)]]}]})}[he(167)](){const e=he;super[e(167)](),this[e(154)][e(194)](this[e(161)][e(175)]),this[e(154)][e(194)](this[e(161)][e(211)][e(175)]),this[e(154)][e(194)](this[e(200)][e(175)]),this[e(154)][e(194)](this[e(191)][e(175)]),this[e(157)][e(164)](this[e(175)])}[he(145)](e=1){const t=he;-1===e?this[t(213)][t(165)]():this[t(213)][t(152)]()}[he(159)](){const e=he;this[e(198)]="",this[e(208)]="",this[e(182)]=!1,this[e(191)][e(159)](),this[e(161)][e(130)]=!1,this[e(200)][e(130)]=!1}[he(163)](){const e=he,t=this[e(203)],n=new W(t,{queryView:{label:v(t,e(151)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(148)),secondary:v(t,e(172))}}},filteredView:this[e(196)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(139)](e(174)).to(this,e(174),this,e(197),(e,t)=>e&&!t),this[e(164)](n,e(177),(t,n)=>{const r=e;this[r(198)]=n;const i=le(n);this[r(195)](r(173),i),n[r(190)]()&&this[r(138)][r(194)]({prompt:i},0)},{priority:e(131)}),n}[he(196)](){const e=he,t=new Y(this[e(203)]);return t[e(134)][e(156)][e(142)](this[e(138)]).as(re),t.on(e(140),()=>{const t=e;this[t(138)][t(185)](),this[t(191)][t(141)](""),this[t(191)][t(145)]()}),t}[he(180)](){const e=he,t=new L(this[e(203)]);return t[e(204)][e(139)](e(174)).to(this,e(174),this,e(197),this,e(208),(e,t,n)=>e&&!t&&!!n),t[e(204)][e(209)](e(155)).to(this,e(176)),t[e(205)][e(139)](e(174)).to(this,e(174),this,e(197),this,e(208),(e,t,n)=>e&&!t&&!!n),t[e(205)][e(209)](e(155)).to(this,e(137)),t[e(162)][e(139)](e(174)).to(this,e(174),this,e(197),(e,t)=>e&&!t),t[e(162)][e(209)](e(155)).to(this,e(206)),t[e(136)][e(139)](e(174)).to(this,e(197)),t[e(136)][e(209)](e(155)).to(this,e(166)),t}[he(158)](){const e=he;this[e(208)]="",this[e(182)]=!1,this[e(197)]=!0,this[e(161)][e(130)]=!0,this[e(200)][e(130)]=!0,this[e(161)][e(145)]()}[he(201)](){const e=he,t=this[e(203)];this[e(197)]=!1,this[e(198)]="",this[e(191)][e(159)](),this[e(208)]&&(this[e(191)][e(160)][e(207)]=v(t,e(210)))}[he(133)](e){const t=he,n=this[t(203)];this[t(201)](),this[t(182)]=!0,this[t(178)][t(168)]=e||v(n,t(212)),this[t(208)]||(this[t(161)][t(130)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),xe=n(379),_e={attributes:{"data-cke":!0}};_e.setAttributes=Ee(),_e.insert=ke().bind(null,"head"),_e.domAPI=be(),_e.insertStyleElement=Ie();ye()(xe.A,_e);xe.A&&xe.A.locals&&xe.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ee(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Pe.A,Me);Pe.A&&Pe.A.locals&&Pe.A.locals;const Te=$e;function Oe(){const e=["currentContext","ai.aiAssistant.commands","ai.useTheme","reset","Error during AI content generation: %0","5zViBtl","promptView","4779654tLZEJr","map","includes","EDITOR_TOP_SIDE","hide","10vjBMrn","change:value","change:enabledCommandsIds","isCollapsed","aiLicenseKeyUsageLimit","771048kcwLyH","panelView","1535036MsxIPQ","queryView","media","2419035hcdLni","aiLicenseKeyTrialLimit","update","ai.aiAssistant.contentAreaCssClass","destroy","showAIAssistant","REPLACE","focus","tableOfContents","menuitemcheckbox","textAdapter","requiresContent","aiLicenseKeyInvalid","ck-ai-assistant-ui","aiLicenseKeyNotAllowed","evaluationLimit","ai.aiAssistant.disabledElements","custom","insertContentBelow","aiLicenseKeyExpired","forEach","showUI","from","commands","_commandDefinitions","children","init","sort","buttonView","execute","menuBar:aiAssistant","hideUI","body","push","3760086wZGjjw","contentArea","_uiCssClasses","replace","aiLicenseKeyDomainLimit","showFakeVisualSelection","isOn","label"," ck-ai-assistant-ui_theme","polite","wasMoved","addMany","length","_getResolvedCommandsDefinitions","_licenseKeyCheckInterval","groupId","config","AIAssistantUI","fieldView","_formView","schema","_aiAssistantController","updatePosition","setSelection","command:","AI is writing","copy","change:isError","isOfficialPlugin","define","show","AI Commands","</p>","_createAIAssistantUIButton","listenTo","getLimitElement","enabledCommandsIds","locale","menuBar:aiCommands","domainLimit","AI Assistant","change","ai-commands-config-order-collision","text/html","getSelectedBlocks","items","trim","_showLicenseError","<p>","Generated content: %0","_getMenuBarGroupButtons","editor","getSelectedElement","insertContent","editing","_populateMenuBarMenu","INSERT","comment","buttons","announce","featureNotAllowed","ck-ai-assistant-button ","selection","set","document","ck-ai-commands-dropdown ","expired","view","text","DataTransfer","source","_forceMarkersCopy","getRanges","splice","updateView","aiLicenseKeyEvaluationLimit","24758czgrpv","requires","getData","menuView","aiAssistant","order","filter","_dialog","7UqepIj","trialLimit","componentFactory","menuPanelClass","_initView","replaceContent","aiCommands","pluginName","51bXGEff","values","8STwmtD","licenseKey","delegate","plugins","errorView","_onExecute","render","_aiAdapter","once","rawHtml","hideFakeVisualSelection","isPremiumPlugin","get","bind","_initAriaAiStatusChangeAnnouncements","change:isProcessing","usageLimit","isFlat","invalid","add","fire","isEnabled","groupLabel","AIAssistant","prompt","model","493536vCqKqT","aiLicenseKeyValid"];return(Oe=function(){return e})()}!function(e){const t=$e,n=e();for(;;)try{if(411152===parseInt(t(338))/1*(-parseInt(t(322))/2)+parseInt(t(390))/3+-parseInt(t(387))/4*(-parseInt(t(373))/5)+parseInt(t(424))/6*(-parseInt(t(330))/7)+parseInt(t(340))/8*(parseInt(t(385))/9)+-parseInt(t(380))/10*(-parseInt(t(375))/11)+-parseInt(t(366))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const Le=globalThis[Te(315)];function $e(e,t){const n=Oe();return($e=function(e,t){return n[e-=272]})(e,t)}class Ne extends e.Plugin{[Te(341)];[Te(438)];[Te(329)];[Te(443)];[Te(347)];[Te(445)];[Te(426)]="";static get[Te(337)](){return Te(441)}static get[Te(274)](){return!0}static get[Te(351)](){return!0}static get[Te(323)](){return[a.ClipboardMarkersUtils,p,w,s.Dialog]}constructor(e){const t=Te;super(e),e[t(440)][t(275)](t(406),[t(389),t(349),t(398)]),e[t(440)][t(275)](t(393),""),e[t(440)][t(275)](t(370),!0),this[t(426)]=t(403)+(e[t(440)][t(352)](t(370))?t(432):"")}[Te(416)](){const e=Te,{editor:n}=this;this[e(347)]=n[e(343)][e(352)](w),this[e(329)]=n[e(343)][e(352)](s.Dialog),this[e(443)]=null,this[e(414)]=this[e(437)]();const r=new S(n,Array[e(412)](this[e(414)][e(339)]()));n[e(413)][e(359)](e(395),r),n.ui[e(332)][e(359)](e(336),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(309)]({class:a(311)+this[a(426)]}),c[a(418)][a(309)]({label:v(i,a(277)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(419),e=>this[a(345)](e[a(316)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(313)][a(422)],function(e){const t=a,n=o(e[t(440)][t(352)](t(369)),e[t(283)]),r=Ue(e,n)[t(328)](e=>e[t(413)][t(436)]);return 1===r[t(436)]?Ue(e,r[0][t(413)])[t(376)](e=>({id:e.id,label:e[t(431)]})):r[t(376)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(376)](e=>({id:e.id,label:e[r(431)]}))}})}(n),{ariaLabel:v(i,a(277))}),c[a(325)][a(333)]=a(311)+this[a(426)],r.on(a(382),u),c[a(325)][a(348)](a(346),u),c;function u(){const e=a;c[e(361)]=r[e(282)][e(436)]>0;for(const t of c[e(325)][e(304)])t[e(361)]=r[e(282)][e(377)](t.id)}}),n.ui[e(332)][e(359)](e(284),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(418)][a(309)]({label:v(i,a(277)),icon:t.IconMagicWand}),c[a(353)](a(361)).to(r,a(282),e=>e[a(436)]>0);const u=o(n[a(440)][a(352)](a(369)),i);return this[a(301)](r,c,u,e=>this[a(345)](e)),c}),n.ui[e(332)][e(359)](e(326),()=>{const t=e,n=this[t(279)](s.ButtonView);return n[t(309)]({tooltip:!0,class:t(307)+this[t(426)]}),n}),n.ui[e(332)][e(359)](e(420),()=>{const t=e,n=this[t(279)](s.MenuBarMenuListItemButtonView);return n[t(309)]({role:t(399)}),n}),this[e(341)]=this[e(297)][e(440)][e(352)](e(341));const i=this[e(297)];this[e(438)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(367)==s||t(402)==s||t(409)==s||t(428)==s||t(404)==s||t(321)==s||t(391)==s||t(384)==s){delete i[r],n=s,clearInterval(this[t(438)]),this[t(438)]=void 0;break}}t(402)==n&&i[t(293)](t(358)),t(409)==n&&i[t(293)](t(312)),t(428)==n&&i[t(293)](t(285)),t(404)==n&&i[t(293)](t(306),t(363)),t(321)==n&&i[t(293)](t(405)),t(391)==n&&i[t(293)](t(331)),t(384)==n&&i[t(293)](t(356))},1e3)}[Te(394)](){const e=Te;super[e(394)](),this[e(438)]&&clearInterval(this[e(438)])}[Te(411)](e="",n="",r=Te(407)){const i=Te,o=this[i(297)],u=o[i(300)][i(313)],d=o[i(343)][i(352)](p),l=o[i(343)][i(352)](a.ClipboardMarkersUtils);d[i(429)]();const h=new Le,f=new ClipboardEvent(i(272),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(317)](i(303),()=>{const e=i;u[e(310)][e(360)](e(272),g)}),this[i(443)]||(this[i(334)](),this[i(445)]=new P(o,this[i(347)][i(400)],this[i(443)]));let y=m[i(324)](i(289));const w=o[i(365)][i(310)][i(308)],b=Array[i(412)](w[i(318)]());1===b[i(436)]&&b[0][i(357)]&&!w[i(298)]()&&""!==y[i(427)](/&nbsp;/g,"")[i(292)]()&&(y=i(294)+y+i(278)),this[i(445)][i(320)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:O[o[i(365)][i(310)][i(308)][i(383)]?i(302):i(396)]}),i(326)!==this[i(329)].id?this[i(329)][i(276)]({id:i(326),icon:t.IconRobotPencil,title:v(this[i(297)][i(283)],i(286)),content:this[i(443)],position:s.DialogViewPosition[i(378)],onShow:()=>{const e=i;this[e(443)][e(397)]()},onHide:()=>{const e=i;this[e(445)][e(371)](),d[e(350)]()}}):this[i(329)][i(313)][i(434)]||this[i(329)][i(313)][i(446)]()}[Te(421)](){const e=Te;this[e(329)][e(379)]()}[Te(437)](){const e=Te,t=new Map,n=o(this[e(297)][e(440)][e(352)](e(369)),this[e(297)][e(283)]);for(const r of n)for(const n of r[e(413)])t[e(309)](n.id,{...n,groupId:r[e(439)],groupLabel:r[e(362)]||r[e(439)]});return t}[Te(279)](e){const n=Te,r=this[n(297)],i=r[n(413)][n(352)](n(395)),s=new e(r[n(283)]);return s[n(309)]({label:v(r[n(283)],n(286)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(353)](n(361)).to(i),s[n(353)](n(430)).to(this[n(329)],"id",e=>n(326)===e),this[n(280)](s,n(419),()=>{const e=n;s[e(430)]?this[e(421)]():i[e(419)]()}),s}[Te(334)](){const e=Te,t=this[e(297)][e(343)][e(352)](p);this[e(443)]=new me(this[e(297)][e(283)],this[e(426)],this[e(297)][e(440)][e(352)](e(393))),this[e(443)].on(e(381),()=>{const t=e;this[t(329)][t(313)][t(434)]||this[t(329)][t(313)][t(446)]()}),this[e(443)][e(374)][e(388)][e(442)].on(e(392),()=>{const t=e;this[t(329)][t(313)][t(434)]||this[t(329)][t(313)][t(446)]()}),this[e(280)](this[e(443)],e(335),()=>{const n=e;t[n(299)](this[n(445)][n(368)]),this[n(421)]()}),this[e(280)](this[e(443)],e(408),()=>{const n=e;t[n(408)](this[n(445)][n(368)]),this[n(421)]()}),this[e(354)]()}[Te(354)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(297)];this[e(443)][e(425)].on(e(355),(r,i,s)=>{const o=e,a=this[o(445)][o(368)];s?n[o(305)](v(t,o(449))):a&&n[o(305)](v(t,o(295),a),{politeness:o(433),isUnsafeHTML:!0})}),this[e(443)].on(e(273),(r,i,s)=>{const o=e;if(s){const e=this[o(443)][o(344)][o(314)];n[o(305)](v(t,o(372),e))}})}[Te(345)](e){const t=Te,n=this[t(414)][t(352)](e),r=this[t(297)],s=r[t(365)][t(310)][t(308)],o=r[t(413)][t(352)](t(395)),a=r[t(343)][t(352)](p),c=("_ungrouppedCommands"!==n[t(439)]?n[t(362)]+": ":"")+n[t(431)];if(!1!==n[t(401)]&&s[t(383)]){const e=(0,i.first)(s[t(290)]())||r[t(365)][t(444)][t(281)](s);r[t(365)][t(287)](n=>{n[t(447)](e,"in")})}a[t(429)](),o[t(419)](n[t(364)],c,t(448)+e)}[Te(301)](e,t,n,r){const i=Te,o=this[i(297)],a=o[i(283)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(328)](e=>e[i(413)][i(436)]);1===u[i(436)]?this[i(296)]({command:e,commands:u[0][i(413)],parentMenuView:t,onExecute:r})[i(410)](e=>c[i(291)][i(359)](e)):u[i(410)](({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(296)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(418)][d(309)]({label:o||n}),h[d(342)](d(419)).to(t),f[d(291)][d(435)](p),h[d(386)][d(415)][d(359)](f),l[d(415)][d(359)](h),c[d(291)][d(359)](l)}),t[i(386)][i(415)][i(359)](c)}[Te(296)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(297)],a=o[i(283)];return Ue(o,t)[i(376)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(309)]({label:t[o(431)]}),u[o(342)](o(419)).to(n),u.on(o(419),()=>r(t.id)),u[o(353)](o(361)).to(e,o(282),e=>e[o(377)](t.id)),c[o(415)][o(359)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(327)]&&void 0===t[n(327)]?1:void 0===e[n(327)]&&void 0!==t[n(327)]?-1:void 0!==e[n(327)]&&void 0!==t[n(327)]?e[n(327)]-t[n(327)]:0}function Ue(e,t){const n=Te;t[n(417)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(327)]){if(o[n(327)]in r)throw new i.CKEditorError(n(288),e,{conflictingDefinitions:[o,r[o[n(327)]]]});r[o[n(327)]]=o,s[n(319)](o[n(327)],0,o)}else s[n(423)](o);return s}const Be=Fe;function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=158]})(e,t)}function je(){const e=["Improve using friendly, comforting language, to convey understanding and empathy.","makeLonger","translateFrench","Portuguese","Improve this content by using descriptive language and inserting more information and more detailed explanations.","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Hindi","1862560lZHtRP","requires","ai.aiAssistant.commands","translateHindi","get","Summarize","commands","510741RVqFXx","changeStyle","Improve using direct language, using only the essential information.","generate","translateGerman","translateEnglish","define","journalism","ai.aiAssistant.preserveComments","translate","forEach","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Professional","220770absGfl","Change style","925755hsCObp","Rewrite this content as a legal professional using valid legal terminology.","130QiocpN","simplifyLanguage","Legal","Translate the content to Simplified Chinese language.","77758QNtphc","translateArabic","includes","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Business","Rewrite this content as a business professional with formal language.","improveWriting","legal","config","groupId","push","professional","Rewrite this content as a poem using poetic techniques without losing the original meaning.","translatePortuguese","341115TBreMH","Translate","changeTone","editOrReview","ai.aiAssistant.extraCommandGroups","Spanish","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Make shorter","isPremiumPlugin","translateSpanish","609lWCMeM","AIAssistant","Arabic","confident","2nZFrik","English","filter","Improve writing","Translate the content to French language.","Translate the content to German language.","Direct","Improve using compelling, optimistic language to convey confidence in the writing.","Simplify language","Make longer","French","Translate the content to English language.","Casual","friendly","makeShorter","Translate the content to Spanish language.","direct","business","concat","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Journalism","continue","German","Friendly","set","Translate the content to Arabic language.","Improve using casual, informal language to convey a casual conversation with a real person.","Change tone","summarize","locale","casual","Confident","Continue","Edit or review","Translate the content to Hindi language.","Generate from selection","Simplified Chinese","poetic","pluginName","Poetic","isOfficialPlugin","4SSdIGB","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","8076rlSkec","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","translateChinese","ai.aiAssistant.removeCommands","Translate the content to Portuguese language.","find"];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(219873===-parseInt(t(189))/1*(-parseInt(t(161))/2)+-parseInt(t(175))/3*(-parseInt(t(230))/4)+parseInt(t(267))/5+-parseInt(t(232))/6*(parseInt(t(185))/7)+parseInt(t(245))/8+-parseInt(t(265))/9*(parseInt(t(269))/10)+parseInt(t(252))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class qe extends e.Plugin{static get[Be(246)](){return[Ne,p]}static get[Be(227)](){return Be(186)}static get[Be(229)](){return!0}static get[Be(183)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(169)],r=e[t(218)];n[t(258)](t(260),!0),n[t(258)](t(247),He(r)),n[t(258)](t(179),[]),n[t(258)](t(235),[]);let i=o(n[t(249)](t(247)),r);const s=n[t(249)](t(179)),a=n[t(249)](t(235));s[t(262)](e=>{const n=t,r=i[n(237)](t=>t[n(170)]===e[n(170)]);r?r[n(251)]=r[n(251)][n(207)](e[n(251)]):i[n(171)](e)}),i=i[t(191)](e=>!a[t(163)](e[t(170)])),i[t(262)](e=>{const n=t;e[n(251)]=e[n(251)][n(191)](e=>!a[n(163)](e.id))}),n[t(213)](t(247),i)}}function He(e){const t=Be;return[{groupId:t(178),groupLabel:v(e,t(222)),commands:[{id:t(167),label:v(e,t(192)),prompt:t(263)},{id:t(203),label:v(e,t(182)),prompt:t(233)},{id:t(239),label:v(e,t(198)),prompt:t(242)},{id:t(158),label:v(e,t(197)),prompt:t(231)}]},{groupId:t(255),groupLabel:v(e,t(224)),commands:[{id:t(217),label:v(e,t(250)),prompt:t(243)},{id:t(210),label:v(e,t(221)),prompt:t(181)}]},{groupId:t(177),groupLabel:v(e,t(216)),commands:[{id:t(172),label:v(e,t(264)),prompt:t(208)},{id:t(219),label:v(e,t(201)),prompt:t(215)},{id:t(205),label:v(e,t(195)),prompt:t(254)},{id:t(188),label:v(e,t(220)),prompt:t(196)},{id:t(202),label:v(e,t(212)),prompt:t(238)}]},{groupId:t(253),groupLabel:v(e,t(266)),commands:[{id:t(206),label:v(e,t(165)),prompt:t(166)},{id:t(168),label:v(e,t(159)),prompt:t(268)},{id:t(259),label:v(e,t(209)),prompt:t(164)},{id:t(226),label:v(e,t(228)),prompt:t(173)}]},{groupId:t(261),groupLabel:v(e,t(176)),commands:[{id:t(257),label:v(e,t(190)),prompt:t(200)},{id:t(184),label:v(e,t(180)),prompt:t(204)},{id:t(174),label:v(e,t(241)),prompt:t(236)},{id:t(256),label:v(e,t(211)),prompt:t(194)},{id:t(240),label:v(e,t(199)),prompt:t(193)},{id:t(234),label:v(e,t(225)),prompt:t(160)},{id:t(248),label:v(e,t(244)),prompt:t(223)},{id:t(162),label:v(e,t(187)),prompt:t(214)}]}]}const ze=Ve;function Ve(e,t){const n=Ge();return(Ve=function(e,t){return n[e-=386]})(e,t)}function Ge(){const e=["catch","4510mQjJps","aitextadapter-send-request-failed","reject","4429555jvIGVn","application/json","get","1659515anFGLp","56273zunAQH","aborted","_prepareRequestParameters","AI_ERROR_GET_HEADERS","editor","2dlUVAj","_prepareRequestHeaders","9172mqDnSv","1011nCPKrt","abort","10782JBfpPA","object","init","name","resolve","plugins","textAdapter","108KXtjIs","signal","requires","locale","AbortError","assign","1599612fwIYDQ","makeRequest","abortController","349241norcUK","sendRequest","AI_ERROR_GET_PARAMETERS","328xXOvYB","error"];return(Ge=function(){return e})()}!function(e){const t=Ve,n=e();for(;;)try{if(457357===-parseInt(t(415))/1*(-parseInt(t(394))/2)+parseInt(t(397))/3*(parseInt(t(396))/4)+-parseInt(t(424))/5+-parseInt(t(412))/6+-parseInt(t(389))/7*(parseInt(t(418))/8)+-parseInt(t(399))/9*(parseInt(t(421))/10)+-parseInt(t(388))/11*(-parseInt(t(406))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[ze(414)];static get[ze(408)](){return[w]}constructor(e){const t=ze;super(e),this[t(414)]=new AbortController}[ze(401)](){const e=ze;this[e(393)][e(404)][e(387)](w)[e(405)]=this}[ze(398)](){const e=ze;this[e(414)][e(407)][e(390)]||(this[e(414)][e(398)](),this[e(414)]=new AbortController)}async[ze(413)](e){const t=ze;return this[t(416)](e)[t(420)](e=>{const n=t;if(e instanceof b)return Promise[n(423)](e);if(n(410)==e[n(402)])return Promise[n(403)]();throw console[n(419)](e),new i.CKEditorError(n(422),null)})}async[ze(395)](e,t){const n=ze,r=this[n(393)][n(409)],i={"Content-Type":n(386)};if(n(400)==typeof e)Object[n(411)](i,e);else if(e)try{const r=await e(t);Object[n(411)](i,r)}catch{return Promise[n(423)](new b(v(r,n(392))))}return i}async[ze(391)](e,t){const n=ze,r=this[n(393)][n(409)];if(n(400)==typeof e)return e;try{return await e(t)}catch{return Promise[n(423)](new b(v(r,n(417))))}}}const Ke=Je;function Qe(){const e=["_requestParameters","get","2104004amRBzy","_readStaticResponse","body","message","_prepareRequestParameters","326065NOqqtx","66EZJicv","read","_readStreamableResponse","gpt-3.5-turbo","\nYou must keep the text formatting.\n\nContent:\n","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.","POST","75zMbMCg","map","replace","645398xdWRCz","stream","decode","_isBufferIncomplete","includes","system","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.","join","stringify","abortController","_prepareRequestHeaders","pluginName","split","_apiUrl","https://api.openai.com/v1/chat/completions","choices","_requestHeaders","user","AI_ERROR_CONTEXT_LENGTH","[DONE]","locale","text","content","ai.openAI.requestParameters","Moderation","21524mIAUmo","filter","delta","8464688okmsNx","reject","prepareMessages","Instruction:\n","2328147zVIWGs","data: ","define","signal","resolve","length","_cleanUpData","OpenAITextAdapter","getReader","json","context_length_exceeded","editor","AI_ERROR_MODERATION","ai.openAI.requestHeaders","config","756570UEMfSQ","ai.openAI.apiUrl","parse","sendRequest"];return(Qe=function(){return e})()}function Je(e,t){const n=Qe();return(Je=function(e,t){return n[e-=458]})(e,t)}!function(e){const t=Je,n=e();for(;;)try{if(784270===parseInt(t(493))/1+-parseInt(t(471))/2+-parseInt(t(490))/3*(-parseInt(t(518))/4)+parseInt(t(482))/5*(-parseInt(t(483))/6)+parseInt(t(477))/7+parseInt(t(521))/8+-parseInt(t(525))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qe);class Ye extends We{[Ke(506)];[Ke(509)];[Ke(475)];static get[Ke(504)](){return Ke(463)}constructor(e){const t=Ke;super(e),e[t(470)][t(458)](t(472),t(507)),e[t(470)][t(476)](t(516))||e[t(470)][t(458)](t(516),{model:t(486),max_tokens:2e3,temperature:1,top_p:1,stream:!0}),this[t(506)]=e[t(470)][t(476)](t(472)),this[t(509)]=e[t(470)][t(476)](t(469))||{},this[t(475)]=e[t(470)][t(476)](t(516))}async[Ke(474)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(467)][i(513)],o=await this[i(523)](e,t,r),a=await this[i(503)](this[i(509)],r),c=await this[i(481)](this[i(475)],r),u={messages:o,...c},d={method:i(489),headers:a,body:JSON[i(501)](u),signal:this[i(502)][i(459)]},l=await fetch(this[i(506)],d);if(l.ok)return c[i(494)]?await this[i(485)](l,n):await this[i(478)](l,n),Promise[i(460)]();{const e=await l[i(514)]();return e[i(497)](i(466))?Promise[i(522)](new b(v(s,i(511)))):e[i(497)](i(517))?Promise[i(522)](new b(v(s,i(468)))):Promise[i(522)](new Error(e))}}async[Ke(523)](e,t,n){const r=Ke;let i,s;return t?(i=r(499),s=r(524)+e+r(487)+t):(i=r(488),s=e),[{role:r(498),content:i},{role:r(510),content:s}]}async[Ke(485)](e,t){const n=Ke,r=e[n(479)][n(464)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(484)](),d=s+i[n(495)](u);let l="";c=e;try{l=this[n(462)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(496)](o)||o&&(a+=o,o="",t(a))}return Promise[n(460)]()}async[Ke(478)](e,t){const n=Ke;return t((await e[n(465)]())[n(508)][0][n(480)][n(515)]),Promise[n(460)]()}[Ke(496)](e){const t=Ke,n=e[t(505)]("<")[t(461)]!==e[t(505)](">")[t(461)],r=e[t(461)]<30;return n&&r}[Ke(462)](e){const t=Ke;return e[t(505)](/\n(?![^{]*\})/g)[t(491)](e=>e[t(492)](t(526),""))[t(519)](e=>e&&e[t(461)]>0&&t(512)!==e)[t(491)](e=>{const n=t,{choices:r}=JSON[n(473)](e);if(r[0]?.[n(520)]?.[n(515)])return r[0][n(520)][n(515)]})[t(519)](e=>e)[t(500)]("")}}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=>e[rt]||(e[rt]={}),mt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const gt=(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=pt(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)},yt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},wt=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],bt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function kt(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:wt(/^x-[\w-]+-request-?id$/,n),extendedRequestId:wt(/^x-[\w-]+-id-2$/,n),cfId:wt(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),bt),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),vt)}}}const St=e=>e=>{throw e},Et=(e,t)=>{},At={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},It=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=pt(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||St)(i));return(o.successHandler||Et)(a.response,i),a},At)}}),xt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},_t={},Rt=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);_t[n]=e,Rt[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;_t[n]=r,Rt[r]=n}for(let e=0;e<10;e++){_t[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;_t[t]=n,Rt[n]=t}_t["+"]=62,Rt[62]="+",_t["/"]=63,Rt[63]="/";const Ct=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 _t))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=_t[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)},Pt=e=>(new TextEncoder).encode(e);function Mt(e){let t;t="string"==typeof e?Pt(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+=Rt[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const Tt=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 Ot extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?Ot.mutate(Ct(e)):Ot.mutate(Pt(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Ot.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?Mt(e):Tt(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const Lt=e=>encodeURIComponent(e).replace(/[!'()*]/g,$t),$t=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Nt(e,t){return new Request(e,t)}function Dt(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 Ut={supported:void 0};class Bt{static create(e){return"function"==typeof e?.handle?e:new Bt(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Ut.supported&&(Ut.supported=Boolean("undefined"!=typeof Request&&"keepalive"in Nt("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Lt(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${Lt(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${Lt(r)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,l="GET"===u||"HEAD"===u?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Ut.supported&&(h.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const p=Nt(d,h),m=[fetch(p).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})}))}),Dt(n)];return t&&m.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}),f=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(m).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const Ft=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=Ct(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 jt={},qt={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),jt[e]=t,qt[t]=e}function Ht(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 qt))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=qt[r]}return t}function zt(e){let t="";for(let n=0;n<e.byteLength;n++)t+=jt[e[n]];return t}const Vt=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ot.mutate(e);if(!e)return Ot.mutate(new Uint8Array);const n=t.streamCollector(e);return Ot.mutate(await n)};class Gt{constructor(e,t=new Map){this.namespace=e,this.schemas=t}static for(e){return Gt.registries.has(e)||Gt.registries.set(e,new Gt(e)),Gt.registries.get(e)}register(e,t){const n=this.normalizeShapeId(e);Gt.for(this.getNamespace(e)).schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}getBaseException(){for(const[e,t]of this.schemas.entries())if(e.startsWith("smithy.ts.sdk.synthetic.")&&e.endsWith("ServiceException"))return t}find(e){return[...this.schemas.values()].find(e)}destroy(){Gt.registries.delete(this.namespace),this.schemas.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}getNamespace(e){return this.normalizeShapeId(e).split("#")[0]}}Gt.registries=new Map;Math.ceil(2**127*(2-2**-23));const Wt=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},Kt=e=>Qt(e,32),Qt=(e,t)=>{const n=Wt(e);if(void 0!==n&&Jt(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Jt=(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]}},Yt=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Xt.warn(Zt(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Zt=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Xt={warn:console.warn};const en=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};en.from=e=>e&&"object"==typeof e&&(e instanceof en||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?en(String(e)):en(JSON.stringify(e)),en.fromObject=en.from;Symbol.hasInstance;function tn(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function nn(e,t){return new rn(e,t)}class rn{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=>tn(e)).join("/"):tn(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}}class sn{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 on=(an=3e5,e=>cn(e)&&e.expiration.getTime()-Date.now()<an);var an;const cn=e=>void 0!==e.expiration;const un=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}$"),dn=e=>un.test(e)||e.startsWith("[")&&e.endsWith("]"),ln=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),hn=(e,t=!1)=>{if(!t)return ln.test(e);const n=e.split(".");for(const e of n)if(!hn(e))return!1;return!0},fn={},pn="endpoints";function mn(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${mn(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(mn).join(", ")})`:JSON.stringify(e,null,2)}class gn extends Error{constructor(e){super(e),this.name="EndpointError"}}const yn=(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 gn(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new gn(`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 gn(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),wn={[et.HTTP]:80,[et.HTTPS]:443},bn={booleanEquals:(e,t)=>e===t,getAttr:yn,isSet:e=>null!=e,isValidHostLabel:hn,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=dn(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${wn[c]}`)||"string"==typeof e&&e.includes(`${r}:${wn[c]}`)?`:${wn[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()}`)},vn=(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(yn(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},kn=(e,t,n)=>{if("string"==typeof e)return vn(e,n);if(e.fn)return Sn(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new gn(`'${t}': ${String(e)} is not a string, function or reference.`)},Sn=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:kn(e,"arg",n)),i=e.split(".");return i[0]in fn&&null!=i[1]?fn[i[0]][i[1]](...r):bn[e](...r)},En=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new gn(`'${e}' is already defined in Reference Record.`);const r=Sn(t,n);return n.logger?.debug?.(`${pn} evaluateCondition: ${mn(t)} = ${mn(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},An=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=En(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${pn} assign: ${i.name} := ${mn(i.value)}`))}return{result:!0,referenceRecord:n}},In=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=kn(e,"Header value entry",t);if("string"!=typeof r)throw new gn(`Header '${n}' value '${r}' is not a string`);return r})}),{}),xn=(e,t)=>{if(Array.isArray(e))return e.map(e=>xn(e,t));switch(typeof e){case"string":return vn(e,t);case"object":if(null===e)throw new gn(`Unexpected endpoint property: ${e}`);return _n(e,t);case"boolean":return e;default:throw new gn("Unexpected endpoint property type: "+typeof e)}},_n=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:xn(r,t)}),{}),Rn=(e,t)=>{const n=kn(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 gn("Endpoint URL must be a string, got "+typeof n)},Cn=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=An(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${pn} Resolving endpoint from template: ${mn(r)}`),{...null!=u&&{headers:In(u,o)},...null!=c&&{properties:_n(c,o)},url:Rn(a,o)}},Pn=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=An(n,t);if(i)throw new gn(kn(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Mn=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=An(n,t);if(i)return Tn(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Tn=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Cn(n,t);if(e)return e}else if("error"===n.type)Pn(n,t);else{if("tree"!==n.type)throw new gn(`Unknown endpoint rule: ${n}`);{const e=Mn(n,t);if(e)return e}}throw new gn("Rules evaluation failed")},On=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!On(t))return!1;return!0}return!!hn(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!dn(e)))};let Ln=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"}'),$n="";const Nn={isVirtualHostableS3Bucket:On,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}=Ln;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 Dn(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}fn.aws=Nn;const Un=/\d{12}\.ddb/;const Bn="user-agent",Fn="x-amz-user-agent",jn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,qn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Hn=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(zn)||[],a=(await e.defaultUserAgentProvider()).map(zn);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&Dn(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Dn(e,"RETRY_MODE_ADAPTIVE","F"):Dn(e,"RETRY_MODE_STANDARD","E"):Dn(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Un)&&Dn(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Dn(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Dn(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Dn(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&Dn(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))Dn(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(zn)||[],d=await e.userAgentAppId();d&&a.push(zn([`app/${d}`]));const l=($n?[$n]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Fn]=s[Fn]?`${s[Bn]} ${h}`:h),s[Bn]=l):s[Fn]=l,t({...r,request:i})},zn=e=>{const t=e[0].split("/").map(e=>e.replace(jn,"-")).join("/"),n=e[1]?.replace(qn,"-"),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}`}},"")},Vn={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Gn;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Gn||(Gn={}));const Wn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Kn=e=>Wn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Qn="content-length";const Jn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Yn=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(Qn))try{const t=n(e);r.headers={...r.headers,[Qn]:String(t)}}catch(e){}}return e({...t,request:r})}),Jn)}}),Zn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Xn=/(\d+\.){3}\d+/,er=/\.\./,tr=e=>Zn.test(e)&&!Xn.test(e)&&!er.test(e),nr=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},rr=(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()=>{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},ir=async e=>{};const sr=e=>{if("string"==typeof e)return sr(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}},or=e=>"object"==typeof e?"url"in e?sr(e.url):e:sr(e),ar=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 rr(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("?"))),nr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!tr(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},cr=({config:e,instructions:t})=>(n,r)=>async i=>{e.endpoint&&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.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await ir(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(or(e)))}const i=await ar(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=pt(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})},ur={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:vt.name},dr=(e,t)=>({applyToStack:n=>{n.addRelativeTo(cr({config:e,instructions:t}),ur)}});var lr;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(lr||(lr={}));const hr=lr.STANDARD,fr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],pr=["TimeoutError","RequestTimeout","RequestTimeoutException"],mr=[500,502,503,504],gr=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],yr=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],wr=e=>429===e.$metadata?.httpStatusCode||fr.includes(e.name)||1==e.$retryable?.throttling,br=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||pr.includes(e.name)||gr.includes(e?.code||"")||yr.includes(e?.code||"")||mr.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&&br(e.cause,t+1);class vr{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=>vr.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(),wr(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))}}vr.setTimeoutFn=setTimeout;const kr=100,Sr=2e4,Er="amz-sdk-invocation-id",Ar="amz-sdk-request",Ir=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Sr,e),getRetryCost:()=>n});class xr{constructor(e){this.maxAttempts=e,this.mode=lr.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=kr;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Sr,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Ir({retryDelay:kr,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:kr);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,Ir({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 _r{constructor(e,t){this.maxAttemptsProvider=e,this.mode=lr.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new vr,this.standardRetryStrategy=new xr(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 Rr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Cr;const Pr=new Uint8Array(16);function Mr(){if(!Cr&&(Cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cr(Pr)}const Tr=[];for(let e=0;e<256;++e)Tr.push((e+256).toString(16).slice(1));function Or(e,t=0){return Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]}const Lr=function(e,t,n){if(Rr.randomUUID&&!t&&!e)return Rr.randomUUID();const r=(e=e||{}).random||(e.rng||Mr)();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 Or(r)},$r=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},Dr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Ur=()=>{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 ${Dr(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)=>Br[t.step]-Br[e.step]||Fr[t.priority||"normal"]-Fr[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 '${Dr(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(`"${Dr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Dr(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 '${Dr(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(`"${Dr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Dr(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(Ur()),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(Ur());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 Dr(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},Br={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Fr={high:3,normal:2,low:1};class jr{constructor(e){this.config=e,this.middlewareStack=Ur()}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}}class qr{constructor(){this.middlewareStack=Ur()}static classBuilder(){return new Hr}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 Hr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,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 qr{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,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const zr="***SensitiveInformation***";class Vr 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 Vr.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===Vr?Vr.isInstance(e):!!Vr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Gr=(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},Wr=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"]}),Kr=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{}}},Qr=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)),Jr=e=>null!=e;class Yr{trace(){}debug(){}info(){}warn(){}error(){}}function Zr(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,ei(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?ti(r,null,s,e):r[e]=s[e];return r}const Xr=(e,t)=>{const n={};for(const r in t)ti(n,e,t,r);return n},ei=(e,t,n)=>Zr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),ti=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=ni,o=ri,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)}},ni=e=>null!=e,ri=e=>e,ii=e=>e?.body instanceof ReadableStream,si=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,oi=e=>{const t={error:e,errorType:ai(e)},n=di(e.$response);return n&&(t.retryAfterHint=n),t},ai=e=>wr(e)?"THROTTLING":br(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!br(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ci={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ui=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!si(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[Er]=Lr());;)try{d&&(u.headers[Ar]=`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=oi(t);if(o=$r(t),d&&ii(u))throw(n.logger instanceof Yr?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),ci)}}),di=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 li=e=>"string"==typeof e?Pt(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),hi="X-Amz-Date",fi="X-Amz-Signature",pi="X-Amz-Security-Token",mi="authorization",gi=hi.toLowerCase(),yi=[mi,gi,"date"],wi=fi.toLowerCase(),bi="x-amz-content-sha256",vi=pi.toLowerCase(),ki={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},Si=/^proxy-/,Ei=/^sec-/,Ai="AWS4-HMAC-SHA256",Ii="AWS4-HMAC-SHA256-PAYLOAD",xi="aws4_request",_i={},Ri=[],Ci=(e,t,n)=>`${e}/${t}/${n}/${xi}`,Pi=(e,t,n)=>{const r=new e(t);return r.update(li(n)),r.digest()},Mi=({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 ki||t?.has(s)||Si.test(s)||Ei.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Ti=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===bi)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(li(t)),zt(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Oi{format(e){const t=[];for(const n of Object.keys(e)){const r=Pt(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=Pt(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(Ni.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!$i.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ht(e.value.replace(/\-/g,"")),1),d}}}var Li;!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"}(Li||(Li={}));const $i=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ni{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&&Di(t),new Ni(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Di(e),parseInt(zt(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Di(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Ui=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))yi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Bi=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Fi{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=mt(n),this.credentialProvider=mt(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()===wi)continue;const i=Lt(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${Lt(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${Lt(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(li(n));return`${r}\n${e}\n${t}\n${zt(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 Lt(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,Bi(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 ji extends Fi{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 Oi}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=Ci(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}})(Ui(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[pi]=d.sessionToken),m.query["X-Amz-Algorithm"]=Ai,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[hi]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Mi(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[fi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Ti(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=Ci(a,o,s??this.service),d=await Ti({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=zt(await l.digest()),f=[Ii,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(li(e)),zt(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=Ui(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ci(d,a,s??this.service);c.headers[gi]=u,o.sessionToken&&(c.headers[vi]=o.sessionToken);const h=await Ti(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(bi,c.headers)&&this.applyChecksum&&(c.headers[bi]=h);const f=Mi(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[mi]=`${Ai} 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,Ai),s=new this.sha256(await n);return s.update(li(i)),zt(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${zt(await Pi(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in _i)return _i[s];for(Ri.push(s);Ri.length>50;)delete _i[Ri.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,xi])o=await Pi(e,o,t);return _i[s]=o})(this.sha256,e,n,t,r||this.service)}}const qi=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,on,cn):n?xt(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?xt(e.signer):e.regionInfoProvider?()=>xt(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||ji)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await xt(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||ji)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const Hi=async(e,t,n)=>({operation:pt(t).operation,region:await mt(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const zi=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},Vi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Gi="3.823.0";var Wi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Ki(e){return e instanceof Uint8Array?e:"string"==typeof e?Wi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Qi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Ji={name:"SHA-256"},Yi={name:"HMAC",hash:Ji},Zi=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 Xi={};function es(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Xi}var ts=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Qi(e)){var t=Ki(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 es().crypto.subtle.sign(Yi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):Qi(this.toHash)?Promise.resolve(Zi):Promise.resolve().then(function(){return es().crypto.subtle.digest(Ji,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){es().crypto.subtle.importKey("raw",Ki(e.secret),Yi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function ns(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 rs(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 is(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 ss=64,os=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]),as=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],cs=Math.pow(2,53)-1,us=function(){function e(){this.state=Int32Array.from(as),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>cs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ss&&(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%ss>=56){for(var r=this.bufferLength;r<ss;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<ss;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+(os[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}(),ds=function(){function e(e){this.secret=e,this.hash=new us,this.reset()}return e.prototype.update=function(e){if(!Qi(e)&&!this.error)try{this.hash.update(Ki(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 ns(this,void 0,void 0,function(){return rs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new us,this.secret){this.outer=new us;var e=function(e){var t=Ki(e);if(t.byteLength>ss){var n=new us;n.update(t),t=n.digest()}var r=new Uint8Array(ss);return r.set(t),r}(this.secret),t=new Uint8Array(ss);t.set(e);for(var n=0;n<ss;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 ls=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function hs(e){return e&&ls.every(function(t){return"function"==typeof e[t]})}var fs=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)&&hs(e.crypto.subtle)}(es())?this.hash=new ds(e):this.hash=new ts(e)}return e.prototype.update=function(e,t){this.hash.update(Ki(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ps=n(369),ms=n.n(ps);const gs=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?ms().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 ws}e.prototype.update=function(e){Qi(e)||this.crc32.update(Ki(e))},e.prototype.digest=function(){return ns(this,void 0,void 0,function(){return rs(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 ws}}();var ys,ws=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=is(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^bs[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}(),bs=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 vs{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&&ks(t),new vs(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&ks(e),parseInt(zt(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function ks(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Ss{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(vs.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ts.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ht(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:Es,value:!0};break;case 1:t[i]={type:Es,value:!1};break;case 2:t[i]={type:As,value:e.getInt8(n++)};break;case 3:t[i]={type:Is,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:xs,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:_s,value:new vs(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Rs,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:Cs,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Ps,value:new Date(new vs(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:Ms,value:`${zt(o.subarray(0,4))}-${zt(o.subarray(4,6))}-${zt(o.subarray(6,8))}-${zt(o.subarray(8,10))}-${zt(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"}(ys||(ys={}));const Es="boolean",As="byte",Is="short",xs="integer",_s="long",Rs="binary",Cs="string",Ps="timestamp",Ms="uuid",Ts=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Os{constructor(e,t){this.headerMarshaller=new Ss(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 ws;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 ws).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 Ls{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 $s{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 Ns{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 Ds{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 Us(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 Bs{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Os(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 Ns({messageStream:new Ls({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Us(t,this.utfEncoder)})}serialize(e,t){return new $s({messageStream:new Ds({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Fs{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Bs({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=js(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 js=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,qs=e=>new Fs(e),Hs="function"==typeof TextEncoder?new TextEncoder:null,zs=e=>{if("string"==typeof e){if(Hs)return Hs.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}`)},Vs=e=>new Date(Date.now()+e),Gs=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ws=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Vs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Ks=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Qs{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=Ks("context",e.context),n=Ks("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Ks("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:Vs(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Gs(t.$response);if(n){const r=Ks("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Ws(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Gs(e);if(n){const e=Ks("config",t.config);e.systemClockOffset=Ws(n,e.systemClockOffset)}}}const Js="required",Ys="fn",Zs="argv",Xs="ref",eo=!0,to="isSet",no="booleanEquals",ro="error",io="endpoint",so="tree",oo="PartitionResult",ao={[Js]:!1,type:"String"},co={[Js]:!0,default:!1,type:"Boolean"},uo={[Xs]:"Endpoint"},lo={[Ys]:no,[Zs]:[{[Xs]:"UseFIPS"},!0]},ho={[Ys]:no,[Zs]:[{[Xs]:"UseDualStack"},!0]},fo={},po={[Ys]:"getAttr",[Zs]:[{[Xs]:oo},"supportsFIPS"]},mo={[Ys]:no,[Zs]:[!0,{[Ys]:"getAttr",[Zs]:[{[Xs]:oo},"supportsDualStack"]}]},go=[lo],yo=[ho],wo=[{[Xs]:"Region"}],bo={version:"1.0",parameters:{Region:ao,UseDualStack:co,UseFIPS:co,Endpoint:ao},rules:[{conditions:[{[Ys]:to,[Zs]:[uo]}],rules:[{conditions:go,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ro},{rules:[{conditions:yo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ro},{endpoint:{url:uo,properties:fo,headers:fo},type:io}],type:so}],type:so},{rules:[{conditions:[{[Ys]:to,[Zs]:wo}],rules:[{conditions:[{[Ys]:"aws.partition",[Zs]:wo,assign:oo}],rules:[{conditions:[lo,ho],rules:[{conditions:[{[Ys]:no,[Zs]:[eo,po]},mo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ro}],type:so},{conditions:go,rules:[{conditions:[{[Ys]:no,[Zs]:[po,eo]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so},{error:"FIPS is enabled but this partition does not support FIPS",type:ro}],type:so},{conditions:yo,rules:[{conditions:[mo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so},{error:"DualStack is enabled but this partition does not support DualStack",type:ro}],type:so},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so}],type:so},{error:"Invalid Configuration: Missing Region",type:ro}],type:so}]},vo=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"]}),ko=(e,t={})=>vo.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${pn} Initial EndpointParams: ${mn(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 gn(`Missing required parameter: '${e}'`);const c=Tn(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${pn} Resolved endpoint: ${mn(c)}`),c})(bo,{endpointParams:e,logger:t.logger}));fn.aws=Nn;Error;const So=["in-region","cross-region","mobile","standard","legacy"],Eo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ms().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Ao=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(Eo()?"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 ${So.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Kr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??Ct,base64Encoder:e?.base64Encoder??Mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ko,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??zi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Qs}],logger:e?.logger??new Yr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??sr,utf8Decoder:e?.utf8Decoder??Pt,utf8Encoder:e?.utf8Encoder??Tt}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??zs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??gs({serviceId:r.serviceId,clientVersion:Gi}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??qs,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Bt.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||hr),sha256:e?.sha256??fs,streamCollector:e?.streamCollector??Ft,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},Io=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Qr(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 xo extends jr{config;constructor(...[e]){const t=Ao(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=xt(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=mt(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await mt(n)()===lr.ADAPTIVE?new _r(i):new xr(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 Kn(t);const e=await t();return Kn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Wn(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()=>or(await mt(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:mt(r??!1),useFipsEndpoint:mt(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=ir(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=qi(e);return Object.assign(t,{authSchemePreference:mt(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=Io(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Hn(l),Vn)}})),this.middlewareStack.use(ui(this.config)),this.middlewareStack.use(Yn(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(gt(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),yt)}}))(this.config,{httpAuthSchemeParametersProvider:Hi,identityProviderConfigProvider:async e=>new sn({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(It(this.config))}destroy(){super.destroy()}}class _o extends Vr{constructor(e){super(e),Object.setPrototypeOf(this,_o.prototype)}}class Ro extends _o{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ro.prototype)}}var Co;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(Co||(Co={}));class Po extends _o{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Po.prototype)}}class Mo extends _o{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,Mo.prototype)}}class To extends _o{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,To.prototype)}}class Oo extends _o{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}class Lo extends _o{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Lo.prototype)}}class $o extends _o{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,$o.prototype)}}class No extends _o{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,No.prototype)}}var Do;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));var Uo;!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])}(Uo||(Uo={}));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 Fo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Fo||(Fo={}));var jo;!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])}(jo||(jo={}));var qo,Ho;!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.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));var zo,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])}(zo||(zo={})),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])}(Vo||(Vo={}));var Go;!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])}(Go||(Go={}));var Wo,Ko,Qo,Jo,Yo,Zo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Wo||(Wo={})),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])}(Ko||(Ko={})),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])}(Qo||(Qo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={})),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])}(Yo||(Yo={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Zo||(Zo={}));class Xo extends _o{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Xo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class ea extends _o{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,ea.prototype)}}class ta extends _o{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype)}}var na,ra,ia,sa;!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])}(na||(na={})),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])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));class oa extends _o{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,oa.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])}(sa||(sa={}));var aa,ca,ua;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(aa||(aa={})),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])}(ca||(ca={})),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])}(ua||(ua={}));const da=e=>({...e,...e.body&&{body:zr}}),la=e=>({...e,...e.body&&{body:zr}}),ha=e=>({...e,...e.body&&{body:zr}}),fa=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),pa=(e,t)=>((e,t)=>Vt(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{}}),ma=async(e,t)=>{const n=await pa(e,t);return n.message=n.message??n.Message,n},ga=async(e,t)=>{const n=nn(e,t),r=Zr({},Jr,{[Wa]:e[Ga]||"application/octet-stream",[Va]:e[Va],[rc]:e[Ya],[ec]:e[Ka],[tc]:e[Qa],[nc]:e[Ja]});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()},ya=async(e,t)=>{const n=nn(e,t),r=Zr({},Jr,{[Wa]:e[Ga]||"application/octet-stream",[Za]:e[Va],[rc]:e[Ya],[ec]:e[Ka],[tc]:e[Qa],[nc]:e[Ja]});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()},wa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return va(e,t);const n=Zr({$metadata:za(e),[Ga]:[,e.headers[Wa]],[Ja]:[,e.headers[nc]]}),r=await Vt(e.body,t);return n.body=r,n},ba=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return va(e,t);const n=Zr({$metadata:za(e),[Ga]:[,e.headers[Xa]],[Ja]:[,e.headers[nc]]}),r=e.body;return n.body=$a(r,t),n},va=async(e,t)=>{const n={...e,body:await ma(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 Ea(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Ia(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Pa(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ma(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Oa(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await La(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await xa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await _a(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Ca(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ta(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await Ra(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Aa(n,t);default:const i=n.body;return ka({output:e,parsedBody:i,errorCode:r})}},ka=(Sa=_o,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Wr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Gr(o,t)})({output:e,parsedBody:t,exceptionCtor:Sa,errorCode:n})});var Sa;const Ea=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new Ro({$metadata:za(e),...n});return Gr(s,e.body)},Aa=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new Oo({$metadata:za(e),...n});return Gr(s,e.body)},Ia=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new Po({$metadata:za(e),...n});return Gr(s,e.body)},xa=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt,originalStatusCode:Kt,resourceName:Yt});Object.assign(n,i);const s=new Xo({$metadata:za(e),...n});return Gr(s,e.body)},_a=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new ea({$metadata:za(e),...n});return Gr(s,e.body)},Ra=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt,originalMessage:Yt,originalStatusCode:Kt});Object.assign(n,i);const s=new oa({$metadata:za(e),...n});return Gr(s,e.body)},Ca=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new ta({$metadata:za(e),...n});return Gr(s,e.body)},Pa=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new Lo({$metadata:za(e),...n});return Gr(s,e.body)},Ma=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new $o({$metadata:za(e),...n});return Gr(s,e.body)},Ta=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new No({$metadata:za(e),...n});return Gr(s,e.body)},Oa=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new Mo({$metadata:za(e),...n});return Gr(s,e.body)},La=async(e,t)=>{const n=Zr({}),r=e.body,i=Xr(r,{message:Yt});Object.assign(n,i);const s=new To({$metadata:za(e),...n});return Gr(s,e.body)},$a=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Ba(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Na(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Da(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await qa(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await ja(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Ua(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Fa(n.serviceUnavailableException,t)}:{$unknown:e}),Na=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ia(n,t)},Da=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ra(n,t)},Ua=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ca(n,t)},Ba=async(e,t)=>{const n={},r=await pa(e.body,t);return Object.assign(n,Ha(r,t)),n},Fa=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ta(n,t)},ja=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Oa(n,t)},qa=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return La(n,t)},Ha=(e,t)=>Xr(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"]}),Va="accept",Ga="contentType",Wa="content-type",Ka="guardrailIdentifier",Qa="guardrailVersion",Ja="performanceConfigLatency",Ya="trace",Za="x-amzn-bedrock-accept",Xa="x-amzn-bedrock-content-type",ec="x-amzn-bedrock-guardrailidentifier",tc="x-amzn-bedrock-guardrailversion",nc="x-amzn-bedrock-performanceconfig-latency",rc="x-amzn-bedrock-trace";class ic extends(qr.classBuilder().ep(Vi).m(function(e,t,n,r){return[kt(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ha,fa).ser(ya).de(ba).build()){}class sc extends(qr.classBuilder().ep(Vi).m(function(e,t,n,r){return[kt(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(da,la).ser(ga).de(wa).build()){}const oc=ac;function ac(e,t){const n=cc();return(ac=function(e,t){return n[e-=475]})(e,t)}function cc(){const e=["<<SYS>>\n","filter","length","parse","\n<</SYS>>\n[INST]\n","ai21.j2","read","ai.aws.apiUrl","decode","utf-8","bedrock-2023-05-31","ai.aws.requestHeaders","_readStaticResponse","11DcxTfH","editor","POST","AI_ERROR_UNSUPPORTED_MODEL","\n\nAssistant:","_requestParameters","ai.aws.requestParameters","402zGGnJn","Human:\n","AWSTextAdapter","resolve","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.","40rDDXpo","generations","_apiUrl","Instruction:\n","completion","2918510JrMAwd","test","text","160zPWrho","_processProxyRequest","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.","locale","_readAsyncIterableResponse","join","\nYou must keep the text formatting.\n\nContent:\n","split","abortController","\n[/INST]","anthropic.claude","json","_processAWSRequest","15010ejNMAh","588tKNgXy","_bedrockClientConfig","define","bytes","config","1982414eocBxW","_prepareRequestParameters","62348dXGrBO","3932aMtMOl","chunk","get","_prepareRequestHeaders","9jtqSVs","pluginName","getReader","body","4697016czcNaW","send","_getGeneratedText","cohere.command","sendRequest","3273ZTlWUO","getModelFamily","stringify","application/json","map","generation","meta.llama","_readStreamableResponse","completions","signal","data","ai.aws.bedrockClientConfig","anthropic.claude-v2","_requestHeaders","preparePrompt"];return(cc=function(){return e})()}!function(e){const t=ac,n=e();for(;;)try{if(325996===-parseInt(t(519))/1*(parseInt(t(541))/2)+parseInt(t(554))/3*(parseInt(t(511))/4)+-parseInt(t(532))/5*(parseInt(t(506))/6)+-parseInt(t(538))/7+parseInt(t(549))/8*(parseInt(t(545))/9)+parseInt(t(516))/10*(parseInt(t(499))/11)+-parseInt(t(533))/12*(-parseInt(t(540))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cc);class uc extends We{[oc(513)];[oc(484)];[oc(534)];[oc(504)];static get[oc(546)](){return oc(508)}constructor(e){const t=oc;super(e),e[t(537)][t(543)](t(505))||e[t(537)][t(535)](t(505),{model:t(483),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(496),stream:!0}),this[t(513)]=e[t(537)][t(543)](t(493)),this[t(534)]=e[t(537)][t(543)](t(482)),this[t(484)]=e[t(537)][t(543)](t(497)),this[t(504)]=e[t(537)][t(543)](t(505))}async[oc(553)]({query:e,context:t,onData:n,actionId:r}){const i=oc,{model:s,stream:o,...a}=await this[i(539)](this[i(504)],r),c={prompt:await this[i(485)](e,t,s,r),...a};this[i(513)]?await this[i(520)](c,s,o,n,r):await this[i(531)](c,s,o,n)}async[oc(485)](e,t,n,r){const i=oc;let s,o;return t?(s=i(521),o=i(514)+e+i(525)+t):(s=i(510),o=e),i(477)==this[i(555)](n)?i(486)+s+i(490)+o+i(528):i(507)+s+"\n"+o+i(503)}[oc(555)](e){const t=oc;if(/^anthropic\.claude/[t(517)](e))return t(529);if(/^ai21\.j2/[t(517)](e))return t(491);if(/^cohere\.command/[t(517)](e))return t(552);if(/^meta\.llama/[t(517)](e))return t(477);throw new b(v(this[t(500)][t(522)],t(502),e))}async[oc(520)](e,t,n,r,i){const s=oc,o={method:s(501),headers:await this[s(544)](this[s(484)],i),body:JSON[s(556)]({...e,model:t,stream:n}),signal:this[s(527)][s(480)]},a=await fetch(this[s(513)],o);n?await this[s(478)](a,t,r):await this[s(498)](a,t,r)}async[oc(531)](e,t,n,r){const i=oc,s=new xo(this[i(534)]),o={body:JSON[i(556)](e),contentType:i(557),accept:i(557),modelId:t};let a;if(n){const e=new ic(o);a=await s[i(550)](e,{abortSignal:this[i(527)][i(480)]}),await this[i(523)](a,t,r)}else{const e=new sc(o);a=await s[i(550)](e,{abortSignal:this[i(527)][i(480)]}),await this[i(498)](a,t,r)}}async[oc(523)](e,t,n){const r=oc,i=e[r(548)],s=new TextDecoder(r(495));let o="";for await(const e of i)if(e[r(542)]){const i=s[r(494)](e[r(542)][r(536)]),a=JSON[r(489)](i);o+=this[r(551)](a,t),n(o)}return Promise[r(509)]()}async[oc(478)](e,t,n){const r=oc,i=e[r(548)],s=new TextDecoder(r(495)),o=i[r(547)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(492)]();if(u=e,u)break;const d=(a+s[r(494)](i))[r(526)]("\n")[r(475)](e=>{const t=r;try{return a="",JSON[t(489)](e)}catch{return a=e,null}})[r(487)](e=>null!==e);d[r(488)]&&(c+=d[r(475)](e=>this[r(551)](e,t))[r(524)](""),n(c))}return Promise[r(509)]()}async[oc(498)](e,t,n){const r=oc;let i;return i=e instanceof Response?await e[r(530)]():JSON[r(489)](new TextDecoder(r(495))[r(494)](e[r(548)])),n(this[r(551)](i,t)),Promise[r(509)]()}[oc(551)](e,t){const n=oc;switch(this[n(555)](t)){case n(529):return e[n(515)];case n(491):return e[n(479)][0][n(481)][n(518)];case n(552):return e[n(512)][0][n(518)];case n(477):return e[n(476)]}}}function dc(){var e=["87449fcKcKl","8MqLHar","728105PoFkoA","98916bBgQHx","2XNvitG","928497PuIIOa","1036696BdiRHe","1330542MOjPqp","2199148ROaWBB"];return(dc=function(){return e})()}function lc(e,t){var n=dc();return(lc=function(e,t){return n[e-=200]})(e,t)}!function(e){for(var t=lc,n=e();;)try{if(174965===parseInt(t(205))/1+-parseInt(t(200))/2*(-parseInt(t(201))/3)+-parseInt(t(202))/4+-parseInt(t(207))/5+parseInt(t(208))/6+parseInt(t(204))/7*(parseInt(t(206))/8)+-parseInt(t(203))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(dc)})(),(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",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",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"},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(t.test instanceof Array)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(t.test instanceof Array)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(t.test instanceof Array)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(t.test instanceof Array)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:[/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:"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:[/[^-]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:()=>w,AIAssistant:()=>He,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>Ge,AWSTextAdapter:()=>cc,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=d;function d(e,t){const n=p();return(d=function(e,t){return n[e-=484]})(e,t)}!function(e){const t=d,n=e();for(;;)try{if(906415===-parseInt(t(562))/1*(parseInt(t(549))/2)+-parseInt(t(512))/3+-parseInt(t(499))/4*(parseInt(t(496))/5)+parseInt(t(551))/6*(parseInt(t(566))/7)+parseInt(t(555))/8*(-parseInt(t(523))/9)+-parseInt(t(540))/10+parseInt(t(537))/11*(parseInt(t(524))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(p);const l=globalThis[u(534)],h=u(539);class f extends e.Plugin{static get[u(488)](){return u(528)}static get[u(557)](){return!0}static get[u(547)](){return!0}[u(584)](){const e=u,{editor:t}=this,n=[e(545)];t[e(511)][e(491)](e(494))&&n[e(590)](e(579)),t[e(573)][e(563)](e(567))[e(586)]({model:h,view:{classes:n,priority:12}}),t[e(573)][e(563)](e(567))[e(542)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(577)][r(548)])return null;const i=n[r(519)](r(514));return n[r(526)]([r(545),r(518)],i),i}})}[u(513)](){!async function(e){const t=g([50,103,82,109,67,74,52,86,81,115,85,108,122,89,48,88,118,117,97,57,75,99,101,54,76,98,65,70,121,104,77,110,100,119,83,87,80,111,107,106,51,114,102,113,66,105,84,112,72,68,78,73,90,71,69,116,49,79,120,53,55,56]),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(532)](e=>String[t(495)](e))[t(595)]("")}!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([103]);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:1751500800;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(564)]);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(581)](){const e=u,t=this[e(587)][e(561)];t[e(530)](n=>{const r=e,i=t[r(527)][r(591)][r(489)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(580)][r(502)](i))n[r(508)](i,{range:e});else if(e[r(592)][r(578)]){const s=e[r(592)][r(568)](({item:e})=>!t[r(507)][r(538)](e),{boundaries:e});n[r(509)](i,{usingOperation:!1,affectsData:!1,range:n[r(503)](s,e[r(554)])})}else n[r(509)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(589)](){const e=u,t=this[e(587)][e(561)],n=Array[e(585)](this[e(587)][e(561)][e(580)][e(570)](h));n[e(593)]&&t[e(530)](t=>{const r=e;n[r(582)](e=>{t[r(485)](e)})})}[u(493)](e,t){const n=u,r=this[n(569)](),i=t||r[n(505)]();this[n(587)][n(561)][n(497)](i)&&this[n(587)][n(561)][n(530)](s=>{const o=n;this[o(589)](),t||this[o(576)](s,r),this[o(565)]({insertAt:i,writer:s,html:e})})}[u(543)](e){const t=u,{model:n}=this[t(587)],r=this[t(569)]();n[t(530)](()=>{const n=t,i=this[n(546)](e,r)||this[n(517)](r);this[n(493)](e,i)})}[u(569)](){const e=u,t=this[e(587)][e(561)],n=Array[e(585)](t[e(580)][e(570)](h))[e(532)](t=>t[e(504)]());return t[e(531)](n)}[u(565)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(587)][r(506)],s=this[r(587)][r(516)][r(491)](a.ClipboardPipeline),o=new l;o[r(490)](r(552),t);const d=new ClipboardEvent(r(594),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(574)](n);const f=(t,n)=>{const i=r;n[i(535)]&&e[i(574)](n[i(535)])};s[r(588)](r(492),f,{priority:r(556)}),i[r(527)][r(571)](r(594),h),s[r(533)](r(492),f)}[u(517)](e){const t=u,{model:n}=this[t(587)],r=Array[t(585)](e[t(484)]());return r[t(593)]?n[t(544)](r[t(525)]()):e[t(536)]()}[u(546)](e,t){const n=u,{model:r,plugins:i}=this[n(587)];if(i[n(502)](n(550))){const s=i[n(491)](n(550))[n(487)](t);if(s[n(593)]){const t=this[n(575)](e),i=this[n(529)](s,t);return r[n(541)](i,0)}}return null}[u(575)](e){const t=u,n=this[t(587)][t(516)][t(491)](t(550)),r=this[t(587)][t(559)][t(501)](e),i=Array[t(585)](r[t(515)]())[t(498)](e=>e.is(t(572),t(521)));let s=0;return i[t(582)](e=>{s+=n[t(583)](e)}),s}[u(529)](e,t){const n=u,r=this[n(587)][n(516)][n(491)](n(550)),i=r[n(486)](e),s=r[n(558)](e),o=i[n(560)]+1,a=s[n(510)],c=e[0][n(522)](n(521));for(let e=0;e<t;e++)r[n(500)](c,{at:o});return c[n(553)](o)[n(553)](a)}[u(576)](e,t){const n=u,{plugins:r}=this[n(587)],{model:i}=e;r[n(502)](n(550))&&r[n(491)](n(550))[n(487)](t)[n(593)]&&i[n(520)](t)}}function p(){const e=["table","findAncestor","9AwAZuc","744MSGErb","pop","addClass","document","AIAssistantEditing","_createEmptyTableRows","change","createSelection","map","off","DataTransfer","resultRange","getLastPosition","967219PBBpbT","isContent","ai-ui","12398900MzqXKs","createPositionAt","markerToElement","insertContentBelow","createPositionAfter","ck-fake-ai-selection","_prepareTableInsertBelowPosition","isPremiumPlugin","isCollapsed","6NKZIay","TableUtils","72Svjhym","text/html","getChild","end","2998376XzAnYz","lowest","isOfficialPlugin","getColumnIndexes","data","last","model","438037toSlXF","for","href","_pasteHTMLUsingClipboard","466319BSdUcO","editingDowncast","getLastMatchingPosition","_getAISelection","getMarkersGroup","fire","element","conversion","setSelection","_getTableRowCountFromContent","_resetContentOfSelectedTableCells","markerRange","isAtEnd","ck-ai-assistant-ui_theme","markers","showFakeVisualSelection","forEach","getRows","init","from","markerToHighlight","editor","once","hideFakeVisualSelection","push","selection","start","length","paste","join","getSelectedBlocks","removeMarker","getRowIndexes","getSelectedTableCells","pluginName","getRanges","setData","get","contentInsertion","insertContent","ai.useTheme","fromCharCode","5653135tmqfCp","canEditAt","filter","4oSNCdS","insertRows","parse","has","createRange","getRange","getFirstRange","editing","schema","updateMarker","addMarker","first","config","3855486LxbZpV","afterInit","span","getChildren","plugins","_getDefaultInsertBelowPosition","ck-fake-ai-selection_collapsed","createUIElement","deleteContent"];return(p=function(){return e})()}function m(){var e=["2886728XEbJvi","15612TCSvWG","isPremiumPlugin","textAdapter","64238ZRfvfa","AIAdapter","147232UUxHvJ","afterInit","isOfficialPlugin","1vdUQRN","name","2903754kRnEHA","11161436WONVUs","aiadapter-text-adapter-not-set","AIRequestError","485LpLXAB","45aAEeiV","774130jIfoip","pluginName","18vaPbiw"];return(m=function(){return e})()}var g=y;function y(e,t){var n=m();return(y=function(e,t){return n[e-=487]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(211717===-parseInt(t(503))/1*(-parseInt(t(498))/2)+parseInt(t(493))/3*(-parseInt(t(500))/4)+parseInt(t(489))/5*(parseInt(t(495))/6)+parseInt(t(505))/7+parseInt(t(494))/8+-parseInt(t(490))/9*(-parseInt(t(491))/10)+-parseInt(t(506))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(m);class w extends e.Plugin{static get[g(492)](){return g(499)}static get[g(502)](){return!0}static get[g(496)](){return!0}[g(501)](){var e=g;if(!this[e(497)])throw new i.CKEditorError(e(487),null)}}class b extends Error{constructor(e){var t=g;super(e),this[t(504)]=t(488)}}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}}function k(e,t){const n=E();return(k=function(e,t){return n[e-=356]})(e,t)}const S=k;function E(){const e=["getItems","get","document","12FGzjGm","custom","45LlprRZ","from","75082AGWnxM","includes","isCollapsed","4661756DwRiOC","plugins","name","isEmpty","hasContent","execute","ai.aiAssistant.disabledElements","getFirstRange","67599fUvOXd","9088jVFJVu","_commandDefinitions","refresh","isEnabled","_hasContext","selection","2756220SXxdfe","config","requiresContent","editor","change:isEnabled","6EDrjnh","model","length","enabledCommandsIds","198MKhqYb","element","231304OgaXeR","getSelectedBlocks","335770qTboKm","getRanges","change:_hasContext","showUI","add","set","values"];return(E=function(){return e})()}!function(e){const t=k,n=e();for(;;)try{if(210557===-parseInt(t(359))/1*(parseInt(t(389))/2)+-parseInt(t(375))/3*(parseInt(t(360))/4)+-parseInt(t(379))/5+parseInt(t(371))/6*(-parseInt(t(393))/7)+parseInt(t(377))/8*(parseInt(t(391))/9)+parseInt(t(366))/10+parseInt(t(396))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(E);class A extends e.Command{[S(361)];constructor(e,t){const n=S;super(e),this[n(361)]=t,this[n(384)](n(374),[]),this.on(n(381),(e,t,r)=>{const i=n;this[i(363)]&&(this[i(374)]=I(this[i(361)],r))}),this[n(384)](n(364),!1),this.on(n(370),(e,t,r)=>{const i=n;this[i(374)]=r?I(this[i(361)],this[i(364)]):[]})}[S(362)](){const e=S,t=this[e(369)][e(372)];this[e(364)]=function(t){const n=e,r=t[n(388)][n(365)];return r[n(395)]?0!==[...r[n(378)]()][n(373)]&&![...r[n(378)]()][0][n(399)]:!!t[n(400)](r[n(358)]())}(t);const n=t[e(388)][e(365)],r=this[e(369)][e(367)][e(387)](e(357));for(const t of n[e(380)]())for(const n of t[e(386)]())if(n.is(e(376))&&r[e(394)](n[e(398)]))return void(this[e(363)]=!1);this[e(363)]=!0}[S(356)](e="",t="",n=S(390)){const r=S;this[r(369)][r(397)][r(387)]($e)[r(382)](e,t,n)}}function I(e,t){const n=S,r=new Set;for(const i of e[n(385)]())(t||!1===i[n(368)])&&r[n(383)](i.id);return Array[n(392)](r)}function x(){const e=["currentResponse","486423drFWdK","text/html","querySelector","substring","```html","```","destroy","set:currentContext","editing","config","trim","isRendered","serializeToString","stopProcessing","markers","isProcessing","from","remove","_normalizeResponseHeadings","value","_stripMarkdownSyntax","data","length","catch","_parseAndNormalizeContent","reset","mainAction","updateView","processor","712302gpSglM","stopListening","body","handleError","submitPrompt","703252cxYxoR","then","custom","name","abort","<h1></h1>","30UAmLIc","finishProcessing","domConverter","element","makeRequest","stringify","get","nodeType","finally","textAdapter","reverse","11CNWQbW","_sanitizeHTML","previousActionId","message","4792XutaBF","listenTo","ai.aiAssistant.preserveComments","prompt","htmlProcessor","startsWith","43897hNGuCf","249134SWxynp","_xmlSerializer","innerHTML","previousContext","once","exec","toView","childNodes","_handleQuery","currentContext","_sanitizationContainer","_isH1TagSupportEnabled","parseFromString","startProcessing","set","document","25clAYII","view","render","initialContext","endsWith","match","105fZRhrt","toModel","ELEMENT_NODE","_domParser","clear","createElement","previousLabel","tryAgainEvent","push","rename","editor","4612044gDkdNK","div","464SsdPNo","viewToDom","setContentOf","previousQuery"];return(x=function(){return e})()}const _=R;function R(e,t){const n=x();return(R=function(e,t){return n[e-=131]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(327150===-parseInt(t(150))/1+-parseInt(t(143))/2*(-parseInt(t(172))/3)+parseInt(t(224))/4+-parseInt(t(166))/5*(parseInt(t(219))/6)+parseInt(t(149))/7*(parseInt(t(185))/8)+parseInt(t(190))/9*(parseInt(t(230))/10)+parseInt(t(139))/11*(parseInt(t(183))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(182)];[_(137)];[_(167)];[_(160)];[_(175)];[_(151)];constructor(e,t,n){const r=_;super(),this[r(182)]=e,this[r(137)]=t,this[r(160)]=document[r(177)](r(184)),this[r(175)]=new DOMParser,this[r(151)]=new XMLSerializer,this[r(167)]=n,this[r(164)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(197),(e,t,n)=>{const i=r;this[i(167)][i(209)]=this[i(140)](n)}),this[r(144)](this[r(167)],r(223),(e,t)=>{const n=r,i=this[n(159)]||this[n(169)];this[n(158)](t,i,n(226))}),this[r(144)](this[r(167)],r(179),()=>{const e=r;this[e(167)][e(146)]=this[e(178)],this[e(158)](this[e(188)],this[e(153)],this[e(141)],this[e(178)])}),this[r(144)](this[r(167)],r(203),()=>{this[r(203)]()})}[_(196)](){this[_(220)]()}async[_(217)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(167)][s(146)]=r,this[s(167)][s(216)]=i,this[s(169)]=n,t&&(this[s(167)][s(201)]?this[s(158)](t,n,e,r):this[s(167)][s(154)](s(168),()=>{this[s(158)](t,n,e,r)}))}[_(203)](){const e=_;this[e(205)]&&(this[e(205)]=!1,this[e(167)][e(231)](),this[e(137)][e(228)]())}[_(215)](){const e=_;this[e(169)]="",this[e(159)]="",this[e(189)]="",this[e(153)]="",this[e(188)]="",this[e(178)]="",this[e(141)]=void 0,this[e(167)][e(215)](),this[e(203)]()}async[_(158)](e,t,n,r){const i=_;return this[i(205)]=!0,this[i(167)][i(163)](),this[i(153)]=t,this[i(188)]=e,this[i(178)]=r||e,this[i(141)]=n,new Promise(r=>{const s=i;this[s(137)][s(132)]({query:e,context:t,onData:e=>{const t=s;this[t(189)]=e,this[t(159)]=this[t(214)](this[t(189)])},actionId:n})[s(225)](()=>{const e=s;!this[e(159)]&&this[e(189)]&&(this[e(159)]=this[e(214)](this[e(189)],!0))})[s(213)](e=>{const t=s;e instanceof b?this[t(167)][t(222)](e[t(142)]):this[t(167)][t(222)](),r()})[s(136)](()=>{this[s(203)](),r()})})}[_(214)](e,t=!1){const n=_,r=C[n(155)](e);e=r?e[n(193)](r[1][n(212)]):e[n(212)]<100&&!t?"":this[n(210)](e);const i=this[n(175)][n(162)](e,n(191));if(r){const e=Array[n(206)](i[n(221)][n(157)]);e[n(138)]();for(const t of e){if(t[n(135)]==Node[n(174)])break;t[n(207)]()}}const s=this[n(182)][n(211)][n(218)][n(156)](this[n(151)][n(202)](i[n(221)]));this[n(161)]()||this[n(208)](s);const o=this[n(182)][n(199)][n(134)](n(145)),a=this[n(182)][n(211)][n(173)](s);return o||a[n(204)][n(176)](),this[n(182)][n(211)][n(133)](a)}[_(208)](e){const t=_,n=new c.ViewUpcastWriter(this[t(182)][t(198)][t(167)][t(165)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(131))&&r[t(171)](n)&&(i[t(180)](n),"h1"==n[t(227)]&&(s=!0));if(s)for(const e of i)n[t(181)]("h"+(parseInt(e[t(227)][1])+1),e)}[_(161)](){const e=_,{data:t,editing:n}=this[e(182)],r=t[e(147)][e(156)](e(229)),i=t[e(156)](t[e(173)](r));return!!n[e(167)][e(232)][e(186)](i)[e(192)]("h1")}[_(140)](e){const t=_;return this[t(182)][t(198)][t(167)][t(232)][t(187)](this[t(160)],e),this[t(160)][t(152)]}[_(210)](e){const t=_,n=e[t(200)]();return n[t(148)](t(194))?n[t(170)](t(195))?n[t(193)](7,n[t(212)]-3):n[t(193)](7):e}}const M=L;!function(e){const t=L,n=e();for(;;)try{if(138159===parseInt(t(300))/1+parseInt(t(306))/2+parseInt(t(298))/3+-parseInt(t(317))/4+-parseInt(t(315))/5*(-parseInt(t(295))/6)+parseInt(t(297))/7+-parseInt(t(314))/8*(parseInt(t(327))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(N);const T={REPLACE:M(313),INSERT:M(301)};class O extends s.ToolbarView{constructor(e){const t=M;super(e),this[t(324)](t(326),!1),this[t(324)](t(305),T[t(322)]),this[t(307)]=this[t(329)]("",t(328)),this[t(307)][t(330)](t(318)).to(this,t(305),n=>v(e,t(309)+n[t(296)]()+t(299))),this[t(304)]=this[t(329)](v(e,t(310))),this[t(311)]=this[t(329)](v(e,t(323))),this[t(325)]=this[t(329)](v(e,t(316)));const n=this[t(320)];this[t(321)]({attributes:{class:[t(303),n.if(t(326),t(308),e=>!e)]}}),this[t(319)][t(302)]([this[t(307)],this[t(304)],this[t(311)],this[t(325)]])}[M(329)](e,t){const n=M,r=new s.ButtonView(this[n(312)]);return r[n(324)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}function L(e,t){const n=N();return(L=function(e,t){return n[e-=295]})(e,t)}function N(){const e=["locale","replace","3201056SjuUMO","55775sGgWJp","Stop","277464BIqXGh","label","items","bindTemplate","extendTemplate","REPLACE","Try again","set","stopButton","isVisible","9XtxXqs","ck-button-action","_createButton","bind","114pLSTCL","toUpperCase","629139xMfhfZ","139038lwYuzs","_CONTENT","75079qOFpHi","insert","addMany","ck-ai-form__toolbar","insertButton","mainAction","368820MYlPty","replaceButton","ck-hidden","AI_","Insert below","tryAgainButton"];return(N=function(){return e})()}function $(e,t){const n=D();return($=function(e,t){return n[e-=119]})(e,t)}function D(){const e=["ck-ai-form__content-area-wrapper","ck-ai-form__content-area","render","-9999px","isProcessing","ck-hidden","AI is writing...","setEndBefore","text/html","setTemplate","copyButtonView","smooth","text/plain","_copyHTMLToClipboard","execute","body","querySelector","removeAllRanges","<span>]</span>"," ck-ai-form__copy-button--copied","ck-ai-form__loader","createRange","icon","_createLoader","element","mousedown","bindTemplate","getSelection","ck-content","clipboard","locale","wheel","class","contentFieldView","ck-ai-form__content-area--processing","innerHTML","6388agHrgU",".ck-ai-form__loader","set","12IUlCEe","523620qRyNZV","listenTo","div","isVisible","ck-ai-form__content-field","createElement","copy","firstElementChild","1166221vxeQSs","appendLoader","4311890WPgvEB","74578aBvXqu","appendChild","scrollTo","left","2161750eAYVuu","change:isProcessing","change:value","position","22KevChm","absolute","Copy","isEnabled","execCommand","style","loaderView","scrollHeight","remove","ck-reset_all-excluded","setStartAfter","value","bind","focus","textContent","lastElementChild","<span>[</span>","write","363vYMAFX","23589hnukcg","setContent","_createCopyButton","1056yhpxrc","ClipboardItem","ck-ai-form__copy-button","addRange","ck-ai-form__copy-button-wrapper"];return(D=function(){return e})()}const U=$;!function(e){const t=$,n=e();for(;;)try{if(235081===parseInt(t(141))/1+-parseInt(t(130))/2+-parseInt(t(167))/3*(parseInt(t(126))/4)+parseInt(t(145))/5+parseInt(t(129))/6*(-parseInt(t(138))/7)+parseInt(t(171))/8*(-parseInt(t(168))/9)+parseInt(t(140))/10*(parseInt(t(149))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D);class F extends s.View{[U(123)];[U(186)];constructor(e,t=""){const n=U;super(e),this[n(128)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(202)];this[n(123)]=new B(e,t),this[n(186)]=this[n(170)](),this[n(185)]({tag:n(132),attributes:{class:["ck",n(176),r.if(n(133),n(181),e=>!e)],tabindex:"-1"},children:[{tag:n(132),attributes:{class:["ck",n(177),r.if(n(180),n(124))]},children:[this[n(123)],{tag:n(132),attributes:{class:["ck",n(175)]},children:[this[n(186)]]}]}]})}[U(178)](){const e=U;super[e(178)](),this[e(160)]&&this[e(123)][e(169)](this[e(160)]);let t=!1;this.on(e(147),(n,r,i)=>{const s=e,o=!this[s(123)][s(200)][s(192)](s(127));this[s(123)][s(169)](i),this[s(180)]&&o&&!t&&this[s(200)][s(143)]({top:this[s(200)][s(156)],behavior:s(187)})}),this.on(e(146),(n,r,i)=>{const s=e;t=!1,i?(this[s(160)]=null,this[s(123)][s(139)]()):this[s(160)]||this[s(123)][s(169)]("")}),this[e(131)](this[e(200)],e(121),()=>{t=!0}),this[e(131)](this[e(200)],e(201),()=>{t=!0})}[U(162)](){const e=U;this[e(200)][e(162)]()}[U(170)](){const e=U,n=this[e(120)],r=new s.ButtonView(this[e(120)]),i=e(173);return r[e(128)]({label:v(n,e(151)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(161)](e(133)).to(this,e(160),e=>!!e),r[e(161)](e(152)).to(this,e(180),e=>!e),r.on(e(190),()=>{const n=e;this[n(189)](this[n(123)][n(200)]),r[n(198)]=t.IconCheck,r[n(122)]=i+n(195),this[n(162)](),setTimeout(()=>{const e=n;r[e(198)]=t.IconCopy,r[e(122)]=i},1e3)}),r}[U(189)](e){const t=U,{window:n,document:r}=i.global;if(n[t(172)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(125)]],{type:t(184)}),"text/plain":new r([e[t(163)]||""],{type:t(188)})})];navigator[t(119)][t(166)](s)}else{const i=r[t(135)](t(132));i[t(154)][t(148)]=t(150),i[t(154)][t(144)]=t(179),i[t(125)]=t(165)+e[t(125)]+t(194),r[t(191)][t(142)](i);const s=r[t(197)]();s[t(159)](i[t(137)]),s[t(183)](i[t(164)]);const o=n[t(203)]();o[t(193)](),o[t(174)](s),r[t(153)](t(136)),i[t(157)]()}}}class B extends s.View{constructor(e,t=""){const n=U;super(e),this[n(155)]=this[n(199)](),this[n(185)]({tag:n(132),attributes:{class:["ck",n(204),t,n(158),n(134)]}})}[U(169)](e){const t=U;this[t(200)][t(125)]=e}[U(139)](){const e=U;this[e(200)][e(142)](this[e(155)][e(200)])}[U(199)](){const e=U,t=new s.View,n=this[e(120)],r=new s.SpinnerView;return r[e(133)]=!0,t[e(185)]({tag:e(132),attributes:{class:["ck",e(196)]},children:[r,{text:v(n,e(182))}]}),t[e(178)](),t}}function j(e,t){const n=q();return(j=function(e,t){return n[e-=386]})(e,t)}!function(e){const t=j,n=e();for(;;)try{if(371006===-parseInt(t(393))/1+parseInt(t(398))/2*(-parseInt(t(392))/3)+-parseInt(t(399))/4+-parseInt(t(388))/5*(-parseInt(t(401))/6)+-parseInt(t(394))/7*(parseInt(t(397))/8)+parseInt(t(389))/9+parseInt(t(402))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);class H extends s.View{constructor(e,n=""){const r=j;super(e);const i=new s.IconView,o=this[r(387)];this[r(396)](r(391),n),i[r(395)]=t.IconError,this[r(390)]({tag:r(400),attributes:{class:["ck",r(386)]},children:[i,{text:o.to(r(391))}]})}}function q(){const e=["content","set","1944mOpdpf","664148jIXRbo","706696edzCXu","div","209796dsQZXu","9601060zwhZNH","ck-ai-form__error","bindTemplate","35IvwokV","1580958IrWmSk","setTemplate","text","3cflLnv","257533NXIayV","7007EjxQsG"];return(q=function(){return e})()}const z=G;function V(){const e=["submit","value","7653520JEvHQm","style","fire","render","enter","element","right","width","resultsView","isOn","2802495zjrNyK","isEmpty","14282DdAWug","6587848PHltRN","target","isEnabled","fieldView","ck-ai-form__submit","Submit","focus","set","ck-ai-form__toggle-history","_createShowHistoryButton","_createSubmitButton","uiLanguageDirection","execute","window","add","children","494784fSGoZv","excludeScrollbarsAndBorders","13640805wtQUHz","focusCycler","25hIPNvk","keystrokes","49998180xoppYH","requestAnimationFrame","fieldWrapperChildren","update","isVisible","7lckEfx","History","107jOiSQc","showHistoryButtonView","bind","minRows","filteredView","focusFirst","locale","maxRows","submitButtonView","left","focusLast","rtl","queryView","focusableChildren"];return(V=function(){return e})()}function G(e,t){const n=V();return(G=function(e,t){return n[e-=210]})(e,t)}!function(e){const t=G,n=e();for(;;)try{if(989554===-parseInt(t(262))/1*(-parseInt(t(232))/2)+-parseInt(t(230))/3+-parseInt(t(220))/4+-parseInt(t(253))/5*(-parseInt(t(249))/6)+parseInt(t(260))/7*(-parseInt(t(233))/8)+-parseInt(t(251))/9+parseInt(t(255))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(V);class W extends s.AutocompleteView{[z(212)];[z(263)];constructor(e,t){const n=z;super(e,t),this[n(216)][n(236)][n(265)]=1,this[n(216)][n(236)][n(211)]=3,this[n(212)]=this[n(243)](),this[n(263)]=this[n(242)](),this[n(217)][n(247)](this[n(263)],1),this[n(217)][n(247)](this[n(212)])}[z(223)](){const e=z;super[e(223)](),this[e(216)][e(257)][e(247)](this[e(263)]),this[e(248)][e(247)](this[e(212)]),this[e(254)][e(240)](e(224),(t,n)=>{const r=e;t[r(234)]==this[r(216)][r(236)][r(225)]&&(this[r(218)](),n())})}[z(243)](){const e=z,n=new s.ButtonView(this[e(210)]),r=this[e(210)];return n[e(240)]({icon:t.IconSubmit,label:v(r,e(238)),isVisible:!0,tooltip:!0,class:e(237)}),n.on(e(245),()=>{this[e(218)]()}),n[e(264)](e(235)).to(this[e(216)][e(236)],e(231),this,e(235),(e,t)=>!e&&t),n}[z(242)](){const e=z,n=new s.ButtonView(this[e(210)]),r=this[e(228)],o=this[e(210)];n[e(240)]({label:v(o,e(261)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(241)}),n[e(264)](e(229)).to(r,e(259)),n[e(264)](e(235)).to(this,e(235)),n.on(e(245),()=>{const t=e;r[t(259)]=!r[t(259)],r[t(259)]?this[t(266)][t(239)]():this[t(239)]()});const a=()=>{const t=e;i.global[t(246)][t(256)](()=>{const e=t;if((0,i.isVisible)(this[e(225)])){const t=new i.Rect(this[e(216)][e(236)][e(225)]),r=t[e(227)],s=e(215)===o[e(244)]?e(213):e(226);t[e(250)](),n[e(225)][e(221)][s]=r-t[e(227)]+1+"px"}})};return this[e(216)][e(236)].on(e(258),a),this.on(e(223),a),n}[z(218)](){const e=z,t=this[e(216)][e(236)][e(225)][e(219)];this[e(222)](e(218),t)}[z(239)](e){const t=z;-1===e?this[t(252)][t(214)]():this[t(252)][t(267)]()}}const K=Y;function Y(e,t){const n=J();return(Y=function(e,t){return n[e-=245]})(e,t)}!function(e){const t=Y,n=e();for(;;)try{if(720236===-parseInt(t(256))/1*(-parseInt(t(255))/2)+-parseInt(t(261))/3*(parseInt(t(248))/4)+-parseInt(t(269))/5+parseInt(t(264))/6+-parseInt(t(268))/7*(parseInt(t(270))/8)+parseInt(t(251))/9+parseInt(t(265))/10*(parseInt(t(259))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class X extends s.ListView{[K(262)];[K(263)];constructor(e){const t=K;super(e),this[t(263)]=this[t(267)](),this[t(262)]=new s.ListItemGroupView,this[t(262)][t(253)][t(250)](this[t(263)],1),this[t(262)][t(246)]=v(e,t(260)),this[t(262)][t(252)][t(257)](t(249)).to(this),this[t(252)][t(250)](this[t(262)])}[K(271)](){const e=K;let t=0;for(const n of this[e(252)])t+=n[e(252)][e(254)];return{resultsCount:t,totalItemsCount:t}}[K(267)](){const e=K,t=this[e(266)],n=new s.ButtonView(this[e(266)]);return n[e(258)]({label:"("+v(t,e(245))+")",withText:!0}),n.on(e(249),()=>this[e(272)](e(247))),n}}function J(){const e=["Prompt history","111ZOSjdA","historyGroupView","clearHistoryButton","4006320hhqtuj","20loHuQw","locale","_createClearHistoryButton","7211449vCqlSV","4979660LMFvZd","8GIoPSN","filter","fire","Clear","label","clearHistory","114148WoSvDv","execute","add","10429155fyonWT","items","children","length","182306lNvjph","5LfZYXG","delegate","set","8359802jlvHxh"];return(J=function(){return e})()}const Q={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function Z(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(Z).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=>Q[e]||"'")}(Z(e))}function te(e,t){const n=re();return(te=function(e,t){return n[e-=163]})(e,t)}!function(e){const t=te,n=e();for(;;)try{if(772227===-parseInt(t(165))/1*(parseInt(t(166))/2)+-parseInt(t(163))/3*(parseInt(t(178))/4)+parseInt(t(180))/5+parseInt(t(177))/6+parseInt(t(172))/7*(-parseInt(t(170))/8)+-parseInt(t(164))/9+parseInt(t(168))/10*(parseInt(t(174))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);class ne extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(179)],n);this[t(176)][t(169)](r),r[t(167)]({label:e[t(175)],withText:!0}),r.on(t(173),()=>{const n=t;this[n(171)](n(173),{value:ee(e[n(175)])})})}}function re(){const e=["680692rzxiad","set","1486060ijaaWO","add","2176jpoKrU","fire","28084YhhGVp","execute","209ggsYnN","prompt","children","1204896HUkvuJ","5605948EeQQNT","locale","6465190nCrNvx","3TFcJHU","6408396SrJmhO","1vwhFhs"];return(re=function(){return e})()}function ie(e,t){const n=ue();return(ie=function(e,t){return n[e-=358]})(e,t)}const se=ie;!function(e){const t=ie,n=e();for(;;)try{if(474419===parseInt(t(379))/1*(-parseInt(t(360))/2)+parseInt(t(362))/3*(parseInt(t(359))/4)+parseInt(t(376))/5+-parseInt(t(361))/6+-parseInt(t(368))/7*(parseInt(t(375))/8)+parseInt(t(372))/9*(-parseInt(t(370))/10)+parseInt(t(364))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ue);const oe=se(367);class ae extends i.Collection{constructor(){const e=se;super(),this[e(366)](),this.on(e(358),(t,n)=>{const r=e,i=ce(n[r(383)]);for(const e of this)if(e!=n&&ce(e[r(383)])===i){this[r(377)](e);break}this[r(369)]>20&&this[r(377)](this[r(371)]),this[r(363)]()}),this.on(e(377),()=>{this[e(363)]()})}[se(366)](){const e=se,t=sessionStorage[e(381)](oe)||"[]";this[e(374)](JSON[e(373)](t))}[se(363)](){const e=se;sessionStorage[e(384)](oe,JSON[e(382)](this[e(380)](e=>e)))}}function ce(e){const t=se;return e[t(365)]()[t(378)]()}function ue(){const e=["setItem","add","24EwfhNL","988jyhrRf","739428RawCFs","117669rixGPt","_saveToSessionStorage","13466288doKsld","toLowerCase","_loadFromSessionStorage","CKEditor/AIFormView/PromptHistory","824873ySmISR","length","500ZzqIBG","last","83817FpYKCY","parse","addMany","40CSyeUU","2980300SpcIFj","remove","trim","816AIZTsn","map","getItem","stringify","prompt"];return(ue=function(){return e})()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["focus","insertButton","stopProcessing","1408440xlDdpg","Ask AI to edit or generate","Empty history","historyGroupView","element","focusLast","execute","_createHistoryView","chain","contentArea","search","delegate","queryView","isError","ck-ai-form-content","11108376ZiGkJt","REPLACE","handleError","_createPromptView","toolbar","add","clear","items","keystrokes","isProcessing","render","submit","fire","tryAgainButton","focusTracker","insertContentBelow","focusFirst","_createToolbar","tab","8337014IdVVLX","clearHistory","listenTo","_promptHistory","high","tryAgainEvent","Ask AI to improve generated text","172PFDumY","359ZOOOnM","AI_ERROR_FAILED","6034735pfEZUi","focusCycler","bindTo","ck-ai-form","div","ck-hidden","replaceContent","1078thcdtW","trim","52376229QzkNnu","label","submitPrompt","startProcessing","bind","locale","reset","isEnabled","isVisible","promptView","stopButton","_focusables","set","Ask AI and your prompts will be listed here for you to use later.","text","10rYuGiO","84297RATNjl","copyButtonView","createCollection","bindTemplate","value","fieldView","replaceButton","mainAction","prompt","shift + tab","setTemplate","errorView","finishProcessing"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=117]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(783589===parseInt(t(146))/1*(parseInt(t(155))/2)+-parseInt(t(173))/3*(parseInt(t(145))/4)+-parseInt(t(148))/5+-parseInt(t(189))/6+-parseInt(t(138))/7+-parseInt(t(119))/8+-parseInt(t(157))/9*(-parseInt(t(172))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(133)];[he(127)];[he(198)];[he(123)];[he(166)];[he(184)];[he(168)];[he(149)];[he(141)];constructor(e,t,n=""){const r=he;super(e),this[r(169)](r(164),!0),this[r(169)](r(128),!1),this[r(169)](r(181),""),this[r(169)](r(177),""),this[r(169)](r(117),!1),this[r(169)](r(180),T[r(120)]),this[r(141)]=new ae,this[r(184)]=new H(e),this[r(198)]=new F(e,n),this[r(198)][r(161)](r(128)).to(this),this[r(198)][r(161)](r(177)).to(this),this[r(123)]=this[r(136)](),this[r(123)][r(161)](r(180)).to(this),this[r(166)]=this[r(122)](),this[r(133)]=new i.FocusTracker,this[r(127)]=new i.KeystrokeHandler,this[r(168)]=this[r(175)]([this[r(198)],this[r(198)][r(174)],this[r(123)],this[r(166)]]),this[r(149)]=new s.FocusCycler({focusables:this[r(168)],focusTracker:this[r(133)],keystrokeHandler:this[r(127)],actions:{focusPrevious:r(182),focusNext:r(137)}}),this[r(149)][r(197)](this[r(166)][r(149)]),this[r(166)][r(201)][r(178)][r(161)](r(177)).to(this,r(181));const o=this[r(176)];this[r(183)]({tag:r(152),attributes:{class:["ck",r(151),t],tabindex:"-1"},children:[{tag:r(152),attributes:{class:["ck",r(118)]},children:[{tag:r(152),attributes:{class:[o.if(r(117),r(153),e=>!e)]},children:[this[r(184)]]},this[r(198)],this[r(123)],this[r(166)]]}]})}[he(129)](){const e=he;super[e(129)](),this[e(133)][e(124)](this[e(198)][e(193)]),this[e(133)][e(124)](this[e(198)][e(174)][e(193)]),this[e(133)][e(124)](this[e(123)][e(193)]),this[e(133)][e(124)](this[e(166)][e(193)]),this[e(127)][e(140)](this[e(193)])}[he(186)](e=1){const t=he;-1===e?this[t(149)][t(194)]():this[t(149)][t(135)]()}[he(163)](){const e=he;this[e(181)]="",this[e(177)]="",this[e(117)]=!1,this[e(166)][e(163)](),this[e(198)][e(165)]=!1,this[e(123)][e(165)]=!1}[he(122)](){const e=he,t=this[e(162)],n=new W(t,{queryView:{label:v(t,e(190)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(191)),secondary:v(t,e(170))}}},filteredView:this[e(196)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(161)](e(164)).to(this,e(164),this,e(128),(e,t)=>e&&!t),this[e(140)](n,e(130),(t,n)=>{const r=e;this[r(181)]=n;const i=le(n);this[r(131)](r(159),i),n[r(156)]()&&this[r(141)][r(124)]({prompt:i},0)},{priority:e(142)}),n}[he(196)](){const e=he,t=new X(this[e(162)]);return t[e(192)][e(126)][e(150)](this[e(141)]).as(ne),t.on(e(139),()=>{const t=e;this[t(141)][t(125)](),this[t(166)][t(199)](""),this[t(166)][t(186)]()}),t}[he(136)](){const e=he,t=new O(this[e(162)]);return t[e(179)][e(161)](e(164)).to(this,e(164),this,e(128),this,e(177),(e,t,n)=>e&&!t&&!!n),t[e(179)][e(200)](e(195)).to(this,e(154)),t[e(187)][e(161)](e(164)).to(this,e(164),this,e(128),this,e(177),(e,t,n)=>e&&!t&&!!n),t[e(187)][e(200)](e(195)).to(this,e(134)),t[e(132)][e(161)](e(164)).to(this,e(164),this,e(128),(e,t)=>e&&!t),t[e(132)][e(200)](e(195)).to(this,e(143)),t[e(167)][e(161)](e(164)).to(this,e(128)),t[e(167)][e(200)](e(195)).to(this,e(188)),t}[he(160)](){const e=he;this[e(177)]="",this[e(117)]=!1,this[e(128)]=!0,this[e(198)][e(165)]=!0,this[e(123)][e(165)]=!0,this[e(198)][e(186)]()}[he(185)](){const e=he,t=this[e(162)];this[e(128)]=!1,this[e(181)]="",this[e(166)][e(163)](),this[e(177)]&&(this[e(166)][e(201)][e(158)]=v(t,e(144)))}[he(121)](e){const t=he,n=this[t(162)];this[t(185)](),this[t(117)]=!0,this[t(184)][t(171)]=e||v(n,t(147)),this[t(177)]||(this[t(198)][t(165)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),xe=n(379),_e={attributes:{"data-cke":!0}};_e.setAttributes=Ee(),_e.insert=ke().bind(null,"head"),_e.domAPI=be(),_e.insertStyleElement=Ie();ye()(xe.A,_e);xe.A&&xe.A.locals&&xe.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ee(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Pe.A,Me);Pe.A&&Pe.A.locals&&Pe.A.locals;const Te=Le;function Oe(){const e=["_dialog","EDITOR_TOP_SIDE","includes","aiLicenseKeyInvalid","editing","replaceContent","view","_aiAssistantController","AI is writing","aiCommands","update","items","change:value","requires","push","change:isError","commands","_populateMenuBarMenu","getSelectedElement","fire","errorView","_uiCssClasses","listenTo","menuBar:aiAssistant","replace","delegate","isOn","menuPanelClass","menuView","Error during AI content generation: %0","hideFakeVisualSelection","ai.aiAssistant.commands","_aiAdapter","isEnabled","892KvaevZ","model","setSelection","DataTransfer","isOfficialPlugin","order","isPremiumPlugin","editor"," ck-ai-assistant-ui_theme","1209252bTgLqo","groupId","custom","_getResolvedCommandsDefinitions","componentFactory","trim","selection","bind","ck-ai-assistant-button ","showUI","textAdapter","AIAssistantUI","buttonView","splice","schema","prompt","AI Assistant","promptView","REPLACE","menuBar:aiCommands","updateView","invalid","getLimitElement","length","licenseKey","wasMoved","ai-commands-config-order-collision","change","382370nQlAeW","from","ck-ai-assistant-ui","sort","destroy","_createAIAssistantUIButton","showFakeVisualSelection","hide","usageLimit","1580290WsddIL","define","change:enabledCommandsIds","source","plugins","focus","isFlat","ai.aiAssistant.disabledElements","aiLicenseKeyUsageLimit","ai.useTheme","updatePosition","enabledCommandsIds","aiLicenseKeyNotAllowed","1DYECGh","trialLimit","text","buttons","add","media","label","forEach","body","getSelectedBlocks","aiLicenseKeyDomainLimit","AIAssistant","INSERT","show","featureNotAllowed","aiLicenseKeyTrialLimit","_commandDefinitions","aiLicenseKeyEvaluationLimit","showAIAssistant","Generated content: %0","ai.aiAssistant.contentAreaCssClass","filter","_getMenuBarGroupButtons","tableOfContents","polite","getRanges","menuitemcheckbox","document","16136kdEJnl","_formView","groupLabel","render","hideUI","1004505OKOxku","reset","command:","text/html","rawHtml","contentArea","map","values","1257bSfYpJ","3650273OmSuhw","set","_initView","children","isCollapsed","get","getData","currentContext","insertContentBelow","fieldView","_initAriaAiStatusChangeAnnouncements","announce","requiresContent","config","_showLicenseError","panelView","_licenseKeyCheckInterval","406otrLkQ","AI Commands","addMany","insertContent","pluginName","aiAssistant","init","queryView","expired","once","<p>","domainLimit","comment","_onExecute","ck-ai-commands-dropdown ","9NILKHY","change:isProcessing","aiLicenseKeyExpired","_forceMarkersCopy","aiLicenseKeyValid","locale","execute","copy","evaluationLimit","</p>"];return(Oe=function(){return e})()}function Le(e,t){const n=Oe();return(Le=function(e,t){return n[e-=197]})(e,t)}!function(e){const t=Le,n=e();for(;;)try{if(127305===parseInt(t(289))/1*(parseInt(t(267))/2)+-parseInt(t(330))/3*(parseInt(t(230))/4)+parseInt(t(322))/5+parseInt(t(239))/6+-parseInt(t(348))/7*(-parseInt(t(317))/8)+parseInt(t(363))/9*(-parseInt(t(276))/10)+-parseInt(t(331))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const Ne=globalThis[Te(233)];class $e extends e.Plugin{[Te(263)];[Te(347)];[Te(373)];[Te(318)];[Te(228)];[Te(203)];[Te(217)]="";static get[Te(352)](){return Te(250)}static get[Te(234)](){return!0}static get[Te(236)](){return!0}static get[Te(209)](){return[a.ClipboardMarkersUtils,f,w,s.Dialog]}constructor(e){const t=Te;super(e),e[t(344)][t(277)](t(283),[t(294),t(326),t(312)]),e[t(344)][t(277)](t(309),""),e[t(344)][t(277)](t(285),!0),this[t(217)]=t(269)+(e[t(344)][t(336)](t(285))?t(238):"")}[Te(354)](){const e=Te,{editor:n}=this;this[e(228)]=n[e(280)][e(336)](w),this[e(373)]=n[e(280)][e(336)](s.Dialog),this[e(318)]=null,this[e(305)]=this[e(242)]();const r=new A(n,Array[e(268)](this[e(305)][e(329)]()));n[e(212)][e(293)](e(307),r),n.ui[e(243)][e(293)](e(205),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(332)]({class:a(362)+this[a(217)]}),c[a(251)][a(332)]({label:v(i,a(349)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(369),e=>this[a(361)](e[a(279)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(202)][a(297)],function(e){const t=a,n=o(e[t(344)][t(336)](t(227)),e[t(368)]),r=Ue(e,n)[t(310)](e=>e[t(212)][t(262)]);return 1===r[t(262)]?Ue(e,r[0][t(212)])[t(328)](e=>({id:e.id,label:e[t(295)]})):r[t(328)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(328)](e=>({id:e.id,label:e[r(295)]}))}})}(n),{ariaLabel:v(i,a(349))}),c[a(224)][a(223)]=a(362)+this[a(217)],r.on(a(278),u),c[a(224)][a(357)](a(320),u),c;function u(){const e=a;c[e(229)]=r[e(287)][e(262)]>0;for(const t of c[e(224)][e(292)])t[e(229)]=r[e(287)][e(198)](t.id)}}),n.ui[e(243)][e(293)](e(258),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(251)][a(332)]({label:v(i,a(349)),icon:t.IconMagicWand}),c[a(246)](a(229)).to(r,a(287),e=>e[a(262)]>0);const u=o(n[a(344)][a(336)](a(227)),i);return this[a(213)](r,c,u,e=>this[a(361)](e)),c}),n.ui[e(243)][e(293)](e(353),()=>{const t=e,n=this[t(272)](s.ButtonView);return n[t(332)]({tooltip:!0,class:t(247)+this[t(217)]}),n}),n.ui[e(243)][e(293)](e(219),()=>{const t=e,n=this[t(272)](s.MenuBarMenuListItemButtonView);return n[t(332)]({role:t(315)}),n}),this[e(263)]=this[e(237)][e(344)][e(336)](e(263));const i=this[e(237)];this[e(347)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(367)==s||t(199)==s||t(365)==s||t(299)==s||t(288)==s||t(306)==s||t(304)==s||t(284)==s){delete i[r],n=s,clearInterval(this[t(347)]),this[t(347)]=void 0;break}}t(199)==n&&i[t(345)](t(260)),t(365)==n&&i[t(345)](t(356)),t(299)==n&&i[t(345)](t(359)),t(288)==n&&i[t(345)](t(303),t(300)),t(306)==n&&i[t(345)](t(371)),t(304)==n&&i[t(345)](t(290)),t(284)==n&&i[t(345)](t(275))},1e3)}[Te(271)](){const e=Te;super[e(271)](),this[e(347)]&&clearInterval(this[e(347)])}[Te(248)](e="",n="",r=Te(241)){const i=Te,o=this[i(237)],u=o[i(200)][i(202)],d=o[i(280)][i(336)](f),l=o[i(280)][i(336)](a.ClipboardMarkersUtils);d[i(273)]();const h=new Ne,p=new ClipboardEvent(i(370),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,p,{dataTransfer:m});l[i(366)](i(360),()=>{const e=i;u[e(316)][e(215)](e(370),g)}),this[i(318)]||(this[i(333)](),this[i(203)]=new P(o,this[i(228)][i(249)],this[i(318)]));let y=m[i(337)](i(325));const w=o[i(231)][i(316)][i(245)],b=Array[i(268)](w[i(314)]());1===b[i(262)]&&b[0][i(282)]&&!w[i(214)]()&&""!==y[i(220)](/&nbsp;/g,"")[i(244)]()&&(y=i(358)+y+i(372)),this[i(203)][i(259)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:T[o[i(231)][i(316)][i(245)][i(335)]?i(301):i(257)]}),i(353)!==this[i(373)].id?this[i(373)][i(302)]({id:i(353),icon:t.IconRobotPencil,title:v(this[i(237)][i(368)],i(255)),content:this[i(318)],position:s.DialogViewPosition[i(197)],onShow:()=>{const e=i;this[e(318)][e(281)]()},onHide:()=>{const e=i;this[e(203)][e(323)](),d[e(226)]()}}):this[i(373)][i(202)][i(264)]||this[i(373)][i(202)][i(286)]()}[Te(321)](){const e=Te;this[e(373)][e(274)]()}[Te(242)](){const e=Te,t=new Map,n=o(this[e(237)][e(344)][e(336)](e(227)),this[e(237)][e(368)]);for(const r of n)for(const n of r[e(212)])t[e(332)](n.id,{...n,groupId:r[e(240)],groupLabel:r[e(319)]||r[e(240)]});return t}[Te(272)](e){const n=Te,r=this[n(237)],i=r[n(212)][n(336)](n(307)),s=new e(r[n(368)]);return s[n(332)]({label:v(r[n(368)],n(255)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(246)](n(229)).to(i),s[n(246)](n(222)).to(this[n(373)],"id",e=>n(353)===e),this[n(218)](s,n(369),()=>{const e=n;s[e(222)]?this[e(321)]():i[e(369)]()}),s}[Te(333)](){const e=Te,t=this[e(237)][e(280)][e(336)](f);this[e(318)]=new me(this[e(237)][e(368)],this[e(217)],this[e(237)][e(344)][e(336)](e(309))),this[e(318)].on(e(208),()=>{const t=e;this[t(373)][t(202)][t(264)]||this[t(373)][t(202)][t(286)]()}),this[e(318)][e(256)][e(355)][e(340)].on(e(206),()=>{const t=e;this[t(373)][t(202)][t(264)]||this[t(373)][t(202)][t(286)]()}),this[e(218)](this[e(318)],e(201),()=>{const n=e;t[n(351)](this[n(203)][n(338)]),this[n(321)]()}),this[e(218)](this[e(318)],e(339),()=>{const n=e;t[n(339)](this[n(203)][n(338)]),this[n(321)]()}),this[e(341)]()}[Te(341)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(237)];this[e(318)][e(327)].on(e(364),(r,i,s)=>{const o=e,a=this[o(203)][o(338)];s?n[o(342)](v(t,o(204))):a&&n[o(342)](v(t,o(308),a),{politeness:o(313),isUnsafeHTML:!0})}),this[e(318)].on(e(211),(r,i,s)=>{const o=e;if(s){const e=this[o(318)][o(216)][o(291)];n[o(342)](v(t,o(225),e))}})}[Te(361)](e){const t=Te,n=this[t(305)][t(336)](e),r=this[t(237)],s=r[t(231)][t(316)][t(245)],o=r[t(212)][t(336)](t(307)),a=r[t(280)][t(336)](f),c=("_ungrouppedCommands"!==n[t(240)]?n[t(319)]+": ":"")+n[t(295)];if(!1!==n[t(343)]&&s[t(335)]){const e=(0,i.first)(s[t(298)]())||r[t(231)][t(253)][t(261)](s);r[t(231)][t(266)](n=>{n[t(232)](e,"in")})}a[t(273)](),o[t(369)](n[t(254)],c,t(324)+e)}[Te(213)](e,t,n,r){const i=Te,o=this[i(237)],a=o[i(368)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(310)](e=>e[i(212)][i(262)]);1===u[i(262)]?this[i(311)]({command:e,commands:u[0][i(212)],parentMenuView:t,onExecute:r})[i(296)](e=>c[i(207)][i(293)](e)):u[i(296)](({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(311)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(251)][d(332)]({label:o||n}),h[d(221)](d(369)).to(t),f[d(207)][d(350)](p),h[d(346)][d(334)][d(293)](f),l[d(334)][d(293)](h),c[d(207)][d(293)](l)}),t[i(346)][i(334)][i(293)](c)}[Te(311)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(237)],a=o[i(368)];return Ue(o,t)[i(328)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(332)]({label:t[o(295)]}),u[o(221)](o(369)).to(n),u.on(o(369),()=>r(t.id)),u[o(246)](o(229)).to(e,o(287),e=>e[o(198)](t.id)),c[o(334)][o(293)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(235)]&&void 0===t[n(235)]?1:void 0===e[n(235)]&&void 0!==t[n(235)]?-1:void 0!==e[n(235)]&&void 0!==t[n(235)]?e[n(235)]-t[n(235)]:0}function Ue(e,t){const n=Te;t[n(270)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(235)]){if(o[n(235)]in r)throw new i.CKEditorError(n(265),e,{conflictingDefinitions:[o,r[o[n(235)]]]});r[o[n(235)]]=o,s[n(252)](o[n(235)],0,o)}else s[n(210)](o);return s}function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=330]})(e,t)}const Be=Fe;function je(){const e=["Poetic","Rewrite this content as a journalist using engaging language to convey the importance of the information.","includes","Journalism","Legal","ai.aiAssistant.removeCommands","locale","filter","Translate the content to Portuguese language.","13656VWSHor","Improve writing","set","casual","confident","isPremiumPlugin","translatePortuguese","simplifyLanguage","Improve this content by using descriptive language and inserting more information and more detailed explanations.","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","generate","Spanish","Translate the content to Simplified Chinese language.","concat","poetic","Translate the content to Hindi language.","isOfficialPlugin","Direct","improveWriting","editOrReview","Change style","Translate the content to German language.","71YhNLiv","journalism","ai.aiAssistant.extraCommandGroups","translateEnglish","ai.aiAssistant.preserveComments","Translate the content to Arabic language.","pluginName","Edit or review","Make longer","forEach","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","changeTone","Improve using friendly, comforting language, to convey understanding and empathy.","makeShorter","translateGerman","Continue","legal","translateChinese","define","German","friendly","Translate","commands","Portuguese","professional","Translate the content to French language.","Rewrite this content as a business professional with formal language.","changeStyle","makeLonger","Rewrite this content as a legal professional using valid legal terminology.","Summarize","config","194170pUkKxD","find","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","99fnRHjs","Simplify language","translateSpanish","translateFrench","Improve using casual, informal language to convey a casual conversation with a real person.","594284rrDAUX","ai.aiAssistant.commands","Change tone","translateHindi","10Hwotjd","Make shorter","739638rKwgxM","business","continue","Simplified Chinese","summarize","Translate the content to Spanish language.","1467102XsBtIx","Improve using direct language, using only the essential information.","Generate from selection","French","direct","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Business","get","Confident","English","Friendly","Casual","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Professional","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","requires","11347358FyRtGm","AIAssistant","push","Translate the content to English language.","translate","16292NmyrJq","Improve using compelling, optimistic language to convey confidence in the writing.","Hindi","groupId","903RYRjQc","translateArabic","Arabic"];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(314535===-parseInt(t(417))/1*(parseInt(t(379))/2)+-parseInt(t(352))/3+-parseInt(t(346))/4*(-parseInt(t(350))/5)+parseInt(t(358))/6+parseInt(t(383))/7*(-parseInt(t(395))/8)+-parseInt(t(341))/9*(parseInt(t(337))/10)+parseInt(t(374))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class He extends e.Plugin{static get[Be(373)](){return[$e,f]}static get[Be(423)](){return Be(375)}static get[Be(411)](){return!0}static get[Be(400)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(336)],r=e[t(392)];n[t(435)](t(421),!0),n[t(435)](t(347),qe(r)),n[t(435)](t(419),[]),n[t(435)](t(391),[]);let i=o(n[t(365)](t(347)),r);const s=n[t(365)](t(419)),a=n[t(365)](t(391));s[t(426)](e=>{const n=t,r=i[n(338)](t=>t[n(382)]===e[n(382)]);r?r[n(439)]=r[n(439)][n(408)](e[n(439)]):i[n(376)](e)}),i=i[t(393)](e=>!a[t(388)](e[t(382)])),i[t(426)](e=>{const n=t;e[n(439)]=e[n(439)][n(393)](e=>!a[n(388)](e.id))}),n[t(397)](t(347),i)}}function qe(e){const t=Be;return[{groupId:t(414),groupLabel:v(e,t(424)),commands:[{id:t(413),label:v(e,t(396)),prompt:t(427)},{id:t(430),label:v(e,t(351)),prompt:t(372)},{id:t(333),label:v(e,t(425)),prompt:t(403)},{id:t(402),label:v(e,t(342)),prompt:t(363)}]},{groupId:t(405),groupLabel:v(e,t(360)),commands:[{id:t(356),label:v(e,t(335)),prompt:t(340)},{id:t(354),label:v(e,t(432)),prompt:t(404)}]},{groupId:t(428),groupLabel:v(e,t(348)),commands:[{id:t(441),label:v(e,t(371)),prompt:t(370)},{id:t(398),label:v(e,t(369)),prompt:t(345)},{id:t(362),label:v(e,t(412)),prompt:t(359)},{id:t(399),label:v(e,t(366)),prompt:t(380)},{id:t(437),label:v(e,t(368)),prompt:t(429)}]},{groupId:t(332),groupLabel:v(e,t(415)),commands:[{id:t(353),label:v(e,t(364)),prompt:t(331)},{id:t(433),label:v(e,t(390)),prompt:t(334)},{id:t(418),label:v(e,t(389)),prompt:t(387)},{id:t(409),label:v(e,t(386)),prompt:t(339)}]},{groupId:t(378),groupLabel:v(e,t(438)),commands:[{id:t(420),label:v(e,t(367)),prompt:t(377)},{id:t(343),label:v(e,t(406)),prompt:t(357)},{id:t(401),label:v(e,t(440)),prompt:t(394)},{id:t(431),label:v(e,t(436)),prompt:t(416)},{id:t(344),label:v(e,t(361)),prompt:t(330)},{id:t(434),label:v(e,t(355)),prompt:t(407)},{id:t(349),label:v(e,t(381)),prompt:t(410)},{id:t(384),label:v(e,t(385)),prompt:t(422)}]}]}const ze=Ve;function Ve(e,t){const n=We();return(Ve=function(e,t){return n[e-=434]})(e,t)}!function(e){const t=Ve,n=e();for(;;)try{if(915771===-parseInt(t(436))/1*(parseInt(t(449))/2)+-parseInt(t(444))/3+parseInt(t(451))/4+parseInt(t(471))/5*(parseInt(t(467))/6)+-parseInt(t(459))/7*(parseInt(t(437))/8)+parseInt(t(458))/9*(parseInt(t(454))/10)+parseInt(t(452))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(We);class Ge extends e.Plugin{[ze(465)];static get[ze(463)](){return[w]}constructor(e){const t=ze;super(e),this[t(465)]=new AbortController}[ze(448)](){const e=ze;this[e(461)][e(446)][e(441)](w)[e(445)]=this}[ze(466)](){const e=ze;this[e(465)][e(434)][e(453)]||(this[e(465)][e(466)](),this[e(465)]=new AbortController)}async[ze(470)](e){const t=ze;return this[t(455)](e)[t(462)](e=>{const n=t;if(e instanceof b)return Promise[n(447)](e);if(n(443)==e[n(456)])return Promise[n(435)]();throw console[n(469)](e),new i.CKEditorError(n(468),null)})}async[ze(460)](e,t){const n=ze,r=this[n(461)][n(464)],i={"Content-Type":n(440)};if(n(457)==typeof e)Object[n(442)](i,e);else if(e)try{const r=await e(t);Object[n(442)](i,r)}catch{return Promise[n(447)](new b(v(r,n(439))))}return i}async[ze(450)](e,t){const n=ze,r=this[n(461)][n(464)];if(n(457)==typeof e)return e;try{return await e(t)}catch{return Promise[n(447)](new b(v(r,n(438))))}}}function We(){const e=["AI_ERROR_GET_PARAMETERS","AI_ERROR_GET_HEADERS","application/json","get","assign","AbortError","3977055vxKfQg","textAdapter","plugins","reject","init","2eCMPsl","_prepareRequestParameters","4497660lKhOBV","10603043NhhFYw","aborted","2198380akmQlV","sendRequest","name","object","9eNXtYr","5558STWKub","_prepareRequestHeaders","editor","catch","requires","locale","abortController","abort","54duXamY","aitextadapter-send-request-failed","error","makeRequest","796695vlELvp","signal","resolve","557489HnEGDE","9504gmXLlA"];return(We=function(){return e})()}const Ke=Xe;function Ye(){const e=["_requestHeaders","Moderation","7EByYxa","editor","get","Instruction:\n","text","split","ai.openAI.requestHeaders","13177557kUCopr","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.","_prepareRequestParameters","signal","1036705QMRpkE","user","9449ICxOQy","abortController","getReader","stringify","decode","message","AI_ERROR_CONTEXT_LENGTH","2OOEQhb","data: ","filter","gpt-4o","define","_readStaticResponse","resolve","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.","json","[DONE]","https://api.openai.com/v1/chat/completions","4422208SpXLFa","ai.openAI.apiUrl","_requestParameters","pluginName","system","1009884EWpEel","_prepareRequestHeaders","context_length_exceeded","sendRequest","_isBufferIncomplete","length","\nYou must keep the text formatting.\n\nContent:\n","content","replace","stream","choices","ai.openAI.requestParameters","prepareMessages","1441148JMzaps","OpenAITextAdapter","4EblBAP","includes","join","config","_cleanUpData","38690huxjBR","POST","read","parse","AI_ERROR_MODERATION","_readStreamableResponse","map","delta","body","reject","locale","_apiUrl","1821795hrWvXo"];return(Ye=function(){return e})()}function Xe(e,t){const n=Ye();return(Xe=function(e,t){return n[e-=409]})(e,t)}!function(e){const t=Xe,n=e();for(;;)try{if(780918===-parseInt(t(459))/1*(-parseInt(t(430))/2)+parseInt(t(478))/3*(parseInt(t(461))/4)+parseInt(t(421))/5+parseInt(t(446))/6*(-parseInt(t(410))/7)+parseInt(t(441))/8+parseInt(t(417))/9+parseInt(t(466))/10*(-parseInt(t(423))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ye);class Je extends Ge{[Ke(477)];[Ke(479)];[Ke(443)];static get[Ke(444)](){return Ke(460)}constructor(e){const t=Ke;super(e),e[t(464)][t(434)](t(442),t(440)),e[t(464)][t(412)](t(457))||e[t(464)][t(434)](t(457),{model:t(433),temperature:1,top_p:1,stream:!0}),this[t(477)]=e[t(464)][t(412)](t(442)),this[t(479)]=e[t(464)][t(412)](t(416))||{},this[t(443)]=e[t(464)][t(412)](t(457))}async[Ke(449)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(411)][i(476)],o=await this[i(458)](e,t,r),a=await this[i(447)](this[i(479)],r),c=await this[i(419)](this[i(443)],r),u={messages:o,...c},d={method:i(467),headers:a,body:JSON[i(426)](u),signal:this[i(424)][i(420)]},l=await fetch(this[i(477)],d);if(l.ok)return c[i(455)]?await this[i(471)](l,n):await this[i(435)](l,n),Promise[i(436)]();{const e=await l[i(414)]();return e[i(462)](i(448))?Promise[i(475)](new b(v(s,i(429)))):e[i(462)](i(409))?Promise[i(475)](new b(v(s,i(470)))):Promise[i(475)](new Error(e))}}async[Ke(458)](e,t,n){const r=Ke;let i,s;return t?(i=r(437),s=r(413)+e+r(452)+t):(i=r(418),s=e),[{role:r(445),content:i},{role:r(422),content:s}]}async[Ke(471)](e,t){const n=Ke,r=e[n(474)][n(425)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(468)](),d=s+i[n(427)](u);let l="";c=e;try{l=this[n(465)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(450)](o)||o&&(a+=o,o="",t(a))}return Promise[n(436)]()}async[Ke(435)](e,t){const n=Ke;return t((await e[n(438)]())[n(456)][0][n(428)][n(453)]),Promise[n(436)]()}[Ke(450)](e){const t=Ke,n=e[t(415)]("<")[t(451)]!==e[t(415)](">")[t(451)],r=e[t(451)]<30;return n&&r}[Ke(465)](e){const t=Ke;return e[t(415)](/\n(?![^{]*\})/g)[t(472)](e=>e[t(454)](t(431),""))[t(432)](e=>e&&e[t(451)]>0&&t(439)!==e)[t(472)](e=>{const n=t,{choices:r}=JSON[n(469)](e);if(r[0]?.[n(473)]?.[n(453)])return r[0][n(473)][n(453)]})[t(432)](e=>e)[t(463)]("")}}var Qe,Ze,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Qe||(Qe={})),function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),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=>e[rt]||(e[rt]={}),mt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const gt=(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=pt(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)},yt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},wt=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],bt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function kt(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:wt(/^x-[\w-]+-request-?id$/,n),extendedRequestId:wt(/^x-[\w-]+-id-2$/,n),cfId:wt(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),bt),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),vt)}}}const St=e=>e=>{throw e},Et=(e,t)=>{},At={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},It=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=pt(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||St)(i));return(o.successHandler||Et)(a.response,i),a},At)}}),xt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},_t={},Rt=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);_t[n]=e,Rt[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;_t[n]=r,Rt[r]=n}for(let e=0;e<10;e++){_t[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;_t[t]=n,Rt[n]=t}_t["+"]=62,Rt[62]="+",_t["/"]=63,Rt[63]="/";const Ct=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 _t))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=_t[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)},Pt=e=>(new TextEncoder).encode(e);function Mt(e){let t;t="string"==typeof e?Pt(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+=Rt[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const Tt=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 Ot extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?Ot.mutate(Ct(e)):Ot.mutate(Pt(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Ot.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?Mt(e):Tt(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const Lt=e=>encodeURIComponent(e).replace(/[!'()*]/g,Nt),Nt=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function $t(e,t){return new Request(e,t)}function Dt(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 Ut={supported:void 0};class Ft{static create(e){return"function"==typeof e?.handle?e:new Ft(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Ut.supported&&(Ut.supported=Boolean("undefined"!=typeof Request&&"keepalive"in $t("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Lt(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${Lt(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${Lt(r)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,l="GET"===u||"HEAD"===u?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Ut.supported&&(h.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const p=$t(d,h),m=[fetch(p).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})}))}),Dt(n)];return t&&m.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}),f=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(m).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const Bt=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=Ct(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 jt={},Ht={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),jt[e]=t,Ht[t]=e}function qt(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 Ht))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Ht[r]}return t}function zt(e){let t="";for(let n=0;n<e.byteLength;n++)t+=jt[e[n]];return t}const Vt=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ot.mutate(e);if(!e)return Ot.mutate(new Uint8Array);const n=t.streamCollector(e);return Ot.mutate(await n)};class Gt{constructor(e,t=new Map){this.namespace=e,this.schemas=t}static for(e){return Gt.registries.has(e)||Gt.registries.set(e,new Gt(e)),Gt.registries.get(e)}register(e,t){const n=this.normalizeShapeId(e);Gt.for(this.getNamespace(e)).schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}getBaseException(){for(const[e,t]of this.schemas.entries())if(e.startsWith("smithy.ts.sdk.synthetic.")&&e.endsWith("ServiceException"))return t}find(e){return[...this.schemas.values()].find(e)}destroy(){Gt.registries.delete(this.namespace),this.schemas.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}getNamespace(e){return this.normalizeShapeId(e).split("#")[0]}}Gt.registries=new Map;Math.ceil(2**127*(2-2**-23));const Wt=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},Kt=e=>Yt(e,32),Yt=(e,t)=>{const n=Wt(e);if(void 0!==n&&Xt(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Xt=(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]}},Jt=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Zt.warn(Qt(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Qt=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Zt={warn:console.warn};const en=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};en.from=e=>e&&"object"==typeof e&&(e instanceof en||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?en(String(e)):en(JSON.stringify(e)),en.fromObject=en.from;Symbol.hasInstance;function tn(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function nn(e,t){return new rn(e,t)}class rn{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=>tn(e)).join("/"):tn(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}}class sn{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 on=(an=3e5,e=>cn(e)&&e.expiration.getTime()-Date.now()<an);var an;const cn=e=>void 0!==e.expiration;const un=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}$"),dn=e=>un.test(e)||e.startsWith("[")&&e.endsWith("]"),ln=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),hn=(e,t=!1)=>{if(!t)return ln.test(e);const n=e.split(".");for(const e of n)if(!hn(e))return!1;return!0},fn={},pn="endpoints";function mn(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${mn(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(mn).join(", ")})`:JSON.stringify(e,null,2)}class gn extends Error{constructor(e){super(e),this.name="EndpointError"}}const yn=(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 gn(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new gn(`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 gn(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),wn={[et.HTTP]:80,[et.HTTPS]:443},bn={booleanEquals:(e,t)=>e===t,getAttr:yn,isSet:e=>null!=e,isValidHostLabel:hn,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=dn(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${wn[c]}`)||"string"==typeof e&&e.includes(`${r}:${wn[c]}`)?`:${wn[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()}`)},vn=(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(yn(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},kn=(e,t,n)=>{if("string"==typeof e)return vn(e,n);if(e.fn)return Sn(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new gn(`'${t}': ${String(e)} is not a string, function or reference.`)},Sn=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:kn(e,"arg",n)),i=e.split(".");return i[0]in fn&&null!=i[1]?fn[i[0]][i[1]](...r):bn[e](...r)},En=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new gn(`'${e}' is already defined in Reference Record.`);const r=Sn(t,n);return n.logger?.debug?.(`${pn} evaluateCondition: ${mn(t)} = ${mn(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},An=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=En(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${pn} assign: ${i.name} := ${mn(i.value)}`))}return{result:!0,referenceRecord:n}},In=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=kn(e,"Header value entry",t);if("string"!=typeof r)throw new gn(`Header '${n}' value '${r}' is not a string`);return r})}),{}),xn=(e,t)=>{if(Array.isArray(e))return e.map(e=>xn(e,t));switch(typeof e){case"string":return vn(e,t);case"object":if(null===e)throw new gn(`Unexpected endpoint property: ${e}`);return _n(e,t);case"boolean":return e;default:throw new gn("Unexpected endpoint property type: "+typeof e)}},_n=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:xn(r,t)}),{}),Rn=(e,t)=>{const n=kn(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 gn("Endpoint URL must be a string, got "+typeof n)},Cn=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=An(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${pn} Resolving endpoint from template: ${mn(r)}`),{...null!=u&&{headers:In(u,o)},...null!=c&&{properties:_n(c,o)},url:Rn(a,o)}},Pn=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=An(n,t);if(i)throw new gn(kn(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Mn=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=An(n,t);if(i)return Tn(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Tn=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Cn(n,t);if(e)return e}else if("error"===n.type)Pn(n,t);else{if("tree"!==n.type)throw new gn(`Unknown endpoint rule: ${n}`);{const e=Mn(n,t);if(e)return e}}throw new gn("Rules evaluation failed")},On=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!On(t))return!1;return!0}return!!hn(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!dn(e)))};let Ln=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"}'),Nn="";const $n={isVirtualHostableS3Bucket:On,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}=Ln;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 Dn(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}fn.aws=$n;const Un=/\d{12}\.ddb/;const Fn="user-agent",Bn="x-amz-user-agent",jn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Hn=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const qn=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(zn)||[],a=(await e.defaultUserAgentProvider()).map(zn);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&Dn(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Dn(e,"RETRY_MODE_ADAPTIVE","F"):Dn(e,"RETRY_MODE_STANDARD","E"):Dn(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Un)&&Dn(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Dn(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Dn(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Dn(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&Dn(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))Dn(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(zn)||[],d=await e.userAgentAppId();d&&a.push(zn([`app/${d}`]));const l=(Nn?[Nn]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Bn]=s[Bn]?`${s[Fn]} ${h}`:h),s[Fn]=l):s[Bn]=l,t({...r,request:i})},zn=e=>{const t=e[0].split("/").map(e=>e.replace(jn,"-")).join("/"),n=e[1]?.replace(Hn,"-"),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}`}},"")},Vn={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Gn;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Gn||(Gn={}));const Wn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Kn=e=>Wn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Yn="content-length";const Xn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Jn=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(Yn))try{const t=n(e);r.headers={...r.headers,[Yn]:String(t)}}catch(e){}}return e({...t,request:r})}),Xn)}}),Qn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Zn=/(\d+\.){3}\d+/,er=/\.\./,tr=e=>Qn.test(e)&&!Zn.test(e)&&!er.test(e),nr=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},rr=(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()=>{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},ir=async e=>{};const sr=e=>{if("string"==typeof e)return sr(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}},or=e=>"object"==typeof e?"url"in e?sr(e.url):e:sr(e),ar=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 rr(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("?"))),nr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!tr(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},cr=({config:e,instructions:t})=>(n,r)=>async i=>{e.endpoint&&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.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await ir(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(or(e)))}const i=await ar(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=pt(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})},ur={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:vt.name},dr=(e,t)=>({applyToStack:n=>{n.addRelativeTo(cr({config:e,instructions:t}),ur)}});var lr;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(lr||(lr={}));const hr=lr.STANDARD,fr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],pr=["TimeoutError","RequestTimeout","RequestTimeoutException"],mr=[500,502,503,504],gr=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],yr=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],wr=e=>429===e.$metadata?.httpStatusCode||fr.includes(e.name)||1==e.$retryable?.throttling,br=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||pr.includes(e.name)||gr.includes(e?.code||"")||yr.includes(e?.code||"")||mr.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&&br(e.cause,t+1);class vr{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=>vr.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(),wr(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))}}vr.setTimeoutFn=setTimeout;const kr=100,Sr=2e4,Er="amz-sdk-invocation-id",Ar="amz-sdk-request",Ir=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Sr,e),getRetryCost:()=>n});class xr{constructor(e){this.maxAttempts=e,this.mode=lr.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=kr;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Sr,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Ir({retryDelay:kr,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:kr);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,Ir({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 _r{constructor(e,t){this.maxAttemptsProvider=e,this.mode=lr.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new vr,this.standardRetryStrategy=new xr(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 Rr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Cr;const Pr=new Uint8Array(16);function Mr(){if(!Cr&&(Cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cr(Pr)}const Tr=[];for(let e=0;e<256;++e)Tr.push((e+256).toString(16).slice(1));function Or(e,t=0){return Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]}const Lr=function(e,t,n){if(Rr.randomUUID&&!t&&!e)return Rr.randomUUID();const r=(e=e||{}).random||(e.rng||Mr)();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 Or(r)},Nr=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 $r=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Dr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Ur=()=>{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 $r(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of $r(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 ${Dr(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)=>Fr[t.step]-Fr[e.step]||Br[t.priority||"normal"]-Br[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=$r(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${Dr(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(`"${Dr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Dr(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=$r(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${Dr(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(`"${Dr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Dr(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(Ur()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=$r(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 $r(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=$r(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(Ur());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 Dr(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},Fr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Br={high:3,normal:2,low:1};class jr{constructor(e){this.config=e,this.middlewareStack=Ur()}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}}class Hr{constructor(){this.middlewareStack=Ur()}static classBuilder(){return new qr}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 qr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,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 Hr{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,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const zr="***SensitiveInformation***";class Vr 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 Vr.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===Vr?Vr.isInstance(e):!!Vr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Gr=(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},Wr=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"]}),Kr=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{}}},Yr=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)),Xr=e=>null!=e;class Jr{trace(){}debug(){}info(){}warn(){}error(){}}function Qr(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,ei(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?ti(r,null,s,e):r[e]=s[e];return r}const Zr=(e,t)=>{const n={};for(const r in t)ti(n,e,t,r);return n},ei=(e,t,n)=>Qr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),ti=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=ni,o=ri,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)}},ni=e=>null!=e,ri=e=>e,ii=e=>e?.body instanceof ReadableStream,si=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,oi=e=>{const t={error:e,errorType:ai(e)},n=di(e.$response);return n&&(t.retryAfterHint=n),t},ai=e=>wr(e)?"THROTTLING":br(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!br(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ci={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ui=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!si(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[Er]=Lr());;)try{d&&(u.headers[Ar]=`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=oi(t);if(o=Nr(t),d&&ii(u))throw(n.logger instanceof Jr?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),ci)}}),di=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 li=e=>"string"==typeof e?Pt(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),hi="X-Amz-Date",fi="X-Amz-Signature",pi="X-Amz-Security-Token",mi="authorization",gi=hi.toLowerCase(),yi=[mi,gi,"date"],wi=fi.toLowerCase(),bi="x-amz-content-sha256",vi=pi.toLowerCase(),ki={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},Si=/^proxy-/,Ei=/^sec-/,Ai="AWS4-HMAC-SHA256",Ii="AWS4-HMAC-SHA256-PAYLOAD",xi="aws4_request",_i={},Ri=[],Ci=(e,t,n)=>`${e}/${t}/${n}/${xi}`,Pi=(e,t,n)=>{const r=new e(t);return r.update(li(n)),r.digest()},Mi=({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 ki||t?.has(s)||Si.test(s)||Ei.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Ti=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===bi)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(li(t)),zt(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Oi{format(e){const t=[];for(const n of Object.keys(e)){const r=Pt(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=Pt(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($i.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ni.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(qt(e.value.replace(/\-/g,"")),1),d}}}var Li;!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"}(Li||(Li={}));const Ni=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class $i{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&&Di(t),new $i(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Di(e),parseInt(zt(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Di(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Ui=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))yi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Fi=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Bi{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=mt(n),this.credentialProvider=mt(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()===wi)continue;const i=Lt(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${Lt(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${Lt(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(li(n));return`${r}\n${e}\n${t}\n${zt(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 Lt(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,Fi(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 ji extends Bi{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 Oi}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=Ci(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}})(Ui(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[pi]=d.sessionToken),m.query["X-Amz-Algorithm"]=Ai,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[hi]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Mi(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[fi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Ti(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=Ci(a,o,s??this.service),d=await Ti({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=zt(await l.digest()),f=[Ii,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(li(e)),zt(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=Ui(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ci(d,a,s??this.service);c.headers[gi]=u,o.sessionToken&&(c.headers[vi]=o.sessionToken);const h=await Ti(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(bi,c.headers)&&this.applyChecksum&&(c.headers[bi]=h);const f=Mi(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[mi]=`${Ai} 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,Ai),s=new this.sha256(await n);return s.update(li(i)),zt(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${zt(await Pi(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in _i)return _i[s];for(Ri.push(s);Ri.length>50;)delete _i[Ri.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,xi])o=await Pi(e,o,t);return _i[s]=o})(this.sha256,e,n,t,r||this.service)}}const Hi=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,on,cn):n?xt(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?xt(e.signer):e.regionInfoProvider?()=>xt(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||ji)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await xt(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||ji)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const qi=async(e,t,n)=>({operation:pt(t).operation,region:await mt(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const zi=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},Vi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Gi="3.823.0";var Wi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Ki(e){return e instanceof Uint8Array?e:"string"==typeof e?Wi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Yi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Xi={name:"SHA-256"},Ji={name:"HMAC",hash:Xi},Qi=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 Zi={};function es(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Zi}var ts=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Yi(e)){var t=Ki(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 es().crypto.subtle.sign(Ji,t,e.toHash).then(function(e){return new Uint8Array(e)})}):Yi(this.toHash)?Promise.resolve(Qi):Promise.resolve().then(function(){return es().crypto.subtle.digest(Xi,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){es().crypto.subtle.importKey("raw",Ki(e.secret),Ji,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function ns(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 rs(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 is(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 ss=64,os=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]),as=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],cs=Math.pow(2,53)-1,us=function(){function e(){this.state=Int32Array.from(as),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>cs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ss&&(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%ss>=56){for(var r=this.bufferLength;r<ss;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<ss;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+(os[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}(),ds=function(){function e(e){this.secret=e,this.hash=new us,this.reset()}return e.prototype.update=function(e){if(!Yi(e)&&!this.error)try{this.hash.update(Ki(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 ns(this,void 0,void 0,function(){return rs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new us,this.secret){this.outer=new us;var e=function(e){var t=Ki(e);if(t.byteLength>ss){var n=new us;n.update(t),t=n.digest()}var r=new Uint8Array(ss);return r.set(t),r}(this.secret),t=new Uint8Array(ss);t.set(e);for(var n=0;n<ss;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 ls=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function hs(e){return e&&ls.every(function(t){return"function"==typeof e[t]})}var fs=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)&&hs(e.crypto.subtle)}(es())?this.hash=new ds(e):this.hash=new ts(e)}return e.prototype.update=function(e,t){this.hash.update(Ki(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ps=n(369),ms=n.n(ps);const gs=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?ms().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 ws}e.prototype.update=function(e){Yi(e)||this.crc32.update(Ki(e))},e.prototype.digest=function(){return ns(this,void 0,void 0,function(){return rs(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 ws}}();var ys,ws=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=is(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^bs[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}(),bs=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 vs{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&&ks(t),new vs(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&ks(e),parseInt(zt(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function ks(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Ss{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(vs.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ts.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(qt(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:Es,value:!0};break;case 1:t[i]={type:Es,value:!1};break;case 2:t[i]={type:As,value:e.getInt8(n++)};break;case 3:t[i]={type:Is,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:xs,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:_s,value:new vs(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Rs,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:Cs,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Ps,value:new Date(new vs(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:Ms,value:`${zt(o.subarray(0,4))}-${zt(o.subarray(4,6))}-${zt(o.subarray(6,8))}-${zt(o.subarray(8,10))}-${zt(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"}(ys||(ys={}));const Es="boolean",As="byte",Is="short",xs="integer",_s="long",Rs="binary",Cs="string",Ps="timestamp",Ms="uuid",Ts=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Os{constructor(e,t){this.headerMarshaller=new Ss(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 ws;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 ws).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 Ls{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 Ns{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 $s{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 Ds{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 Us(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 Fs{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Os(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 $s({messageStream:new Ls({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Us(t,this.utfEncoder)})}serialize(e,t){return new Ns({messageStream:new Ds({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Bs{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Fs({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=js(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 js=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Hs=e=>new Bs(e),qs="function"==typeof TextEncoder?new TextEncoder:null,zs=e=>{if("string"==typeof e){if(qs)return qs.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}`)},Vs=e=>new Date(Date.now()+e),Gs=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ws=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Vs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Ks=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Ys{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=Ks("context",e.context),n=Ks("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Ks("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:Vs(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Gs(t.$response);if(n){const r=Ks("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Ws(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Gs(e);if(n){const e=Ks("config",t.config);e.systemClockOffset=Ws(n,e.systemClockOffset)}}}const Xs="required",Js="fn",Qs="argv",Zs="ref",eo=!0,to="isSet",no="booleanEquals",ro="error",io="endpoint",so="tree",oo="PartitionResult",ao={[Xs]:!1,type:"String"},co={[Xs]:!0,default:!1,type:"Boolean"},uo={[Zs]:"Endpoint"},lo={[Js]:no,[Qs]:[{[Zs]:"UseFIPS"},!0]},ho={[Js]:no,[Qs]:[{[Zs]:"UseDualStack"},!0]},fo={},po={[Js]:"getAttr",[Qs]:[{[Zs]:oo},"supportsFIPS"]},mo={[Js]:no,[Qs]:[!0,{[Js]:"getAttr",[Qs]:[{[Zs]:oo},"supportsDualStack"]}]},go=[lo],yo=[ho],wo=[{[Zs]:"Region"}],bo={version:"1.0",parameters:{Region:ao,UseDualStack:co,UseFIPS:co,Endpoint:ao},rules:[{conditions:[{[Js]:to,[Qs]:[uo]}],rules:[{conditions:go,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ro},{rules:[{conditions:yo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ro},{endpoint:{url:uo,properties:fo,headers:fo},type:io}],type:so}],type:so},{rules:[{conditions:[{[Js]:to,[Qs]:wo}],rules:[{conditions:[{[Js]:"aws.partition",[Qs]:wo,assign:oo}],rules:[{conditions:[lo,ho],rules:[{conditions:[{[Js]:no,[Qs]:[eo,po]},mo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ro}],type:so},{conditions:go,rules:[{conditions:[{[Js]:no,[Qs]:[po,eo]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so},{error:"FIPS is enabled but this partition does not support FIPS",type:ro}],type:so},{conditions:yo,rules:[{conditions:[mo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so},{error:"DualStack is enabled but this partition does not support DualStack",type:ro}],type:so},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:fo,headers:fo},type:io}],type:so}],type:so}],type:so},{error:"Invalid Configuration: Missing Region",type:ro}],type:so}]},vo=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"]}),ko=(e,t={})=>vo.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${pn} Initial EndpointParams: ${mn(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 gn(`Missing required parameter: '${e}'`);const c=Tn(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${pn} Resolved endpoint: ${mn(c)}`),c})(bo,{endpointParams:e,logger:t.logger}));fn.aws=$n;Error;const So=["in-region","cross-region","mobile","standard","legacy"],Eo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ms().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Ao=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(Eo()?"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 ${So.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Kr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??Ct,base64Encoder:e?.base64Encoder??Mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ko,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??zi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ys}],logger:e?.logger??new Jr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??sr,utf8Decoder:e?.utf8Decoder??Pt,utf8Encoder:e?.utf8Encoder??Tt}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??zs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??gs({serviceId:r.serviceId,clientVersion:Gi}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Hs,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Ft.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||hr),sha256:e?.sha256??fs,streamCollector:e?.streamCollector??Bt,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},Io=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Yr(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 xo extends jr{config;constructor(...[e]){const t=Ao(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=xt(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=mt(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await mt(n)()===lr.ADAPTIVE?new _r(i):new xr(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 Kn(t);const e=await t();return Kn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Wn(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()=>or(await mt(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:mt(r??!1),useFipsEndpoint:mt(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=ir(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=Hi(e);return Object.assign(t,{authSchemePreference:mt(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=Io(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(qn(l),Vn)}})),this.middlewareStack.use(ui(this.config)),this.middlewareStack.use(Jn(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(gt(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),yt)}}))(this.config,{httpAuthSchemeParametersProvider:qi,identityProviderConfigProvider:async e=>new sn({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(It(this.config))}destroy(){super.destroy()}}class _o extends Vr{constructor(e){super(e),Object.setPrototypeOf(this,_o.prototype)}}class Ro extends _o{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ro.prototype)}}var Co;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(Co||(Co={}));class Po extends _o{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Po.prototype)}}class Mo extends _o{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,Mo.prototype)}}class To extends _o{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,To.prototype)}}class Oo extends _o{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}class Lo extends _o{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Lo.prototype)}}class No extends _o{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,No.prototype)}}class $o extends _o{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,$o.prototype)}}var Do;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));var Uo;!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])}(Uo||(Uo={}));var Fo;!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])}(Fo||(Fo={}));var Bo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={}));var jo;!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])}(jo||(jo={}));var Ho,qo;!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])}(Ho||(Ho={})),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])}(qo||(qo={}));var zo,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])}(zo||(zo={})),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])}(Vo||(Vo={}));var Go;!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])}(Go||(Go={}));var Wo,Ko,Yo,Xo,Jo,Qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Wo||(Wo={})),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])}(Ko||(Ko={})),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])}(Yo||(Yo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Xo||(Xo={})),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])}(Jo||(Jo={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Qo||(Qo={}));class Zo extends _o{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Zo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class ea extends _o{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,ea.prototype)}}class ta extends _o{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype)}}var na,ra,ia,sa;!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])}(na||(na={})),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])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));class oa extends _o{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,oa.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])}(sa||(sa={}));var aa,ca,ua;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(aa||(aa={})),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])}(ca||(ca={})),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])}(ua||(ua={}));const da=e=>({...e,...e.body&&{body:zr}}),la=e=>({...e,...e.body&&{body:zr}}),ha=e=>({...e,...e.body&&{body:zr}}),fa=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),pa=(e,t)=>((e,t)=>Vt(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{}}),ma=async(e,t)=>{const n=await pa(e,t);return n.message=n.message??n.Message,n},ga=async(e,t)=>{const n=nn(e,t),r=Qr({},Xr,{[Wa]:e[Ga]||"application/octet-stream",[Va]:e[Va],[rc]:e[Ja],[ec]:e[Ka],[tc]:e[Ya],[nc]:e[Xa]});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()},ya=async(e,t)=>{const n=nn(e,t),r=Qr({},Xr,{[Wa]:e[Ga]||"application/octet-stream",[Qa]:e[Va],[rc]:e[Ja],[ec]:e[Ka],[tc]:e[Ya],[nc]:e[Xa]});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()},wa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return va(e,t);const n=Qr({$metadata:za(e),[Ga]:[,e.headers[Wa]],[Xa]:[,e.headers[nc]]}),r=await Vt(e.body,t);return n.body=r,n},ba=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return va(e,t);const n=Qr({$metadata:za(e),[Ga]:[,e.headers[Za]],[Xa]:[,e.headers[nc]]}),r=e.body;return n.body=Na(r,t),n},va=async(e,t)=>{const n={...e,body:await ma(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 Ea(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Ia(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Pa(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ma(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Oa(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await La(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await xa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await _a(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Ca(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ta(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await Ra(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Aa(n,t);default:const i=n.body;return ka({output:e,parsedBody:i,errorCode:r})}},ka=(Sa=_o,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Wr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Gr(o,t)})({output:e,parsedBody:t,exceptionCtor:Sa,errorCode:n})});var Sa;const Ea=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new Ro({$metadata:za(e),...n});return Gr(s,e.body)},Aa=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new Oo({$metadata:za(e),...n});return Gr(s,e.body)},Ia=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new Po({$metadata:za(e),...n});return Gr(s,e.body)},xa=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt,originalStatusCode:Kt,resourceName:Jt});Object.assign(n,i);const s=new Zo({$metadata:za(e),...n});return Gr(s,e.body)},_a=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new ea({$metadata:za(e),...n});return Gr(s,e.body)},Ra=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt,originalMessage:Jt,originalStatusCode:Kt});Object.assign(n,i);const s=new oa({$metadata:za(e),...n});return Gr(s,e.body)},Ca=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new ta({$metadata:za(e),...n});return Gr(s,e.body)},Pa=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new Lo({$metadata:za(e),...n});return Gr(s,e.body)},Ma=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new No({$metadata:za(e),...n});return Gr(s,e.body)},Ta=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new $o({$metadata:za(e),...n});return Gr(s,e.body)},Oa=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new Mo({$metadata:za(e),...n});return Gr(s,e.body)},La=async(e,t)=>{const n=Qr({}),r=e.body,i=Zr(r,{message:Jt});Object.assign(n,i);const s=new To({$metadata:za(e),...n});return Gr(s,e.body)},Na=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Fa(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await $a(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Da(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ha(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await ja(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Ua(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ba(n.serviceUnavailableException,t)}:{$unknown:e}),$a=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ia(n,t)},Da=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ra(n,t)},Ua=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ca(n,t)},Fa=async(e,t)=>{const n={},r=await pa(e.body,t);return Object.assign(n,qa(r,t)),n},Ba=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Ta(n,t)},ja=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return Oa(n,t)},Ha=async(e,t)=>{const n={...e,body:await pa(e.body,t)};return La(n,t)},qa=(e,t)=>Zr(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"]}),Va="accept",Ga="contentType",Wa="content-type",Ka="guardrailIdentifier",Ya="guardrailVersion",Xa="performanceConfigLatency",Ja="trace",Qa="x-amzn-bedrock-accept",Za="x-amzn-bedrock-content-type",ec="x-amzn-bedrock-guardrailidentifier",tc="x-amzn-bedrock-guardrailversion",nc="x-amzn-bedrock-performanceconfig-latency",rc="x-amzn-bedrock-trace";class ic extends(Hr.classBuilder().ep(Vi).m(function(e,t,n,r){return[kt(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ha,fa).ser(ya).de(ba).build()){}class sc extends(Hr.classBuilder().ep(Vi).m(function(e,t,n,r){return[kt(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(da,la).ser(ga).de(wa).build()){}function oc(e,t){const n=uc();return(oc=function(e,t){return n[e-=497]})(e,t)}const ac=oc;!function(e){const t=oc,n=e();for(;;)try{if(177617===-parseInt(t(499))/1*(-parseInt(t(531))/2)+-parseInt(t(552))/3+parseInt(t(507))/4*(parseInt(t(557))/5)+parseInt(t(535))/6+-parseInt(t(558))/7*(parseInt(t(572))/8)+-parseInt(t(505))/9*(parseInt(t(520))/10)+parseInt(t(540))/11*(parseInt(t(526))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(uc);class cc extends Ge{[ac(515)];[ac(501)];[ac(542)];[ac(510)];static get[ac(566)](){return ac(545)}constructor(e){const t=ac;super(e),e[t(534)][t(555)](t(504))||e[t(534)][t(512)](t(504),{model:t(560),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(500),stream:!0}),this[t(515)]=e[t(534)][t(555)](t(525)),this[t(542)]=e[t(534)][t(555)](t(503)),this[t(501)]=e[t(534)][t(555)](t(502)),this[t(510)]=e[t(534)][t(555)](t(504))}async[ac(570)]({query:e,context:t,onData:n,actionId:r}){const i=ac,{model:s,stream:o,...a}=await this[i(554)](this[i(510)],r),c={prompt:await this[i(541)](e,t,s,r),...a};this[i(515)]?await this[i(513)](c,s,o,n,r):await this[i(573)](c,s,o,n)}async[ac(541)](e,t,n,r){const i=ac;let s,o;return t?(s=i(578),o=i(516)+e+i(548)+t):(s=i(569),o=e),i(547)==this[i(533)](n)?i(527)+s+i(559)+o+i(538):i(537)+s+"\n"+o+i(551)}[ac(533)](e){const t=ac;if(/^anthropic\.claude/[t(514)](e))return t(511);if(/^ai21\.j2/[t(514)](e))return t(509);if(/^cohere\.command/[t(514)](e))return t(498);if(/^meta\.llama/[t(514)](e))return t(547);throw new b(v(this[t(519)][t(562)],t(539),e))}async[ac(513)](e,t,n,r,i){const s=ac,o={method:s(546),headers:await this[s(508)](this[s(501)],i),body:JSON[s(536)]({...e,model:t,stream:n}),signal:this[s(497)][s(518)]},a=await fetch(this[s(515)],o);n?await this[s(556)](a,t,r):await this[s(574)](a,t,r)}async[ac(573)](e,t,n,r){const i=ac,s=new xo(this[i(542)]),o={body:JSON[i(536)](e),contentType:i(563),accept:i(563),modelId:t};let a;if(n){const e=new ic(o);a=await s[i(571)](e,{abortSignal:this[i(497)][i(518)]}),await this[i(532)](a,t,r)}else{const e=new sc(o);a=await s[i(571)](e,{abortSignal:this[i(497)][i(518)]}),await this[i(574)](a,t,r)}}async[ac(532)](e,t,n){const r=ac,i=e[r(543)],s=new TextDecoder(r(529));let o="";for await(const e of i)if(e[r(575)]){const i=s[r(553)](e[r(575)][r(528)]),a=JSON[r(522)](i);o+=this[r(550)](a,t),n(o)}return Promise[r(567)]()}async[ac(556)](e,t,n){const r=ac,i=e[r(543)],s=new TextDecoder(r(529)),o=i[r(576)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(517)]();if(u=e,u)break;const d=(a+s[r(553)](i))[r(523)]("\n")[r(564)](e=>{const t=r;try{return a="",JSON[t(522)](e)}catch{return a=e,null}})[r(565)](e=>null!==e);d[r(544)]&&(c+=d[r(564)](e=>this[r(550)](e,t))[r(577)](""),n(c))}return Promise[r(567)]()}async[ac(574)](e,t,n){const r=ac;let i;return i=e instanceof Response?await e[r(568)]():JSON[r(522)](new TextDecoder(r(529))[r(553)](e[r(543)])),n(this[r(550)](i,t)),Promise[r(567)]()}[ac(550)](e,t){const n=ac;switch(this[n(533)](t)){case n(511):return e[n(561)];case n(509):return e[n(521)][0][n(549)][n(524)];case n(498):return e[n(506)][0][n(524)];case n(547):return e[n(530)]}}}function uc(){const e=["getReader","join","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","cohere.command","71368GsRPNN","bedrock-2023-05-31","_requestHeaders","ai.aws.requestHeaders","ai.aws.bedrockClientConfig","ai.aws.requestParameters","9QGzWmr","generations","121020ZvRiWr","_prepareRequestHeaders","ai21.j2","_requestParameters","anthropic.claude","define","_processProxyRequest","test","_apiUrl","Instruction:\n","read","signal","editor","301910nNlYwD","completions","parse","split","text","ai.aws.apiUrl","12KTFtyV","<<SYS>>\n","bytes","utf-8","generation","2aMvZNf","_readAsyncIterableResponse","getModelFamily","config","683052qEDbpZ","stringify","Human:\n","\n[/INST]","AI_ERROR_UNSUPPORTED_MODEL","3917903wkEbXv","preparePrompt","_bedrockClientConfig","body","length","AWSTextAdapter","POST","meta.llama","\nYou must keep the text formatting.\n\nContent:\n","data","_getGeneratedText","\n\nAssistant:","806607sHxbZW","decode","_prepareRequestParameters","get","_readStreamableResponse","15aiKtao","1088297UJJrYX","\n<</SYS>>\n[INST]\n","anthropic.claude-v2","completion","locale","application/json","map","filter","pluginName","resolve","json","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.","sendRequest","send","8tEnlMc","_processAWSRequest","_readStaticResponse","chunk"];return(uc=function(){return e})()}function dc(){var e=["11889UcoZxo","848015ZGzCdu","780777wpgrsX","50ddcWwK","5105510gayEwj","21557IfwlSo","25534450ZwrNbJ","48ppEUGt","912GWGXqf","7257318kGfIXB"];return(dc=function(){return e})()}function lc(e,t){var n=dc();return(lc=function(e,t){return n[e-=300]})(e,t)}!function(e){for(var t=lc,n=e();;)try{if(720326===-parseInt(t(307))/1*(-parseInt(t(305))/2)+parseInt(t(302))/3*(parseInt(t(300))/4)+parseInt(t(306))/5+parseInt(t(301))/6+parseInt(t(303))/7+parseInt(t(309))/8*(-parseInt(t(304))/9)+-parseInt(t(308))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(dc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();