@ckeditor/ckeditor5-ai 46.0.3 → 46.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/dist/index.js +2 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/legacyerrors.js +1 -1
- package/src/ui/aiassistantcontroller.js +2 -2
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/normalizecommandsconfig.js +1 -1
package/build/ai.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>g,AIAssistant:()=>He,AIAssistantUI:()=>De,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>yc,OpenAITextAdapter:()=>Je,ShowAIAssistantCommand:()=>S,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=d;function d(e,t){const n=p();return(d=function(e,t){return n[e-=294]})(e,t)}!function(e){const t=d,n=e();for(;;)try{if(387933===-parseInt(t(371))/1+parseInt(t(376))/2*(-parseInt(t(398))/3)+parseInt(t(345))/4+-parseInt(t(366))/5*(parseInt(t(340))/6)+parseInt(t(297))/7+parseInt(t(304))/8+-parseInt(t(296))/9*(-parseInt(t(324))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(p);const l=globalThis[u(322)],h=u(399);class f extends e.Plugin{static get[u(386)](){return u(329)}static get[u(354)](){return!0}static get[u(395)](){return!0}[u(342)](){const e=u,{editor:t}=this,n=[e(369)];t[e(344)][e(312)](e(382))&&n[e(394)](e(332)),t[e(368)][e(359)](e(373))[e(326)]({model:h,view:{classes:n,priority:12}}),t[e(368)][e(359)](e(373))[e(339)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(337)][r(375)])return null;const i=n[r(327)](r(370));return n[r(384)]([r(369),r(338)],i),i}})}[u(307)](){!async function(e){const t=g([88,122,50,97,85,82,101,77,108,79,99,56,87,110,117,106,69,103,98,65,73,111,71,90,51,113,89,72,52,70,118,119,114,49,120,86,57,102,68,75,107,53,54,55,105,115,83,66,109,104,100,67,48,112,116,84,121,81,76,78,74,80]),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(390)](e=>String[t(396)](e))[t(391)]("")}!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([88]);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:1756857600;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(392)]);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(401)](){const e=u,t=this[e(385)][e(364)];t[e(356)](n=>{const r=e,i=t[r(301)][r(310)][r(365)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(330)][r(298)](i))n[r(314)](i,{range:e});else if(e[r(335)][r(350)]){const s=e[r(335)][r(318)](({item:e})=>!t[r(341)][r(388)](e),{boundaries:e});n[r(351)](i,{usingOperation:!1,affectsData:!1,range:n[r(367)](s,e[r(380)])})}else n[r(351)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(302)](){const e=u,t=this[e(385)][e(364)],n=Array[e(397)](this[e(385)][e(364)][e(330)][e(306)](h));n[e(315)]&&t[e(356)](t=>{const r=e;n[r(328)](e=>{t[r(381)](e)})})}[u(305)](e,t){const n=u,r=this[n(383)](),i=t||r[n(393)]();this[n(385)][n(364)][n(299)](i)&&this[n(385)][n(364)][n(356)](s=>{const o=n;this[o(302)](),t||this[o(333)](s,r),this[o(389)]({insertAt:i,writer:s,html:e})})}[u(348)](e){const t=u,{model:n}=this[t(385)],r=this[t(383)]();n[t(356)](()=>{const n=t,i=this[n(379)](e,r)||this[n(300)](r);this[n(305)](e,i)})}[u(383)](){const e=u,t=this[e(385)][e(364)],n=Array[e(397)](t[e(330)][e(306)](h))[e(390)](t=>t[e(317)]());return t[e(347)](n)}[u(389)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(385)][r(355)],s=this[r(385)][r(357)][r(312)](a.ClipboardPipeline),o=new l;o[r(378)](r(309),t);const d=new ClipboardEvent(r(334),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(372)](n);const f=(t,n)=>{const i=r;n[i(352)]&&e[i(372)](n[i(352)])};s[r(295)](r(353),f,{priority:r(316)}),i[r(301)][r(308)](r(334),h),s[r(387)](r(353),f)}[u(300)](e){const t=u,{model:n}=this[t(385)],r=Array[t(397)](e[t(294)]());return r[t(315)]?n[t(321)](r[t(361)]()):e[t(319)]()}[u(379)](e,t){const n=u,{model:r,plugins:i}=this[n(385)];if(i[n(298)](n(358))){const s=i[n(312)](n(358))[n(320)](t);if(s[n(315)]){const t=this[n(400)](e),i=this[n(363)](s,t);return r[n(311)](i,0)}}return null}[u(400)](e){const t=u,n=this[t(385)][t(357)][t(312)](t(358)),r=this[t(385)][t(360)][t(349)](e),i=Array[t(397)](r[t(402)]())[t(325)](e=>e.is(t(303),t(343)));let s=0;return i[t(328)](e=>{s+=n[t(313)](e)}),s}[u(363)](e,t){const n=u,r=this[n(385)][n(357)][n(312)](n(358)),i=r[n(377)](e),s=r[n(362)](e),o=i[n(323)]+1,a=s[n(346)],c=e[0][n(403)](n(343));for(let e=0;e<t;e++)r[n(331)](c,{at:o});return c[n(336)](o)[n(336)](a)}[u(333)](e,t){const n=u,{plugins:r}=this[n(385)],{model:i}=e;r[n(298)](n(358))&&r[n(312)](n(358))[n(320)](t)[n(315)]&&i[n(374)](t)}}function p(){const e=["getColumnIndexes","_createEmptyTableRows","model","getRanges","1767020cVnWZz","createRange","conversion","ck-fake-ai-selection","span","640270Ilwbuv","setSelection","editingDowncast","deleteContent","isCollapsed","15900QZJInj","getRowIndexes","setData","_prepareTableInsertBelowPosition","end","removeMarker","ai.useTheme","_getAISelection","addClass","editor","pluginName","off","isContent","_pasteHTMLUsingClipboard","map","join","href","getFirstRange","push","isPremiumPlugin","fromCharCode","from","291NZHVrr","ai-ui","_getTableRowCountFromContent","showFakeVisualSelection","getChildren","findAncestor","getSelectedBlocks","once","244089msqepQ","4041086seDAiC","has","canEditAt","_getDefaultInsertBelowPosition","document","hideFakeVisualSelection","element","3723032dqIhUO","insertContent","getMarkersGroup","afterInit","fire","text/html","selection","createPositionAt","get","getRows","updateMarker","length","lowest","getRange","getLastMatchingPosition","getLastPosition","getSelectedTableCells","createPositionAfter","DataTransfer","last","310HDFmrL","filter","markerToHighlight","createUIElement","forEach","AIAssistantEditing","markers","insertRows","ck-ai-assistant-ui_theme","_resetContentOfSelectedTableCells","paste","start","getChild","markerRange","ck-fake-ai-selection_collapsed","markerToElement","6ENhTtD","schema","init","table","config","1077316wrDFiG","first","createSelection","insertContentBelow","parse","isAtEnd","addMarker","resultRange","contentInsertion","isOfficialPlugin","editing","change","plugins","TableUtils","for","data","pop"];return(p=function(){return e})()}var m=y;!function(e){for(var t=y,n=e();;)try{if(884864===parseInt(t(325))/1+parseInt(t(337))/2+parseInt(t(326))/3*(-parseInt(t(328))/4)+parseInt(t(336))/5+-parseInt(t(329))/6*(parseInt(t(322))/7)+-parseInt(t(333))/8+-parseInt(t(327))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(w);class g extends e.Plugin{static get[m(332)](){return m(331)}static get[m(338)](){return!0}static get[m(335)](){return!0}[m(334)](){var e=m;if(!this[e(324)])throw new i.CKEditorError(e(339),null)}}function y(e,t){var n=w();return(y=function(e,t){return n[e-=322]})(e,t)}class b extends Error{constructor(e){var t=m;super(e),this[t(323)]=t(330)}}function w(){var e=["pluginName","3711112HJyQkq","afterInit","isPremiumPlugin","334055ioMgcq","1978326aQvIAs","isOfficialPlugin","aiadapter-text-adapter-not-set","23737HNADZI","name","textAdapter","1758213OdikVY","579nAkIFv","2454570BHJNzT","2300fpnGfk","1914oOEhvE","AIRequestError","AIAdapter"];return(w=function(){return e})()}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=E;!function(e){const t=E,n=e();for(;;)try{if(580437===parseInt(t(491))/1+parseInt(t(506))/2+parseInt(t(512))/3+parseInt(t(509))/4+parseInt(t(513))/5*(parseInt(t(529))/6)+parseInt(t(510))/7+parseInt(t(492))/8*(-parseInt(t(500))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class S extends e.Command{[k(525)];constructor(e,t){const n=k;super(e),this[n(525)]=t,this[n(518)](n(499),[]),this.on(n(503),(e,t,r)=>{const i=n;this[i(493)]&&(this[i(499)]=I(this[i(525)],r))}),this[n(518)](n(527),!1),this.on(n(498),(e,t,r)=>{const i=n;this[i(499)]=r?I(this[i(525)],this[i(527)]):[]})}[k(494)](){const e=k,t=this[e(523)][e(502)];this[e(527)]=function(t){const n=e,r=t[n(511)][n(495)];return r[n(514)]?0!==[...r[n(520)]()][n(531)]&&![...r[n(520)]()][0][n(515)]:!!t[n(504)](r[n(505)]())}(t);const n=t[e(511)][e(495)],r=this[e(523)][e(507)][e(501)](e(530));for(const t of n[e(528)]())for(const n of t[e(522)]())if(n.is(e(519))&&r[e(490)](n[e(517)]))return void(this[e(493)]=!1);this[e(493)]=!0}[k(516)](e="",t="",n=k(489)){const r=k;this[r(523)][r(526)][r(501)](De)[r(497)](e,t,n)}}function E(e,t){const n=A();return(E=function(e,t){return n[e-=489]})(e,t)}function A(){const e=["2225214gznXqT","get","model","change:_hasContext","hasContent","getFirstRange","1288726GiAhod","config","requiresContent","2882604QtngaB","6286273XmyPPd","document","1706886pSnaPR","13660JHGawt","isCollapsed","isEmpty","execute","name","set","element","getSelectedBlocks","values","getItems","editor","add","_commandDefinitions","plugins","_hasContext","getRanges","1854OvmUhh","ai.aiAssistant.disabledElements","length","custom","includes","118432BRswwS","104SILkxv","isEnabled","refresh","selection","from","showUI","change:isEnabled","enabledCommandsIds"];return(A=function(){return e})()}function I(e,t){const n=k,r=new Set;for(const i of e[n(521)]())(t||!1===i[n(508)])&&r[n(524)](i.id);return Array[n(496)](r)}const _=x;function x(e,t){const n=P();return(x=function(e,t){return n[e-=238]})(e,t)}!function(e){const t=x,n=e();for(;;)try{if(490180===-parseInt(t(274))/1*(parseInt(t(319))/2)+-parseInt(t(259))/3*(-parseInt(t(301))/4)+-parseInt(t(321))/5*(-parseInt(t(280))/6)+parseInt(t(263))/7*(parseInt(t(290))/8)+-parseInt(t(289))/9*(-parseInt(t(310))/10)+parseInt(t(241))/11*(-parseInt(t(277))/12)+parseInt(t(309))/13*(-parseInt(t(272))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(P);const R=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class M extends((0,i.ObservableMixin)()){[_(253)];[_(244)];[_(247)];[_(313)];[_(281)];[_(255)];constructor(e,t,n){const r=_;super(),this[r(253)]=e,this[r(244)]=t,this[r(313)]=document[r(296)](r(297)),this[r(281)]=new DOMParser,this[r(255)]=new XMLSerializer,this[r(247)]=n,this[r(273)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(322),(e,t,n)=>{const i=r;this[i(247)][i(279)]=this[i(325)](n)}),this[r(302)](this[r(247)],r(251),(e,t)=>{const n=r,i=this[n(305)]||this[n(269)];this[n(276)](t,i,n(238))}),this[r(302)](this[r(247)],r(239),()=>{const e=r;this[e(247)][e(248)]=this[e(327)],this[e(276)](this[e(264)],this[e(282)],this[e(283)],this[e(327)])}),this[r(302)](this[r(247)],r(316),()=>{this[r(316)]()})}[_(326)](){this[_(246)]()}async[_(340)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(247)][s(248)]=r,this[s(247)][s(268)]=i,this[s(269)]=n,t&&(this[s(247)][s(323)]?this[s(276)](t,n,e,r):this[s(247)][s(261)](s(312),()=>{this[s(276)](t,n,e,r)}))}[_(316)](){const e=_;this[e(314)]&&(this[e(314)]=!1,this[e(247)][e(308)](),this[e(244)][e(333)]())}[_(256)](){const e=_;this[e(269)]="",this[e(305)]="",this[e(317)]="",this[e(282)]="",this[e(264)]="",this[e(327)]="",this[e(283)]=void 0,this[e(247)][e(256)](),this[e(316)]()}async[_(276)](e,t,n,r){const i=_;return this[i(314)]=!0,this[i(247)][i(243)](),this[i(282)]=t,this[i(264)]=e,this[i(327)]=r||e,this[i(283)]=n,new Promise(r=>{const s=i;this[s(244)][s(267)]({query:e,context:t,onData:e=>{const t=s;this[t(317)]=e,this[t(305)]=this[t(270)](this[t(317)])},actionId:n})[s(336)](()=>{const e=s;!this[e(305)]&&this[e(317)]&&(this[e(305)]=this[e(270)](this[e(317)],!0))})[s(341)](e=>{const t=s;e instanceof b?this[t(247)][t(334)](e[t(288)]):this[t(247)][t(334)](),r()})[s(240)](()=>{this[s(316)](),r()})})}[_(270)](e,t=!1){const n=_,r=R[n(306)](e);e=r?e[n(293)](r[1][n(295)]):e[n(295)]<100&&!t?"":this[n(294)](e);const i=this[n(281)][n(329)](e,n(249));if(r){const e=Array[n(254)](i[n(242)][n(298)]);e[n(245)]();for(const t of e){if(t[n(328)]==Node[n(262)])break;t[n(304)]()}}const s=this[n(253)][n(278)][n(286)][n(271)](this[n(255)][n(299)](i[n(242)]));this[n(250)]()||this[n(320)](s);const o=this[n(253)][n(260)][n(318)](n(307)),a=this[n(253)][n(278)][n(311)](s);return o||a[n(285)][n(258)](),this[n(253)][n(278)][n(315)](a)}[_(320)](e){const t=_,n=new c.ViewUpcastWriter(this[t(253)][t(332)][t(247)][t(252)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(331))&&r[t(292)](n)&&(i[t(257)](n),"h1"==n[t(303)]&&(s=!0));if(s)for(const e of i)n[t(324)]("h"+(parseInt(e[t(303)][1])+1),e)}[_(250)](){const e=_,{data:t,editing:n}=this[e(253)],r=t[e(284)][e(271)](e(300)),i=t[e(271)](t[e(311)](r));return!!n[e(247)][e(275)][e(338)](i)[e(335)]("h1")}[_(325)](e){const t=_;return this[t(253)][t(332)][t(247)][t(275)][t(337)](this[t(313)],e),this[t(313)][t(265)]}[_(294)](e){const t=_,n=e[t(287)]();return n[t(339)](t(291))?n[t(266)](t(330))?n[t(293)](7,n[t(295)]-3):n[t(293)](7):e}}function P(){const e=["previousContext","previousActionId","htmlProcessor","markers","processor","trim","message","27NEZGbU","88UxWleE","```html","match","substring","_stripMarkdownSyntax","length","createElement","div","childNodes","serializeToString","<h1></h1>","109024bocZmB","listenTo","name","remove","currentContext","exec","ai.aiAssistant.preserveComments","finishProcessing","52169OxOfkk","3034830mcseDE","toModel","render","_sanitizationContainer","isProcessing","stringify","stopProcessing","currentResponse","get","88898SQcfkO","_normalizeResponseHeadings","1285AyDfIu","set:currentContext","isRendered","rename","_sanitizeHTML","destroy","previousLabel","nodeType","parseFromString","```","element","editing","abort","handleError","querySelector","then","setContentOf","viewToDom","startsWith","updateView","catch","custom","tryAgainEvent","finally","6985OxkkSS","body","startProcessing","textAdapter","reverse","stopListening","view","prompt","text/html","_isH1TagSupportEnabled","submitPrompt","document","editor","from","_xmlSerializer","reset","push","clear","27TagoVK","config","once","ELEMENT_NODE","172144HLIVCl","previousQuery","innerHTML","endsWith","makeRequest","mainAction","initialContext","_parseAndNormalizeContent","toView","3010ElkMdv","set","2Dxqaqf","domConverter","_handleQuery","1740ILDhTe","data","value","2514EKcrNk","_domParser"];return(P=function(){return e})()}const T=C;function C(e,t){const n=L();return(C=function(e,t){return n[e-=111]})(e,t)}!function(e){const t=C,n=e();for(;;)try{if(542179===parseInt(t(112))/1*(-parseInt(t(122))/2)+parseInt(t(135))/3+parseInt(t(121))/4*(-parseInt(t(129))/5)+parseInt(t(117))/6+-parseInt(t(116))/7+-parseInt(t(115))/8*(parseInt(t(128))/9)+parseInt(t(133))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(L);const O={REPLACE:T(145),INSERT:T(143)};class N extends s.ToolbarView{constructor(e){const t=T;super(e),this[t(146)](t(127),!1),this[t(146)](t(111),O[t(136)]),this[t(119)]=this[t(132)]("",t(141)),this[t(119)][t(124)](t(131)).to(this,t(111),n=>v(e,t(120)+n[t(138)]()+t(137))),this[t(140)]=this[t(132)](v(e,t(113))),this[t(125)]=this[t(132)](v(e,t(123))),this[t(114)]=this[t(132)](v(e,t(126)));const n=this[t(144)];this[t(142)]({attributes:{class:[t(147),n.if(t(127),t(118),e=>!e)]}}),this[t(134)][t(139)]([this[t(119)],this[t(140)],this[t(125)],this[t(114)]])}[T(132)](e,t){const n=T,r=new s.ButtonView(this[n(130)]);return r[n(146)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}function L(){const e=["Insert below","stopButton","8iweiIb","554106cHiXgA","1571496BIEayL","ck-hidden","replaceButton","AI_","1556iLRVui","48OybzDS","Try again","bind","tryAgainButton","Stop","isVisible","4800078hHSkOB","7075NFDDoL","locale","label","_createButton","18473670VoGEFj","items","1326717NJUesH","REPLACE","_CONTENT","toUpperCase","addMany","insertButton","ck-button-action","extendTemplate","insert","bindTemplate","replace","set","ck-ai-form__toolbar","mainAction","35267STtjIu"];return(L=function(){return e})()}const D=U;function $(){const e=["listenTo","set","<span>]</span>","write","ck-ai-form__content-field","ck-ai-form__content-area--processing","671697cbvarx","copy","removeAllRanges","Copy","wheel","ck-ai-form__copy-button-wrapper","ck-hidden","innerHTML","value","left","appendLoader","class","mousedown","isProcessing","1758252bmCwoY","querySelector","render","scrollHeight","setContent","loaderView","isEnabled","AI is writing...","3224600SAKocy","isVisible","change:isProcessing","setTemplate","style","locale","contentFieldView","addRange"," ck-ai-form__copy-button--copied","div","remove","_createCopyButton","<span>[</span>","firstElementChild","text/plain","785304niacAH","absolute","_copyHTMLToClipboard","getSelection","bind","430486KWeWDd","clipboard","-9999px","18391XXpJEb","bindTemplate","appendChild","ck-ai-form__copy-button",".ck-ai-form__loader","change:value","14GvpMcS","455238smaYnQ","_createLoader","scrollTo","ClipboardItem","body","smooth","ck-reset_all-excluded","position","element","focus","createElement","textContent","execCommand","icon","5ErImhN","execute","copyButtonView","setStartAfter","createRange","ck-ai-form__loader","ck-content","setEndBefore","text/html","ck-ai-form__content-area","lastElementChild","ck-ai-form__content-area-wrapper"];return($=function(){return e})()}function U(e,t){const n=$();return(U=function(e,t){return n[e-=154]})(e,t)}!function(e){const t=U,n=e();for(;;)try{if(220627===-parseInt(t(189))/1+parseInt(t(186))/2+-parseInt(t(228))/3+-parseInt(t(158))/4*(-parseInt(t(210))/5)+-parseInt(t(181))/6*(-parseInt(t(195))/7)+-parseInt(t(166))/8+-parseInt(t(196))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}($);class B extends s.View{[D(172)];[D(212)];constructor(e,t=""){const n=D;super(e),this[n(223)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(190)];this[n(172)]=new F(e,t),this[n(212)]=this[n(177)](),this[n(169)]({tag:n(175),attributes:{class:["ck",n(221),r.if(n(167),n(234),e=>!e)],tabindex:"-1"},children:[{tag:n(175),attributes:{class:["ck",n(219),r.if(n(157),n(227))]},children:[this[n(172)],{tag:n(175),attributes:{class:["ck",n(233)]},children:[this[n(212)]]}]}]})}[D(160)](){const e=D;super[e(160)](),this[e(236)]&&this[e(172)][e(162)](this[e(236)]);let t=!1;this.on(e(194),(n,r,i)=>{const s=e,o=!this[s(172)][s(204)][s(159)](s(193));this[s(172)][s(162)](i),this[s(157)]&&o&&!t&&this[s(204)][s(198)]({top:this[s(204)][s(161)],behavior:s(201)})}),this.on(e(168),(n,r,i)=>{const s=e;t=!1,i?(this[s(236)]=null,this[s(172)][s(154)]()):this[s(236)]||this[s(172)][s(162)]("")}),this[e(222)](this[e(204)],e(232),()=>{t=!0}),this[e(222)](this[e(204)],e(156),()=>{t=!0})}[D(205)](){const e=D;this[e(204)][e(205)]()}[D(177)](){const e=D,n=this[e(171)],r=new s.ButtonView(this[e(171)]),i=e(192);return r[e(223)]({label:v(n,e(231)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(185)](e(167)).to(this,e(236),e=>!!e),r[e(185)](e(164)).to(this,e(157),e=>!e),r.on(e(211),()=>{const n=e;this[n(183)](this[n(172)][n(204)]),r[n(209)]=t.IconCheck,r[n(155)]=i+n(174),this[n(205)](),setTimeout(()=>{const e=n;r[e(209)]=t.IconCopy,r[e(155)]=i},1e3)}),r}[D(183)](e){const t=D,{window:n,document:r}=i.global;if(n[t(199)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(235)]],{type:t(218)}),"text/plain":new r([e[t(207)]||""],{type:t(180)})})];navigator[t(187)][t(225)](s)}else{const i=r[t(206)](t(175));i[t(170)][t(203)]=t(182),i[t(170)][t(237)]=t(188),i[t(235)]=t(178)+e[t(235)]+t(224),r[t(200)][t(191)](i);const s=r[t(214)]();s[t(213)](i[t(179)]),s[t(217)](i[t(220)]);const o=n[t(184)]();o[t(230)](),o[t(173)](s),r[t(208)](t(229)),i[t(176)]()}}}class F extends s.View{constructor(e,t=""){const n=D;super(e),this[n(163)]=this[n(197)](),this[n(169)]({tag:n(175),attributes:{class:["ck",n(216),t,n(202),n(226)]}})}[D(162)](e){const t=D;this[t(204)][t(235)]=e}[D(154)](){const e=D;this[e(204)][e(191)](this[e(163)][e(204)])}[D(197)](){const e=D,t=new s.View,n=this[e(171)],r=new s.SpinnerView;return r[e(167)]=!0,t[e(169)]({tag:e(175),attributes:{class:["ck",e(215)]},children:[r,{text:v(n,e(165))}]}),t[e(160)](),t}}function j(e,t){const n=H();return(j=function(e,t){return n[e-=209]})(e,t)}function H(){const e=["div","text","content","5109744nJgahz","4258782iRmIWY","7bSnXUD","5dKDAKW","ck-ai-form__error","bindTemplate","584608uhNlSy","set","4701861zqLmSG","315816dfPDUC","30cYuCUS","4019520cITWhn","setTemplate","496518YKZezc"];return(H=function(){return e})()}!function(e){const t=j,n=e();for(;;)try{if(795834===-parseInt(t(210))/1+parseInt(t(220))/2+parseInt(t(215))/3+parseInt(t(214))/4*(-parseInt(t(217))/5)+-parseInt(t(225))/6+-parseInt(t(216))/7*(parseInt(t(223))/8)+parseInt(t(222))/9*(parseInt(t(224))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(H);class q extends s.View{constructor(e,n=""){const r=j;super(e);const i=new s.IconView,o=this[r(219)];this[r(221)](r(212),n),i[r(213)]=t.IconError,this[r(209)]({tag:r(211),attributes:{class:["ck",r(218)]},children:[i,{text:o.to(r(212))}]})}}const V=z;function z(e,t){const n=G();return(z=function(e,t){return n[e-=458]})(e,t)}function G(){const e=["fieldWrapperChildren","target","set","fieldView","9647925QssuhS","1410EzFwTu","execute","queryView","update","7383786deQMBB","History","focusFirst","8zhhbAx","minRows","element","5dYlXtF","rtl","isOn","82GPQNxB","children","locale","isEmpty","fire","ck-ai-form__submit","resultsView","right","_createShowHistoryButton","focusCycler","6421581MUuYsx","value","3056175NjNuxh","keystrokes","add","isVisible","window","focusableChildren","isEnabled","filteredView","25375IkgYLv","submit","_createSubmitButton","1024456xkGfzp","92686lvOiOo","requestAnimationFrame","Submit","style","focus","excludeScrollbarsAndBorders","uiLanguageDirection","bind","render","maxRows","enter","left","submitButtonView","showHistoryButtonView","focusLast","width","ck-ai-form__toggle-history"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(856665===-parseInt(t(501))/1*(parseInt(t(481))/2)+parseInt(t(493))/3+parseInt(t(504))/4+-parseInt(t(478))/5*(parseInt(t(472))/6)+-parseInt(t(467))/7*(-parseInt(t(475))/8)+-parseInt(t(491))/9+parseInt(t(468))/10*(parseInt(t(505))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(458)];[V(459)];constructor(e,t){const n=V;super(e,t),this[n(470)][n(466)][n(476)]=1,this[n(470)][n(466)][n(514)]=3,this[n(458)]=this[n(503)](),this[n(459)]=this[n(489)](),this[n(498)][n(495)](this[n(459)],1),this[n(498)][n(495)](this[n(458)])}[V(513)](){const e=V;super[e(513)](),this[e(470)][e(463)][e(495)](this[e(459)]),this[e(482)][e(495)](this[e(458)]),this[e(494)][e(465)](e(515),(t,n)=>{const r=e;t[r(464)]==this[r(470)][r(466)][r(477)]&&(this[r(502)](),n())})}[V(503)](){const e=V,n=new s.ButtonView(this[e(483)]),r=this[e(483)];return n[e(465)]({icon:t.IconSubmit,label:v(r,e(507)),isVisible:!0,tooltip:!0,class:e(486)}),n.on(e(469),()=>{this[e(502)]()}),n[e(512)](e(499)).to(this[e(470)][e(466)],e(484),this,e(499),(e,t)=>!e&&t),n}[V(489)](){const e=V,n=new s.ButtonView(this[e(483)]),r=this[e(487)],o=this[e(483)];n[e(465)]({label:v(o,e(473)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(462)}),n[e(512)](e(480)).to(r,e(496)),n[e(512)](e(499)).to(this,e(499)),n.on(e(469),()=>{const t=e;r[t(496)]=!r[t(496)],r[t(496)]?this[t(500)][t(509)]():this[t(509)]()});const a=()=>{const t=e;i.global[t(497)][t(506)](()=>{const e=t;if((0,i.isVisible)(this[e(477)])){const t=new i.Rect(this[e(470)][e(466)][e(477)]),r=t[e(461)],s=e(479)===o[e(511)]?e(516):e(488);t[e(510)](),n[e(477)][e(508)][s]=r-t[e(461)]+1+"px"}})};return this[e(470)][e(466)].on(e(471),a),this.on(e(513),a),n}[V(502)](){const e=V,t=this[e(470)][e(466)][e(477)][e(492)];this[e(485)](e(502),t)}[V(509)](e){const t=V;-1===e?this[t(490)][t(460)]():this[t(490)][t(474)]()}}function K(e,t){const n=Y();return(K=function(e,t){return n[e-=296]})(e,t)}const Q=K;function Y(){const e=["1671549JfeTYv","delegate","Prompt history","6894408NMMzxO","add","9266950WQIpaW","15298686KPNNns","2435186RLXHmC","2568915fdFAGD","_createClearHistoryButton","set","execute","children","fire","historyGroupView","12ilVihV","81265VVNRGM","clearHistory","length","Clear","6VcZUrI","label","items","clearHistoryButton","locale","filter"];return(Y=function(){return e})()}!function(e){const t=K,n=e();for(;;)try{if(873223===parseInt(t(320))/1+-parseInt(t(301))/2+parseInt(t(302))/3+-parseInt(t(309))/4*(-parseInt(t(310))/5)+-parseInt(t(314))/6*(parseInt(t(299))/7)+-parseInt(t(297))/8+parseInt(t(300))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Y);class J extends s.ListView{[Q(308)];[Q(317)];constructor(e){const t=Q;super(e),this[t(317)]=this[t(303)](),this[t(308)]=new s.ListItemGroupView,this[t(308)][t(306)][t(298)](this[t(317)],1),this[t(308)][t(315)]=v(e,t(296)),this[t(308)][t(316)][t(321)](t(305)).to(this),this[t(316)][t(298)](this[t(308)])}[Q(319)](){const e=Q;let t=0;for(const n of this[e(316)])t+=n[e(316)][e(312)];return{resultsCount:t,totalItemsCount:t}}[Q(303)](){const e=Q,t=this[e(318)],n=new s.ButtonView(this[e(318)]);return n[e(304)]({label:"("+v(t,e(313))+")",withText:!0}),n.on(e(305),()=>this[e(307)](e(311))),n}}const X={"&":"&","<":"<",">":">",""":'"',"'":"'"};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=>X[e]||"'")}(Z(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=201]})(e,t)}function ne(){const e=["2064002eWpkpK","11894202sbpMPk","set","prompt","execute","80jCrbfQ","503340BXZiPh","locale","40UYJzqg","add","72Ipssfo","3779260bjjyvI","165084EQLwfi","773017qIYoHV","44xBiRll","children","1539390mAOUyO","fire"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(999471===parseInt(t(217))/1+parseInt(t(201))/2+parseInt(t(213))/3*(parseInt(t(209))/4)+parseInt(t(207))/5*(-parseInt(t(211))/6)+-parseInt(t(214))/7*(parseInt(t(206))/8)+-parseInt(t(202))/9+-parseInt(t(212))/10*(-parseInt(t(215))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(208)],n);this[t(216)][t(210)](r),r[t(203)]({label:e[t(204)],withText:!0}),r.on(t(205),()=>{const n=t;this[n(218)](n(205),{value:ee(e[n(204)])})})}}const ie=se;function se(e,t){const n=ce();return(se=function(e,t){return n[e-=265]})(e,t)}!function(e){const t=se,n=e();for(;;)try{if(176124===-parseInt(t(287))/1*(-parseInt(t(278))/2)+-parseInt(t(268))/3+-parseInt(t(286))/4*(parseInt(t(285))/5)+parseInt(t(281))/6+parseInt(t(273))/7+parseInt(t(289))/8+-parseInt(t(275))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const oe=ie(269);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(274)](),this.on(e(266),(t,n)=>{const r=e,i=ue(n[r(267)]);for(const e of this)if(e!=n&&ue(e[r(267)])===i){this[r(272)](e);break}this[r(270)]>20&&this[r(272)](this[r(280)]),this[r(288)]()}),this.on(e(272),()=>{this[e(288)]()})}[ie(274)](){const e=ie,t=sessionStorage[e(271)](oe)||"[]";this[e(283)](JSON[e(265)](t))}[ie(288)](){const e=ie;sessionStorage[e(284)](oe,JSON[e(282)](this[e(277)](e=>e)))}}function ce(){const e=["trim","map","974MbvoCi","toLowerCase","last","950352TPIxxv","stringify","addMany","setItem","39030fkjCpk","124xTNSQS","269lvREnq","_saveToSessionStorage","372232GCCFMQ","parse","add","prompt","91101mQKXRU","CKEditor/AIFormView/PromptHistory","length","getItem","remove","2009707plLoOY","_loadFromSessionStorage","1570932sTSAdd"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(279)]()[t(276)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}const he=fe;function fe(e,t){const n=pe();return(fe=function(e,t){return n[e-=225]})(e,t)}function pe(){const e=["clearHistory","Ask AI and your prompts will be listed here for you to use later.","listenTo","1766166uGlbkA","isEnabled","historyGroupView","focus","label","40lurKcX","focusLast","tryAgainButton","insertButton","565280xVhgWV","108SRWtcf","text","_createHistoryView","replaceButton","_createPromptView","delegate","1654659yyAeuP","focusCycler","shift + tab","fieldView","element","bind","551446TJlXBH","ck-ai-form","ck-hidden","Ask AI to improve generated text","REPLACE","842976mjZLaU","tryAgainEvent","106232pfBuxo","_promptHistory","handleError","items","high","tab","startProcessing","contentArea","prompt","queryView","value","insertContentBelow","set","render","bindTemplate","4tMvxVj","promptView","bindTo","AI_ERROR_FAILED","Ask AI to edit or generate","submit","copyButtonView","focusFirst","stopButton","Empty history","finishProcessing","locale","6060467XJrkbX","isProcessing","errorView","submitPrompt","8rZcGND","ck-ai-form-content","_createToolbar","focusTracker","clear","isError","chain","replaceContent","stopProcessing","mainAction","_focusables","toolbar","fire","keystrokes","add","createCollection","trim","setTemplate","execute","reset","search","isVisible","110IjHXQD","div"];return(pe=function(){return e})()}!function(e){const t=fe,n=e();for(;;)try{if(606604===parseInt(t(305))/1*(-parseInt(t(283))/2)+-parseInt(t(271))/3*(-parseInt(t(290))/4)+-parseInt(t(270))/5+parseInt(t(261))/6+-parseInt(t(230))/7*(parseInt(t(234))/8)+-parseInt(t(277))/9*(-parseInt(t(266))/10)+-parseInt(t(256))/11*(-parseInt(t(288))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pe);class me extends s.View{[he(237)];[he(247)];[he(297)];[he(245)];[he(306)];[he(232)];[he(244)];[he(278)];[he(291)];constructor(e,t,n=""){const r=he;super(e),this[r(302)](r(262),!0),this[r(302)](r(231),!1),this[r(302)](r(298),""),this[r(302)](r(300),""),this[r(302)](r(239),!1),this[r(302)](r(243),O[r(287)]),this[r(291)]=new ae,this[r(232)]=new q(e),this[r(297)]=new B(e,n),this[r(297)][r(282)](r(231)).to(this),this[r(297)][r(282)](r(300)).to(this),this[r(245)]=this[r(236)](),this[r(245)][r(282)](r(243)).to(this),this[r(306)]=this[r(275)](),this[r(237)]=new i.FocusTracker,this[r(247)]=new i.KeystrokeHandler,this[r(244)]=this[r(249)]([this[r(297)],this[r(297)][r(311)],this[r(245)],this[r(306)]]),this[r(278)]=new s.FocusCycler({focusables:this[r(244)],focusTracker:this[r(237)],keystrokeHandler:this[r(247)],actions:{focusPrevious:r(279),focusNext:r(295)}}),this[r(278)][r(240)](this[r(306)][r(278)]),this[r(306)][r(299)][r(280)][r(282)](r(300)).to(this,r(298));const o=this[r(304)];this[r(251)]({tag:r(257),attributes:{class:["ck",r(284),t],tabindex:"-1"},children:[{tag:r(257),attributes:{class:["ck",r(235)]},children:[{tag:r(257),attributes:{class:[o.if(r(239),r(285),e=>!e)]},children:[this[r(232)]]},this[r(297)],this[r(245)],this[r(306)]]}]})}[he(303)](){const e=he;super[e(303)](),this[e(237)][e(248)](this[e(297)][e(281)]),this[e(237)][e(248)](this[e(297)][e(311)][e(281)]),this[e(237)][e(248)](this[e(245)][e(281)]),this[e(237)][e(248)](this[e(306)][e(281)]),this[e(247)][e(260)](this[e(281)])}[he(264)](e=1){const t=he;-1===e?this[t(278)][t(267)]():this[t(278)][t(225)]()}[he(253)](){const e=he;this[e(298)]="",this[e(300)]="",this[e(239)]=!1,this[e(306)][e(253)](),this[e(297)][e(255)]=!1,this[e(245)][e(255)]=!1}[he(275)](){const e=he,t=this[e(229)],n=new W(t,{queryView:{label:v(t,e(309)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(227)),secondary:v(t,e(259))}}},filteredView:this[e(273)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(282)](e(262)).to(this,e(262),this,e(231),(e,t)=>e&&!t),this[e(260)](n,e(310),(t,n)=>{const r=e;this[r(298)]=n;const i=le(n);this[r(246)](r(233),i),n[r(250)]()&&this[r(291)][r(248)]({prompt:i},0)},{priority:e(294)}),n}[he(273)](){const e=he,t=new J(this[e(229)]);return t[e(263)][e(293)][e(307)](this[e(291)]).as(re),t.on(e(258),()=>{const t=e;this[t(291)][t(238)](),this[t(306)][t(254)](""),this[t(306)][t(264)]()}),t}[he(236)](){const e=he,t=new N(this[e(229)]);return t[e(274)][e(282)](e(262)).to(this,e(262),this,e(231),this,e(300),(e,t,n)=>e&&!t&&!!n),t[e(274)][e(276)](e(252)).to(this,e(241)),t[e(269)][e(282)](e(262)).to(this,e(262),this,e(231),this,e(300),(e,t,n)=>e&&!t&&!!n),t[e(269)][e(276)](e(252)).to(this,e(301)),t[e(268)][e(282)](e(262)).to(this,e(262),this,e(231),(e,t)=>e&&!t),t[e(268)][e(276)](e(252)).to(this,e(289)),t[e(226)][e(282)](e(262)).to(this,e(231)),t[e(226)][e(276)](e(252)).to(this,e(242)),t}[he(296)](){const e=he;this[e(300)]="",this[e(239)]=!1,this[e(231)]=!0,this[e(297)][e(255)]=!0,this[e(245)][e(255)]=!0,this[e(297)][e(264)]()}[he(228)](){const e=he,t=this[e(229)];this[e(231)]=!1,this[e(298)]="",this[e(306)][e(253)](),this[e(300)]&&(this[e(306)][e(299)][e(265)]=v(t,e(286)))}[he(292)](e){const t=he,n=this[t(229)];this[t(228)](),this[t(239)]=!0,this[t(232)][t(272)]=e||v(n,t(308)),this[t(300)]||(this[t(297)][t(255)]=!1)}}var ge=n(673),ye=n.n(ge),be=n(545),we=n.n(be),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=we(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ee(),Me.insert=ke().bind(null,"head"),Me.domAPI=we(),Me.insertStyleElement=Ie();ye()(Re.A,Me);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ee(),Te.insert=ke().bind(null,"head"),Te.domAPI=we(),Te.insertStyleElement=Ie();ye()(Pe.A,Te);Pe.A&&Pe.A.locals&&Pe.A.locals;const Ce=Le;function Oe(){const e=["addMany","isOfficialPlugin","model","update","ai.aiAssistant.contentAreaCssClass","bind","filter","init","schema","requires","from","once","includes","document","trialLimit","length"," ck-ai-assistant-ui_theme","groupLabel","body","aiLicenseKeyInvalid","_showLicenseError","_forceMarkersCopy","replace","evaluationLimit","define","tableOfContents","_initAriaAiStatusChangeAnnouncements","label","_uiCssClasses","hideFakeVisualSelection","9yhVKnU","AI Assistant","forEach","order","set","map","ai.aiAssistant.commands","getData","getSelectedBlocks","wasMoved","isPremiumPlugin","DataTransfer","aiAssistant","componentFactory","Generated content: %0","items","getLimitElement","aiLicenseKeyUsageLimit","promptView","change:value","locale","children","delegate","config","commands","panelView","show","selection","30498qYpZSt","buttons","change:isError","isEnabled","AIAssistant","ai-commands-config-order-collision","text/html","sort","menuBar:aiAssistant","2HKeOjv","ck-ai-assistant-ui","showAIAssistant","AI is writing","media","_licenseKeyCheckInterval","ai.aiAssistant.disabledElements","Error during AI content generation: %0","aiLicenseKeyValid","comment","queryView","ck-ai-assistant-button ","EDITOR_TOP_SIDE","fieldView","760396bMPhgs","_createAIAssistantUIButton","aiLicenseKeyTrialLimit","_populateMenuBarMenu","2153464ieBuJm","_initView","announce","_getResolvedCommandsDefinitions","pluginName","change:enabledCommandsIds","93669DmEsvr","licenseKey","replaceContent","usageLimit","destroy","reset","AIAssistantUI","_commandDefinitions","source","plugins","322BprQHz","getSelectedElement","expired","featureNotAllowed","custom","menuitemcheckbox","aiLicenseKeyNotAllowed","buttonView","splice","</p>","push","textAdapter","rawHtml","execute","aiLicenseKeyExpired","currentContext","aiLicenseKeyEvaluationLimit","enabledCommandsIds","fire","_dialog","4209930DoGfSv","requiresContent","ai.useTheme","get","_aiAdapter","editing","copy","domainLimit","getRanges","isOn","editor","errorView","menuPanelClass","insertContent","contentArea","aiCommands","aiLicenseKeyDomainLimit","setSelection","add","_aiAssistantController","menuBar:aiCommands","render","groupId","prompt","updateView","menuView","trim","showUI","isFlat","listenTo","insertContentBelow","312801YMpvfn","hide","ck-ai-commands-dropdown ","polite","hideUI","INSERT","focus","AI Commands","REPLACE","change:isProcessing","updatePosition","view","1384370BmajvU","_onExecute","<p>","values","text","command:","_getMenuBarGroupButtons","isCollapsed","showFakeVisualSelection","_formView","invalid","change"];return(Oe=function(){return e})()}!function(e){const t=Le,n=e();for(;;)try{if(187029===-parseInt(t(406))/1*(parseInt(t(382))/2)+-parseInt(t(467))/3+parseInt(t(396))/4+parseInt(t(479))/5+-parseInt(t(373))/6*(parseInt(t(416))/7)+parseInt(t(400))/8*(-parseInt(t(521))/9)+parseInt(t(436))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const Ne=globalThis[Ce(356)];function Le(e,t){const n=Oe();return(Le=function(e,t){return n[e-=352]})(e,t)}class De extends e.Plugin{[Ce(407)];[Ce(387)];[Ce(435)];[Ce(488)];[Ce(440)];[Ce(455)];[Ce(519)]="";static get[Ce(404)](){return Ce(412)}static get[Ce(492)](){return!0}static get[Ce(355)](){return!0}static get[Ce(500)](){return[a.ClipboardMarkersUtils,f,g,s.Dialog]}constructor(e){const t=Ce;super(e),e[t(368)][t(515)](t(388),[t(386),t(428),t(516)]),e[t(368)][t(515)](t(495),""),e[t(368)][t(515)](t(438),!0),this[t(519)]=t(383)+(e[t(368)][t(439)](t(438))?t(507):"")}[Ce(498)](){const e=Ce,{editor:n}=this;this[e(440)]=n[e(415)][e(439)](g),this[e(435)]=n[e(415)][e(439)](s.Dialog),this[e(488)]=null,this[e(413)]=this[e(403)]();const r=new S(n,Array[e(501)](this[e(413)][e(482)]()));n[e(369)][e(454)](e(384),r),n.ui[e(358)][e(454)](e(451),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(525)]({class:a(469)+this[a(519)]}),c[a(423)][a(525)]({label:v(i,a(474)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(429),e=>this[a(480)](e[a(414)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(478)][a(509)],function(e){const t=a,n=o(e[t(368)][t(439)](t(527)),e[t(365)]),r=Ue(e,n)[t(497)](e=>e[t(369)][t(506)]);return 1===r[t(506)]?Ue(e,r[0][t(369)])[t(526)](e=>({id:e.id,label:e[t(518)]})):r[t(526)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(526)](e=>({id:e.id,label:e[r(518)]}))}})}(n),{ariaLabel:v(i,a(474))}),c[a(461)][a(448)]=a(469)+this[a(519)],r.on(a(405),u),c[a(461)][a(502)](a(457),u),c;function u(){const e=a;c[e(376)]=r[e(433)][e(506)]>0;for(const t of c[e(461)][e(374)])t[e(376)]=r[e(433)][e(503)](t.id)}}),n.ui[e(358)][e(454)](e(456),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(423)][a(525)]({label:v(i,a(474)),icon:t.IconMagicWand}),c[a(496)](a(376)).to(r,a(433),e=>e[a(506)]>0);const u=o(n[a(368)][a(439)](a(527)),i);return this[a(399)](r,c,u,e=>this[a(480)](e)),c}),n.ui[e(358)][e(454)](e(357),()=>{const t=e,n=this[t(397)](s.ButtonView);return n[t(525)]({tooltip:!0,class:t(393)+this[t(519)]}),n}),n.ui[e(358)][e(454)](e(381),()=>{const t=e,n=this[t(397)](s.MenuBarMenuListItemButtonView);return n[t(525)]({role:t(421)}),n}),this[e(407)]=this[e(446)][e(368)][e(439)](e(407));const i=this[e(446)];this[e(387)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(390)==s||t(510)==s||t(430)==s||t(452)==s||t(422)==s||t(432)==s||t(398)==s||t(362)==s){delete i[r],n=s,clearInterval(this[t(387)]),this[t(387)]=void 0;break}}t(510)==n&&i[t(511)](t(489)),t(430)==n&&i[t(511)](t(418)),t(452)==n&&i[t(511)](t(443)),t(422)==n&&i[t(511)](t(419),t(377)),t(432)==n&&i[t(511)](t(514)),t(398)==n&&i[t(511)](t(505)),t(362)==n&&i[t(511)](t(409))},1e3)}[Ce(410)](){const e=Ce;super[e(410)](),this[e(387)]&&clearInterval(this[e(387)])}[Ce(463)](e="",n="",r=Ce(420)){const i=Ce,o=this[i(446)],u=o[i(441)][i(478)],d=o[i(415)][i(439)](f),l=o[i(415)][i(439)](a.ClipboardMarkersUtils);d[i(487)]();const h=new Ne,p=new ClipboardEvent(i(442),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,p,{dataTransfer:m});l[i(512)](i(391),()=>{const e=i;u[e(504)][e(434)](e(442),g)}),this[i(488)]||(this[i(401)](),this[i(455)]=new M(o,this[i(440)][i(427)],this[i(488)]));let y=m[i(352)](i(379));const b=o[i(493)][i(504)][i(372)],w=Array[i(501)](b[i(444)]());1===w[i(506)]&&w[0][i(464)]&&!b[i(417)]()&&""!==y[i(513)](/ /g,"")[i(462)]()&&(y=i(481)+y+i(425)),this[i(455)][i(460)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:O[o[i(493)][i(504)][i(372)][i(486)]?i(472):i(475)]}),i(357)!==this[i(435)].id?this[i(435)][i(371)]({id:i(357),icon:t.IconRobotPencil,title:v(this[i(446)][i(365)],i(522)),content:this[i(488)],position:s.DialogViewPosition[i(394)],onShow:()=>{const e=i;this[e(488)][e(473)]()},onHide:()=>{const e=i;this[e(455)][e(411)](),d[e(520)]()}}):this[i(435)][i(478)][i(354)]||this[i(435)][i(478)][i(477)]()}[Ce(471)](){const e=Ce;this[e(435)][e(468)]()}[Ce(403)](){const e=Ce,t=new Map,n=o(this[e(446)][e(368)][e(439)](e(527)),this[e(446)][e(365)]);for(const r of n)for(const n of r[e(369)])t[e(525)](n.id,{...n,groupId:r[e(458)],groupLabel:r[e(508)]||r[e(458)]});return t}[Ce(397)](e){const n=Ce,r=this[n(446)],i=r[n(369)][n(439)](n(384)),s=new e(r[n(365)]);return s[n(525)]({label:v(r[n(365)],n(522)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(496)](n(376)).to(i),s[n(496)](n(445)).to(this[n(435)],"id",e=>n(357)===e),this[n(465)](s,n(429),()=>{const e=n;s[e(445)]?this[e(471)]():i[e(429)]()}),s}[Ce(401)](){const e=Ce,t=this[e(446)][e(415)][e(439)](f);this[e(488)]=new me(this[e(446)][e(365)],this[e(519)],this[e(446)][e(368)][e(439)](e(495))),this[e(488)].on(e(364),()=>{const t=e;this[t(435)][t(478)][t(354)]||this[t(435)][t(478)][t(477)]()}),this[e(488)][e(363)][e(392)][e(395)].on(e(494),()=>{const t=e;this[t(435)][t(478)][t(354)]||this[t(435)][t(478)][t(477)]()}),this[e(465)](this[e(488)],e(408),()=>{const n=e;t[n(449)](this[n(455)][n(431)]),this[n(471)]()}),this[e(465)](this[e(488)],e(466),()=>{const n=e;t[n(466)](this[n(455)][n(431)]),this[n(471)]()}),this[e(517)]()}[Ce(517)](){const e=Ce,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(446)];this[e(488)][e(450)].on(e(476),(r,i,s)=>{const o=e,a=this[o(455)][o(431)];s?n[o(402)](v(t,o(385))):a&&n[o(402)](v(t,o(359),a),{politeness:o(470),isUnsafeHTML:!0})}),this[e(488)].on(e(375),(r,i,s)=>{const o=e;if(s){const e=this[o(488)][o(447)][o(483)];n[o(402)](v(t,o(389),e))}})}[Ce(480)](e){const t=Ce,n=this[t(413)][t(439)](e),r=this[t(446)],s=r[t(493)][t(504)][t(372)],o=r[t(369)][t(439)](t(384)),a=r[t(415)][t(439)](f),c=("_ungrouppedCommands"!==n[t(458)]?n[t(508)]+": ":"")+n[t(518)];if(!1!==n[t(437)]&&s[t(486)]){const e=(0,i.first)(s[t(353)]())||r[t(493)][t(499)][t(361)](s);r[t(493)][t(490)](n=>{n[t(453)](e,"in")})}a[t(487)](),o[t(429)](n[t(459)],c,t(484)+e)}[Ce(399)](e,t,n,r){const i=Ce,o=this[i(446)],a=o[i(365)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(497)](e=>e[i(369)][i(506)]);1===u[i(506)]?this[i(485)]({command:e,commands:u[0][i(369)],parentMenuView:t,onExecute:r})[i(523)](e=>c[i(360)][i(454)](e)):u[i(523)](({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(485)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(423)][d(525)]({label:o||n}),h[d(367)](d(429)).to(t),f[d(360)][d(491)](p),h[d(370)][d(366)][d(454)](f),l[d(366)][d(454)](h),c[d(360)][d(454)](l)}),t[i(370)][i(366)][i(454)](c)}[Ce(485)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Ce,o=this[i(446)],a=o[i(365)];return Ue(o,t)[i(526)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(525)]({label:t[o(518)]}),u[o(367)](o(429)).to(n),u.on(o(429),()=>r(t.id)),u[o(496)](o(376)).to(e,o(433),e=>e[o(503)](t.id)),c[o(366)][o(454)](u),c})}}function $e(e,t){const n=Ce;return void 0!==e[n(524)]&&void 0===t[n(524)]?1:void 0===e[n(524)]&&void 0!==t[n(524)]?-1:void 0!==e[n(524)]&&void 0!==t[n(524)]?e[n(524)]-t[n(524)]:0}function Ue(e,t){const n=Ce;t[n(380)]($e);const r={},s=[];for(const o of t)if(void 0!==o[n(524)]){if(o[n(524)]in r)throw new i.CKEditorError(n(378),e,{conflictingDefinitions:[o,r[o[n(524)]]]});r[o[n(524)]]=o,s[n(424)](o[n(524)],0,o)}else s[n(426)](o);return s}const Be=Fe;function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=226]})(e,t)}function je(){const e=["translate","2143801wgacEf","Improve using casual, informal language to convey a casual conversation with a real person.","Improve writing","journalism","80lhauIt","translateGerman","Improve using direct language, using only the essential information.","locale","Spanish","business","106EZbTth","filter","Translate the content to Spanish language.","Translate the content to French language.","direct","Translate","continue","Translate the content to Hindi language.","professional","90TKfzCa","45684204ZDFiRe","isOfficialPlugin","13POJotO","push","groupId","editOrReview","Business","poetic","Confident","Make longer","get","define","translatePortuguese","English","Direct","Generate from selection","legal","find","summarize","Translate the content to English language.","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Hindi","Simplify language","set","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","translateHindi","AIAssistant","Improve using compelling, optimistic language to convey confidence in the writing.","Translate the content to Arabic language.","pluginName","isPremiumPlugin","friendly","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","forEach","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Change style","Arabic","includes","4642285GXVAuF","Edit or review","requires","Improve this content by using descriptive language and inserting more information and more detailed explanations.","ai.aiAssistant.extraCommandGroups","Translate the content to Simplified Chinese language.","Change tone","casual","German","3838251USgfBk","Poetic","changeStyle","commands","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","737658ZtaAtC","Continue","ai.aiAssistant.preserveComments","Translate the content to German language.","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Legal","ai.aiAssistant.removeCommands","config","changeTone","translateFrench","Journalism","translateChinese","translateSpanish","12yPBcdd","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Professional","Portuguese","confident","improveWriting","4apdMtR","Simplified Chinese","concat","Rewrite this content as a legal professional using valid legal terminology.","Friendly","662529uNGVaJ","Summarize","3913sABBmZ","generate","translateEnglish","Make shorter","ai.aiAssistant.commands","simplifyLanguage","Improve using friendly, comforting language, to convey understanding and empathy.","French","Translate the content to Portuguese language.","Casual","translateArabic","Rewrite this content as a business professional with formal language.","makeLonger","makeShorter"];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(957917===-parseInt(t(319))/1*(-parseInt(t(230))/2)+-parseInt(t(288))/3*(-parseInt(t(312))/4)+-parseInt(t(279))/5*(parseInt(t(306))/6)+parseInt(t(317))/7+-parseInt(t(338))/8*(parseInt(t(293))/9)+parseInt(t(239))/10*(-parseInt(t(334))/11)+-parseInt(t(240))/12*(-parseInt(t(242))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class He extends e.Plugin{static get[Be(281)](){return[De,f]}static get[Be(269)](){return Be(266)}static get[Be(241)](){return!0}static get[Be(270)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(300)],r=e[t(227)];n[t(251)](t(295),!0),n[t(251)](t(323),qe(r)),n[t(251)](t(283),[]),n[t(251)](t(299),[]);let i=o(n[t(250)](t(323)),r);const s=n[t(250)](t(283)),a=n[t(250)](t(299));s[t(274)](e=>{const n=t,r=i[n(257)](t=>t[n(244)]===e[n(244)]);r?r[n(291)]=r[n(291)][n(314)](e[n(291)]):i[n(243)](e)}),i=i[t(231)](e=>!a[t(278)](e[t(244)])),i[t(274)](e=>{const n=t;e[n(291)]=e[n(291)][n(231)](e=>!a[n(278)](e.id))}),n[t(263)](t(323),i)}}function qe(e){const t=Be;return[{groupId:t(245),groupLabel:v(e,t(280)),commands:[{id:t(311),label:v(e,t(336)),prompt:t(272)},{id:t(332),label:v(e,t(322)),prompt:t(292)},{id:t(331),label:v(e,t(249)),prompt:t(282)},{id:t(324),label:v(e,t(262)),prompt:t(264)}]},{groupId:t(320),groupLabel:v(e,t(255)),commands:[{id:t(258),label:v(e,t(318)),prompt:t(297)},{id:t(236),label:v(e,t(294)),prompt:t(275)}]},{groupId:t(301),groupLabel:v(e,t(285)),commands:[{id:t(238),label:v(e,t(308)),prompt:t(273)},{id:t(286),label:v(e,t(328)),prompt:t(335)},{id:t(234),label:v(e,t(254)),prompt:t(226)},{id:t(310),label:v(e,t(248)),prompt:t(267)},{id:t(271),label:v(e,t(316)),prompt:t(325)}]},{groupId:t(290),groupLabel:v(e,t(276)),commands:[{id:t(229),label:v(e,t(246)),prompt:t(330)},{id:t(256),label:v(e,t(298)),prompt:t(315)},{id:t(337),label:v(e,t(303)),prompt:t(307)},{id:t(247),label:v(e,t(289)),prompt:t(260)}]},{groupId:t(333),groupLabel:v(e,t(235)),commands:[{id:t(321),label:v(e,t(253)),prompt:t(259)},{id:t(305),label:v(e,t(228)),prompt:t(232)},{id:t(252),label:v(e,t(309)),prompt:t(327)},{id:t(339),label:v(e,t(287)),prompt:t(296)},{id:t(302),label:v(e,t(326)),prompt:t(233)},{id:t(304),label:v(e,t(313)),prompt:t(284)},{id:t(265),label:v(e,t(261)),prompt:t(237)},{id:t(329),label:v(e,t(277)),prompt:t(268)}]}]}const Ve=ze;function ze(e,t){const n=Ge();return(ze=function(e,t){return n[e-=323]})(e,t)}function Ge(){const e=["928xYUZlw","signal","3615rEEUNV","aitextadapter-send-request-failed","_prepareRequestHeaders","1219182tpdtUF","textAdapter","plugins","sendRequest","makeRequest","9585blXuEf","resolve","AbortError","5GVDdzn","4882740ITqqbd","253268inNoZp","aborted","get","188635jgNzrr","application/json","abortController","catch","AI_ERROR_GET_PARAMETERS","object","editor","assign","_prepareRequestParameters","init","locale","name","reject","error","1414168aSrMKc","AI_ERROR_GET_HEADERS","requires","abort","406dVYtMF"];return(Ge=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(133006===parseInt(t(355))/1+parseInt(t(336))/2*(parseInt(t(339))/3)+-parseInt(t(352))/4*(-parseInt(t(350))/5)+parseInt(t(342))/6+-parseInt(t(332))/7+parseInt(t(337))/8*(parseInt(t(347))/9)+-parseInt(t(351))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[Ve(357)];static get[Ve(334)](){return[g]}constructor(e){const t=Ve;super(e),this[t(357)]=new AbortController}[Ve(327)](){const e=Ve;this[e(324)][e(344)][e(354)](g)[e(343)]=this}[Ve(335)](){const e=Ve;this[e(357)][e(338)][e(353)]||(this[e(357)][e(335)](),this[e(357)]=new AbortController)}async[Ve(346)](e){const t=Ve;return this[t(345)](e)[t(358)](e=>{const n=t;if(e instanceof b)return Promise[n(330)](e);if(n(349)==e[n(329)])return Promise[n(348)]();throw console[n(331)](e),new i.CKEditorError(n(340),null)})}async[Ve(341)](e,t){const n=Ve,r=this[n(324)][n(328)],i={"Content-Type":n(356)};if(n(323)==typeof e)Object[n(325)](i,e);else if(e)try{const r=await e(t);Object[n(325)](i,r)}catch{return Promise[n(330)](new b(v(r,n(333))))}return i}async[Ve(326)](e,t){const n=Ve,r=this[n(324)][n(328)];if(n(323)==typeof e)return e;try{return await e(t)}catch{return Promise[n(330)](new b(v(r,n(359))))}}}const Ke=Qe;function Qe(e,t){const n=Ye();return(Qe=function(e,t){return n[e-=302]})(e,t)}function Ye(){const e=["12XLiCiz","user","2156904leucpg","map","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.","248lGqRbv","POST","length","reject","define","stringify","text","_prepareRequestParameters","stream","split","Instruction:\n","266751fTPsVG","json","filter","ai.openAI.apiUrl","decode","resolve","pluginName","_prepareRequestHeaders","getReader","_readStaticResponse","470MdebZW","5222214kiunJi","AI_ERROR_CONTEXT_LENGTH","AI_ERROR_MODERATION","121957YYmjBJ","_apiUrl","data: ","editor","_isBufferIncomplete","5788279HFKmVv","replace","ai.openAI.requestParameters","prepareMessages","1571652sfbisL","\nYou must keep the text formatting.\n\nContent:\n","system","ai.openAI.requestHeaders","OpenAITextAdapter","signal","690078plBrxz","get","body","https://api.openai.com/v1/chat/completions","choices","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.","[DONE]","abortController","content","Moderation","_readStreamableResponse","locale","gpt-4o","delta","includes","sendRequest","message","join","context_length_exceeded","_requestHeaders","read","config","_cleanUpData","5mRCMRW","parse","_requestParameters"];return(Ye=function(){return e})()}!function(e){const t=Qe,n=e();for(;;)try{if(788922===-parseInt(t(326))/1+-parseInt(t(332))/2*(-parseInt(t(358))/3)+parseInt(t(360))/4+parseInt(t(355))/5*(parseInt(t(314))/6)+-parseInt(t(322))/7+-parseInt(t(363))/8*(-parseInt(t(303))/9)+parseInt(t(313))/10*(-parseInt(t(317))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ye);class Je extends We{[Ke(318)];[Ke(351)];[Ke(357)];static get[Ke(309)](){return Ke(330)}constructor(e){const t=Ke;super(e),e[t(353)][t(367)](t(306),t(335)),e[t(353)][t(333)](t(324))||e[t(353)][t(367)](t(324),{model:t(344),temperature:1,top_p:1,stream:!0}),this[t(318)]=e[t(353)][t(333)](t(306)),this[t(351)]=e[t(353)][t(333)](t(329))||{},this[t(357)]=e[t(353)][t(333)](t(324))}async[Ke(347)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(320)][i(343)],o=await this[i(325)](e,t,r),a=await this[i(310)](this[i(351)],r),c=await this[i(370)](this[i(357)],r),u={messages:o,...c},d={method:i(364),headers:a,body:JSON[i(368)](u),signal:this[i(339)][i(331)]},l=await fetch(this[i(318)],d);if(l.ok)return c[i(371)]?await this[i(342)](l,n):await this[i(312)](l,n),Promise[i(308)]();{const e=await l[i(369)]();return e[i(346)](i(350))?Promise[i(366)](new b(v(s,i(315)))):e[i(346)](i(341))?Promise[i(366)](new b(v(s,i(316)))):Promise[i(366)](new Error(e))}}async[Ke(325)](e,t,n){const r=Ke;let i,s;return t?(i=r(362),s=r(302)+e+r(327)+t):(i=r(337),s=e),[{role:r(328),content:i},{role:r(359),content:s}]}async[Ke(342)](e,t){const n=Ke,r=e[n(334)][n(311)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(352)](),d=s+i[n(307)](u);let l="";c=e;try{l=this[n(354)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(321)](o)||o&&(a+=o,o="",t(a))}return Promise[n(308)]()}async[Ke(312)](e,t){const n=Ke;return t((await e[n(304)]())[n(336)][0][n(348)][n(340)]),Promise[n(308)]()}[Ke(321)](e){const t=Ke,n=e[t(372)]("<")[t(365)]!==e[t(372)](">")[t(365)],r=e[t(365)]<30;return n&&r}[Ke(354)](e){const t=Ke;return e[t(372)](/\n(?![^{]*\})/g)[t(361)](e=>e[t(323)](t(319),""))[t(305)](e=>e&&e[t(365)]>0&&t(338)!==e)[t(361)](e=>{const n=t,{choices:r}=JSON[n(356)](e);if(r[0]?.[n(345)]?.[n(340)])return r[0][n(345)][n(340)]})[t(305)](e=>e)[t(349)]("")}}var Xe,Ze,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),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=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),bt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!bt(e))return!1;return!0},wt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:bt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Et(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):It[e](...r)},Mt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Mt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Ct=(e,t)=>{if(Array.isArray(e))return e.map(e=>Ct(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Ct(r,t)}),{}),Nt=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},Lt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,o)},...null!=c&&{properties:Ot(c,o)},url:Nt(a,o)}},Dt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},$t=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Lt(n,t);if(e)return e}else if("error"===n.type)Dt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=$t(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Bt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Bt(t))return!1;return!0}return!!bt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Ft=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Bt,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}=Ft;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}wt.aws=Ht;const Vt=/\d{12}\.ddb/;const zt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Qt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Yt)||[],a=(await e.defaultUserAgentProvider()).map(Yt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Vt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Yt)||[],d=await e.userAgentAppId();d&&a.push(Yt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Gt]=s[Gt]?`${s[zt]} ${h}`:h),s[zt]=l):s[Gt]=l,t({...r,request:i})},Yt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Jt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Xt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Xt||(Xt={}));const Zt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Zt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},sn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class on{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Zt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||an)(i));return(o.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),bn=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},wn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await wn(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),bn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Zt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),xn)}}}const Mn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Mn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Cn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Nn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Ln=[500,502,503,504],Dn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],$n=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Bn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Nn.includes(e.name)||Dn.includes(e?.code||"")||$n.includes(e?.code||"")||Ln.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Bn(e.cause,t+1);class Fn{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=>Fn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Fn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",Vn="amz-sdk-request",zn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return zn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,zn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Fn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qn;const Yn=new Uint8Array(16);function Jn(){if(!Qn&&(Qn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qn(Yn)}const Xn=[];for(let e=0;e<256;++e)Xn.push((e+256).toString(16).slice(1));function Zn(e,t=0){return Xn[e[t+0]]+Xn[e[t+1]]+Xn[e[t+2]]+Xn[e[t+3]]+"-"+Xn[e[t+4]]+Xn[e[t+5]]+"-"+Xn[e[t+6]]+Xn[e[t+7]]+"-"+Xn[e[t+8]]+Xn[e[t+9]]+"-"+Xn[e[t+10]]+Xn[e[t+11]]+Xn[e[t+12]]+Xn[e[t+13]]+Xn[e[t+14]]+Xn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Jn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Zn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>sr[t.step]-sr[e.step]||or[t.priority||"normal"]-or[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=nr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},sr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},or={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function br(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const wr={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===wr.supported&&(wr.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),wr.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),br(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)},xr=e=>"function"==typeof e?e():e;class Rr{constructor(e,t){this.name=e,this.traits=t}}class Mr extends Rr{constructor(e,t,n){super(e,t),this.name=e,this.traits=t,this.valueSchema=n,this.symbol=Mr.symbol}static[Symbol.hasInstance](e){const t=Mr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Mr.symbol}return t}}Mr.symbol=Symbol.for("@smithy/core/schema::ListSchema");class Pr extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.keySchema=n,this.valueSchema=r,this.symbol=Pr.symbol}static[Symbol.hasInstance](e){const t=Pr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Pr.symbol}return t}}Pr.symbol=Symbol.for("@smithy/core/schema::MapSchema");const Tr={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class Cr extends Rr{constructor(e,t,n){super(e,n),this.name=e,this.schemaRef=t,this.traits=n,this.symbol=Cr.symbol}static[Symbol.hasInstance](e){const t=Cr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Cr.symbol}return t}}Cr.symbol=Symbol.for("@smithy/core/schema::SimpleSchema");class Or extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.memberNames=n,this.memberList=r,this.symbol=Or.symbol,this.members={};for(let e=0;e<n.length;++e)this.members[n[e]]=Array.isArray(r[e])?r[e]:[r[e],0]}static[Symbol.hasInstance](e){const t=Or.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Or.symbol}return t}}Or.symbol=Symbol.for("@smithy/core/schema::StructureSchema");class Nr{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Nr.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=xr(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,Nr.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Nr)return this.name=i.name,this.traits=i.traits,this._isMemberSchema=i._isMemberSchema,this.schema=i.schema,this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.ref=i.ref,void(this.memberName=t??i.memberName);if(this.schema=xr(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=("object"==typeof this.schema?this.schema?.name:void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(!0)} must initialize with memberName argument.`)}static[Symbol.hasInstance](e){const t=Nr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Nr.symbol}return t}static of(e,t){return e instanceof Nr?e:new Nr(e,t)}static translateTraits(e){if("object"==typeof e)return e;const t={};return 1&~(e|=0)||(t.httpLabel=1),1==(e>>1&1)&&(t.idempotent=1),1==(e>>2&1)&&(t.idempotencyToken=1),1==(e>>3&1)&&(t.sensitive=1),1==(e>>4&1)&&(t.httpPayload=1),1==(e>>5&1)&&(t.httpResponseCode=1),1==(e>>6&1)&&(t.httpQueryParams=1),t}static memberFrom(e,t){return e instanceof Nr?(e.memberName=t,e._isMemberSchema=!0,e):new Nr(e,t)}getSchema(){return this.schema instanceof Nr?this.schema=this.schema.getSchema():this.schema instanceof Cr?xr(this.schema.schemaRef):xr(this.schema)}getName(e=!1){return!e&&this.name&&this.name.includes("#")?this.name.split("#")[1]:this.name||void 0}getMemberName(){if(!this.isMemberSchema())throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(!0)}`);return this.memberName}isMemberSchema(){return this._isMemberSchema}isUnitSchema(){return"unit"===this.getSchema()}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=Tr.LIST_MODIFIER&&e<Tr.MAP_MODIFIER:e instanceof Mr}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Tr.MAP_MODIFIER&&e<=255:e instanceof Pr}isDocumentSchema(){return this.getSchema()===Tr.DOCUMENT}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Or}isBlobSchema(){return this.getSchema()===Tr.BLOB||this.getSchema()===Tr.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Tr.TIMESTAMP_DEFAULT&&e<=Tr.TIMESTAMP_EPOCH_SECONDS}isStringSchema(){return this.getSchema()===Tr.STRING}isBooleanSchema(){return this.getSchema()===Tr.BOOLEAN}isNumericSchema(){return this.getSchema()===Tr.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Tr.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Tr.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Tr.STREAMING_BLOB}isIdempotencyToken(){return"number"==typeof this.traits?!(4&~this.traits):"object"==typeof this.traits&&!!this.traits.idempotencyToken}getMergedTraits(){return this.normalizedTraits||(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()}),this.normalizedTraits}getMemberTraits(){return Nr.translateTraits(this.memberTraits)}getOwnTraits(){return Nr.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?Nr.memberFrom([63&e,0],"key"):Nr.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return Nr.memberFrom([63&e,0],"value");if(this.isListSchema())return Nr.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return Nr.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return Nr.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return e in this.getSchema().members}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!(e in t.members))throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a member with name=${e}.`);return Nr.memberFrom(t.members[e],e)}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have members.`)}getMemberSchemas(){const{schema:e}=this,t=e;if(!t||"object"!=typeof t)return{};if("members"in t){const e={};for(const n of t.memberNames)e[n]=this.getMemberSchema(n);return e}return{}}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],Nr.memberFrom([e.memberList[t],0],e.memberNames[t])]}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Tr).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Tr.MAP_MODIFIER:return`${r}Map`;case Tr.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Nr.symbol=Symbol.for("@smithy/core/schema::NormalizedSchema");const Lr="***SensitiveInformation***";function Dr(e,t){if(null==t)return t;const n=Nr.of(e);if(n.getMergedTraits().sensitive)return Lr;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=Dr(i,e[t]));return r}return t}class $r{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Ur}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Ur{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=void 0,this._outputFilterSensitiveLog=void 0,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends $r{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(e._operationSchema?Dr.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?Dr.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Br="***SensitiveInformation***";class Fr 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 Fr.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===Fr?Fr.isInstance(e):!!Fr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const jr=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Hr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qr=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Vr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),zr=e=>null!=e;class Gr{trace(){}debug(){}info(){}warn(){}error(){}}function Wr(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,Qr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Yr(r,null,s,e):r[e]=s[e];return r}const Kr=(e,t)=>{const n={};for(const r in t)Yr(n,e,t,r);return n},Qr=(e,t,n)=>Wr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Yr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Jr,o=Xr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Jr=e=>null!=e,Xr=e=>e,Zr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),ei=e=>ti(e,32),ti=(e,t)=>{const n=Zr(e);if(void 0!==n&&ni(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ni=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ri=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return si.warn(ii(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ii=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),si={warn:console.warn},oi=e=>e?.body instanceof ReadableStream,ai=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,ci=e=>{const t={error:e,errorType:ui(e)},n=hi(e.$response);return n&&(t.retryAfterHint=n),t},ui=e=>Un(e)?"THROTTLING":Bn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Bn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",di={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},li=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!ai(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[Vn]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=ci(t);if(o=tr(t),d&&oi(u))throw(n.logger instanceof Gr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise(e=>setTimeout(e,s))}}})(e),di)}}),hi=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const fi=(pi=3e5,e=>mi(e)&&e.expiration.getTime()-Date.now()<pi);var pi;const mi=e=>void 0!==e.expiration,gi=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),yi="X-Amz-Date",bi="X-Amz-Signature",wi="X-Amz-Security-Token",vi="authorization",ki=yi.toLowerCase(),Si=[vi,ki,"date"],Ei=bi.toLowerCase(),Ai="x-amz-content-sha256",Ii=wi.toLowerCase(),_i={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},xi=/^proxy-/,Ri=/^sec-/,Mi="AWS4-HMAC-SHA256",Pi="AWS4-HMAC-SHA256-PAYLOAD",Ti="aws4_request",Ci={},Oi=[],Ni=(e,t,n)=>`${e}/${t}/${n}/${Ti}`,Li=(e,t,n)=>{const r=new e(t);return r.update(gi(n)),r.digest()},Di=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in _i||t?.has(s)||xi.test(s)||Ri.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},$i=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===Ai)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(gi(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ui{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=lr(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ji.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Fi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Bi;!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"}(Bi||(Bi={}));const Fi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ji{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Hi(t),new ji(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Hi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Hi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const qi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))Si.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Vi=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class zi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Ei)continue;const i=mr(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${mr(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(gi(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Vi(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Gi extends zi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s}),this.headerFormatter=new Ui}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ni(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(qi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[wi]=d.sessionToken),m.query["X-Amz-Algorithm"]=Mi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[yi]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Di(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[bi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await $i(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ni(a,o,s??this.service),d=await $i({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[Pi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(gi(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=qi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ni(d,a,s??this.service);c.headers[ki]=u,o.sessionToken&&(c.headers[Ii]=o.sessionToken);const h=await $i(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(Ai,c.headers)&&this.applyChecksum&&(c.headers[Ai]=h);const f=Di(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[vi]=`${Mi} 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,Mi),s=new this.sha256(await n);return s.update(gi(i)),Ir(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Ir(await Li(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Ci)return Ci[s];for(Oi.push(s);Oi.length>50;)delete Ci[Oi.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Ti])o=await Li(e,o,t);return Ci[s]=o})(this.sha256,e,n,t,r||this.service)}}const Wi=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,fi,mi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const Ki=async(e,t,n)=>({operation:Zt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Qi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Yi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Ji="3.823.0";var Xi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Zi(e){return e instanceof Uint8Array?e:"string"==typeof e?Xi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function es(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ts={name:"SHA-256"},ns={name:"HMAC",hash:ts},rs=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const is={};function ss(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:is}var os=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!es(e)){var t=Zi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return ss().crypto.subtle.sign(ns,t,e.toHash).then(function(e){return new Uint8Array(e)})}):es(this.toHash)?Promise.resolve(rs):Promise.resolve().then(function(){return ss().crypto.subtle.digest(ts,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){ss().crypto.subtle.importKey("raw",Zi(e.secret),ns,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function as(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}function cs(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function us(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var ds=64,ls=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),hs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],fs=Math.pow(2,53)-1,ps=function(){function e(){this.state=Int32Array.from(hs),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>fs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ds&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%ds>=56){for(var r=this.bufferLength;r<ds;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<ds;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(ls[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),ms=function(){function e(e){this.secret=e,this.hash=new ps,this.reset()}return e.prototype.update=function(e){if(!es(e)&&!this.error)try{this.hash.update(Zi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return as(this,void 0,void 0,function(){return cs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ps,this.secret){this.outer=new ps;var e=function(e){var t=Zi(e);if(t.byteLength>ds){var n=new ps;n.update(t),t=n.digest()}var r=new Uint8Array(ds);return r.set(t),r}(this.secret),t=new Uint8Array(ds);t.set(e);for(var n=0;n<ds;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var gs=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ys(e){return e&&gs.every(function(t){return"function"==typeof e[t]})}var bs=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&ys(e.crypto.subtle)}(ss())?this.hash=new ms(e):this.hash=new os(e)}return e.prototype.update=function(e,t){this.hash.update(Zi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ws=n(369),vs=n.n(ws);const ks=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};!function(){function e(){this.crc32=new Es}e.prototype.update=function(e){es(e)||this.crc32.update(Zi(e))},e.prototype.digest=function(){return as(this,void 0,void 0,function(){return cs(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new Es}}();var Ss,Es=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=us(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^As[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),As=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class Is{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&_s(t),new Is(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&_s(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function _s(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class xs{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Is.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!$s.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Rs,value:!0};break;case 1:t[i]={type:Rs,value:!1};break;case 2:t[i]={type:Ms,value:e.getInt8(n++)};break;case 3:t[i]={type:Ps,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Ts,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Cs,value:new Is(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Os,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:Ns,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Ls,value:new Date(new Is(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:Ds,value:`${Ir(o.subarray(0,4))}-${Ir(o.subarray(4,6))}-${Ir(o.subarray(6,8))}-${Ir(o.subarray(8,10))}-${Ir(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ss||(Ss={}));const Rs="boolean",Ms="byte",Ps="short",Ts="integer",Cs="long",Os="binary",Ns="string",Ls="timestamp",Ds="uuid",$s=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Us{constructor(e,t){this.headerMarshaller=new xs(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new Es;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new Es).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Bs{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 Fs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class js{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Hs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function qs(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class Vs{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Us(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new js({messageStream:new Bs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:qs(t,this.utfEncoder)})}serialize(e,t){return new Fs({messageStream:new Hs({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class zs{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Vs({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Gs(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const Gs=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Ws=e=>new zs(e),Ks="function"==typeof TextEncoder?new TextEncoder:null,Qs=e=>{if("string"==typeof e){if(Ks)return Ks.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Ys=e=>new Date(Date.now()+e),Js=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Xs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ys(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Zs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class eo{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=Zs("context",e.context),n=Zs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Zs("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:Ys(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Js(t.$response);if(n){const r=Zs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Xs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Js(e);if(n){const e=Zs("config",t.config);e.systemClockOffset=Xs(n,e.systemClockOffset)}}}const to="required",no="fn",ro="argv",io="ref",so=!0,oo="isSet",ao="booleanEquals",co="error",uo="endpoint",lo="tree",ho="PartitionResult",fo={[to]:!1,type:"String"},po={[to]:!0,default:!1,type:"Boolean"},mo={[io]:"Endpoint"},go={[no]:ao,[ro]:[{[io]:"UseFIPS"},!0]},yo={[no]:ao,[ro]:[{[io]:"UseDualStack"},!0]},bo={},wo={[no]:"getAttr",[ro]:[{[io]:ho},"supportsFIPS"]},vo={[no]:ao,[ro]:[!0,{[no]:"getAttr",[ro]:[{[io]:ho},"supportsDualStack"]}]},ko=[go],So=[yo],Eo=[{[io]:"Region"}],Ao={version:"1.0",parameters:{Region:fo,UseDualStack:po,UseFIPS:po,Endpoint:fo},rules:[{conditions:[{[no]:oo,[ro]:[mo]}],rules:[{conditions:ko,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:co},{rules:[{conditions:So,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:co},{endpoint:{url:mo,properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{rules:[{conditions:[{[no]:oo,[ro]:Eo}],rules:[{conditions:[{[no]:"aws.partition",[ro]:Eo,assign:ho}],rules:[{conditions:[go,yo],rules:[{conditions:[{[no]:ao,[ro]:[so,wo]},vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:co}],type:lo},{conditions:ko,rules:[{conditions:[{[no]:ao,[ro]:[wo,so]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS is enabled but this partition does not support FIPS",type:co}],type:lo},{conditions:So,rules:[{conditions:[vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"DualStack is enabled but this partition does not support DualStack",type:co}],type:lo},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo}],type:lo},{error:"Invalid Configuration: Missing Region",type:co}],type:lo}]},Io=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),_o=(e,t={})=>Io.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(Ao,{endpointParams:e,logger:t.logger}));wt.aws=Ht;Error;const xo=["in-region","cross-region","mobile","standard","legacy"],Ro=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Mo=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Ro()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${xo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(qr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_o,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new eo}],logger:e?.logger??new Gr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Qs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ks({serviceId:r.serviceId,clientVersion:Ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Ws,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Cn),sha256:e?.sha256??bs,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},Po=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Vr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class To extends ar{config;constructor(...[e]){const t=Mo(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Sn(await en(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=Wi(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Po(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Qt(l),Jt)}})),this.middlewareStack.use(li(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),sn)}}))(this.config,{httpAuthSchemeParametersProvider:Ki,identityProviderConfigProvider:async e=>new on({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Co extends Fr{constructor(e){super(e),Object.setPrototypeOf(this,Co.prototype)}}class Oo extends Co{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}var No;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));class Lo extends Co{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Lo.prototype)}}class Do extends Co{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,Do.prototype)}}class $o extends Co{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,$o.prototype)}}class Uo extends Co{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Uo.prototype)}}class Bo extends Co{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Bo.prototype)}}class Fo extends Co{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Fo.prototype)}}class jo extends Co{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,jo.prototype)}}var Ho;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));var qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={}));var Vo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Vo||(Vo={}));var zo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(zo||(zo={}));var Go;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Go||(Go={}));var Wo,Ko;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Wo||(Wo={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Ko||(Ko={}));var Qo,Yo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Qo||(Qo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Yo||(Yo={}));var Jo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));var Xo,Zo,ea,ta,na,ra;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Xo||(Xo={})),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])}(Zo||(Zo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(ta||(ta={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={}));class ia extends Co{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ia.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class sa extends Co{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,sa.prototype)}}class oa extends Co{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,oa.prototype)}}var aa,ca,ua,da;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(aa||(aa={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(ca||(ca={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));class la extends Co{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,la.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(da||(da={}));var ha,fa,pa;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(ha||(ha={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(fa||(fa={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(pa||(pa={}));const ma=e=>({...e,...e.body&&{body:Br}}),ga=e=>({...e,...e.body&&{body:Br}}),ya=e=>({...e,...e.body&&{body:Br}}),ba=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),wa=(e,t)=>((e,t)=>_r(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),va=async(e,t)=>{const n=await wa(e,t);return n.message=n.message??n.Message,n};function ka(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Sa(e,t){return new Ea(e,t)}class Ea{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>ka(e)).join("/"):ka(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const Aa=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[Za]:e[Za],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},Ia=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[oc]:e[Za],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},_a=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Xa(e),[ec]:[,e.headers[tc]],[ic]:[,e.headers[dc]]}),r=await _r(e.body,t);return n.body=r,n},xa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Xa(e),[ec]:[,e.headers[ac]],[ic]:[,e.headers[dc]]}),r=e.body;return n.body=qa(r,t),n},Ra=async(e,t)=>{const n={...e,body:await va(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await Ta(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Oa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ua(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ba(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ja(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ha(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Na(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await La(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await $a(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Fa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await Da(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Ca(n,t);default:const i=n.body;return Ma({output:e,parsedBody:i,errorCode:r})}},Ma=(Pa=Co,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Hr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw jr(o,t)})({output:e,parsedBody:t,exceptionCtor:Pa,errorCode:n})});var Pa;const Ta=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Oo({$metadata:Xa(e),...n});return jr(s,e.body)},Ca=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Uo({$metadata:Xa(e),...n});return jr(s,e.body)},Oa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Lo({$metadata:Xa(e),...n});return jr(s,e.body)},Na=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalStatusCode:ei,resourceName:ri});Object.assign(n,i);const s=new ia({$metadata:Xa(e),...n});return jr(s,e.body)},La=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new sa({$metadata:Xa(e),...n});return jr(s,e.body)},Da=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalMessage:ri,originalStatusCode:ei});Object.assign(n,i);const s=new la({$metadata:Xa(e),...n});return jr(s,e.body)},$a=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new oa({$metadata:Xa(e),...n});return jr(s,e.body)},Ua=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Bo({$metadata:Xa(e),...n});return jr(s,e.body)},Ba=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Fo({$metadata:Xa(e),...n});return jr(s,e.body)},Fa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new jo({$metadata:Xa(e),...n});return jr(s,e.body)},ja=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Do({$metadata:Xa(e),...n});return jr(s,e.body)},Ha=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new $o({$metadata:Xa(e),...n});return jr(s,e.body)},qa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Wa(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Va(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await za(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ya(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Qa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Ga(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ka(n.serviceUnavailableException,t)}:{$unknown:e}),Va=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Oa(n,t)},za=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Da(n,t)},Ga=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return $a(n,t)},Wa=async(e,t)=>{const n={},r=await wa(e.body,t);return Object.assign(n,Ja(r,t)),n},Ka=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Fa(n,t)},Qa=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return ja(n,t)},Ya=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Ha(n,t)},Ja=(e,t)=>Kr(e,{bytes:t.base64Decoder}),Xa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Za="accept",ec="contentType",tc="content-type",nc="guardrailIdentifier",rc="guardrailVersion",ic="performanceConfigLatency",sc="trace",oc="x-amzn-bedrock-accept",ac="x-amzn-bedrock-content-type",cc="x-amzn-bedrock-guardrailidentifier",uc="x-amzn-bedrock-guardrailversion",dc="x-amzn-bedrock-performanceconfig-latency",lc="x-amzn-bedrock-trace";class hc extends($r.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ya,ba).ser(Ia).de(xa).build()){}class fc extends($r.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(ma,ga).ser(Aa).de(_a).build()){}const pc=gc;function mc(){const e=["parse","_processAWSRequest","_requestParameters","1390728WkAeLU","bytes","json","_requestHeaders","2709FkELYK","utf-8","stringify","\n\nAssistant:","\n[/INST]","5822240IgrbXh","_prepareRequestHeaders","pluginName","ai21.j2","_readStaticResponse","_getGeneratedText","1tLnkXn","define","getModelFamily","anthropic.claude","AI_ERROR_UNSUPPORTED_MODEL","_prepareRequestParameters","10683937MSnZMq","resolve","abortController","cohere.command","_bedrockClientConfig","getReader","get","_readAsyncIterableResponse","test","AWSTextAdapter","\nYou must keep the text formatting.\n\nContent:\n","generations","config","ai.aws.requestParameters","locale","generation","_readStreamableResponse","chunk","data","2754176TbBRmv","sendRequest","map","filter","signal","18luvVcr","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.","completion","anthropic.claude-v2","\n<</SYS>>\n[INST]\n","preparePrompt","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.","text","bedrock-2023-05-31","POST","split","editor","decode","body","_apiUrl","application/json","_processProxyRequest","1394695DHTwdT","ai.aws.bedrockClientConfig","read","ai.aws.requestHeaders","12qsuBBf","Instruction:\n","12663610rhPunr","completions","send","meta.llama","<<SYS>>\n","Human:\n","21192rxlDKk","ai.aws.apiUrl","join","length"];return(mc=function(){return e})()}function gc(e,t){const n=mc();return(gc=function(e,t){return n[e-=103]})(e,t)}!function(e){const t=gc,n=e();for(;;)try{if(850115===parseInt(t(160))/1*(parseInt(t(104))/2)+parseInt(t(130))/3*(-parseInt(t(145))/4)+parseInt(t(126))/5+-parseInt(t(138))/6*(-parseInt(t(149))/7)+-parseInt(t(154))/8*(-parseInt(t(109))/9)+-parseInt(t(132))/10+-parseInt(t(166))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mc);class yc extends We{[pc(123)];[pc(148)];[pc(170)];[pc(144)];static get[pc(156)](){return pc(175)}constructor(e){const t=pc;super(e),e[t(178)][t(172)](t(179))||e[t(178)][t(161)](t(179),{model:t(112),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(117),stream:!0}),this[t(123)]=e[t(178)][t(172)](t(139)),this[t(170)]=e[t(178)][t(172)](t(127)),this[t(148)]=e[t(178)][t(172)](t(129)),this[t(144)]=e[t(178)][t(172)](t(179))}async[pc(105)]({query:e,context:t,onData:n,actionId:r}){const i=pc,{model:s,stream:o,...a}=await this[i(165)](this[i(144)],r),c={prompt:await this[i(114)](e,t,s,r),...a};this[i(123)]?await this[i(125)](c,s,o,n,r):await this[i(143)](c,s,o,n)}async[pc(114)](e,t,n,r){const i=pc;let s,o;return t?(s=i(110),o=i(131)+e+i(176)+t):(s=i(115),o=e),i(135)==this[i(162)](n)?i(136)+s+i(113)+o+i(153):i(137)+s+"\n"+o+i(152)}[pc(162)](e){const t=pc;if(/^anthropic\.claude/[t(174)](e))return t(163);if(/^ai21\.j2/[t(174)](e))return t(157);if(/^cohere\.command/[t(174)](e))return t(169);if(/^meta\.llama/[t(174)](e))return t(135);throw new b(v(this[t(120)][t(180)],t(164),e))}async[pc(125)](e,t,n,r,i){const s=pc,o={method:s(118),headers:await this[s(155)](this[s(148)],i),body:JSON[s(151)]({...e,model:t,stream:n}),signal:this[s(168)][s(108)]},a=await fetch(this[s(123)],o);n?await this[s(182)](a,t,r):await this[s(158)](a,t,r)}async[pc(143)](e,t,n,r){const i=pc,s=new To(this[i(170)]),o={body:JSON[i(151)](e),contentType:i(124),accept:i(124),modelId:t};let a;if(n){const e=new hc(o);a=await s[i(134)](e,{abortSignal:this[i(168)][i(108)]}),await this[i(173)](a,t,r)}else{const e=new fc(o);a=await s[i(134)](e,{abortSignal:this[i(168)][i(108)]}),await this[i(158)](a,t,r)}}async[pc(173)](e,t,n){const r=pc,i=e[r(122)],s=new TextDecoder(r(150));let o="";for await(const e of i)if(e[r(183)]){const i=s[r(121)](e[r(183)][r(146)]),a=JSON[r(142)](i);o+=this[r(159)](a,t),n(o)}return Promise[r(167)]()}async[pc(182)](e,t,n){const r=pc,i=e[r(122)],s=new TextDecoder(r(150)),o=i[r(171)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(128)]();if(u=e,u)break;const d=(a+s[r(121)](i))[r(119)]("\n")[r(106)](e=>{const t=r;try{return a="",JSON[t(142)](e)}catch{return a=e,null}})[r(107)](e=>null!==e);d[r(141)]&&(c+=d[r(106)](e=>this[r(159)](e,t))[r(140)](""),n(c))}return Promise[r(167)]()}async[pc(158)](e,t,n){const r=pc;let i;return i=e instanceof Response?await e[r(147)]():JSON[r(142)](new TextDecoder(r(150))[r(121)](e[r(122)])),n(this[r(159)](i,t)),Promise[r(167)]()}[pc(159)](e,t){const n=pc;switch(this[n(162)](t)){case n(163):return e[n(111)];case n(157):return e[n(133)][0][n(103)][n(116)];case n(169):return e[n(177)][0][n(116)];case n(135):return e[n(181)]}}}function bc(e,t){var n=wc();return(bc=function(e,t){return n[e-=485]})(e,t)}function wc(){var e=["1606395ymtPAU","126xoyBPc","772849jQVToH","134877nxtmRo","437404MQRjGH","112832VgXeSh","415096LdDxFf","6adsayl","465189QzbbDG"];return(wc=function(){return e})()}!function(e){for(var t=bc,n=e();;)try{if(160975===parseInt(t(493))/1+parseInt(t(486))/2+parseInt(t(489))/3+parseInt(t(485))/4+parseInt(t(490))/5+parseInt(t(488))/6*(parseInt(t(492))/7)+-parseInt(t(487))/8*(parseInt(t(491))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|
|
5
|
+
*/(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>y,AIAssistant:()=>He,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>cc,OpenAITextAdapter:()=>Ye,ShowAIAssistantCommand:()=>S,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=d;function d(e,t){const n=p();return(d=function(e,t){return n[e-=261]})(e,t)}!function(e){const t=d,n=e();for(;;)try{if(998700===parseInt(t(321))/1+-parseInt(t(290))/2*(-parseInt(t(297))/3)+-parseInt(t(331))/4+parseInt(t(371))/5*(parseInt(t(348))/6)+-parseInt(t(275))/7*(parseInt(t(356))/8)+parseInt(t(323))/9+parseInt(t(314))/10*(-parseInt(t(293))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(p);const l=globalThis[u(346)],h=u(368);class f extends e.Plugin{static get[u(289)](){return u(265)}static get[u(313)](){return!0}static get[u(274)](){return!0}[u(359)](){const e=u,{editor:t}=this,n=[e(340)];t[e(363)][e(344)](e(280))&&n[e(352)](e(335)),t[e(357)][e(303)](e(262))[e(349)]({model:h,view:{classes:n,priority:12}}),t[e(357)][e(303)](e(262))[e(351)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(360)][r(366)])return null;const i=n[r(355)](r(278));return n[r(296)]([r(340),r(310)],i),i}})}[u(270)](){!async function(e){const t=g([110,65,55,121,117,114,103,79,72,98,90,118,68,112,108,82,107,74,115,99,100,73,67,109,56,54,111,80,87,120,57,50,102,49,113,70,48,76,97,83,88,51,78,71,119,84,77,75,52,106,86,116,89,85,66,81,105,53,122,104,101,69]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],s=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),o={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),s[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(e)):null}function l(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=d;return e[t(367)](e=>String[t(273)](e))[t(364)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([110]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await s,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(o())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(s(),e),()=>{const e=o();return null==e?(s(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function o(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),s[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function o(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,s,o]=r;return t(i),await n(i,s,o),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),o,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,s)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1757376e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=d,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(298)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(333)](){const e=u,t=this[e(336)][e(294)];t[e(339)](n=>{const r=e,i=t[r(358)][r(271)][r(311)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(354)][r(309)](i))n[r(305)](i,{range:e});else if(e[r(276)][r(370)]){const s=e[r(276)][r(324)](({item:e})=>!t[r(308)][r(330)](e),{boundaries:e});n[r(287)](i,{usingOperation:!1,affectsData:!1,range:n[r(325)](s,e[r(317)])})}else n[r(287)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(337)](){const e=u,t=this[e(336)][e(294)],n=Array[e(304)](this[e(336)][e(294)][e(354)][e(322)](h));n[e(345)]&&t[e(339)](t=>{const r=e;n[r(288)](e=>{t[r(318)](e)})})}[u(327)](e,t){const n=u,r=this[n(338)](),i=t||r[n(316)]();this[n(336)][n(294)][n(299)](i)&&this[n(336)][n(294)][n(339)](s=>{const o=n;this[o(337)](),t||this[o(291)](s,r),this[o(361)]({insertAt:i,writer:s,html:e})})}[u(264)](e){const t=u,{model:n}=this[t(336)],r=this[t(338)]();n[t(339)](()=>{const n=t,i=this[n(295)](e,r)||this[n(302)](r);this[n(327)](e,i)})}[u(338)](){const e=u,t=this[e(336)][e(294)],n=Array[e(304)](t[e(354)][e(322)](h))[e(367)](t=>t[e(328)]());return t[e(347)](n)}[u(361)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(336)][r(263)],s=this[r(336)][r(343)][r(344)](a.ClipboardPipeline),o=new l;o[r(341)](r(285),t);const d=new ClipboardEvent(r(306),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(286)](n);const f=(t,n)=>{const i=r;n[i(272)]&&e[i(286)](n[i(272)])};s[r(267)](r(320),f,{priority:r(315)}),i[r(358)][r(332)](r(306),h),s[r(365)](r(320),f)}[u(302)](e){const t=u,{model:n}=this[t(336)],r=Array[t(304)](e[t(300)]());return r[t(345)]?n[t(369)](r[t(307)]()):e[t(261)]()}[u(295)](e,t){const n=u,{model:r,plugins:i}=this[n(336)];if(i[n(309)](n(342))){const s=i[n(344)](n(342))[n(362)](t);if(s[n(345)]){const t=this[n(353)](e),i=this[n(292)](s,t);return r[n(283)](i,0)}}return null}[u(353)](e){const t=u,n=this[t(336)][t(343)][t(344)](t(342)),r=this[t(336)][t(281)][t(319)](e),i=Array[t(304)](r[t(284)]())[t(301)](e=>e.is(t(268),t(312)));let s=0;return i[t(288)](e=>{s+=n[t(282)](e)}),s}[u(292)](e,t){const n=u,r=this[n(336)][n(343)][n(344)](n(342)),i=r[n(269)](e),s=r[n(329)](e),o=i[n(279)]+1,a=s[n(266)],c=e[0][n(350)](n(312));for(let e=0;e<t;e++)r[n(326)](c,{at:o});return c[n(277)](o)[n(277)](a)}[u(291)](e,t){const n=u,{plugins:r}=this[n(336)],{model:i}=e;r[n(309)](n(342))&&r[n(344)](n(342))[n(362)](t)[n(345)]&&i[n(334)](t)}}function p(){const e=["parse","contentInsertion","1682428fbkCeI","getMarkersGroup","11038509hplOGR","getLastMatchingPosition","createRange","insertRows","insertContent","getRange","getColumnIndexes","isContent","5040832XCoeYp","fire","showFakeVisualSelection","deleteContent","ck-ai-assistant-ui_theme","editor","hideFakeVisualSelection","_getAISelection","change","ck-fake-ai-selection","setData","TableUtils","plugins","get","length","DataTransfer","createSelection","18924UrMtCL","markerToHighlight","findAncestor","markerToElement","push","_getTableRowCountFromContent","markers","createUIElement","3179912SlmrVL","conversion","document","init","markerRange","_pasteHTMLUsingClipboard","getSelectedTableCells","config","join","off","isCollapsed","map","ai-ui","createPositionAfter","isAtEnd","2885QDDeTp","getLastPosition","editingDowncast","editing","insertContentBelow","AIAssistantEditing","first","once","element","getRowIndexes","afterInit","selection","resultRange","fromCharCode","isPremiumPlugin","7QrsAEV","start","getChild","span","last","ai.useTheme","data","getRows","createPositionAt","getChildren","text/html","setSelection","addMarker","forEach","pluginName","460YkgDtZ","_resetContentOfSelectedTableCells","_createEmptyTableRows","208164cfxdRn","model","_prepareTableInsertBelowPosition","addClass","2589HWkykq","href","canEditAt","getSelectedBlocks","filter","_getDefaultInsertBelowPosition","for","from","updateMarker","paste","pop","schema","has","ck-fake-ai-selection_collapsed","getRanges","table","isOfficialPlugin","1200mTwhqW","lowest","getFirstRange","end","removeMarker"];return(p=function(){return e})()}var m=g;function g(e,t){var n=w();return(g=function(e,t){return n[e-=487]})(e,t)}!function(e){for(var t=g,n=e();;)try{if(362376===parseInt(t(490))/1*(-parseInt(t(497))/2)+parseInt(t(492))/3+parseInt(t(488))/4+-parseInt(t(502))/5+-parseInt(t(504))/6*(parseInt(t(498))/7)+-parseInt(t(495))/8*(parseInt(t(503))/9)+parseInt(t(500))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(w);class y extends e.Plugin{static get[m(493)](){return m(489)}static get[m(505)](){return!0}static get[m(494)](){return!0}[m(499)](){var e=m;if(!this[e(487)])throw new i.CKEditorError(e(496),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(501)]=t(491)}}function w(){var e=["name","3003065dvEXKM","73602piMJNt","54762BfZCJj","isOfficialPlugin","textAdapter","2530144WsLNUu","AIAdapter","3oMKfWu","AIRequestError","1523256tyGXsn","pluginName","isPremiumPlugin","328IxofzP","aiadapter-text-adapter-not-set","234626GwzFyo","413oinnuE","afterInit","10484310ascpkA"];return(w=function(){return e})()}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=E;!function(e){const t=E,n=e();for(;;)try{if(270979===parseInt(t(470))/1*(-parseInt(t(452))/2)+parseInt(t(488))/3*(-parseInt(t(454))/4)+parseInt(t(487))/5+parseInt(t(468))/6+parseInt(t(477))/7*(parseInt(t(464))/8)+parseInt(t(489))/9*(parseInt(t(462))/10)+-parseInt(t(474))/11*(-parseInt(t(466))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class S extends e.Command{[k(469)];constructor(e,t){const n=k;super(e),this[n(469)]=t,this[n(467)](n(472),[]),this.on(n(494),(e,t,r)=>{const i=n;this[i(476)]&&(this[i(472)]=I(this[i(469)],r))}),this[n(467)](n(457),!1),this.on(n(491),(e,t,r)=>{const i=n;this[i(472)]=r?I(this[i(469)],this[i(457)]):[]})}[k(495)](){const e=k,t=this[e(481)][e(485)];this[e(457)]=function(t){const n=e,r=t[n(458)][n(490)];return r[n(473)]?0!==[...r[n(465)]()][n(480)]&&![...r[n(465)]()][0][n(475)]:!!t[n(496)](r[n(493)]())}(t);const n=t[e(458)][e(490)],r=this[e(481)][e(456)][e(497)](e(478));for(const t of n[e(459)]())for(const n of t[e(482)]())if(n.is(e(461))&&r[e(455)](n[e(486)]))return void(this[e(476)]=!1);this[e(476)]=!0}[k(479)](e="",t="",n=k(492)){const r=k;this[r(481)][r(460)][r(497)]($e)[r(484)](e,t,n)}}function E(e,t){const n=A();return(E=function(e,t){return n[e-=452]})(e,t)}function A(){const e=["config","_hasContext","document","getRanges","plugins","element","426180XSRCfQ","add","8VYzIZa","getSelectedBlocks","12jWsjLt","set","565296gYUsom","_commandDefinitions","587oaEWdr","from","enabledCommandsIds","isCollapsed","10615xIULog","isEmpty","isEnabled","3366013Xcnexy","ai.aiAssistant.disabledElements","execute","length","editor","getItems","requiresContent","showUI","model","name","50410bzMnux","1193394SxozpM","27sfUTeA","selection","change:isEnabled","custom","getFirstRange","change:_hasContext","refresh","hasContent","get","154eOKOZD","values","4BzGQkP","includes"];return(A=function(){return e})()}function I(e,t){const n=k,r=new Set;for(const i of e[n(453)]())(t||!1===i[n(483)])&&r[n(463)](i.id);return Array[n(471)](r)}const _=M;function x(){const e=["handleError","abort","domConverter","editing","previousContext","then","ELEMENT_NODE","processor","tryAgainEvent","div","set","295907TxmCZp","text/html","1790IYUdWr","mainAction","textAdapter","toView","102cnhNPa","initialContext","body","rename","344802bccNkW","viewToDom","reverse","reset","element","remove","document","previousActionId","<h1></h1>","415384vLaQbL","listenTo","ai.aiAssistant.preserveComments","nodeType","data","```html","trim","parseFromString","from","4807860DfCcmd","_handleQuery","editor","isRendered","push","90KZhOEb","length","isProcessing","updateView","view","currentContext","once","markers","destroy","serializeToString","startProcessing","_isH1TagSupportEnabled","get","clear","_sanitizeHTML","custom","112123qttXeZ","config","set:currentContext","_sanitizationContainer","finally","match","startsWith","innerHTML","substring","currentResponse","_normalizeResponseHeadings","setContentOf","htmlProcessor","render","catch","stopProcessing","_stripMarkdownSyntax","```","prompt","_parseAndNormalizeContent","stopListening","submitPrompt","previousLabel","finishProcessing","previousQuery","_domParser","12bFVgjW","message","querySelector","toModel","value","stringify","makeRequest","2729220BUYHxs","536508MrlXBW","name","endsWith","_xmlSerializer","createElement","exec","childNodes"];return(x=function(){return e})()}function M(e,t){const n=x();return(M=function(e,t){return n[e-=500]})(e,t)}!function(e){const t=M,n=e();for(;;)try{if(655997===-parseInt(t(555))/1+-parseInt(t(529))/2*(parseInt(t(565))/3)+parseInt(t(536))/4+parseInt(t(583))/5+-parseInt(t(561))/6*(-parseInt(t(537))/7)+parseInt(t(574))/8*(parseInt(t(588))/9)+parseInt(t(557))/10*(-parseInt(t(503))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const R=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(585)];[_(559)];[_(592)];[_(506)];[_(528)];[_(540)];constructor(e,t,n){const r=_;super(),this[r(585)]=e,this[r(559)]=t,this[r(506)]=document[r(541)](r(553)),this[r(528)]=new DOMParser,this[r(540)]=new XMLSerializer,this[r(592)]=n,this[r(554)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(505),(e,t,n)=>{const i=r;this[i(592)][i(533)]=this[i(501)](n)}),this[r(575)](this[r(592)],r(524),(e,t)=>{const n=r,i=this[n(593)]||this[n(562)];this[n(584)](t,i,n(502))}),this[r(575)](this[r(592)],r(552),()=>{const e=r;this[e(592)][e(521)]=this[e(525)],this[e(584)](this[e(527)],this[e(548)],this[e(572)],this[e(525)])}),this[r(575)](this[r(592)],r(518),()=>{this[r(518)]()})}[_(596)](){this[_(523)]()}async[_(591)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(592)][s(521)]=r,this[s(592)][s(558)]=i,this[s(562)]=n,t&&(this[s(592)][s(586)]?this[s(584)](t,n,e,r):this[s(592)][s(594)](s(516),()=>{this[s(584)](t,n,e,r)}))}[_(518)](){const e=_;this[e(590)]&&(this[e(590)]=!1,this[e(592)][e(526)](),this[e(559)][e(545)]())}[_(568)](){const e=_;this[e(562)]="",this[e(593)]="",this[e(512)]="",this[e(548)]="",this[e(527)]="",this[e(525)]="",this[e(572)]=void 0,this[e(592)][e(568)](),this[e(518)]()}async[_(584)](e,t,n,r){const i=_;return this[i(590)]=!0,this[i(592)][i(598)](),this[i(548)]=t,this[i(527)]=e,this[i(525)]=r||e,this[i(572)]=n,new Promise(r=>{const s=i;this[s(559)][s(535)]({query:e,context:t,onData:e=>{const t=s;this[t(512)]=e,this[t(593)]=this[t(522)](this[t(512)])},actionId:n})[s(549)](()=>{const e=s;!this[e(593)]&&this[e(512)]&&(this[e(593)]=this[e(522)](this[e(512)],!0))})[s(517)](e=>{const t=s;e instanceof b?this[t(592)][t(544)](e[t(530)]):this[t(592)][t(544)](),r()})[s(507)](()=>{this[s(518)](),r()})})}[_(522)](e,t=!1){const n=_,r=R[n(542)](e);e=r?e[n(511)](r[1][n(589)]):e[n(589)]<100&&!t?"":this[n(519)](e);const i=this[n(528)][n(581)](e,n(556));if(r){const e=Array[n(582)](i[n(563)][n(543)]);e[n(567)]();for(const t of e){if(t[n(577)]==Node[n(550)])break;t[n(570)]()}}const s=this[n(585)][n(578)][n(551)][n(560)](this[n(540)][n(597)](i[n(563)]));this[n(599)]()||this[n(513)](s);const o=this[n(585)][n(504)][n(600)](n(576)),a=this[n(585)][n(578)][n(532)](s);return o||a[n(595)][n(500)](),this[n(585)][n(578)][n(534)](a)}[_(513)](e){const t=_,n=new c.ViewUpcastWriter(this[t(585)][t(547)][t(592)][t(571)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(569))&&r[t(508)](n)&&(i[t(587)](n),"h1"==n[t(538)]&&(s=!0));if(s)for(const e of i)n[t(564)]("h"+(parseInt(e[t(538)][1])+1),e)}[_(599)](){const e=_,{data:t,editing:n}=this[e(585)],r=t[e(515)][e(560)](e(573)),i=t[e(560)](t[e(532)](r));return!!n[e(592)][e(546)][e(566)](i)[e(531)]("h1")}[_(501)](e){const t=_;return this[t(585)][t(547)][t(592)][t(546)][t(514)](this[t(506)],e),this[t(506)][t(510)]}[_(519)](e){const t=_,n=e[t(580)]();return n[t(509)](t(579))?n[t(539)](t(520))?n[t(511)](7,n[t(589)]-3):n[t(511)](7):e}}const C=N;function T(){const e=["ck-hidden","Stop","9875QGMEgZ","tryAgainButton","AI_","117187gcNSXS","extendTemplate","Try again","replace","insertButton","bind","ck-ai-form__toolbar","replaceButton","mainAction","3715187ODypvM","930186CxtOVW","locale","bindTemplate","isVisible","insert","_CONTENT","680ZNLCYa","items","4681722ZEwoWX","Insert below","1204880aekuuz","addMany","ck-button-action","4884867VLFGZr","70fPLTfK","toUpperCase","16nQdYUD","label","set","stopButton","_createButton","REPLACE"];return(T=function(){return e})()}!function(e){const t=N,n=e();for(;;)try{if(592133===-parseInt(t(169))/1+-parseInt(t(189))/2+-parseInt(t(179))/3+parseInt(t(185))/4*(-parseInt(t(166))/5)+-parseInt(t(187))/6+-parseInt(t(178))/7*(parseInt(t(158))/8)+-parseInt(t(155))/9*(-parseInt(t(156))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(T);const O={REPLACE:C(172),INSERT:C(183)};function N(e,t){const n=T();return(N=function(e,t){return n[e-=155]})(e,t)}class L extends s.ToolbarView{constructor(e){const t=C;super(e),this[t(160)](t(182),!1),this[t(160)](t(177),O[t(163)]),this[t(176)]=this[t(162)]("",t(191)),this[t(176)][t(174)](t(159)).to(this,t(177),n=>v(e,t(168)+n[t(157)]()+t(184))),this[t(173)]=this[t(162)](v(e,t(188))),this[t(167)]=this[t(162)](v(e,t(171))),this[t(161)]=this[t(162)](v(e,t(165)));const n=this[t(181)];this[t(170)]({attributes:{class:[t(175),n.if(t(182),t(164),e=>!e)]}}),this[t(186)][t(190)]([this[t(176)],this[t(173)],this[t(167)],this[t(161)]])}[C(162)](e,t){const n=C,r=new s.ButtonView(this[n(180)]);return r[n(160)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=D;function D(e,t){const n=U();return(D=function(e,t){return n[e-=474]})(e,t)}function U(){const e=["ck-ai-form__content-field","execCommand","-9999px","ck-ai-form__content-area--processing","contentFieldView","_copyHTMLToClipboard","ck-ai-form__copy-button","change:value","102392UMtHEl","createRange","element","ck-reset_all-excluded","1258500zNkAQu","scrollTo","setStartAfter","render","3049914crWOfN","isProcessing","div","addRange","ck-ai-form__content-area","ck-ai-form__content-area-wrapper","<span>]</span>","ck-hidden","createElement","getSelection","appendLoader","_createLoader","Copy","text/html","innerHTML","clipboard","write","querySelector","value","setTemplate","class","loaderView","absolute","focus","369ScZiQh","text/plain","remove","icon","<span>[</span>","bindTemplate","ck-ai-form__loader","AI is writing...","set"," ck-ai-form__copy-button--copied","lastElementChild","setEndBefore","change:isProcessing","156190ZsQEQS","copyButtonView","smooth","ck-ai-form__copy-button-wrapper","body","textContent","setContent","appendChild","mousedown","193397icBKPJ","scrollHeight","isEnabled","locale",".ck-ai-form__loader","position","listenTo","style","isVisible","_createCopyButton","copy","ClipboardItem","removeAllRanges","ck-content","execute","bind","2237552zkbXlq","93SolNcP","wheel","1902530oUlFBA","firstElementChild","left","6DBrcsG"];return(U=function(){return e})()}!function(e){const t=D,n=e();for(;;)try{if(558861===parseInt(t(524))/1*(-parseInt(t(546))/2)+parseInt(t(541))/3*(parseInt(t(555))/4)+-parseInt(t(474))/5+parseInt(t(478))/6+-parseInt(t(543))/7+-parseInt(t(540))/8+parseInt(t(502))/9*(parseInt(t(515))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(U);class F extends s.View{[$(551)];[$(516)];constructor(e,t=""){const n=$;super(e),this[n(510)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(507)];this[n(551)]=new B(e,t),this[n(516)]=this[n(533)](),this[n(497)]({tag:n(480),attributes:{class:["ck",n(483),r.if(n(532),n(485),e=>!e)],tabindex:"-1"},children:[{tag:n(480),attributes:{class:["ck",n(482),r.if(n(479),n(550))]},children:[this[n(551)],{tag:n(480),attributes:{class:["ck",n(518)]},children:[this[n(516)]]}]}]})}[$(477)](){const e=$;super[e(477)](),this[e(496)]&&this[e(551)][e(521)](this[e(496)]);let t=!1;this.on(e(554),(n,r,i)=>{const s=e,o=!this[s(551)][s(557)][s(495)](s(528));this[s(551)][s(521)](i),this[s(479)]&&o&&!t&&this[s(557)][s(475)]({top:this[s(557)][s(525)],behavior:s(517)})}),this.on(e(514),(n,r,i)=>{const s=e;t=!1,i?(this[s(496)]=null,this[s(551)][s(488)]()):this[s(496)]||this[s(551)][s(521)]("")}),this[e(530)](this[e(557)],e(542),()=>{t=!0}),this[e(530)](this[e(557)],e(523),()=>{t=!0})}[$(501)](){const e=$;this[e(557)][e(501)]()}[$(533)](){const e=$,n=this[e(527)],r=new s.ButtonView(this[e(527)]),i=e(553);return r[e(510)]({label:v(n,e(490)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(539)](e(532)).to(this,e(496),e=>!!e),r[e(539)](e(526)).to(this,e(479),e=>!e),r.on(e(538),()=>{const n=e;this[n(552)](this[n(551)][n(557)]),r[n(505)]=t.IconCheck,r[n(498)]=i+n(511),this[n(501)](),setTimeout(()=>{const e=n;r[e(505)]=t.IconCopy,r[e(498)]=i},1e3)}),r}[$(552)](e){const t=$,{window:n,document:r}=i.global;if(n[t(535)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(492)]],{type:t(491)}),"text/plain":new r([e[t(520)]||""],{type:t(503)})})];navigator[t(493)][t(494)](s)}else{const i=r[t(486)](t(480));i[t(531)][t(529)]=t(500),i[t(531)][t(545)]=t(549),i[t(492)]=t(506)+e[t(492)]+t(484),r[t(519)][t(522)](i);const s=r[t(556)]();s[t(476)](i[t(544)]),s[t(513)](i[t(512)]);const o=n[t(487)]();o[t(536)](),o[t(481)](s),r[t(548)](t(534)),i[t(504)]()}}}class B extends s.View{constructor(e,t=""){const n=$;super(e),this[n(499)]=this[n(489)](),this[n(497)]({tag:n(480),attributes:{class:["ck",n(537),t,n(558),n(547)]}})}[$(521)](e){const t=$;this[t(557)][t(492)]=e}[$(488)](){const e=$;this[e(557)][e(522)](this[e(499)][e(557)])}[$(489)](){const e=$,t=new s.View,n=this[e(527)],r=new s.SpinnerView;return r[e(532)]=!0,t[e(497)]({tag:e(480),attributes:{class:["ck",e(508)]},children:[r,{text:v(n,e(509))}]}),t[e(477)](),t}}function j(){const e=["30UIQITU","text","set","33272iHbtYE","5RJGsNo","2052387EUmpBg","179988GbGbFj","div","8joIrtB","ck-ai-form__error","bindTemplate","13kohdvo","9771288lirvxI","924343CyPjst","5npZMeP","content","setTemplate","27EFDFfn","48814PZmuas","616286SPXoGM"];return(j=function(){return e})()}function H(e,t){const n=j();return(H=function(e,t){return n[e-=375]})(e,t)}!function(e){const t=H,n=e();for(;;)try{if(119205===parseInt(t(386))/1*(-parseInt(t(380))/2)+-parseInt(t(379))/3*(parseInt(t(385))/4)+-parseInt(t(376))/5*(-parseInt(t(388))/6)+-parseInt(t(375))/7*(parseInt(t(390))/8)+-parseInt(t(387))/9+parseInt(t(382))/10*(-parseInt(t(381))/11)+parseInt(t(394))/12*(parseInt(t(393))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class q extends s.View{constructor(e,n=""){const r=H;super(e);const i=new s.IconView,o=this[r(392)];this[r(384)](r(383),n),i[r(377)]=t.IconError,this[r(378)]({tag:r(389),attributes:{class:["ck",r(391)]},children:[i,{text:o.to(r(383))}]})}}function z(e,t){const n=G();return(z=function(e,t){return n[e-=267]})(e,t)}const V=z;function G(){const e=["focusableChildren","2232bDbNsY","ck-ai-form__submit","target","504082KVaaro","filteredView","2307308PGMiLM","72963nPxHjX","add","children","focusFirst","Submit","set","3666845xFGncO","minRows","execute","bind","focusLast","rtl","resultsView","window","_createSubmitButton","32514nbMhyr","4124457gLocNq","fire","requestAnimationFrame","enter","excludeScrollbarsAndBorders","style","width","uiLanguageDirection","locale","isOn","keystrokes","submit","focus","showHistoryButtonView","_createShowHistoryButton","isVisible","isEmpty","focusCycler","85NRgWiz","3lMSnvH","isEnabled","8vUiyND","maxRows","update","ck-ai-form__toggle-history","left","queryView","History","10oKBdlF","value","render","fieldWrapperChildren","element","right","submitButtonView","fieldView","944028vXIhrJ"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(385252===-parseInt(t(282))/1+parseInt(t(277))/2+parseInt(t(320))/3*(parseInt(t(284))/4)+-parseInt(t(319))/5*(-parseInt(t(300))/6)+-parseInt(t(291))/7*(-parseInt(t(322))/8)+-parseInt(t(301))/9*(-parseInt(t(269))/10)+parseInt(t(285))/11*(-parseInt(t(279))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(275)];[V(314)];constructor(e,t){const n=V;super(e,t),this[n(267)][n(276)][n(292)]=1,this[n(267)][n(276)][n(323)]=3,this[n(275)]=this[n(299)](),this[n(314)]=this[n(315)](),this[n(278)][n(286)](this[n(314)],1),this[n(278)][n(286)](this[n(275)])}[V(271)](){const e=V;super[e(271)](),this[e(267)][e(272)][e(286)](this[e(314)]),this[e(287)][e(286)](this[e(275)]),this[e(311)][e(290)](e(304),(t,n)=>{const r=e;t[r(281)]==this[r(267)][r(276)][r(273)]&&(this[r(312)](),n())})}[V(299)](){const e=V,n=new s.ButtonView(this[e(309)]),r=this[e(309)];return n[e(290)]({icon:t.IconSubmit,label:v(r,e(289)),isVisible:!0,tooltip:!0,class:e(280)}),n.on(e(293),()=>{this[e(312)]()}),n[e(294)](e(321)).to(this[e(267)][e(276)],e(317),this,e(321),(e,t)=>!e&&t),n}[V(315)](){const e=V,n=new s.ButtonView(this[e(309)]),r=this[e(297)],o=this[e(309)];n[e(290)]({label:v(o,e(268)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(325)}),n[e(294)](e(310)).to(r,e(316)),n[e(294)](e(321)).to(this,e(321)),n.on(e(293),()=>{const t=e;r[t(316)]=!r[t(316)],r[t(316)]?this[t(283)][t(313)]():this[t(313)]()});const a=()=>{const t=e;i.global[t(298)][t(303)](()=>{const e=t;if((0,i.isVisible)(this[e(273)])){const t=new i.Rect(this[e(267)][e(276)][e(273)]),r=t[e(307)],s=e(296)===o[e(308)]?e(326):e(274);t[e(305)](),n[e(273)][e(306)][s]=r-t[e(307)]+1+"px"}})};return this[e(267)][e(276)].on(e(324),a),this.on(e(271),a),n}[V(312)](){const e=V,t=this[e(267)][e(276)][e(273)][e(270)];this[e(302)](e(312),t)}[V(313)](e){const t=V;-1===e?this[t(318)][t(295)]():this[t(318)][t(288)]()}}const K=Q;function Z(){const e=["8490XtBJyx","historyGroupView","length","execute","1299307UFYCZr","add","filter","639206tAFIrn","Clear","1862667IcyAax","locale","clearHistoryButton","items","set","label","delegate","6808146kcLgGr","Prompt history","children","709472BoDhJs","812PgertW","21TqVxun","1741134ZjcLxN","clearHistory","_createClearHistoryButton","fire"];return(Z=function(){return e})()}function Q(e,t){const n=Z();return(Q=function(e,t){return n[e-=385]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(710996===parseInt(t(408))/1+-parseInt(t(385))/2+parseInt(t(400))/3+parseInt(t(398))/4*(parseInt(t(404))/5)+-parseInt(t(394))/6+-parseInt(t(399))/7*(parseInt(t(397))/8)+parseInt(t(387))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Z);class Y extends s.ListView{[K(405)];[K(389)];constructor(e){const t=K;super(e),this[t(389)]=this[t(402)](),this[t(405)]=new s.ListItemGroupView,this[t(405)][t(396)][t(409)](this[t(389)],1),this[t(405)][t(392)]=v(e,t(395)),this[t(405)][t(390)][t(393)](t(407)).to(this),this[t(390)][t(409)](this[t(405)])}[K(410)](){const e=K;let t=0;for(const n of this[e(390)])t+=n[e(390)][e(406)];return{resultsCount:t,totalItemsCount:t}}[K(402)](){const e=K,t=this[e(388)],n=new s.ButtonView(this[e(388)]);return n[e(391)]({label:"("+v(t,e(386))+")",withText:!0}),n.on(e(407),()=>this[e(403)](e(401))),n}}const J={"&":"&","<":"<",">":">",""":'"',"'":"'"};function X(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(X).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>J[e]||"'")}(X(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=305]})(e,t)}function ne(){const e=["set","execute","children","add","1288070bfMxNv","560599xrtnXs","1989747LrDsKz","locale","1032bQglif","7237384WRWibS","38556fvDCFA","29931AZqUgT","prompt","fire","40jSBxWe","134GIRMgd","6BxwIHZ","2680564uzQkuC"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(456652===parseInt(t(309))/1+-parseInt(t(319))/2*(-parseInt(t(315))/3)+parseInt(t(321))/4+parseInt(t(308))/5*(parseInt(t(320))/6)+-parseInt(t(314))/7*(-parseInt(t(312))/8)+parseInt(t(310))/9+parseInt(t(318))/10*(-parseInt(t(313))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(311)],n);this[t(306)][t(307)](r),r[t(322)]({label:e[t(316)],withText:!0}),r.on(t(305),()=>{const n=t;this[n(317)](n(305),{value:ee(e[n(316)])})})}}const ie=se;function se(e,t){const n=ce();return(se=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=se,n=e();for(;;)try{if(825133===-parseInt(t(466))/1+parseInt(t(456))/2*(-parseInt(t(458))/3)+-parseInt(t(463))/4+parseInt(t(450))/5*(parseInt(t(453))/6)+parseInt(t(446))/7+-parseInt(t(461))/8*(parseInt(t(443))/9)+parseInt(t(449))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const oe=ie(455);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(465)](),this.on(e(445),(t,n)=>{const r=e,i=ue(n[r(464)]);for(const e of this)if(e!=n&&ue(e[r(464)])===i){this[r(452)](e);break}this[r(448)]>20&&this[r(452)](this[r(442)]),this[r(444)]()}),this.on(e(452),()=>{this[e(444)]()})}[ie(465)](){const e=ie,t=sessionStorage[e(459)](oe)||"[]";this[e(447)](JSON[e(462)](t))}[ie(444)](){const e=ie;sessionStorage[e(454)](oe,JSON[e(451)](this[e(460)](e=>e)))}}function ce(){const e=["stringify","remove","24xJwCsV","setItem","CKEditor/AIFormView/PromptHistory","1356598lOISkh","toLowerCase","6MzZNGJ","getItem","map","2807776oFnHFv","parse","1978188dRLUVs","prompt","_loadFromSessionStorage","47271jYUMbW","trim","last","27kfjzOE","_saveToSessionStorage","add","6962886WIMGIr","addMany","length","12776950xozyFe","1880090mzWxmZ"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(457)]()[t(467)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return X(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["setTemplate","prompt","stopProcessing","reset","insertContentBelow","mainAction","shift + tab","7657430txyeFO","isEnabled","tab","chain","replaceButton","copyButtonView","_promptHistory","replaceContent","high","keystrokes","AI_ERROR_FAILED","ck-hidden","2846058nvKOnY","bindTo","delegate","isVisible","toolbar","submit","fieldView","text","focusLast","_createToolbar","REPLACE","_createHistoryView","Ask AI and your prompts will be listed here for you to use later.","focusCycler","_createPromptView","set","add","queryView","historyGroupView","div","startProcessing","element","execute","errorView","ck-ai-form","search","23973eRzFdk","stopButton","isProcessing","Ask AI to improve generated text","focusFirst","tryAgainButton","listenTo","390KdPNrn","value","promptView","1972srYnat","9VYdxtg","label","submitPrompt","isError","focus","tryAgainEvent","Ask AI to edit or generate","clearHistory","locale","8514280WuoGtD","bind","fire","handleError","Empty history","1869746ijzOGU","_focusables","ck-ai-form-content","finishProcessing","bindTemplate","11350ZMxloS","contentArea","insertButton","createCollection","render","items","trim","clear","4360153kOggMP","focusTracker"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=153]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(983533===parseInt(t(192))/1+-parseInt(t(174))/2*(parseInt(t(167))/3)+-parseInt(t(177))/4*(-parseInt(t(197))/5)+parseInt(t(226))/6+-parseInt(t(205))/7+-parseInt(t(187))/8+parseInt(t(178))/9*(parseInt(t(214))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(206)];[he(223)];[he(198)];[he(230)];[he(176)];[he(164)];[he(193)];[he(154)];[he(220)];constructor(e,t,n=""){const r=he;super(e),this[r(156)](r(215),!0),this[r(156)](r(169),!1),this[r(156)](r(208),""),this[r(156)](r(175),""),this[r(156)](r(181),!1),this[r(156)](r(212),O[r(236)]),this[r(220)]=new ae,this[r(164)]=new q(e),this[r(198)]=new F(e,n),this[r(198)][r(188)](r(169)).to(this),this[r(198)][r(188)](r(175)).to(this),this[r(230)]=this[r(235)](),this[r(230)][r(188)](r(212)).to(this),this[r(176)]=this[r(155)](),this[r(206)]=new i.FocusTracker,this[r(223)]=new i.KeystrokeHandler,this[r(193)]=this[r(200)]([this[r(198)],this[r(198)][r(219)],this[r(230)],this[r(176)]]),this[r(154)]=new s.FocusCycler({focusables:this[r(193)],focusTracker:this[r(206)],keystrokeHandler:this[r(223)],actions:{focusPrevious:r(213),focusNext:r(216)}}),this[r(154)][r(217)](this[r(176)][r(154)]),this[r(176)][r(158)][r(232)][r(188)](r(175)).to(this,r(208));const o=this[r(196)];this[r(207)]({tag:r(160),attributes:{class:["ck",r(165),t],tabindex:"-1"},children:[{tag:r(160),attributes:{class:["ck",r(194)]},children:[{tag:r(160),attributes:{class:[o.if(r(181),r(225),e=>!e)]},children:[this[r(164)]]},this[r(198)],this[r(230)],this[r(176)]]}]})}[he(201)](){const e=he;super[e(201)](),this[e(206)][e(157)](this[e(198)][e(162)]),this[e(206)][e(157)](this[e(198)][e(219)][e(162)]),this[e(206)][e(157)](this[e(230)][e(162)]),this[e(206)][e(157)](this[e(176)][e(162)]),this[e(223)][e(173)](this[e(162)])}[he(182)](e=1){const t=he;-1===e?this[t(154)][t(234)]():this[t(154)][t(171)]()}[he(210)](){const e=he;this[e(208)]="",this[e(175)]="",this[e(181)]=!1,this[e(176)][e(210)](),this[e(198)][e(229)]=!1,this[e(230)][e(229)]=!1}[he(155)](){const e=he,t=this[e(186)],n=new W(t,{queryView:{label:v(t,e(184)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(191)),secondary:v(t,e(153))}}},filteredView:this[e(237)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(188)](e(215)).to(this,e(215),this,e(169),(e,t)=>e&&!t),this[e(173)](n,e(231),(t,n)=>{const r=e;this[r(208)]=n;const i=le(n);this[r(189)](r(180),i),n[r(203)]()&&this[r(220)][r(157)]({prompt:i},0)},{priority:e(222)}),n}[he(237)](){const e=he,t=new Y(this[e(186)]);return t[e(159)][e(202)][e(227)](this[e(220)]).as(re),t.on(e(185),()=>{const t=e;this[t(220)][t(204)](),this[t(176)][t(166)](""),this[t(176)][t(182)]()}),t}[he(235)](){const e=he,t=new L(this[e(186)]);return t[e(218)][e(188)](e(215)).to(this,e(215),this,e(169),this,e(175),(e,t,n)=>e&&!t&&!!n),t[e(218)][e(228)](e(163)).to(this,e(221)),t[e(199)][e(188)](e(215)).to(this,e(215),this,e(169),this,e(175),(e,t,n)=>e&&!t&&!!n),t[e(199)][e(228)](e(163)).to(this,e(211)),t[e(172)][e(188)](e(215)).to(this,e(215),this,e(169),(e,t)=>e&&!t),t[e(172)][e(228)](e(163)).to(this,e(183)),t[e(168)][e(188)](e(215)).to(this,e(169)),t[e(168)][e(228)](e(163)).to(this,e(209)),t}[he(161)](){const e=he;this[e(175)]="",this[e(181)]=!1,this[e(169)]=!0,this[e(198)][e(229)]=!0,this[e(230)][e(229)]=!0,this[e(198)][e(182)]()}[he(195)](){const e=he,t=this[e(186)];this[e(169)]=!1,this[e(208)]="",this[e(176)][e(210)](),this[e(175)]&&(this[e(176)][e(158)][e(179)]=v(t,e(170)))}[he(190)](e){const t=he,n=this[t(186)];this[t(195)](),this[t(181)]=!0,this[t(164)][t(233)]=e||v(n,t(224)),this[t(175)]||(this[t(198)][t(229)]=!1)}}var ge=n(673),ye=n.n(ge),be=n(545),we=n.n(be),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=we(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Me=n(181),Re={attributes:{"data-cke":!0}};Re.setAttributes=Ee(),Re.insert=ke().bind(null,"head"),Re.domAPI=we(),Re.insertStyleElement=Ie();ye()(Me.A,Re);Me.A&&Me.A.locals&&Me.A.locals;var Pe=n(676),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=we(),Ce.insertStyleElement=Ie();ye()(Pe.A,Ce);Pe.A&&Pe.A.locals&&Pe.A.locals;const Te=Oe;function Oe(e,t){const n=Ne();return(Oe=function(e,t){return n[e-=393]})(e,t)}function Ne(){const e=["isPremiumPlugin","wasMoved","27wBwLKJ","rawHtml","componentFactory","values","updatePosition","custom","184855qZTytg","replace","editing","addMany","_initView","show","licenseKey","ck-ai-commands-dropdown ","filter","getRanges","Generated content: %0","ai.useTheme","pluginName","reset","aiLicenseKeyEvaluationLimit","3992990YDMstg","1023QDUvLi","_populateMenuBarMenu","isCollapsed","_uiCssClasses","735168FWYDQZ","REPLACE","336PLkgQl","change:value","plugins","menuView","command:","once","push","isOfficialPlugin","model","textAdapter","change","474KIzSOH","1kzHIUB","_onExecute","DataTransfer","aiLicenseKeyValid","AI Commands","showUI","AIAssistantUI","isEnabled","listenTo","config","render","enabledCommandsIds","sort","requires","_aiAssistantController","add","_dialog","ai.aiAssistant.contentAreaCssClass","_commandDefinitions","<p>","get","bind","usageLimit","splice","order","evaluationLimit","text","length","hideUI","menuBar:aiAssistant","ck-ai-assistant-button ","comment","children","aiLicenseKeyNotAllowed","_initAriaAiStatusChangeAnnouncements","commands","_getResolvedCommandsDefinitions","_showLicenseError","getLimitElement","execute","isFlat","buttonView","schema","insertContent","featureNotAllowed","getData","source","buttons","_licenseKeyCheckInterval","insertContentBelow","hide","_aiAdapter","panelView","aiLicenseKeyInvalid","map","init","label","errorView","copy","AIAssistant","selection","groupId","AI Assistant","trialLimit","aiCommands","invalid","125237fmCwqr","getSelectedBlocks","EDITOR_TOP_SIDE","document","showAIAssistant","384610qeEBxy","_createAIAssistantUIButton","requiresContent","replaceContent","ai.aiAssistant.commands","aiLicenseKeyExpired","menuPanelClass","</p>","change:isError","INSERT","_getMenuBarGroupButtons","menuBar:aiCommands","queryView","contentArea","Error during AI content generation: %0","AI is writing","media","domainLimit","_forceMarkersCopy","define","isOn","ai.aiAssistant.disabledElements","text/html","getSelectedElement","from","prompt","currentContext","aiLicenseKeyDomainLimit","editor","updateView","polite","menuitemcheckbox","_formView","showFakeVisualSelection","includes","body","locale","announce","setSelection","focus","update","items","expired","fire","trim","delegate","destroy","set","ck-ai-assistant-ui","11871890ATqeHp","change:enabledCommandsIds","ai-commands-config-order-collision","3644Fsemfa","aiLicenseKeyTrialLimit","forEach","view","hideFakeVisualSelection","aiLicenseKeyUsageLimit","change:isProcessing","tableOfContents","fieldView","aiAssistant"," ck-ai-assistant-ui_theme","promptView","groupLabel"];return(Ne=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(815670===-parseInt(t(418))/1*(parseInt(t(489))/2)+-parseInt(t(400))/3*(parseInt(t(541))/4)+parseInt(t(399))/5+parseInt(t(417))/6*(-parseInt(t(484))/7)+-parseInt(t(404))/8*(-parseInt(t(556))/9)+parseInt(t(538))/10+parseInt(t(562))/11*(parseInt(t(406))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ne);const Le=globalThis[Te(420)];class $e extends e.Plugin{[Te(568)];[Te(466)];[Te(434)];[Te(521)];[Te(469)];[Te(432)];[Te(403)]="";static get[Te(396)](){return Te(424)}static get[Te(413)](){return!0}static get[Te(554)](){return!0}static get[Te(431)](){return[a.ClipboardMarkersUtils,f,y,s.Dialog]}constructor(e){const t=Te;super(e),e[t(427)][t(508)](t(510),[t(505),t(557),t(548)]),e[t(427)][t(508)](t(435),""),e[t(427)][t(508)](t(395),!0),this[t(403)]=t(537)+(e[t(427)][t(438)](t(395))?t(551):"")}[Te(473)](){const e=Te,{editor:n}=this;this[e(469)]=n[e(408)][e(438)](y),this[e(434)]=n[e(408)][e(438)](s.Dialog),this[e(521)]=null,this[e(436)]=this[e(454)]();const r=new S(n,Array[e(513)](this[e(436)][e(559)]()));n[e(453)][e(433)](e(488),r),n.ui[e(558)][e(433)](e(482),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(536)]({class:a(569)+this[a(403)]}),c[a(459)][a(536)]({label:v(i,a(422)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(457),e=>this[a(419)](e[a(464)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(544)][a(524)],function(e){const t=a,n=o(e[t(427)][t(438)](t(493)),e[t(525)]),r=Ue(e,n)[t(570)](e=>e[t(453)][t(445)]);return 1===r[t(445)]?Ue(e,r[0][t(453)])[t(472)](e=>({id:e.id,label:e[t(474)]})):r[t(472)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(472)](e=>({id:e.id,label:e[r(474)]}))}})}(n),{ariaLabel:v(i,a(422))}),c[a(409)][a(495)]=a(569)+this[a(403)],r.on(a(539),u),c[a(409)][a(411)](a(428),u),c;function u(){const e=a;c[e(425)]=r[e(429)][e(445)]>0;for(const t of c[e(409)][e(465)])t[e(425)]=r[e(429)][e(523)](t.id)}}),n.ui[e(558)][e(433)](e(500),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(459)][a(536)]({label:v(i,a(422)),icon:t.IconMagicWand}),c[a(439)](a(425)).to(r,a(429),e=>e[a(445)]>0);const u=o(n[a(427)][a(438)](a(493)),i);return this[a(401)](r,c,u,e=>this[a(419)](e)),c}),n.ui[e(558)][e(433)](e(550),()=>{const t=e,n=this[t(490)](s.ButtonView);return n[t(536)]({tooltip:!0,class:t(448)+this[t(403)]}),n}),n.ui[e(558)][e(433)](e(447),()=>{const t=e,n=this[t(490)](s.MenuBarMenuListItemButtonView);return n[t(536)]({role:t(520)}),n}),this[e(568)]=this[e(517)][e(427)][e(438)](e(568));const i=this[e(517)];this[e(466)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(421)==s||t(471)==s||t(494)==s||t(516)==s||t(451)==s||t(398)==s||t(542)==s||t(546)==s){delete i[r],n=s,clearInterval(this[t(466)]),this[t(466)]=void 0;break}}t(471)==n&&i[t(455)](t(483)),t(494)==n&&i[t(455)](t(531)),t(516)==n&&i[t(455)](t(506)),t(451)==n&&i[t(455)](t(462),t(477)),t(398)==n&&i[t(455)](t(443)),t(542)==n&&i[t(455)](t(481)),t(546)==n&&i[t(455)](t(440))},1e3)}[Te(535)](){const e=Te;super[e(535)](),this[e(466)]&&clearInterval(this[e(466)])}[Te(423)](e="",n="",r=Te(561)){const i=Te,o=this[i(517)],u=o[i(564)][i(544)],d=o[i(408)][i(438)](f),l=o[i(408)][i(438)](a.ClipboardMarkersUtils);d[i(522)]();const h=new Le,p=new ClipboardEvent(i(476),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,p,{dataTransfer:m});l[i(507)](i(449),()=>{const e=i;u[e(487)][e(532)](e(476),g)}),this[i(521)]||(this[i(566)](),this[i(432)]=new P(o,this[i(469)][i(415)],this[i(521)]));let y=m[i(463)](i(511));const b=o[i(414)][i(487)][i(478)],w=Array[i(513)](b[i(393)]());1===w[i(445)]&&w[0][i(458)]&&!b[i(512)]()&&""!==y[i(563)](/ /g,"")[i(533)]()&&(y=i(437)+y+i(496)),this[i(432)][i(518)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:O[o[i(414)][i(487)][i(478)][i(402)]?i(498):i(405)]}),i(550)!==this[i(434)].id?this[i(434)][i(567)]({id:i(550),icon:t.IconRobotPencil,title:v(this[i(517)][i(525)],i(480)),content:this[i(521)],position:s.DialogViewPosition[i(486)],onShow:()=>{const e=i;this[e(521)][e(528)]()},onHide:()=>{const e=i;this[e(432)][e(397)](),d[e(545)]()}}):this[i(434)][i(544)][i(555)]||this[i(434)][i(544)][i(560)]()}[Te(446)](){const e=Te;this[e(434)][e(468)]()}[Te(454)](){const e=Te,t=new Map,n=o(this[e(517)][e(427)][e(438)](e(493)),this[e(517)][e(525)]);for(const r of n)for(const n of r[e(453)])t[e(536)](n.id,{...n,groupId:r[e(479)],groupLabel:r[e(553)]||r[e(479)]});return t}[Te(490)](e){const n=Te,r=this[n(517)],i=r[n(453)][n(438)](n(488)),s=new e(r[n(525)]);return s[n(536)]({label:v(r[n(525)],n(480)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(439)](n(425)).to(i),s[n(439)](n(509)).to(this[n(434)],"id",e=>n(550)===e),this[n(426)](s,n(457),()=>{const e=n;s[e(509)]?this[e(446)]():i[e(457)]()}),s}[Te(566)](){const e=Te,t=this[e(517)][e(408)][e(438)](f);this[e(521)]=new me(this[e(517)][e(525)],this[e(403)],this[e(517)][e(427)][e(438)](e(435))),this[e(521)].on(e(407),()=>{const t=e;this[t(434)][t(544)][t(555)]||this[t(434)][t(544)][t(560)]()}),this[e(521)][e(552)][e(501)][e(549)].on(e(529),()=>{const t=e;this[t(434)][t(544)][t(555)]||this[t(434)][t(544)][t(560)]()}),this[e(426)](this[e(521)],e(492),()=>{const n=e;t[n(461)](this[n(432)][n(515)]),this[n(446)]()}),this[e(426)](this[e(521)],e(467),()=>{const n=e;t[n(467)](this[n(432)][n(515)]),this[n(446)]()}),this[e(452)]()}[Te(452)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(517)];this[e(521)][e(502)].on(e(547),(r,i,s)=>{const o=e,a=this[o(432)][o(515)];s?n[o(526)](v(t,o(504))):a&&n[o(526)](v(t,o(394),a),{politeness:o(519),isUnsafeHTML:!0})}),this[e(521)].on(e(497),(r,i,s)=>{const o=e;if(s){const e=this[o(521)][o(475)][o(444)];n[o(526)](v(t,o(503),e))}})}[Te(419)](e){const t=Te,n=this[t(436)][t(438)](e),r=this[t(517)],s=r[t(414)][t(487)][t(478)],o=r[t(453)][t(438)](t(488)),a=r[t(408)][t(438)](f),c=("_ungrouppedCommands"!==n[t(479)]?n[t(553)]+": ":"")+n[t(474)];if(!1!==n[t(491)]&&s[t(402)]){const e=(0,i.first)(s[t(485)]())||r[t(414)][t(460)][t(456)](s);r[t(414)][t(416)](n=>{n[t(527)](e,"in")})}a[t(522)](),o[t(457)](n[t(514)],c,t(410)+e)}[Te(401)](e,t,n,r){const i=Te,o=this[i(517)],a=o[i(525)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(570)](e=>e[i(453)][i(445)]);1===u[i(445)]?this[i(499)]({command:e,commands:u[0][i(453)],parentMenuView:t,onExecute:r})[i(543)](e=>c[i(530)][i(433)](e)):u[i(543)](({groupId:n,groupLabel:o,commands:u})=>{const d=i,l=new s.MenuBarMenuListItemView(a,t),h=new s.MenuBarMenuView(a),f=new s.MenuBarMenuListView(a),p=this[d(499)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(459)][d(536)]({label:o||n}),h[d(534)](d(457)).to(t),f[d(530)][d(565)](p),h[d(470)][d(450)][d(433)](f),l[d(450)][d(433)](h),c[d(530)][d(433)](l)}),t[i(470)][i(450)][i(433)](c)}[Te(499)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(517)],a=o[i(525)];return Ue(o,t)[i(472)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(536)]({label:t[o(474)]}),u[o(534)](o(457)).to(n),u.on(o(457),()=>r(t.id)),u[o(439)](o(425)).to(e,o(429),e=>e[o(523)](t.id)),c[o(450)][o(433)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(442)]&&void 0===t[n(442)]?1:void 0===e[n(442)]&&void 0!==t[n(442)]?-1:void 0!==e[n(442)]&&void 0!==t[n(442)]?e[n(442)]-t[n(442)]:0}function Ue(e,t){const n=Te;t[n(430)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(442)]){if(o[n(442)]in r)throw new i.CKEditorError(n(540),e,{conflictingDefinitions:[o,r[o[n(442)]]]});r[o[n(442)]]=o,s[n(441)](o[n(442)],0,o)}else s[n(412)](o);return s}function Fe(){const e=["190jstMWu","Casual","translate","Translate the content to English language.","translateArabic","summarize","Friendly","casual","Translate the content to Spanish language.","concat","ai.aiAssistant.removeCommands","isOfficialPlugin","292478NvhBzD","isPremiumPlugin","Change style","Portuguese","ai.aiAssistant.preserveComments","config","Continue","French","Summarize","requires","professional","11960OfweEv","poetic","changeTone","Translate the content to German language.","translateFrench","Make shorter","Simplify language","generate","translateChinese","Journalism","push","translateGerman","set","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Professional","Translate the content to Simplified Chinese language.","friendly","Rewrite this content as a business professional with formal language.","filter","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Translate the content to Arabic language.","translatePortuguese","groupId","get","journalism","Edit or review","2429DRbOza","simplifyLanguage","German","AIAssistant","Change tone","Direct","continue","507782CykmiA","Generate from selection","Business","Confident","Poetic","improveWriting","Translate the content to Portuguese language.","find","editOrReview","locale","Improve using direct language, using only the essential information.","105oHNUDB","Improve using friendly, comforting language, to convey understanding and empathy.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","3319432vWFBTd","confident","translateHindi","business","3016695nuaiUB","Legal","105612YXTYpb","Improve using compelling, optimistic language to convey confidence in the writing.","Improve writing","legal","Make longer","translateSpanish","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Simplified Chinese","ai.aiAssistant.extraCommandGroups","makeShorter","1847475THcuqt","ai.aiAssistant.commands","Translate the content to Hindi language.","makeLonger","English","Rewrite this content as a legal professional using valid legal terminology.","direct","forEach","Arabic","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Rewrite this content as a journalist using engaging language to convey the importance of the information.","changeStyle","Translate the content to French language.","Improve using casual, informal language to convey a casual conversation with a real person.","Translate","Spanish","translateEnglish","includes","commands","define","1qIHVLo","Improve this content by using descriptive language and inserting more information and more detailed explanations.","pluginName","Hindi"];return(Fe=function(){return e})()}const Be=je;function je(e,t){const n=Fe();return(je=function(e,t){return n[e-=125]})(e,t)}!function(e){const t=je,n=e();for(;;)try{if(750186===parseInt(t(181))/1*(parseInt(t(197))/2)+parseInt(t(149))/3+parseInt(t(145))/4+parseInt(t(142))/5*(parseInt(t(151))/6)+-parseInt(t(236))/7*(parseInt(t(208))/8)+-parseInt(t(161))/9+-parseInt(t(185))/10*(parseInt(t(131))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Fe);class He extends e.Plugin{static get[Be(206)](){return[$e,f]}static get[Be(183)](){return Be(127)}static get[Be(196)](){return!0}static get[Be(198)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(202)],r=e[t(140)];n[t(180)](t(201),!0),n[t(180)](t(162),qe(r)),n[t(180)](t(159),[]),n[t(180)](t(195),[]);let i=o(n[t(233)](t(162)),r);const s=n[t(233)](t(159)),a=n[t(233)](t(195));s[t(168)](e=>{const n=t,r=i[n(138)](t=>t[n(232)]===e[n(232)]);r?r[n(179)]=r[n(179)][n(194)](e[n(179)]):i[n(218)](e)}),i=i[t(228)](e=>!a[t(178)](e[t(232)])),i[t(168)](e=>{const n=t;e[n(179)]=e[n(179)][n(228)](e=>!a[n(178)](e.id))}),n[t(220)](t(162),i)}}function qe(e){const t=Be;return[{groupId:t(139),groupLabel:v(e,t(235)),commands:[{id:t(136),label:v(e,t(153)),prompt:t(223)},{id:t(160),label:v(e,t(213)),prompt:t(222)},{id:t(164),label:v(e,t(155)),prompt:t(182)},{id:t(125),label:v(e,t(214)),prompt:t(221)}]},{groupId:t(215),groupLabel:v(e,t(132)),commands:[{id:t(190),label:v(e,t(205)),prompt:t(229)},{id:t(130),label:v(e,t(203)),prompt:t(157)}]},{groupId:t(210),groupLabel:v(e,t(128)),commands:[{id:t(207),label:v(e,t(224)),prompt:t(144)},{id:t(192),label:v(e,t(186)),prompt:t(174)},{id:t(167),label:v(e,t(129)),prompt:t(141)},{id:t(146),label:v(e,t(134)),prompt:t(152)},{id:t(226),label:v(e,t(191)),prompt:t(143)}]},{groupId:t(172),groupLabel:v(e,t(199)),commands:[{id:t(148),label:v(e,t(133)),prompt:t(227)},{id:t(154),label:v(e,t(150)),prompt:t(166)},{id:t(234),label:v(e,t(217)),prompt:t(171)},{id:t(209),label:v(e,t(135)),prompt:t(170)}]},{groupId:t(187),groupLabel:v(e,t(175)),commands:[{id:t(177),label:v(e,t(165)),prompt:t(188)},{id:t(156),label:v(e,t(176)),prompt:t(193)},{id:t(231),label:v(e,t(200)),prompt:t(137)},{id:t(219),label:v(e,t(126)),prompt:t(211)},{id:t(212),label:v(e,t(204)),prompt:t(173)},{id:t(216),label:v(e,t(158)),prompt:t(225)},{id:t(147),label:v(e,t(184)),prompt:t(163)},{id:t(189),label:v(e,t(169)),prompt:t(230)}]}]}const ze=Ve;function Ve(e,t){const n=Ge();return(Ve=function(e,t){return n[e-=198]})(e,t)}function Ge(){const e=["object","locale","name","application/json","48MrWruA","_prepareRequestParameters","get","1101954pvRXEX","AbortError","requires","abortController","_prepareRequestHeaders","catch","makeRequest","aitextadapter-send-request-failed","init","assign","AI_ERROR_GET_PARAMETERS","1984788JhtWiO","plugins","aborted","1630UeHnab","552108fDNekM","resolve","abort","signal","6424kBlpOP","58scLGpM","sendRequest","textAdapter","error","reject","editor","3526428pvbsTK","46674JAEAgZ","4070010PqMEmP","AI_ERROR_GET_HEADERS"];return(Ge=function(){return e})()}!function(e){const t=Ve,n=e();for(;;)try{if(499877===parseInt(t(221))/1*(parseInt(t(220))/2)+-parseInt(t(216))/3+parseInt(t(227))/4+-parseInt(t(229))/5+parseInt(t(212))/6+parseInt(t(201))/7*(parseInt(t(198))/8)+-parseInt(t(228))/9*(parseInt(t(215))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[ze(204)];static get[ze(203)](){return[y]}constructor(e){const t=ze;super(e),this[t(204)]=new AbortController}[ze(209)](){const e=ze;this[e(226)][e(213)][e(200)](y)[e(223)]=this}[ze(218)](){const e=ze;this[e(204)][e(219)][e(214)]||(this[e(204)][e(218)](),this[e(204)]=new AbortController)}async[ze(207)](e){const t=ze;return this[t(222)](e)[t(206)](e=>{const n=t;if(e instanceof b)return Promise[n(225)](e);if(n(202)==e[n(233)])return Promise[n(217)]();throw console[n(224)](e),new i.CKEditorError(n(208),null)})}async[ze(205)](e,t){const n=ze,r=this[n(226)][n(232)],i={"Content-Type":n(234)};if(n(231)==typeof e)Object[n(210)](i,e);else if(e)try{const r=await e(t);Object[n(210)](i,r)}catch{return Promise[n(225)](new b(v(r,n(230))))}return i}async[ze(199)](e,t){const n=ze,r=this[n(226)][n(232)];if(n(231)==typeof e)return e;try{return await e(t)}catch{return Promise[n(225)](new b(v(r,n(211))))}}}const Ke=Qe;function Ze(){const e=["gpt-4o","\nYou must keep the text formatting.\n\nContent:\n","_readStaticResponse","902790KyCklc","get","length","stringify","prepareMessages","473814jUOMMy","ai.openAI.apiUrl","16098489XZeFzx","define","content","getReader","text","stream","sendRequest","body","1289304dchbFq","parse","choices","signal","OpenAITextAdapter","system","AI_ERROR_CONTEXT_LENGTH","decode","_requestParameters","message","delta","_requestHeaders","split","editor","[DONE]","resolve","json","read","config","filter","replace","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","abortController","_prepareRequestParameters","data: ","user","ai.openAI.requestHeaders","pluginName","join","locale","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","4eleCrr","https://api.openai.com/v1/chat/completions","5107780RfJoPI","includes","reject","5pSSBBo","context_length_exceeded","map","8qRoVGm","_cleanUpData","AI_ERROR_MODERATION","ai.openAI.requestParameters","_apiUrl","_readStreamableResponse","11371472gXBECt","POST","1107417sjczYv","_prepareRequestHeaders","Moderation","Instruction:\n","_isBufferIncomplete"];return(Ze=function(){return e})()}function Qe(e,t){const n=Ze();return(Qe=function(e,t){return n[e-=103]})(e,t)}!function(e){const t=Qe,n=e();for(;;)try{if(963067===parseInt(t(149))/1+parseInt(t(159))/2+parseInt(t(136))/3*(parseInt(t(120))/4)+-parseInt(t(125))/5*(-parseInt(t(144))/6)+parseInt(t(134))/7+parseInt(t(128))/8*(-parseInt(t(151))/9)+-parseInt(t(122))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ze);class Ye extends We{[Ke(132)];[Ke(170)];[Ke(167)];static get[Ke(116)](){return Ke(163)}constructor(e){const t=Ke;super(e),e[t(107)][t(152)](t(150),t(121)),e[t(107)][t(145)](t(131))||e[t(107)][t(152)](t(131),{model:t(141),temperature:1,top_p:1,stream:!0}),this[t(132)]=e[t(107)][t(145)](t(150)),this[t(170)]=e[t(107)][t(145)](t(115))||{},this[t(167)]=e[t(107)][t(145)](t(131))}async[Ke(157)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(172)][i(118)],o=await this[i(148)](e,t,r),a=await this[i(137)](this[i(170)],r),c=await this[i(112)](this[i(167)],r),u={messages:o,...c},d={method:i(135),headers:a,body:JSON[i(147)](u),signal:this[i(111)][i(162)]},l=await fetch(this[i(132)],d);if(l.ok)return c[i(156)]?await this[i(133)](l,n):await this[i(143)](l,n),Promise[i(104)]();{const e=await l[i(155)]();return e[i(123)](i(126))?Promise[i(124)](new b(v(s,i(165)))):e[i(123)](i(138))?Promise[i(124)](new b(v(s,i(130)))):Promise[i(124)](new Error(e))}}async[Ke(148)](e,t,n){const r=Ke;let i,s;return t?(i=r(119),s=r(139)+e+r(142)+t):(i=r(110),s=e),[{role:r(164),content:i},{role:r(114),content:s}]}async[Ke(133)](e,t){const n=Ke,r=e[n(158)][n(154)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(106)](),d=s+i[n(166)](u);let l="";c=e;try{l=this[n(129)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(140)](o)||o&&(a+=o,o="",t(a))}return Promise[n(104)]()}async[Ke(143)](e,t){const n=Ke;return t((await e[n(105)]())[n(161)][0][n(168)][n(153)]),Promise[n(104)]()}[Ke(140)](e){const t=Ke,n=e[t(171)]("<")[t(146)]!==e[t(171)](">")[t(146)],r=e[t(146)]<30;return n&&r}[Ke(129)](e){const t=Ke;return e[t(171)](/\n(?![^{]*\})/g)[t(127)](e=>e[t(109)](t(113),""))[t(108)](e=>e&&e[t(146)]>0&&t(103)!==e)[t(127)](e=>{const n=t,{choices:r}=JSON[n(160)](e);if(r[0]?.[n(169)]?.[n(153)])return r[0][n(169)][n(153)]})[t(108)](e=>e)[t(117)]("")}}class Je{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new Je({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return Je.clone(this)}}const Xe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},et=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!Je.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),Xe)}}),tt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},nt="X-Amzn-Trace-Id",rt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},it=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!Je.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===nt.toLowerCase())??nt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[nt]=o),t({...n,request:r})})(e),rt)}}),st=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const ot={},at=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ct=(e,t=!1)=>{if(!t)return at.test(e);const n=e.split(".");for(const e of n)if(!ct(e))return!1;return!0},ut=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),dt=e=>ut.test(e)||e.startsWith("[")&&e.endsWith("]"),lt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!lt(t))return!1;return!0}return!!ct(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!dt(e)))};let ht=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),ft="";const pt={isVirtualHostableS3Bucket:lt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=ht;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function mt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}ot.aws=pt;const gt=/\d{12}\.ddb/;const yt="user-agent",bt="x-amz-user-agent",wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const kt=e=>(t,n)=>async r=>{const{request:i}=r;if(!Je.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(St)||[],a=(await e.defaultUserAgentProvider()).map(St);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&mt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?mt(e,"RETRY_MODE_ADAPTIVE","F"):mt(e,"RETRY_MODE_STANDARD","E"):mt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(gt)&&mt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":mt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":mt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":mt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&mt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))mt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(St)||[],d=await e.userAgentAppId();d&&a.push(St([`app/${d}`]));const l=(ft?[ft]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[bt]=s[bt]?`${s[yt]} ${h}`:h),s[yt]=l):s[bt]=l,t({...r,request:i})},St=e=>{const t=e[0].split("/").map(e=>e.replace(wt,"-")).join("/"),n=e[1]?.replace(vt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Et={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},At=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),It=e=>At(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,_t="__smithy_context",xt=e=>e[_t]||(e[_t]={});const Mt=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=xt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},Rt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class Pt{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Ct=e=>e=>{throw e},Tt=(e,t)=>{},Ot={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Nt=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!Je.isInstance(n.request))return e(n);const r=xt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||Ct)(i));return(o.successHandler||Tt)(a.response,i),a},Ot)}}),Lt="content-length";const $t={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Dt=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(Je.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(Lt))try{const t=n(e);r.headers={...r.headers,[Lt]:String(t)}}catch(e){}}return e({...t,request:r})}),$t)}}),Ut=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Ft=async e=>{};const Bt=e=>{if("string"==typeof e)return Bt(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},jt=e=>"object"==typeof e?"url"in e?Bt(e.url):e:Bt(e);var Ht;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Ht||(Ht={}));const qt=Ht.STANDARD,zt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Vt=["TimeoutError","RequestTimeout","RequestTimeoutException"],Gt=[500,502,503,504],Wt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Kt=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Zt=e=>429===e.$metadata?.httpStatusCode||zt.includes(e.name)||1==e.$retryable?.throttling,Qt=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Vt.includes(e.name)||Wt.includes(e?.code||"")||Kt.includes(e?.code||"")||Gt.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Qt(e.cause,t+1);class Yt{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Yt.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Zt(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Yt.setTimeoutFn=setTimeout;const Jt=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class Xt{constructor(e){this.maxAttempts=e,this.mode=Ht.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Jt({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,Jt({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class en{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Ht.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Yt,this.standardRetryStrategy=new Xt(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}class tn{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}class nn{trace(){}debug(){}info(){}warn(){}error(){}}const rn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let sn;const on=new Uint8Array(16);function an(){if(!sn&&(sn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sn(on)}const cn=[];for(let e=0;e<256;++e)cn.push((e+256).toString(16).slice(1));function un(e,t=0){return cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]}const dn=function(e,t,n){if(rn.randomUUID&&!t&&!e)return rn.randomUUID();const r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return un(r)},ln=e=>e?.body instanceof ReadableStream,hn=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),fn=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,pn=e=>{const t={error:e,errorType:mn(e)},n=bn(e.$response);return n&&(t.retryAfterHint=n),t},mn=e=>Zt(e)?"THROTTLING":Qt(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Qt(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",gn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},yn=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!fn(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=Je.isInstance(u);for(d&&(u.headers["amz-sdk-invocation-id"]=dn());;)try{d&&(u.headers["amz-sdk-request"]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=pn(t);if(o=hn(t),d&&ln(u))throw(n.logger instanceof nn?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise(e=>setTimeout(e,s))}}})(e),gn)}}),bn=e=>{if(!tn.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)},wn=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},vn=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,kn=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of wn(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of wn(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${vn(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>Sn[t.step]-Sn[e.step]||En[t.priority||"normal"]-En[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=wn(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${vn(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${vn(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${vn(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=wn(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${vn(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${vn(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${vn(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(kn()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=wn(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of wn(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=wn(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(kn());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return vn(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},Sn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},En={high:3,normal:2,low:1};class An{constructor(e){this.config=e,this.middlewareStack=kn()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const In=(_n=3e5,e=>xn(e)&&e.expiration.getTime()-Date.now()<_n);var _n;const xn=e=>void 0!==e.expiration,Mn={},Rn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Mn[e]=t,Rn[t]=e}function Pn(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Rn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Rn[r]}return t}function Cn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Mn[e[n]];return t}const Tn=e=>(new TextEncoder).encode(e),On=e=>"string"==typeof e?Tn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Nn="X-Amz-Date",Ln="X-Amz-Signature",$n="X-Amz-Security-Token",Dn="authorization",Un=Nn.toLowerCase(),Fn=[Dn,Un,"date"],Bn=Ln.toLowerCase(),jn="x-amz-content-sha256",Hn=$n.toLowerCase(),qn={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},zn=/^proxy-/,Vn=/^sec-/,Gn="AWS4-HMAC-SHA256",Wn="AWS4-HMAC-SHA256-PAYLOAD",Kn="aws4_request",Zn={},Qn=[],Yn=(e,t,n)=>`${e}/${t}/${n}/${Kn}`,Jn=(e,t,n)=>{const r=new e(t);return r.update(On(n)),r.digest()},Xn=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in qn||t?.has(s)||zn.test(s)||Vn.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},er=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===jn)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(On(t)),Cn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class tr{format(e){const t=[];for(const n of Object.keys(e)){const r=Tn(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=Tn(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ir.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!rr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Pn(e.value.replace(/\-/g,"")),1),d}}}var nr;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(nr||(nr={}));const rr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ir{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&sr(t),new ir(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&sr(e),parseInt(Cn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function sr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const or=e=>{e=Je.clone(e);for(const t of Object.keys(e.headers))Fn.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ar=e=>encodeURIComponent(e).replace(/[!'()*]/g,cr),cr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ur=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class dr{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Ut(n),this.credentialProvider=Ut(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Bn)continue;const i=ar(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ar(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${ar(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(On(n));return`${r}\n${e}\n${t}\n${Cn(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ar(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,ur(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class lr extends dr{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s}),this.headerFormatter=new tr}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Yn(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=Je.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(or(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[$n]=d.sessionToken),m.query["X-Amz-Algorithm"]=Gn,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[Nn]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Xn(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[Ln]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await er(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Yn(a,o,s??this.service),d=await er({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Cn(await l.digest()),f=[Wn,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(On(e)),Cn(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=or(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Yn(d,a,s??this.service);c.headers[Un]=u,o.sessionToken&&(c.headers[Hn]=o.sessionToken);const h=await er(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(jn,c.headers)&&this.applyChecksum&&(c.headers[jn]=h);const f=Xn(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[Dn]=`${Gn} Credential=${o.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Gn),s=new this.sha256(await n);return s.update(On(i)),Cn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Cn(await Jn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Zn)return Zn[s];for(Qn.push(s);Qn.length>50;)delete Zn[Qn.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Kn])o=await Jn(e,o,t);return Zn[s]=o})(this.sha256,e,n,t,r||this.service)}}const hr=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,In,xn):n?st(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?st(e.signer):e.regionInfoProvider?()=>st(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||lr)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await st(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||lr)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const fr=async(e,t,n)=>({operation:xt(t).operation,region:await Ut(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const pr=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},mr={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},gr="3.823.0";var yr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function br(e){return e instanceof Uint8Array?e:"string"==typeof e?yr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function wr(e){return"string"==typeof e?0===e.length:0===e.byteLength}var vr={name:"SHA-256"},kr={name:"HMAC",hash:vr},Sr=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Er={};function Ar(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Er}var Ir=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!wr(e)){var t=br(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Ar().crypto.subtle.sign(kr,t,e.toHash).then(function(e){return new Uint8Array(e)})}):wr(this.toHash)?Promise.resolve(Sr):Promise.resolve().then(function(){return Ar().crypto.subtle.digest(vr,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Ar().crypto.subtle.importKey("raw",br(e.secret),kr,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function _r(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}function xr(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Mr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Rr=64,Pr=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Cr=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Tr=Math.pow(2,53)-1,Or=function(){function e(){this.state=Int32Array.from(Cr),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>Tr)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Rr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Rr>=56){for(var r=this.bufferLength;r<Rr;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<Rr;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(Pr[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),Nr=function(){function e(e){this.secret=e,this.hash=new Or,this.reset()}return e.prototype.update=function(e){if(!wr(e)&&!this.error)try{this.hash.update(br(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return _r(this,void 0,void 0,function(){return xr(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Or,this.secret){this.outer=new Or;var e=function(e){var t=br(e);if(t.byteLength>Rr){var n=new Or;n.update(t),t=n.digest()}var r=new Uint8Array(Rr);return r.set(t),r}(this.secret),t=new Uint8Array(Rr);t.set(e);for(var n=0;n<Rr;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var Lr=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function $r(e){return e&&Lr.every(function(t){return"function"==typeof e[t]})}var Dr=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&$r(e.crypto.subtle)}(Ar())?this.hash=new Nr(e):this.hash=new Ir(e)}return e.prototype.update=function(e,t){this.hash.update(br(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),Ur=n(369),Fr=n.n(Ur);const Br=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?Fr().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};var jr;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(jr||(jr={}));!function(){function e(){this.crc32=new qr}e.prototype.update=function(e){wr(e)||this.crc32.update(br(e))},e.prototype.digest=function(){return _r(this,void 0,void 0,function(){return xr(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new qr}}();var Hr,qr=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Mr(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^zr[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),zr=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class Vr{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Gr(t),new Vr(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Gr(e),parseInt(Cn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Gr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Wr{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Vr.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Pn(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Kr,value:!0};break;case 1:t[i]={type:Kr,value:!1};break;case 2:t[i]={type:Zr,value:e.getInt8(n++)};break;case 3:t[i]={type:Qr,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Yr,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Jr,value:new Vr(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Xr,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:ei,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:ti,value:new Date(new Vr(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:ni,value:`${Cn(o.subarray(0,4))}-${Cn(o.subarray(4,6))}-${Cn(o.subarray(6,8))}-${Cn(o.subarray(8,10))}-${Cn(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Hr||(Hr={}));const Kr="boolean",Zr="byte",Qr="short",Yr="integer",Jr="long",Xr="binary",ei="string",ti="timestamp",ni="uuid",ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ii{constructor(e,t){this.headerMarshaller=new Wr(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new qr;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new qr).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class si{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class oi{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class ai{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class ci{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function ui(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class di{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new ii(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new si({messageStream:new oi({inputStream:n,decoder:this.eventStreamCodec}),deserializer:ui(t,this.utfEncoder)})}serialize(e,t){return new ai({messageStream:new ci({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class li{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new di({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=hi(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const hi=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,fi=e=>new li(e);function pi(e,t){return new Request(e,t)}function mi(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const gi={supported:void 0};class yi{static create(e){return"function"==typeof e?.handle?e:new yi(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===gi.supported&&(gi.supported=Boolean("undefined"!=typeof Request&&"keepalive"in pi("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ar(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ar(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ar(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),gi.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=pi(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new tn({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new tn({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),mi(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const bi={},wi=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);bi[n]=e,wi[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;bi[n]=r,wi[r]=n}for(let e=0;e<10;e++){bi[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;bi[t]=n,wi[n]=t}bi["+"]=62,wi[62]="+",bi["/"]=63,wi[63]="/";const vi=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in bi))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=bi[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},ki=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=vi(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Si="function"==typeof TextEncoder?new TextEncoder:null,Ei=e=>{if("string"==typeof e){if(Si)return Si.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Ai=e=>new Date(Date.now()+e),Ii=e=>tn.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,_i=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ai(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},xi=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Mi{async sign(e,t,n){if(!Je.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=xi("context",e.context),n=xi("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=xi("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:Ai(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Ii(t.$response);if(n){const r=xi("config",e.config),i=r.systemClockOffset;r.systemClockOffset=_i(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Ii(e);if(n){const e=xi("config",t.config);e.systemClockOffset=_i(n,e.systemClockOffset)}}}function Ri(e){let t;t="string"==typeof e?Tn(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=wi[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const Pi=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};const Ci="endpoints";function Ti(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Ti(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ti).join(", ")})`:JSON.stringify(e,null,2)}class Oi extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ni=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new Oi(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Oi(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new Oi(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e);var Li;!function(e){e.HTTP="http",e.HTTPS="https"}(Li||(Li={}));const $i={[Li.HTTP]:80,[Li.HTTPS]:443},Di={booleanEquals:(e,t)=>e===t,getAttr:Ni,isSet:e=>null!=e,isValidHostLabel:ct,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(Li).includes(c))return null;const u=dt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${$i[c]}`)||"string"==typeof e&&e.includes(`${r}:${$i[c]}`)?`:${$i[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},Ui=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Ni(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},Fi=(e,t,n)=>{if("string"==typeof e)return Ui(e,n);if(e.fn)return Bi(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Oi(`'${t}': ${String(e)} is not a string, function or reference.`)},Bi=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:Fi(e,"arg",n)),i=e.split(".");return i[0]in ot&&null!=i[1]?ot[i[0]][i[1]](...r):Di[e](...r)},ji=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Oi(`'${e}' is already defined in Reference Record.`);const r=Bi(t,n);return n.logger?.debug?.(`${Ci} evaluateCondition: ${Ti(t)} = ${Ti(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Hi=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=ji(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${Ci} assign: ${i.name} := ${Ti(i.value)}`))}return{result:!0,referenceRecord:n}},qi=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=Fi(e,"Header value entry",t);if("string"!=typeof r)throw new Oi(`Header '${n}' value '${r}' is not a string`);return r})}),{}),zi=(e,t)=>{if(Array.isArray(e))return e.map(e=>zi(e,t));switch(typeof e){case"string":return Ui(e,t);case"object":if(null===e)throw new Oi(`Unexpected endpoint property: ${e}`);return Vi(e,t);case"boolean":return e;default:throw new Oi("Unexpected endpoint property type: "+typeof e)}},Vi=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:zi(r,t)}),{}),Gi=(e,t)=>{const n=Fi(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new Oi("Endpoint URL must be a string, got "+typeof n)},Wi=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${Ci} Resolving endpoint from template: ${Ti(r)}`),{...null!=u&&{headers:qi(u,o)},...null!=c&&{properties:Vi(c,o)},url:Gi(a,o)}},Ki=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(i)throw new Oi(Fi(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Zi=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(i)return Qi(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Qi=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Wi(n,t);if(e)return e}else if("error"===n.type)Ki(n,t);else{if("tree"!==n.type)throw new Oi(`Unknown endpoint rule: ${n}`);{const e=Zi(n,t);if(e)return e}}throw new Oi("Rules evaluation failed")},Yi="required",Ji="fn",Xi="argv",es="ref",ts=!0,ns="isSet",rs="booleanEquals",is="error",ss="endpoint",os="tree",as="PartitionResult",cs={[Yi]:!1,type:"String"},us={[Yi]:!0,default:!1,type:"Boolean"},ds={[es]:"Endpoint"},ls={[Ji]:rs,[Xi]:[{[es]:"UseFIPS"},!0]},hs={[Ji]:rs,[Xi]:[{[es]:"UseDualStack"},!0]},fs={},ps={[Ji]:"getAttr",[Xi]:[{[es]:as},"supportsFIPS"]},ms={[Ji]:rs,[Xi]:[!0,{[Ji]:"getAttr",[Xi]:[{[es]:as},"supportsDualStack"]}]},gs=[ls],ys=[hs],bs=[{[es]:"Region"}],ws={version:"1.0",parameters:{Region:cs,UseDualStack:us,UseFIPS:us,Endpoint:cs},rules:[{conditions:[{[Ji]:ns,[Xi]:[ds]}],rules:[{conditions:gs,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:is},{rules:[{conditions:ys,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:is},{endpoint:{url:ds,properties:fs,headers:fs},type:ss}],type:os}],type:os},{rules:[{conditions:[{[Ji]:ns,[Xi]:bs}],rules:[{conditions:[{[Ji]:"aws.partition",[Xi]:bs,assign:as}],rules:[{conditions:[ls,hs],rules:[{conditions:[{[Ji]:rs,[Xi]:[ts,ps]},ms],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:is}],type:os},{conditions:gs,rules:[{conditions:[{[Ji]:rs,[Xi]:[ps,ts]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"FIPS is enabled but this partition does not support FIPS",type:is}],type:os},{conditions:ys,rules:[{conditions:[ms],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"DualStack is enabled but this partition does not support DualStack",type:is}],type:os},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os}],type:os},{error:"Invalid Configuration: Missing Region",type:is}],type:os}]},vs=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ks=(e,t={})=>vs.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${Ci} Initial EndpointParams: ${Ti(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new Oi(`Missing required parameter: '${e}'`);const c=Qi(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Ci} Resolved endpoint: ${Ti(c)}`),c})(ws,{endpointParams:e,logger:t.logger}));ot.aws=pt;const Ss=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Es=["in-region","cross-region","mobile","standard","legacy"],As=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?Fr().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Is=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(As()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Es.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Ss),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??vi,base64Encoder:e?.base64Encoder??Ri,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ks,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pr,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Mi}],logger:e?.logger??new nn,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Bt,utf8Decoder:e?.utf8Decoder??Tn,utf8Encoder:e?.utf8Encoder??Pi}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ei,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Br({serviceId:r.serviceId,clientVersion:gr}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??fi,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:yi.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||qt),sha256:e?.sha256??Dr,streamCollector:e?.streamCollector??ki,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i};var _s;!function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(_s||(_s={}));const xs=e=>Object.assign((e=>{const t=[];for(const n in _s){const r=_s[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),Ms=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),xs(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class Rs extends An{config;constructor(...[e]){const t=Is(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=st(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ut(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ut(n)()===Ht.ADAPTIVE?new en(i):new Xt(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return It(t);const e=await t();return It(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!At(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>jt(await Ut(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:Ut(r??!1),useFipsEndpoint:Ut(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Ft(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=hr(e);return Object.assign(t,{authSchemePreference:Ut(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Ms(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(kt(l),Et)}})),this.middlewareStack.use(yn(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(et(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},tt)}})),this.middlewareStack.use(it(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(Mt(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Rt)}}))(this.config,{httpAuthSchemeParametersProvider:fr,identityProviderConfigProvider:async e=>new Pt({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}const Ps=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],Cs={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ts={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Os(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(tn.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:Ps(/^x-[\w-]+-request-?id$/,n),extendedRequestId:Ps(/^x-[\w-]+-id-2$/,n),cfId:Ps(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),Cs),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),Ts)}}}const Ns=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ls=/(\d+\.){3}\d+/,$s=/\.\./,Ds=e=>Ns.test(e)&&!Ls.test(e)&&!$s.test(e),Us=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Fs=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},Bs=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Fs(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Us(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Ds(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},js=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Ft(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jt(e)),n.isCustomEndpoint=!0)}const i=await Bs(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=xt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},Hs={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ts.name},qs=(e,t)=>({applyToStack:n=>{n.addRelativeTo(js({config:e,instructions:t}),Hs)}}),zs=e=>"function"==typeof e?e():e;class Vs{constructor(e,t){this.name=e,this.traits=t}}class Gs extends Vs{constructor(e,t,n){super(e,t),this.name=e,this.traits=t,this.valueSchema=n,this.symbol=Gs.symbol}static[Symbol.hasInstance](e){const t=Gs.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Gs.symbol}return t}}Gs.symbol=Symbol.for("@smithy/core/schema::ListSchema");class Ws extends Vs{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.keySchema=n,this.valueSchema=r,this.symbol=Ws.symbol}static[Symbol.hasInstance](e){const t=Ws.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Ws.symbol}return t}}Ws.symbol=Symbol.for("@smithy/core/schema::MapSchema");const Ks={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class Zs extends Vs{constructor(e,t,n){super(e,n),this.name=e,this.schemaRef=t,this.traits=n,this.symbol=Zs.symbol}static[Symbol.hasInstance](e){const t=Zs.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Zs.symbol}return t}}Zs.symbol=Symbol.for("@smithy/core/schema::SimpleSchema");class Qs extends Vs{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.memberNames=n,this.memberList=r,this.symbol=Qs.symbol,this.members={};for(let e=0;e<n.length;++e)this.members[n[e]]=Array.isArray(r[e])?r[e]:[r[e],0]}static[Symbol.hasInstance](e){const t=Qs.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Qs.symbol}return t}}Qs.symbol=Symbol.for("@smithy/core/schema::StructureSchema");class Ys{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Ys.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=zs(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,Ys.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Ys)return this.name=i.name,this.traits=i.traits,this._isMemberSchema=i._isMemberSchema,this.schema=i.schema,this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.ref=i.ref,void(this.memberName=t??i.memberName);if(this.schema=zs(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=("object"==typeof this.schema?this.schema?.name:void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(!0)} must initialize with memberName argument.`)}static[Symbol.hasInstance](e){const t=Ys.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Ys.symbol}return t}static of(e,t){return e instanceof Ys?e:new Ys(e,t)}static translateTraits(e){if("object"==typeof e)return e;const t={};return 1&~(e|=0)||(t.httpLabel=1),1==(e>>1&1)&&(t.idempotent=1),1==(e>>2&1)&&(t.idempotencyToken=1),1==(e>>3&1)&&(t.sensitive=1),1==(e>>4&1)&&(t.httpPayload=1),1==(e>>5&1)&&(t.httpResponseCode=1),1==(e>>6&1)&&(t.httpQueryParams=1),t}static memberFrom(e,t){return e instanceof Ys?(e.memberName=t,e._isMemberSchema=!0,e):new Ys(e,t)}getSchema(){return this.schema instanceof Ys?this.schema=this.schema.getSchema():this.schema instanceof Zs?zs(this.schema.schemaRef):zs(this.schema)}getName(e=!1){return!e&&this.name&&this.name.includes("#")?this.name.split("#")[1]:this.name||void 0}getMemberName(){if(!this.isMemberSchema())throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(!0)}`);return this.memberName}isMemberSchema(){return this._isMemberSchema}isUnitSchema(){return"unit"===this.getSchema()}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=Ks.LIST_MODIFIER&&e<Ks.MAP_MODIFIER:e instanceof Gs}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Ks.MAP_MODIFIER&&e<=255:e instanceof Ws}isDocumentSchema(){return this.getSchema()===Ks.DOCUMENT}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Qs}isBlobSchema(){return this.getSchema()===Ks.BLOB||this.getSchema()===Ks.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Ks.TIMESTAMP_DEFAULT&&e<=Ks.TIMESTAMP_EPOCH_SECONDS}isStringSchema(){return this.getSchema()===Ks.STRING}isBooleanSchema(){return this.getSchema()===Ks.BOOLEAN}isNumericSchema(){return this.getSchema()===Ks.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Ks.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Ks.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Ks.STREAMING_BLOB}isIdempotencyToken(){return"number"==typeof this.traits?!(4&~this.traits):"object"==typeof this.traits&&!!this.traits.idempotencyToken}getMergedTraits(){return this.normalizedTraits||(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()}),this.normalizedTraits}getMemberTraits(){return Ys.translateTraits(this.memberTraits)}getOwnTraits(){return Ys.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return Ys.memberFrom([Ks.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?Ys.memberFrom([63&e,0],"key"):Ys.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return Ys.memberFrom([63&e,0],"value");if(this.isListSchema())return Ys.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return Ys.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return Ys.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return Ys.memberFrom([Ks.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return e in this.getSchema().members}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!(e in t.members))throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a member with name=${e}.`);return Ys.memberFrom(t.members[e],e)}if(this.isDocumentSchema())return Ys.memberFrom([Ks.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have members.`)}getMemberSchemas(){const{schema:e}=this,t=e;if(!t||"object"!=typeof t)return{};if("members"in t){const e={};for(const n of t.memberNames)e[n]=this.getMemberSchema(n);return e}return{}}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],Ys.memberFrom([e.memberList[t],0],e.memberNames[t])]}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Ks).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Ks.MAP_MODIFIER:return`${r}Map`;case Ks.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Ys.symbol=Symbol.for("@smithy/core/schema::NormalizedSchema");const Js="***SensitiveInformation***";function Xs(e,t){if(null==t)return t;const n=Ys.of(e);if(n.getMergedTraits().sensitive)return Js;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Js}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Js}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=Xs(i,e[t]));return r}return t}class eo{constructor(){this.middlewareStack=kn()}static classBuilder(){return new to}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[_t]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class to{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=void 0,this._outputFilterSensitiveLog=void 0,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends eo{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(e._operationSchema?Xs.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?Xs.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const no="***SensitiveInformation***";class ro extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return ro.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===ro?ro.isInstance(e):!!ro.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const io=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e};class so extends ro{constructor(e){super(e),Object.setPrototypeOf(this,so.prototype)}}class oo extends so{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,oo.prototype)}}var ao;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(ao||(ao={}));class co extends so{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,co.prototype)}}class uo extends so{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,uo.prototype)}}class lo extends so{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,lo.prototype)}}class ho extends so{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,ho.prototype)}}class fo extends so{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,fo.prototype)}}class po extends so{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,po.prototype)}}class mo extends so{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,mo.prototype)}}var go;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(go||(go={}));var yo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(yo||(yo={}));var bo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(bo||(bo={}));var wo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(wo||(wo={}));var vo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(vo||(vo={}));var ko,So;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(ko||(ko={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(So||(So={}));var Eo,Ao;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Eo||(Eo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Ao||(Ao={}));var Io;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Io||(Io={}));var _o,xo,Mo,Ro,Po,Co;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(_o||(_o={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(xo||(xo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(Mo||(Mo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Po||(Po={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Co||(Co={}));class To extends so{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,To.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Oo extends so{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}class No extends so{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,No.prototype)}}var Lo,$o,Do,Uo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));class Fo extends so{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Fo.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Bo,jo,Ho;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));const qo=e=>({...e,...e.body&&{body:no}}),zo=e=>({...e,...e.body&&{body:no}}),Vo=e=>({...e,...e.body&&{body:no}}),Go=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}});class Wo extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?Wo.mutate(vi(e)):Wo.mutate(Tn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Wo.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?Ri(e):Pi(e)}(this,e)}}const Ko=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Wo.mutate(e);if(!e)return Wo.mutate(new Uint8Array);const n=t.streamCollector(e);return Wo.mutate(await n)},Zo=(e,t)=>((e,t)=>Ko(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),Qo=async(e,t)=>{const n=await Zo(e,t);return n.message=n.message??n.Message,n};function Yo(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Jo(e,t){return new Xo(e,t)}class Xo{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new Je({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>Yo(e)).join("/"):Yo(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}function ea(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,na(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?ra(r,null,s,e):r[e]=s[e];return r}const ta=(e,t)=>{const n={};for(const r in t)ra(n,e,t,r);return n},na=(e,t,n)=>ea(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),ra=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=ia,o=sa,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},ia=e=>null!=e,sa=e=>e,oa=e=>null!=e,aa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),ca=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),ua=e=>da(e,32),da=(e,t)=>{const n=ca(e);if(void 0!==n&&la(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},la=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ha=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return pa.warn(fa(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},fa=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),pa={warn:console.warn},ma=async(e,t)=>{const n=Jo(e,t),r=ea({},oa,{[Ga]:e[Va]||"application/octet-stream",[za]:e[za],[nc]:e[Qa],[Xa]:e[Wa],[ec]:e[Ka],[tc]:e[Za]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{const n=Jo(e,t),r=ea({},oa,{[Ga]:e[Va]||"application/octet-stream",[Ya]:e[za],[nc]:e[Qa],[Xa]:e[Wa],[ec]:e[Ka],[tc]:e[Za]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=ea({$metadata:qa(e),[Va]:[,e.headers[Ga]],[Za]:[,e.headers[tc]]}),r=await Ko(e.body,t);return n.body=r,n},ba=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=ea({$metadata:qa(e),[Va]:[,e.headers[Ja]],[Za]:[,e.headers[tc]]}),r=e.body;return n.body=Na(r,t),n},wa=async(e,t)=>{const n={...e,body:await Qo(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await Sa(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Aa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Pa(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ta(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Oa(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Ia(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await _a(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Ma(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ca(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await xa(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Ea(n,t);default:const i=n.body;return va({output:e,parsedBody:i,errorCode:r})}},va=(ka=so,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=aa(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw io(o,t)})({output:e,parsedBody:t,exceptionCtor:ka,errorCode:n})});var ka;const Sa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new oo({$metadata:qa(e),...n});return io(s,e.body)},Ea=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new ho({$metadata:qa(e),...n});return io(s,e.body)},Aa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new co({$metadata:qa(e),...n});return io(s,e.body)},Ia=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha,originalStatusCode:ua,resourceName:ha});Object.assign(n,i);const s=new To({$metadata:qa(e),...n});return io(s,e.body)},_a=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new Oo({$metadata:qa(e),...n});return io(s,e.body)},xa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha,originalMessage:ha,originalStatusCode:ua});Object.assign(n,i);const s=new Fo({$metadata:qa(e),...n});return io(s,e.body)},Ma=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new No({$metadata:qa(e),...n});return io(s,e.body)},Ra=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new fo({$metadata:qa(e),...n});return io(s,e.body)},Pa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new po({$metadata:qa(e),...n});return io(s,e.body)},Ca=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new mo({$metadata:qa(e),...n});return io(s,e.body)},Ta=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new uo({$metadata:qa(e),...n});return io(s,e.body)},Oa=async(e,t)=>{const n=ea({}),r=e.body,i=ta(r,{message:ha});Object.assign(n,i);const s=new lo({$metadata:qa(e),...n});return io(s,e.body)},Na=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Ua(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await ja(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Ba(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Da(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Fa(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Aa(n,t)},$a=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return xa(n,t)},Da=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Ma(n,t)},Ua=async(e,t)=>{const n={},r=await Zo(e.body,t);return Object.assign(n,Ha(r,t)),n},Fa=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Ca(n,t)},Ba=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Ta(n,t)},ja=async(e,t)=>{const n={...e,body:await Zo(e.body,t)};return Oa(n,t)},Ha=(e,t)=>ta(e,{bytes:t.base64Decoder}),qa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),za="accept",Va="contentType",Ga="content-type",Wa="guardrailIdentifier",Ka="guardrailVersion",Za="performanceConfigLatency",Qa="trace",Ya="x-amzn-bedrock-accept",Ja="x-amzn-bedrock-content-type",Xa="x-amzn-bedrock-guardrailidentifier",ec="x-amzn-bedrock-guardrailversion",tc="x-amzn-bedrock-performanceconfig-latency",nc="x-amzn-bedrock-trace";class rc extends(eo.classBuilder().ep(mr).m(function(e,t,n,r){return[Os(n,this.serialize,this.deserialize),qs(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(Vo,Go).ser(ga).de(ba).build()){}class ic extends(eo.classBuilder().ep(mr).m(function(e,t,n,r){return[Os(n,this.serialize,this.deserialize),qs(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(qo,zo).ser(ma).de(ya).build()){}const sc=ac;function oc(){const e=["getReader","_readAsyncIterableResponse","body","Human:\n","utf-8","_processProxyRequest","ai.aws.apiUrl","signal","61618CHaIud","anthropic.claude-v2","parse","<<SYS>>\n","define","generations","_prepareRequestParameters","_getGeneratedText","data","AI_ERROR_UNSUPPORTED_MODEL","join","pluginName","sendRequest","_readStaticResponse","_apiUrl","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","chunk","generation","ai.aws.requestParameters","6BUgtNd","json","_readStreamableResponse","get","bytes","filter","abortController","application/json","stringify","2860515ntMWWK","cohere.command","decode","20KLXeim","ai.aws.requestHeaders","8amdMTJ","bedrock-2023-05-31","editor","test","locale","getModelFamily","\n[/INST]","POST","AWSTextAdapter","config","meta.llama","preparePrompt","ai21.j2","_prepareRequestHeaders","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","completion","Instruction:\n","read","_bedrockClientConfig","send","_requestParameters","split","completions","4609629nuPGDD","text","1870363VNlUby","\nYou must keep the text formatting.\n\nContent:\n","\n<</SYS>>\n[INST]\n","843uIelXr","1172795VPzApD","_requestHeaders","resolve","ai.aws.bedrockClientConfig","_processAWSRequest","\n\nAssistant:","map","991760ofWqQo","anthropic.claude","length","254kWvjBT"];return(oc=function(){return e})()}function ac(e,t){const n=oc();return(ac=function(e,t){return n[e-=271]})(e,t)}!function(e){const t=ac,n=e();for(;;)try{if(275842===parseInt(t(282))/1+-parseInt(t(273))/2*(parseInt(t(343))/3)+parseInt(t(351))/4+parseInt(t(344))/5*(-parseInt(t(301))/6)+parseInt(t(310))/7+-parseInt(t(315))/8*(parseInt(t(338))/9)+parseInt(t(313))/10*(parseInt(t(340))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oc);class cc extends We{[sc(296)];[sc(345)];[sc(333)];[sc(335)];static get[sc(293)](){return sc(323)}constructor(e){const t=sc;super(e),e[t(324)][t(304)](t(300))||e[t(324)][t(286)](t(300),{model:t(283),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(316),stream:!0}),this[t(296)]=e[t(324)][t(304)](t(280)),this[t(333)]=e[t(324)][t(304)](t(347)),this[t(345)]=e[t(324)][t(304)](t(314)),this[t(335)]=e[t(324)][t(304)](t(300))}async[sc(294)]({query:e,context:t,onData:n,actionId:r}){const i=sc,{model:s,stream:o,...a}=await this[i(288)](this[i(335)],r),c={prompt:await this[i(326)](e,t,s,r),...a};this[i(296)]?await this[i(279)](c,s,o,n,r):await this[i(348)](c,s,o,n)}async[sc(326)](e,t,n,r){const i=sc;let s,o;return t?(s=i(297),o=i(331)+e+i(341)+t):(s=i(329),o=e),i(325)==this[i(320)](n)?i(285)+s+i(342)+o+i(321):i(277)+s+"\n"+o+i(349)}[sc(320)](e){const t=sc;if(/^anthropic\.claude/[t(318)](e))return t(271);if(/^ai21\.j2/[t(318)](e))return t(327);if(/^cohere\.command/[t(318)](e))return t(311);if(/^meta\.llama/[t(318)](e))return t(325);throw new b(v(this[t(317)][t(319)],t(291),e))}async[sc(279)](e,t,n,r,i){const s=sc,o={method:s(322),headers:await this[s(328)](this[s(345)],i),body:JSON[s(309)]({...e,model:t,stream:n}),signal:this[s(307)][s(281)]},a=await fetch(this[s(296)],o);n?await this[s(303)](a,t,r):await this[s(295)](a,t,r)}async[sc(348)](e,t,n,r){const i=sc,s=new Rs(this[i(333)]),o={body:JSON[i(309)](e),contentType:i(308),accept:i(308),modelId:t};let a;if(n){const e=new rc(o);a=await s[i(334)](e,{abortSignal:this[i(307)][i(281)]}),await this[i(275)](a,t,r)}else{const e=new ic(o);a=await s[i(334)](e,{abortSignal:this[i(307)][i(281)]}),await this[i(295)](a,t,r)}}async[sc(275)](e,t,n){const r=sc,i=e[r(276)],s=new TextDecoder(r(278));let o="";for await(const e of i)if(e[r(298)]){const i=s[r(312)](e[r(298)][r(305)]),a=JSON[r(284)](i);o+=this[r(289)](a,t),n(o)}return Promise[r(346)]()}async[sc(303)](e,t,n){const r=sc,i=e[r(276)],s=new TextDecoder(r(278)),o=i[r(274)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(332)]();if(u=e,u)break;const d=(a+s[r(312)](i))[r(336)]("\n")[r(350)](e=>{const t=r;try{return a="",JSON[t(284)](e)}catch{return a=e,null}})[r(306)](e=>null!==e);d[r(272)]&&(c+=d[r(350)](e=>this[r(289)](e,t))[r(292)](""),n(c))}return Promise[r(346)]()}async[sc(295)](e,t,n){const r=sc;let i;return i=e instanceof Response?await e[r(302)]():JSON[r(284)](new TextDecoder(r(278))[r(312)](e[r(276)])),n(this[r(289)](i,t)),Promise[r(346)]()}[sc(289)](e,t){const n=sc;switch(this[n(320)](t)){case n(271):return e[n(330)];case n(327):return e[n(337)][0][n(290)][n(339)];case n(311):return e[n(287)][0][n(339)];case n(325):return e[n(299)]}}}function uc(e,t){var n=dc();return(uc=function(e,t){return n[e-=279]})(e,t)}function dc(){var e=["3793668aBZpQc","453691raajHI","4hlqdkG","4179025REoEgW","402028jpTGhW","1195953sJuQZE","245763KtsIXs","170RLmrWo","184tcBMHT","7jfoExi","299570mAKLTH"];return(dc=function(){return e})()}!function(e){for(var t=uc,n=e();;)try{if(450777===-parseInt(t(285))/1+-parseInt(t(283))/2+-parseInt(t(289))/3+-parseInt(t(286))/4*(-parseInt(t(287))/5)+parseInt(t(284))/6*(-parseInt(t(282))/7)+-parseInt(t(281))/8*(-parseInt(t(279))/9)+-parseInt(t(280))/10*(-parseInt(t(288))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(dc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|