@ckeditor/ckeditor5-image 28.0.0 → 30.0.0
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/LICENSE.md +1 -1
- package/README.md +3 -3
- package/build/image.js +1 -1
- package/build/translations/ar.js +1 -0
- package/build/translations/ast.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/eo.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/eu.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/km.js +1 -0
- package/build/translations/kn.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/ne.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/si.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +233 -0
- package/lang/contexts.json +3 -0
- package/lang/translations/ar.po +12 -0
- package/lang/translations/ast.po +12 -0
- package/lang/translations/az.po +12 -0
- package/lang/translations/bg.po +12 -0
- package/lang/translations/cs.po +12 -0
- package/lang/translations/da.po +12 -0
- package/lang/translations/de-ch.po +12 -0
- package/lang/translations/de.po +15 -3
- package/lang/translations/el.po +12 -0
- package/lang/translations/en-au.po +12 -0
- package/lang/translations/en-gb.po +12 -0
- package/lang/translations/en.po +12 -0
- package/lang/translations/eo.po +12 -0
- package/lang/translations/es.po +12 -0
- package/lang/translations/et.po +12 -0
- package/lang/translations/eu.po +12 -0
- package/lang/translations/fa.po +12 -0
- package/lang/translations/fi.po +12 -0
- package/lang/translations/fr.po +12 -0
- package/lang/translations/gl.po +12 -0
- package/lang/translations/he.po +12 -0
- package/lang/translations/hi.po +12 -0
- package/lang/translations/hr.po +12 -0
- package/lang/translations/hu.po +13 -1
- package/lang/translations/id.po +21 -9
- package/lang/translations/it.po +12 -0
- package/lang/translations/ja.po +12 -0
- package/lang/translations/km.po +12 -0
- package/lang/translations/kn.po +12 -0
- package/lang/translations/ko.po +12 -0
- package/lang/translations/ku.po +12 -0
- package/lang/translations/lt.po +12 -0
- package/lang/translations/lv.po +12 -0
- package/lang/translations/nb.po +12 -0
- package/lang/translations/ne.po +12 -0
- package/lang/translations/nl.po +14 -2
- package/lang/translations/no.po +12 -0
- package/lang/translations/pl.po +20 -8
- package/lang/translations/pt-br.po +12 -0
- package/lang/translations/pt.po +12 -0
- package/lang/translations/ro.po +21 -9
- package/lang/translations/ru.po +12 -0
- package/lang/translations/si.po +12 -0
- package/lang/translations/sk.po +12 -0
- package/lang/translations/sq.po +12 -0
- package/lang/translations/sr-latn.po +12 -0
- package/lang/translations/sr.po +12 -0
- package/lang/translations/sv.po +12 -0
- package/lang/translations/th.po +12 -0
- package/lang/translations/tk.po +12 -0
- package/lang/translations/tr.po +12 -0
- package/lang/translations/ug.po +12 -0
- package/lang/translations/uk.po +12 -0
- package/lang/translations/vi.po +12 -0
- package/lang/translations/zh-cn.po +12 -0
- package/lang/translations/zh.po +12 -0
- package/package.json +36 -29
- package/src/autoimage.js +9 -4
- package/src/image/converters.js +191 -15
- package/src/image/imageblockediting.js +182 -0
- package/src/image/imageediting.js +13 -70
- package/src/image/imageinlineediting.js +207 -0
- package/src/image/imagetypecommand.js +105 -0
- package/src/image/insertimagecommand.js +77 -10
- package/src/image/ui/utils.js +5 -4
- package/src/image/utils.js +65 -121
- package/src/image.js +7 -19
- package/src/imageblock.js +46 -0
- package/src/imagecaption/imagecaptionediting.js +183 -227
- package/src/imagecaption/imagecaptionui.js +78 -0
- package/src/imagecaption/toggleimagecaptioncommand.js +165 -0
- package/src/imagecaption/utils.js +25 -40
- package/src/imagecaption.js +3 -2
- package/src/imageinline.js +46 -0
- package/src/imageinsert/imageinsertui.js +5 -6
- package/src/imageinsert.js +16 -4
- package/src/imageresize/imageresizebuttons.js +1 -1
- package/src/imageresize/imageresizeediting.js +21 -8
- package/src/imageresize/imageresizehandles.js +30 -8
- package/src/imageresize/resizeimagecommand.js +8 -5
- package/src/imagestyle/converters.js +26 -17
- package/src/imagestyle/imagestylecommand.js +73 -33
- package/src/imagestyle/imagestyleediting.js +113 -52
- package/src/imagestyle/imagestyleui.js +197 -31
- package/src/imagestyle/utils.js +300 -85
- package/src/imagestyle.js +218 -47
- package/src/imagetextalternative/imagetextalternativecommand.js +10 -7
- package/src/imagetextalternative/imagetextalternativeediting.js +9 -1
- package/src/imagetextalternative/imagetextalternativeui.js +2 -2
- package/src/imagetextalternative.js +1 -1
- package/src/imagetoolbar.js +33 -11
- package/src/imageupload/imageuploadediting.js +90 -30
- package/src/imageupload/imageuploadprogress.js +17 -9
- package/src/imageupload/imageuploadui.js +1 -1
- package/src/imageupload/uploadimagecommand.js +50 -24
- package/src/imageupload/utils.js +3 -2
- package/src/imageupload.js +1 -1
- package/src/imageutils.js +342 -0
- package/src/pictureediting.js +149 -0
- package/theme/image.css +101 -21
- package/theme/imagecaption.css +24 -2
- package/theme/imageresize.css +11 -0
- package/theme/imagestyle.css +76 -0
- package/theme/imageuploadicon.css +8 -2
- package/theme/imageuploadprogress.css +12 -8
- package/CHANGELOG.md +0 -423
- package/build/image.js.map +0 -1
package/build/image.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://CKEditor5.image/webpack/bootstrap","webpack://CKEditor5.image/../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://CKEditor5.image/./theme/image.css","webpack://CKEditor5.image/./theme/imagecaption.css","webpack://CKEditor5.image/./theme/imageinsert.css","webpack://CKEditor5.image/./theme/imageinsertformrowview.css","webpack://CKEditor5.image/./theme/imageresize.css","webpack://CKEditor5.image/./theme/imagestyle.css","webpack://CKEditor5.image/./theme/imageuploadicon.css","webpack://CKEditor5.image/./theme/imageuploadloader.css","webpack://CKEditor5.image/./theme/imageuploadprogress.css","webpack://CKEditor5.image/./theme/textalternativeform.css","webpack://CKEditor5.image//Users/pomek/Projects/ckeditor/ckeditor5/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://CKEditor5.image/../ckeditor5-ui/theme/components/responsive-form/responsiveform.css?6f59","webpack://CKEditor5.image/./src/autoimage.js","webpack://CKEditor5.image/./src/image.js","webpack://CKEditor5.image/./src/image/converters.js","webpack://CKEditor5.image/./src/image/imageediting.js","webpack://CKEditor5.image/./src/image/imageloadobserver.js","webpack://CKEditor5.image/./src/image/insertimagecommand.js","webpack://CKEditor5.image/./src/image/ui/utils.js","webpack://CKEditor5.image/./src/image/utils.js","webpack://CKEditor5.image/./src/imagecaption.js","webpack://CKEditor5.image/./src/imagecaption/imagecaptionediting.js","webpack://CKEditor5.image/./src/imagecaption/utils.js","webpack://CKEditor5.image/./src/imageinsert.js","webpack://CKEditor5.image/./src/imageinsert/imageinsertui.js","webpack://CKEditor5.image/./src/imageinsert/ui/imageinsertformrowview.js","webpack://CKEditor5.image/./src/imageinsert/ui/imageinsertpanelview.js","webpack://CKEditor5.image/./src/imageinsert/utils.js","webpack://CKEditor5.image/./src/imageresize.js","webpack://CKEditor5.image/./src/imageresize/imageresizebuttons.js","webpack://CKEditor5.image/./src/imageresize/imageresizeediting.js","webpack://CKEditor5.image/./src/imageresize/imageresizehandles.js","webpack://CKEditor5.image/./src/imageresize/resizeimagecommand.js","webpack://CKEditor5.image/./src/imagestyle.js","webpack://CKEditor5.image/./src/imagestyle/converters.js","webpack://CKEditor5.image/./src/imagestyle/imagestylecommand.js","webpack://CKEditor5.image/./src/imagestyle/imagestyleediting.js","webpack://CKEditor5.image/./src/imagestyle/imagestyleui.js","webpack://CKEditor5.image/./src/imagestyle/utils.js","webpack://CKEditor5.image/./src/imagetextalternative.js","webpack://CKEditor5.image/./src/imagetextalternative/imagetextalternativecommand.js","webpack://CKEditor5.image/./src/imagetextalternative/imagetextalternativeediting.js","webpack://CKEditor5.image/./src/imagetextalternative/imagetextalternativeui.js","webpack://CKEditor5.image/./src/imagetextalternative/ui/textalternativeformview.js","webpack://CKEditor5.image/./src/imagetoolbar.js","webpack://CKEditor5.image/./src/imageupload.js","webpack://CKEditor5.image/./src/imageupload/imageuploadediting.js","webpack://CKEditor5.image/./src/imageupload/imageuploadprogress.js","webpack://CKEditor5.image/./src/imageupload/imageuploadui.js","webpack://CKEditor5.image/./src/imageupload/uploadimagecommand.js","webpack://CKEditor5.image/./src/imageupload/utils.js","webpack://CKEditor5.image/./src/index.js","webpack://CKEditor5.image/./theme/icons/image_placeholder.svg","webpack://CKEditor5.image/./theme/image.css?b019","webpack://CKEditor5.image/./theme/imagecaption.css?d13e","webpack://CKEditor5.image/./theme/imageinsert.css?1615","webpack://CKEditor5.image/./theme/imageinsertformrowview.css?f637","webpack://CKEditor5.image/./theme/imageresize.css?a49e","webpack://CKEditor5.image/./theme/imagestyle.css?70a5","webpack://CKEditor5.image/./theme/imageuploadicon.css?126a","webpack://CKEditor5.image/./theme/imageuploadloader.css?4aa6","webpack://CKEditor5.image/./theme/imageuploadprogress.css?445e","webpack://CKEditor5.image/./theme/textalternativeform.css?724d","webpack://CKEditor5.image/delegated ./clipboard.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./core.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./engine.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./ui.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./undo.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./upload.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./utils.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/delegated ./widget.js from dll-reference CKEditor5.dll","webpack://CKEditor5.image/external \"CKEditor5.dll\""],"names":[],"mappings":";;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,qDAAqD,aAAa,QAAQ,kBAAkB,WAAW,4BAA4B,+BAA+B,UAAU,oCAAoC,wCAAwC,aAAa,QAAQ,kBAAkB,WAAW,4BAA4B,+BAA+B,WAAW,qDAAqD,mDAAmD,uBAAuB,gCAAgC,6BAA6B,aAAa,uGAAuG,uCAAuC,oCAAoC,uBAAuB,UAAU,2CAA2C,8CAA8C,yDAAyD,6DAA6D,YAAY,WAAW,4EAA4E,mBAAmB,iGAAiG,mCAAmC,mCAAmC,gBAAgB,SAAS,iDAAiD,0OAA0O,cAAc,yMAAyM,oDAAoD,C;;;;;;;;;;;ACAvzD,qCAAqC,cAAc,WAAW,kBAAkB,gBAAgB,uBAAuB,cAAc,cAAc,eAAe,eAAe,gEAAgE,gBAAgB,C;;;;;;;;;;;ACAjQ,gDAAgD,sBAAsB,oBAAoB,sBAAsB,WAAW,yBAAyB,aAAa,gBAAgB,oBAAoB,C;;;;;;;;;;;ACArM,6CAA6C,gCAAgC,sCAAsC,cAAc,WAAW,uCAAuC,sBAAsB,sCAAsC,oDAAoD,UAAU,SAAS,YAAY,C;;;;;;;;;;;ACAlU,iDAAiD,aAAa,iBAAiB,aAAa,mBAAmB,iBAAiB,8BAA8B,iCAAiC,YAAY,kDAAkD,sCAAsC,sIAAsI,uBAAuB,+EAA+E,2BAA2B,C;;;;;;;;;;;ACA1iB,mDAAmD,eAAe,cAAc,sBAAsB,qCAAqC,WAAW,4CAA4C,cAAc,oFAAoF,wCAAwC,oFAAoF,uCAAuC,oEAAoE,UAAU,C;;;;;;;;;;;ACArhB,wBAAwB,+BAA+B,8BAA8B,YAAY,0CAA0C,cAAc,oCAAoC,WAAW,2CAA2C,sCAAsC,iBAAiB,kBAAkB,qCAAqC,YAAY,0CAA0C,C;;;;;;;;;;;ACAvZ,iDAAiD,cAAc,kBAAkB,SAAS,WAAW,kBAAkB,qCAAqC,aAAa,kBAAkB,MAAM,kCAAkC,gDAAgD,iCAAiC,iCAAiC,+BAA+B,uCAAuC,wCAAwC,UAAU,wDAAwD,yEAAyE,sCAAsC,2BAA2B,2CAA2C,uBAAuB,qCAAqC,SAAS,QAAQ,UAAU,SAAS,QAAQ,oCAAoC,0BAA0B,qFAAqF,uFAAuF,6CAA6C,uBAAuB,oBAAoB,6BAA6B,sBAAsB,wCAAwC,GAAG,UAAU,GAAG,WAAW,wCAAwC,GAAG,UAAU,GAAG,WAAW,yCAAyC,GAAG,UAAU,QAAQ,SAAS,IAAI,WAAW,SAAS,GAAG,UAAU,WAAW,cAAc,C;;;;;;;;;;;ACAl6C,oDAAoD,kBAAkB,aAAa,mBAAmB,uBAAuB,MAAM,OAAO,yCAAyC,aAAa,kBAAkB,MAAM,6CAA6C,yCAAyC,iCAAiC,WAAW,SAAS,kCAAkC,WAAW,YAAY,yCAAyC,+CAA+C,gDAAgD,kBAAkB,+DAA+D,mCAAmC,0DAA0D,wCAAwC,GAAG,yBAAyB,C;;;;;;;;;;;ACAtxB,iDAAiD,kBAAkB,gDAAgD,kBAAkB,MAAM,OAAO,yCAAyC,qBAAqB,gDAAgD,WAAW,QAAQ,iDAAiD,qBAAqB,kBAAkB,GAAG,UAAU,GAAG,WAAW,C;;;;;;;;;;;ACAtY,+CAA+C,aAAa,mBAAmB,iBAAiB,oDAAoD,qBAAqB,uCAAuC,aAAa,oCAAoC,6BAA6B,eAAe,oDAAoD,gBAAgB,wCAAwC,gBAAgB,C;;;;;;;;;;;;ACA5Z;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAwC,GAAG,sBAAiB,GAAG,SAAI;;AAEnF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,qEAAqE,qBAAqB,aAAa;;AAEvG;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,yDAAyD;AACzD,GAAG;;AAEH;;;AAGA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,6BAA6B;AACjD;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;;;;;;AC5QA,UAAU,mBAAO,CAAC,mKAAoF;AACtG,0BAA0B,mBAAO,CAAC,2MAA0F;;AAE5H;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;;AClBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACQ;AACW;AACrB;AACG;;AAED;;AAE5C;AACA,wGAAwG;AACxG,mFAAmF;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACe,wBAAwB,yDAAM;AAC7C;AACA;AACA;AACA;AACA,WAAW,iEAAS,EAAE,uDAAI;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,8CAA8C;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qCAAqC,iEAAS;AAC9C;;AAEA,4BAA4B,iEAAY;AACxC;;AAEA,6BAA6B,iEAAY;AACzC;;AAEA;AACA;;AAEA;AACA;AACA,IAAI,GAAG,mBAAmB;AAC1B,GAAG;;AAEH;AACA;AACA,IAAI,0DAAM;AACV;;AAEA;AACA;AACA;AACA,GAAG,GAAG,mBAAmB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAA8C;AAC1D,YAAY,8CAA8C;AAC1D;AACA;AACA;AACA;AACA,uBAAuB,8DAAS;AAChC,sCAAsC,yBAAyB;;AAE/D;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,2BAA2B,iEAAY;;AAEvC;AACA,oBAAoB,0DAAM;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI,gEAAW,iBAAiB,MAAM;;AAEtC;AACA;AACA,IAAI;AACJ,GAAG;AACH;AACA;;;;;;;;;;;;;AC7KA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACE;;AAEE;AACU;AACZ;;AAElB;;AAE5B;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E;AACA;AACA;AACA,MAAM,mDAAmD;AACzD,MAAM,6DAA6D;AACnE;AACA,oFAAoF;AACpF;AACA;AACA;AACA;AACe,oBAAoB,yDAAM;AACzC;AACA;AACA;AACA;AACA,WAAW,2DAAY,EAAE,2DAAM,EAAE,6DAAoB;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,mCAAmC;AAC/C,cAAc;AACd;AACA;AACA,SAAS,kEAAa;AACtB;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qCAAqC;AACtD;AACA,YAAY,+BAA+B;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ,sEAAsE;AAC9E;AACA;AACA;;;;;;;;;;;;;AChFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACG;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,+BAA+B;AACtF;AACA;;AAEA;AACA,oBAAoB,mEAAoB;;AAExC;AACA,qGAAqG,aAAa;AAClH;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,iEAAK;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,mEAAoB;;AAElC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA,8BAA8B,eAAe;AAC7C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,mEAAoB;;AAElC;AACA;AACA;;;;;;;;;;;;;AC7HA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACQ;;AAM9B;;AAEkB;;AAEc;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,2BAA2B,yDAAM;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,0DAAiB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,0BAA0B,SAAS;AACnC,GAAG;;AAEH;AACA;AACA,0BAA0B,SAAS,MAAM,4DAAa;AACtD,GAAG;;AAEH;AACA,SAAS,iFAA6B;AACtC,SAAS,iFAA6B;AACtC,SAAS,4EAAwB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,yBAAyB,SAAS,sCAAsC,uCAAuC;AAC/G,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ,SAAS,qEAAiB;;AAE1B,iCAAiC,2DAAkB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iDAAiD;AAC5D,aAAa;AACN;AACP;AACA,0DAA0D,iBAAiB;;AAE3E;;AAEA;AACA;;;;;;;;;;;;;AC5IA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEgD;;AAEhD;AACA,yCAAyC,2CAA2C;AACpF,UAAU,6DAA6D;AACvE,IAAI,+DAA+D;AACnE;AACA;AACA;AACA;AACA;AACA;AACe,gCAAgC,6DAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG,GAAG,mBAAmB;AACzB;;AAEA;AACA,WAAW,+DAA+D;AAC1E,KAAK;AACL,iBAAiB,4BAA4B;AAC7C;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,6DAA6D;AAC/E;AACA;AACA;AACA,WAAW,sDAAsD;AACjE;;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAE6C;AACC;;AAEQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA,qCAAqC,mDAAmD;AACxF;AACA;AACA;AACA,sBAAsB,uDAAuD;AAC7E;AACA;AACA,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACe,iCAAiC,0DAAO;AACvD;AACA;AACA;AACA;AACA,mBAAmB,6DAAc;AACjC;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,sBAAsB;AAClC;AACA;AACA;;AAEA,qBAAqB,mEAAO;AAC5B,GAAG,0DAAW,UAAU,MAAM;AAC9B;AACA;AACA;;;;;;;;;;;;;AC3DA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEoD;AACF;;AAElD;AACA;AACA,IAAI,qFAAqF;AACzF;AACA;AACA,WAAW,iCAAiC;AAC5C;AACO;AACP;;AAEA,MAAM,qEAAsB;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI,qFAAqF;AACzF;AACA;AACA,WAAW,iCAAiC;AAC5C,aAAa;AACb;AACO;AACP;AACA,0BAA0B,iEAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEgH;;AAEhH;AACA,qBAAqB,yCAAyC;AAC9D,aAAa,4EAA4E;AACzF,gBAAgB,mCAAmC;AACnD;AACA,WAAW,mCAAmC;AAC9C,WAAW,iDAAiD;AAC5D,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;;AAEA,QAAQ,qEAAQ,wBAAwB,sBAAsB;;AAE9D;AACA;AACA;;AAEA,sBAAsB,UAAU,GAAG,QAAQ;AAC3C;AACA;;AAEA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa;AACb;AACO;AACP,sDAAsD,qEAAQ;AAC9D;;AAEA;AACA;AACA;AACA,WAAW,8FAA8F;AACzG,aAAa;AACb;AACO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,aAAa;AACb;AACO;AACP;AACA;;AAEA;AACA,6EAA6E,uDAAuD;AACpI;AACA,yBAAyB,2BAA2B;AACpD;AACA,WAAW,gCAAgC;AAC3C,WAAW,OAAO,eAAe;AACjC,WAAW,sCAAsC;AACjD,QAAQ,uDAAuD;AAC/D;AACO,4CAA4C;AACnD;AACA;;AAEA,8CAA8C,yFAA4B;;AAE1E;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C,aAAa;AACb;AACO;AACP;AACA;;AAEA;AACA,GAAG,mFAAsB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa;AACb;AACO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,yFAA4B;;AAE9C;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;AChKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACyB;;AAElC;;AAEnC;AACA;AACA;AACA,uCAAuC,mDAAmD;AAC1F;AACA;AACA;AACe,2BAA2B,yDAAM;AAChD;AACA;AACA;AACA;AACA,WAAW,yEAAmB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnCA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACH;AAC+C;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,kCAAkC,yDAAM;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,mDAAmD;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,SAAS,wDAAiB;AAC1B;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA,kCAAkC,oEAAqB;AACvD;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,wGAAwG,mBAAmB;;AAE3H;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,iDAAiD;AAC7D,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,kEAAmB;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,2CAA2C,kEAAmB;AAC9D;AACA;;AAEA;AACA;AACA;AACA,mDAAmD,kEAAmB;AACtE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAO,4DAAO;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,oCAAoC;AAC/C,WAAW,qDAAqD;AAChE,WAAW,kEAAkE;AAC7E;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,aAAa;AACb;AACA,uCAAuC,oBAAoB;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACpTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEyD;AACD;;AAExD;AACA,6EAA6E,2CAA2C;AACxH;AACA,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA,EAAE,8EAAiB;AACnB;AACA;AACA;AACA,GAAG;;AAEH,SAAS,6EAAgB;AACzB;AACA;;AAEA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa;AACb;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAI,yCAAyC;AAC7C;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa,YAAY,iCAAiC,yCAAyC;AACnG;AACA;AACO;AACP;;AAEA;AACA;AACA,UAAU;AACV;;AAEA;AACA;;;;;;;;;;;;;AC7EA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACJ;AACgB;;AAExD;AACA;AACA;AACA,uCAAuC;AACvC,QAAQ,mFAAmF;AAC3F;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM,2DAA2D;AACjE;AACA;AACA;AACe,0BAA0B,yDAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,oDAAW,EAAE,kEAAa;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,2CAA2C;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ,sEAAsE;AAC9E;AACA;AACA;AACA;;AAEA;AACA,iEAAiE,2CAA2C;AAC5G;AACA;AACA;AACA;AACA;AACA,IAAI,oEAAoE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;;;;;;;;;;;;;AC9FA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACiB;AACf;;AAEL;;AAEzC;AACA;AACA;AACA,uCAAuC;AACvC,QAAQ,mFAAmF;AAC3F;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACe,4BAA4B,yDAAM;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,2BAA2B;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8BAA8B,gEAAoB,UAAU,kEAAmB;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,YAAY,6CAA6C;AACzD,YAAY,sEAAsE;AAClF,YAAY,4BAA4B;AACxC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA,SAAS,4DAAO;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,kBAAkB;;AAExB;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;;AAEA,QAAQ,4DAAO;AACf;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ,oCAAoC,6CAA6C;AACjF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;AC7JA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEwC;;AAEW;;AAEnD;AACA;AACA,YAAY,4EAA4E;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACe,qCAAqC,qDAAI;AACxD;AACA;AACA;AACA,YAAY,2BAA2B;AACvC,YAAY,OAAO;AACnB,YAAY,4BAA4B;AACxC,YAAY,OAAO;AACnB,YAAY,oBAAoB;AAChC;AACA;AACA,kCAAkC;AAClC;;AAEA;;AAEA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qEAAqE,eAAe;AACpF;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA,gFAAgF,eAAe;AAC/F;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;ACtGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE2C;AACsF;AAChD;;AAEnB;;AAEtB;;AAExC;AACA;AACA;AACA,QAAQ,4EAA4E;AACpF;AACA;AACA;AACe,mCAAmC,qDAAI;AACtD;AACA,8CAA8C,2DAA2D;AACzG;AACA,YAAY,2BAA2B;AACvC,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,SAAS,qCAAqC;;AAE9C;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,gEAAY;;AAEtC;AACA,yBAAyB,qDAAqD;AAC9E;AACA;AACA,cAAc;AACd;AACA,wBAAwB,oEAAgB;;AAExC;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,yBAAyB,+DAAc;;AAEvC;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,4DAAW;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,iCAAiC,8DAAU;;AAE3C;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;AAEJ;AACA;AACA,QAAQ,+DAAsB;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA,EAAE,sEAAa;AACf;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,mBAAmB;AACzB;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,2BAA2B;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,uBAAuB,uEAAc,UAAU,gEAAe;AAC9D;AACA;;AAEA;AACA;AACA,SAAS,wDAAK;AACd;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,OAAO,wBAAwB;AAC/B,OAAO,wBAAwB;AAC/B;AACA,YAAY,2BAA2B;AACvC;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,+BAA+B,2DAAU;AACzC,+BAA+B,2DAAU;;AAEzC;AACA;AACA,SAAS,wDAAK;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,SAAS,wDAAK;AACd;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;AACA,6DAA6D,wBAAwB;AACrF;AACA;AACA;;;;;;;;;;;;;AC9SA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4E;;AAE5E;AACA;AACA,IAAI,4EAA4E;AAChF;AACA,WAAW,iCAAiC;AAC5C;AACA,aAAa,qCAAqC;AAClD;AACO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,EAAE,IAAI;AACN;;AAEA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA,aAAa;AACb;AACO;AACP;AACA,8BAA8B,iEAAgB,UAAU,uEAAsB;;AAE9E;AACA;AACA,EAAE;AACF;;AAEA;AACA;;;;;;;;;;;;;AC1EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACsB;AACA;AACA;;AAEhC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,0BAA0B,yDAAM;AAC/C;AACA;AACA;AACA;AACA,WAAW,uEAAkB,EAAE,uEAAkB,EAAE,uEAAkB;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,+BAA+B,2CAA2C;AAC1E;AACA;AACA,YAAY,OAAO;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8EAA8E;AAClF;AACA;AACA,KAAK,qEAAqE;AAC1E,4CAA4C,0EAA0E;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oEAAoE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,6CAA6C,gFAAgF;AAC7H,4BAA4B,oEAAoE;AAChG;AACA,IAAI,oFAAoF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sEAAsE;AAClF;;;;;;;;;;;;;ACnOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACyD;AAC5C;;AAEV;;AAEtD;AACA,QAAQ,wDAAK;AACb,SAAS,wDAAK;AACd,QAAQ,wDAAK;AACb,WAAW,wDAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,iCAAiC,yDAAM;AACtD;AACA;AACA;AACA;AACA,WAAW,2DAAkB;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,8DAA8D;AAC1E;AACA;AACA;AACA,SAAS,oBAAoB;AAC7B;;AAEA;AACA,sBAAsB,2DAAU;AAChC;AACA;;AAEA;AACA;AACA,yBAAyB,gFAAgF;AACzG;AACA;AACA;AACA,QAAQ,yFAAyF;AACjG;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,cAAc,iEAAa;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA,oCAAoC,6BAA6B;AACjE,IAAI;;AAEJ;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,sEAAsE;AAClF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,uEAAc,UAAU,mEAAkB;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ;AACA;;AAEA,GAAG,0EAAiB;;AAEpB;;AAEA;AACA;AACA,6CAA6C,iCAAiC;AAC9E;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,8DAA8D;AAC1E,YAAY,QAAQ;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,sEAAsE;AAClF,YAAY,+DAA+D;AAC3E,cAAc,+DAA+D;AAC7E;AACA;AACA,8BAA8B,8DAAU;;AAExC;AACA;AACA;AACA;AACA,eAAe,sDAAK;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wCAAwC,8EAA8E;AACtH;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,IAAI,yEAAyE;AAC7E;AACA,cAAc,OAAO;AACrB,KAAK,sEAAsE;AAC3E,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,0BAA0B,qDAAqD;AAC/E;AACA,IAAI,0EAA0E;AAC9E;;;;;;;;;;;;;ACpRA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACU;;AAEtD;AACA;AACA;AACA;AACA,IAAI,qEAAqE;AACzE;AACA;AACA;AACe,iCAAiC,yDAAM;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC,2DAAkB;;AAEnD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA6C,2BAA2B;AACxE;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;;;;;;;;;;;AC9HA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACQ;;AAEO;;AAE3D;AACA;AACA;AACA;AACA,IAAI,qEAAqE;AACzE;AACA;AACA;AACe,iCAAiC,yDAAM;AACtD;AACA;AACA;AACA;AACA,WAAW,iEAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,gEAAiB;;AAE5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C,iEAAY;;AAEtD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU,iEAAY;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA,sCAAsC,kBAAkB;AACxD;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;ACrHA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;AACJ;;AAEzC;AACA;AACA;AACA;AACA;AACe,iCAAiC,0DAAO;AACvD;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,4DAAO;;AAE1B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,eAAe;AACpD;AACA;AACA,qCAAqC,cAAc;AACnD;AACA,YAAY,OAAO;AACnB,YAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACmB;AACV;;AAErD;AACA;AACA;AACA,uCAAuC,gDAAgD;AACvF;AACA,4CAA4C;AAC5C,QAAQ,wDAAwD;AAChE;AACA;AACA;AACe,yBAAyB,yDAAM;AAC9C;AACA;AACA;AACA;AACA,WAAW,qEAAiB,EAAE,gEAAY;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAkD;AAC1D;AACA;AACA,QAAQ,iEAAiE;AACzE;AACA,IAAI,+DAA+D;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,8BAA8B;AACrC;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,4EAA4E;AACnF;AACA,OAAO;AACP;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,0CAA0C,sDAAsD;AAChG;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mEAAmE;AAC/E;;;;;;;;;;;;;AChHA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAE4C;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO,oDAAoD;AACtE;AACA,aAAa,SAAS;AACtB;AACO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mEAAmE;AAC9E,aAAa,SAAS;AACtB;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,iEAAK;;AAEjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8DAA8D,2BAA2B;AACzF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,oEAAoE;AAC/E,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvFA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;AACJ;;AAEzC;AACA;AACA;AACA;AACA;AACe,gCAAgC,0DAAO;AACtD;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C,YAAY,mEAAmE;AAC/E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,mEAAmE;AACjF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,4DAAO;;AAE1B;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,KAAK,2DAA2D;AAChE;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;AChGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACQ;AACgC;AACrC;;AAE/C;AACA;AACA,IAAI,oFAAoF;AACxF;AACA;AACA;AACe,gCAAgC,yDAAM;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,mEAAoB;;AAErC;AACA;AACA,2BAA2B,gCAAgC;;AAE3D;AACA,+BAA+B,6EAAyB;AACxD;AACA;;AAEA;AACA,8CAA8C,6EAAyB,aAAa,kBAAkB;;AAEtG;AACA,yCAAyC,0DAAiB;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA,wBAAwB,+FAA+F;AACvH,qEAAqE,KAAK;AAC1E,IAAI,wEAAwE;AAC5E,IAAI,wDAAwD;AAC5D;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA,aAAa,iDAAiD;AAC9D;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;;;;;;;;;;;;;AC7FA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACE;;AAEC;;AAEX;;AAEpC;AACA;AACA;AACA;AACA;AACe,2BAA2B,yDAAM;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,kDAAkD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,mEAAoB;;AAEhE;AACA;AACA;AACA;;AAEA;AACA,iEAAiE,mEAAmE;AACpI;AACA;AACA,YAAY,2DAA2D;AACvE;AACA;AACA;;AAEA,sCAAsC,aAAa;;AAEnD;AACA;AACA,oBAAoB,2DAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA,mCAAmC,oBAAoB;AACvD;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,mEAAmE;AAC9E;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACzHA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEiD;AACN;;AAE3C;AACA;AACA,IAAI,4CAA4C;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,wDAAK;AACb;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,QAAQ,wDAAK;AACb;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,QAAQ,wDAAK;AACb;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,QAAQ,wDAAK;AACb;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,QAAQ,wDAAK;AACb;AACA;AACA;;AAEA;AACA;AACA,IAAI,4CAA4C;AAChD;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,OAAO,wDAAK;AACZ,OAAO,wDAAK;AACZ,QAAQ,wDAAK;AACb,SAAS,wDAAK;AACd;;AAEA;AACA,cAAc,4CAA4C;AAC1D,IAAI,iEAAiE;AACrE;AACA,aAAa;AACb;AACO;AACP;AACA;;AAEA,8CAA8C;AAC9C,wBAAwB,iEAAiE;AACzF;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,GAAG,sEAAU,4BAA4B,kBAAkB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACtJA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACiD;AACV;;AAEnF;AACA;AACA;AACA,uCAAuC,gDAAgD;AACvF;AACA;AACA,KAAK;AACL,QAAQ,sFAAsF;AAC9F;AACA;AACA;AACe,mCAAmC,yDAAM;AACxD;AACA;AACA;AACA;AACA,WAAW,yFAA2B,EAAE,oFAAsB;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;AACJ;;AAEzC;AACA;AACA;AACA;AACA;AACe,0CAA0C,0DAAO;AAChE;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,4DAAO;;AAE1B,OAAO,4DAAO;AACd;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;ACxDA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEwE;AAC5B;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACe,0CAA0C,yDAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wDAAwD,oEAA2B;AACnF;AACA;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACmC;;AAEnB;AACqB;AAChC;;AAExD;AACA;AACA;AACA,wBAAwB,kEAAkE;AAC1F;AACA;AACA;AACe,qCAAqC,yDAAM;AAC1D;AACA;AACA;AACA;AACA,WAAW,kEAAiB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,mEAAmE;AACnG;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,2DAAU;;AAE9B;AACA;AACA,UAAU,wDAAK;AACf;AACA,IAAI;;AAEJ;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;;AAEA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,mBAAmB,mEAAuB;;AAE1C;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,SAAS,2EAAsB;AAC/B;AACA,IAAI;AACJ,IAAI,mFAA2B;AAC/B;AACA,GAAG;;AAEH;AACA,EAAE,4EAAmB;AACrB;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,eAAe,aAAa,SAAS,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,8EAAsB;AACpC,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB,aAAa,WAAW,gBAAgB;AACzD;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,aAAa,6BAA6B,gBAAgB;AACvF;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,aAAa,YAAY,gBAAgB;AACtE;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAW0B;AAC2C;AAC1B;;AAEK;;AAEhD;AACA;AACoF;;AAEpF;AACA;AACA;AACA;AACA;AACe,sCAAsC,qDAAI;AACzD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,gEAAY;;AAEtC;AACA,yBAAyB,qDAAqD;AAC9E;AACA;AACA,cAAc;AACd;AACA,wBAAwB,oEAAgB;;AAExC;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;;AAEA;AACA;AACA;AACA,cAAc,uCAAuC;AACrD;AACA,yDAAyD,wDAAK;AAC9D;;AAEA;AACA;AACA;AACA,cAAc,uCAAuC;AACrD;AACA,6DAA6D,wDAAK;;AAElE;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,yBAAyB,+DAAc;;AAEvC;AACA,yBAAyB,mBAAmB;AAC5C;AACA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,4DAAW;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,EAAE,oFAA2B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,EAAE,sEAAa,GAAG,aAAa;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,cAAc,uCAAuC;AACrD;AACA;AACA,qBAAqB,2DAAU;;AAE/B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA;AACA,2BAA2B,iEAAgB,eAAe,uEAAsB;;AAEhF;;AAEA;AACA;AACA;;;;;;;;;;;;;ACvMA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACmB;;AAER;;AAEvD;AACA;AACA;AACA,uCAAuC,wEAAwE;AAC/G;AACA;AACA,IAAI;AACJ,iBAAiB,kFAAkF;AACnG;AACA,yBAAyB,kEAAkE;AAC3F;AACA;AACA;AACe,2BAA2B,yDAAM;AAChD;AACA;AACA;AACA;AACA,WAAW,4EAAuB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,4EAAuB;;AAE7E;AACA;AACA;AACA,sBAAsB,mEAAsB;AAC5C,GAAG;AACH;AACA;;AAEA;AACA;AACA,+BAA+B,6CAA6C;AAC5E;AACA;AACA;AACA,MAAM,yCAAyC;AAC/C,MAAM,6DAA6D;AACnE;AACA,6CAA6C,kDAAkD;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+EAA+E;AACnF;AACA,2CAA2C,2DAA2D;AACtG;AACA,YAAY,eAAe;AAC3B;;;;;;;;;;;;;AChFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACY;AACY;AACF;;AAElE;AACA;AACA;AACA,uCAAuC,+DAA+D;AACtG;AACA;AACA;AACA,MAAM,qEAAqE;AAC3E,MAAM,2DAA2D;AACjE,MAAM,uEAAuE;AAC7E;AACA;AACA;AACe,0BAA0B,yDAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,uEAAkB,EAAE,kEAAa,EAAE,wEAAmB;AACjE;AACA;;AAEA;AACA;AACA;AACA,YAAY,2CAA2C;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ,sEAAsE;AAC9E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;;;;;;;;;;;;;ACpFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEQ;;AAEJ;AACI;AACE;AACZ;;AAEY;AACsB;AAC5B;AACM;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACe,iCAAiC,yDAAM;AACtD;AACA;AACA;AACA;AACA,WAAW,mEAAc,EAAE,6DAAY,EAAE,iEAAS;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mEAAc;;AAE3D,qBAAqB,oFAAqB;;AAE1C;AACA;AACA;AACA,GAAG;;AAEH,iCAAiC,2DAAkB;;AAEnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;AAEJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,sCAAsC,eAAe;AACrD,MAAM;AACN;AACA,IAAI;AACJ,GAAG;;AAEH;AACA;AACA;AACA;AACA,qCAAqC,iEAAS;AAC9C;AACA,sBAAsB,2EAAY;AAClC,oBAAoB,SAAS,UAAU,8EAAe,2CAA2C,EAAE;;AAEnG;AACA;AACA;;AAEA,sBAAsB,iEAAY;;AAElC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,2CAA2C,kCAAkC;;AAE7E;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wCAAwC;AACpD,YAAY,oCAAoC;AAChD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,6CAA6C,mEAAc;AAC3D,2CAA2C,6DAAY;;AAEvD;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,uDAAG;AACZ;AACA,qBAAqB,yEAAoB;;AAEzC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,MAAM;AACN;;AAEA;AACA;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;AACA;AACA,4BAA4B,8CAA8C;AAC1E;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,oCAAoC;AAChD,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA,mBAAmB,cAAc,GAAG,MAAM;;AAE1C;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,WAAW,2CAA2C;AACtD,aAAa;AACN;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9VA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAE4C;AACU;AACA;;AAEqB;;AAE9B;AACJ;AACE;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACe,kCAAkC,yDAAM;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,yCAAyC,6BAA6B,0EAAoB;AAC1F;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C,YAAY,OAAO;AACnB,YAAY,kEAAkE;AAC9E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6CAA6C,mEAAc;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D;AACA;AACA;AACA;;AAEA,iBAAiB,yEAAoB;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D,WAAW,wCAAwC;AACnD,WAAW,6BAA6B;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;;AAEA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D;AACA;AACA;;AAEA;AACA;AACA,WAAW,qDAAqD;AAChE,WAAW,iDAAiD;AAC5D,WAAW,6BAA6B;AACxC;AACA,sDAAsD,yCAAyC;;AAE/F;;AAEA;AACA;AACA,EAAE;AACF;;AAEA,sCAAsC,6CAA6C;AACnF;AACA;AACA,WAAW,iDAAiD;AAC5D,aAAa;AACb;AACA,qDAAqD,2BAA2B;;AAEhF;;AAEA;AACA;;AAEA,qCAAqC,6CAA6C;AAClF;AACA;AACA,WAAW,iDAAiD;AAC5D,aAAa;AACb;AACA,qDAAqD,wCAAwC;;AAE7F;;AAEA;AACA;;AAEA,YAAY,6CAA6C;AACzD;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,6CAA6C;AACzD;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,iDAAiD;AAC5D,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,iDAAiD;AAC5D,WAAW,wCAAwC;AACnD;AACA;AACA,kBAAkB,yEAAoB;;AAEtC;AACA;AACA;;;;;;;;;;;;;AC3RA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACS;AACZ;;AAEhD;AACA;AACA;AACA,uCAAuC,+DAA+D;AACtG;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACe,4BAA4B,yDAAM;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yEAAoB;AACxC;AACA;AACA,4BAA4B,oEAAqB;;AAEjD;AACA,mDAAmD,OAAO;AAC1D;AACA,IAAI;;AAEJ;AACA;AACA,UAAU,wDAAK;AACf;AACA,IAAI;;AAEJ;;AAEA;AACA;;AAEA;AACA,qCAAqC,uBAAuB;AAC5D;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEsD;AACT;AACC;;AAEe;;AAE7D;AACA;AACA;;AAEA;AACA;AACA;AACA,qCAAqC,qEAAqE;AAC1G;AACA;AACA;AACA,sBAAsB,uDAAuD;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,oBAAoB;AACzD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACe,iCAAiC,0DAAO;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,mEAAc;AACjC;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;;AAEA,6CAA6C,mEAAc;;AAE3D,sBAAsB,mEAAO;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,KAAK;AAChB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC,gEAAW,UAAU,sBAAsB;AAC5C;;;;;;;;;;;;;ACvFA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAE6C;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa;AACb;AACO;AACP;AACA;;AAEA,iCAAiC,8BAA8B;AAC/D;;AAEA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa,eAAe;AAC5B;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC,gDAAgD,iBAAiB;;AAEjE;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,EAAE;AACF;;AAEA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA,4DAA4D;AAC5D;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB,aAAa;AACb;AACA;AACA;AACA,EAAE,yCAAyC;AAC3C,uCAAuC;AACvC,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA,4BAA4B,MAAM;;AAElC,wCAAwC,iBAAiB;AACzD,EAAE;AACF;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA,gBAAgB,0DAAM;;AAEtB;AACA,kBAAkB,0DAAM;;AAExB;AACA;;AAEA;;AAEA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA,EAAE;AACF;;;;;;;;;;;;;ACvIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEoC;AACR;AACc;AACF;AACA;AACF;AACoB;AAChB;AACF;;AAEzB;AACf,CAAC,6DAAS;AACV,CAAC,qDAAK;AACN,CAAC,mEAAY;AACb,CAAC,iEAAW;AACZ,CAAC,iEAAW;AACZ,CAAC,+DAAU;AACX,CAAC,mFAAoB;AACrB,CAAC,mEAAY;AACb,CAAC,iEAAW;AACZ,CAAC,EAAC;;;;;;;;;;;;;AC7BF;AAAe,yJAA0F,E;;;;;;;;;;;ACAzG,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,0IAA2E;;AAE7G;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,wJAAkF;;AAEpH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,sJAAiF;;AAEnH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,4KAA4F;;AAE9H;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,sJAAiF;;AAEnH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,oJAAgF;;AAElH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,8JAAqF;;AAEvH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,kKAAuF;;AAEzH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,sKAAyF;;AAE3H;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,sKAAyF;;AAE3H;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,+H;;;;;;;;;;;ACAA,0H;;;;;;;;;;;ACAA,4H;;;;;;;;;;;ACAA,wH;;;;;;;;;;;ACAA,0H;;;;;;;;;;;ACAA,4H;;;;;;;;;;;ACAA,2H;;;;;;;;;;;ACAA,4H;;;;;;;;;;;ACAA,+B","file":"image.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","module.exports = \".ck-vertical-form .ck-button:after{content:\\\"\\\";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:\\\"\\\";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-text-width)*0.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}\"","module.exports = \".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:50px}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{position:static}\"","module.exports = \".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}\"","module.exports = \".ck.ck-image-insert__panel{padding:var(--ck-spacing-large)}.ck.ck-image-insert__ck-finder-button{display:block;width:100%;margin:var(--ck-spacing-standard) auto;border:1px solid #ccc;border-radius:var(--ck-border-radius)}.ck.ck-splitbutton>.ck-file-dialog-button.ck-button{padding:0;margin:0;border:none}\"","module.exports = \".ck.ck-image-insert-form:focus{outline:none}.ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-insert-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}\"","module.exports = \".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}\"","module.exports = \":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}\"","module.exports = \".ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:\\\"\\\";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}\"","module.exports = \".ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:\\\"\\\";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}\"","module.exports = \".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\"","module.exports = \".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}\"","\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/postcss-loader/src/index.js??ref--5-1!./responsiveform.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/autoimage\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { Clipboard } from 'ckeditor5/src/clipboard';\nimport { LivePosition, LiveRange } from 'ckeditor5/src/engine';\nimport { Undo } from 'ckeditor5/src/undo';\nimport { global } from 'ckeditor5/src/utils';\n\nimport { insertImage } from './image/utils';\n\n// Implements the pattern: http(s)://(www.)example.com/path/to/resource.ext?query=params&maybe=too.\nconst IMAGE_URL_REGEXP = new RegExp( String( /^(http(s)?:\\/\\/)?[\\w-]+(\\.[\\w-]+)+[\\w._~:/?#[\\]@!$&'()*+,;=%-]+/.source +\n\t/\\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)\\??[\\w._~:/#[\\]@!$&'()*+,;=%-]*$/.source ) );\n\n/**\n * The auto-image plugin. It recognizes image links in the pasted content and embeds\n * them shortly after they are injected into the document.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class AutoImage extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ Clipboard, Undo ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'AutoImage';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t\t * cleaning of the timeout.\n\t\t *\n\t\t * @private\n\t\t * @member {Number} #_timeoutId\n\t\t */\n\t\tthis._timeoutId = null;\n\n\t\t/**\n\t\t * The position where the `<image>` element will be inserted after the timeout,\n\t\t * determined each time a new content is pasted into the document.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/liveposition~LivePosition} #_positionToInsert\n\t\t */\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into an image.\n\t\tthis.listenTo( editor.plugins.get( Clipboard ), 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange();\n\n\t\t\tconst leftLivePosition = LivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = LivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedImageBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\teditor.commands.get( 'undo' ).on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing an image.\n\t * When the URL is found, it is automatically converted into an image.\n\t *\n\t * @protected\n\t * @param {module:engine/model/liveposition~LivePosition} leftPosition Left position of the selection.\n\t * @param {module:engine/model/liveposition~LivePosition} rightPosition Right position of the selection.\n\t */\n\t_embedImageBetweenPositions( leftPosition, rightPosition ) {\n\t\tconst editor = this.editor;\n\t\t// TODO: Use a marker instead of LiveRange & LivePositions.\n\t\tconst urlRange = new LiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\n\t\tlet src = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\tsrc += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\tsrc = src.trim();\n\n\t\t// If the URL does not match the image URL regexp, let's skip that.\n\t\tif ( !src.match( IMAGE_URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position will not be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = LivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = global.window.setTimeout( () => {\n\t\t\t// Do nothing if image element cannot be inserted at the current position.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/2763.\n\t\t\t// Condition must be checked after timeout - pasting may take place on an element, replacing it. The final position matters.\n\t\t\tconst imageCommand = editor.commands.get( 'insertImage' );\n\n\t\t\tif ( !imageCommand.isEnabled ) {\n\t\t\t\turlRange.detach();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition;\n\n\t\t\t\t// Check if the position where the element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use the logic of insertImage().\n\t\t\t\tif ( this._positionToInsert.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert.toPosition();\n\t\t\t\t}\n\n\t\t\t\tinsertImage( editor.model, { src }, insertionPosition );\n\n\t\t\t\tthis._positionToInsert.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\t\t}, 100 );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/image\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { Widget } from 'ckeditor5/src/widget';\n\nimport ImageEditing from './image/imageediting';\nimport ImageTextAlternative from './imagetextalternative';\nimport { isImageWidget } from './image/utils';\n\nimport '../theme/image.css';\n\n/**\n * The image plugin.\n *\n * For a detailed overview, check the {@glink features/image image feature} documentation.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/image/imageediting~ImageEditing},\n * * {@link module:image/imagetextalternative~ImageTextAlternative}.\n *\n * Usually, it is used in conjuction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class Image extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageEditing, Widget, ImageTextAlternative ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'Image';\n\t}\n\n\t/**\n\t * Checks if a given view element is an image widget.\n\t *\n\t * @param {module:engine/view/element~Element} viewElement\n\t * @returns {Boolean}\n\t */\n\tisImageWidget( viewElement ) {\n\t\treturn isImageWidget( viewElement );\n\t}\n}\n\n/**\n * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.\n *\n * Read more in {@link module:image/image~ImageConfig}.\n *\n * @member {module:image/image~ImageConfig} module:core/editor/editorconfig~EditorConfig#image\n */\n\n/**\n * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n * \t\t\t\timage: ... // Image feature options.\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.\n *\n * @interface ImageConfig\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/image/converters\n */\n\nimport { first } from 'ckeditor5/src/utils';\nimport { getViewImgFromWidget } from './utils';\n\n/**\n * Returns a function that converts the image view representation:\n *\n *\t\t<figure class=\"image\"><img src=\"...\" alt=\"...\"></img></figure>\n *\n * to the model representation:\n *\n *\t\t<image src=\"...\" alt=\"...\"></image>\n *\n * The entire content of the `<figure>` element except the first `<img>` is being converted as children\n * of the `<image>` model element.\n *\n * @returns {Function}\n */\nexport function viewFigureToModel() {\n\treturn dispatcher => {\n\t\tdispatcher.on( 'element:figure', converter );\n\t};\n\n\tfunction converter( evt, data, conversionApi ) {\n\t\t// Do not convert if this is not an \"image figure\".\n\t\tif ( !conversionApi.consumable.test( data.viewItem, { name: true, classes: 'image' } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find an image element inside the figure element.\n\t\tconst viewImage = getViewImgFromWidget( data.viewItem );\n\n\t\t// Do not convert if image element is absent, is missing src attribute or was already converted.\n\t\tif ( !viewImage || !viewImage.hasAttribute( 'src' ) || !conversionApi.consumable.test( viewImage, { name: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert view image to model image.\n\t\tconst conversionResult = conversionApi.convertItem( viewImage, data.modelCursor );\n\n\t\t// Get image element from conversion result.\n\t\tconst modelImage = first( conversionResult.modelRange.getItems() );\n\n\t\t// When image wasn't successfully converted then finish conversion.\n\t\tif ( !modelImage ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert rest of the figure element's children as an image children.\n\t\tconversionApi.convertChildren( data.viewItem, modelImage );\n\n\t\tconversionApi.updateConversionResult( modelImage, data );\n\t}\n}\n\n/**\n * Converter used to convert the `srcset` model image attribute to the `srcset`, `sizes` and `width` attributes in the view.\n *\n * @returns {Function}\n */\nexport function srcsetAttributeConverter() {\n\treturn dispatcher => {\n\t\tdispatcher.on( 'attribute:srcset:image', converter );\n\t};\n\n\tfunction converter( evt, data, conversionApi ) {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst writer = conversionApi.writer;\n\t\tconst figure = conversionApi.mapper.toViewElement( data.item );\n\t\tconst img = getViewImgFromWidget( figure );\n\n\t\tif ( data.attributeNewValue === null ) {\n\t\t\tconst srcset = data.attributeOldValue;\n\n\t\t\tif ( srcset.data ) {\n\t\t\t\twriter.removeAttribute( 'srcset', img );\n\t\t\t\twriter.removeAttribute( 'sizes', img );\n\n\t\t\t\tif ( srcset.width ) {\n\t\t\t\t\twriter.removeAttribute( 'width', img );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst srcset = data.attributeNewValue;\n\n\t\t\tif ( srcset.data ) {\n\t\t\t\twriter.setAttribute( 'srcset', srcset.data, img );\n\t\t\t\t// Always outputting `100vw`. See https://github.com/ckeditor/ckeditor5-image/issues/2.\n\t\t\t\twriter.setAttribute( 'sizes', '100vw', img );\n\n\t\t\t\tif ( srcset.width ) {\n\t\t\t\t\twriter.setAttribute( 'width', srcset.width, img );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function modelToViewAttributeConverter( attributeKey ) {\n\treturn dispatcher => {\n\t\tdispatcher.on( `attribute:${ attributeKey }:image`, converter );\n\t};\n\n\tfunction converter( evt, data, conversionApi ) {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst figure = conversionApi.mapper.toViewElement( data.item );\n\t\tconst img = getViewImgFromWidget( figure );\n\n\t\tviewWriter.setAttribute( data.attributeKey, data.attributeNewValue || '', img );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/image/imageediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageLoadObserver from './imageloadobserver';\n\nimport {\n\tviewFigureToModel,\n\tmodelToViewAttributeConverter,\n\tsrcsetAttributeConverter\n} from './converters';\n\nimport { toImageWidget } from './utils';\n\nimport InsertImageCommand from './insertimagecommand';\n\n/**\n * The image engine plugin.\n *\n * It registers:\n *\n * * `<image>` as a block element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n * * converters for editing and data pipelines.\n * * `'insertImage'` command.\n * * `'imageInsert'` command as an alias for `insertImage` command.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\n\t\t// See https://github.com/ckeditor/ckeditor5-image/issues/142.\n\t\teditor.editing.view.addObserver( ImageLoadObserver );\n\n\t\t// Configure schema.\n\t\tschema.register( 'image', {\n\t\t\tisObject: true,\n\t\t\tisBlock: true,\n\t\t\tallowWhere: '$block',\n\t\t\tallowAttributes: [ 'alt', 'src', 'srcset' ]\n\t\t} );\n\n\t\tconversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'image',\n\t\t\tview: ( modelElement, { writer } ) => createImageViewElement( writer )\n\t\t} );\n\n\t\tconversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'image',\n\t\t\tview: ( modelElement, { writer } ) => toImageWidget( createImageViewElement( writer ), writer, t( 'image widget' ) )\n\t\t} );\n\n\t\tconversion.for( 'downcast' )\n\t\t\t.add( modelToViewAttributeConverter( 'src' ) )\n\t\t\t.add( modelToViewAttributeConverter( 'alt' ) )\n\t\t\t.add( srcsetAttributeConverter() );\n\n\t\tconversion.for( 'upcast' )\n\t\t\t.elementToElement( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tsrc: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: ( viewImage, { writer } ) => writer.createElement( 'image', { src: viewImage.getAttribute( 'src' ) } )\n\t\t\t} )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tkey: 'alt'\n\t\t\t\t},\n\t\t\t\tmodel: 'alt'\n\t\t\t} )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tkey: 'srcset'\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'srcset',\n\t\t\t\t\tvalue: viewImage => {\n\t\t\t\t\t\tconst value = {\n\t\t\t\t\t\t\tdata: viewImage.getAttribute( 'srcset' )\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif ( viewImage.hasAttribute( 'width' ) ) {\n\t\t\t\t\t\t\tvalue.width = viewImage.getAttribute( 'width' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.add( viewFigureToModel() );\n\n\t\tconst insertImageCommand = new InsertImageCommand( editor );\n\n\t\t// Register `insertImage` command and add `imageInsert` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'insertImage', insertImageCommand );\n\t\teditor.commands.add( 'imageInsert', insertImageCommand );\n\t}\n}\n\n// Creates a view element representing the image.\n//\n//\t\t<figure class=\"image\"><img></img></figure>\n//\n// Note that `alt` and `src` attributes are converted separately, so they are not included.\n//\n// @private\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @returns {module:engine/view/containerelement~ContainerElement}\nexport function createImageViewElement( writer ) {\n\tconst emptyElement = writer.createEmptyElement( 'img' );\n\tconst figure = writer.createContainerElement( 'figure', { class: 'image' } );\n\n\twriter.insert( writer.createPositionAt( figure, 0 ), emptyElement );\n\n\treturn figure;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/image/imageloadobserver\n */\n\nimport { Observer } from 'ckeditor5/src/engine';\n\n/**\n * Observes all new images added to the {@link module:engine/view/document~Document},\n * fires {@link module:engine/view/document~Document#event:imageLoaded} and\n * {@link module:engine/view/document~Document#event:layoutChanged} event every time when the new image\n * has been loaded.\n *\n * **Note:** This event is not fired for images that has been added to the document and rendered as `complete` (already loaded).\n *\n * @extends module:engine/view/observer/observer~Observer\n */\nexport default class ImageLoadObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tobserve( domRoot ) {\n\t\tthis.listenTo( domRoot, 'load', ( event, domEvent ) => {\n\t\t\tconst domElement = domEvent.target;\n\n\t\t\tif ( this.checkShouldIgnoreEventFromTarget( domElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( domElement.tagName == 'IMG' ) {\n\t\t\t\tthis._fireEvents( domEvent );\n\t\t\t}\n\t\t\t// Use capture phase for better performance (#4504).\n\t\t}, { useCapture: true } );\n\t}\n\n\t/**\n\t * Fires {@link module:engine/view/document~Document#event:layoutChanged} and\n\t * {@link module:engine/view/document~Document#event:imageLoaded}\n\t * if observer {@link #isEnabled is enabled}.\n\t *\n\t * @protected\n\t * @param {Event} domEvent The DOM event.\n\t */\n\t_fireEvents( domEvent ) {\n\t\tif ( this.isEnabled ) {\n\t\t\tthis.document.fire( 'layoutChanged' );\n\t\t\tthis.document.fire( 'imageLoaded', domEvent );\n\t\t}\n\t}\n}\n\n/**\n * Fired when an <img/> DOM element has been loaded in the DOM root.\n *\n * Introduced by {@link module:image/image/imageloadobserver~ImageLoadObserver}.\n *\n * @see module:image/image/imageloadobserver~ImageLoadObserver\n * @event module:engine/view/document~Document#event:imageLoaded\n * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { toArray } from 'ckeditor5/src/utils';\n\nimport { insertImage, isImageAllowed } from './utils';\n\n/**\n * @module image/image/insertimagecommand\n */\n\n/**\n * Insert image command.\n *\n * The command is registered by the {@link module:image/image/imageediting~ImageEditing} plugin as `insertImage`\n * and it is also available via aliased `imageInsert` name.\n *\n * In order to insert an image at the current selection position\n * (according to the {@link module:widget/utils~findOptimalInsertionPosition} algorithm),\n * execute the command and specify the image source:\n *\n *\t\teditor.execute( 'insertImage', { source: 'http://url.to.the/image' } );\n *\n * It is also possible to insert multiple images at once:\n *\n *\t\teditor.execute( 'insertImage', {\n *\t\t\tsource: [\n *\t\t\t\t'path/to/image.jpg',\n *\t\t\t\t'path/to/other-image.jpg'\n *\t\t\t]\n *\t\t} );\n *\n * @extends module:core/command~Command\n */\nexport default class InsertImageCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tthis.isEnabled = isImageAllowed( this.editor.model );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param {Object} options Options for the executed command.\n\t * @param {String|Array.<String>} options.source The image source or an array of image sources to insert.\n\t */\n\texecute( options ) {\n\t\tconst model = this.editor.model;\n\n\t\tfor ( const src of toArray( options.source ) ) {\n\t\t\tinsertImage( model, { src } );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/image/ui/utils\n */\n\nimport { BalloonPanelView } from 'ckeditor5/src/ui';\nimport { getSelectedImageWidget } from '../utils';\n\n/**\n * A helper utility that positions the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n * with respect to the image in the editor content, if one is selected.\n *\n * @param {module:core/editor/editor~Editor} editor The editor instance.\n */\nexport function repositionContextualBalloon( editor ) {\n\tconst balloon = editor.plugins.get( 'ContextualBalloon' );\n\n\tif ( getSelectedImageWidget( editor.editing.view.document.selection ) ) {\n\t\tconst position = getBalloonPositionData( editor );\n\n\t\tballoon.updatePosition( position );\n\t}\n}\n\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected element in the editor content.\n *\n * @param {module:core/editor/editor~Editor} editor The editor instance.\n * @returns {module:utils/dom/position~Options}\n */\nexport function getBalloonPositionData( editor ) {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\n\treturn {\n\t\ttarget: editingView.domConverter.viewToDom( editingView.document.selection.getSelectedElement() ),\n\t\tpositions: [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast\n\t\t]\n\t};\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/image/utils\n */\n\nimport { findOptimalInsertionPosition, checkSelectionOnObject, isWidget, toWidget } from 'ckeditor5/src/widget';\n\n/**\n * Converts a given {@link module:engine/view/element~Element} to an image widget:\n * * Adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to recognize the image widget element.\n * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n *\n * @param {module:engine/view/element~Element} viewElement\n * @param {module:engine/view/downcastwriter~DowncastWriter} writer An instance of the view writer.\n * @param {String} label The element's label. It will be concatenated with the image `alt` attribute if one is present.\n * @returns {module:engine/view/element~Element}\n */\nexport function toImageWidget( viewElement, writer, label ) {\n\twriter.setCustomProperty( 'image', true, viewElement );\n\n\treturn toWidget( viewElement, writer, { label: labelCreator } );\n\n\tfunction labelCreator() {\n\t\tconst imgElement = getViewImgFromWidget( viewElement );\n\t\tconst altText = imgElement.getAttribute( 'alt' );\n\n\t\treturn altText ? `${ altText } ${ label }` : label;\n\t}\n}\n\n/**\n * Checks if a given view element is an image widget.\n *\n * @param {module:engine/view/element~Element} viewElement\n * @returns {Boolean}\n */\nexport function isImageWidget( viewElement ) {\n\treturn !!viewElement.getCustomProperty( 'image' ) && isWidget( viewElement );\n}\n\n/**\n * Returns an image widget editing view element if one is selected.\n *\n * @param {module:engine/view/selection~Selection|module:engine/view/documentselection~DocumentSelection} selection\n * @returns {module:engine/view/element~Element|null}\n */\nexport function getSelectedImageWidget( selection ) {\n\tconst viewElement = selection.getSelectedElement();\n\n\tif ( viewElement && isImageWidget( viewElement ) ) {\n\t\treturn viewElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Checks if the provided model element is an `image`.\n *\n * @param {module:engine/model/element~Element} modelElement\n * @returns {Boolean}\n */\nexport function isImage( modelElement ) {\n\treturn !!modelElement && modelElement.is( 'element', 'image' );\n}\n\n/**\n * Handles inserting single file. This method unifies image insertion using {@link module:widget/utils~findOptimalInsertionPosition} method.\n *\n *\t\tinsertImage( model, { src: 'path/to/image.jpg' } );\n *\n * @param {module:engine/model/model~Model} model\n * @param {Object} [attributes={}] Attributes of inserted image\n * @param {module:engine/model/position~Position} [insertPosition] Position to insert the image. If not specified,\n * the {@link module:widget/utils~findOptimalInsertionPosition} logic will be applied.\n */\nexport function insertImage( model, attributes = {}, insertPosition = null ) {\n\tmodel.change( writer => {\n\t\tconst imageElement = writer.createElement( 'image', attributes );\n\n\t\tconst insertAtSelection = insertPosition || findOptimalInsertionPosition( model.document.selection, model );\n\n\t\tmodel.insertContent( imageElement, insertAtSelection );\n\n\t\t// Inserting an image might've failed due to schema regulations.\n\t\tif ( imageElement.parent ) {\n\t\t\twriter.setSelection( imageElement, 'on' );\n\t\t}\n\t} );\n}\n\n/**\n * Checks if image can be inserted at current model selection.\n *\n * @param {module:engine/model/model~Model} model\n * @returns {Boolean}\n */\nexport function isImageAllowed( model ) {\n\tconst schema = model.schema;\n\tconst selection = model.document.selection;\n\n\treturn isImageAllowedInParent( selection, schema, model ) &&\n\t\t!checkSelectionOnObject( selection, schema ) &&\n\t\tisInOtherImage( selection );\n}\n\n/**\n * Get view `<img>` element from the view widget (`<figure>`).\n *\n * Assuming that image is always a first child of a widget (ie. `figureView.getChild( 0 )`) is unsafe as other features might\n * inject their own elements to the widget.\n *\n * The `<img>` can be wrapped to other elements, e.g. `<a>`. Nested check required.\n *\n * @param {module:engine/view/element~Element} figureView\n * @returns {module:engine/view/element~Element}\n */\nexport function getViewImgFromWidget( figureView ) {\n\tconst figureChildren = [];\n\n\tfor ( const figureChild of figureView.getChildren() ) {\n\t\tfigureChildren.push( figureChild );\n\n\t\tif ( figureChild.is( 'element' ) ) {\n\t\t\tfigureChildren.push( ...figureChild.getChildren() );\n\t\t}\n\t}\n\n\treturn figureChildren.find( viewChild => viewChild.is( 'element', 'img' ) );\n}\n\n// Checks if image is allowed by schema in optimal insertion parent.\n//\n// @returns {Boolean}\nfunction isImageAllowedInParent( selection, schema, model ) {\n\tconst parent = getInsertImageParent( selection, model );\n\n\treturn schema.checkChild( parent, 'image' );\n}\n\n// Checks if selection is placed in other image (ie. in caption).\nfunction isInOtherImage( selection ) {\n\treturn [ ...selection.focus.getAncestors() ].every( ancestor => !ancestor.is( 'element', 'image' ) );\n}\n\n// Returns a node that will be used to insert image with `model.insertContent` to check if image can be placed there.\nfunction getInsertImageParent( selection, model ) {\n\tconst insertAt = findOptimalInsertionPosition( selection, model );\n\n\tconst parent = insertAt.parent;\n\n\tif ( parent.isEmpty && !parent.is( 'element', '$root' ) ) {\n\t\treturn parent.parent;\n\t}\n\n\treturn parent;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagecaption\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageCaptionEditing from './imagecaption/imagecaptionediting';\n\nimport '../theme/imagecaption.css';\n\n/**\n * The image caption plugin.\n *\n * For a detailed overview, check the {@glink features/image#image-captions image caption} documentation.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageCaption extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageCaptionEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageCaption';\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagecaption/imagecaptionediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { isImage } from '../image/utils';\nimport { captionElementCreator, getCaptionFromImage, matchImageCaption } from './utils';\n\n/**\n * The image caption engine plugin.\n *\n * It registers proper converters. It takes care of adding a caption element if the image without it is inserted\n * to the model document.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageCaptionEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageCaptionEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst schema = editor.model.schema;\n\t\tconst data = editor.data;\n\t\tconst editing = editor.editing;\n\t\tconst t = editor.t;\n\n\t\t/**\n\t\t * The last selected caption editable.\n\t\t * It is used for hiding the editable when it is empty and the image widget is no longer selected.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/view/editableelement~EditableElement} #_lastSelectedCaption\n\t\t */\n\n\t\t// Schema configuration.\n\t\tschema.register( 'caption', {\n\t\t\tallowIn: 'image',\n\t\t\tallowContentOf: '$block',\n\t\t\tisLimit: true\n\t\t} );\n\n\t\t// Add caption element to each image inserted without it.\n\t\teditor.model.document.registerPostFixer( writer => this._insertMissingModelCaptionElement( writer ) );\n\n\t\t// View to model converter for the data pipeline.\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tview: matchImageCaption,\n\t\t\tmodel: 'caption'\n\t\t} );\n\n\t\t// Model to view converter for the data pipeline.\n\t\tconst createCaptionForData = writer => writer.createContainerElement( 'figcaption' );\n\t\tdata.downcastDispatcher.on( 'insert:caption', captionModelToView( createCaptionForData, false ) );\n\n\t\t// Model to view converter for the editing pipeline.\n\t\tconst createCaptionForEditing = captionElementCreator( view, t( 'Enter image caption' ) );\n\t\tediting.downcastDispatcher.on( 'insert:caption', captionModelToView( createCaptionForEditing ) );\n\n\t\t// Always show caption in view when something is inserted in model.\n\t\tediting.downcastDispatcher.on(\n\t\t\t'insert',\n\t\t\tthis._fixCaptionVisibility( data => data.item ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\t// Hide caption when everything is removed from it.\n\t\tediting.downcastDispatcher.on( 'remove', this._fixCaptionVisibility( data => data.position.parent ), { priority: 'high' } );\n\n\t\t// Update caption visibility on view in post fixer.\n\t\tview.document.registerPostFixer( writer => this._updateCaptionVisibility( writer ) );\n\t}\n\n\t/**\n\t * Updates the view before each rendering, making sure that empty captions (so unnecessary ones) are hidden\n\t * and then visible when the image is selected.\n\t *\n\t * @private\n\t * @param {module:engine/view/downcastwriter~DowncastWriter} viewWriter\n\t * @returns {Boolean} Returns `true` when the view is updated.\n\t */\n\t_updateCaptionVisibility( viewWriter ) {\n\t\tconst mapper = this.editor.editing.mapper;\n\t\tconst lastCaption = this._lastSelectedCaption;\n\t\tlet viewCaption;\n\n\t\t// If whole image is selected.\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tconst selectedElement = modelSelection.getSelectedElement();\n\n\t\tif ( selectedElement && selectedElement.is( 'element', 'image' ) ) {\n\t\t\tconst modelCaption = getCaptionFromImage( selectedElement );\n\t\t\tviewCaption = mapper.toViewElement( modelCaption );\n\t\t}\n\n\t\t// If selection is placed inside caption.\n\t\tconst position = modelSelection.getFirstPosition();\n\t\tconst modelCaption = getParentCaption( position.parent );\n\n\t\tif ( modelCaption ) {\n\t\t\tviewCaption = mapper.toViewElement( modelCaption );\n\t\t}\n\n\t\t// Is currently any caption selected?\n\t\tif ( viewCaption && !this.editor.isReadOnly ) {\n\t\t\t// Was any caption selected before?\n\t\t\tif ( lastCaption ) {\n\t\t\t\t// Same caption as before?\n\t\t\t\tif ( lastCaption === viewCaption ) {\n\t\t\t\t\treturn showCaption( viewCaption, viewWriter );\n\t\t\t\t} else {\n\t\t\t\t\thideCaptionIfEmpty( lastCaption, viewWriter );\n\t\t\t\t\tthis._lastSelectedCaption = viewCaption;\n\n\t\t\t\t\treturn showCaption( viewCaption, viewWriter );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._lastSelectedCaption = viewCaption;\n\t\t\t\treturn showCaption( viewCaption, viewWriter );\n\t\t\t}\n\t\t} else {\n\t\t\t// Was any caption selected before?\n\t\t\tif ( lastCaption ) {\n\t\t\t\tconst viewModified = hideCaptionIfEmpty( lastCaption, viewWriter );\n\t\t\t\tthis._lastSelectedCaption = null;\n\n\t\t\t\treturn viewModified;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a converter that fixes caption visibility during the model-to-view conversion.\n\t * Checks if the changed node is placed inside the caption element and fixes its visibility in the view.\n\t *\n\t * @private\n\t * @param {Function} nodeFinder\n\t * @returns {Function}\n\t */\n\t_fixCaptionVisibility( nodeFinder ) {\n\t\treturn ( evt, data, conversionApi ) => {\n\t\t\tconst node = nodeFinder( data );\n\t\t\tconst modelCaption = getParentCaption( node );\n\t\t\tconst mapper = this.editor.editing.mapper;\n\t\t\tconst viewWriter = conversionApi.writer;\n\n\t\t\tif ( modelCaption ) {\n\t\t\t\tconst viewCaption = mapper.toViewElement( modelCaption );\n\n\t\t\t\tif ( viewCaption ) {\n\t\t\t\t\tif ( modelCaption.childCount ) {\n\t\t\t\t\t\tviewWriter.removeClass( 'ck-hidden', viewCaption );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tviewWriter.addClass( 'ck-hidden', viewCaption );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Checks whether the data inserted to the model document have an image element that has no caption element inside it.\n\t * If there is none, it adds it to the image element.\n\t *\n\t * @private\n\t * @param {module:engine/model/writer~Writer} writer The writer to make changes with.\n\t * @returns {Boolean} `true` if any change was applied, `false` otherwise.\n\t */\n\t_insertMissingModelCaptionElement( writer ) {\n\t\tconst model = this.editor.model;\n\t\tconst changes = model.document.differ.getChanges();\n\n\t\tconst imagesWithoutCaption = [];\n\n\t\tfor ( const entry of changes ) {\n\t\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\t\tconst item = entry.position.nodeAfter;\n\n\t\t\t\tif ( item.is( 'element', 'image' ) && !getCaptionFromImage( item ) ) {\n\t\t\t\t\timagesWithoutCaption.push( item );\n\t\t\t\t}\n\n\t\t\t\t// Check elements with children for nested images.\n\t\t\t\tif ( !item.is( 'element', 'image' ) && item.childCount ) {\n\t\t\t\t\tfor ( const nestedItem of model.createRangeIn( item ).getItems() ) {\n\t\t\t\t\t\tif ( nestedItem.is( 'element', 'image' ) && !getCaptionFromImage( nestedItem ) ) {\n\t\t\t\t\t\t\timagesWithoutCaption.push( nestedItem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( const image of imagesWithoutCaption ) {\n\t\t\twriter.appendElement( 'caption', image );\n\t\t}\n\n\t\treturn !!imagesWithoutCaption.length;\n\t}\n}\n\n// Creates a converter that converts image caption model element to view element.\n//\n// @private\n// @param {Function} elementCreator\n// @param {Boolean} [hide=true] When set to `false` view element will not be inserted when it's empty.\n// @returns {Function}\nfunction captionModelToView( elementCreator, hide = true ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst captionElement = data.item;\n\n\t\t// Return if element shouldn't be present when empty.\n\t\tif ( !captionElement.childCount && !hide ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isImage( captionElement.parent ) ) {\n\t\t\tif ( !conversionApi.consumable.consume( data.item, 'insert' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewImage = conversionApi.mapper.toViewElement( data.range.start.parent );\n\t\t\tconst viewCaption = elementCreator( conversionApi.writer );\n\t\t\tconst viewWriter = conversionApi.writer;\n\n\t\t\t// Hide if empty.\n\t\t\tif ( !captionElement.childCount ) {\n\t\t\t\tviewWriter.addClass( 'ck-hidden', viewCaption );\n\t\t\t}\n\n\t\t\tinsertViewCaptionAndBind( viewCaption, data.item, viewImage, conversionApi );\n\t\t}\n\t};\n}\n\n// Inserts `viewCaption` at the end of `viewImage` and binds it to `modelCaption`.\n//\n// @private\n// @param {module:engine/view/containerelement~ContainerElement} viewCaption\n// @param {module:engine/model/element~Element} modelCaption\n// @param {module:engine/view/containerelement~ContainerElement} viewImage\n// @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\nfunction insertViewCaptionAndBind( viewCaption, modelCaption, viewImage, conversionApi ) {\n\tconst viewPosition = conversionApi.writer.createPositionAt( viewImage, 'end' );\n\n\tconversionApi.writer.insert( viewPosition, viewCaption );\n\tconversionApi.mapper.bindElements( modelCaption, viewCaption );\n}\n\n// Checks if the provided node or one of its ancestors is a caption element, and returns it.\n//\n// @private\n// @param {module:engine/model/node~Node} node\n// @returns {module:engine/model/element~Element|null}\nfunction getParentCaption( node ) {\n\tconst ancestors = node.getAncestors( { includeSelf: true } );\n\tconst caption = ancestors.find( ancestor => ancestor.name == 'caption' );\n\n\tif ( caption && caption.parent && caption.parent.name == 'image' ) {\n\t\treturn caption;\n\t}\n\n\treturn null;\n}\n\n// Hides a given caption in the view if it is empty.\n//\n// @private\n// @param {module:engine/view/containerelement~ContainerElement} caption\n// @param {module:engine/view/downcastwriter~DowncastWriter} viewWriter\n// @returns {Boolean} Returns `true` if the view was modified.\nfunction hideCaptionIfEmpty( caption, viewWriter ) {\n\tif ( !caption.childCount && !caption.hasClass( 'ck-hidden' ) ) {\n\t\tviewWriter.addClass( 'ck-hidden', caption );\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n// Shows the caption.\n//\n// @private\n// @param {module:engine/view/containerelement~ContainerElement} caption\n// @param {module:engine/view/downcastwriter~DowncastWriter} viewWriter\n// @returns {Boolean} Returns `true` if the view was modified.\nfunction showCaption( caption, viewWriter ) {\n\tif ( caption.hasClass( 'ck-hidden' ) ) {\n\t\tviewWriter.removeClass( 'ck-hidden', caption );\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagecaption/utils\n */\n\nimport { enablePlaceholder } from 'ckeditor5/src/engine';\nimport { toWidgetEditable } from 'ckeditor5/src/widget';\n\n/**\n * Returns a function that creates a caption editable element for the given {@link module:engine/view/document~Document}.\n *\n * @param {module:engine/view/view~View} view\n * @param {String} placeholderText The text to be displayed when the caption is empty.\n * @returns {Function}\n */\nexport function captionElementCreator( view, placeholderText ) {\n\treturn writer => {\n\t\tconst editable = writer.createEditableElement( 'figcaption' );\n\t\twriter.setCustomProperty( 'imageCaption', true, editable );\n\n\t\tenablePlaceholder( {\n\t\t\tview,\n\t\t\telement: editable,\n\t\t\ttext: placeholderText\n\t\t} );\n\n\t\treturn toWidgetEditable( editable, writer );\n\t};\n}\n\n/**\n * Returns `true` if a given view element is the image caption editable.\n *\n * @param {module:engine/view/element~Element} viewElement\n * @returns {Boolean}\n */\nexport function isCaption( viewElement ) {\n\treturn !!viewElement.getCustomProperty( 'imageCaption' );\n}\n\n/**\n * Returns the caption model element from a given image element. Returns `null` if no caption is found.\n *\n * @param {module:engine/model/element~Element} imageModelElement\n * @returns {module:engine/model/element~Element|null}\n */\nexport function getCaptionFromImage( imageModelElement ) {\n\tfor ( const node of imageModelElement.getChildren() ) {\n\t\tif ( !!node && node.is( 'element', 'caption' ) ) {\n\t\t\treturn node;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a `<figcaption>` element that is placed\n * inside the image `<figure>` element.\n *\n * @param {module:engine/view/element~Element} element\n * @returns {Object|null} Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element\n * cannot be matched.\n */\nexport function matchImageCaption( element ) {\n\tconst parent = element.parent;\n\n\t// Convert only captions for images.\n\tif ( element.name == 'figcaption' && parent && parent.name == 'figure' && parent.hasClass( 'image' ) ) {\n\t\treturn { name: true };\n\t}\n\n\treturn null;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageinsert\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageUpload from './imageupload';\nimport ImageInsertUI from './imageinsert/imageinsertui';\n\n/**\n * The image insert plugin.\n *\n * For a detailed overview, check the {@glink features/image-upload/image-upload Image upload feature}\n * and {@glink features/image#inserting-images-via-source-url Insert images via source URL} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins\n * to enable image uploading or inserting via implemented integrations:\n *\n * * {@link module:image/imageupload~ImageUpload}\n * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI},\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageInsert extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageInsert';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageUpload, ImageInsertUI ];\n\t}\n}\n\n/**\n * The image insert configuration.\n *\n * @protected\n * @member {module:image/imageinsert~ImageInsertConfig} module:image/image~ImageConfig#insert\n */\n\n/**\n * The configuration of the image insert dropdown panel view. Used by the image insert feature in the `@ckeditor/ckeditor5-image` package.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n * \t\t\t\timage: {\n * \t\t\t\t\tinsert: {\n *\t\t\t\t\t\t... // settings for \"insertImage\" view goes here\n * \t\t\t\t\t}\n * \t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.\n *\n * @protected\n * @interface module:image/imageinsert~ImageInsertConfig\n */\n\n/**\n * The image insert panel view configuration contains a list of {@link module:image/imageinsert~ImageInsert} integrations.\n *\n * The option accepts string tokens.\n * * for predefined integrations, we have two special strings: `insertImageViaUrl` and `openCKFinder`.\n * The former adds the **Insert image via URL** feature, while the latter adds the built-in **CKFinder** integration.\n * * for custom integrations, each string should be a name of the component registered in the\n * {@link module:ui/componentfactory~ComponentFactory component factory}.\n * If you have a plugin `PluginX` that registers `pluginXButton` component, then the integration token\n * in that case should be `pluginXButton`.\n *\n *\t\t// Add `insertImageViaUrl`, `openCKFinder` and custom `pluginXButton` integrations.\n *\t\tconst imageInsertConfig = {\n *\t\t\tinsert: {\n *\t\t\t\tintegrations: [\n *\t\t\t\t\t'insertImageViaUrl',\n *\t\t\t\t\t'openCKFinder',\n *\t\t\t\t\t'pluginXButton'\n *\t\t\t\t]\n *\t\t\t}\n *\t\t};\n *\n * @member {Array.<String>} module:image/imageinsert~ImageInsertConfig#integrations\n * @default [ 'insertImageViaUrl' ]\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageinsert/imageinsertui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageInsertPanelView from './ui/imageinsertpanelview';\nimport { prepareIntegrations } from './utils';\n\nimport { isImage } from '../image/utils';\n\n/**\n * The image insert dropdown plugin.\n *\n * For a detailed overview, check the {@glink features/image-upload/image-upload Image upload feature}\n * and {@glink features/image#inserting-images-via-source-url Insert images via source URL} documentation.\n *\n * Adds the `'insertImage'` dropdown to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n * and also the `imageInsert` dropdown as an alias for backward compatibility.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageInsertUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageInsertUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst componentCreator = locale => {\n\t\t\treturn this._createDropdownView( locale );\n\t\t};\n\n\t\t// Register `insertImage` dropdown and add `imageInsert` dropdown as an alias for backward compatibility.\n\t\teditor.ui.componentFactory.add( 'insertImage', componentCreator );\n\t\teditor.ui.componentFactory.add( 'imageInsert', componentCreator );\n\t}\n\n\t/**\n\t * Creates the dropdown view.\n\t *\n\t * @param {module:utils/locale~Locale} locale The localization services instance.\n\t *\n\t * @private\n\t * @returns {module:ui/dropdown/dropdownview~DropdownView}\n\t */\n\t_createDropdownView( locale ) {\n\t\tconst editor = this.editor;\n\t\tconst imageInsertView = new ImageInsertPanelView( locale, prepareIntegrations( editor ) );\n\t\tconst command = editor.commands.get( 'uploadImage' );\n\n\t\tconst dropdownView = imageInsertView.dropdownView;\n\t\tconst splitButtonView = dropdownView.buttonView;\n\n\t\tsplitButtonView.actionView = editor.ui.componentFactory.create( 'uploadImage' );\n\t\t// After we replaced action button with `uploadImage` component,\n\t\t// we have lost a proper styling and some minor visual quirks have appeared.\n\t\t// Brining back original split button classes helps fix the button styling\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/7986.\n\t\tsplitButtonView.actionView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck ck-button ck-splitbutton__action'\n\t\t\t}\n\t\t} );\n\n\t\treturn this._setUpDropdown( dropdownView, imageInsertView, command );\n\t}\n\n\t/**\n\t * Sets up the dropdown view.\n\t *\n\t * @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView A dropdownView.\n\t * @param {module:image/imageinsert/ui/imageinsertpanelview~ImageInsertPanelView} imageInsertView An imageInsertView.\n\t * @param {module:core/command~Command} command An insertImage command\n\t *\n\t * @private\n\t * @returns {module:ui/dropdown/dropdownview~DropdownView}\n\t */\n\t_setUpDropdown( dropdownView, imageInsertView, command ) {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst insertButtonView = imageInsertView.insertButtonView;\n\t\tconst insertImageViaUrlForm = imageInsertView.getIntegration( 'insertImageViaUrl' );\n\t\tconst panelView = dropdownView.panelView;\n\n\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t// Defer the children injection to improve initial performance.\n\t\t// See https://github.com/ckeditor/ckeditor5/pull/8019#discussion_r484069652.\n\t\tdropdownView.buttonView.once( 'open', () => {\n\t\t\tpanelView.children.add( imageInsertView );\n\t\t} );\n\n\t\tdropdownView.on( 'change:isOpen', () => {\n\t\t\tconst selectedElement = editor.model.document.selection.getSelectedElement();\n\n\t\t\tif ( dropdownView.isOpen ) {\n\t\t\t\timageInsertView.focus();\n\n\t\t\t\tif ( isImage( selectedElement ) ) {\n\t\t\t\t\timageInsertView.imageURLInputValue = selectedElement.getAttribute( 'src' );\n\t\t\t\t\tinsertButtonView.label = t( 'Update' );\n\t\t\t\t\tinsertImageViaUrlForm.label = t( 'Update image URL' );\n\t\t\t\t} else {\n\t\t\t\t\timageInsertView.imageURLInputValue = '';\n\t\t\t\t\tinsertButtonView.label = t( 'Insert' );\n\t\t\t\t\tinsertImageViaUrlForm.label = t( 'Insert image via URL' );\n\t\t\t\t}\n\t\t\t}\n\t\t// Note: Use the low priority to make sure the following listener starts working after the\n\t\t// default action of the drop-down is executed (i.e. the panel showed up). Otherwise, the\n\t\t// invisible form/input cannot be focused/selected.\n\t\t}, { priority: 'low' } );\n\n\t\timageInsertView.delegate( 'submit', 'cancel' ).to( dropdownView );\n\t\tthis.delegate( 'cancel' ).to( dropdownView );\n\n\t\tdropdownView.on( 'submit', () => {\n\t\t\tclosePanel();\n\t\t\tonSubmit();\n\t\t} );\n\n\t\tdropdownView.on( 'cancel', () => {\n\t\t\tclosePanel();\n\t\t} );\n\n\t\tfunction onSubmit() {\n\t\t\tconst selectedElement = editor.model.document.selection.getSelectedElement();\n\n\t\t\tif ( isImage( selectedElement ) ) {\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\twriter.setAttribute( 'src', imageInsertView.imageURLInputValue, selectedElement );\n\t\t\t\t\twriter.removeAttribute( 'srcset', selectedElement );\n\t\t\t\t\twriter.removeAttribute( 'sizes', selectedElement );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\teditor.execute( 'insertImage', { source: imageInsertView.imageURLInputValue } );\n\t\t\t}\n\t\t}\n\n\t\tfunction closePanel() {\n\t\t\teditor.editing.view.focus();\n\t\t\tdropdownView.isOpen = false;\n\t\t}\n\n\t\treturn dropdownView;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageinsert/ui/imageinsertformrowview\n */\n\nimport { View } from 'ckeditor5/src/ui';\n\nimport '../../../theme/imageinsertformrowview.css';\n\n/**\n * The class representing a single row in a complex form,\n * used by {@link module:image/imageinsert/ui/imageinsertpanelview~ImageInsertPanelView}.\n *\n * **Note**: For now this class is private. When more use cases appear (beyond `ckeditor5-table` and `ckeditor5-image`),\n * it will become a component in `ckeditor5-ui`.\n *\n * @private\n * @extends module:ui/view~View\n */\nexport default class ImageUploadFormRowView extends View {\n\t/**\n\t * Creates an instance of the form row class.\n\t *\n\t * @param {module:utils/locale~Locale} locale The locale instance.\n\t * @param {Object} options\n\t * @param {Array.<module:ui/view~View>} [options.children]\n\t * @param {String} [options.class]\n\t * @param {module:ui/view~View} [options.labelView] When passed, the row gets the `group` and `aria-labelledby`\n\t * DOM attributes and gets described by the label.\n\t */\n\tconstructor( locale, options = {} ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\t/**\n\t\t * An additional CSS class added to the {@link #element}.\n\t\t *\n\t\t * @observable\n\t\t * @member {String} #class\n\t\t */\n\t\tthis.set( 'class', options.class || null );\n\n\t\t/**\n\t\t * A collection of row items (buttons, dropdowns, etc.).\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis.children = this.createCollection();\n\n\t\tif ( options.children ) {\n\t\t\toptions.children.forEach( child => this.children.add( child ) );\n\t\t}\n\n\t\t/**\n\t\t * The role property reflected by the `role` DOM attribute of the {@link #element}.\n\t\t *\n\t\t * **Note**: Used only when a `labelView` is passed to constructor `options`.\n\t\t *\n\t\t * @private\n\t\t * @observable\n\t\t * @member {String} #role\n\t\t */\n\t\tthis.set( '_role', null );\n\n\t\t/**\n\t\t * The ARIA property reflected by the `aria-labelledby` DOM attribute of the {@link #element}.\n\t\t *\n\t\t * **Note**: Used only when a `labelView` is passed to constructor `options`.\n\t\t *\n\t\t * @private\n\t\t * @observable\n\t\t * @member {String} #ariaLabelledBy\n\t\t */\n\t\tthis.set( '_ariaLabelledBy', null );\n\n\t\tif ( options.labelView ) {\n\t\t\tthis.set( {\n\t\t\t\t_role: 'group',\n\t\t\t\t_ariaLabelledBy: options.labelView.id\n\t\t\t} );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form__row',\n\t\t\t\t\tbind.to( 'class' )\n\t\t\t\t],\n\t\t\t\trole: bind.to( '_role' ),\n\t\t\t\t'aria-labelledby': bind.to( '_ariaLabelledBy' )\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageinsert/ui/imageinsertpanelview\n */\n\nimport { icons } from 'ckeditor5/src/core';\nimport { ButtonView, View, SplitButtonView, ViewCollection, submitHandler, createDropdown, FocusCycler } from 'ckeditor5/src/ui';\nimport { Collection, FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';\n\nimport ImageInsertFormRowView from './imageinsertformrowview';\n\nimport '../../../theme/imageinsert.css';\n\n/**\n * The insert an image via URL view controller class.\n *\n * See {@link module:image/imageinsert/ui/imageinsertpanelview~ImageInsertPanelView}.\n *\n * @extends module:ui/view~View\n */\nexport default class ImageInsertPanelView extends View {\n\t/**\n\t * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t *\n\t * @param {module:utils/locale~Locale} [locale] The localization services instance.\n\t * @param {Object} [integrations] An integrations object that contains\n\t * components (or tokens for components) to be shown in the panel view.\n\t */\n\tconstructor( locale, integrations ) {\n\t\tsuper( locale );\n\n\t\tconst { insertButtonView, cancelButtonView } = this._createActionButtons( locale );\n\n\t\t/**\n\t\t * The \"insert/update\" button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.insertButtonView = insertButtonView;\n\n\t\t/**\n\t\t * The \"cancel\" button view.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView}\n\t\t */\n\t\tthis.cancelButtonView = cancelButtonView;\n\n\t\t/**\n\t\t * The dropdown view.\n\t\t *\n\t\t * @member {module:ui/dropdown/dropdownview~DropdownView}\n\t\t */\n\t\tthis.dropdownView = this._createDropdownView( locale );\n\n\t\t/**\n\t\t * The value of the URL input.\n\t\t *\n\t\t * @member {String} #imageURLInputValue\n\t\t * @observable\n\t\t */\n\t\tthis.set( 'imageURLInputValue', '' );\n\n\t\t/**\n\t\t * Tracks information about DOM focus in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/focustracker~FocusTracker}\n\t\t */\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t/**\n\t\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/keystrokehandler~KeystrokeHandler}\n\t\t */\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t/**\n\t\t * A collection of views that can be focused in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._focusables = new ViewCollection();\n\n\t\t/**\n\t\t * Helps cycling over {@link #_focusables} in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/focuscycler~FocusCycler}\n\t\t */\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * A collection of the defined integrations for inserting the images.\n\t\t *\n\t\t * @private\n\t\t * @member {module:utils/collection~Collection}\n\t\t */\n\t\tthis.set( '_integrations', new Collection() );\n\n\t\tif ( integrations ) {\n\t\t\tfor ( const [ integration, integrationView ] of Object.entries( integrations ) ) {\n\t\t\t\tif ( integration === 'insertImageViaUrl' ) {\n\t\t\t\t\tintegrationView.fieldView.bind( 'value' ).to( this, 'imageURLInputValue', value => value || '' );\n\n\t\t\t\t\tintegrationView.fieldView.on( 'input', () => {\n\t\t\t\t\t\tthis.imageURLInputValue = integrationView.fieldView.element.value.trim();\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tintegrationView.name = integration;\n\n\t\t\t\tthis._integrations.add( integrationView );\n\t\t\t}\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-image-insert-form'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t...this._integrations,\n\t\t\t\tnew ImageInsertFormRowView( locale, {\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tthis.insertButtonView,\n\t\t\t\t\t\tthis.cancelButtonView\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-image-insert-form__action-row'\n\t\t\t\t} )\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trender() {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\t...this._integrations,\n\t\t\tthis.insertButtonView,\n\t\t\tthis.cancelButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element );\n\n\t\tconst stopPropagation = data => data.stopPropagation();\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\n\t\t// Intercept the \"selectstart\" event, which is blocked by default because of the default behavior\n\t\t// of the DropdownView#panelView.\n\t\t// TODO: blocking \"selectstart\" in the #panelView should be configurable per–drop–down instance.\n\t\tthis.listenTo( childViews[ 0 ].element, 'selectstart', ( evt, domEvt ) => {\n\t\t\tdomEvt.stopPropagation();\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Returns a view of the integration.\n\t *\n\t * @param {String} name The name of the integration.\n\t * @returns {module:ui/view~View}\n\t */\n\tgetIntegration( name ) {\n\t\treturn this._integrations.find( integration => integration.name === name );\n\t}\n\n\t/**\n\t * Creates the dropdown view.\n\t *\n\t * @param {module:utils/locale~Locale} locale The localization services instance.\n\t *\n\t * @private\n\t * @returns {module:ui/dropdown/dropdownview~DropdownView}\n\t */\n\t_createDropdownView( locale ) {\n\t\tconst t = locale.t;\n\t\tconst dropdownView = createDropdown( locale, SplitButtonView );\n\t\tconst splitButtonView = dropdownView.buttonView;\n\t\tconst panelView = dropdownView.panelView;\n\n\t\tsplitButtonView.set( {\n\t\t\tlabel: t( 'Insert image' ),\n\t\t\ticon: icons.image,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tpanelView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-image-insert__panel'\n\t\t\t}\n\t\t} );\n\n\t\treturn dropdownView;\n\t}\n\n\t/**\n\t * Creates the following form controls:\n\t *\n\t * * {@link #insertButtonView},\n\t * * {@link #cancelButtonView}.\n\t *\n\t * @param {module:utils/locale~Locale} locale The localization services instance.\n\t *\n\t * @private\n\t * @returns {Object.<String,module:ui/view~View>}\n\t */\n\t_createActionButtons( locale ) {\n\t\tconst t = locale.t;\n\t\tconst insertButtonView = new ButtonView( locale );\n\t\tconst cancelButtonView = new ButtonView( locale );\n\n\t\tinsertButtonView.set( {\n\t\t\tlabel: t( 'Insert' ),\n\t\t\ticon: icons.check,\n\t\t\tclass: 'ck-button-save',\n\t\t\ttype: 'submit',\n\t\t\twithText: true,\n\t\t\tisEnabled: this.imageURLInputValue\n\t\t} );\n\n\t\tcancelButtonView.set( {\n\t\t\tlabel: t( 'Cancel' ),\n\t\t\ticon: icons.cancel,\n\t\t\tclass: 'ck-button-cancel',\n\t\t\twithText: true\n\t\t} );\n\n\t\tinsertButtonView.bind( 'isEnabled' ).to( this, 'imageURLInputValue', value => !!value );\n\t\tinsertButtonView.delegate( 'execute' ).to( this, 'submit' );\n\t\tcancelButtonView.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn { insertButtonView, cancelButtonView };\n\t}\n\n\t/**\n\t * Focuses the first {@link #_focusables focusable} in the form.\n\t */\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n}\n\n/**\n * Fired when the form view is submitted (when one of the children triggered the submit event),\n * e.g. by a click on {@link #insertButtonView}.\n *\n * @event submit\n */\n\n/**\n * Fired when the form view is canceled, e.g. by a click on {@link #cancelButtonView}.\n *\n * @event cancel\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageinsert/utils\n */\n\nimport { LabeledFieldView, createLabeledInputText } from 'ckeditor5/src/ui';\n\n/**\n * Creates integrations object that will be passed to the\n * {@link module:image/imageinsert/ui/imageinsertpanelview~ImageInsertPanelView}.\n *\n * @param {module:core/editor/editor~Editor} editor Editor instance.\n *\n * @returns {Object.<String, module:ui/view~View>} Integrations object.\n */\nexport function prepareIntegrations( editor ) {\n\tconst panelItems = editor.config.get( 'image.insert.integrations' );\n\tconst imageInsertUIPlugin = editor.plugins.get( 'ImageInsertUI' );\n\n\tconst PREDEFINED_INTEGRATIONS = {\n\t\t'insertImageViaUrl': createLabeledInputView( editor.locale )\n\t};\n\n\tif ( !panelItems ) {\n\t\treturn PREDEFINED_INTEGRATIONS;\n\t}\n\n\t// Prepares ckfinder component for the `openCKFinder` integration token.\n\tif ( panelItems.find( item => item === 'openCKFinder' ) && editor.ui.componentFactory.has( 'ckfinder' ) ) {\n\t\tconst ckFinderButton = editor.ui.componentFactory.create( 'ckfinder' );\n\t\tckFinderButton.set( {\n\t\t\twithText: true,\n\t\t\tclass: 'ck-image-insert__ck-finder-button'\n\t\t} );\n\n\t\t// We want to close the dropdown panel view when user clicks the ckFinderButton.\n\t\tckFinderButton.delegate( 'execute' ).to( imageInsertUIPlugin, 'cancel' );\n\n\t\tPREDEFINED_INTEGRATIONS.openCKFinder = ckFinderButton;\n\t}\n\n\t// Creates integrations object of valid views to pass it to the ImageInsertPanelView.\n\treturn panelItems.reduce( ( object, key ) => {\n\t\tif ( PREDEFINED_INTEGRATIONS[ key ] ) {\n\t\t\tobject[ key ] = PREDEFINED_INTEGRATIONS[ key ];\n\t\t} else if ( editor.ui.componentFactory.has( key ) ) {\n\t\t\tobject[ key ] = editor.ui.componentFactory.create( key );\n\t\t}\n\n\t\treturn object;\n\t}, {} );\n}\n\n/**\n * Creates labeled field view.\n *\n * @param {module:utils/locale~Locale} locale The localization services instance.\n *\n * @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView}\n */\nexport function createLabeledInputView( locale ) {\n\tconst t = locale.t;\n\tconst labeledInputView = new LabeledFieldView( locale, createLabeledInputText );\n\n\tlabeledInputView.set( {\n\t\tlabel: t( 'Insert image via URL' )\n\t} );\n\tlabeledInputView.fieldView.placeholder = 'https://example.com/image.png';\n\n\treturn labeledInputView;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageresize\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageResizeButtons from './imageresize/imageresizebuttons';\nimport ImageResizeEditing from './imageresize/imageresizeediting';\nimport ImageResizeHandles from './imageresize/imageresizehandles';\n\nimport '../theme/imageresize.css';\n\n/**\n * The image resize plugin.\n *\n * It adds a possibility to resize each image using handles.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageResize extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageResizeEditing, ImageResizeHandles, ImageResizeButtons ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageResize';\n\t}\n}\n\n/**\n * The available options are `'px'` or `'%'`.\n *\n * Determines the size unit applied to the resized image.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\timage: {\n *\t\t\t\t\tresizeUnit: 'px'\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n *\n * This option is used by the {@link module:image/imageresize~ImageResize} feature.\n *\n * @default '%'\n * @member {String} module:image/image~ImageConfig#resizeUnit\n */\n\n/**\n * The image resize options.\n *\n * Each option should have at least these two properties:\n *\n * * name: The name of the UI component registered in the global\n * {@link module:core/editor/editorui~EditorUI#componentFactory component factory} of the editor,\n * representing the button a user can click to change the size of an image,\n * * value: An actual image width applied when a user clicks the mentioned button\n * ({@link module:image/imageresize/resizeimagecommand~ResizeImageCommand} gets executed).\n * The value property is combined with the {@link module:image/image~ImageConfig#resizeUnit `config.image.resizeUnit`} (`%` by default).\n * For instance: `value: '50'` and `resizeUnit: '%'` will render as `'50%'` in the UI.\n *\n * **Resetting the image size**\n *\n * If you want to set an option that will reset image to its original size, you need to pass a `null` value\n * to one of the options. The `:original` token is not mandatory, you can call it anything you wish, but it must reflect\n * in the standalone buttons configuration for the image toolbar.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\timage: {\n *\t\t\t\t\tresizeUnit: \"%\",\n *\t\t\t\t\tresizeOptions: [ {\n *\t\t\t\t\t\tname: 'resizeImage:original',\n *\t\t\t\t\t\tvalue: null\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:50',\n *\t\t\t\t\t\tvalue: '50'\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:75',\n *\t\t\t\t\t\tvalue: '75'\n *\t\t\t\t\t} ]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * **Resizing images using a dropdown**\n *\n * With resize options defined, you can decide whether you want to display them as a dropdown or as standalone buttons.\n * For the dropdown, you need to pass only the `resizeImage` token to the\n{@link module:image/image~ImageConfig#toolbar `config.image.toolbar`}. The dropdown contains all defined options by default:\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\timage: {\n *\t\t\t\t\tresizeUnit: \"%\",\n *\t\t\t\t\tresizeOptions: [ {\n *\t\t\t\t\t\tname: 'resizeImage:original',\n *\t\t\t\t\t\tvalue: null\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:50',\n *\t\t\t\t\t\tvalue: '50'\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:75',\n *\t\t\t\t\t\tvalue: '75'\n *\t\t\t\t\t} ],\n *\t\t\t\t\ttoolbar: [ 'resizeImage', ... ],\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * **Resizing images using individual buttons**\n *\n * If you want to have separate buttons for {@link module:image/imageresize/imageresizebuttons~ImageResizeOption each option},\n * pass their names to the {@link module:image/image~ImageConfig#toolbar `config.image.toolbar`} instead. Please keep in mind\n * that this time **you must define the additional\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeOption `icon` property}**:\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\timage: {\n *\t\t\t\t\tresizeUnit: \"%\",\n *\t\t\t\t\tresizeOptions: [ {\n *\t\t\t\t\t\tname: 'resizeImage:original',\n *\t\t\t\t\t\tvalue: null,\n *\t\t\t\t\t\ticon: 'original'\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:25',\n *\t\t\t\t\t\tvalue: '25',\n *\t\t\t\t\t\ticon: 'small'\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:50',\n *\t\t\t\t\t\tvalue: '50',\n *\t\t\t\t\t\ticon: 'medium'\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:75',\n *\t\t\t\t\t\tvalue: '75',\n *\t\t\t\t\t\ticon: 'large'\n *\t\t\t\t\t} ],\n *\t\t\t\t\ttoolbar: [ 'resizeImage:25', 'resizeImage:50', 'resizeImage:75', 'resizeImage:original', ... ],\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * **Customizing resize button labels**\n *\n * You can set your own label for each resize button. To do that, add the `label` property like in the example below.\n *\n * * When using the **dropdown**, the labels are displayed on the list of all options when you open the dropdown.\n * * When using **standalone buttons**, the labels will are displayed as tooltips when a user hovers over the button.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\timage: {\n *\t\t\t\t\tresizeUnit: \"%\",\n *\t\t\t\t\tresizeOptions: [ {\n *\t\t\t\t\t\tname: 'resizeImage:original',\n *\t\t\t\t\t\tvalue: null,\n *\t\t\t\t\t\tlabel: 'Original size'\n *\t\t\t\t\t\t// Note: add the \"icon\" property if you're configuring a standalone button.\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:50',\n *\t\t\t\t\t\tvalue: '50',\n *\t\t\t\t\t\tlabel: 'Medium size'\n *\t\t\t\t\t\t// Note: add the \"icon\" property if you're configuring a standalone button.\n *\t\t\t\t\t},\n *\t\t\t\t\t{\n *\t\t\t\t\t\tname: 'resizeImage:75',\n *\t\t\t\t\t\tvalue: '75',\n *\t\t\t\t\t\tlabel: 'Large size'\n *\t\t\t\t\t\t// Note: add the \"icon\" property if you're configuring a standalone button.\n *\t\t\t\t\t} ]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * **Default value**\n *\n * The following configuration is used by default:\n *\n *\t\tresizeOptions = [\n *\t\t\t{\n *\t\t\t\tname: 'resizeImage:original',\n *\t\t\t\tvalue: null,\n *\t\t\t\ticon: 'original'\n *\t\t\t},\n *\t\t\t{\n *\t\t\t\tname: 'resizeImage:25',\n *\t\t\t\tvalue: '25',\n *\t\t\t\ticon: 'small'\n *\t\t\t},\n *\t\t\t{\n *\t\t\t\tname: 'resizeImage:50',\n *\t\t\t\tvalue: '50',\n *\t\t\t\ticon: 'medium'\n *\t\t\t},\n *\t\t\t{\n *\t\t\t\tname: 'resizeImage:75',\n *\t\t\t\tvalue: '75',\n *\t\t\t\ticon: 'large'\n *\t\t\t}\n *\t\t];\n *\n * @member {Array.<module:image/imageresize/imageresizebuttons~ImageResizeOption>} module:image/image~ImageConfig#resizeOptions\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageresize/imageresizebuttons\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core';\nimport { ButtonView, DropdownButtonView, Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';\nimport { CKEditorError, Collection } from 'ckeditor5/src/utils';\n\nimport ImageResizeEditing from './imageresizeediting';\n\nconst RESIZE_ICONS = {\n\tsmall: icons.objectSizeSmall,\n\tmedium: icons.objectSizeMedium,\n\tlarge: icons.objectSizeLarge,\n\toriginal: icons.objectSizeFull\n};\n\n/**\n * The image resize buttons plugin.\n *\n * It adds a possibility to resize images using the toolbar dropdown or individual buttons, depending on the plugin configuration.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageResizeButtons extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageResizeEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageResizeButtons';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * The resize unit.\n\t\t *\n\t\t * @readonly\n\t\t * @private\n\t\t * @type {module:image/image~ImageConfig#resizeUnit}\n\t\t * @default '%'\n\t\t */\n\t\tthis._resizeUnit = editor.config.get( 'image.resizeUnit' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst options = editor.config.get( 'image.resizeOptions' );\n\t\tconst command = editor.commands.get( 'resizeImage' );\n\n\t\tthis.bind( 'isEnabled' ).to( command );\n\n\t\tfor ( const option of options ) {\n\t\t\tthis._registerImageResizeButton( option );\n\t\t}\n\n\t\tthis._registerImageResizeDropdown( options );\n\t}\n\n\t/**\n\t * A helper function that creates a standalone button component for the plugin.\n\t *\n\t * @private\n\t * @param {module:image/imageresize/imageresizebuttons~ImageResizeOption} resizeOption A model of the resize option.\n\t */\n\t_registerImageResizeButton( option ) {\n\t\tconst editor = this.editor;\n\t\tconst { name, value, icon } = option;\n\t\tconst optionValueWithUnit = value ? value + this._resizeUnit : null;\n\n\t\teditor.ui.componentFactory.add( name, locale => {\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst command = editor.commands.get( 'resizeImage' );\n\t\t\tconst labelText = this._getOptionLabelValue( option, true );\n\n\t\t\tif ( !RESIZE_ICONS[ icon ] ) {\n\t\t\t\t/**\n\t\t\t\t * When configuring {@link module:image/image~ImageConfig#resizeOptions `config.image.resizeOptions`} for standalone\n\t\t\t\t * buttons, a valid `icon` token must be set for each option.\n\t\t\t\t *\n\t\t\t\t * See all valid options described in the\n\t\t\t\t * {@link module:image/imageresize/imageresizebuttons~ImageResizeOption plugin configuration}.\n\t\t\t\t *\n\t\t\t\t * @error imageresizebuttons-missing-icon\n\t\t\t\t * @param {module:image/imageresize/imageresizebuttons~ImageResizeOption} option Invalid image resize option.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'imageresizebuttons-missing-icon',\n\t\t\t\t\teditor,\n\t\t\t\t\toption\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tbutton.set( {\n\t\t\t\t// Use the `label` property for a verbose description (because of ARIA).\n\t\t\t\tlabel: labelText,\n\t\t\t\ticon: RESIZE_ICONS[ icon ],\n\t\t\t\ttooltip: labelText,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Bind button to the command.\n\t\t\tbutton.bind( 'isEnabled' ).to( this );\n\t\t\tbutton.bind( 'isOn' ).to( command, 'value', getIsOnButtonCallback( optionValueWithUnit ) );\n\n\t\t\tthis.listenTo( button, 'execute', () => {\n\t\t\t\teditor.execute( 'resizeImage', { width: optionValueWithUnit } );\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * A helper function that creates a dropdown component for the plugin containing all the resize options defined in\n\t * the editor configuration.\n\t *\n\t * @private\n\t * @param {Array.<module:image/imageresize/imageresizebuttons~ImageResizeOption>} options An array of configured options.\n\t */\n\t_registerImageResizeDropdown( options ) {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst originalSizeOption = options.find( option => !option.value );\n\n\t\tconst componentCreator = locale => {\n\t\t\tconst command = editor.commands.get( 'resizeImage' );\n\t\t\tconst dropdownView = createDropdown( locale, DropdownButtonView );\n\t\t\tconst dropdownButton = dropdownView.buttonView;\n\n\t\t\tdropdownButton.set( {\n\t\t\t\ttooltip: t( 'Resize image' ),\n\t\t\t\tcommandValue: originalSizeOption.value,\n\t\t\t\ticon: RESIZE_ICONS.medium,\n\t\t\t\tisToggleable: true,\n\t\t\t\tlabel: this._getOptionLabelValue( originalSizeOption ),\n\t\t\t\twithText: true,\n\t\t\t\tclass: 'ck-resize-image-button'\n\t\t\t} );\n\n\t\t\tdropdownButton.bind( 'label' ).to( command, 'value', commandValue => {\n\t\t\t\tif ( commandValue && commandValue.width ) {\n\t\t\t\t\treturn commandValue.width;\n\t\t\t\t} else {\n\t\t\t\t\treturn this._getOptionLabelValue( originalSizeOption );\n\t\t\t\t}\n\t\t\t} );\n\t\t\tdropdownView.bind( 'isOn' ).to( command );\n\t\t\tdropdownView.bind( 'isEnabled' ).to( this );\n\n\t\t\taddListToDropdown( dropdownView, this._getResizeDropdownListItemDefinitions( options, command ) );\n\n\t\t\tdropdownView.listView.ariaLabel = t( 'Image resize list' );\n\n\t\t\t// Execute command when an item from the dropdown is selected.\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\teditor.execute( evt.source.commandName, { width: evt.source.commandValue } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t};\n\n\t\t// Register `resizeImage` dropdown and add `imageResize` dropdown as an alias for backward compatibility.\n\t\teditor.ui.componentFactory.add( 'resizeImage', componentCreator );\n\t\teditor.ui.componentFactory.add( 'imageResize', componentCreator );\n\t}\n\n\t/**\n\t * A helper function for creating an option label value string.\n\t *\n\t * @private\n\t * @param {module:image/imageresize/imageresizebuttons~ImageResizeOption} option A resize option object.\n\t * @param {Boolean} [forTooltip] An optional flag for creating a tooltip label.\n\t * @returns {String} A user-defined label combined from the numeric value and the resize unit or the default label\n\t * for reset options (`Original`).\n\t */\n\t_getOptionLabelValue( option, forTooltip ) {\n\t\tconst t = this.editor.t;\n\n\t\tif ( option.label ) {\n\t\t\treturn option.label;\n\t\t} else if ( forTooltip ) {\n\t\t\tif ( option.value ) {\n\t\t\t\treturn t( 'Resize image to %0', option.value + this._resizeUnit );\n\t\t\t} else {\n\t\t\t\treturn t( 'Resize image to the original size' );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( option.value ) {\n\t\t\t\treturn option.value + this._resizeUnit;\n\t\t\t} else {\n\t\t\t\treturn t( 'Original' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A helper function that parses the resize options and returns list item definitions ready for use in the dropdown.\n\t *\n\t * @private\n\t * @param {Array.<module:image/imageresize/imageresizebuttons~ImageResizeOption>} options The resize options.\n\t * @param {module:image/imageresize/resizeimagecommand~ResizeImageCommand} command The resize image command.\n\t * @returns {Iterable.<module:ui/dropdown/utils~ListDropdownItemDefinition>} Dropdown item definitions.\n\t */\n\t_getResizeDropdownListItemDefinitions( options, command ) {\n\t\tconst itemDefinitions = new Collection();\n\n\t\toptions.map( option => {\n\t\t\tconst optionValueWithUnit = option.value ? option.value + this._resizeUnit : null;\n\t\t\tconst definition = {\n\t\t\t\ttype: 'button',\n\t\t\t\tmodel: new Model( {\n\t\t\t\t\tcommandName: 'resizeImage',\n\t\t\t\t\tcommandValue: optionValueWithUnit,\n\t\t\t\t\tlabel: this._getOptionLabelValue( option ),\n\t\t\t\t\twithText: true,\n\t\t\t\t\ticon: null\n\t\t\t\t} )\n\t\t\t};\n\n\t\t\tdefinition.model.bind( 'isOn' ).to( command, 'value', getIsOnButtonCallback( optionValueWithUnit ) );\n\n\t\t\titemDefinitions.add( definition );\n\t\t} );\n\n\t\treturn itemDefinitions;\n\t}\n}\n\n// A helper function for setting the `isOn` state of buttons in value bindings.\nfunction getIsOnButtonCallback( value ) {\n\treturn commandValue => {\n\t\tif ( value === null && commandValue === value ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn commandValue && commandValue.width === value;\n\t};\n}\n\n/**\n * The image resize option used in the {@link module:image/image~ImageConfig#resizeOptions image resize configuration}.\n *\n * @typedef {Object} module:image/imageresize/imageresizebuttons~ImageResizeOption\n * @property {String} name The name of the UI component that changes the image size.\n * * If you configure the feature using individual resize buttons, you can refer to this name in the\n * {@link module:image/image~ImageConfig#toolbar image toolbar configuration}.\n * * If you configure the feature using the resize dropdown, this name will be used for a list item in the dropdown.\n * @property {String} value The value of the resize option without the unit\n * ({@link module:image/image~ImageConfig#resizeUnit configured separately}). `null` resets an image to its original size.\n * @property {String} [resizeOptions.icon] An icon used by an individual resize button (see the `name` property to learn more).\n * Available icons are: `'small'`, `'medium'`, `'large'`, `'original'`.\n * @property {String} [label] An option label displayed in the dropdown or, if the feature is configured using\n * individual buttons, a {@link module:ui/button/buttonview~ButtonView#tooltip} and an ARIA attribute of a button.\n * If not specified, the label is generated automatically based on the `value` option and the\n * {@link module:image/image~ImageConfig#resizeUnit `config.image.resizeUnit`}.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageresize/imageresizeediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ResizeImageCommand from './resizeimagecommand';\n\n/**\n * The image resize editing feature.\n *\n * It adds the ability to resize each image using handles or manually by\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageResizeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageResizeEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'image', {\n\t\t\tresizeUnit: '%',\n\t\t\tresizeOptions: [ {\n\t\t\t\tname: 'resizeImage:original',\n\t\t\t\tvalue: null,\n\t\t\t\ticon: 'original'\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'resizeImage:25',\n\t\t\t\tvalue: '25',\n\t\t\t\ticon: 'small'\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'resizeImage:50',\n\t\t\t\tvalue: '50',\n\t\t\t\ticon: 'medium'\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'resizeImage:75',\n\t\t\t\tvalue: '75',\n\t\t\t\ticon: 'large'\n\t\t\t} ]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst resizeImageCommand = new ResizeImageCommand( editor );\n\n\t\tthis._registerSchema();\n\t\tthis._registerConverters();\n\n\t\t// Register `resizeImage` command and add `imageResize` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'resizeImage', resizeImageCommand );\n\t\teditor.commands.add( 'imageResize', resizeImageCommand );\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_registerSchema() {\n\t\tthis.editor.model.schema.extend( 'image', { allowAttributes: 'width' } );\n\t\tthis.editor.model.schema.setAttributeProperties( 'width', {\n\t\t\tisFormatting: true\n\t\t} );\n\t}\n\n\t/**\n\t * Registers image resize converters.\n\t *\n\t * @private\n\t */\n\t_registerConverters() {\n\t\tconst editor = this.editor;\n\n\t\t// Dedicated converter to propagate image's attribute to the img tag.\n\t\teditor.conversion.for( 'downcast' ).add( dispatcher =>\n\t\t\tdispatcher.on( 'attribute:width:image', ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst figure = conversionApi.mapper.toViewElement( data.item );\n\n\t\t\t\tif ( data.attributeNewValue !== null ) {\n\t\t\t\t\tviewWriter.setStyle( 'width', data.attributeNewValue, figure );\n\t\t\t\t\tviewWriter.addClass( 'image_resized', figure );\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeStyle( 'width', figure );\n\t\t\t\t\tviewWriter.removeClass( 'image_resized', figure );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'figure',\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\twidth: /.+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'width',\n\t\t\t\t\tvalue: viewElement => viewElement.getStyle( 'width' )\n\t\t\t\t}\n\t\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageresize/imageresizehandles\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { WidgetResize } from 'ckeditor5/src/widget';\n\nimport ImageLoadObserver from '../image/imageloadobserver';\n\n/**\n * The image resize by handles feature.\n *\n * It adds the ability to resize each image using handles or manually by\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageResizeHandles extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ WidgetResize ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageResizeHandles';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst command = this.editor.commands.get( 'resizeImage' );\n\t\tthis.bind( 'isEnabled' ).to( command );\n\n\t\tthis._setupResizerCreator();\n\t}\n\n\t/**\n\t * Attaches the listeners responsible for creating a resizer for each image, except for images inside the HTML embed preview.\n\t *\n\t * @private\n\t */\n\t_setupResizerCreator() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\teditingView.addObserver( ImageLoadObserver );\n\n\t\tthis.listenTo( editingView.document, 'imageLoaded', ( evt, domEvent ) => {\n\t\t\t// The resizer must be attached only to images loaded by the `ImageInsert`, `ImageUpload` or `LinkImage` plugins.\n\t\t\tif ( !domEvent.target.matches( 'figure.image.ck-widget > img, figure.image.ck-widget > a > img' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst imageView = editor.editing.view.domConverter.domToView( domEvent.target );\n\t\t\tconst widgetView = imageView.findAncestor( 'figure' );\n\t\t\tlet resizer = this.editor.plugins.get( WidgetResize ).getResizerByViewElement( widgetView );\n\n\t\t\tif ( resizer ) {\n\t\t\t\t// There are rare cases when the image will be triggered multiple times for the same widget, e.g. when\n\t\t\t\t// the image's source was changed after upload (https://github.com/ckeditor/ckeditor5/pull/8108#issuecomment-708302992).\n\t\t\t\tresizer.redraw();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst mapper = editor.editing.mapper;\n\t\t\tconst imageModel = mapper.toModelElement( widgetView );\n\n\t\t\tresizer = editor.plugins\n\t\t\t\t.get( WidgetResize )\n\t\t\t\t.attachTo( {\n\t\t\t\t\tunit: editor.config.get( 'image.resizeUnit' ),\n\n\t\t\t\t\tmodelElement: imageModel,\n\t\t\t\t\tviewElement: widgetView,\n\t\t\t\t\teditor,\n\n\t\t\t\t\tgetHandleHost( domWidgetElement ) {\n\t\t\t\t\t\treturn domWidgetElement.querySelector( 'img' );\n\t\t\t\t\t},\n\t\t\t\t\tgetResizeHost( domWidgetElement ) {\n\t\t\t\t\t\treturn domWidgetElement;\n\t\t\t\t\t},\n\t\t\t\t\t// TODO consider other positions.\n\t\t\t\t\tisCentered() {\n\t\t\t\t\t\tconst imageStyle = imageModel.getAttribute( 'imageStyle' );\n\n\t\t\t\t\t\treturn !imageStyle || imageStyle == 'full' || imageStyle == 'alignCenter';\n\t\t\t\t\t},\n\n\t\t\t\t\tonCommit( newValue ) {\n\t\t\t\t\t\teditor.execute( 'resizeImage', { width: newValue } );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\tresizer.on( 'updateSize', () => {\n\t\t\t\tif ( !widgetView.hasClass( 'image_resized' ) ) {\n\t\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t\twriter.addClass( 'image_resized', widgetView );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tresizer.bind( 'isEnabled' ).to( this );\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageresize/resizeimagecommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { isImage } from '../image/utils';\n\n/**\n * The resize image command. Currently, it only supports the width attribute.\n *\n * @extends module:core/command~Command\n */\nexport default class ResizeImageCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst element = this.editor.model.document.selection.getSelectedElement();\n\n\t\tthis.isEnabled = isImage( element );\n\n\t\tif ( !element || !element.hasAttribute( 'width' ) ) {\n\t\t\tthis.value = null;\n\t\t} else {\n\t\t\tthis.value = {\n\t\t\t\twidth: element.getAttribute( 'width' ),\n\t\t\t\theight: null\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t *\t\t// Sets the width to 50%:\n\t *\t\teditor.execute( 'resizeImage', { width: '50%' } );\n\t *\n\t *\t\t// Removes the width attribute:\n\t *\t\teditor.execute( 'resizeImage', { width: null } );\n\t *\n\t * @param {Object} options\n\t * @param {String|null} options.width The new width of the image.\n\t * @fires execute\n\t */\n\texecute( options ) {\n\t\tconst model = this.editor.model;\n\t\tconst imageElement = model.document.selection.getSelectedElement();\n\n\t\tthis.value = {\n\t\t\twidth: options.width,\n\t\t\theight: null\n\t\t};\n\n\t\tif ( imageElement ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setAttribute( 'width', options.width, imageElement );\n\t\t\t} );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagestyle\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageStyleEditing from './imagestyle/imagestyleediting';\nimport ImageStyleUI from './imagestyle/imagestyleui';\n\n/**\n * The image style plugin.\n *\n * For a detailed overview, check the {@glink features/image#image-styles image styles} documentation.\n *\n * This is a \"glue\" plugin which loads the {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing}\n * and {@link module:image/imagestyle/imagestyleui~ImageStyleUI} plugins.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageStyle extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageStyleEditing, ImageStyleUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageStyle';\n\t}\n}\n\n/**\n * Available image styles.\n *\n * The default value is:\n *\n *\t\tconst imageConfig = {\n *\t\t\tstyles: [ 'full', 'side' ]\n *\t\t};\n *\n * which configures two default styles:\n *\n * * the \"full\" style which does not apply any class, e.g. for images styled to span 100% width of the content,\n * * the \"side\" style with the `.image-style-side` CSS class.\n *\n * See {@link module:image/imagestyle/utils~defaultStyles} to learn more about default\n * styles provided by the image feature.\n *\n * The {@link module:image/imagestyle/utils~defaultStyles default styles} can be customized,\n * e.g. to change the icon, title or CSS class of the style. The feature also provides several\n * {@link module:image/imagestyle/utils~defaultIcons default icons} to choose from.\n *\n *\t\timport customIcon from 'custom-icon.svg';\n *\n *\t\t// ...\n *\n *\t\tconst imageConfig = {\n *\t\t\tstyles: [\n *\t\t\t\t// This will only customize the icon of the \"full\" style.\n *\t\t\t\t// Note: 'right' is one of default icons provided by the feature.\n *\t\t\t\t{ name: 'full', icon: 'right' },\n *\n *\t\t\t\t// This will customize the icon, title and CSS class of the default \"side\" style.\n *\t\t\t\t{ name: 'side', icon: customIcon, title: 'My side style', className: 'custom-side-image' }\n *\t\t\t]\n *\t\t};\n *\n * If none of the default styles is good enough, it is possible to define independent custom styles, too:\n *\n *\t\timport { icons } from 'ckeditor5/src/core';\n *\n *\t\tconst fullSizeIcon = icons.objectCenter';\n *\t\tconst sideIcon = icons.objectRight';\n *\n *\t\t// ...\n *\n *\t\tconst imageConfig = {\n *\t\t\tstyles: [\n *\t\t\t\t// A completely custom full size style with no class, used as a default.\n *\t\t\t\t{ name: 'fullSize', title: 'Full size', icon: fullSizeIcon, isDefault: true },\n *\n *\t\t\t\t{ name: 'side', title: 'To the side', icon: sideIcon, className: 'side-image' }\n *\t\t\t]\n *\t\t};\n *\n * Note: Setting `title` to one of {@link module:image/imagestyle/imagestyleui~ImageStyleUI#localizedDefaultStylesTitles}\n * will automatically translate it to the language of the editor.\n *\n * Read more about styling images in the {@glink features/image#image-styles Image styles guide}.\n *\n * The feature creates commands based on defined styles, so you can change the style of a selected image by executing\n * the following command:\n *\n *\t\teditor.execute( 'imageStyle' { value: 'side' } );\n *\n * The feature also creates buttons that execute the commands. So, assuming that you use the\n * default image styles setting, you can {@link module:image/image~ImageConfig#toolbar configure the image toolbar}\n * (or any other toolbar) to contain these options:\n *\n *\t\tconst imageConfig = {\n *\t\t\ttoolbar: [ 'imageStyle:full', 'imageStyle:side' ]\n *\t\t};\n *\n * @member {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} module:image/image~ImageConfig#styles\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { first } from 'ckeditor5/src/utils';\n\n/**\n * @module image/imagestyle/converters\n */\n\n/**\n * Returns a converter for the `imageStyle` attribute. It can be used for adding, changing and removing the attribute.\n *\n * @param {Object} styles An object containing available styles. See {@link module:image/imagestyle/imagestyleediting~ImageStyleFormat}\n * for more details.\n * @returns {Function} A model-to-view attribute converter.\n */\nexport function modelToViewStyleAttribute( styles ) {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if there is class name associated with given value.\n\t\tconst newStyle = getStyleByName( data.attributeNewValue, styles );\n\t\tconst oldStyle = getStyleByName( data.attributeOldValue, styles );\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item );\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\tif ( oldStyle ) {\n\t\t\tviewWriter.removeClass( oldStyle.className, viewElement );\n\t\t}\n\n\t\tif ( newStyle ) {\n\t\t\tviewWriter.addClass( newStyle.className, viewElement );\n\t\t}\n\t};\n}\n\n/**\n * Returns a view-to-model converter converting image CSS classes to a proper value in the model.\n *\n * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles The styles for which the converter is created.\n * @returns {Function} A view-to-model converter.\n */\nexport function viewToModelStyleAttribute( styles ) {\n\t// Convert only non–default styles.\n\tconst filteredStyles = styles.filter( style => !style.isDefault );\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !data.modelRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewFigureElement = data.viewItem;\n\t\tconst modelImageElement = first( data.modelRange.getItems() );\n\n\t\t// Check if `modelImageElement` exists (see: https://github.com/ckeditor/ckeditor5/issues/8270)\n\t\t// and `imageStyle` attribute is allowed for that element, otherwise stop conversion early.\n\t\tif ( modelImageElement && !conversionApi.schema.checkAttribute( modelImageElement, 'imageStyle' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert style one by one.\n\t\tfor ( const style of filteredStyles ) {\n\t\t\t// Try to consume class corresponding with style.\n\t\t\tif ( conversionApi.consumable.consume( viewFigureElement, { classes: style.className } ) ) {\n\t\t\t\t// And convert this style to model attribute.\n\t\t\t\tconversionApi.writer.setAttribute( 'imageStyle', style.name, modelImageElement );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Returns the style with a given `name` from an array of styles.\n//\n// @param {String} name\n// @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat> } styles\n// @returns {module:image/imagestyle/imagestyleediting~ImageStyleFormat|undefined}\nfunction getStyleByName( name, styles ) {\n\tfor ( const style of styles ) {\n\t\tif ( style.name === name ) {\n\t\t\treturn style;\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagestyle/imagestylecommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { isImage } from '../image/utils';\n\n/**\n * The image style command. It is used to apply different image styles.\n *\n * @extends module:core/command~Command\n */\nexport default class ImageStyleCommand extends Command {\n\t/**\n\t * Creates an instance of the image style command. Each command instance is handling one style.\n\t *\n\t * @param {module:core/editor/editor~Editor} editor The editor instance.\n\t * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles The styles that this command supports.\n\t */\n\tconstructor( editor, styles ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * The name of the default style, if it is present. If there is no default style, it defaults to `false`.\n\t\t *\n\t\t * @readonly\n\t\t * @type {Boolean|String}\n\t\t */\n\t\tthis.defaultStyle = false;\n\n\t\t/**\n\t\t * A style handled by this command.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} #styles\n\t\t */\n\t\tthis.styles = styles.reduce( ( styles, style ) => {\n\t\t\tstyles[ style.name ] = style;\n\n\t\t\tif ( style.isDefault ) {\n\t\t\t\tthis.defaultStyle = style.name;\n\t\t\t}\n\n\t\t\treturn styles;\n\t\t}, {} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst element = this.editor.model.document.selection.getSelectedElement();\n\n\t\tthis.isEnabled = isImage( element );\n\n\t\tif ( !element ) {\n\t\t\tthis.value = false;\n\t\t} else if ( element.hasAttribute( 'imageStyle' ) ) {\n\t\t\tconst attributeValue = element.getAttribute( 'imageStyle' );\n\t\t\tthis.value = this.styles[ attributeValue ] ? attributeValue : false;\n\t\t} else {\n\t\t\tthis.value = this.defaultStyle;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t *\t\teditor.execute( 'imageStyle', { value: 'side' } );\n\t *\n\t * @param {Object} options\n\t * @param {String} options.value The name of the style (based on the\n\t * {@link module:image/image~ImageConfig#styles `image.styles`} configuration option).\n\t * @fires execute\n\t */\n\texecute( options ) {\n\t\tconst styleName = options.value;\n\n\t\tconst model = this.editor.model;\n\t\tconst imageElement = model.document.selection.getSelectedElement();\n\n\t\tmodel.change( writer => {\n\t\t\t// Default style means that there is no `imageStyle` attribute in the model.\n\t\t\t// https://github.com/ckeditor/ckeditor5-image/issues/147\n\t\t\tif ( this.styles[ styleName ].isDefault ) {\n\t\t\t\twriter.removeAttribute( 'imageStyle', imageElement );\n\t\t\t} else {\n\t\t\t\twriter.setAttribute( 'imageStyle', styleName, imageElement );\n\t\t\t}\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagestyle/imagestyleediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageStyleCommand from './imagestylecommand';\nimport { viewToModelStyleAttribute, modelToViewStyleAttribute } from './converters';\nimport { normalizeImageStyles } from './utils';\n\n/**\n * The image style engine plugin. It sets the default configuration, creates converters and registers\n * {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageStyleEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageStyleEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst data = editor.data;\n\t\tconst editing = editor.editing;\n\n\t\t// Define default configuration.\n\t\teditor.config.define( 'image.styles', [ 'full', 'side' ] );\n\n\t\t// Get configuration.\n\t\tconst styles = normalizeImageStyles( editor.config.get( 'image.styles' ) );\n\n\t\t// Allow imageStyle attribute in image.\n\t\t// We could call it 'style' but https://github.com/ckeditor/ckeditor5-engine/issues/559.\n\t\tschema.extend( 'image', { allowAttributes: 'imageStyle' } );\n\n\t\t// Converters for imageStyle attribute from model to view.\n\t\tconst modelToViewConverter = modelToViewStyleAttribute( styles );\n\t\tediting.downcastDispatcher.on( 'attribute:imageStyle:image', modelToViewConverter );\n\t\tdata.downcastDispatcher.on( 'attribute:imageStyle:image', modelToViewConverter );\n\n\t\t// Converter for figure element from view to model.\n\t\tdata.upcastDispatcher.on( 'element:figure', viewToModelStyleAttribute( styles ), { priority: 'low' } );\n\n\t\t// Register imageStyle command.\n\t\teditor.commands.add( 'imageStyle', new ImageStyleCommand( editor, styles ) );\n\t}\n}\n\n/**\n * The image style format descriptor.\n *\n *\t\timport fullSizeIcon from 'path/to/icon.svg';\n *\n *\t\tconst imageStyleFormat = {\n *\t\t\tname: 'fullSize',\n *\t\t\ticon: fullSizeIcon,\n *\t\t\ttitle: 'Full size image',\n *\t\t\tclassName: 'image-full-size'\n *\t\t}\n *\n * @typedef {Object} module:image/imagestyle/imagestyleediting~ImageStyleFormat\n *\n * @property {String} name The unique name of the style. It will be used to:\n *\n * * Store the chosen style in the model by setting the `imageStyle` attribute of the `<image>` element.\n * * As a value of the {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute `imageStyle` command},\n * * when registering a button for each of the styles (`'imageStyle:{name}'`) in the\n * {@link module:ui/componentfactory~ComponentFactory UI components factory} (this functionality is provided by the\n * {@link module:image/imagestyle/imagestyleui~ImageStyleUI} plugin).\n *\n * @property {Boolean} [isDefault] When set, the style will be used as the default one.\n * A default style does not apply any CSS class to the view element.\n *\n * @property {String} icon One of the following to be used when creating the style's button:\n *\n * * An SVG icon source (as an XML string).\n * * One of {@link module:image/imagestyle/utils~defaultIcons} to use a default icon provided by the plugin.\n *\n * @property {String} title The style's title.\n *\n * @property {String} className The CSS class used to represent the style in the view.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagestyle/imagestyleui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { ButtonView } from 'ckeditor5/src/ui';\n\nimport { normalizeImageStyles } from './utils';\n\nimport '../../theme/imagestyle.css';\n\n/**\n * The image style UI plugin.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageStyleUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageStyleUI';\n\t}\n\n\t/**\n\t * Returns the default localized style titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:image/imagestyle/utils~defaultStyles} are available:\n\t *\n\t * * `'Full size image'`,\n\t * * `'Side image'`,\n\t * * `'Left aligned image'`,\n\t * * `'Centered image'`,\n\t * * `'Right aligned image'`\n\t *\n\t * @returns {Object.<String,String>}\n\t */\n\tget localizedDefaultStylesTitles() {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'Full size image': t( 'Full size image' ),\n\t\t\t'Side image': t( 'Side image' ),\n\t\t\t'Left aligned image': t( 'Left aligned image' ),\n\t\t\t'Centered image': t( 'Centered image' ),\n\t\t\t'Right aligned image': t( 'Right aligned image' )\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst configuredStyles = editor.config.get( 'image.styles' );\n\n\t\tconst translatedStyles = translateStyles( normalizeImageStyles( configuredStyles ), this.localizedDefaultStylesTitles );\n\n\t\tfor ( const style of translatedStyles ) {\n\t\t\tthis._createButton( style );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a button for each style and stores it in the editor {@link module:ui/componentfactory~ComponentFactory ComponentFactory}.\n\t *\n\t * @private\n\t * @param {module:image/imagestyle/imagestyleediting~ImageStyleFormat} style\n\t */\n\t_createButton( style ) {\n\t\tconst editor = this.editor;\n\n\t\tconst componentName = `imageStyle:${ style.name }`;\n\n\t\teditor.ui.componentFactory.add( componentName, locale => {\n\t\t\tconst command = editor.commands.get( 'imageStyle' );\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: style.title,\n\t\t\t\ticon: style.icon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t\tview.bind( 'isOn' ).to( command, 'value', value => value === style.name );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( 'imageStyle', { value: style.name } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n\n/**\n * Returns the translated `title` from the passed styles array.\n *\n * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles\n * @param titles\n * @returns {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>}\n */\nfunction translateStyles( styles, titles ) {\n\tfor ( const style of styles ) {\n\t\t// Localize the titles of the styles, if a title corresponds with\n\t\t// a localized default provided by the plugin.\n\t\tif ( titles[ style.title ] ) {\n\t\t\tstyle.title = titles[ style.title ];\n\t\t}\n\t}\n\n\treturn styles;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagestyle/utils\n */\n\nimport { logWarning } from 'ckeditor5/src/utils';\nimport { icons } from 'ckeditor5/src/core';\n\n/**\n * Default image styles provided by the plugin that can be referred in the\n * {@link module:image/image~ImageConfig#styles} configuration.\n *\n * Among them, 2 default semantic content styles are available:\n *\n * * `full` is a full–width image without any CSS class,\n * * `side` is a side image styled with the `image-style-side` CSS class.\n *\n * There are also 3 styles focused on formatting:\n *\n * * `alignLeft` aligns the image to the left using the `image-style-align-left` class,\n * * `alignCenter` centers the image using the `image-style-align-center` class,\n * * `alignRight` aligns the image to the right using the `image-style-align-right` class,\n *\n * @member {Object.<String,Object>}\n */\nconst defaultStyles = {\n\t// This option is equal to the situation when no style is applied.\n\tfull: {\n\t\tname: 'full',\n\t\ttitle: 'Full size image',\n\t\ticon: icons.objectFullWidth,\n\t\tisDefault: true\n\t},\n\n\t// This represents a side image.\n\tside: {\n\t\tname: 'side',\n\t\ttitle: 'Side image',\n\t\ticon: icons.objectRight,\n\t\tclassName: 'image-style-side'\n\t},\n\n\t// This style represents an image aligned to the left.\n\talignLeft: {\n\t\tname: 'alignLeft',\n\t\ttitle: 'Left aligned image',\n\t\ticon: icons.objectLeft,\n\t\tclassName: 'image-style-align-left'\n\t},\n\n\t// This style represents a centered image.\n\talignCenter: {\n\t\tname: 'alignCenter',\n\t\ttitle: 'Centered image',\n\t\ticon: icons.objectCenter,\n\t\tclassName: 'image-style-align-center'\n\t},\n\n\t// This style represents an image aligned to the right.\n\talignRight: {\n\t\tname: 'alignRight',\n\t\ttitle: 'Right aligned image',\n\t\ticon: icons.objectRight,\n\t\tclassName: 'image-style-align-right'\n\t}\n};\n\n/**\n * Default image style icons provided by the plugin that can be referred in the\n * {@link module:image/image~ImageConfig#styles} configuration.\n *\n * There are 4 icons available: `'full'`, `'left'`, `'center'` and `'right'`.\n *\n * @member {Object.<String, String>}\n */\nconst defaultIcons = {\n\tfull: icons.objectFullWidth,\n\tleft: icons.objectLeft,\n\tright: icons.objectRight,\n\tcenter: icons.objectCenter\n};\n\n/**\n * Returns a {@link module:image/image~ImageConfig#styles} array with items normalized in the\n * {@link module:image/imagestyle/imagestyleediting~ImageStyleFormat} format and a complete `icon` markup for each style.\n *\n * @returns {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>}\n */\nexport function normalizeImageStyles( configuredStyles = [] ) {\n\treturn configuredStyles.map( _normalizeStyle );\n}\n\n// Normalizes an image style provided in the {@link module:image/image~ImageConfig#styles}\n// and returns it in a {@link module:image/imagestyle/imagestyleediting~ImageStyleFormat}.\n//\n// @param {Object} style\n// @returns {@link module:image/imagestyle/imagestyleediting~ImageStyleFormat}\nfunction _normalizeStyle( style ) {\n\t// Just the name of the style has been passed.\n\tif ( typeof style == 'string' ) {\n\t\tconst styleName = style;\n\n\t\t// If it's one of the defaults, just use it.\n\t\tif ( defaultStyles[ styleName ] ) {\n\t\t\t// Clone the style to avoid overriding defaults.\n\t\t\tstyle = Object.assign( {}, defaultStyles[ styleName ] );\n\t\t}\n\t\t// If it's just a name but none of the defaults, warn because probably it's a mistake.\n\t\telse {\n\t\t\t/**\n\t\t\t * There is no such image style of given name.\n\t\t\t *\n\t\t\t * @error image-style-not-found\n\t\t\t * @param {String} name Name of a missing style name.\n\t\t\t */\n\t\t\tlogWarning( 'image-style-not-found', { name: styleName } );\n\n\t\t\t// Normalize the style anyway to prevent errors.\n\t\t\tstyle = {\n\t\t\t\tname: styleName\n\t\t\t};\n\t\t}\n\t}\n\t// If an object style has been passed and if the name matches one of the defaults,\n\t// extend it with defaults – the user wants to customize a default style.\n\t// Note: Don't override the user–defined style object, clone it instead.\n\telse if ( defaultStyles[ style.name ] ) {\n\t\tconst defaultStyle = defaultStyles[ style.name ];\n\t\tconst extendedStyle = Object.assign( {}, style );\n\n\t\tfor ( const prop in defaultStyle ) {\n\t\t\tif ( !Object.prototype.hasOwnProperty.call( style, prop ) ) {\n\t\t\t\textendedStyle[ prop ] = defaultStyle[ prop ];\n\t\t\t}\n\t\t}\n\n\t\tstyle = extendedStyle;\n\t}\n\n\t// If an icon is defined as a string and correspond with a name\n\t// in default icons, use the default icon provided by the plugin.\n\tif ( typeof style.icon == 'string' && defaultIcons[ style.icon ] ) {\n\t\tstyle.icon = defaultIcons[ style.icon ];\n\t}\n\n\treturn style;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagetextalternative\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageTextAlternativeEditing from './imagetextalternative/imagetextalternativeediting';\nimport ImageTextAlternativeUI from './imagetextalternative/imagetextalternativeui';\n\n/**\n * The image text alternative plugin.\n *\n * For a detailed overview, check the {@glink features/image#image-styles image styles} documentation.\n *\n * This is a \"glue\" plugin which loads the\n * {@link module:image/imagetextalternative/imagetextalternativeediting~ImageTextAlternativeEditing}\n * and {@link module:image/imagetextalternative/imagetextalternativeui~ImageTextAlternativeUI} plugins.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageTextAlternative extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageTextAlternativeEditing, ImageTextAlternativeUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageTextAlternative';\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagetextalternative/imagetextalternativecommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { isImage } from '../image/utils';\n\n/**\n * The image text alternative command. It is used to change the `alt` attribute of `<image>` elements.\n *\n * @extends module:core/command~Command\n */\nexport default class ImageTextAlternativeCommand extends Command {\n\t/**\n\t * The command value: `false` if there is no `alt` attribute, otherwise the value of the `alt` attribute.\n\t *\n\t * @readonly\n\t * @observable\n\t * @member {String|Boolean} #value\n\t */\n\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst element = this.editor.model.document.selection.getSelectedElement();\n\n\t\tthis.isEnabled = isImage( element );\n\n\t\tif ( isImage( element ) && element.hasAttribute( 'alt' ) ) {\n\t\t\tthis.value = element.getAttribute( 'alt' );\n\t\t} else {\n\t\t\tthis.value = false;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param {Object} options\n\t * @param {String} options.newValue The new value of the `alt` attribute to set.\n\t */\n\texecute( options ) {\n\t\tconst model = this.editor.model;\n\t\tconst imageElement = model.document.selection.getSelectedElement();\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setAttribute( 'alt', options.newValue, imageElement );\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagetextalternative/imagetextalternativeediting\n */\n\nimport ImageTextAlternativeCommand from './imagetextalternativecommand';\nimport { Plugin } from 'ckeditor5/src/core';\n\n/**\n * The image text alternative editing plugin.\n *\n * Registers the `'imageTextAlternative'` command.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageTextAlternativeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageTextAlternativeEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tthis.editor.commands.add( 'imageTextAlternative', new ImageTextAlternativeCommand( this.editor ) );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagetextalternative/imagetextalternativeui\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core';\nimport { ButtonView, ContextualBalloon, clickOutsideHandler } from 'ckeditor5/src/ui';\n\nimport TextAlternativeFormView from './ui/textalternativeformview';\nimport { repositionContextualBalloon, getBalloonPositionData } from '../image/ui/utils';\nimport { getSelectedImageWidget } from '../image/utils';\n\n/**\n * The image text alternative UI plugin.\n *\n * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageTextAlternativeUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageTextAlternativeUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tthis._createButton();\n\t\tthis._createForm();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n\t\tthis._form.destroy();\n\t}\n\n\t/**\n\t * Creates a button showing the balloon panel for changing the image text alternative and\n\t * registers it in the editor {@link module:ui/componentfactory~ComponentFactory ComponentFactory}.\n\t *\n\t * @private\n\t */\n\t_createButton() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'imageTextAlternative', locale => {\n\t\t\tconst command = editor.commands.get( 'imageTextAlternative' );\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: t( 'Change image text alternative' ),\n\t\t\t\ticon: icons.lowVision,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\tthis._showForm();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the {@link module:image/imagetextalternative/ui/textalternativeformview~TextAlternativeFormView}\n\t * form.\n\t *\n\t * @private\n\t */\n\t_createForm() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\t/**\n\t\t * The contextual balloon plugin instance.\n\t\t *\n\t\t * @private\n\t\t * @member {module:ui/panel/balloon/contextualballoon~ContextualBalloon}\n\t\t */\n\t\tthis._balloon = this.editor.plugins.get( 'ContextualBalloon' );\n\n\t\t/**\n\t\t * A form containing a textarea and buttons, used to change the `alt` text value.\n\t\t *\n\t\t * @member {module:image/imagetextalternative/ui/textalternativeformview~TextAlternativeFormView}\n\t\t */\n\t\tthis._form = new TextAlternativeFormView( editor.locale );\n\n\t\t// Render the form so its #element is available for clickOutsideHandler.\n\t\tthis._form.render();\n\n\t\tthis.listenTo( this._form, 'submit', () => {\n\t\t\teditor.execute( 'imageTextAlternative', {\n\t\t\t\tnewValue: this._form.labeledInput.fieldView.element.value\n\t\t\t} );\n\n\t\t\tthis._hideForm( true );\n\t\t} );\n\n\t\tthis.listenTo( this._form, 'cancel', () => {\n\t\t\tthis._hideForm( true );\n\t\t} );\n\n\t\t// Close the form on Esc key press.\n\t\tthis._form.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis._hideForm( true );\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Reposition the balloon or hide the form if an image widget is no longer selected.\n\t\tthis.listenTo( editor.ui, 'update', () => {\n\t\t\tif ( !getSelectedImageWidget( viewDocument.selection ) ) {\n\t\t\t\tthis._hideForm( true );\n\t\t\t} else if ( this._isVisible ) {\n\t\t\t\trepositionContextualBalloon( editor );\n\t\t\t}\n\t\t} );\n\n\t\t// Close on click outside of balloon panel element.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: [ this._balloon.view.element ],\n\t\t\tcallback: () => this._hideForm()\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the {@link #_form} in the {@link #_balloon}.\n\t *\n\t * @private\n\t */\n\t_showForm() {\n\t\tif ( this._isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get( 'imageTextAlternative' );\n\t\tconst labeledInput = this._form.labeledInput;\n\n\t\tthis._form.disableCssTransitions();\n\n\t\tif ( !this._isInBalloon ) {\n\t\t\tthis._balloon.add( {\n\t\t\t\tview: this._form,\n\t\t\t\tposition: getBalloonPositionData( editor )\n\t\t\t} );\n\t\t}\n\n\t\t// Make sure that each time the panel shows up, the field remains in sync with the value of\n\t\t// the command. If the user typed in the input, then canceled the balloon (`labeledInput#value`\n\t\t// stays unaltered) and re-opened it without changing the value of the command, they would see the\n\t\t// old value instead of the actual value of the command.\n\t\t// https://github.com/ckeditor/ckeditor5-image/issues/114\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element.value = command.value || '';\n\n\t\tthis._form.labeledInput.fieldView.select();\n\n\t\tthis._form.enableCssTransitions();\n\t}\n\n\t/**\n\t * Removes the {@link #_form} from the {@link #_balloon}.\n\t *\n\t * @param {Boolean} [focusEditable=false] Controls whether the editing view is focused afterwards.\n\t * @private\n\t */\n\t_hideForm( focusEditable ) {\n\t\tif ( !this._isInBalloon ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur the input element before removing it from DOM to prevent issues in some browsers.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1501.\n\t\tif ( this._form.focusTracker.isFocused ) {\n\t\t\tthis._form.saveButtonView.focus();\n\t\t}\n\n\t\tthis._balloon.remove( this._form );\n\n\t\tif ( focusEditable ) {\n\t\t\tthis.editor.editing.view.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t *\n\t * @private\n\t * @type {Boolean}\n\t */\n\tget _isVisible() {\n\t\treturn this._balloon.visibleView === this._form;\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t *\n\t * @private\n\t * @type {Boolean}\n\t */\n\tget _isInBalloon() {\n\t\treturn this._balloon.hasView( this._form );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagetextalternative/ui/textalternativeformview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tinjectCssTransitionDisabler,\n\tsubmitHandler\n} from 'ckeditor5/src/ui';\nimport { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';\nimport { icons } from 'ckeditor5/src/core';\n\nimport '../../../theme/textalternativeform.css';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\n\n/**\n * The TextAlternativeFormView class.\n *\n * @extends module:ui/view~View\n */\nexport default class TextAlternativeFormView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = this.locale.t;\n\n\t\t/**\n\t\t * Tracks information about the DOM focus in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/focustracker~FocusTracker}\n\t\t */\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t/**\n\t\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/keystrokehandler~KeystrokeHandler}\n\t\t */\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t/**\n\t\t * An input with a label.\n\t\t *\n\t\t * @member {module:ui/labeledfield/labeledfieldview~LabeledFieldView} #labeledInput\n\t\t */\n\t\tthis.labeledInput = this._createLabeledInputView();\n\n\t\t/**\n\t\t * A button used to submit the form.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView} #saveButtonView\n\t\t */\n\t\tthis.saveButtonView = this._createButton( t( 'Save' ), icons.check, 'ck-button-save' );\n\t\tthis.saveButtonView.type = 'submit';\n\n\t\t/**\n\t\t * A button used to cancel the form.\n\t\t *\n\t\t * @member {module:ui/button/buttonview~ButtonView} #cancelButtonView\n\t\t */\n\t\tthis.cancelButtonView = this._createButton( t( 'Cancel' ), icons.cancel, 'ck-button-cancel', 'cancel' );\n\n\t\t/**\n\t\t * A collection of views which can be focused in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._focusables = new ViewCollection();\n\n\t\t/**\n\t\t * Helps cycling over {@link #_focusables} in the form.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/focuscycler~FocusCycler}\n\t\t */\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-text-alternative-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-image/issues/40\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.labeledInput,\n\t\t\t\tthis.saveButtonView,\n\t\t\t\tthis.cancelButtonView\n\t\t\t]\n\t\t} );\n\n\t\tinjectCssTransitionDisabler( this );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trender() {\n\t\tsuper.render();\n\n\t\tthis.keystrokes.listenTo( this.element );\n\n\t\tsubmitHandler( { view: this } );\n\n\t\t[ this.labeledInput, this.saveButtonView, this.cancelButtonView ]\n\t\t\t.forEach( v => {\n\t\t\t\t// Register the view as focusable.\n\t\t\t\tthis._focusables.add( v );\n\n\t\t\t\t// Register the view in the focus tracker.\n\t\t\t\tthis.focusTracker.add( v.element );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Creates the button view.\n\t *\n\t * @private\n\t * @param {String} label The button label\n\t * @param {String} icon The button's icon.\n\t * @param {String} className The additional button CSS class name.\n\t * @param {String} [eventName] The event name that the ButtonView#execute event will be delegated to.\n\t * @returns {module:ui/button/buttonview~ButtonView} The button view instance.\n\t */\n\t_createButton( label, icon, className, eventName ) {\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: className\n\t\t\t}\n\t\t} );\n\n\t\tif ( eventName ) {\n\t\t\tbutton.delegate( 'execute' ).to( this, eventName );\n\t\t}\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates an input with a label.\n\t *\n\t * @private\n\t * @returns {module:ui/labeledfield/labeledfieldview~LabeledFieldView} Labeled field view instance.\n\t */\n\t_createLabeledInputView() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\n\t\tlabeledInput.label = t( 'Text alternative' );\n\n\t\treturn labeledInput;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imagetoolbar\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { WidgetToolbarRepository } from 'ckeditor5/src/widget';\n\nimport { getSelectedImageWidget } from './image/utils';\n\n/**\n * The image toolbar plugin. It creates and manages the image toolbar (the toolbar displayed when an image is selected).\n *\n * For a detailed overview, check the {@glink features/image#image-contextual-toolbar image contextual toolbar} documentation.\n *\n * Instances of toolbar components (e.g. buttons) are created using the editor's\n * {@link module:ui/componentfactory~ComponentFactory component factory}\n * based on the {@link module:image/image~ImageConfig#toolbar `image.toolbar` configuration option}.\n *\n * The toolbar uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageToolbar extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ WidgetToolbarRepository ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageToolbar';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n\n\t\twidgetToolbarRepository.register( 'image', {\n\t\t\tariaLabel: t( 'Image toolbar' ),\n\t\t\titems: editor.config.get( 'image.toolbar' ) || [],\n\t\t\tgetRelatedElement: getSelectedImageWidget\n\t\t} );\n\t}\n}\n\n/**\n * Items to be placed in the image toolbar.\n * This option is used by the {@link module:image/imagetoolbar~ImageToolbar} feature.\n *\n * Assuming that you use the following features:\n *\n * * {@link module:image/imagestyle~ImageStyle} (with a default configuration),\n * * {@link module:image/imagetextalternative~ImageTextAlternative},\n *\n * three toolbar items will be available in {@link module:ui/componentfactory~ComponentFactory}:\n * `'imageStyle:full'`, `'imageStyle:side'`, and `'imageTextAlternative'` so you can configure the toolbar like this:\n *\n *\t\tconst imageConfig = {\n *\t\t\ttoolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]\n *\t\t};\n *\n * Of course, the same buttons can also be used in the\n * {@link module:core/editor/editorconfig~EditorConfig#toolbar main editor toolbar}.\n *\n * Read more about configuring toolbar in {@link module:core/editor/editorconfig~EditorConfig#toolbar}.\n *\n * @member {Array.<String>} module:image/image~ImageConfig#toolbar\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageupload\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport ImageUploadUI from './imageupload/imageuploadui';\nimport ImageUploadProgress from './imageupload/imageuploadprogress';\nimport ImageUploadEditing from './imageupload/imageuploadediting';\n\n/**\n * The image upload plugin.\n *\n * For a detailed overview, check the {@glink features/image-upload/image-upload image upload feature} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins to enable image uploading:\n *\n * * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing},\n * * {@link module:image/imageupload/imageuploadui~ImageUploadUI},\n * * {@link module:image/imageupload/imageuploadprogress~ImageUploadProgress}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageUpload extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageUpload';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ ImageUploadEditing, ImageUploadUI, ImageUploadProgress ];\n\t}\n}\n\n/**\n * The image upload configuration.\n *\n * @member {module:image/imageupload~ImageUploadConfig} module:image/image~ImageConfig#upload\n */\n\n/**\n * The configuration of the image upload feature. Used by the image upload feature in the `@ckeditor/ckeditor5-image` package.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n * \t\t\t\timage: {\n * \t\t\t\t\tupload: ... // Image upload feature options.\n * \t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.\n *\n * @interface module:image/imageupload~ImageUploadConfig\n */\n\n/**\n * The list of accepted image types.\n *\n * The accepted types of images can be customized to allow only certain types of images:\n *\n *\t\t// Allow only JPEG and PNG images:\n *\t\tconst imageUploadConfig = {\n *\t\t\ttypes: [ 'png', 'jpeg' ]\n *\t\t};\n *\n * The type string should match [one of the sub-types](https://www.iana.org/assignments/media-types/media-types.xhtml#image)\n * of the image MIME type. For example, for the `image/jpeg` MIME type, add `'jpeg'` to your image upload configuration.\n *\n * **Note:** This setting only restricts some image types to be selected and uploaded through the CKEditor UI and commands. Image type\n * recognition and filtering should also be implemented on the server which accepts image uploads.\n *\n * @member {Array.<String>} module:image/imageupload~ImageUploadConfig#types\n * @default [ 'jpeg', 'png', 'gif', 'bmp', 'webp', 'tiff' ]\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageupload/imageuploadediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport { UpcastWriter } from 'ckeditor5/src/engine';\n\nimport { Notification } from 'ckeditor5/src/ui';\nimport { Clipboard } from 'ckeditor5/src/clipboard';\nimport { FileRepository } from 'ckeditor5/src/upload';\nimport { env } from 'ckeditor5/src/utils';\n\nimport UploadImageCommand from './uploadimagecommand';\nimport { fetchLocalImage, isLocalImage } from '../../src/imageupload/utils';\nimport { createImageTypeRegExp } from './utils';\nimport { getViewImgFromWidget } from '../image/utils';\n\n/**\n * The editing part of the image upload feature. It registers the `'uploadImage'` command\n * and `imageUpload` command as an aliased name.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageUploadEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ FileRepository, Notification, Clipboard ];\n\t}\n\n\tstatic get pluginName() {\n\t\treturn 'ImageUploadEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'image', {\n\t\t\tupload: {\n\t\t\t\ttypes: [ 'jpeg', 'png', 'gif', 'bmp', 'webp', 'tiff' ]\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst doc = editor.model.document;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\n\t\tconst imageTypes = createImageTypeRegExp( editor.config.get( 'image.upload.types' ) );\n\n\t\t// Setup schema to allow uploadId and uploadStatus for images.\n\t\tschema.extend( 'image', {\n\t\t\tallowAttributes: [ 'uploadId', 'uploadStatus' ]\n\t\t} );\n\n\t\tconst uploadImageCommand = new UploadImageCommand( editor );\n\n\t\t// Register `uploadImage` command and add `imageUpload` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'uploadImage', uploadImageCommand );\n\t\teditor.commands.add( 'imageUpload', uploadImageCommand );\n\n\t\t// Register upcast converter for uploadId.\n\t\tconversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tkey: 'uploadId'\n\t\t\t\t},\n\t\t\t\tmodel: 'uploadId'\n\t\t\t} );\n\n\t\t// Handle pasted images.\n\t\t// For every image file, a new file loader is created and a placeholder image is\n\t\t// inserted into the content. Then, those images are uploaded once they appear in the model\n\t\t// (see Document#change listener below).\n\t\tthis.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n\t\t\t// Skip if non empty HTML data is included.\n\t\t\t// https://github.com/ckeditor/ckeditor5-upload/issues/68\n\t\t\tif ( isHtmlIncluded( data.dataTransfer ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst images = Array.from( data.dataTransfer.files ).filter( file => {\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5-image/pull/254.\n\t\t\t\tif ( !file ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn imageTypes.test( file.type );\n\t\t\t} );\n\n\t\t\tconst ranges = data.targetRanges.map( viewRange => editor.editing.mapper.toModelRange( viewRange ) );\n\n\t\t\teditor.model.change( writer => {\n\t\t\t\t// Set selection to paste target.\n\t\t\t\twriter.setSelection( ranges );\n\n\t\t\t\tif ( images.length ) {\n\t\t\t\t\tevt.stop();\n\n\t\t\t\t\t// Upload images after the selection has changed in order to ensure the command's state is refreshed.\n\t\t\t\t\teditor.model.enqueueChange( 'default', () => {\n\t\t\t\t\t\teditor.execute( 'uploadImage', { file: images } );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Handle HTML pasted with images with base64 or blob sources.\n\t\t// For every image file, a new file loader is created and a placeholder image is\n\t\t// inserted into the content. Then, those images are uploaded once they appear in the model\n\t\t// (see Document#change listener below).\n\t\tthis.listenTo( editor.plugins.get( Clipboard ), 'inputTransformation', ( evt, data ) => {\n\t\t\tconst fetchableImages = Array.from( editor.editing.view.createRangeIn( data.content ) )\n\t\t\t\t.filter( value => isLocalImage( value.item ) && !value.item.getAttribute( 'uploadProcessed' ) )\n\t\t\t\t.map( value => { return { promise: fetchLocalImage( value.item ), imageElement: value.item }; } );\n\n\t\t\tif ( !fetchableImages.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst writer = new UpcastWriter( editor.editing.view.document );\n\n\t\t\tfor ( const fetchableImage of fetchableImages ) {\n\t\t\t\t// Set attribute marking that the image was processed already.\n\t\t\t\twriter.setAttribute( 'uploadProcessed', true, fetchableImage.imageElement );\n\n\t\t\t\tconst loader = fileRepository.createLoader( fetchableImage.promise );\n\n\t\t\t\tif ( loader ) {\n\t\t\t\t\twriter.setAttribute( 'src', '', fetchableImage.imageElement );\n\t\t\t\t\twriter.setAttribute( 'uploadId', loader.id, fetchableImage.imageElement );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Prevents from the browser redirecting to the dropped image.\n\t\teditor.editing.view.document.on( 'dragover', ( evt, data ) => {\n\t\t\tdata.preventDefault();\n\t\t} );\n\n\t\t// Upload placeholder images that appeared in the model.\n\t\tdoc.on( 'change', () => {\n\t\t\tconst changes = doc.differ.getChanges( { includeChangesInGraveyard: true } );\n\n\t\t\tfor ( const entry of changes ) {\n\t\t\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\t\t\tconst item = entry.position.nodeAfter;\n\t\t\t\t\tconst isInGraveyard = entry.position.root.rootName == '$graveyard';\n\n\t\t\t\t\tfor ( const image of getImagesFromChangeItem( editor, item ) ) {\n\t\t\t\t\t\t// Check if the image element still has upload id.\n\t\t\t\t\t\tconst uploadId = image.getAttribute( 'uploadId' );\n\n\t\t\t\t\t\tif ( !uploadId ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Check if the image is loaded on this client.\n\t\t\t\t\t\tconst loader = fileRepository.loaders.get( uploadId );\n\n\t\t\t\t\t\tif ( !loader ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isInGraveyard ) {\n\t\t\t\t\t\t\t// If the image was inserted to the graveyard - abort the loading process.\n\t\t\t\t\t\t\tloader.abort();\n\t\t\t\t\t\t} else if ( loader.status == 'idle' ) {\n\t\t\t\t\t\t\t// If the image was inserted into content and has not been loaded yet, start loading it.\n\t\t\t\t\t\t\tthis._readAndUpload( loader, image );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Reads and uploads an image.\n\t *\n\t * The image is read from the disk and as a Base64-encoded string it is set temporarily to\n\t * `image[src]`. When the image is successfully uploaded, the temporary data is replaced with the target\n\t * image's URL (the URL to the uploaded image on the server).\n\t *\n\t * @protected\n\t * @param {module:upload/filerepository~FileLoader} loader\n\t * @param {module:engine/model/element~Element} imageElement\n\t * @returns {Promise}\n\t */\n\t_readAndUpload( loader, imageElement ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst t = editor.locale.t;\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst notification = editor.plugins.get( Notification );\n\n\t\tmodel.enqueueChange( 'transparent', writer => {\n\t\t\twriter.setAttribute( 'uploadStatus', 'reading', imageElement );\n\t\t} );\n\n\t\treturn loader.read()\n\t\t\t.then( () => {\n\t\t\t\tconst promise = loader.upload();\n\n\t\t\t\t// Force re–paint in Safari. Without it, the image will display with a wrong size.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5/issues/1975\n\t\t\t\t/* istanbul ignore next */\n\t\t\t\tif ( env.isSafari ) {\n\t\t\t\t\tconst viewFigure = editor.editing.mapper.toViewElement( imageElement );\n\t\t\t\t\tconst viewImg = getViewImgFromWidget( viewFigure );\n\n\t\t\t\t\teditor.editing.view.once( 'render', () => {\n\t\t\t\t\t\t// Early returns just to be safe. There might be some code ran\n\t\t\t\t\t\t// in between the outer scope and this callback.\n\t\t\t\t\t\tif ( !viewImg.parent ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst domFigure = editor.editing.view.domConverter.mapViewToDom( viewImg.parent );\n\n\t\t\t\t\t\tif ( !domFigure ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst originalDisplay = domFigure.style.display;\n\n\t\t\t\t\t\tdomFigure.style.display = 'none';\n\n\t\t\t\t\t\t// Make sure this line will never be removed during minification for having \"no effect\".\n\t\t\t\t\t\tdomFigure._ckHack = domFigure.offsetHeight;\n\n\t\t\t\t\t\tdomFigure.style.display = originalDisplay;\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tmodel.enqueueChange( 'transparent', writer => {\n\t\t\t\t\twriter.setAttribute( 'uploadStatus', 'uploading', imageElement );\n\t\t\t\t} );\n\n\t\t\t\treturn promise;\n\t\t\t} )\n\t\t\t.then( data => {\n\t\t\t\tmodel.enqueueChange( 'transparent', writer => {\n\t\t\t\t\twriter.setAttributes( { uploadStatus: 'complete', src: data.default }, imageElement );\n\t\t\t\t\tthis._parseAndSetSrcsetAttributeOnImage( data, imageElement, writer );\n\t\t\t\t} );\n\n\t\t\t\tclean();\n\t\t\t} )\n\t\t\t.catch( error => {\n\t\t\t\t// If status is not 'error' nor 'aborted' - throw error because it means that something else went wrong,\n\t\t\t\t// it might be generic error and it would be real pain to find what is going on.\n\t\t\t\tif ( loader.status !== 'error' && loader.status !== 'aborted' ) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\t// Might be 'aborted'.\n\t\t\t\tif ( loader.status == 'error' && error ) {\n\t\t\t\t\tnotification.showWarning( error, {\n\t\t\t\t\t\ttitle: t( 'Upload failed' ),\n\t\t\t\t\t\tnamespace: 'upload'\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tclean();\n\n\t\t\t\t// Permanently remove image from insertion batch.\n\t\t\t\tmodel.enqueueChange( 'transparent', writer => {\n\t\t\t\t\twriter.remove( imageElement );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\tfunction clean() {\n\t\t\tmodel.enqueueChange( 'transparent', writer => {\n\t\t\t\twriter.removeAttribute( 'uploadId', imageElement );\n\t\t\t\twriter.removeAttribute( 'uploadStatus', imageElement );\n\t\t\t} );\n\n\t\t\tfileRepository.destroyLoader( loader );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `srcset` attribute based on a given file upload response and sets it as an attribute to a specific image element.\n\t *\n\t * @protected\n\t * @param {Object} data Data object from which `srcset` will be created.\n\t * @param {module:engine/model/element~Element} image The image element on which the `srcset` attribute will be set.\n\t * @param {module:engine/model/writer~Writer} writer\n\t */\n\t_parseAndSetSrcsetAttributeOnImage( data, image, writer ) {\n\t\t// Srcset attribute for responsive images support.\n\t\tlet maxWidth = 0;\n\n\t\tconst srcsetAttribute = Object.keys( data )\n\t\t// Filter out keys that are not integers.\n\t\t\t.filter( key => {\n\t\t\t\tconst width = parseInt( key, 10 );\n\n\t\t\t\tif ( !isNaN( width ) ) {\n\t\t\t\t\tmaxWidth = Math.max( maxWidth, width );\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} )\n\n\t\t\t// Convert each key to srcset entry.\n\t\t\t.map( key => `${ data[ key ] } ${ key }w` )\n\n\t\t\t// Join all entries.\n\t\t\t.join( ', ' );\n\n\t\tif ( srcsetAttribute != '' ) {\n\t\t\twriter.setAttribute( 'srcset', {\n\t\t\t\tdata: srcsetAttribute,\n\t\t\t\twidth: maxWidth\n\t\t\t}, image );\n\t\t}\n\t}\n}\n\n// Returns `true` if non-empty `text/html` is included in the data transfer.\n//\n// @param {module:clipboard/datatransfer~DataTransfer} dataTransfer\n// @returns {Boolean}\nexport function isHtmlIncluded( dataTransfer ) {\n\treturn Array.from( dataTransfer.types ).includes( 'text/html' ) && dataTransfer.getData( 'text/html' ) !== '';\n}\n\nfunction getImagesFromChangeItem( editor, item ) {\n\treturn Array.from( editor.model.createRangeOn( item ) )\n\t\t.filter( value => value.item.is( 'element', 'image' ) )\n\t\t.map( value => value.item );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageupload/imageuploadprogress\n */\n\n/* globals setTimeout */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { FileRepository } from 'ckeditor5/src/upload';\nimport { getViewImgFromWidget } from '../image/utils';\n\nimport uploadingPlaceholder from '../../theme/icons/image_placeholder.svg';\n\nimport '../../theme/imageuploadprogress.css';\nimport '../../theme/imageuploadicon.css';\nimport '../../theme/imageuploadloader.css';\n\n/**\n * The image upload progress plugin.\n * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageUploadProgress extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageUploadProgress';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * The image placeholder that is displayed before real image data can be accessed.\n\t\t *\n\t\t * @protected\n\t\t * @member {String} #placeholder\n\t\t */\n\t\tthis.placeholder = 'data:image/svg+xml;utf8,' + encodeURIComponent( uploadingPlaceholder );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\n\t\t// Upload status change - update image's view according to that status.\n\t\teditor.editing.downcastDispatcher.on( 'attribute:uploadStatus:image', ( ...args ) => this.uploadStatusChange( ...args ) );\n\t}\n\n\t/**\n\t * This method is called each time the image `uploadStatus` attribute is changed.\n\t *\n\t * @param {module:utils/eventinfo~EventInfo} evt An object containing information about the fired event.\n\t * @param {Object} data Additional information about the change.\n\t * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi\n\t */\n\tuploadStatusChange( evt, data, conversionApi ) {\n\t\tconst editor = this.editor;\n\t\tconst modelImage = data.item;\n\t\tconst uploadId = modelImage.getAttribute( 'uploadId' );\n\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst status = uploadId ? data.attributeNewValue : null;\n\t\tconst placeholder = this.placeholder;\n\t\tconst viewFigure = editor.editing.mapper.toViewElement( modelImage );\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\tif ( status == 'reading' ) {\n\t\t\t// Start \"appearing\" effect and show placeholder with infinite progress bar on the top\n\t\t\t// while image is read from disk.\n\t\t\t_startAppearEffect( viewFigure, viewWriter );\n\t\t\t_showPlaceholder( placeholder, viewFigure, viewWriter );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Show progress bar on the top of the image when image is uploading.\n\t\tif ( status == 'uploading' ) {\n\t\t\tconst loader = fileRepository.loaders.get( uploadId );\n\n\t\t\t// Start appear effect if needed - see https://github.com/ckeditor/ckeditor5-image/issues/191.\n\t\t\t_startAppearEffect( viewFigure, viewWriter );\n\n\t\t\tif ( !loader ) {\n\t\t\t\t// There is no loader associated with uploadId - this means that image came from external changes.\n\t\t\t\t// In such cases we still want to show the placeholder until image is fully uploaded.\n\t\t\t\t// Show placeholder if needed - see https://github.com/ckeditor/ckeditor5-image/issues/191.\n\t\t\t\t_showPlaceholder( placeholder, viewFigure, viewWriter );\n\t\t\t} else {\n\t\t\t\t// Hide placeholder and initialize progress bar showing upload progress.\n\t\t\t\t_hidePlaceholder( viewFigure, viewWriter );\n\t\t\t\t_showProgressBar( viewFigure, viewWriter, loader, editor.editing.view );\n\t\t\t\t_displayLocalImage( viewFigure, viewWriter, loader );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( status == 'complete' && fileRepository.loaders.get( uploadId ) ) {\n\t\t\t_showCompleteIcon( viewFigure, viewWriter, editor.editing.view );\n\t\t}\n\n\t\t// Clean up.\n\t\t_hideProgressBar( viewFigure, viewWriter );\n\t\t_hidePlaceholder( viewFigure, viewWriter );\n\t\t_stopAppearEffect( viewFigure, viewWriter );\n\t}\n}\n\n// Adds ck-appear class to the image figure if one is not already applied.\n//\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\nfunction _startAppearEffect( viewFigure, writer ) {\n\tif ( !viewFigure.hasClass( 'ck-appear' ) ) {\n\t\twriter.addClass( 'ck-appear', viewFigure );\n\t}\n}\n\n// Removes ck-appear class to the image figure if one is not already removed.\n//\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\nfunction _stopAppearEffect( viewFigure, writer ) {\n\twriter.removeClass( 'ck-appear', viewFigure );\n}\n\n// Shows placeholder together with infinite progress bar on given image figure.\n//\n// @param {String} Data-uri with a svg placeholder.\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\nfunction _showPlaceholder( placeholder, viewFigure, writer ) {\n\tif ( !viewFigure.hasClass( 'ck-image-upload-placeholder' ) ) {\n\t\twriter.addClass( 'ck-image-upload-placeholder', viewFigure );\n\t}\n\n\tconst viewImg = getViewImgFromWidget( viewFigure );\n\n\tif ( viewImg.getAttribute( 'src' ) !== placeholder ) {\n\t\twriter.setAttribute( 'src', placeholder, viewImg );\n\t}\n\n\tif ( !_getUIElement( viewFigure, 'placeholder' ) ) {\n\t\twriter.insert( writer.createPositionAfter( viewImg ), _createPlaceholder( writer ) );\n\t}\n}\n\n// Removes placeholder together with infinite progress bar on given image figure.\n//\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\nfunction _hidePlaceholder( viewFigure, writer ) {\n\tif ( viewFigure.hasClass( 'ck-image-upload-placeholder' ) ) {\n\t\twriter.removeClass( 'ck-image-upload-placeholder', viewFigure );\n\t}\n\n\t_removeUIElement( viewFigure, writer, 'placeholder' );\n}\n\n// Shows progress bar displaying upload progress.\n// Attaches it to the file loader to update when upload percentace is changed.\n//\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @param {module:upload/filerepository~FileLoader} loader\n// @param {module:engine/view/view~View} view\nfunction _showProgressBar( viewFigure, writer, loader, view ) {\n\tconst progressBar = _createProgressBar( writer );\n\twriter.insert( writer.createPositionAt( viewFigure, 'end' ), progressBar );\n\n\t// Update progress bar width when uploadedPercent is changed.\n\tloader.on( 'change:uploadedPercent', ( evt, name, value ) => {\n\t\tview.change( writer => {\n\t\t\twriter.setStyle( 'width', value + '%', progressBar );\n\t\t} );\n\t} );\n}\n\n// Hides upload progress bar.\n//\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\nfunction _hideProgressBar( viewFigure, writer ) {\n\t_removeUIElement( viewFigure, writer, 'progressBar' );\n}\n\n// Shows complete icon and hides after a certain amount of time.\n//\n// @param {module:engine/view/containerelement~ContainerElement} viewFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @param {module:engine/view/view~View} view\nfunction _showCompleteIcon( viewFigure, writer, view ) {\n\tconst completeIcon = writer.createUIElement( 'div', { class: 'ck-image-upload-complete-icon' } );\n\n\twriter.insert( writer.createPositionAt( viewFigure, 'end' ), completeIcon );\n\n\tsetTimeout( () => {\n\t\tview.change( writer => writer.remove( writer.createRangeOn( completeIcon ) ) );\n\t}, 3000 );\n}\n\n// Create progress bar element using {@link module:engine/view/uielement~UIElement}.\n//\n// @private\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @returns {module:engine/view/uielement~UIElement}\nfunction _createProgressBar( writer ) {\n\tconst progressBar = writer.createUIElement( 'div', { class: 'ck-progress-bar' } );\n\n\twriter.setCustomProperty( 'progressBar', true, progressBar );\n\n\treturn progressBar;\n}\n\n// Create placeholder element using {@link module:engine/view/uielement~UIElement}.\n//\n// @private\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @returns {module:engine/view/uielement~UIElement}\nfunction _createPlaceholder( writer ) {\n\tconst placeholder = writer.createUIElement( 'div', { class: 'ck-upload-placeholder-loader' } );\n\n\twriter.setCustomProperty( 'placeholder', true, placeholder );\n\n\treturn placeholder;\n}\n\n// Returns {@link module:engine/view/uielement~UIElement} of given unique property from image figure element.\n// Returns `undefined` if element is not found.\n//\n// @private\n// @param {module:engine/view/element~Element} imageFigure\n// @param {String} uniqueProperty\n// @returns {module:engine/view/uielement~UIElement|undefined}\nfunction _getUIElement( imageFigure, uniqueProperty ) {\n\tfor ( const child of imageFigure.getChildren() ) {\n\t\tif ( child.getCustomProperty( uniqueProperty ) ) {\n\t\t\treturn child;\n\t\t}\n\t}\n}\n\n// Removes {@link module:engine/view/uielement~UIElement} of given unique property from image figure element.\n//\n// @private\n// @param {module:engine/view/element~Element} imageFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @param {String} uniqueProperty\nfunction _removeUIElement( viewFigure, writer, uniqueProperty ) {\n\tconst element = _getUIElement( viewFigure, uniqueProperty );\n\n\tif ( element ) {\n\t\twriter.remove( writer.createRangeOn( element ) );\n\t}\n}\n\n// Displays local data from file loader.\n//\n// @param {module:engine/view/element~Element} imageFigure\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @param {module:upload/filerepository~FileLoader} loader\nfunction _displayLocalImage( viewFigure, writer, loader ) {\n\tif ( loader.data ) {\n\t\tconst viewImg = getViewImgFromWidget( viewFigure );\n\n\t\twriter.setAttribute( 'src', loader.data, viewImg );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageupload/imageuploadui\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core';\nimport { FileDialogButtonView } from 'ckeditor5/src/upload';\nimport { createImageTypeRegExp } from './utils';\n\n/**\n * The image upload button plugin.\n *\n * For a detailed overview, check the {@glink features/image-upload/image-upload Image upload feature} documentation.\n *\n * Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n * and also the `imageUpload` button as an alias for backward compatibility.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class ImageUploadUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'ImageUploadUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst componentCreator = locale => {\n\t\t\tconst view = new FileDialogButtonView( locale );\n\t\t\tconst command = editor.commands.get( 'uploadImage' );\n\t\t\tconst imageTypes = editor.config.get( 'image.upload.types' );\n\t\t\tconst imageTypesRegExp = createImageTypeRegExp( imageTypes );\n\n\t\t\tview.set( {\n\t\t\t\tacceptedType: imageTypes.map( type => `image/${ type }` ).join( ',' ),\n\t\t\t\tallowMultipleFiles: true\n\t\t\t} );\n\n\t\t\tview.buttonView.set( {\n\t\t\t\tlabel: t( 'Insert image' ),\n\t\t\t\ticon: icons.image,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tview.buttonView.bind( 'isEnabled' ).to( command );\n\n\t\t\tview.on( 'done', ( evt, files ) => {\n\t\t\t\tconst imagesToUpload = Array.from( files ).filter( file => imageTypesRegExp.test( file.type ) );\n\n\t\t\t\tif ( imagesToUpload.length ) {\n\t\t\t\t\teditor.execute( 'uploadImage', { file: imagesToUpload } );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t};\n\n\t\t// Setup `uploadImage` button and add `imageUpload` button as an alias for backward compatibility.\n\t\teditor.ui.componentFactory.add( 'uploadImage', componentCreator );\n\t\teditor.ui.componentFactory.add( 'imageUpload', componentCreator );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { FileRepository } from 'ckeditor5/src/upload';\nimport { Command } from 'ckeditor5/src/core';\nimport { toArray } from 'ckeditor5/src/utils';\n\nimport { insertImage, isImageAllowed } from '../image/utils';\n\n/**\n * @module image/imageupload/uploadimagecommand\n */\n\n/**\n * The upload image command.\n *\n * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `uploadImage`\n * and it is also available via aliased `imageUpload` name.\n *\n * In order to upload an image at the current selection position\n * (according to the {@link module:widget/utils~findOptimalInsertionPosition} algorithm),\n * execute the command and pass the native image file instance:\n *\n *\t\tthis.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n *\t\t\t// Assuming that only images were pasted:\n *\t\t\tconst images = Array.from( data.dataTransfer.files );\n *\n *\t\t\t// Upload the first image:\n *\t\t\teditor.execute( 'uploadImage', { file: images[ 0 ] } );\n *\t\t} );\n *\n * It is also possible to insert multiple images at once:\n *\n *\t\teditor.execute( 'uploadImage', {\n *\t\t\tfile: [\n *\t\t\t\tfile1,\n *\t\t\t\tfile2\n *\t\t\t]\n *\t\t} );\n *\n * @extends module:core/command~Command\n */\nexport default class UploadImageCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst imageElement = this.editor.model.document.selection.getSelectedElement();\n\t\tconst isImage = imageElement && imageElement.name === 'image' || false;\n\n\t\tthis.isEnabled = isImageAllowed( this.editor.model ) || isImage;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param {Object} options Options for the executed command.\n\t * @param {File|Array.<File>} options.file The image file or an array of image files to upload.\n\t */\n\texecute( options ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\n\t\tfor ( const file of toArray( options.file ) ) {\n\t\t\tuploadImage( model, fileRepository, file );\n\t\t}\n\t}\n}\n\n// Handles uploading single file.\n//\n// @param {module:engine/model/model~Model} model\n// @param {File} file\nfunction uploadImage( model, fileRepository, file ) {\n\tconst loader = fileRepository.createLoader( file );\n\n\t// Do not throw when upload adapter is not set. FileRepository will log an error anyway.\n\tif ( !loader ) {\n\t\treturn;\n\t}\n\n\tinsertImage( model, { uploadId: loader.id } );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image/imageupload/utils\n */\n\n/* global fetch, File */\n\nimport { global } from 'ckeditor5/src/utils';\n\n/**\n * Creates a regular expression used to test for image files.\n *\n *\t\tconst imageType = createImageTypeRegExp( [ 'png', 'jpeg', 'svg+xml', 'vnd.microsoft.icon' ] );\n *\n *\t\tconsole.log( 'is supported image', imageType.test( file.type ) );\n *\n * @param {Array.<String>} types\n * @returns {RegExp}\n */\nexport function createImageTypeRegExp( types ) {\n\t// Sanitize the MIME type name which may include: \"+\", \"-\" or \".\".\n\tconst regExpSafeNames = types.map( type => type.replace( '+', '\\\\+' ) );\n\n\treturn new RegExp( `^image\\\\/(${ regExpSafeNames.join( '|' ) })$` );\n}\n\n/**\n * Creates a promise that fetches the image local source (Base64 or blob) and resolves with a `File` object.\n *\n * @param {module:engine/view/element~Element} image Image whose source to fetch.\n * @returns {Promise.<File>} A promise which resolves when an image source is fetched and converted to a `File` instance.\n * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n */\nexport function fetchLocalImage( image ) {\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst imageSrc = image.getAttribute( 'src' );\n\n\t\t// Fetch works asynchronously and so does not block browser UI when processing data.\n\t\tfetch( imageSrc )\n\t\t\t.then( resource => resource.blob() )\n\t\t\t.then( blob => {\n\t\t\t\tconst mimeType = getImageMimeType( blob, imageSrc );\n\t\t\t\tconst ext = mimeType.replace( 'image/', '' );\n\t\t\t\tconst filename = `image.${ ext }`;\n\t\t\t\tconst file = new File( [ blob ], filename, { type: mimeType } );\n\n\t\t\t\tresolve( file );\n\t\t\t} )\n\t\t\t.catch( err => {\n\t\t\t\t// Fetch fails only, if it can't make a request due to a network failure or if anything prevented the request\n\t\t\t\t// from completing, i.e. the Content Security Policy rules. It is not possible to detect the exact cause of failure,\n\t\t\t\t// so we are just trying the fallback solution, if general TypeError is thrown.\n\t\t\t\treturn err && err.name === 'TypeError' ?\n\t\t\t\t\tconvertLocalImageOnCanvas( imageSrc ).then( resolve ).catch( reject ) :\n\t\t\t\t\treject( err );\n\t\t\t} );\n\t} );\n}\n\n/**\n * Checks whether a given node is an image element with a local source (Base64 or blob).\n *\n * @param {module:engine/view/node~Node} node The node to check.\n * @returns {Boolean}\n */\nexport function isLocalImage( node ) {\n\tif ( !node.is( 'element', 'img' ) || !node.getAttribute( 'src' ) ) {\n\t\treturn false;\n\t}\n\n\treturn node.getAttribute( 'src' ).match( /^data:image\\/\\w+;base64,/g ) ||\n\t\tnode.getAttribute( 'src' ).match( /^blob:/g );\n}\n\n// Extracts an image type based on its blob representation or its source.\n//\n// @param {String} src Image `src` attribute value.\n// @param {Blob} blob Image blob representation.\n// @returns {String}\nfunction getImageMimeType( blob, src ) {\n\tif ( blob.type ) {\n\t\treturn blob.type;\n\t} else if ( src.match( /data:(image\\/\\w+);base64/ ) ) {\n\t\treturn src.match( /data:(image\\/\\w+);base64/ )[ 1 ].toLowerCase();\n\t} else {\n\t\t// Fallback to 'jpeg' as common extension.\n\t\treturn 'image/jpeg';\n\t}\n}\n\n// Creates a promise that converts the image local source (Base64 or blob) to a blob using canvas and resolves\n// with a `File` object.\n//\n// @param {String} imageSrc Image `src` attribute value.\n// @returns {Promise.<File>} A promise which resolves when an image source is converted to a `File` instance.\n// It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\nfunction convertLocalImageOnCanvas( imageSrc ) {\n\treturn getBlobFromCanvas( imageSrc ).then( blob => {\n\t\tconst mimeType = getImageMimeType( blob, imageSrc );\n\t\tconst ext = mimeType.replace( 'image/', '' );\n\t\tconst filename = `image.${ ext }`;\n\n\t\treturn new File( [ blob ], filename, { type: mimeType } );\n\t} );\n}\n\n// Creates a promise that resolves with a `Blob` object converted from the image source (Base64 or blob).\n//\n// @param {String} imageSrc Image `src` attribute value.\n// @returns {Promise.<Blob>}\nfunction getBlobFromCanvas( imageSrc ) {\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst image = global.document.createElement( 'img' );\n\n\t\timage.addEventListener( 'load', () => {\n\t\t\tconst canvas = global.document.createElement( 'canvas' );\n\n\t\t\tcanvas.width = image.width;\n\t\t\tcanvas.height = image.height;\n\n\t\t\tconst ctx = canvas.getContext( '2d' );\n\n\t\t\tctx.drawImage( image, 0, 0 );\n\n\t\t\tcanvas.toBlob( blob => blob ? resolve( blob ) : reject() );\n\t\t} );\n\n\t\timage.addEventListener( 'error', () => reject() );\n\n\t\timage.src = imageSrc;\n\t} );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module image\n */\n\nimport AutoImage from './autoimage';\nimport Image from './image';\nimport ImageCaption from './imagecaption';\nimport ImageInsert from './imageinsert';\nimport ImageResize from './imageresize';\nimport ImageStyle from './imagestyle';\nimport ImageTextAlternative from './imagetextalternative';\nimport ImageToolbar from './imagetoolbar';\nimport ImageUpload from './imageupload';\n\nexport default {\n\tAutoImage,\n\tImage,\n\tImageCaption,\n\tImageInsert,\n\tImageResize,\n\tImageStyle,\n\tImageTextAlternative,\n\tImageToolbar,\n\tImageUpload\n};\n","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 700 250\\\"><rect rx=\\\"4\\\"/></svg>\";","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./image.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imagecaption.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imageinsert.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imageinsertformrowview.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imageresize.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imagestyle.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imageuploadicon.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imageuploadloader.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./imageuploadprogress.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./textalternativeform.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/clipboard.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/engine.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/ui.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/undo.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/upload.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/utils.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/widget.js\");","module.exports = CKEditor5.dll;"],"sourceRoot":""}
|