Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

froala-editor

Package Overview
Dependencies
Maintainers
0
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

froala-editor - npm Package Compare versions

Comparing version 4.3.0 to 4.3.1

2

js/languages/ar.js
/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * Copyright 2014-2024 Froala Labs

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(Me){"use strict";function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=Array(t);a<t;a++)i[a]=e[a];return i}function Ke(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function l(e,t){if(e){if("string"==typeof e)return p(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){s=!0,n=e},f:function(){try{o||null==a["return"]||a["return"]()}finally{if(s)throw n}}}}function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Me=Me&&Me.hasOwnProperty("default")?Me["default"]:Me,Object.assign(Me.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Me.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),Me.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,Me.PLUGINS.image=function(A){var C,p,f,g,s,a,S=A.$,E="https://i.froala.com/upload",t=!1,i=1,c=2,d=3,u=4,R=5,U=6,r={};function m(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),C&&e.val(C.attr("src")),e.trigger("change")}function o(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}function n(){var e=A.popups.get("image.edit");if(e||(e=N()),e){var t=C;A.popups.setContainer("image.edit",A.$sc),A.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t&&o(t),r=A.$wp&&o(A.$wp);r||(r=i);var n=0;A.opts.iframe?((n=A.$wp.scrollTop()+e.outerHeight())<t.get(0).getBoundingClientRect().top&&(n=t.get(0).getBoundingClientRect().top),n>t.get(0).getBoundingClientRect().top+t.height()&&(n=t.get(0).getBoundingClientRect().top+t.height())):n=r<i?i:A.$wp&&i+t.height()<r+A.$wp.height()?i+t.height():r+e.outerHeight(),C.hasClass("fr-uploading")?P():A.popups.show("image.edit",a,n,1,!0)}}function h(){k()}function l(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ve(e);he(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function v(){for(var e,t="IMG"==A.el.tagName?[A.el]:A.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=S(t[a]);!A.opts.htmlUntouched&&A.opts.useClasses?((A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ve(e)[0])),e.addClass("fr-di".concat(be(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),A.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):A.opts.htmlUntouched||A.opts.useClasses||(A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&l(i),A.opts.iframe&&i.on("load",A.size.syncIframe)}}function b(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(A.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),S(a[t]).toggleClass("fr-draggable",A.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&A.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;A.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!A.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)i.indexOf(s[t].getAttribute("src"))<0&&A.events.trigger("image.removed",[S(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&A.events.trigger("image.loaded",[S(a[t])])}s=a}function D(){if(p||function o(){var e;A.shared.$image_resizer?(p=A.shared.$image_resizer,g=A.shared.$img_overlay,A.events.on("destroy",function(){S("body").first().append(p.removeClass("fr-active"))},!0)):(A.shared.$image_resizer=S(document.createElement("div")).attr("class","fr-image-resizer"),p=A.shared.$image_resizer,A.events.$on(p,"mousedown",function(e){e.stopPropagation()},!0),A.opts.imageResize&&(p.append(y("nw")+y("ne")+y("sw")+y("se")),A.shared.$img_overlay=S(document.createElement("div")).attr("class","fr-image-overlay"),g=A.shared.$img_overlay,e=p.get(0).ownerDocument,S(e).find("body").first().append(g)));A.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null,A.opts.imageResize&&(g.remove(),g=null)},!0),A.helpers.isMobile()||A.events.$on(S(A.o_win),"resize",function(){C&&!C.hasClass("fr-uploading")?ce(!0):C&&(D(),ye(),P(!1))});if(A.opts.imageResize){e=p.get(0).ownerDocument,A.events.$on(p,A._mousedown,".fr-handler",x),A.events.$on(S(e),A._mousemove,T),A.events.$on(S(e.defaultView||e.parentWindow),A._mouseup,$),A.events.$on(g,"mouseleave",$);var i=1,r=null,n=0;A.events.on("keydown",function(e){if(C){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==Me.KEYCODE.EQUALS||A.browser.mozilla&&a==Me.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=te.call(this,e,1,1,i):(a==Me.KEYCODE.HYPHEN||A.browser.mozilla&&a==Me.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=te.call(this,e,2,-1,i):A.keys.ctrlKey(e)||a!=Me.KEYCODE.ENTER||(C.before("<br>"),z(C)),r=a,n=e.timeStamp}},!0),A.events.on("keyup",function(){i=1})}}(),!C)return!1;var e=A.$wp||A.$sc;e.append(p),p.data("instance",A);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=A.helpers.getPX(e.css("border-left-width")),t-=A.helpers.getPX(e.css("border-top-width")),A.$el.is("img")&&A.$sc.is("body")&&(a=t=0);var i=Ce();Se()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;A.opts.iframe&&(r=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),n=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),p.css("top",(A.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(A.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function y(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function w(e){Se()&&C.parents(".fr-img-caption").css("width",e),C.css("width",e)}function x(e){if(!A.core.sameInstance(p))return!0;if(e.preventDefault(),e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;A.undo.canDo()||A.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=A.$oel.get(0),i=a.ownerDocument,r=i.defaultView||i.parentWindow,n=!1;try{n=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(l){}n&&r.frameElement&&(t+=A.helpers.getPX(S(a).offset().left)+r.frameElement.clientLeft)}(f=S(this)).data("start-x",t),f.data("start-width",C.width()),f.data("start-height",C.height());var o=C.width();if(A.opts.imageResizeWithPercent){var s=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;o=(o/S(s).outerWidth()*100).toFixed(2)+"%"}w(o),g.show(),A.popups.hideAll(),me()}function T(e){if(!A.core.sameInstance(p))return!0;var t;if(f&&C){if(e.preventDefault(),A.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-f.data("start-x"),r=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),A.opts.imageResizeWithPercent){var n=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;r=((r+i)/S(n).outerWidth()*100).toFixed(2),A.opts.imageRoundPercent&&(r=Math.round(r)),w("".concat(r,"%")),(t=Se()?(A.helpers.getPX(C.parents(".fr-img-caption").css("width"))/S(n).outerWidth()*100).toFixed(2):(A.helpers.getPX(C.css("width"))/S(n).outerWidth()*100).toFixed(2))===r||A.opts.imageRoundPercent||w("".concat(t,"%")),C.css("height","").removeAttr("height")}else r+i>=A.opts.imageMinWidth&&(w(r+i),t=Se()?A.helpers.getPX(C.parents(".fr-img-caption").css("width")):A.helpers.getPX(C.css("width"))),t!==r+i&&w(t),((C.attr("style")||"").match(/(^height:)|(; *height:)/)||C.attr("height"))&&(C.css("height",f.data("start-height")*C.width()/f.data("start-width")),C.removeAttr("height"));D(),A.events.trigger("image.resize",[Ae()])}}function $(e){if(!A.core.sameInstance(p))return!0;if(f&&C){if(e&&e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;f=null,g.hide(),D(),n(),A.undo.saveStep(),A.events.trigger("image.resizeEnd",[Ae()])}else p.removeClass("fr-active")}function I(e,t,a){A.edit.on(),C&&C.addClass("fr-error"),r[e]?O(A.language.translate(r[e])):O(A.language.translate("Something went wrong. Please try again.")),!C&&a&&ae(a),A.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function N(e){if(e)return A.$wp&&A.events.$on(A.$wp,"scroll.image-edit",function(){C&&A.popups.isVisible("image.edit")&&(A.events.disableBlur(),n())}),!0;var t="";if(0<A.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons">\n '.concat(A.button.buildList(A.opts.imageEditButtons),"\n </div>")};return A.popups.create("image.edit",a)}return!1}function P(e){var t=A.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),C){var a=Ce();A.popups.setContainer("image.insert",A.$sc);var i=a.offset().left,r=a.offset().top+a.height();A.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&B(A.language.translate("Uploading"),0)}function k(e){var t=A.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||A.$el.find("img.fr-error").length)){if(A.events.focus(),A.$el.find("img.fr-error").length&&(A.$el.find("img.fr-error").remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&C){var a=C;ce(!0),A.selection.setAfter(a.get(0)),A.selection.restore()}A.popups.hide("image.insert")}}function B(e,t){var a=A.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function O(e){P();var t=A.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),A.events.disableBlur(),a.focus()}function z(e){ge.call(e.get(0))}function L(){var e=S(this);A.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),z(e),A.events.trigger("image.loaded",[e])}function _(o,e,s,l,p){l&&"string"==typeof l&&(l=A.$(l)),A.edit.off(),B(A.language.translate("Loading image")),e&&(o=A.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){A.undo.canDo()||l.hasClass("fr-uploading")||A.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),A.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),!A.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||A.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")?e.removeAttr(n.nodeName):s&&s.hasOwnProperty(n.nodeName)&&e.removeAttr(n.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",L),e.attr("src",o),A.edit.on(),b(!1),l[0].src!=o&&A.selection.restore(),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger(a?"image.replaced":"image.inserted",[e,p])}else(e=W(o,s,L))&&(b(!1),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger("image.inserted",[e,p]))},t.onerror=function(){I(i)},P(A.language.translate("Loading image")),t.src=o}function M(e,t,a){B(A.language.translate("Loading image"));var i=this.status,r=this.response,n=this.responseXML,o=this.responseText;try{if(A.opts.imageUploadToS3||A.opts.imageUploadToAzure)if(201==i){var s;if(A.opts.imageUploadToAzure){if(!1===A.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return A.edit.on(),!1;s=t}else s=function p(e){try{var t=S(e).find("Location").text(),a=S(e).find("Key").text();return!1===A.events.trigger("image.uploadedToS3",[t,a,e],!0)?(A.edit.on(),!1):t}catch(i){return I(u,e),!1}}(n);s&&_(s,!1,[],e,r||n)}else I(u,r||n,e);else if(200<=i&&i<300){var l=function f(e){try{if(!1===A.events.trigger("image.uploaded",[e],!0))return A.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(c,e),!1)}catch(a){return I(u,e),!1}}(o);l&&_(l.link,!1,l,e,r||o)}else I(d,r||o,e)}catch(g){I(u,r||o,e)}}function K(){I(u,this.response||this.responseText||this.responseXML)}function Y(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;B(A.language.translate("Uploading"),t)}}function W(e,t,a){var i,r=S(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),r.attr("".concat(i),t[i]));var n=A.opts.imageDefaultWidth;n&&"auto"!=n&&(n=A.opts.imageResizeWithPercent?"100%":"".concat(n,"px")),r.attr("style",n?"width: ".concat(n,";"):""),he(r,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.imageSplitHTML?A.markers.split():A.markers.insert(),A.html.wrap();var o=A.$el.find(".fr-marker");if(o.length)(o.parent().is("hr")||o.parent().is("IMG"))&&o.parent().after(o),A.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r);else{if(A.opts.trackChangesEnabled)return k(!0),!1;A.$el.append(r)}return A.selection.clear(),r}function G(){A.edit.on(),k(!0)}function H(e,t){if(void 0!==e&&0<e.length){if(!1===A.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if(!(null!==A.opts.imageUploadURL&&A.opts.imageUploadURL!=E||A.opts.imageUploadToS3||A.opts.imageUploadToAzure))return function y(r,n){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),n&&n.data("fr-old-src",n.attr("src")),A.image.insert(e,!1,null,n)}else A.image.insert(e,null,null,A.image.get())},P(),o.readAsDataURL(r)}(i,t||C),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>A.opts.imageMaxSize)return I(R),!1;if(A.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(U),!1;if(A.drag_support.formdata&&(a=A.drag_support.formdata?new FormData:null),a){var r;if(!1!==A.opts.imageUploadToS3)for(r in a.append("key",A.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),A.opts.imageUploadToS3.params)A.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,A.opts.imageUploadToS3.params[r]);for(r in A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,A.opts.imageUploadParams[r]);a.append(A.opts.imageUploadParam,i,i.name);var n,o,s=A.opts.imageUploadURL,l=A.opts.imageUploadMethod;A.opts.imageUploadToS3&&(s=A.opts.imageUploadToS3.uploadURL?A.opts.imageUploadToS3.uploadURL:"https://".concat(A.opts.imageUploadToS3.region,".amazonaws.com/").concat(A.opts.imageUploadToS3.bucket)),A.opts.imageUploadToAzure&&(n=s=A.opts.imageUploadToAzure.uploadURL?"".concat(A.opts.imageUploadToAzure.uploadURL,"/").concat(i.name):encodeURI("https://".concat(A.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.imageUploadToAzure.container,"/").concat(i.name)),A.opts.imageUploadToAzure.SASToken&&(s+=A.opts.imageUploadToAzure.SASToken),l="PUT");var p=A.core.getXHR(s,l);if(A.opts.imageUploadToAzure){var f=(new Date).toUTCString();if(!A.opts.imageUploadToAzure.SASToken&&A.opts.imageUploadToAzure.accessKey){var g=A.opts.imageUploadToAzure.account,c=A.opts.imageUploadToAzure.container;if(A.opts.imageUploadToAzure.uploadURL){var d=A.opts.imageUploadToAzure.uploadURL.split("/");c=d.pop(),g=d.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),m=encodeURI("/"+g+"/"+c+"/"+i.name),h=l+"\n\n\n"+i.size+"\n\n"+i.type+"\n\n\n\n\n\n\n"+u+"\n"+m,v=A.cryptoJSPlugin.cryptoJS.HmacSHA256(h,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.imageUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+g+":"+v;o=v,p.setRequestHeader("Authorization",b)}for(r in p.setRequestHeader("x-ms-version","2019-07-07"),p.setRequestHeader("x-ms-date",f),p.setRequestHeader("Content-Type",i.type),p.setRequestHeader("x-ms-blob-type","BlockBlob"),A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(r)&&p.setRequestHeader(r,A.opts.imageUploadParams[r]);for(r in A.opts.imageUploadToAzure.params)A.opts.imageUploadToAzure.params.hasOwnProperty(r)&&p.setRequestHeader(r,A.opts.imageUploadToAzure.params[r])}!function w(t,a,i,r,n,o){function s(){var e=S(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),A.placeholder.refresh(),z(e),D(),P(),A.edit.off(),t.onload=function(){M.call(t,e,n,o)},t.onerror=K,t.upload.onprogress=Y,t.onabort=G,S(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),ce(!0))}),t.send(A.opts.imageUploadToAzure?i:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),S(this).off("error")}),A.edit.on(),A.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):W(e,null,s)},l.readAsDataURL(i)}(p,a,i,t||C,n,o)}}}function F(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!A.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;A.markers.remove(),A.markers.insertAtPoint(e.originalEvent),A.$el.find(".fr-marker").replaceWith(Me.MARKERS),0===A.$el.find(".fr-marker").length&&A.selection.setAtEnd(A.el),A.popups.hideAll();var i=A.popups.get("image.insert");i||(i=X()),A.popups.setContainer("image.insert",A.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(A.opts.iframe){var o=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),s=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"));n+=A.$iframe.offset().top+o,r+=A.$iframe.offset().left+s}return A.popups.show("image.insert",r,n),P(),0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(ce(!0),H(t.files)):I(U),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return A.popups.onRefresh("image.insert",m),A.popups.onHide("image.insert",h),!0;var t,a,i="";A.opts.imageUpload||-1===A.opts.imageInsertButtons.indexOf("imageUpload")||A.opts.imageInsertButtons.splice(A.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=A.button.buildList(A.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var n=A.opts.imageInsertButtons.indexOf("imageUpload"),o=A.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=n&&(t=" fr-active",0<=o&&o<n&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(A.id,'"><strong>').concat(A.language.translate("Drop image"),"</strong><br>(").concat(A.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(A.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(A.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=n&&n<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(A.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(A.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>"));var p={buttons:i,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=A.opts.imageInsertButtons.length&&(a=A.popups.create("image.insert",p)),A.$wp&&A.events.$on(A.$wp,"scroll",function(){C&&A.popups.isVisible("image.insert")&&ye()}),function f(i){A.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return S(this).addClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return S(this).removeClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),S(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||A;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){S(this).trigger("click")},!0),A.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||A;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,C)}S(this).val("")},!0)}(a),a}function q(){C&&A.popups.get("image.alt").find("input").val(C.attr("alt")||"").trigger("change")}function j(){var e=A.popups.get("image.alt");e||(e=J()),k(),A.popups.refresh("image.alt"),A.popups.setContainer("image.alt",A.$sc);var t=Ce(),a=t.outerWidth()/2;Se()&&(t=t.find(".fr-img-wrap"),a=C.outerWidth()/2);var i=t.offset().left+a,r=t.offset().top+t.outerHeight(),n=t.outerHeight();A.opts.iframe&&Se()&&(n=C?C.outerHeight():0),A.popups.show("image.alt",i,r,n,!0)}function J(e){if(e)return A.popups.onRefresh("image.alt",q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(A.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.alt",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-alt",function(){C&&A.popups.isVisible("image.alt")&&j()}),a}function Q(){var e=A.popups.get("image.size"),t=C.get(0).style.height?C.get(0).style.height:"auto",a=C.get(0).style.width?C.get(0).style.width:"auto";if(C)if(Se()){var i=C.parent();i.get(0).style.width||(i=C.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function Z(){var e=A.popups.get("image.size");e||(e=ee()),k(),A.popups.refresh("image.size"),A.popups.setContainer("image.size",A.$sc);var t=Ce(),a=t.outerWidth()/2;Se()&&(t=t.find(".fr-img-wrap"),a=C.outerWidth()/2);var i=t.outerHeight();A.opts.iframe&&Se()&&(i=C?C.outerHeight():0);var r=t.offset().left+a,n=t.offset().top+t.outerHeight();A.popups.show("image.size",r,n,i,!0)}function ee(e){if(e)return A.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(A.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(A.id,'" type="text" name="height" placeholder="').concat(A.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.size",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-size",function(){C&&A.popups.isVisible("image.size")&&Z()}),a}function te(e,t,a,i){return e.pageX=t,x.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),T.call(this,e),$.call(this,e),++i}function ae(e){if(e=e||Ce(),A.opts.trackChangesEnabled&&!A.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return A.track_changes.removeSpecialItem(e),A.popups.hideAll(),void ce(!0);e&&!1!==A.events.trigger("image.beforeRemove",[e])&&(A.popups.hideAll(),we(),ce(!0),A.undo.canDo()||A.undo.saveStep(),e.get(0)==A.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(A.selection.setBefore(e.get(0).parentNode)||A.selection.setAfter(e.get(0).parentNode)||e.parent().after(Me.MARKERS),S(e.get(0).parentNode).remove()):(A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0))||e.after(Me.MARKERS),e.remove()),A.html.fillEmptyBlocks(),A.selection.restore()),A.undo.saveStep())}function ie(e){var t=e.which,a=document.getElementsByClassName("fs-transforms-container"),i=!1;if(a&&a.length){var r,n=Ke(a);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.childNodes&&o.childNodes.length&&(i=!0)}}catch(p){n.e(p)}finally{n.f()}}if(i&&(C=null),C&&(t==Me.KEYCODE.BACKSPACE||t==Me.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),ae(),!1;if(C&&t==Me.KEYCODE.ESC){var s=C;return ce(!0),A.selection.setAfter(s.get(0)),A.selection.restore(),e.preventDefault(),!1}if(!C||t!=Me.KEYCODE.ARROW_LEFT&&t!=Me.KEYCODE.ARROW_RIGHT)return C&&t===Me.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),ce(!0),!1):C&&t!=Me.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var l=C.get(0);return ce(!0),t==Me.KEYCODE.ARROW_LEFT?A.selection.setBefore(l):A.selection.setAfter(l),A.selection.restore(),e.preventDefault(),!1}function re(e){if(e&&"IMG"==e.tagName){if(A.node.hasClass(e,"fr-uploading")||A.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):A.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&A.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)re(i[r])}function ne(e){if(!1===A.events.trigger("image.beforePasteUpload",[e]))return S(e).removeAttr("data-fr-image-pasted"),!1;C=S(e),D(),n(),P(),C.on("load",function(){var t=[];D(),S(A.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&P(),S(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&S(this).off("load")});for(var t=S(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));H([A.browser.safari&&!A.opts.imageUploadURL?new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"")}):new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],C)}function oe(){A.opts.imagePaste?A.$el.find("img[data-fr-image-pasted]").each(function(e,a){if(A.opts.imagePasteProcess){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),S(a).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),he(S(a),A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign)}if(0===a.src.indexOf("data:"))ne(a);else if(0===a.src.indexOf("blob:")||0===a.src.indexOf("http")&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var e=A.o_doc.createElement("CANVAS"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.drawImage(this,0,0),setTimeout(function(){ne(a)},0),a.src=e.toDataURL(Me.IMAGE_TYPE)},A.browser.msie&&Me.IMAGE_ALLOW_REGEX.test(a.src)&&(Me.IMAGE_TYPE="image/"+a.src.split(Me.IMAGE_ALLOW_REGEX)[1]),i.src=(0===a.src.indexOf("blob:")?"":"".concat(A.opts.imageCORSProxy,"/"))+a.src,0!==a.src.indexOf("blob:")&&A.undo.saveStep()}else 0!==a.src.indexOf("http")||0===a.src.indexOf("https://mail.google.com/mail")?(A.selection.save(),S(a).remove(),A.selection.restore()):S(a).removeAttr("data-fr-image-pasted")}):A.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=A.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=A.opts.imageResizeWithPercent?"%":"px"),A.undo.saveStep(),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=A.$el.find('img[data-fr-image-pasted="true"]');i&&he(i,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}function le(e,t){var a=new FileReader;a.onload=function i(e){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=A.$el.find('img[data-fr-image-pasted="true"]');a&&he(a,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function pe(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"";A.browser.mozilla&&(""===t||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(t))&&(t=A.win.localStorage.getItem("fr-copied-html"));var a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a&&!A.opts.imageUploadURL){if(!a)return!1;var i=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var n=0;n<e.clipboardData.items.length;n++)if(r=e.clipboardData.items[n].getAsFile()){Me.IMAGE_TYPE=r.type;break}if(r)return le(r,i),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(o),!1}}}function fe(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function ge(e){if("false"==S(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Me.INSTANCES.length;t++)Me.INSTANCES[t]!=A&&Me.INSTANCES[t].events.trigger("image.hideResizer");A.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur()),A.opts.iframe&&A.size.syncIframe(),C=S(this),we(),D(),n(),A.browser.msie?(A.popups.areVisible()&&A.events.disableBlur(),A.win.getSelection&&(A.win.getSelection().removeAllRanges(),A.win.getSelection().addRange(A.doc.createRange()))):A.selection.clear(),A.helpers.isIOS()&&(A.events.disableBlur(),A.$el.blur()),A.button.bulkRefresh(),A.events.trigger("video.hideResizer")}function ce(e){C&&(function t(){return de}()||!0===e)&&(A.toolbar.enable(),p.removeClass("fr-active"),A.popups.hideAll(),C=null,me(),f=null,g&&g.hide())}r[i]="Image cannot be loaded from the passed link.",r[c]="No link in upload response.",r[d]="Error during file upload.",r[u]="Parsing response failed.",r[R]="File is too large.",r[U]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var de=!(r[8]="Image file is corrupted.");function ue(){de=!0}function me(){de=!1}function he(e,t,a){if(!A.opts.htmlUntouched&&A.opts.useClasses)e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]));else if("inline"==t)if(e.css({display:"inline-block",verticalAlign:"bottom",margin:A.opts.imageDefaultMargin}),"center"==a)e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*A.opts.imageDefaultMargin,"px)"),textAlign:"center"});else if("left"==a){var i="0px",r=e.parent("span.fr-img-caption").get(0);r||(r=e.parent().get(0)),r&&"li"===r.tagName.toLowerCase()?i="20px":r&&"p"===r.tagName.toLowerCase()&&(i="15px"),e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"left",marginRight:i})}else e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"right"});else"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(A.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ve(e){if(void 0===e&&(e=Ce()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function be(e){void 0===e&&(e=Ce());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ye(){var e=A.popups.get("image.insert");e||(e=X()),A.popups.isVisible("image.insert")||(k(),A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$sc));var t=Ce(),a=t&&t.outerWidth()/2;Se()&&(t=t.find(".fr-img-wrap"),a=C.outerWidth()/2);var i,r=t.offset().left+a,n=t.outerHeight(!0);A.opts.iframe&&Se()&&(n=C?C.outerHeight():0),i=0<A.$el.find("img[data-fr-image-pasted]").length?A.$wp.offset().top-A.helpers.scrollTop()+A.$wp.height():t.offset().top+t.outerHeight(),A.popups.show("image.insert",r,i,n,!0)}function we(){if(C){A.events.disableBlur(),A.selection.clear();var e=A.doc.createRange();e.selectNode(C.get(0)),A.browser.msie&&e.collapse(!0),A.selection.get().addRange(e),A.events.enableBlur()}}function Ae(){return C}function Ce(){return Se()?C.parents(".fr-img-caption").first():C}function Se(){return!!C&&0<C.parents(".fr-img-caption").length}function Ee(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Re(){var n;(function e(){A.events.$on(A.$el,A._mousedown,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;A.helpers.isMobile()||A.selection.clear(),t=!0,A.popups.areVisible()&&A.events.disableBlur(),A.browser.msie&&(A.events.disableBlur(),A.$el.attr("contenteditable",!1)),A.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),A.events.$on(A.$el,A._mousedown,".fr-img-caption .fr-inner",function(e){A.core.hasFocus()||A.events.focus(),e.stopPropagation()}),A.events.$on(A.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===A.opts.toolbarInline&&(A.toolbar.hide(),e.stopPropagation())}),A.events.$on(A.$el,A._mousedown,'img:not([contenteditable="false"])',function(e){var t=this;A.browser.mozilla&&3==e.which&&(S(this).attr("contenteditable",!1),setTimeout(function(){S(t).removeAttr("contenteditable")},200))}),A.events.$on(A.$el,A._mouseup,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),A.browser.msie&&(A.$el.attr("contenteditable",!0),A.events.enableBlur()))}),A.events.on("keyup",function(e){if(e.shiftKey&&""===A.selection.text().replace(/\n/g,"")&&A.keys.isArrow(e.which)){var t=A.selection.element(),a=A.selection.endElement();t&&"IMG"==t.tagName?z(S(t)):a&&"IMG"==a.tagName&&z(S(a))}},!0),A.events.on("drop",V),A.events.on("element.beforeDrop",F),A.events.on("mousedown window.mousedown",ue),A.events.on("window.touchmove",me),A.events.on("mouseup window.mouseup",function(){if(C&&!A.helpers.isMobile())return ce(),!1;me()}),A.events.on("touchstart touchend",function(){if(C&&A.helpers.isMobile())return ce(),!1;me()}),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&ce()}),A.events.on("image.resizeEnd",function(){A.opts.iframe&&A.size.syncIframe()}),A.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){ce(!(t=!1))}),A.events.on("modals.hide",function(){C&&(we(),A.selection.clear())}),A.events.on("image.resizeEnd",function(){A.win.getSelection&&z(C)}),A.events.on("filestack-init",function(){X()}),A.events.on("filestack-init-edit",function(){for(var e=A.$(".fr-popup"),t=e.length-1;0<=t;t--)e[t].parentElement.removeChild(e[t]);N()}),A.opts.imageAddNewLine&&A.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!A.node.isElement(t);)t=A.node.isLastSibling(t)?t.parentNode:null;A.node.isElement(t)&&(A.opts.enter===Me.ENTER_BR?e.after("<br>"):S(A.node.blockParent(e.get(0))).after("<".concat(A.html.defaultTag(),"><br></").concat(A.html.defaultTag(),">")))})})(),"IMG"==A.el.tagName&&A.$el.addClass("fr-view"),A.events.$on(A.$el,A.helpers.isMobile()&&!A.helpers.isWindowsPhone()?"touchend":"click","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',ge),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),A.events.$on(A.$el,"touchmove",function(){a=!0})),A.$wp?(A.events.on("window.keydown keydown",ie,!0),A.events.on("keyup",function(e){if(C&&e.which==Me.KEYCODE.ENTER)return!1},!0),A.events.$on(A.$el,"keydown",function(){var e=A.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&A.node.isLastSibling(e))&&(e=e.parentNode),A.node.hasClass(e,"fr-inner")||(A.node.hasClass(e,"fr-img-caption")||(e=S(e).parents(".fr-img-caption").get(0)),A.node.hasClass(e,"fr-img-caption")&&(A.opts.trackChangesEnabled||S(e).after(Me.INVISIBLE_SPACE+Me.MARKERS),A.selection.restore()))})):A.events.$on(A.$win,"keydown",ie),A.events.on("toolbar.esc",function(){if(C){if(A.$wp)A.events.disableBlur(),A.events.focus();else{var e=C;ce(!0),A.selection.setAfter(e.get(0)),A.selection.restore()}return!1}},!0),A.events.on("toolbar.focusEditor",function(){if(C)return!1},!0),A.events.on("window.cut window.copy",function(e){if(C&&A.popups.isVisible("image.edit")&&!A.popups.get("image.edit").find(":focus").length){var t=Ce();Se()?(t.before(Me.START_MARKER),t.after(Me.END_MARKER),A.selection.restore(),A.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(we(),A.paste.saveCopiedText(C.get(0).outerHTML,C.attr("alt"))),"copy"==e.type?setTimeout(function(){z(C)}):(ce(!0),A.undo.saveStep(),setTimeout(function(){A.undo.saveStep()},0))}},!0),A.browser.msie&&A.events.on("keydown",function(e){if(!A.selection.isCollapsed()||!C)return!0;var t=e.which;t==Me.KEYCODE.C&&A.keys.ctrlKey(e)?A.events.trigger("window.copy"):t==Me.KEYCODE.X&&A.keys.ctrlKey(e)&&A.events.trigger("window.cut")}),A.events.$on(S(A.o_win),"keydown",function(e){if(A.opts.pluginsEnabled.includes("filestack")&&A.opts.iframe){var t=document.getElementsByClassName("fs-transforms-container"),a=!1;if(t&&t.length){var i,r=Ke(t);try{for(r.s();!(i=r.n()).done;){var n=i.value;n.childNodes&&n.childNodes.length&&(a=!0)}}catch(s){r.e(s)}finally{r.f()}}a&&(C=null)}var o=e.which;if(C&&o==Me.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),A.events.$on(A.$win,"keydown",function(e){var t=e.which;C&&C.hasClass("fr-uploading")&&t==Me.KEYCODE.ESC&&C.trigger("abortUpload")}),A.events.on("destroy",function(){C&&C.hasClass("fr-uploading")&&C.trigger("abortUpload")}),A.events.on("paste.before",pe),A.events.on("paste.beforeCleanup",fe),A.events.on("paste.after",oe),A.events.on("html.set",v),A.events.on("html.inserted",v),v(),A.events.on("destroy",function(){s=[]}),A.events.on("html.processGet",re),A.opts.imageOutputSize&&A.events.on("html.beforeGet",function(){n=A.el.querySelectorAll("img");for(var e=0;e<n.length;e++){var t=parseFloat(S(n[e]).css("padding-left"))+parseFloat(S(n[e]).css("padding-right")),a=S(n[e]).width()-t,i=n[e].style.width||a,r=n[e].style.height||S(n[e]).height();i&&n[e].setAttribute("width","".concat(i).replace(/px/,"")),r&&n[e].setAttribute("height","".concat(r).replace(/px/,""))}}),A.opts.iframe&&A.events.on("image.loaded",A.size.syncIframe),A.$wp&&(b(),A.events.on("contentChanged",b)),A.events.$on(S(A.o_win),"orientationchange.image",function(){setTimeout(function(){C&&z(C)},100)}),N(!0),X(!0),ee(!0),J(!0),A.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return ae(e),!1})},showInsertPopup:function Ue(){var e=A.$tb.find('.fr-command[data-cmd="insertImage"]'),t=A.popups.get("image.insert");if(t||(t=X()),k(),!t.hasClass("fr-active"))if(A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$tb),e.isVisible()){var a=A.button.getPosition(e),i=a.left,r=a.top;A.popups.show("image.insert",i,r,e.outerHeight())}else A.position.forSelection(t),A.popups.show("image.insert")},showLayer:function De(e){var t,a,i=A.popups.get("image.insert");if(C||A.opts.toolbarInline){if(C){var r=Ce(),n=0;Se()&&(r=r.find(".fr-img-wrap"),n=C.outerWidth()/2),a=r.offset().top+r.outerHeight(),t=r.offset().left+n}}else{var o=A.$tb.find('.fr-command[data-cmd="insertImage"]');t=o.offset().left,a=o.offset().top+(A.opts.toolbarBottom?10:o.outerHeight()-10)}!C&&A.opts.toolbarInline&&(a=i.offset().top-A.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),A.popups.show("image.insert",t,a,C?C.outerHeight():0,Se()),A.accessibility.focusPopup(i)},refreshUploadButton:function xe(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function Te(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:H,insertByURL:function $e(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){P(),B(A.language.translate("Loading image"));var t=e.val().trim();if(A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy&&A.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?H([new Blob([this.response],{type:this.response.type||"image/png"})],C):I(i)},a.onerror=function(){_(t,!0,[],C)},a.open("GET","".concat(A.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else _(t,!0,[],C);e.val(""),e.blur()}},align:function Ie(e){var t=Ce();t.removeClass("fr-fir fr-fil"),!A.opts.htmlUntouched&&A.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):he(t,be(),e),we(),D(),n(),A.selection.clear()},refreshAlign:function Ne(e){C&&e.find("> *").first().replaceWith(A.icon.create("image-align-".concat(ve())))},refreshAlignOnShow:function Pe(e,t){C&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ke(e){var t=Ce();t.removeClass("fr-dii fr-dib"),!A.opts.htmlUntouched&&A.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):he(t,e,ve()),we(),D(),n(),A.selection.clear()},refreshDisplayOnShow:function Be(e,t){C&&t.find('.fr-command[data-param1="'.concat(be(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ye,back:function e(){C?(A.events.disableBlur(),S(".fr-popup input:focus").blur(),z(C)):(A.events.disableBlur(),A.selection.restore(),A.events.enableBlur(),A.popups.hide("image.insert"),A.toolbar.showInline())},get:Ae,getEl:Ce,insert:_,showProgressBar:P,remove:ae,hideProgressBar:k,applyStyle:function Oe(e,t,a){if(void 0===t&&(t=A.opts.imageStyles),void 0===a&&(a=A.opts.imageMultipleStyles),!C)return!1;var i=Ce();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Ye(t[e])?(i.removeAttr("style"),i.css(t[e].style)):(i.toggleClass(e),Se()&&C.hasClass(e)&&C.removeClass(e)),z(C)},showAltPopup:j,showSizePopup:Z,setAlt:function ze(e){if(C){var t=A.popups.get("image.alt");C.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),z(C)}},setSize:function Le(e,t){if(C){var a=A.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;C.removeAttr("width").removeAttr("height"),e.match(i)?C.css("width",e):C.css("width",""),t.match(i)?C.css("height",t):C.css("height",""),Se()&&(C.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?C.parents(".fr-img-caption").css("width",e):C.parents(".fr-img-caption").css("width",""),t.match(i)?C.parents(".fr-img-caption").css("height",t):C.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),z(C)}},toggleCaption:function _e(){var e;if(C&&!Se()){(e=C).parent().is("a")&&(e=C.parent());var t,a,i=C.parents("ul")&&0<C.parents("ul").length?C.parents("ul"):C.parents("ol")&&0<C.parents("ol").length?C.parents("ol"):[];if(0<i.length){var r=i.find("li").length,n=C.parents("li"),o=document.createElement("li");r-1===n.index()&&(i.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=A.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":C.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(A.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+C.attr("class")+'" style="'+(A.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),C.after('<span class="fr-inner"'.concat(A.browser.mozilla?"":' contenteditable="true"',">").concat(Me.START_MARKER).concat(A.language.translate("Image Caption")).concat(Me.END_MARKER,"</span>")),C.parents(".fr-img-caption").css("width",s);var l=C.parents(".fr-img-space-wrap").length;1==l?Ee(document.querySelector(".fr-img-space-wrap")):1<l&&(Ee(document.querySelector(".fr-img-space-wrap")),Ee(document.querySelector(".fr-img-space-wrap2"))),ce(!0),A.selection.restore()}else{if(e=Ce(),C.insertBefore(e),null!==e[0].querySelector("a")){for(var p,f=e[0].querySelector("a"),g=document.createElement("a"),c=0,d=f.attributes,u=d.length;c<u;c++)p=d[c],g.setAttribute(p.nodeName,p.nodeValue);C.wrap(g)}C.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove();var m=C.parents(".fr-img-space-wrap").length;1==m?Ee(document.querySelector(".fr-img-space-wrap")):1<m&&(Ee(document.querySelector(".fr-img-space-wrap")),Ee(document.querySelector(".fr-img-space-wrap2"))),z(C)}},hasCaption:Se,exitEdit:ce,edit:z}},Me.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),Me.RegisterShortcut(Me.KEYCODE.P,"insertImage",null,"P"),Me.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),Me.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),Me.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),Me.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),Me.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),Me.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),Me.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),Me.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),Me.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),Me.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Me.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Me.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),Me.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Me.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Me.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),Me.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Me.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),Me.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),Me.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),Me.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),Me.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),Me.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),Me.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),Me.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Ye(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),Me.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),Me.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),Me.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),Me.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Me.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),Me.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),Me.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),Me.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(Me){"use strict";function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=Array(t);a<t;a++)i[a]=e[a];return i}function Ke(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function l(e,t){if(e){if("string"==typeof e)return p(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){s=!0,n=e},f:function(){try{o||null==a["return"]||a["return"]()}finally{if(s)throw n}}}}function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Me=Me&&Me.hasOwnProperty("default")?Me["default"]:Me,Object.assign(Me.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Me.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),Me.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,Me.PLUGINS.image=function(A){var C,p,f,g,s,a,S=A.$,E="https://i.froala.com/upload",t=!1,i=1,c=2,d=3,u=4,R=5,U=6,r={};function m(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),C&&e.val(C.attr("src")),e.trigger("change")}function o(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}function n(){var e=A.popups.get("image.edit");if(e||(e=N()),e){var t=C;A.popups.setContainer("image.edit",A.$sc),A.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t&&o(t),r=A.$wp&&o(A.$wp);r||(r=i);var n=0;A.opts.iframe?((n=A.$wp.scrollTop()+e.outerHeight())<t.get(0).getBoundingClientRect().top&&(n=t.get(0).getBoundingClientRect().top),n>t.get(0).getBoundingClientRect().top+t.height()&&(n=t.get(0).getBoundingClientRect().top+t.height())):n=r<i?i:A.$wp&&i+t.height()<r+A.$wp.height()?i+t.height():r+e.outerHeight(),C.hasClass("fr-uploading")?P():A.popups.show("image.edit",a,n,1,!0)}}function h(){k()}function l(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ve(e);he(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function v(){for(var e,t="IMG"==A.el.tagName?[A.el]:A.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=S(t[a]);!A.opts.htmlUntouched&&A.opts.useClasses?((A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ve(e)[0])),e.addClass("fr-di".concat(be(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),A.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):A.opts.htmlUntouched||A.opts.useClasses||(A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&l(i),A.opts.iframe&&i.on("load",A.size.syncIframe)}}function b(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(A.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),S(a[t]).toggleClass("fr-draggable",A.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&A.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;A.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!A.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)i.indexOf(s[t].getAttribute("src"))<0&&A.events.trigger("image.removed",[S(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&A.events.trigger("image.loaded",[S(a[t])])}s=a}function x(){if(p||function o(){var e;A.shared.$image_resizer?(p=A.shared.$image_resizer,g=A.shared.$img_overlay,A.events.on("destroy",function(){S("body").first().append(p.removeClass("fr-active"))},!0)):(A.shared.$image_resizer=S(document.createElement("div")).attr("class","fr-image-resizer"),p=A.shared.$image_resizer,A.events.$on(p,"mousedown",function(e){e.stopPropagation()},!0),A.opts.imageResize&&(p.append(y("nw")+y("ne")+y("sw")+y("se")),A.shared.$img_overlay=S(document.createElement("div")).attr("class","fr-image-overlay"),g=A.shared.$img_overlay,e=p.get(0).ownerDocument,S(e).find("body").first().append(g)));A.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null,A.opts.imageResize&&(g.remove(),g=null)},!0),A.helpers.isMobile()||A.events.$on(S(A.o_win),"resize",function(){C&&!C.hasClass("fr-uploading")?ce(!0):C&&(x(),ye(),P(!1))});if(A.opts.imageResize){e=p.get(0).ownerDocument,A.events.$on(p,A._mousedown,".fr-handler",D),A.events.$on(S(e),A._mousemove,T),A.events.$on(S(e.defaultView||e.parentWindow),A._mouseup,$),A.events.$on(g,"mouseleave",$);var i=1,r=null,n=0;A.events.on("keydown",function(e){if(C){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==Me.KEYCODE.EQUALS||A.browser.mozilla&&a==Me.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=te.call(this,e,1,1,i):(a==Me.KEYCODE.HYPHEN||A.browser.mozilla&&a==Me.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=te.call(this,e,2,-1,i):A.keys.ctrlKey(e)||a!=Me.KEYCODE.ENTER||(C.before("<br>"),z(C)),r=a,n=e.timeStamp}},!0),A.events.on("keyup",function(){i=1})}}(),!C)return!1;var e=A.$wp||A.$sc;e.append(p),p.data("instance",A);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=A.helpers.getPX(e.css("border-left-width")),t-=A.helpers.getPX(e.css("border-top-width")),A.$el.is("img")&&A.$sc.is("body")&&(a=t=0);var i=Ce();Se()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;A.opts.iframe&&(r=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),n=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),p.css("top",(A.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(A.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function y(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function w(e){Se()&&C.parents(".fr-img-caption").css("width",e),C.css("width",e)}function D(e){if(!A.core.sameInstance(p))return!0;if(e.preventDefault(),e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;A.undo.canDo()||A.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=A.$oel.get(0),i=a.ownerDocument,r=i.defaultView||i.parentWindow,n=!1;try{n=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(l){}n&&r.frameElement&&(t+=A.helpers.getPX(S(a).offset().left)+r.frameElement.clientLeft)}(f=S(this)).data("start-x",t),f.data("start-width",C.width()),f.data("start-height",C.height());var o=C.width();if(A.opts.imageResizeWithPercent){var s=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;o=(o/S(s).outerWidth()*100).toFixed(2)+"%"}w(o),g.show(),A.popups.hideAll(),me()}function T(e){if(!A.core.sameInstance(p))return!0;var t;if(f&&C){if(e.preventDefault(),A.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-f.data("start-x"),r=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),A.opts.imageResizeWithPercent){var n=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;r=((r+i)/S(n).outerWidth()*100).toFixed(2),A.opts.imageRoundPercent&&(r=Math.round(r)),w("".concat(r,"%")),(t=Se()?(A.helpers.getPX(C.parents(".fr-img-caption").css("width"))/S(n).outerWidth()*100).toFixed(2):(A.helpers.getPX(C.css("width"))/S(n).outerWidth()*100).toFixed(2))===r||A.opts.imageRoundPercent||w("".concat(t,"%")),C.css("height","").removeAttr("height")}else r+i>=A.opts.imageMinWidth&&(w(r+i),t=Se()?A.helpers.getPX(C.parents(".fr-img-caption").css("width")):A.helpers.getPX(C.css("width"))),t!==r+i&&w(t),((C.attr("style")||"").match(/(^height:)|(; *height:)/)||C.attr("height"))&&(C.css("height",f.data("start-height")*C.width()/f.data("start-width")),C.removeAttr("height"));x(),A.events.trigger("image.resize",[Ae()])}}function $(e){if(!A.core.sameInstance(p))return!0;if(f&&C){if(e&&e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;f=null,g.hide(),x(),n(),A.undo.saveStep(),A.events.trigger("image.resizeEnd",[Ae()])}else p.removeClass("fr-active")}function I(e,t,a){A.edit.on(),C&&C.addClass("fr-error"),r[e]?O(A.language.translate(r[e])):O(A.language.translate("Something went wrong. Please try again.")),!C&&a&&ae(a),A.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function N(e){if(e)return A.$wp&&A.events.$on(A.$wp,"scroll.image-edit",function(){C&&A.popups.isVisible("image.edit")&&(A.events.disableBlur(),n())}),!0;var t="";if(0<A.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons">\n '.concat(A.button.buildList(A.opts.imageEditButtons),"\n </div>")};return A.popups.create("image.edit",a)}return!1}function P(e){var t=A.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),C){var a=Ce();A.popups.setContainer("image.insert",A.$sc);var i=a.offset().left,r=a.offset().top+a.height();A.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&B(A.language.translate("Uploading"),0)}function k(e){var t=A.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||A.$el.find("img.fr-error").length)){if(A.events.focus(),A.$el.find("img.fr-error").length&&(A.$el.find("img.fr-error").remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&C){var a=C;ce(!0),A.selection.setAfter(a.get(0)),A.selection.restore()}A.popups.hide("image.insert")}}function B(e,t){var a=A.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function O(e){P();var t=A.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),A.events.disableBlur(),a.focus()}function z(e){ge.call(e.get(0))}function L(){var e=S(this);A.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),z(e),A.events.trigger("image.loaded",[e])}function _(o,e,s,l,p){l&&"string"==typeof l&&(l=A.$(l)),A.edit.off(),B(A.language.translate("Loading image")),e&&(o=A.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){A.undo.canDo()||l.hasClass("fr-uploading")||A.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),A.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),!A.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||A.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")?e.removeAttr(n.nodeName):s&&s.hasOwnProperty(n.nodeName)&&e.removeAttr(n.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",L),e.attr("src",o),A.edit.on(),b(!1),l[0].src!=o&&A.selection.restore(),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger(a?"image.replaced":"image.inserted",[e,p])}else(e=W(o,s,L))&&(b(!1),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger("image.inserted",[e,p]))},t.onerror=function(){I(i)},P(A.language.translate("Loading image")),t.src=o}function M(e,t,a){B(A.language.translate("Loading image"));var i=this.status,r=this.response,n=this.responseXML,o=this.responseText;try{if(A.opts.imageUploadToS3||A.opts.imageUploadToAzure)if(201==i){var s;if(A.opts.imageUploadToAzure){if(!1===A.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return A.edit.on(),!1;s=t}else s=function p(e){try{var t=S(e).find("Location").text(),a=S(e).find("Key").text();return!1===A.events.trigger("image.uploadedToS3",[t,a,e],!0)?(A.edit.on(),!1):t}catch(i){return I(u,e),!1}}(n);s&&_(s,!1,[],e,r||n)}else I(u,r||n,e);else if(200<=i&&i<300){var l=function f(e){try{if(!1===A.events.trigger("image.uploaded",[e],!0))return A.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(c,e),!1)}catch(a){return I(u,e),!1}}(o);l&&_(l.link,!1,l,e,r||o)}else I(d,r||o,e)}catch(g){I(u,r||o,e)}}function K(){I(u,this.response||this.responseText||this.responseXML)}function Y(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;B(A.language.translate("Uploading"),t)}}function W(e,t,a){var i,r=S(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),r.attr("".concat(i),t[i]));var n=A.opts.imageDefaultWidth;n&&"auto"!=n&&(n=A.opts.imageResizeWithPercent?"100%":"".concat(n,"px")),r.attr("style",n?"width: ".concat(n,";"):""),he(r,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.imageSplitHTML?A.markers.split():A.markers.insert(),A.html.wrap();var o=A.$el.find(".fr-marker");if(o.length)(o.parent().is("hr")||o.parent().is("IMG"))&&o.parent().after(o),A.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r);else{if(A.opts.trackChangesEnabled)return k(!0),!1;A.$el.append(r)}return A.selection.clear(),r}function G(){A.edit.on(),k(!0)}function H(e,t){if(void 0!==e&&0<e.length){if(!1===A.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if(!(null!==A.opts.imageUploadURL&&A.opts.imageUploadURL!=E||A.opts.imageUploadToS3||A.opts.imageUploadToAzure))return function y(r,n){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),n&&n.data("fr-old-src",n.attr("src")),A.image.insert(e,!1,null,n)}else A.image.insert(e,null,null,A.image.get())},P(),o.readAsDataURL(r)}(i,t||C),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>A.opts.imageMaxSize)return I(R),!1;if(A.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(U),!1;if(A.drag_support.formdata&&(a=A.drag_support.formdata?new FormData:null),a){var r;if(!1!==A.opts.imageUploadToS3)for(r in a.append("key",A.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),A.opts.imageUploadToS3.params)A.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,A.opts.imageUploadToS3.params[r]);for(r in A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,A.opts.imageUploadParams[r]);a.append(A.opts.imageUploadParam,i,i.name);var n,o,s=A.opts.imageUploadURL,l=A.opts.imageUploadMethod;A.opts.imageUploadToS3&&(s=A.opts.imageUploadToS3.uploadURL?A.opts.imageUploadToS3.uploadURL:"https://".concat(A.opts.imageUploadToS3.region,".amazonaws.com/").concat(A.opts.imageUploadToS3.bucket)),A.opts.imageUploadToAzure&&(n=s=A.opts.imageUploadToAzure.uploadURL?"".concat(A.opts.imageUploadToAzure.uploadURL,"/").concat(i.name):encodeURI("https://".concat(A.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.imageUploadToAzure.container,"/").concat(i.name)),A.opts.imageUploadToAzure.SASToken&&(s+=A.opts.imageUploadToAzure.SASToken),l="PUT");var p=A.core.getXHR(s,l);if(A.opts.imageUploadToAzure){var f=(new Date).toUTCString();if(!A.opts.imageUploadToAzure.SASToken&&A.opts.imageUploadToAzure.accessKey){var g=A.opts.imageUploadToAzure.account,c=A.opts.imageUploadToAzure.container;if(A.opts.imageUploadToAzure.uploadURL){var d=A.opts.imageUploadToAzure.uploadURL.split("/");c=d.pop(),g=d.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),m=encodeURI("/"+g+"/"+c+"/"+i.name),h=l+"\n\n\n"+i.size+"\n\n"+i.type+"\n\n\n\n\n\n\n"+u+"\n"+m,v=A.cryptoJSPlugin.cryptoJS.HmacSHA256(h,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.imageUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+g+":"+v;o=v,p.setRequestHeader("Authorization",b)}for(r in p.setRequestHeader("x-ms-version","2019-07-07"),p.setRequestHeader("x-ms-date",f),p.setRequestHeader("Content-Type",i.type),p.setRequestHeader("x-ms-blob-type","BlockBlob"),A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(r)&&p.setRequestHeader(r,A.opts.imageUploadParams[r]);for(r in A.opts.imageUploadToAzure.params)A.opts.imageUploadToAzure.params.hasOwnProperty(r)&&p.setRequestHeader(r,A.opts.imageUploadToAzure.params[r])}!function w(t,a,i,r,n,o){function s(){var e=S(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),A.placeholder.refresh(),z(e),x(),P(),A.edit.off(),t.onload=function(){M.call(t,e,n,o)},t.onerror=K,t.upload.onprogress=Y,t.onabort=G,S(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),ce(!0))}),t.send(A.opts.imageUploadToAzure?i:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),S(this).off("error")}),A.edit.on(),A.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):W(e,null,s)},l.readAsDataURL(i)}(p,a,i,t||C,n,o)}}}function F(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!A.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;A.markers.remove(),A.markers.insertAtPoint(e.originalEvent),A.$el.find(".fr-marker").replaceWith(Me.MARKERS),0===A.$el.find(".fr-marker").length&&A.selection.setAtEnd(A.el),A.popups.hideAll();var i=A.popups.get("image.insert");i||(i=X()),A.popups.setContainer("image.insert",A.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(A.opts.iframe){var o=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),s=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"));n+=A.$iframe.offset().top+o,r+=A.$iframe.offset().left+s}return A.popups.show("image.insert",r,n),P(),0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(ce(!0),H(t.files)):I(U),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return A.popups.onRefresh("image.insert",m),A.popups.onHide("image.insert",h),!0;var t,a,i="";A.opts.imageUpload||-1===A.opts.imageInsertButtons.indexOf("imageUpload")||A.opts.imageInsertButtons.splice(A.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=A.button.buildList(A.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var n=A.opts.imageInsertButtons.indexOf("imageUpload"),o=A.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=n&&(t=" fr-active",0<=o&&o<n&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(A.id,'"><strong>').concat(A.language.translate("Drop image"),"</strong><br>(").concat(A.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(A.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(A.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=n&&n<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(A.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(A.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>"));var p={buttons:i,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=A.opts.imageInsertButtons.length&&(a=A.popups.create("image.insert",p)),A.$wp&&A.events.$on(A.$wp,"scroll",function(){C&&A.popups.isVisible("image.insert")&&ye()}),function f(i){A.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return S(this).addClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return S(this).removeClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),S(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||A;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){S(this).trigger("click")},!0),A.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||A;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,C)}S(this).val("")},!0)}(a),a}function q(){C&&A.popups.get("image.alt").find("input").val(C.attr("alt")||"").trigger("change")}function j(){var e=A.popups.get("image.alt");e||(e=J()),k(),A.popups.refresh("image.alt"),A.popups.setContainer("image.alt",A.$sc);var t=Ce(),a=t.outerWidth()/2;Se()&&(t=t.find(".fr-img-wrap"),a=C.outerWidth()/2);var i=t.offset().left+a,r=t.offset().top+t.outerHeight(),n=t.outerHeight();A.opts.iframe&&Se()&&(n=C?C.outerHeight():0),A.popups.show("image.alt",i,r,n,!0)}function J(e){if(e)return A.popups.onRefresh("image.alt",q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(A.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.alt",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-alt",function(){C&&A.popups.isVisible("image.alt")&&j()}),a}function Q(){var e=A.popups.get("image.size"),t=C.get(0).style.height?C.get(0).style.height:"auto",a=C.get(0).style.width?C.get(0).style.width:"auto";if(C)if(Se()){var i=C.parent();i.get(0).style.width||(i=C.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function Z(){var e=A.popups.get("image.size");e||(e=ee()),k(),A.popups.refresh("image.size"),A.popups.setContainer("image.size",A.$sc);var t=Ce(),a=t.outerWidth()/2;Se()&&(t=t.find(".fr-img-wrap"),a=C.outerWidth()/2);var i=t.outerHeight();A.opts.iframe&&Se()&&(i=C?C.outerHeight():0);var r=t.offset().left+a,n=t.offset().top+t.outerHeight();A.popups.show("image.size",r,n,i,!0)}function ee(e){if(e)return A.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(A.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(A.id,'" type="text" name="height" placeholder="').concat(A.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.size",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-size",function(){C&&A.popups.isVisible("image.size")&&Z()}),a}function te(e,t,a,i){return e.pageX=t,D.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),T.call(this,e),$.call(this,e),++i}function ae(e){if(e=e||Ce(),A.opts.trackChangesEnabled&&!A.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return A.track_changes.removeSpecialItem(e),A.popups.hideAll(),void ce(!0);e&&!1!==A.events.trigger("image.beforeRemove",[e])&&(A.popups.hideAll(),we(),ce(!0),A.undo.canDo()||A.undo.saveStep(),e.get(0)==A.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(A.selection.setBefore(e.get(0).parentNode)||A.selection.setAfter(e.get(0).parentNode)||e.parent().after(Me.MARKERS),S(e.get(0).parentNode).remove()):(A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0))||e.after(Me.MARKERS),e.remove()),A.html.fillEmptyBlocks(),A.selection.restore()),A.undo.saveStep())}function ie(e){var t=e.which,a=document.getElementsByClassName("fs-transforms-container"),i=!1;if(a&&a.length){var r,n=Ke(a);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.childNodes&&o.childNodes.length&&(i=!0)}}catch(p){n.e(p)}finally{n.f()}}if(i&&(C=null),C&&(t==Me.KEYCODE.BACKSPACE||t==Me.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),ae(),!1;if(C&&t==Me.KEYCODE.ESC){var s=C;return ce(!0),A.selection.setAfter(s.get(0)),A.selection.restore(),e.preventDefault(),!1}if(!C||t!=Me.KEYCODE.ARROW_LEFT&&t!=Me.KEYCODE.ARROW_RIGHT)return C&&t===Me.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),ce(!0),!1):C&&t!=Me.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var l=C.get(0);return ce(!0),t==Me.KEYCODE.ARROW_LEFT?A.selection.setBefore(l):A.selection.setAfter(l),A.selection.restore(),e.preventDefault(),!1}function re(e){if(e&&"IMG"==e.tagName){if(A.node.hasClass(e,"fr-uploading")||A.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):A.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&A.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)re(i[r])}function ne(e){if(!1===A.events.trigger("image.beforePasteUpload",[e]))return S(e).removeAttr("data-fr-image-pasted"),!1;C=S(e),x(),n(),P(),C.on("load",function(){var t=[];x(),S(A.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&P(),S(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&S(this).off("load")});for(var t=S(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));H([A.browser.safari&&!A.opts.imageUploadURL?new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"")}):new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],C)}function oe(){A.opts.imagePaste?A.$el.find("img[data-fr-image-pasted]").each(function(e,a){if(A.opts.imagePasteProcess){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),S(a).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),he(S(a),A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign)}if(0===a.src.indexOf("data:"))ne(a);else if(0===a.src.indexOf("blob:")||0===a.src.indexOf("http")&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var e=A.o_doc.createElement("CANVAS"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.drawImage(this,0,0),setTimeout(function(){ne(a)},0),a.src=e.toDataURL(Me.IMAGE_TYPE)},A.browser.msie&&Me.IMAGE_ALLOW_REGEX.test(a.src)&&(Me.IMAGE_TYPE="image/"+a.src.split(Me.IMAGE_ALLOW_REGEX)[1]),i.src=(0===a.src.indexOf("blob:")?"":"".concat(A.opts.imageCORSProxy,"/"))+a.src,0!==a.src.indexOf("blob:")&&A.undo.saveStep()}else 0!==a.src.indexOf("http")||0===a.src.indexOf("https://mail.google.com/mail")?(A.selection.save(),S(a).remove(),A.selection.restore()):S(a).removeAttr("data-fr-image-pasted")}):A.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=A.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=A.opts.imageResizeWithPercent?"%":"px"),A.undo.saveStep(),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=A.$el.find('img[data-fr-image-pasted="true"]');i&&he(i,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}function le(e,t){var a=new FileReader;a.onload=function i(e){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=A.$el.find('img[data-fr-image-pasted="true"]');a&&he(a,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function pe(e,t){var a=t||e&&e.clipboardData;if(a&&a.items){var i=(a||window.clipboardData).getData("text/html")||"";A.browser.mozilla&&(""===i||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(i))&&(i=A.win.localStorage.getItem("fr-copied-html"));var r=(new DOMParser).parseFromString(i,"text/html").querySelector("img");if(r&&!A.opts.imageUploadURL){if(!r)return!1;var n=r.src,o=null;if(a.types&&-1!=[].indexOf.call(a.types,"text/rtf")||a.getData("text/rtf"))o=a.items[0].getAsFile();else for(var s=0;s<a.items.length;s++)if(o=a.items[s].getAsFile()){Me.IMAGE_TYPE=o.type;break}if(o)return le(o,n),!1}else{var l=null;if(a.types&&-1!=[].indexOf.call(a.types,"text/rtf")||a.getData("text/rtf"))l=a.items[0].getAsFile();else for(var p=0;p<a.items.length&&!(l=a.items[p].getAsFile());p++);if(l)return function f(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(l),!1}}}function fe(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function ge(e){if("false"==S(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Me.INSTANCES.length;t++)Me.INSTANCES[t]!=A&&Me.INSTANCES[t].events.trigger("image.hideResizer");A.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur()),A.opts.iframe&&A.size.syncIframe(),C=S(this),we(),x(),n(),A.browser.msie?(A.popups.areVisible()&&A.events.disableBlur(),A.win.getSelection&&(A.win.getSelection().removeAllRanges(),A.win.getSelection().addRange(A.doc.createRange()))):A.selection.clear(),A.helpers.isIOS()&&(A.events.disableBlur(),A.$el.blur()),A.button.bulkRefresh(),A.events.trigger("video.hideResizer")}function ce(e){C&&(function t(){return de}()||!0===e)&&(A.toolbar.enable(),p.removeClass("fr-active"),A.popups.hideAll(),C=null,me(),f=null,g&&g.hide())}r[i]="Image cannot be loaded from the passed link.",r[c]="No link in upload response.",r[d]="Error during file upload.",r[u]="Parsing response failed.",r[R]="File is too large.",r[U]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var de=!(r[8]="Image file is corrupted.");function ue(){de=!0}function me(){de=!1}function he(e,t,a){if(!A.opts.htmlUntouched&&A.opts.useClasses)e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]));else if("inline"==t)if(e.css({display:"inline-block",verticalAlign:"bottom",margin:A.opts.imageDefaultMargin}),"center"==a)e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*A.opts.imageDefaultMargin,"px)"),textAlign:"center"});else if("left"==a){var i="0px",r=e.parent("span.fr-img-caption").get(0);r||(r=e.parent().get(0)),r&&"li"===r.tagName.toLowerCase()?i="20px":r&&"p"===r.tagName.toLowerCase()&&(i="15px"),e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"left",marginRight:i})}else e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"right"});else"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(A.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ve(e){if(void 0===e&&(e=Ce()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function be(e){void 0===e&&(e=Ce());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ye(){var e=A.popups.get("image.insert");e||(e=X()),A.popups.isVisible("image.insert")||(k(),A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$sc));var t=Ce(),a=t&&t.outerWidth()/2;Se()&&(t=t.find(".fr-img-wrap"),a=C.outerWidth()/2);var i,r=t.offset().left+a,n=t.outerHeight(!0);A.opts.iframe&&Se()&&(n=C?C.outerHeight():0),i=0<A.$el.find("img[data-fr-image-pasted]").length?A.$wp.offset().top-A.helpers.scrollTop()+A.$wp.height():t.offset().top+t.outerHeight(),A.popups.show("image.insert",r,i,n,!0)}function we(){if(C){A.events.disableBlur(),A.selection.clear();var e=A.doc.createRange();e.selectNode(C.get(0)),A.browser.msie&&e.collapse(!0),A.selection.get().addRange(e),A.events.enableBlur()}}function Ae(){return C}function Ce(){return Se()?C.parents(".fr-img-caption").first():C}function Se(){return!!C&&0<C.parents(".fr-img-caption").length}function Ee(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Re(){var n;(function e(){A.events.$on(A.$el,A._mousedown,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;A.helpers.isMobile()||A.selection.clear(),t=!0,A.popups.areVisible()&&A.events.disableBlur(),A.browser.msie&&(A.events.disableBlur(),A.$el.attr("contenteditable",!1)),A.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),A.events.$on(A.$el,A._mousedown,".fr-img-caption .fr-inner",function(e){A.core.hasFocus()||A.events.focus(),e.stopPropagation()}),A.events.$on(A.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===A.opts.toolbarInline&&(A.toolbar.hide(),e.stopPropagation())}),A.events.$on(A.$el,A._mousedown,'img:not([contenteditable="false"])',function(e){var t=this;A.browser.mozilla&&3==e.which&&(S(this).attr("contenteditable",!1),setTimeout(function(){S(t).removeAttr("contenteditable")},200))}),A.events.$on(A.$el,A._mouseup,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),A.browser.msie&&(A.$el.attr("contenteditable",!0),A.events.enableBlur()))}),A.events.on("keyup",function(e){if(e.shiftKey&&""===A.selection.text().replace(/\n/g,"")&&A.keys.isArrow(e.which)){var t=A.selection.element(),a=A.selection.endElement();t&&"IMG"==t.tagName?z(S(t)):a&&"IMG"==a.tagName&&z(S(a))}},!0),A.events.on("drop",V),A.events.on("element.beforeDrop",F),A.events.on("mousedown window.mousedown",ue),A.events.on("window.touchmove",me),A.events.on("mouseup window.mouseup",function(){if(C&&!A.helpers.isMobile())return ce(),!1;me()}),A.events.on("touchstart touchend",function(){if(C&&A.helpers.isMobile())return ce(),!1;me()}),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&ce()}),A.events.on("image.resizeEnd",function(){A.opts.iframe&&A.size.syncIframe()}),A.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){ce(!(t=!1))}),A.events.on("modals.hide",function(){C&&(we(),A.selection.clear())}),A.events.on("image.resizeEnd",function(){A.win.getSelection&&z(C)}),A.events.on("filestack-init",function(){X()}),A.events.on("filestack-init-edit",function(){for(var e=A.$(".fr-popup"),t=e.length-1;0<=t;t--)e[t].parentElement.removeChild(e[t]);N()}),A.opts.imageAddNewLine&&A.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!A.node.isElement(t);)t=A.node.isLastSibling(t)?t.parentNode:null;A.node.isElement(t)&&(A.opts.enter===Me.ENTER_BR?e.after("<br>"):S(A.node.blockParent(e.get(0))).after("<".concat(A.html.defaultTag(),"><br></").concat(A.html.defaultTag(),">")))})})(),"IMG"==A.el.tagName&&A.$el.addClass("fr-view"),A.events.$on(A.$el,A.helpers.isMobile()&&!A.helpers.isWindowsPhone()?"touchend":"click","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',ge),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),A.events.$on(A.$el,"touchmove",function(){a=!0})),A.$wp?(A.events.on("window.keydown keydown",ie,!0),A.events.on("keyup",function(e){if(C&&e.which==Me.KEYCODE.ENTER)return!1},!0),A.events.$on(A.$el,"keydown",function(){var e=A.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&A.node.isLastSibling(e))&&(e=e.parentNode),A.node.hasClass(e,"fr-inner")||(A.node.hasClass(e,"fr-img-caption")||(e=S(e).parents(".fr-img-caption").get(0)),A.node.hasClass(e,"fr-img-caption")&&(A.opts.trackChangesEnabled||S(e).after(Me.INVISIBLE_SPACE+Me.MARKERS),A.selection.restore()))})):A.events.$on(A.$win,"keydown",ie),A.events.on("toolbar.esc",function(){if(C){if(A.$wp)A.events.disableBlur(),A.events.focus();else{var e=C;ce(!0),A.selection.setAfter(e.get(0)),A.selection.restore()}return!1}},!0),A.events.on("toolbar.focusEditor",function(){if(C)return!1},!0),A.events.on("window.cut window.copy",function(e){if(C&&A.popups.isVisible("image.edit")&&!A.popups.get("image.edit").find(":focus").length){var t=Ce();Se()?(t.before(Me.START_MARKER),t.after(Me.END_MARKER),A.selection.restore(),A.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(we(),A.paste.saveCopiedText(C.get(0).outerHTML,C.attr("alt"))),"copy"==e.type?setTimeout(function(){z(C)}):(ce(!0),A.undo.saveStep(),setTimeout(function(){A.undo.saveStep()},0))}},!0),A.browser.msie&&A.events.on("keydown",function(e){if(!A.selection.isCollapsed()||!C)return!0;var t=e.which;t==Me.KEYCODE.C&&A.keys.ctrlKey(e)?A.events.trigger("window.copy"):t==Me.KEYCODE.X&&A.keys.ctrlKey(e)&&A.events.trigger("window.cut")}),A.events.$on(S(A.o_win),"keydown",function(e){if(A.opts.pluginsEnabled.includes("filestack")&&A.opts.iframe){var t=document.getElementsByClassName("fs-transforms-container"),a=!1;if(t&&t.length){var i,r=Ke(t);try{for(r.s();!(i=r.n()).done;){var n=i.value;n.childNodes&&n.childNodes.length&&(a=!0)}}catch(s){r.e(s)}finally{r.f()}}a&&(C=null)}var o=e.which;if(C&&o==Me.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),A.events.$on(A.$win,"keydown",function(e){var t=e.which;C&&C.hasClass("fr-uploading")&&t==Me.KEYCODE.ESC&&C.trigger("abortUpload")}),A.events.on("destroy",function(){C&&C.hasClass("fr-uploading")&&C.trigger("abortUpload")}),A.events.on("paste.before",pe),A.events.on("paste.beforeCleanup",fe),A.events.on("paste.after",oe),A.events.on("html.set",v),A.events.on("html.inserted",v),v(),A.events.on("destroy",function(){s=[]}),A.events.on("html.processGet",re),A.opts.imageOutputSize&&A.events.on("html.beforeGet",function(){n=A.el.querySelectorAll("img");for(var e=0;e<n.length;e++){var t=parseFloat(S(n[e]).css("padding-left"))+parseFloat(S(n[e]).css("padding-right")),a=S(n[e]).width()-t,i=n[e].style.width||a,r=n[e].style.height||S(n[e]).height();i&&n[e].setAttribute("width","".concat(i).replace(/px/,"")),r&&n[e].setAttribute("height","".concat(r).replace(/px/,""))}}),A.opts.iframe&&A.events.on("image.loaded",A.size.syncIframe),A.$wp&&(b(),A.events.on("contentChanged",b)),A.events.$on(S(A.o_win),"orientationchange.image",function(){setTimeout(function(){C&&z(C)},100)}),N(!0),X(!0),ee(!0),J(!0),A.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return ae(e),!1})},showInsertPopup:function Ue(){var e=A.$tb.find('.fr-command[data-cmd="insertImage"]'),t=A.popups.get("image.insert");if(t||(t=X()),k(),!t.hasClass("fr-active"))if(A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$tb),e.isVisible()){var a=A.button.getPosition(e),i=a.left,r=a.top;A.popups.show("image.insert",i,r,e.outerHeight())}else A.position.forSelection(t),A.popups.show("image.insert")},showLayer:function xe(e){var t,a,i=A.popups.get("image.insert");if(C||A.opts.toolbarInline){if(C){var r=Ce(),n=0;Se()&&(r=r.find(".fr-img-wrap"),n=C.outerWidth()/2),a=r.offset().top+r.outerHeight(),t=r.offset().left+n}}else{var o=A.$tb.find('.fr-command[data-cmd="insertImage"]');t=o.offset().left,a=o.offset().top+(A.opts.toolbarBottom?10:o.outerHeight()-10)}!C&&A.opts.toolbarInline&&(a=i.offset().top-A.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),A.popups.show("image.insert",t,a,C?C.outerHeight():0,Se()),A.accessibility.focusPopup(i)},refreshUploadButton:function De(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function Te(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:H,insertByURL:function $e(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){P(),B(A.language.translate("Loading image"));var t=e.val().trim();if(A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy&&A.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?H([new Blob([this.response],{type:this.response.type||"image/png"})],C):I(i)},a.onerror=function(){_(t,!0,[],C)},a.open("GET","".concat(A.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else _(t,!0,[],C);e.val(""),e.blur()}},align:function Ie(e){var t=Ce();t.removeClass("fr-fir fr-fil"),!A.opts.htmlUntouched&&A.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):he(t,be(),e),we(),x(),n(),A.selection.clear()},refreshAlign:function Ne(e){C&&e.find("> *").first().replaceWith(A.icon.create("image-align-".concat(ve())))},refreshAlignOnShow:function Pe(e,t){C&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ke(e){var t=Ce();t.removeClass("fr-dii fr-dib"),!A.opts.htmlUntouched&&A.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):he(t,e,ve()),we(),x(),n(),A.selection.clear()},refreshDisplayOnShow:function Be(e,t){C&&t.find('.fr-command[data-param1="'.concat(be(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ye,back:function e(){C?(A.events.disableBlur(),S(".fr-popup input:focus").blur(),z(C)):(A.events.disableBlur(),A.selection.restore(),A.events.enableBlur(),A.popups.hide("image.insert"),A.toolbar.showInline())},get:Ae,getEl:Ce,insert:_,showProgressBar:P,remove:ae,hideProgressBar:k,applyStyle:function Oe(e,t,a){if(void 0===t&&(t=A.opts.imageStyles),void 0===a&&(a=A.opts.imageMultipleStyles),!C)return!1;var i=Ce();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Ye(t[e])?(i.removeAttr("style"),i.css(t[e].style)):(i.toggleClass(e),Se()&&C.hasClass(e)&&C.removeClass(e)),z(C)},showAltPopup:j,showSizePopup:Z,setAlt:function ze(e){if(C){var t=A.popups.get("image.alt");C.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),z(C)}},setSize:function Le(e,t){if(C){var a=A.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;C.removeAttr("width").removeAttr("height"),e.match(i)?C.css("width",e):C.css("width",""),t.match(i)?C.css("height",t):C.css("height",""),Se()&&(C.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?C.parents(".fr-img-caption").css("width",e):C.parents(".fr-img-caption").css("width",""),t.match(i)?C.parents(".fr-img-caption").css("height",t):C.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),z(C)}},toggleCaption:function _e(){var e;if(C&&!Se()){(e=C).parent().is("a")&&(e=C.parent());var t,a,i=C.parents("ul")&&0<C.parents("ul").length?C.parents("ul"):C.parents("ol")&&0<C.parents("ol").length?C.parents("ol"):[];if(0<i.length){var r=i.find("li").length,n=C.parents("li"),o=document.createElement("li");r-1===n.index()&&(i.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=A.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":C.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(A.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+C.attr("class")+'" style="'+(A.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),C.after('<span class="fr-inner"'.concat(A.browser.mozilla?"":' contenteditable="true"',">").concat(Me.START_MARKER).concat(A.language.translate("Image Caption")).concat(Me.END_MARKER,"</span>")),C.parents(".fr-img-caption").css("width",s);var l=C.parents(".fr-img-space-wrap").length;1==l?Ee(document.querySelector(".fr-img-space-wrap")):1<l&&(Ee(document.querySelector(".fr-img-space-wrap")),Ee(document.querySelector(".fr-img-space-wrap2"))),ce(!0),A.selection.restore()}else{if(e=Ce(),C.insertBefore(e),null!==e[0].querySelector("a")){for(var p,f=e[0].querySelector("a"),g=document.createElement("a"),c=0,d=f.attributes,u=d.length;c<u;c++)p=d[c],g.setAttribute(p.nodeName,p.nodeValue);C.wrap(g)}C.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove();var m=C.parents(".fr-img-space-wrap").length;1==m?Ee(document.querySelector(".fr-img-space-wrap")):1<m&&(Ee(document.querySelector(".fr-img-space-wrap")),Ee(document.querySelector(".fr-img-space-wrap2"))),z(C)}},hasCaption:Se,exitEdit:ce,edit:z}},Me.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),Me.RegisterShortcut(Me.KEYCODE.P,"insertImage",null,"P"),Me.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),Me.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),Me.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),Me.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),Me.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),Me.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),Me.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),Me.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),Me.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),Me.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Me.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Me.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),Me.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Me.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Me.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),Me.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Me.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),Me.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),Me.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),Me.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),Me.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),Me.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),Me.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),Me.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Ye(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),Me.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),Me.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),Me.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),Me.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Me.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),Me.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),Me.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),Me.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * Copyright 2014-2024 Froala Labs

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(o){"use strict";o=o&&o.hasOwnProperty("default")?o["default"]:o,Object.assign(o.DEFAULTS,{listAdvancedTypes:!0}),o.PLUGINS.lists=function(m){var g=m.$;function p(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function f(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function c(e,t){!function c(e,t){for(var n=[],a=0;a<e.length;a++){var r=e[a].parentNode;"LI"==e[a].tagName&&r.tagName!=t&&n.indexOf(r)<0&&n.push(r)}for(var o=n.length-1;0<=o;o--){var i=g(n[o]);i.replaceWith("<".concat(t.toLowerCase()," ").concat(m.node.attributes(i.get(0)),">").concat(i.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var n,a=m.html.defaultTag(),r=null;e.length&&(n="rtl"==m.opts.direction||"rtl"==g(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o<e.length;o++)if("TD"!=e[o].tagName&&"TH"!=e[o].tagName&&"LI"!=e[o].tagName){var i=m.helpers.getPX(g(e[o]).css(n))||0;(e[o].style.marginLeft=null)===r&&(r=i);var l=0<r?"<".concat(t,' style="').concat(n,": ").concat(r,'px ">'):"<".concat(t,">"),s="</".concat(t,">");for(i-=r;0<i/m.opts.indentMargin;)l+="</".concat(t,">"),s+=s,i-=m.opts.indentMargin;a&&e[o].tagName.toLowerCase()==a?g(e[o]).replaceWith("".concat(l,"<li").concat(m.node.attributes(e[o]),">").concat(g(e[o]).html(),"</li>").concat(s)):g(e[o]).wrap("".concat(l,"<li></li>").concat(s))}m.clean.lists()}function d(e){var t,n;for(t=e.length-1;0<=t;t--)for(n=t-1;0<=n;n--){if(g(e[n]).find(e[t]).length||e[n]==e[t]){e.splice(t,1);break}if(g(e[n]).contains(e[t])){e.splice(n,1);break}}var a=[];for(t=0;t<e.length;t++){var r=g(e[t]),o=e[t].parentNode,i=r.attr("class");if(r.before(f(o.tagName)),"LI"==o.parentNode.tagName)r.before(f("LI")),r.after(p("LI"));else if("OL"==o.parentNode.tagName)r.before(f("OL")),r.after(p("OL"));else if("UL"==o.parentNode.tagName)r.before(f("UL")),r.after(p("UL"));else{var l="";i&&(l+=' class="'.concat(i,'"'));var s="rtl"==m.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";m.helpers.getPX(g(o).css(s))&&0<=(g(o).attr("style")||"").indexOf("".concat(s,":"))&&(l+=' style="'.concat(s,":").concat(m.helpers.getPX(g(o).css(s)),'px;"')),m.html.defaultTag()&&0===r.find(m.html.blockTagsQuery()).length&&r.wrapInner(m.html.defaultTag()+l),m.node.isEmpty(r.get(0),!0)||0!==r.find(m.html.blockTagsQuery()).length||("DIV"==o.parentNode.tagName&&m.html.defaultTag()?(r.prepend(p(m.html.defaultTag())),r.append(f(m.html.defaultTag()))):r.append("<br>")),r.append(p("LI")),r.prepend(f("LI"))}r.after(p(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),a.indexOf(o)<0&&a.push(o)}for(t=0;t<a.length;t++){var c=g(a[t]),d=c.html();d=(d=d.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),c.replaceWith(m.node.openTagString(c.get(0))+d+m.node.closeTagString(c.get(0)))}m.$el.find("li:empty").remove(),m.$el.find("ul:empty, ol:empty").remove(),m.clean.lists(),m.$el.find("ul:empty, ol:empty").remove(),m.html.wrap()}function e(e){if("indent"==e||"outdent"==e){var t=!1,n=m.selection.blocks(),a=[],r=n[0].previousSibling||n[0].parentElement;if("outdent"==e){if("UL"!=n[0].parentNode.tagName&&"UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!n[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function i(e){for(m.selection.save();0<e.childNodes.length;)e.parentNode.parentNode.append(e.childNodes[0]);m.clean.lists(),m.selection.restore()}(r)}else{if("UL"!=n[0].parentElement.tagName&&"OL"!=n[0].parentElement.tagName&&"LI"!=n[0].parentElement.tagName)return;if(m.node.isBlock(n[0])&&"LI"!==n[0].tagName&&0<g(n[0]).parentsUntil(m.$el,"LI").length&&(n[0]=n[0].parentElement,r=n[0].parentElement),!n[0].previousSibling||"LI"!=n[0].previousSibling.tagName)return void function l(e){m.selection.save();for(var t="OL"==e.tagName?document.createElement("ol"):document.createElement("ul");0<e.childNodes.length;)t.append(e.childNodes[0]);var n=document.createElement("li");t.append(n),e.append(t),m.clean.lists(),m.selection.restore()}(r)}for(var o=0;o<n.length;o++)"LI"==n[o].tagName?(t=!0,a.push(n[o])):"LI"==n[o].parentNode.tagName&&(t=!0,a.push(n[o].parentNode));t&&("indent"==e?function f(e){m.selection.save();for(var t=0;t<e.length;t++){var n=e[t].previousSibling;if(n){var a=g(e[t]).find("> ul, > ol").last().get(0);if(a){var r=g(document.createElement("li"));if(a.childNodes.length)for(var o=a.childNodes[0].attributes,i=0;i<o.length;i++){var l=o[i];"style"===l.name&&(r[0].style.cssText+=l.value)}g(a).prepend(r);for(var s=m.node.contents(e[t])[0];s&&!m.node.isList(s);){var c=s.nextSibling;r.append(s),s=c}g(n).append(g(a)),g(e[t]).remove()}else{var d=g(n).find("> ul, > ol").last().get(0);if(d)g(d).append(g(e[t]));else{var p=g("<".concat(e[t].parentNode.tagName,">"));g(n).append(p),p.append(g(e[t]))}}}}m.clean.lists(),m.selection.restore()}(a):function s(e){m.selection.save(),d(e),m.selection.restore()}(a))}}return{_init:function t(){m.events.on("commands.after",e),m.events.on("keydown",function(e){if(e.which==o.KEYCODE.TAB){for(var t=m.selection.blocks(),n=[],a=0;a<t.length;a++)"LI"==t[a].tagName?n.push(t[a]):"LI"==t[a].parentNode.tagName&&n.push(t[a].parentNode);if(1<=n.length||n.length&&(m.selection.info(n[0]).atStart||m.node.isEmpty(n[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?m.commands.outdent():m.commands.indent(),!1}},!0)},format:function u(e,t){var n,a,r=1<(a=m.selection.blocks(!0)).length&&a[a.length-1],o=m.selection.ranges();if(r&&o.length&&m.node.isEmpty(r)&&!o[0].endOffset&&o[0].setEndAfter(r.firstChild,1),m.html.syncInputs(),m.selection.save(),m.browser.safari&&m.helpers.getSafariVersion()<17){var i=m.selection.ranges();if(o&&o[0].endContainer&&i&&i[0].endContainer&&!o[0].endContainer.isSameNode(i[0].endContainer)&&o[0].endContainer.previousSibling&&o[0].endContainer.previousSibling.isSameNode(i[0].endContainer)){var l=g(i[0].endContainer).find('.fr-marker[data-type="false"]');g(o[0].endContainer).append(l[0])}}for(m.html.wrap(!0,!0,!0,!0),m.selection.restore(),a=m.selection.blocks(!0),n=0;n<a.length;n++)"LI"!=a[n].tagName&&"LI"==a[n].parentNode.tagName&&(a[n]=a[n].parentNode);if(m.selection.save(),function s(e,t){for(var n=!0,a=0;a<e.length;a++){if("LI"!=e[a].tagName)return!1;e[a].parentNode.tagName!=t&&(n=!1)}return n}(a,e)?t||d(a):c(a,e),m.html.unwrap(),m.selection.restore(),t=t||"default"){for(a=m.selection.blocks(),n=0;n<a.length;n++)"LI"!=a[n].tagName&&"LI"==a[n].parentNode.tagName&&(a[n]=a[n].parentNode);for(n=0;n<a.length;n++)"LI"==a[n].tagName&&(g(a[n].parentNode).css("list-style-type","default"===t?"":t),0===(g(a[n].parentNode).attr("style")||"").length&&g(a[n].parentNode).removeAttr("style"))}},refresh:function r(e,t){var n=g(m.selection.element());if(n.get(0)!=m.el){var a=n.get(0);(a="LI"!=a.tagName&&a.firstElementChild&&"LI"!=a.firstElementChild.tagName?n.parents("li").get(0):"LI"==a.tagName||a.firstElementChild?a.firstElementChild&&"LI"==a.firstElementChild.tagName?n.get(0).firstChild:n.get(0):n.parents("li").get(0))&&a.parentNode.tagName==t&&m.el.contains(a.parentNode)&&e.addClass("fr-active")}}}},o.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),o.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),o.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),o.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),o.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),o.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(o){"use strict";o=o&&o.hasOwnProperty("default")?o["default"]:o,Object.assign(o.DEFAULTS,{listAdvancedTypes:!0}),o.PLUGINS.lists=function(g){var u=g.$;function h(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function N(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function c(e,t){!function c(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var o=a.length-1;0<=o;o--){var l=u(a[o]);l.replaceWith("<".concat(t.toLowerCase()," ").concat(g.node.attributes(l.get(0)),">").concat(l.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var a,n=g.html.defaultTag(),r=null;e.length&&(a="rtl"==g.opts.direction||"rtl"==u(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o<e.length;o++)if("TD"!=e[o].tagName&&"TH"!=e[o].tagName&&"LI"!=e[o].tagName){var l=g.helpers.getPX(u(e[o]).css(a))||0;(e[o].style.marginLeft=null)===r&&(r=l);var i=0<r?"<".concat(t,' style="').concat(a,": ").concat(r,'px ">'):"<".concat(t,">"),s="</".concat(t,">");for(l-=r;0<l/g.opts.indentMargin;)i+="</".concat(t,">"),s+=s,l-=g.opts.indentMargin;n&&e[o].tagName.toLowerCase()==n?u(e[o]).replaceWith("".concat(i,"<li").concat(g.node.attributes(e[o]),">").concat(u(e[o]).html(),"</li>").concat(s)):u(e[o]).wrap("".concat(i,"<li></li>").concat(s))}g.clean.lists()}function d(e){var t,a,n=[];for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--){if(u(e[a]).find(e[t]).length||e[a]==e[t]){u(e[t]).addClass("fr-removed-block-".concat(t)),n.push(t),e.splice(t,1);break}if(u(e[a]).contains(e[t])){u(e[a]).addClass("fr-removed-block-".concat(a)),n.push(a),e.splice(a,1);break}}var r=[],o=!1;for(t=0;t<e.length;t++){var l=u(e[t]),i=e[t].parentNode,s=l.attr("class");if(l.is(":first-child")&&(o=!0,u(i.parentNode).removeAttr("start")),l.before(N(i.tagName)),"LI"==i.parentNode.tagName){if(l.is(":last-child")){var c=l.find("> ul, > ol").last();c.length&&c.wrap("<".concat(i.tagName,">"))}l.before(N("LI")),l.after(h("LI"))}else if("OL"==i.parentNode.tagName)o||(l.before(N("OL")),l.after(h("OL")));else if("UL"==i.parentNode.tagName)o||(l.before(N("UL")),l.after(h("UL")));else{var d="";s&&(d+=' class="'.concat(s,'"'));var p="rtl"==g.opts.direction||"rtl"==l.css("direction")?"margin-right":"margin-left";g.helpers.getPX(u(i).css(p))&&0<=(u(i).attr("style")||"").indexOf("".concat(p,":"))&&(d+=' style="'.concat(p,":").concat(g.helpers.getPX(u(i).css(p)),'px;"')),g.html.defaultTag()&&0===l.find(g.html.blockTagsQuery()).length&&l.wrapInner(g.html.defaultTag()+d),g.node.isEmpty(l.get(0),!0)||0!==l.find(g.html.blockTagsQuery()).length||("DIV"==i.parentNode.tagName&&g.html.defaultTag()?(l.prepend(h(g.html.defaultTag())),l.append(N(g.html.defaultTag()))):l.append("<br>")),l.append(h("LI")),l.prepend(N("LI"))}l.after(h(i.tagName)),"LI"==i.parentNode.tagName&&(i=i.parentNode.parentNode),r.indexOf(i)<0&&r.push(i)}for(t=0;t<r.length;t++){var f=u(r[t]),m=f.html();m=(m=m.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),f.replaceWith(g.node.openTagString(f.get(0))+m+g.node.closeTagString(f.get(0)))}return g.$el.find("li:empty").remove(),g.$el.find("ul:empty, ol:empty").remove(),g.clean.lists(),g.$el.find("ul:empty, ol:empty").remove(),g.html.wrap(),n}function m(e,t){var a=u(document.createElement("li"));if(e.childNodes.length)for(var n=e.childNodes[0].attributes,r=0;r<n.length;r++){var o=n[r];"style"===o.name&&(a[0].style.cssText+=o.value)}u(e).prepend(a),u(e).removeAttr("start");for(var l=g.node.contents(t)[0];l&&!g.node.isList(l);){var i=l.nextSibling;a.append(l),l=i}}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=g.selection.blocks(!1,!0),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("UL"!=a[0].parentNode.tagName&&"UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!a[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function l(e){for(g.selection.save();0<e.childNodes.length;)e.parentNode.parentNode.append(e.childNodes[0]);g.clean.lists(),g.selection.restore()}(r)}else{if("UL"!=a[0].parentElement.tagName&&"OL"!=a[0].parentElement.tagName&&"LI"!=a[0].parentElement.tagName)return;if(g.node.isBlock(a[0])&&"LI"!==a[0].tagName&&0<u(a[0]).parentsUntil(g.$el,"LI").length&&(a[0]=a[0].parentElement,r=a[0].parentElement),!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName){if(0==u(a[0]).parents("li").length)return void function i(e){g.selection.save();var t="OL"==e.tagName?document.createElement("ol"):document.createElement("ul");for(u(t).css("list-style-type",u(e).css("list-style-type"));0<e.childNodes.length;)t.append(e.childNodes[0]);var a=document.createElement("li");t.append(a),e.append(t),g.clean.lists(),g.selection.restore()}(r);t=!0}}for(var o=0;o<a.length;o++)"LI"==a[o].tagName?(t=!0,n.push(a[o])):"LI"==a[o].parentNode.tagName&&n.indexOf(a[o].parentNode)<0&&(t=!0,n.push(a[o].parentNode));t&&("indent"==e?function f(e){g.selection.save();for(var t=!1,a=0;a<e.length;a++){var n=e[a].previousSibling;if(n&&"LI"==n.tagName&&!t){var r=u(e[a]).find("> ul, > ol").last().get(0);if(r)m(r,e[a]),u(n).append(u(r)),u(e[a]).remove();else{var o=u(n).find("> ul, > ol").last().get(0);if(o)u(o).append(u(e[a]));else{var l=u("<".concat(e[a].parentNode.tagName,">"));u(n).append(l),l.append(u(e[a]))}}}else if(!n||"OL"!=n.tagName&&"UL"!=n.tagName){var i=e[a].parentNode;if(t=!0,"UL"==i.tagName||"OL"==i.tagName){var s=u(e[a]).find("> ol, > ul"),c=null==e[a].previousSibling;if(s.length){var d=s.first().get(0);m(d,e[a]),c?u(i).prepend(u(d)):u(i).append(u(d)),u(e[a]).remove()}else u(e[a]).wrap("<".concat(i.tagName,">"));c&&0<u(i).find("> li").length&&u(i).attr("start","2")}}else{var p=u(e[a]).find("> ol, > ul").first().get(0);p?(m(p,e[a]),u(n).append(u(p).children()),u(e[a]).remove(),u(p).remove()):u(n).append(u(e[a]))}}g.clean.lists(),g.selection.restore()}(n):function s(e){g.selection.save();var t=[];do{t=d(e),e=[];for(var a=0;a<t.length;a++){var n=g.$el.find(".fr-removed-block-".concat(t[a])).first().get(0);u(n).removeClass("fr-removed-block-".concat(t[a])),""==u(n).attr("class")&&u(n).removeAttr("class"),e.push(n)}}while(0<t.length);g.selection.restore()}(n))}}return{_init:function t(){g.events.on("commands.after",e),g.events.on("keydown",function(e){if(e.which==o.KEYCODE.TAB){for(var t=g.selection.blocks(),a=[],n=0;n<t.length;n++)"LI"==t[n].tagName?a.push(t[n]):"LI"==t[n].parentNode.tagName&&a.push(t[n].parentNode);if(1<=a.length||a.length&&(g.selection.info(a[0]).atStart||g.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?g.commands.outdent():g.commands.indent(),!1}},!0)},format:function p(e,t){var a,n,r=1<(n=g.selection.blocks(!0)).length&&n[n.length-1],o=g.selection.ranges();if(r&&o.length&&g.node.isEmpty(r)&&!o[0].endOffset&&o[0].setEndAfter(r.firstChild,1),g.html.syncInputs(),g.selection.save(),g.browser.safari&&g.helpers.getSafariVersion()<17){var l=g.selection.ranges();if(o&&o[0].endContainer&&l&&l[0].endContainer&&!o[0].endContainer.isSameNode(l[0].endContainer)&&o[0].endContainer.previousSibling&&o[0].endContainer.previousSibling.isSameNode(l[0].endContainer)){var i=u(l[0].endContainer).find('.fr-marker[data-type="false"]');u(o[0].endContainer).append(i[0])}}for(g.html.wrap(!0,!0,!0,!0),g.selection.restore(),n=g.selection.blocks(!0),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(g.selection.save(),function s(e,t){for(var a=!0,n=0;n<e.length;n++){if("LI"!=e[n].tagName)return!1;e[n].parentNode.tagName!=t&&(a=!1)}return a}(n,e)?t||d(n):c(n,e),g.html.unwrap(),g.selection.restore(),t=t||"default"){for(n=g.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);for(a=0;a<n.length;a++)"LI"==n[a].tagName&&(u(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(u(n[a].parentNode).attr("style")||"").length&&u(n[a].parentNode).removeAttr("style"))}},refresh:function r(e,t){var a=u(g.selection.element());if(a.get(0)!=g.el){var n=a.get(0);(n="LI"!=n.tagName&&n.firstElementChild&&"LI"!=n.firstElementChild.tagName?a.parents("li").get(0):"LI"==n.tagName||n.firstElementChild?n.firstElementChild&&"LI"==n.firstElementChild.tagName?a.get(0).firstChild:a.get(0):a.parents("li").get(0))&&n.parentNode.tagName==t&&g.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},o.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),o.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),o.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),o.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),o.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),o.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})});
/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * Copyright 2014-2024 Froala Labs

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{html2pdf:window.html2pdf}),e.PLUGINS.print=function(a){return{run:function e(){!function l(e){var t=a.html.get(),n=null;a.shared.print_iframe?n=a.shared.print_iframe:((n=document.createElement("iframe")).name="fr-print",n.style.position="fixed",n.style.top="0",n.style.left="-9999px",n.style.height="100%",n.style.width="0",n.style.overflow="hidden",n.style["z-index"]="2147483647",n.style.tabIndex="-1",a.events.on("shared.destroy",function(){n.remove()}),a.shared.print_iframe=n);try{document.body.removeChild(n)}catch(d){}document.body.appendChild(n);var i=function i(){e(),n.removeEventListener("load",i)};n.addEventListener("load",i);var o=n.contentWindow;o.document.open(),o.document.write("<!DOCTYPE html><html "+(a.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),function(e){e=e.cloneNode(!0),o.document.write(e.outerHTML)});var r=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(r,function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",o.document.write(t.outerHTML)}),o.document.write('</head><body style="height:auto;text-align: '+("rtl"==a.opts.direction?"right":"left")+"; direction: "+a.opts.direction+"; "+(a.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),o.document.write(t),o.document.write("</div></body></html>"),o.document.close()}(function(){setTimeout(function(){a.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),a.$win.get(0).focus(),a.events.disableBlur(),a.events.focus()},0)})},toPDF:function t(){a.opts.html2pdf&&(a.$el.css("text-align","left"),a.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(a.el).save(),setTimeout(function(){a.$el.css("text-align","")},100))}}},e.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),e.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),e.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),e.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{html2pdf:window.html2pdf}),e.PLUGINS.print=function(a){return{run:function e(){!function l(e){var t=a.html.get(),n=null;a.shared.print_iframe?n=a.shared.print_iframe:((n=document.createElement("iframe")).name="fr-print",n.style.position="fixed",n.style.top="0",n.style.left="-9999px",n.style.height="100%",n.style.width="0",n.style.overflow="hidden",n.style["z-index"]="2147483647",n.style.tabIndex="-1",a.events.on("shared.destroy",function(){n.remove()}),a.shared.print_iframe=n);try{document.body.removeChild(n)}catch(d){}document.body.appendChild(n);var i=function(){e(),n.removeEventListener("load",i)};n.addEventListener("load",i);var o=n.contentWindow;o.document.open(),o.document.write("<!DOCTYPE html><html "+(a.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),function(e){e=e.cloneNode(!0),o.document.write(e.outerHTML)});var r=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(r,function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",o.document.write(t.outerHTML)}),o.document.write('</head><body style="height:auto;text-align: '+("rtl"==a.opts.direction?"right":"left")+"; direction: "+a.opts.direction+"; "+(a.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),o.document.write(t),o.document.write("</div></body></html>"),o.document.close()}(function(){setTimeout(function(){a.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),a.$win.get(0).focus(),a.events.disableBlur(),a.events.focus()},0)})},toPDF:function t(){a.opts.html2pdf&&(a.$el.css("text-align","left"),a.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(a.el).save(),setTimeout(function(){a.$el.css("text-align","")},100))}}},e.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),e.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),e.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),e.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}})});
/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * Copyright 2014-2024 Froala Labs

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(k){"use strict";function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function o(t){return function e(t){if(Array.isArray(t))return l(t)}(t)||function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function i(t,e){if(t){if("string"==typeof t)return l(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(t)||function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),k.PLUGINS.wordPaste=function(E){var a,n,T,I=E.$,s="word_paste",p={},S=!0,L=0;function e(t){var e=E.opts.wordAllowedStyleProps;t||(E.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=l(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(t,e){for(var r="",i=0;i++<e.length;)r+="&nbsp;";return r}),E.paste.getRtfClipboard());var r=E.doc.createElement("DIV");r.innerHTML=n,E.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=E.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){E.modals.hide(s)}(),E.helpers.isMobile()&&E.events.focus(),E.paste.clean(n,!0,!0),E.opts.wordAllowedStyleProps=e}function w(t){t.parentNode&&t.parentNode.removeChild(t)}function m(t,e){if(e(t))for(var r=t.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,m(i,e),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:t.firstChild&&(r=t.firstChild.nextSibling)):r=n?n.nextSibling:t.firstChild}}function P(t){return I(t).hasClass("ListContainerWrapper")&&0<I(t).find("ol").length}function D(t){return I(t).hasClass("ListContainerWrapper")&&0<I(t).find("ul").length}function _(t){if(P(t)||D(t))return!0;if(!t.getAttribute("style")||!/mso-list:[\s]*l/gi.test(t.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!t.querySelector('[style="mso-list:Ignore"]'))return!!(t.outerHTML&&0<=t.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(e){return!1}return!0}function $(t){return P(t)||D(t)?I(t).find("li").attr("data-aria-level"):t.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function F(t,i){var e=t.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(t.tagName)){var r=document.createElement(t.tagName.toLowerCase());r.setAttribute("style",t.getAttribute("style")),r.innerHTML=e.innerHTML,e.innerHTML=r.outerHTML}m(e,function(t){if(t.nodeType==Node.COMMENT_NODE&&(E.browser.msie||E.browser.safari||E.browser.edge))try{if("[if !supportLists]"===t.data){for(t=t.nextSibling;t&&t.nodeType!==Node.COMMENT_NODE;){var e=t.nextSibling;t.parentNode.removeChild(t),t=e}t&&t.nodeType==Node.COMMENT_NODE&&t.parentNode.removeChild(t)}}catch(r){return!1}return t.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===t.getAttribute("style")&&t.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===t.getAttribute("style")&&t.parentNode.removeChild(t),t.setAttribute("style",h(t)),b(t,i)),!0});var n=P(t)?I(t).find("li").get(0).innerHTML:e.innerHTML;if(P(t)||D(t)){n="";for(var l=I(t).find("li"),a=0;a<l.length;a++){var s=I(l.get(a).innerHTML);s.find("span").each(function(){"&nbsp;"===I(this).html()&&(0<I(this).prev().text().trim().length?I(this).remove():I(this).html("&ZeroWidthSpace;"))});var o=l[a].style.marginLeft;o?(o=parseFloat(parseFloat(o).toFixed(2))+o.match(/[a-zA-Z]+/g)[0],n+='<li style = "margin-left: '.concat(o,';">').concat(s.get(0).innerHTML,"</li>")):n+="<li >".concat(s.get(0).innerHTML,"</li>")}}else{var d,f=null===(d=I(t).find("p").get(0))||void 0===d?void 0:d.style.marginLeft;n=f?(f=parseFloat(parseFloat(f).toFixed(2))+f.match(/[a-zA-Z]+/g)[0],'<li style = "margin-left: '.concat(f,';">').concat(n,"</li>")):"<li>".concat(n,"</li>")}return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function h(t){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:null,r="",i=["line-height","font-family","font-size","color","background"].concat(o(e||[])),n=t.getAttribute("style");return n&&i.forEach(function(e){var t=n.split(";").find(function(t){return t.trim().includes(e+":")});t&&(t.includes("mso")&&(t=t.match(new RegExp(e+":.*(;|)"))[0]),t.trim().startsWith(e)&&(r+=t+";"))}),r}function y(t,e){for(var r=document.createElement(e),i=0;i<t.attributes.length;i++){var n=t.attributes[i].name;"FONT"===t.tagName&&(E.browser.msie&&["id","class","style"].indexOf(n)<0||!E.browser.msie&&CSS.supports(n,t.getAttribute(n)))?I(r).css(n,t.getAttribute(n)):r.setAttribute(n,t.getAttribute(n))}return r.innerHTML=t.innerHTML,t.parentNode.replaceChild(r,t),r}function N(t,e){E.node.clearAttributes(t);for(var r=t.firstElementChild,i=0,n=!1,l=null;r;){if(r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:"))for(var a=0;a<r.children.length;a++)"<('[^']*'|\"[^\"]*\"|[^\"'>])*>"==r.children[a]&&(r.innerHTML+=r.children[a]);(l=r.getAttribute("width"))||(l=r.style.width),l||n||(n=!0),i+=parseInt(l,10),(!r.firstChild||r.firstChild&&r.firstChild.data===k.UNICODE_NBSP)&&(r.firstChild&&w(r.firstChild),r.innerHTML="<br>");for(var s=r.firstElementChild,o=1===r.children.length;s;)"P"!==s.tagName||_(s)||o&&M(s),s=s.nextElementSibling;if(e){var d=r.getAttribute("class");if(d){var f=(d=H(d)).match(/xl[0-9]+/gi);if(f){var u="."+f[0];e[u]&&O(r,e[u])}}e.td&&O(r,e.td)}var g=r.getAttribute("style");g&&(g=H(g))&&";"!==g.slice(-1)&&(g+=";");var c=r.getAttribute("valign");if(!c&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(c=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var m=null;if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&(m=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===m&&(m=null)}var v=null;if(g){var b=g.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var y=r.getAttribute("colspan"),N=r.getAttribute("rowspan");y&&r.setAttribute("colspan",y),N&&r.setAttribute("rowspan",N),c&&(r.style["vertical-align"]=c),m&&(r.style["text-align"]=m),v&&(r.style["background-color"]=v),l&&r.setAttribute("width",l),r=r.nextElementSibling}for(r=t.firstElementChild;r;)l=r.getAttribute("width"),n&&r.removeAttribute("width"),r=r.nextElementSibling;t.previousSibling?T!=i&&(S=!1):T=i,!t.nextElementSibling&&S&&function C(t){for(;t;){for(var e=t.firstElementChild,r=null,i=0;e;)r=e.getAttribute("width"),i+=parseInt(r,10),e=e.nextElementSibling;for(e=t.firstElementChild;e;)r=e.getAttribute("width"),e.setAttribute("width",100*parseInt(r,10)/i+"%"),e=e.nextElementSibling;t=t.previousElementSibling}}(t);var x=I(t).parentsUntil("table").parent().last();if(L<i&&(L=i),!t.nextElementSibling&&0<x.length){var A=I(x)[0].width;I(x)[0].style.width=A||L,S=!(L=0)}}function M(t){var e=t.getAttribute("align");e&&(t.style["text-align"]=e,t.removeAttribute("align"))}function H(t){return t.replace(/\n|\r|\n\r|&quot;/g,"")}function O(t,e,r){if(e){var i=t.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),e&&";"!==e.slice(-1)&&(e+=";"),e=e.replace(/\n/gi,"");var n=null;n=r?(i||"")+e:e+(i||""),t.setAttribute("style",n)}}var c=null;function d(t,e,r){for(var i=t.split(r),n=1;n<i.length;n++){var l=i[n];if(1<(l=l.split("shplid")).length){l=l[1];for(var a="",s=0;s<l.length&&"\\"!==l[s]&&"{"!==l[s]&&" "!==l[s]&&"\r"!==l[s]&&"\n"!==l[s];)a+=l[s],s++;var o=l.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");c[e+a]={image_hex:g,image_type:d}}}}function v(t,e){if(e){var r;if("IMG"===t.tagName){var i=t.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&E.helpers.isURL(t.getAttribute("alt")))return void t.setAttribute("src",t.getAttribute("alt"));(r=p[t.getAttribute("v:shapes")])||(r=t.getAttribute("v:shapes"),t.parentNode&&t.parentNode.parentNode&&0<=t.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=t.parentNode.getAttribute("o:spid");if(t.removeAttribute("height"),r){!function s(t){c={},d(t,"i","\\shppict"),d(t,"s","\\shp{")}(e);var n=c[r.substring(7)];if(n){var l=function o(t){for(var e=t.match(/[0-9a-f]{2}/gi),r=[],i=0;i<e.length;i++)r.push(String.fromCharCode(parseInt(e[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),a="data:"+n.image_type+";base64,"+l;"IMG"===t.tagName?(t.src=a,t.setAttribute("data-fr-image-pasted",!0)):I(t).parent().before('<img data-fr-image-pasted="true" src="'.concat(a,'" style="').concat(t.parentNode.getAttribute("style"),'">')).remove()}}}}function b(t,e){var r=t.tagName,i=r.toLowerCase();t.firstElementChild&&("I"===t.firstElementChild.tagName?y(t.firstElementChild,"em"):"B"===t.firstElementChild.tagName&&y(t.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return w(t),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<n.length;l++)if(-1!==r.indexOf(n[l]))return t.innerHTML&&(t.outerHTML=t.innerHTML),w(t),!1;if("TD"!==r){var a=t.getAttribute("class")||"MsoNormal";if(e&&a){for(var s=(a=H(a)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var u=0;u<d.length;u++)e[d[u]]&&O(t,e[d[u]])}t.removeAttribute("class")}e&&e[i]&&O(t,e[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var g=t.getAttribute("class");if(g&&(e&&e[r.toLowerCase()+"."+g]&&O(t,e[r.toLowerCase()+"."+g]),-1!==g.toLowerCase().indexOf("mso"))){var c=H(g);(c=c.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?t.setAttribute("class",c):t.removeAttribute("class")}var p=t.getAttribute("style");if(p){var m=p.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}M(t)}if("TR"===r&&N(t,e),"A"!==r||t.attributes.getNamedItem("href")||t.attributes.getNamedItem("name")||!t.innerHTML||(t.outerHTML=t.innerHTML),"A"==r&&t.getAttribute("href")&&t.querySelector("img"))for(var h=t.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||t.innerHTML||(t.innerHTML="<br>"),t.getAttribute("lang")&&t.removeAttribute("lang"),t.getAttribute("style")&&-1!==t.getAttribute("style").toLowerCase().indexOf("mso")){var b=H(t.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?t.setAttribute("style",b):t.removeAttribute("style")}return!0}function l(t,e){0<=t.indexOf("<html")&&(t=t.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));var o=t.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function u(t){for(var e=t.split("v:shape"),r=1;r<e.length;r++){var i=e[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var l=i.split(' o:spid="')[1];l&&1<l.length&&(l=l.split('"')[0],p[n]=l)}}}(t);var r=(new DOMParser).parseFromString(t,"text/html"),i=r.head,n=r.body,d=function g(t){var e={},r=t.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var l=i[n],a=l.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=l.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");a=a.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),a=a.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=a.split(", "),d=0;d<o.length;d++)e[o[d]]=s}}return e}(i);m(n,function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute("style")){var e=t.getAttribute("style");e=function r(t){return t.replace(/mso-(bidi|fareast|fareast-theme)-font-family/g,"font-family")}(e),t.setAttribute("style",e)}return!0}),m(n,function(t){if(t.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(t.data)){if(!/\S| /.test(t.data)&&!/[\u00a0]+/.test(t.data))return t.data===k.UNICODE_NBSP?(t.data="\u200b",!0):1===t.data.length&&10===t.data.charCodeAt(0)?(t.data=" ",!0):(w(t),!1);t.data=t.data.replace(/\n|\r/gi," ")}return!0}),m(n,function(t){return t.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==t.tagName&&"IMG"!==t.tagName||v(t,e),!0});for(var l=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),a=l.length-1;0<=a;a--)l[a].previousElementSibling&&"LI"===l[a].previousElementSibling.tagName&&l[a].previousElementSibling.appendChild(l[a]);m(n,function(t){if(t.nodeType===Node.TEXT_NODE)return t.data=t.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(t.nodeType===Node.ELEMENT_NODE){if(_(t)){var e=t.parentNode,r=t.previousSibling,i=function O(t,e,r,i){var n,l,a,s,o,d,f,u=navigator.userAgent.toLowerCase();-1!=u.indexOf("safari")&&(u=-1<u.indexOf("chrome")?1:"safari"),t.innerHTML.includes("mso-list:\nIgnore")&&(t.innerHTML=t.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var g,c,p,m,h=/[0-9a-zA-Z]./gi,v="",b=P(t),y=null===(n=I(t).find("ol"))||void 0===n||null===(n=n.attr("style"))||void 0===n||null===(n=n.split(";"))||void 0===n?void 0:n.find(function(t){return t.trim().startsWith("list-style-type")});y==undefined&&D(t)&&(y=null===(c=I(t).find("ul"))||void 0===c||null===(c=c.attr("style"))||void 0===c||null===(c=c.split(";"))||void 0===c?void 0:c.find(function(t){return t.trim().startsWith("list-style-type")}));if(b)d="ol",f=y?"list-style-type: "+y.replace("list-style-type:","").trim()+";":"";else if(D(t))d="ul",f=y?"list-style-type: "+y.replace("list-style-type:","").trim()+";":"";else{var N=t.querySelector('span[style="mso-list:Ignore"]');null==N&&"safari"==u&&(N=t.querySelector('span[lang="PT-BR"]'));var x=!1;N&&(x=x||h.test(N.textContent)),null!==N&&(g=N.textContent.trim().split(".")[0]),d=1==x?(g=(g=N.textContent.trim().split(".")[0]).replace(/\(([^)]+)\)/g,"$1"),isNaN(parseInt(g))?"i"==g?f="lower-roman;":"I"==g?f="upper-roman;":"o"==g?f="circle;":g.match(/^v$/)||(g.match(/^[a-z]$/)||g.match(/^[a-z]\)$/)?f="lower-alpha;":(g.match(/^[A-Z]$/)||g.match(/^[A-Z]\)$/))&&(f="upper-alpha;")):f="decimal;",f="list-style-type: "+f,"ol"):(null!=N&&(g=N.textContent.trim().split(".")[0]),"\xa7"==g?f="square;":"\xb7"==g&&(f="disc;"),f="list-style-type: "+f,"ul"),N==undefined||N.textContent==undefined||isNaN(parseInt(N.textContent.trim().split(".")[1],10))||(v=' class="decimal_type" ')}var A=1,C="",E=($(t),t.style.marginLeft),T="";E.includes("in")?(T="in",E=parseFloat(E)-.5):E.includes("pt")&&(T="px",E=parseFloat(E)-10),E&&(m=" margin-left: "+E+T+";"),A="list-style-type: upper-alpha;"==f?b?parseInt(I(t).find("ol").attr("start")):g.charCodeAt(0)-64:"list-style-type: lower-alpha;"==f?b?parseInt(I(t).find("ol").attr("start")):g.charCodeAt(0)-96:b?parseInt(I(t).find("ol").attr("start")):parseInt(g),C+=f||"",C+=m||"",p="<"+d,p+=v||"",p+="ol"!=d||1==A||isNaN(A)?"":' start = "'+A+'"',p+=C?' style = "'+C+'"':"",p+=">";for(var S=!1;t;){if(!_(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var L=$(t);if((r=r||L)<L)p+=(o=O(t,e,L,t.style.marginLeft)).el.outerHTML,t=o.currentNode;else{if(L<r)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(h.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(h.lastIndex=0,l=h.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!t.style.marginLeft||i&&t.style.marginLeft&&i===t.style.marginLeft)&&(w=!0),i=t.style.marginLeft,w||l===undefined?(s=F(t,e),t.nextSibling&&t.nextSibling.innerText!=undefined&&t.nextSibling.innerText!=undefined&&!p.includes('class="decimal_type"')&&(isNaN(parseInt(t.nextSibling.innerText.trim().split(".")[1],10))||(p=p.substring(3,0)+' class="decimal_type"'+p.substring(3,p.length))),p+=s):(1==L&&(p+="</"+d+">",S=!0,a=null),p+=(o=O(t,e,L,t.style.marginLeft)).el.outerHTML,t=o.currentNode);var M=t&&t.nextElementSibling;if(M&&(a=M.previousElementSibling),t&&!_(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}t&&t.parentNode&&t.parentNode.removeChild(t),t=M}}S||(p+="</"+d+">");var H=document.createElement("div");return H.innerHTML=p,{el:H,currentNode:t}}(t,d).el,n=null;return(n=r?r.nextSibling:e.firstChild)?e.insertBefore(i,n):e.appendChild(i),!1}return"FONT"===t.tagName&&(o&&"LibreOffice"===o[0]||d["."+t.getAttribute("class")])?t=y(t,"span"):o&&"\x3c!--StartFragment--\x3e"===o[0]&&"UL"===t.tagName&&(I(t).find("li span").each(function(){"&nbsp;"===I(this).html()&&(0<I(this).prev().text().trim().length?I(this).remove():I(this).html("&ZeroWidthSpace;"))}),I(t).is("ul")&&t.setAttribute("style",h(t,["margin","margin-left","list-style-type"])),I(t).find("ul").each(function(){this.setAttribute("style",h(this,["margin","margin-left","list-style-type"]))})),"img"!==t.tagName.toLowerCase()&&function s(e){Array.from(e.attributes).map(function(t){return t.name}).filter(function(t){return t.toLowerCase().startsWith("data-")||t.toLowerCase().startsWith("xml:")}).forEach(function(t){I(e).removeAttr(t)})}(t),b(t,d)}if(t.nodeType!==Node.COMMENT_NODE)return!0;if(-1<t.data.indexOf("[if !supportLineBreakNewLine]"))for(var l=t.nextSibling;l;)(l=t.nextSibling)&&w(l),l.data&&-1<l.data.indexOf("[endif]")&&(l=null);if(-1<t.data.indexOf("[if supportFields]")&&-1<t.data.indexOf("FORMCHECKBOX")){var a=document.createElement("input");a.type="checkbox",t.parentNode.insertBefore(a,t.nextSibling)}return w(t),!1}),n.innerHTML=function c(t){var e=I(document.createElement("div")).attr("id","top-level");e.html(t);for(var r=e[0].querySelectorAll("ol, ul"),i=0;i<r.length;i++)if(I(r[i]).parentsUntil("#top-level","ol, ul").length){r[i].style.removeProperty("margin-left");for(var n=r[i].children,l=0;l<n.length;l++)"LI"==n[l].tagName&&n[l].style.removeProperty("margin-left")}return e[0].innerHTML}(n.innerHTML),m(n,function(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName;if(!t.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(e)){for(var r=t.parentNode;r&&(w(t),!(t=r).innerHTML)&&"TD"!==t.parentNode.tagName;)r=t.parentNode;return!1}!function u(t){var e=t.getAttribute("style");if(e){(e=H(e))&&";"!==e.slice(-1)&&(e+=";");var r=e.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var l=r[n].split(":");2===l.length&&("text-align"===l[0]&&"SPAN"===t.tagName||(i[l[0]]=l[1]))}var a="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(f){o=null}if(o){var d=E.opts.fontSizeUnit;"px"===d?(o=Math.round(1.33*o),i[s]=o+"px;"):"pt"===d&&(o=Math.round(o),i[s]=o+"pt;")}}a+=s+":"+i[s]}a&&t.setAttribute("style",a)}}}(t)}return!0}),m(n,function(t){if(t&&"A"===t.nodeName&&""===t.href){for(var e=document.createDocumentFragment();t.firstChild;)e.appendChild(t.firstChild);t.parentNode.replaceChild(e,t)}return!0}),m(n,function(t){return t&&"P"===t.tagName&&"DIV"===t.parentNode.tagName&&1==t.parentNode.children.length&&I(t).unwrap(),!0});var s=n.outerHTML,f=E.opts.htmlAllowedStyleProps;return E.opts.htmlAllowedStyleProps=E.opts.wordAllowedStyleProps,s=E.clean.html(s,E.opts.wordDeniedTags,E.opts.wordDeniedAttrs,!1),E.opts.htmlAllowedStyleProps=f,s}return{_init:function t(){E.events.on("paste.wordPaste",function(t){return n=t,E.opts.wordPasteModal?function l(){if(!a){var t='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+E.language.translate("Word Paste Detected")+"</h4>",e=function n(){var t='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return t+='<p style="text-align: left;">'+E.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",t+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+E.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+E.language.translate("Keep")+"</button></div>",t+="</div>"}(),r=E.modals.create(s,t,e),i=r.$body;a=r.$modal,r.$modal.addClass("fr-middle"),E.events.$on(i,"click","button.fr-remove-word",function(){var t=a.data("instance")||E;t.wordPaste.clean()},!0),E.events.$on(i,"click","button.fr-keep-word",function(){var t=a.data("instance")||E;t.wordPaste.clean(!0)},!0),E.events.$on(I(E.o_win),"resize",function(){E.modals.resize(s)})}E.modals.show(s),E.modals.resize(s)}():e(E.opts.wordPasteKeepFormatting),!1})},clean:e,_wordClean:l}}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(M){"use strict";function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function o(t){return function e(t){if(Array.isArray(t))return l(t)}(t)||function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function i(t,e){if(t){if("string"==typeof t)return l(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(t)||function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}M=M&&M.hasOwnProperty("default")?M["default"]:M,Object.assign(M.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),M.PLUGINS.wordPaste=function(A){var a,n,C,P=A.$,s="word_paste",p={},E=!0;function e(t){var e=A.opts.wordAllowedStyleProps;t||(A.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=l(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(t,e){for(var r="",i=0;i++<e.length;)r+="&nbsp;";return r}),A.paste.getRtfClipboard());var r=A.doc.createElement("DIV");r.innerHTML=n,A.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=A.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){A.modals.hide(s)}(),A.helpers.isMobile()&&A.events.focus(),A.paste.clean(n,!0,!0),A.opts.wordAllowedStyleProps=e}function S(t){t.parentNode&&t.parentNode.removeChild(t)}function m(t,e){if(e(t))for(var r=t.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,m(i,e),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:t.firstChild&&(r=t.firstChild.nextSibling)):r=n?n.nextSibling:t.firstChild}}function D(t){return P(t).hasClass("ListContainerWrapper")&&0<P(t).find("ol").length}function _(t){return P(t).hasClass("ListContainerWrapper")&&0<P(t).find("ul").length}function $(t){if(D(t)||_(t))return!0;if(!t.getAttribute("style")||!/mso-list:[\s]*l/gi.test(t.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!t.querySelector('[style="mso-list:Ignore"]'))return!!(t.outerHTML&&0<=t.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(e){return!1}return!0}function F(t){return D(t)||_(t)?P(t).find("li").attr("data-aria-level"):t.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function k(t,i){var e=t.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(t.tagName)){var r=document.createElement(t.tagName.toLowerCase());r.setAttribute("style",t.getAttribute("style")),r.innerHTML=e.innerHTML,e.innerHTML=r.outerHTML}m(e,function(t){if(t.nodeType==Node.COMMENT_NODE&&(A.browser.msie||A.browser.safari||A.browser.edge))try{if("[if !supportLists]"===t.data){for(t=t.nextSibling;t&&t.nodeType!==Node.COMMENT_NODE;){var e=t.nextSibling;t.parentNode.removeChild(t),t=e}t&&t.nodeType==Node.COMMENT_NODE&&t.parentNode.removeChild(t)}}catch(r){return!1}return t.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===t.getAttribute("style")&&t.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===t.getAttribute("style")&&t.parentNode.removeChild(t),t.setAttribute("style",h(t)),b(t,i)),!0});var n=D(t)?P(t).find("li").get(0).innerHTML:e.innerHTML;if(D(t)||_(t)){n="";for(var l=P(t).find("li"),a=0;a<l.length;a++){var s=P(l.get(a).innerHTML);s.find("span").each(function(){"&nbsp;"===P(this).html()&&(0<P(this).prev().text().trim().length?P(this).remove():P(this).html("&ZeroWidthSpace;"))});var o=l[a].style.marginLeft;o?(o=parseFloat(parseFloat(o).toFixed(2))+o.match(/[a-zA-Z]+/g)[0],n+='<li style = "margin-left: '.concat(o,';">').concat(s.get(0).innerHTML,"</li>")):n+="<li >".concat(s.get(0).innerHTML,"</li>")}}else{var d,f=null===(d=P(t).find("p").get(0))||void 0===d?void 0:d.style.marginLeft;n=f?(f=parseFloat(parseFloat(f).toFixed(2))+f.match(/[a-zA-Z]+/g)[0],'<li style = "margin-left: '.concat(f,';">').concat(n,"</li>")):"<li>".concat(n,"</li>")}return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function h(t){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:null,r="",i=["line-height","font-family","font-size","color","background"].concat(o(e||[])),n=t.getAttribute("style");return n&&i.forEach(function(e){var t=n.split(";").find(function(t){return t.trim().includes(e+":")});t&&(t.includes("mso")&&(t=t.match(new RegExp(e+":.*(;|)"))[0]),t.trim().startsWith(e)&&(r+=t+";"))}),r}function y(t,e){for(var r=document.createElement(e),i=0;i<t.attributes.length;i++){var n=t.attributes[i].name;"FONT"===t.tagName&&(A.browser.msie&&["id","class","style"].indexOf(n)<0||!A.browser.msie&&CSS.supports(n,t.getAttribute(n)))?P(r).css(n,t.getAttribute(n)):r.setAttribute(n,t.getAttribute(n))}return r.innerHTML=t.innerHTML,t.parentNode.replaceChild(r,t),r}function x(t,e){A.node.clearAttributes(t);for(var r=t.firstElementChild,i=0,n=!1,l=null;r;){if(r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:"))for(var a=0;a<r.children.length;a++)"<('[^']*'|\"[^\"]*\"|[^\"'>])*>"==r.children[a]&&(r.innerHTML+=r.children[a]);(l=r.getAttribute("width"))||(l=r.style.width),l||n||(n=!0),i+=parseInt(l,10),(!r.firstChild||r.firstChild&&r.firstChild.data===M.UNICODE_NBSP)&&(r.firstChild&&S(r.firstChild),r.innerHTML="<br>");for(var s=r.firstElementChild,o=1===r.children.length;s;)"P"!==s.tagName||$(s)||o&&T(s),s=s.nextElementSibling;if(e){var d=r.getAttribute("class");if(d){var f=(d=L(d)).match(/xl[0-9]+/gi);if(f){var u="."+f[0];e[u]&&w(r,e[u])}}e.td&&w(r,e.td)}var g=r.getAttribute("style");g&&(g=L(g))&&";"!==g.slice(-1)&&(g+=";");var c=r.getAttribute("valign");if(!c&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(c=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var m=null;if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&(m=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===m&&(m=null)}var v=null;if(g){var b=g.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var y=r.getAttribute("colspan"),x=r.getAttribute("rowspan");y&&r.setAttribute("colspan",y),x&&r.setAttribute("rowspan",x),c&&(r.style["vertical-align"]=c),m&&(r.style["text-align"]=m),v&&(r.style["background-color"]=v),l&&r.setAttribute("width",l),r=r.nextElementSibling}for(r=t.firstElementChild;r;)l=r.getAttribute("width"),n&&r.removeAttribute("width"),r=r.nextElementSibling;t.previousSibling?C!=i&&(E=!1):C=i,t.nextElementSibling||function N(t){var e=t.closest("table"),r=0,n=function n(){var i=0;Array.from(t.children).forEach(function(t){var e=parseInt(t.getAttribute("width"),10);isNaN(e)||(i+=e)}),r<i&&(r=i),E?Array.from(t.children).forEach(function(t){var e=parseInt(t.getAttribute("width"),10);if(!isNaN(e)&&0<i){var r=100*e/i;t.setAttribute("width","".concat(r,"%"))}}):Array.from(t.children).forEach(function(t){var e=parseInt(t.getAttribute("width"),10);isNaN(e)||t.setAttribute("width","".concat(e,"px"))}),t=t.previousElementSibling};for(;t;)n();if(e&&0<r){var i=parseInt(e.style.width,10);(isNaN(i)||0===i)&&(e.style.width="".concat(r,"px"))}}(t)}function T(t){var e=t.getAttribute("align");e&&(t.style["text-align"]=e,t.removeAttribute("align"))}function L(t){return t.replace(/\n|\r|\n\r|&quot;/g,"")}function w(t,e,r){if(e){var i=t.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),e&&";"!==e.slice(-1)&&(e+=";"),e=e.replace(/\n/gi,"");var n=null;n=r?(i||"")+e:e+(i||""),t.setAttribute("style",n)}}var c=null;function d(t,e,r){for(var i=t.split(r),n=1;n<i.length;n++){var l=i[n];if(1<(l=l.split("shplid")).length){l=l[1];for(var a="",s=0;s<l.length&&"\\"!==l[s]&&"{"!==l[s]&&" "!==l[s]&&"\r"!==l[s]&&"\n"!==l[s];)a+=l[s],s++;var o=l.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");c[e+a]={image_hex:g,image_type:d}}}}function v(t,e){if(e){var r;if("IMG"===t.tagName){var i=t.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&A.helpers.isURL(t.getAttribute("alt")))return void t.setAttribute("src",t.getAttribute("alt"));(r=p[t.getAttribute("v:shapes")])||(r=t.getAttribute("v:shapes"),t.parentNode&&t.parentNode.parentNode&&0<=t.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=t.parentNode.getAttribute("o:spid");if(t.removeAttribute("height"),r){!function s(t){c={},d(t,"i","\\shppict"),d(t,"s","\\shp{")}(e);var n=c[r.substring(7)];if(n){var l=function o(t){for(var e=t.match(/[0-9a-f]{2}/gi),r=[],i=0;i<e.length;i++)r.push(String.fromCharCode(parseInt(e[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),a="data:"+n.image_type+";base64,"+l;"IMG"===t.tagName?(t.src=a,t.setAttribute("data-fr-image-pasted",!0)):P(t).parent().before('<img data-fr-image-pasted="true" src="'.concat(a,'" style="').concat(t.parentNode.getAttribute("style"),'">')).remove()}}}}function b(t,e){var r=t.tagName,i=r.toLowerCase();t.firstElementChild&&("I"===t.firstElementChild.tagName?y(t.firstElementChild,"em"):"B"===t.firstElementChild.tagName&&y(t.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return S(t),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<n.length;l++)if(-1!==r.indexOf(n[l]))return t.innerHTML&&(t.outerHTML=t.innerHTML),S(t),!1;if("TD"!==r){var a=t.getAttribute("class")||"MsoNormal";if(e&&a){for(var s=(a=L(a)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var u=0;u<d.length;u++)e[d[u]]&&w(t,e[d[u]])}t.removeAttribute("class")}e&&e[i]&&w(t,e[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var g=t.getAttribute("class");if(g&&(e&&e[r.toLowerCase()+"."+g]&&w(t,e[r.toLowerCase()+"."+g]),-1!==g.toLowerCase().indexOf("mso"))){var c=L(g);(c=c.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?t.setAttribute("class",c):t.removeAttribute("class")}var p=t.getAttribute("style");if(p){var m=p.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}T(t)}if("TR"===r&&x(t,e),"A"!==r||t.attributes.getNamedItem("href")||t.attributes.getNamedItem("name")||!t.innerHTML||(t.outerHTML=t.innerHTML),"A"==r&&t.getAttribute("href")&&t.querySelector("img"))for(var h=t.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||t.innerHTML||(t.innerHTML="<br>"),t.getAttribute("lang")&&t.removeAttribute("lang"),t.getAttribute("style")&&-1!==t.getAttribute("style").toLowerCase().indexOf("mso")){var b=L(t.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?t.setAttribute("style",b):t.removeAttribute("style")}return!0}function l(t,e){0<=t.indexOf("<html")&&(t=t.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));var o=t.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function u(t){for(var e=t.split("v:shape"),r=1;r<e.length;r++){var i=e[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var l=i.split(' o:spid="')[1];l&&1<l.length&&(l=l.split('"')[0],p[n]=l)}}}(t);var r=(new DOMParser).parseFromString(t,"text/html"),i=r.head,n=r.body,d=function g(t){var e={},r=t.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var l=i[n],a=l.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=l.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");a=a.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),a=a.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=a.split(", "),d=0;d<o.length;d++)e[o[d]]=s}}return e}(i);m(n,function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute("style")){var e=t.getAttribute("style");t.setAttribute("style",e),t.style.fontFamily||t.setAttribute("style",function r(t){return t.replace(/mso-(bidi|fareast|fareast-theme)-font-family/g,"font-family")}(e))}return!0}),m(n,function(t){if(t.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(t.data)){if(!/\S| /.test(t.data)&&!/[\u00a0]+/.test(t.data))return t.data===M.UNICODE_NBSP?(t.data="\u200b",!0):1===t.data.length&&10===t.data.charCodeAt(0)?(t.data=" ",!0):(S(t),!1);t.data=t.data.replace(/\n|\r/gi," ")}return!0}),m(n,function(t){return t.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==t.tagName&&"IMG"!==t.tagName||v(t,e),!0});for(var l=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),a=l.length-1;0<=a;a--)l[a].previousElementSibling&&"LI"===l[a].previousElementSibling.tagName&&l[a].previousElementSibling.appendChild(l[a]);m(n,function(t){if(t.nodeType===Node.TEXT_NODE)return t.data=t.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(t.nodeType===Node.ELEMENT_NODE){if($(t)){var e=t.parentNode,r=t.previousSibling,i=function I(t,e,r,i){var n,l,a,s,o,d,f,u=navigator.userAgent.toLowerCase();-1!=u.indexOf("safari")&&(u=-1<u.indexOf("chrome")?1:"safari"),t.innerHTML.includes("mso-list:\nIgnore")&&(t.innerHTML=t.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var g,c,p,m,h=/[0-9a-zA-Z]./gi,v="",b=D(t),y=null===(n=P(t).find("ol"))||void 0===n||null===(n=n.attr("style"))||void 0===n||null===(n=n.split(";"))||void 0===n?void 0:n.find(function(t){return t.trim().startsWith("list-style-type")});y==undefined&&_(t)&&(y=null===(c=P(t).find("ul"))||void 0===c||null===(c=c.attr("style"))||void 0===c||null===(c=c.split(";"))||void 0===c?void 0:c.find(function(t){return t.trim().startsWith("list-style-type")}));if(b)d="ol",f=y?"list-style-type: "+y.replace("list-style-type:","").trim()+";":"";else if(_(t))d="ul",f=y?"list-style-type: "+y.replace("list-style-type:","").trim()+";":"";else{var x=t.querySelector('span[style="mso-list:Ignore"]');null==x&&"safari"==u&&(x=t.querySelector('span[lang="PT-BR"]'));var N=!1;x&&(N=N||h.test(x.textContent)),null!==x&&(g=x.textContent.trim().split(".")[0]),d=1==N?(g=(g=x.textContent.trim().split(".")[0]).replace(/\(([^)]+)\)/g,"$1"),isNaN(parseInt(g))?/^(m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3}))$/.test(g)?(f="lower-roman;",t.nextElementSibling&&1===t.nextElementSibling.textContent.trim().split(".")[0].length&&(f="lower-alpha;")):/^(M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3}))$/.test(g)?(f="upper-roman;",t.nextElementSibling&&1===t.nextElementSibling.textContent.trim().split(".")[0].length&&(f="upper-alpha;")):"o"==g?f="circle;":g.match(/^v$/)||(g.match(/^[a-z]$/)||g.match(/^[a-z]\)$/)?f="lower-alpha;":(g.match(/^[A-Z]$/)||g.match(/^[A-Z]\)$/))&&(f="upper-alpha;")):f="decimal;",f="list-style-type: "+f,"ol"):(null!=x&&(g=x.textContent.trim().split(".")[0]),"\xa7"==g?f="square;":"\xb7"==g&&(f="disc;"),f="list-style-type: "+f,"ul"),x==undefined||x.textContent==undefined||isNaN(parseInt(x.textContent.trim().split(".")[1],10))||(v=' class="decimal_type" ')}var A=1,C="",E=(F(t),t.style.marginLeft),S="";E.includes("in")?(S="in",E=parseFloat(E)-.5):E.includes("pt")&&(S="px",E=parseFloat(E)-10),E&&(m=" margin-left: "+E+S+";"),A="list-style-type: upper-alpha;"==f?b?parseInt(P(t).find("ol").attr("start")):g.charCodeAt(0)-64:"list-style-type: lower-alpha;"==f?b?parseInt(P(t).find("ol").attr("start")):g.charCodeAt(0)-96:"list-style-type: upper-roman;"==f||"list-style-type: lower-roman;"==f?b?parseInt(P(t).find("ol").attr("start")):function O(t){for(var e={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3,i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},r=0,i=0,n=t.length-1;0<=n;n--){var l=e[t[n]];i<=l?r+=l:r-=l,i=l}return r}(g):b?parseInt(P(t).find("ol").attr("start")):parseInt(g),C+=f||"",C+=m||"",p="<"+d,p+=v||"",p+="ol"!=d||1==A||isNaN(A)?"":' start = "'+A+'"',p+=C?' style = "'+C+'"':"",p+=">";for(var T=!1;t;){if(!$(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var L=F(t);if((r=r||L)<L)p+=(o=I(t,e,L,t.style.marginLeft)).el.outerHTML,t=o.currentNode;else{if(L<r)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(h.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(h.lastIndex=0,l=h.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!t.style.marginLeft||i&&t.style.marginLeft&&i===t.style.marginLeft)&&(w=!0),i=t.style.marginLeft,w||l===undefined?(s=k(t,e),t.nextSibling&&t.nextSibling.innerText!=undefined&&t.nextSibling.innerText!=undefined&&!p.includes('class="decimal_type"')&&(isNaN(parseInt(t.nextSibling.innerText.trim().split(".")[1],10))||(p=p.substring(3,0)+' class="decimal_type"'+p.substring(3,p.length))),p+=s):(1==L&&(p+="</"+d+">",T=!0,a=null),p+=(o=I(t,e,L,t.style.marginLeft)).el.outerHTML,t=o.currentNode);var M=t&&t.nextElementSibling;if(M&&(a=M.previousElementSibling),t&&!$(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}t&&t.parentNode&&t.parentNode.removeChild(t),t=M}}T||(p+="</"+d+">");var H=document.createElement("div");return H.innerHTML=p,{el:H,currentNode:t}}(t,d).el,n=null;return(n=r?r.nextSibling:e.firstChild)?e.insertBefore(i,n):e.appendChild(i),!1}return"FONT"===t.tagName&&(o&&"LibreOffice"===o[0]||d["."+t.getAttribute("class")])?t=y(t,"span"):o&&"\x3c!--StartFragment--\x3e"===o[0]&&"UL"===t.tagName&&(P(t).find("li span").each(function(){"&nbsp;"===P(this).html()&&(0<P(this).prev().text().trim().length?P(this).remove():P(this).html("&ZeroWidthSpace;"))}),P(t).is("ul")&&t.setAttribute("style",h(t,["margin","margin-left","list-style-type"])),P(t).find("ul").each(function(){this.setAttribute("style",h(this,["margin","margin-left","list-style-type"]))})),"img"!==t.tagName.toLowerCase()&&function s(e){Array.from(e.attributes).map(function(t){return t.name}).filter(function(t){return t.toLowerCase().startsWith("data-")||t.toLowerCase().startsWith("xml:")}).forEach(function(t){P(e).removeAttr(t)})}(t),b(t,d)}if(t.nodeType!==Node.COMMENT_NODE)return!0;if(-1<t.data.indexOf("[if !supportLineBreakNewLine]"))for(var l=t.nextSibling;l;)(l=t.nextSibling)&&S(l),l.data&&-1<l.data.indexOf("[endif]")&&(l=null);if(-1<t.data.indexOf("[if supportFields]")&&-1<t.data.indexOf("FORMCHECKBOX")){var a=document.createElement("input");a.type="checkbox",t.parentNode.insertBefore(a,t.nextSibling)}return S(t),!1}),n.innerHTML=function c(t){var e=P(document.createElement("div")).attr("id","top-level");e.html(t);for(var r=e[0].querySelectorAll("ol, ul"),i=0;i<r.length;i++)if(P(r[i]).parentsUntil("#top-level","ol, ul").length){r[i].style.removeProperty("margin-left");for(var n=r[i].children,l=0;l<n.length;l++)"LI"==n[l].tagName&&n[l].style.removeProperty("margin-left")}return e[0].innerHTML}(n.innerHTML),m(n,function(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName;if(!t.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(e)){for(var r=t.parentNode;r&&(S(t),!(t=r).innerHTML)&&"TD"!==t.parentNode.tagName;)r=t.parentNode;return!1}!function u(t){var e=t.getAttribute("style");if(e){(e=L(e))&&";"!==e.slice(-1)&&(e+=";");var r=e.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var l=r[n].split(":");2===l.length&&("text-align"===l[0]&&"SPAN"===t.tagName||(i[l[0]]=l[1]))}var a="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(f){o=null}if(o){var d=A.opts.fontSizeUnit;"px"===d?(o=Math.round(1.33*o),i[s]=o+"px;"):"pt"===d&&(o=Math.round(o),i[s]=o+"pt;")}}a+=s+":"+i[s]}a&&t.setAttribute("style",a)}}}(t)}return!0}),m(n,function(t){if(t&&"A"===t.nodeName&&""===t.href){for(var e=document.createDocumentFragment();t.firstChild;)e.appendChild(t.firstChild);t.parentNode.replaceChild(e,t)}return!0}),m(n,function(t){return t&&"P"===t.tagName&&"DIV"===t.parentNode.tagName&&1==t.parentNode.children.length&&P(t).unwrap(),!0}),m(n,function(t){if(t&&"SPAN"===t.tagName)for(;t.nextSibling&&t.nextSibling.nodeType===Node.ELEMENT_NODE&&"SPAN"===t.nextSibling.tagName&&t.getAttribute("style")===t.nextSibling.getAttribute("style");)P(t).append(t.nextSibling.innerHTML),P(t.nextSibling).remove();return!0});var s=n.outerHTML,f=A.opts.htmlAllowedStyleProps;return A.opts.htmlAllowedStyleProps=A.opts.wordAllowedStyleProps,s=A.clean.html(s,A.opts.wordDeniedTags,A.opts.wordDeniedAttrs,!1),A.opts.htmlAllowedStyleProps=f,s}return{_init:function t(){A.events.on("paste.wordPaste",function(t){return n=t,A.opts.wordPasteModal?function l(){if(!a){var t='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+A.language.translate("Word Paste Detected")+"</h4>",e=function n(){var t='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return t+='<p style="text-align: left;">'+A.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",t+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+A.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+A.language.translate("Keep")+"</button></div>",t+="</div>"}(),r=A.modals.create(s,t,e),i=r.$body;a=r.$modal,r.$modal.addClass("fr-middle"),A.events.bindClick(i,"button.fr-remove-word",function(){var t=a.data("instance")||A;t.wordPaste.clean()}),A.events.bindClick(i,"button.fr-keep-word",function(){var t=a.data("instance")||A;t.wordPaste.clean(!0)}),A.events.$on(P(A.o_win),"resize",function(){A.modals.resize(s)})}A.modals.show(s),A.modals.resize(s)}():e(A.opts.wordPasteKeepFormatting),!1})},clean:e,_wordClean:l}}});
/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

/*!
* froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2024 Froala Labs

{
"name": "froala-editor",
"version": "4.3.0",
"version": "4.3.1",
"types":"index.d.ts",

@@ -5,0 +5,0 @@ "description": "The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc