/*!
 * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.CKEditor5=e():(t.CKEditor5=t.CKEditor5||{},t.CKEditor5.aiSidebarAdapter=e())}(self,()=>(()=>{"use strict";var t={d:(e,o)=>{for(var i in o)t.o(o,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:o[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{default:()=>o});const o={AiSidebarAdapter:class{constructor(t){this.editor=t,void 0!==this.editor.sourceElement&&("sidebar"===this.editor.config._config.ai.container.type&&(this.editor.config._config.ai.container.element=document.getElementById(this.editor.sourceElement.id+"-ck-ai-sidebar")),this.editor.config._config.ai.custom&&this.editor.config._config.ai.custom.context&&(this.editor.config._config.ai.chat.context.sources=[{id:"custom-context",label:"Drupal context",getResources:async t=>this.editor.config._config.ai.custom.context}]))}static get pluginName(){return"AiSidebarAdapter"}}};return e=e.default})());