diff --git a/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss b/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss
index 506c42b4d2..713162df6b 100755
--- a/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss
+++ b/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss
@@ -446,9 +446,17 @@ div.mce-fullscreen {
.mce-btn {
border-radius: $default-border-radius;
+ border: 0 none;
button {
- padding: 0.5em 1.5em;
+ padding: 0.3em 1.5em;
+ width: auto !important;
+ height: auto !important;
+ border: 1px solid $button-border-color;
+ }
+
+ .mce-txt {
+ vertical-align: middle;
}
}
}
diff --git a/lib/alchemy/tinymce.rb b/lib/alchemy/tinymce.rb
index 5c5f4e9f70..558c631eeb 100644
--- a/lib/alchemy/tinymce.rb
+++ b/lib/alchemy/tinymce.rb
@@ -22,7 +22,8 @@ module Tinymce
convert_urls: false,
entity_encoding: 'raw',
paste_as_text: true,
- element_format: 'html'
+ element_format: 'html',
+ branding: false
}
class << self
diff --git a/vendor/assets/javascripts/tinymce/langs/de.js b/vendor/assets/javascripts/tinymce/langs/de.js
index 9a31056850..026b2525f7 100755
--- a/vendor/assets/javascripts/tinymce/langs/de.js
+++ b/vendor/assets/javascripts/tinymce/langs/de.js
@@ -1,219 +1,260 @@
tinymce.addI18n('de',{
+"Redo": "Wiederholen",
+"Undo": "R\u00fcckg\u00e4ngig",
"Cut": "Ausschneiden",
-"Heading 5": "\u00dcberschrift 5",
-"Header 2": "\u00dcberschrift 2",
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Ihr Browser unterst\u00fctzt leider keinen direkten Zugriff auf die Zwischenablage. Bitte benutzen Sie die Strg + X \/ C \/ V Tastenkombinationen.",
-"Heading 4": "\u00dcberschrift 4",
-"Div": "Textblock",
-"Heading 2": "\u00dcberschrift 2",
+"Copy": "Kopieren",
"Paste": "Einf\u00fcgen",
-"Close": "Schlie\u00dfen",
-"Font Family": "Schriftart",
-"Pre": "Vorformatierter Text",
-"Align right": "Rechtsb\u00fcndig ausrichten",
+"Select all": "Alles ausw\u00e4hlen",
"New document": "Neues Dokument",
-"Blockquote": "Zitat",
+"Ok": "Ok",
+"Cancel": "Abbrechen",
+"Visual aids": "Visuelle Hilfen",
+"Bold": "Fett",
+"Italic": "Kursiv",
+"Underline": "Unterstrichen",
+"Strikethrough": "Durchgestrichen",
+"Superscript": "Hochgestellt",
+"Subscript": "Tiefgestellt",
+"Clear formatting": "Formatierung entfernen",
+"Align left": "Linksb\u00fcndig ausrichten",
+"Align center": "Zentriert ausrichten",
+"Align right": "Rechtsb\u00fcndig ausrichten",
+"Justify": "Blocksatz",
+"Bullet list": "Aufz\u00e4hlung",
"Numbered list": "Nummerierte Liste",
-"Heading 1": "\u00dcberschrift 1",
-"Headings": "\u00dcberschriften",
+"Decrease indent": "Einzug verkleinern",
"Increase indent": "Einzug vergr\u00f6\u00dfern",
+"Close": "Schlie\u00dfen",
"Formats": "Formate",
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Ihr Browser unterst\u00fctzt leider keinen direkten Zugriff auf die Zwischenablage. Bitte benutzen Sie die Strg + X \/ C \/ V Tastenkombinationen.",
"Headers": "\u00dcberschriften",
-"Select all": "Alles ausw\u00e4hlen",
-"Header 3": "\u00dcberschrift 3",
-"Blocks": "Absatzformate",
-"Undo": "R\u00fcckg\u00e4ngig",
-"Strikethrough": "Durchgestrichen",
-"Bullet list": "Aufz\u00e4hlung",
"Header 1": "\u00dcberschrift 1",
-"Superscript": "Hochgestellt",
-"Clear formatting": "Formatierung entfernen",
-"Font Sizes": "Schriftgr\u00f6\u00dfe",
-"Subscript": "Tiefgestellt",
-"Header 6": "\u00dcberschrift 6",
-"Redo": "Wiederholen",
-"Paragraph": "Absatz",
-"Ok": "Ok",
-"Bold": "Fett",
-"Code": "Quelltext",
-"Italic": "Kursiv",
-"Align center": "Zentriert ausrichten",
+"Header 2": "\u00dcberschrift 2",
+"Header 3": "\u00dcberschrift 3",
+"Header 4": "\u00dcberschrift 4",
"Header 5": "\u00dcberschrift 5",
-"Heading 6": "\u00dcberschrift 6",
+"Header 6": "\u00dcberschrift 6",
+"Headings": "\u00dcberschriften",
+"Heading 1": "\u00dcberschrift 1",
+"Heading 2": "\u00dcberschrift 2",
"Heading 3": "\u00dcberschrift 3",
-"Decrease indent": "Einzug verkleinern",
-"Header 4": "\u00dcberschrift 4",
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Einf\u00fcgen ist nun im einfachen Textmodus. Inhalte werden ab jetzt als unformatierter Text eingef\u00fcgt, bis Sie diese Einstellung wieder ausschalten!",
-"Underline": "Unterstrichen",
-"Cancel": "Abbrechen",
-"Justify": "Blocksatz",
+"Heading 4": "\u00dcberschrift 4",
+"Heading 5": "\u00dcberschrift 5",
+"Heading 6": "\u00dcberschrift 6",
+"Div": "Textblock",
+"Pre": "Vorformatierter Text",
+"Code": "Quelltext",
+"Paragraph": "Absatz",
+"Blockquote": "Zitat",
"Inline": "Zeichenformate",
-"Copy": "Kopieren",
-"Align left": "Linksb\u00fcndig ausrichten",
-"Visual aids": "Visuelle Hilfen",
-"Lower Greek": "Griechische Kleinbuchstaben",
-"Square": "Quadrat",
+"Blocks": "Absatzformate",
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Einf\u00fcgen ist nun im einfachen Textmodus. Inhalte werden ab jetzt als unformatierter Text eingef\u00fcgt, bis Sie diese Einstellung wieder ausschalten!",
+"Font Family": "Schriftart",
+"Font Sizes": "Schriftgr\u00f6\u00dfe",
+"Class": "Klasse",
+"Browse for an image": "Bild...",
+"OR": "ODER",
+"Drop an image here": "Bild hier ablegen",
+"Upload": "Hochladen",
+"Block": "Block",
+"Align": "Ausrichtung",
"Default": "Standard",
-"Lower Alpha": "Kleinbuchstaben",
"Circle": "Kreis",
"Disc": "Punkt",
+"Square": "Quadrat",
+"Lower Alpha": "Kleinbuchstaben",
+"Lower Greek": "Griechische Kleinbuchstaben",
+"Lower Roman": "R\u00f6mische Zahlen (Kleinbuchstaben)",
"Upper Alpha": "Gro\u00dfbuchstaben",
"Upper Roman": "R\u00f6mische Zahlen (Gro\u00dfbuchstaben)",
-"Lower Roman": "R\u00f6mische Zahlen (Kleinbuchstaben)",
-"Name": "Name",
"Anchor": "Textmarke",
+"Name": "Name",
+"Id": "Kennung",
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "Die Kennung sollte mit einem Buchstaben anfangen. Nachfolgend nur Buchstaben, Zahlen, Striche (Minus), Punkte, Kommas und Unterstriche.",
"You have unsaved changes are you sure you want to navigate away?": "Die \u00c4nderungen wurden noch nicht gespeichert, sind Sie sicher, dass Sie diese Seite verlassen wollen?",
"Restore last draft": "Letzten Entwurf wiederherstellen",
"Special character": "Sonderzeichen",
"Source code": "Quelltext",
-"B": "B",
+"Insert\/Edit code sample": "Codebeispiel einf\u00fcgen\/bearbeiten",
+"Language": "Sprache",
+"Code sample": "Codebeispiel",
+"Color": "Farbe",
"R": "R",
"G": "G",
-"Color": "Farbe",
-"Right to left": "Von rechts nach links",
+"B": "B",
"Left to right": "Von links nach rechts",
+"Right to left": "Von rechts nach links",
"Emoticons": "Emoticons",
-"Robots": "Robots",
"Document properties": "Dokumenteigenschaften",
"Title": "Titel",
"Keywords": "Sch\u00fcsselw\u00f6rter",
-"Encoding": "Zeichenkodierung",
"Description": "Beschreibung",
+"Robots": "Robots",
"Author": "Verfasser",
+"Encoding": "Zeichenkodierung",
"Fullscreen": "Vollbild",
+"Action": "Aktion",
+"Shortcut": "Shortcut",
+"Help": "Hilfe",
+"Address": "Adresse",
+"Focus to menubar": "Fokus auf Men\u00fcleiste",
+"Focus to toolbar": "Fokus auf Werkzeugleiste",
+"Focus to element path": "Fokus auf Elementpfad",
+"Focus to contextual toolbar": "Fokus auf kontextbezogene Werkzeugleiste",
+"Insert link (if link plugin activated)": "Link einf\u00fcgen (wenn Link-Plugin aktiviert ist)",
+"Save (if save plugin activated)": "Speichern (wenn Save-Plugin aktiviert ist)",
+"Find (if searchreplace plugin activated)": "Suchen einf\u00fcgen (wenn Suchen\/Ersetzen-Plugin aktiviert ist)",
+"Plugins installed ({0}):": "installierte Plugins ({0}):",
+"Premium plugins:": "Premium Plugins:",
+"Learn more...": "Erfahren Sie mehr dazu...",
+"You are using {0}": "Sie verwenden {0}",
+"Plugins": "Plugins",
+"Handy Shortcuts": "Handy Shortcuts",
"Horizontal line": "Horizontale Linie",
-"Horizontal space": "Horizontaler Abstand",
"Insert\/edit image": "Bild einf\u00fcgen\/bearbeiten",
-"General": "Allgemein",
-"Advanced": "Erweitert",
+"Image description": "Bildbeschreibung",
"Source": "Quelle",
-"Border": "Rahmen",
+"Dimensions": "Abmessungen",
"Constrain proportions": "Seitenverh\u00e4ltnis beibehalten",
-"Vertical space": "Vertikaler Abstand",
-"Image description": "Bildbeschreibung",
+"General": "Allgemein",
+"Advanced": "Erweitert",
"Style": "Stil",
-"Dimensions": "Abmessungen",
+"Vertical space": "Vertikaler Abstand",
+"Horizontal space": "Horizontaler Abstand",
+"Border": "Rahmen",
"Insert image": "Bild einf\u00fcgen",
-"Zoom in": "Ansicht vergr\u00f6\u00dfern",
-"Contrast": "Kontrast",
-"Back": "Zur\u00fcck",
-"Gamma": "Gamma",
-"Flip horizontally": "Horizontal spiegeln",
-"Resize": "Skalieren",
-"Sharpen": "Sch\u00e4rfen",
-"Zoom out": "Ansicht verkleinern",
-"Image options": "Bildeigenschaften",
-"Apply": "Anwenden",
-"Brightness": "Helligkeit",
-"Rotate clockwise": "Im Uhrzeigersinn drehen",
+"Image": "Bild",
+"Image list": "Bildliste",
"Rotate counterclockwise": "Gegen den Uhrzeigersinn drehen",
+"Rotate clockwise": "Im Uhrzeigersinn drehen",
+"Flip vertically": "Vertikal spiegeln",
+"Flip horizontally": "Horizontal spiegeln",
"Edit image": "Bild bearbeiten",
-"Color levels": "Farbwerte",
+"Image options": "Bildeigenschaften",
+"Zoom in": "Ansicht vergr\u00f6\u00dfern",
+"Zoom out": "Ansicht verkleinern",
"Crop": "Bescheiden",
+"Resize": "Skalieren",
"Orientation": "Ausrichtung",
-"Flip vertically": "Vertikal spiegeln",
+"Brightness": "Helligkeit",
+"Sharpen": "Sch\u00e4rfen",
+"Contrast": "Kontrast",
+"Color levels": "Farbwerte",
+"Gamma": "Gamma",
"Invert": "Invertieren",
+"Apply": "Anwenden",
+"Back": "Zur\u00fcck",
"Insert date\/time": "Datum\/Uhrzeit einf\u00fcgen ",
-"Remove link": "Link entfernen",
-"Url": "URL",
-"Text to display": "Anzuzeigender Text",
-"Anchors": "Textmarken",
+"Date\/time": "Datum\/Uhrzeit",
"Insert link": "Link einf\u00fcgen",
-"New window": "Neues Fenster",
-"None": "Keine",
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http:\/\/\" voranstellen?",
+"Insert\/edit link": "Link einf\u00fcgen\/bearbeiten",
+"Text to display": "Anzuzeigender Text",
+"Url": "URL",
"Target": "Ziel",
+"None": "Keine",
+"New window": "Neues Fenster",
+"Remove link": "Link entfernen",
+"Anchors": "Textmarken",
+"Link": "Link",
+"Paste or type a link": "Link einf\u00fcgen oder eintippen",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",
-"Insert\/edit link": "Link einf\u00fcgen\/bearbeiten",
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http:\/\/\" voranstellen?",
+"Link list": "Linkliste",
+"Insert video": "Video einf\u00fcgen",
"Insert\/edit video": "Video einf\u00fcgen\/bearbeiten",
-"Poster": "Poster",
+"Insert\/edit media": "Medien einf\u00fcgen\/bearbeiten",
"Alternative source": "Alternative Quelle",
+"Poster": "Poster",
"Paste your embed code below:": "F\u00fcgen Sie Ihren Einbettungscode hier ein:",
-"Insert video": "Video einf\u00fcgen",
"Embed": "Einbetten",
+"Media": "Medium",
"Nonbreaking space": "Gesch\u00fctztes Leerzeichen",
"Page break": "Seitenumbruch",
"Paste as text": "Als Text einf\u00fcgen",
"Preview": "Vorschau",
"Print": "Drucken",
"Save": "Speichern",
-"Could not find the specified string.": "Die Zeichenfolge wurde nicht gefunden.",
+"Find": "Suchen",
+"Replace with": "Ersetzen durch",
"Replace": "Ersetzen",
+"Replace all": "Alles ersetzen",
+"Prev": "Zur\u00fcck",
"Next": "Weiter",
-"Whole words": "Nur ganze W\u00f6rter",
"Find and replace": "Suchen und ersetzen",
-"Replace with": "Ersetzen durch",
-"Find": "Suchen",
-"Replace all": "Alles ersetzen",
+"Could not find the specified string.": "Die Zeichenfolge wurde nicht gefunden.",
"Match case": "Gro\u00df-\/Kleinschreibung beachten",
-"Prev": "Zur\u00fcck",
+"Whole words": "Nur ganze W\u00f6rter",
"Spellcheck": "Rechtschreibpr\u00fcfung",
-"Finish": "Ende",
-"Ignore all": "Alles Ignorieren",
"Ignore": "Ignorieren",
+"Ignore all": "Alles Ignorieren",
+"Finish": "Ende",
"Add to Dictionary": "Zum W\u00f6rterbuch hinzuf\u00fcgen",
+"Insert table": "Tabelle einf\u00fcgen",
+"Table properties": "Tabelleneigenschaften",
+"Delete table": "Tabelle l\u00f6schen",
+"Cell": "Zelle",
+"Row": "Zeile",
+"Column": "Spalte",
+"Cell properties": "Zelleneigenschaften",
+"Merge cells": "Zellen verbinden",
+"Split cell": "Zelle aufteilen",
"Insert row before": "Neue Zeile davor einf\u00fcgen ",
-"Rows": "Zeilen",
-"Height": "H\u00f6he",
+"Insert row after": "Neue Zeile danach einf\u00fcgen",
+"Delete row": "Zeile l\u00f6schen",
+"Row properties": "Zeileneigenschaften",
+"Cut row": "Zeile ausschneiden",
+"Copy row": "Zeile kopieren",
+"Paste row before": "Zeile davor einf\u00fcgen",
"Paste row after": "Zeile danach einf\u00fcgen",
-"Alignment": "Ausrichtung",
-"Border color": "Rahmenfarbe",
-"Column group": "Spaltengruppe",
-"Row": "Zeile",
"Insert column before": "Neue Spalte davor einf\u00fcgen",
-"Split cell": "Zelle aufteilen",
-"Cell padding": "Zelleninnenabstand",
+"Insert column after": "Neue Spalte danach einf\u00fcgen",
+"Delete column": "Spalte l\u00f6schen",
+"Cols": "Spalten",
+"Rows": "Zeilen",
+"Width": "Breite",
+"Height": "H\u00f6he",
"Cell spacing": "Zellenabstand",
-"Row type": "Zeilentyp",
-"Insert table": "Tabelle einf\u00fcgen",
-"Body": "Inhalt",
+"Cell padding": "Zelleninnenabstand",
"Caption": "Beschriftung",
-"Footer": "Fu\u00dfzeile",
-"Delete row": "Zeile l\u00f6schen",
-"Paste row before": "Zeile davor einf\u00fcgen",
+"Left": "Linksb\u00fcndig",
+"Center": "Zentriert",
+"Right": "Rechtsb\u00fcndig",
+"Cell type": "Zellentyp",
"Scope": "G\u00fcltigkeitsbereich",
-"Delete table": "Tabelle l\u00f6schen",
+"Alignment": "Ausrichtung",
"H Align": "Horizontale Ausrichtung",
+"V Align": "Vertikale Ausrichtung",
"Top": "Oben",
-"Header cell": "Kopfzelle",
-"Column": "Spalte",
-"Row group": "Zeilengruppe",
-"Cell": "Zelle",
"Middle": "Mitte",
-"Cell type": "Zellentyp",
-"Copy row": "Zeile kopieren",
-"Row properties": "Zeileneigenschaften",
-"Table properties": "Tabelleneigenschaften",
"Bottom": "Unten",
-"V Align": "Vertikale Ausrichtung",
+"Header cell": "Kopfzelle",
+"Row group": "Zeilengruppe",
+"Column group": "Spaltengruppe",
+"Row type": "Zeilentyp",
"Header": "Kopfzeile",
-"Right": "Rechtsb\u00fcndig",
-"Insert column after": "Neue Spalte danach einf\u00fcgen",
-"Cols": "Spalten",
-"Insert row after": "Neue Zeile danach einf\u00fcgen",
-"Width": "Breite",
-"Cell properties": "Zelleneigenschaften",
-"Left": "Linksb\u00fcndig",
-"Cut row": "Zeile ausschneiden",
-"Delete column": "Spalte l\u00f6schen",
-"Center": "Zentriert",
-"Merge cells": "Zellen verbinden",
+"Body": "Inhalt",
+"Footer": "Fu\u00dfzeile",
+"Border color": "Rahmenfarbe",
"Insert template": "Vorlage einf\u00fcgen ",
"Templates": "Vorlagen",
+"Template": "Vorlage",
+"Text color": "Textfarbe",
"Background color": "Hintergrundfarbe",
"Custom...": "Benutzerdefiniert...",
"Custom color": "Benutzerdefinierte Farbe",
"No color": "Keine Farbe",
-"Text color": "Textfarbe",
-"Show blocks": " Bl\u00f6cke anzeigen",
+"Table of Contents": "Inhaltsverzeichnis",
+"Show blocks": "Bl\u00f6cke anzeigen",
"Show invisible characters": "Unsichtbare Zeichen anzeigen",
"Words: {0}": "W\u00f6rter: {0}",
-"Insert": "Einf\u00fcgen",
+"{0} words": "{0} W\u00f6rter",
"File": "Datei",
"Edit": "Bearbeiten",
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich-Text- Area. Dr\u00fccken Sie ALT-F9 f\u00fcr das Men\u00fc. Dr\u00fccken Sie ALT-F10 f\u00fcr Symbolleiste. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe",
-"Tools": "Werkzeuge",
+"Insert": "Einf\u00fcgen",
"View": "Ansicht",
+"Format": "Format",
"Table": "Tabelle",
-"Format": "Format"
+"Tools": "Werkzeuge",
+"Powered by {0}": "Betrieben von {0}",
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich-Text- Area. Dr\u00fccken Sie ALT-F9 f\u00fcr das Men\u00fc. Dr\u00fccken Sie ALT-F10 f\u00fcr Symbolleiste. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe"
});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinymce/langs/es.js b/vendor/assets/javascripts/tinymce/langs/es.js
index d0e7bd0f89..b0f72c16d4 100755
--- a/vendor/assets/javascripts/tinymce/langs/es.js
+++ b/vendor/assets/javascripts/tinymce/langs/es.js
@@ -1,219 +1,253 @@
tinymce.addI18n('es',{
+"Redo": "Rehacer",
+"Undo": "Deshacer",
"Cut": "Cortar",
-"Heading 5": "Encabezado 5",
-"Header 2": "Encabezado 2 ",
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Tu navegador no soporta acceso directo al portapapeles. Por favor usa las teclas Crtl+X\/C\/V de tu teclado",
-"Heading 4": "Encabezado 4",
-"Div": "Capa",
-"Heading 2": "Encabezado 2",
+"Copy": "Copiar",
"Paste": "Pegar",
-"Close": "Cerrar",
-"Font Family": "Familia de fuentes",
-"Pre": "Pre",
-"Align right": "Alinear a la derecha",
+"Select all": "Seleccionar todo",
"New document": "Nuevo documento",
-"Blockquote": "Bloque de cita",
+"Ok": "Ok",
+"Cancel": "Cancelar",
+"Visual aids": "Ayudas visuales",
+"Bold": "Negrita",
+"Italic": "It\u00e1lica",
+"Underline": "Subrayado",
+"Strikethrough": "Tachado",
+"Superscript": "Super\u00edndice",
+"Subscript": "Sub\u00edndice",
+"Clear formatting": "Limpiar formato",
+"Align left": "Alinear a la izquierda",
+"Align center": "Alinear al centro",
+"Align right": "Alinear a la derecha",
+"Justify": "Justificar",
+"Bullet list": "Lista de vi\u00f1etas",
"Numbered list": "Lista numerada",
-"Heading 1": "Encabezado 1",
-"Headings": "Encabezados",
+"Decrease indent": "Disminuir sangr\u00eda",
"Increase indent": "Incrementar sangr\u00eda",
+"Close": "Cerrar",
"Formats": "Formatos",
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Tu navegador no soporta acceso directo al portapapeles. Por favor usa las teclas Crtl+X\/C\/V de tu teclado",
"Headers": "Encabezados",
-"Select all": "Seleccionar todo",
-"Header 3": "Encabezado 3",
-"Blocks": "Bloques",
-"Undo": "Deshacer",
-"Strikethrough": "Tachado",
-"Bullet list": "Lista de vi\u00f1etas",
"Header 1": "Encabezado 1",
-"Superscript": "Super\u00edndice",
-"Clear formatting": "Limpiar formato",
-"Font Sizes": "Tama\u00f1os de fuente",
-"Subscript": "Sub\u00edndice",
-"Header 6": "Encabezado 6",
-"Redo": "Rehacer",
-"Paragraph": "P\u00e1rrafo",
-"Ok": "Ok",
-"Bold": "Negrita",
-"Code": "C\u00f3digo",
-"Italic": "It\u00e1lica",
-"Align center": "Alinear al centro",
+"Header 2": "Encabezado 2 ",
+"Header 3": "Encabezado 3",
+"Header 4": "Encabezado 4",
"Header 5": "Encabezado 5 ",
-"Heading 6": "Encabezado 6",
+"Header 6": "Encabezado 6",
+"Headings": "Encabezados",
+"Heading 1": "Encabezado 1",
+"Heading 2": "Encabezado 2",
"Heading 3": "Encabezado 3",
-"Decrease indent": "Disminuir sangr\u00eda",
-"Header 4": "Encabezado 4",
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Pegar est\u00e1 ahora en modo de texto plano. El contenido se pegar\u00e1 como texto plano hasta que desactive esta opci\u00f3n.",
-"Underline": "Subrayado",
-"Cancel": "Cancelar",
-"Justify": "Justificar",
+"Heading 4": "Encabezado 4",
+"Heading 5": "Encabezado 5",
+"Heading 6": "Encabezado 6",
+"Div": "Capa",
+"Pre": "Pre",
+"Code": "C\u00f3digo",
+"Paragraph": "P\u00e1rrafo",
+"Blockquote": "Bloque de cita",
"Inline": "en l\u00ednea",
-"Copy": "Copiar",
-"Align left": "Alinear a la izquierda",
-"Visual aids": "Ayudas visuales",
-"Lower Greek": "Inferior Griega",
-"Square": "Cuadrado",
+"Blocks": "Bloques",
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Pegar est\u00e1 ahora en modo de texto plano. El contenido se pegar\u00e1 como texto plano hasta que desactive esta opci\u00f3n.",
+"Font Family": "Familia de fuentes",
+"Font Sizes": "Tama\u00f1os de fuente",
+"Class": "Clase",
+"Browse for an image": "Exporador de imagenes",
+"OR": "\u00d3",
+"Drop an image here": "Arrastre una imagen aqu\u00ed",
+"Upload": "Subir",
"Default": "Por defecto",
-"Lower Alpha": "Inferior Alfa",
"Circle": "C\u00edrculo",
"Disc": "Disco",
+"Square": "Cuadrado",
+"Lower Alpha": "Inferior Alfa",
+"Lower Greek": "Inferior Griega",
+"Lower Roman": "Inferior Romana",
"Upper Alpha": "Superior Alfa",
"Upper Roman": "Superior Romana",
-"Lower Roman": "Inferior Romana",
-"Name": "Nombre",
"Anchor": "Ancla",
+"Name": "Nombre",
+"Id": "Id",
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "Deber\u00eda comenzar por una letra, seguida solo de letras, n\u00fameros, guiones, puntos, dos puntos o guiones bajos.",
"You have unsaved changes are you sure you want to navigate away?": "Tiene cambios sin guardar. \u00bfEst\u00e1 seguro de que quiere salir?",
"Restore last draft": "Restaurar el \u00faltimo borrador",
"Special character": "Car\u00e1cter especial",
"Source code": "C\u00f3digo fuente",
-"B": "A",
+"Insert\/Edit code sample": "Insertar\/editar c\u00f3digo de prueba",
+"Language": "Idioma",
+"Color": "Color",
"R": "R",
"G": "V",
-"Color": "Color",
-"Right to left": "De derecha a izquierda",
+"B": "A",
"Left to right": "De izquierda a derecha",
+"Right to left": "De derecha a izquierda",
"Emoticons": "Emoticonos",
-"Robots": "Robots",
"Document properties": "Propiedades del documento",
"Title": "T\u00edtulo",
"Keywords": "Palabras clave",
-"Encoding": "Codificaci\u00f3n",
"Description": "Descripci\u00f3n",
+"Robots": "Robots",
"Author": "Autor",
+"Encoding": "Codificaci\u00f3n",
"Fullscreen": "Pantalla completa",
+"Action": "Acci\u00f3n",
+"Shortcut": "Atajo",
+"Help": "Ayuda",
+"Address": "Direcci\u00f3n",
+"Focus to menubar": "Enfocar la barra del men\u00fa",
+"Focus to toolbar": "Enfocar la barra de herramientas",
+"Focus to element path": "Enfocar la ruta del elemento",
+"Focus to contextual toolbar": "Enfocar la barra de herramientas contextual",
+"Insert link (if link plugin activated)": "Insertar enlace (si el complemento de enlace est\u00e1 activado)",
+"Save (if save plugin activated)": "Guardar (si el componente de salvar est\u00e1 activado)",
+"Find (if searchreplace plugin activated)": "Buscar (si el complemento buscar-remplazar est\u00e1 activado)",
+"Plugins installed ({0}):": "Plugins instalados ({0}):",
+"Premium plugins:": "Complementos premium:",
+"Learn more...": "Aprende m\u00e1s...",
+"You are using {0}": "Estas usando {0}",
"Horizontal line": "L\u00ednea horizontal",
-"Horizontal space": "Espacio horizontal",
"Insert\/edit image": "Insertar\/editar imagen",
-"General": "General",
-"Advanced": "Avanzado",
+"Image description": "Descripci\u00f3n de la imagen",
"Source": "Enlace",
-"Border": "Borde",
+"Dimensions": "Dimensiones",
"Constrain proportions": "Restringir proporciones",
-"Vertical space": "Espacio vertical",
-"Image description": "Descripci\u00f3n de la imagen",
+"General": "General",
+"Advanced": "Avanzado",
"Style": "Estilo",
-"Dimensions": "Dimensiones",
+"Vertical space": "Espacio vertical",
+"Horizontal space": "Espacio horizontal",
+"Border": "Borde",
"Insert image": "Insertar imagen",
-"Zoom in": "Acercar",
-"Contrast": "Contraste",
-"Back": "Atr\u00e1s",
-"Gamma": "Gamma",
-"Flip horizontally": "Invertir horizontalmente",
-"Resize": "Redimensionar",
-"Sharpen": "Forma",
-"Zoom out": "Alejar",
-"Image options": "Opciones de imagen",
-"Apply": "Aplicar",
-"Brightness": "Brillo",
-"Rotate clockwise": "Girar a la derecha",
+"Image": "Imagen",
+"Image list": "Image list",
"Rotate counterclockwise": "Girar a la izquierda",
+"Rotate clockwise": "Girar a la derecha",
+"Flip vertically": "Invertir verticalmente",
+"Flip horizontally": "Invertir horizontalmente",
"Edit image": "Editar imagen",
-"Color levels": "Niveles de color",
+"Image options": "Opciones de imagen",
+"Zoom in": "Acercar",
+"Zoom out": "Alejar",
"Crop": "Recortar",
+"Resize": "Redimensionar",
"Orientation": "Orientaci\u00f3n",
-"Flip vertically": "Invertir verticalmente",
+"Brightness": "Brillo",
+"Sharpen": "Forma",
+"Contrast": "Contraste",
+"Color levels": "Niveles de color",
+"Gamma": "Gamma",
"Invert": "Invertir",
+"Apply": "Aplicar",
+"Back": "Atr\u00e1s",
"Insert date\/time": "Insertar fecha\/hora",
-"Remove link": "Quitar enlace",
-"Url": "URL",
-"Text to display": "Texto para mostrar",
-"Anchors": "Anclas",
+"Date\/time": "Fecha\/hora",
"Insert link": "Insertar enlace",
-"New window": "Nueva ventana",
-"None": "Ninguno",
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "El enlace que has introducido no parece ser una enlace externo. Quieres a\u00f1adir el prefijo necesario http:\/\/ ?",
+"Insert\/edit link": "Insertar\/editar enlace",
+"Text to display": "Texto para mostrar",
+"Url": "URL",
"Target": "Destino",
+"None": "Ninguno",
+"New window": "Nueva ventana",
+"Remove link": "Quitar enlace",
+"Anchors": "Anclas",
+"Link": "Enlace",
+"Paste or type a link": "Pega o introduce un enlace",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "El enlace que has introducido no parece ser una direcci\u00f3n de correo electr\u00f3nico. Quieres a\u00f1adir el prefijo necesario mailto: ?",
-"Insert\/edit link": "Insertar\/editar enlace",
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "El enlace que has introducido no parece ser una enlace externo. Quieres a\u00f1adir el prefijo necesario http:\/\/ ?",
+"Link list": "Lista de enlaces",
+"Insert video": "Insertar video",
"Insert\/edit video": "Insertar\/editar video",
-"Poster": "Miniatura",
+"Insert\/edit media": "Insertar\/editar medio",
"Alternative source": "Enlace alternativo",
+"Poster": "Miniatura",
"Paste your embed code below:": "Pega tu c\u00f3digo embebido debajo",
-"Insert video": "Insertar video",
"Embed": "Incrustado",
+"Media": "Media",
"Nonbreaking space": "Espacio fijo",
"Page break": "Salto de p\u00e1gina",
"Paste as text": "Pegar como texto",
"Preview": "Previsualizar",
"Print": "Imprimir",
"Save": "Guardar",
-"Could not find the specified string.": "No se encuentra la cadena de texto especificada",
+"Find": "Buscar",
+"Replace with": "Reemplazar con",
"Replace": "Reemplazar",
+"Replace all": "Reemplazar todo",
+"Prev": "Anterior",
"Next": "Siguiente",
-"Whole words": "Palabras completas",
"Find and replace": "Buscar y reemplazar",
-"Replace with": "Reemplazar con",
-"Find": "Buscar",
-"Replace all": "Reemplazar todo",
+"Could not find the specified string.": "No se encuentra la cadena de texto especificada",
"Match case": "Coincidencia exacta",
-"Prev": "Anterior",
+"Whole words": "Palabras completas",
"Spellcheck": "Corrector ortogr\u00e1fico",
-"Finish": "Finalizar",
-"Ignore all": "Ignorar todos",
"Ignore": "Ignorar",
+"Ignore all": "Ignorar todos",
+"Finish": "Finalizar",
"Add to Dictionary": "A\u00f1adir al Diccionario",
+"Insert table": "Insertar tabla",
+"Table properties": "Propiedades de la tabla",
+"Delete table": "Eliminar tabla",
+"Cell": "Celda",
+"Row": "Fila",
+"Column": "Columna",
+"Cell properties": "Propiedades de la celda",
+"Merge cells": "Combinar celdas",
+"Split cell": "Dividir celdas",
"Insert row before": "Insertar fila antes",
-"Rows": "Filas",
-"Height": "Alto",
+"Insert row after": "Insertar fila despu\u00e9s ",
+"Delete row": "Eliminar fila",
+"Row properties": "Propiedades de la fila",
+"Cut row": "Cortar fila",
+"Copy row": "Copiar fila",
+"Paste row before": "Pegar la fila antes",
"Paste row after": "Pegar la fila despu\u00e9s",
-"Alignment": "Alineaci\u00f3n",
-"Border color": "Color del borde",
-"Column group": "Grupo de columnas",
-"Row": "Fila",
"Insert column before": "Insertar columna antes",
-"Split cell": "Dividir celdas",
-"Cell padding": "Relleno de celda",
+"Insert column after": "Insertar columna despu\u00e9s",
+"Delete column": "Eliminar columna",
+"Cols": "Columnas",
+"Rows": "Filas",
+"Width": "Ancho",
+"Height": "Alto",
"Cell spacing": "Espacio entre celdas",
-"Row type": "Tipo de fila",
-"Insert table": "Insertar tabla",
-"Body": "Cuerpo",
+"Cell padding": "Relleno de celda",
"Caption": "Subt\u00edtulo",
-"Footer": "Pie de p\u00e1gina",
-"Delete row": "Eliminar fila",
-"Paste row before": "Pegar la fila antes",
+"Left": "Izquierda",
+"Center": "Centrado",
+"Right": "Derecha",
+"Cell type": "Tipo de celda",
"Scope": "\u00c1mbito",
-"Delete table": "Eliminar tabla",
+"Alignment": "Alineaci\u00f3n",
"H Align": "Alineamiento Horizontal",
+"V Align": "Alineamiento Vertical",
"Top": "Arriba",
-"Header cell": "Celda de la cebecera",
-"Column": "Columna",
-"Row group": "Grupo de filas",
-"Cell": "Celda",
"Middle": "Centro",
-"Cell type": "Tipo de celda",
-"Copy row": "Copiar fila",
-"Row properties": "Propiedades de la fila",
-"Table properties": "Propiedades de la tabla",
"Bottom": "Abajo",
-"V Align": "Alineamiento Vertical",
+"Header cell": "Celda de la cebecera",
+"Row group": "Grupo de filas",
+"Column group": "Grupo de columnas",
+"Row type": "Tipo de fila",
"Header": "Cabecera",
-"Right": "Derecha",
-"Insert column after": "Insertar columna despu\u00e9s",
-"Cols": "Columnas",
-"Insert row after": "Insertar fila despu\u00e9s ",
-"Width": "Ancho",
-"Cell properties": "Propiedades de la celda",
-"Left": "Izquierda",
-"Cut row": "Cortar fila",
-"Delete column": "Eliminar columna",
-"Center": "Centrado",
-"Merge cells": "Combinar celdas",
+"Body": "Cuerpo",
+"Footer": "Pie de p\u00e1gina",
+"Border color": "Color del borde",
"Insert template": "Insertar plantilla",
"Templates": "Plantillas",
+"Template": "Template",
+"Text color": "Color del texto",
"Background color": "Color de fondo",
"Custom...": "Personalizar...",
"Custom color": "Color personalizado",
"No color": "Sin color",
-"Text color": "Color del texto",
+"Table of Contents": "Tabla de contenidos",
"Show blocks": "Mostrar bloques",
"Show invisible characters": "Mostrar caracteres invisibles",
"Words: {0}": "Palabras: {0}",
-"Insert": "Insertar",
"File": "Archivo",
"Edit": "Editar",
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u00c1rea de texto enriquecido. Pulse ALT-F9 para el menu. Pulse ALT-F10 para la barra de herramientas. Pulse ALT-0 para ayuda",
-"Tools": "Herramientas",
+"Insert": "Insertar",
"View": "Ver",
+"Format": "Formato",
"Table": "Tabla",
-"Format": "Formato"
+"Tools": "Herramientas",
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u00c1rea de texto enriquecido. Pulse ALT-F9 para el menu. Pulse ALT-F10 para la barra de herramientas. Pulse ALT-0 para ayuda"
});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinymce/langs/fr.js b/vendor/assets/javascripts/tinymce/langs/fr.js
index ec95db4189..db29dee275 100755
--- a/vendor/assets/javascripts/tinymce/langs/fr.js
+++ b/vendor/assets/javascripts/tinymce/langs/fr.js
@@ -1,219 +1,260 @@
-tinymce.addI18n('fr',{
+tinymce.addI18n('fr_FR',{
+"Redo": "R\u00e9tablir",
+"Undo": "Annuler",
"Cut": "Couper",
-"Heading 5": "En-t\u00eate 5",
-"Header 2": "Titre 2",
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Votre navigateur ne supporte pas la copie directe. Merci d'utiliser les touches Ctrl+X\/C\/V.",
-"Heading 4": "En-t\u00eate 4",
-"Div": "Div",
-"Heading 2": "En-t\u00eate 2",
+"Copy": "Copier",
"Paste": "Coller",
-"Close": "Fermer",
-"Font Family": "Police",
-"Pre": "Pre",
-"Align right": "Aligner \u00e0 droite",
+"Select all": "Tout s\u00e9lectionner",
"New document": "Nouveau document",
-"Blockquote": "Citation",
+"Ok": "Ok",
+"Cancel": "Annuler",
+"Visual aids": "Aides visuelle",
+"Bold": "Gras",
+"Italic": "Italique",
+"Underline": "Soulign\u00e9",
+"Strikethrough": "Barr\u00e9",
+"Superscript": "Exposant",
+"Subscript": "Indice",
+"Clear formatting": "Effacer la mise en forme",
+"Align left": "Aligner \u00e0 gauche",
+"Align center": "Centrer",
+"Align right": "Aligner \u00e0 droite",
+"Justify": "Justifier",
+"Bullet list": "Puces",
"Numbered list": "Num\u00e9rotation",
-"Heading 1": "En-t\u00eate 1",
-"Headings": "En-t\u00eates",
+"Decrease indent": "Diminuer le retrait",
"Increase indent": "Augmenter le retrait",
+"Close": "Fermer",
"Formats": "Formats",
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Votre navigateur ne supporte pas la copie directe. Merci d'utiliser les touches Ctrl+X\/C\/V.",
"Headers": "Titres",
-"Select all": "Tout s\u00e9lectionner",
-"Header 3": "Titre 3",
-"Blocks": "Blocs",
-"Undo": "Annuler",
-"Strikethrough": "Barr\u00e9",
-"Bullet list": "Puces",
"Header 1": "Titre 1",
-"Superscript": "Exposant",
-"Clear formatting": "Effacer la mise en forme",
-"Font Sizes": "Taille de police",
-"Subscript": "Indice",
-"Header 6": "Titre 6",
-"Redo": "R\u00e9tablir",
-"Paragraph": "Paragraphe",
-"Ok": "Ok",
-"Bold": "Gras",
-"Code": "Code",
-"Italic": "Italique",
-"Align center": "Centrer",
+"Header 2": "Titre 2",
+"Header 3": "Titre 3",
+"Header 4": "Titre 4",
"Header 5": "Titre 5",
-"Heading 6": "En-t\u00eate 6",
+"Header 6": "Titre 6",
+"Headings": "En-t\u00eates",
+"Heading 1": "En-t\u00eate 1",
+"Heading 2": "En-t\u00eate 2",
"Heading 3": "En-t\u00eate 3",
-"Decrease indent": "Diminuer le retrait",
-"Header 4": "Titre 4",
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Le presse-papiers est maintenant en mode \"texte plein\". Les contenus seront coll\u00e9s sans retenir les formatages jusqu'\u00e0 ce que vous d\u00e9sactiviez cette option.",
-"Underline": "Soulign\u00e9",
-"Cancel": "Annuler",
-"Justify": "Justifier",
+"Heading 4": "En-t\u00eate 4",
+"Heading 5": "En-t\u00eate 5",
+"Heading 6": "En-t\u00eate 6",
+"Div": "Div",
+"Pre": "Pre",
+"Code": "Code",
+"Paragraph": "Paragraphe",
+"Blockquote": "Citation",
"Inline": "En ligne",
-"Copy": "Copier",
-"Align left": "Aligner \u00e0 gauche",
-"Visual aids": "Aides visuelle",
-"Lower Greek": "Grec minuscule",
-"Square": "Carr\u00e9",
+"Blocks": "Blocs",
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Le presse-papiers est maintenant en mode \"texte plein\". Les contenus seront coll\u00e9s sans retenir les formatages jusqu'\u00e0 ce que vous d\u00e9sactiviez cette option.",
+"Font Family": "Police",
+"Font Sizes": "Taille de police",
+"Class": "Classe",
+"Browse for an image": "Parcourir pour s\u00e9lectionner une image",
+"OR": "OU",
+"Drop an image here": "Glisser une image ici",
+"Upload": "D\u00e9poser",
+"Block": "Bloquer",
+"Align": "Aligner",
"Default": "Par d\u00e9faut",
-"Lower Alpha": "Alpha minuscule",
"Circle": "Cercle",
"Disc": "Disque",
+"Square": "Carr\u00e9",
+"Lower Alpha": "Alpha minuscule",
+"Lower Greek": "Grec minuscule",
+"Lower Roman": "Romain minuscule",
"Upper Alpha": "Alpha majuscule",
"Upper Roman": "Romain majuscule",
-"Lower Roman": "Romain minuscule",
-"Name": "Nom",
"Anchor": "Ancre",
+"Name": "Nom",
+"Id": "Id",
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "L'Id doit commencer par une lettre suivi par des lettres, nombres, tirets, points, deux-points ou underscores",
"You have unsaved changes are you sure you want to navigate away?": "Vous avez des modifications non enregistr\u00e9es, \u00eates-vous s\u00fbr de quitter la page?",
"Restore last draft": "Restaurer le dernier brouillon",
"Special character": "Caract\u00e8res sp\u00e9ciaux",
"Source code": "Code source",
-"B": "B",
+"Insert\/Edit code sample": "Ins\u00e9rer \/ modifier une exemple de code",
+"Language": "Langue",
+"Code sample": "Extrait de code",
+"Color": "Couleur",
"R": "R",
"G": "V",
-"Color": "Couleur",
-"Right to left": "Droite \u00e0 gauche",
+"B": "B",
"Left to right": "Gauche \u00e0 droite",
+"Right to left": "Droite \u00e0 gauche",
"Emoticons": "Emotic\u00f4nes",
-"Robots": "Robots",
"Document properties": "Propri\u00e9t\u00e9 du document",
"Title": "Titre",
"Keywords": "Mots-cl\u00e9s",
-"Encoding": "Encodage",
"Description": "Description",
+"Robots": "Robots",
"Author": "Auteur",
+"Encoding": "Encodage",
"Fullscreen": "Plein \u00e9cran",
+"Action": "Action",
+"Shortcut": "Raccourci",
+"Help": "Aide",
+"Address": "Adresse",
+"Focus to menubar": "Cibler la barre de menu",
+"Focus to toolbar": "Cibler la barre d'outils",
+"Focus to element path": "Cibler le chemin vers l'\u00e9l\u00e9ment",
+"Focus to contextual toolbar": "Cibler la barre d'outils contextuelle",
+"Insert link (if link plugin activated)": "Ins\u00e9rer un lien (si le module link est activ\u00e9)",
+"Save (if save plugin activated)": "Enregistrer (si le module save est activ\u00e9)",
+"Find (if searchreplace plugin activated)": "Rechercher (si le module searchreplace est activ\u00e9)",
+"Plugins installed ({0}):": "Modules install\u00e9s ({0}) : ",
+"Premium plugins:": "Modules premium :",
+"Learn more...": "En savoir plus...",
+"You are using {0}": "Vous utilisez {0}",
+"Plugins": "Plugins",
+"Handy Shortcuts": "Raccourci",
"Horizontal line": "Ligne horizontale",
-"Horizontal space": "Espacement horizontal",
"Insert\/edit image": "Ins\u00e9rer\/modifier une image",
-"General": "G\u00e9n\u00e9ral",
-"Advanced": "Avanc\u00e9",
+"Image description": "Description de l'image",
"Source": "Source",
-"Border": "Bordure",
+"Dimensions": "Dimensions",
"Constrain proportions": "Conserver les proportions",
-"Vertical space": "Espacement vertical",
-"Image description": "Description de l'image",
+"General": "G\u00e9n\u00e9ral",
+"Advanced": "Avanc\u00e9",
"Style": "Style",
-"Dimensions": "Dimensions",
+"Vertical space": "Espacement vertical",
+"Horizontal space": "Espacement horizontal",
+"Border": "Bordure",
"Insert image": "Ins\u00e9rer une image",
-"Zoom in": "Zoomer",
-"Contrast": "Contraste",
-"Back": "Retour",
-"Gamma": "Gamma",
-"Flip horizontally": "Retournement horizontal",
-"Resize": "Redimensionner",
-"Sharpen": "Affiner",
-"Zoom out": "D\u00e9zoomer",
-"Image options": "Options de l'image",
-"Apply": "Appliquer",
-"Brightness": "Luminosit\u00e9",
-"Rotate clockwise": "Rotation horaire",
+"Image": "Image",
+"Image list": "Liste d'images",
"Rotate counterclockwise": "Rotation anti-horaire",
+"Rotate clockwise": "Rotation horaire",
+"Flip vertically": "Retournement vertical",
+"Flip horizontally": "Retournement horizontal",
"Edit image": "Modifier l'image",
-"Color levels": "Niveaux de couleur",
+"Image options": "Options de l'image",
+"Zoom in": "Zoomer",
+"Zoom out": "D\u00e9zoomer",
"Crop": "Rogner",
+"Resize": "Redimensionner",
"Orientation": "Orientation",
-"Flip vertically": "Retournement vertical",
+"Brightness": "Luminosit\u00e9",
+"Sharpen": "Affiner",
+"Contrast": "Contraste",
+"Color levels": "Niveaux de couleur",
+"Gamma": "Gamma",
"Invert": "Inverser",
+"Apply": "Appliquer",
+"Back": "Retour",
"Insert date\/time": "Ins\u00e9rer date\/heure",
-"Remove link": "Enlever le lien",
-"Url": "Url",
-"Text to display": "Texte \u00e0 afficher",
-"Anchors": "Ancres",
+"Date\/time": "Date\/heure",
"Insert link": "Ins\u00e9rer un lien",
-"New window": "Nouvelle fen\u00eatre",
-"None": "n\/a",
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe http:\/\/ n\u00e9cessaire?",
+"Insert\/edit link": "Ins\u00e9rer\/modifier un lien",
+"Text to display": "Texte \u00e0 afficher",
+"Url": "Url",
"Target": "Cible",
+"None": "n\/a",
+"New window": "Nouvelle fen\u00eatre",
+"Remove link": "Enlever le lien",
+"Anchors": "Ancres",
+"Link": "Lien",
+"Paste or type a link": "Coller ou taper un lien",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre une adresse e-mail. Voulez-vous ajouter le pr\u00e9fixe mailto: n\u00e9cessaire?",
-"Insert\/edit link": "Ins\u00e9rer\/modifier un lien",
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe http:\/\/ n\u00e9cessaire?",
+"Link list": "Liste de liens",
+"Insert video": "Ins\u00e9rer une vid\u00e9o",
"Insert\/edit video": "Ins\u00e9rer\/modifier une vid\u00e9o",
-"Poster": "Publier",
+"Insert\/edit media": "Ins\u00e9rer\/modifier un m\u00e9dia",
"Alternative source": "Source alternative",
+"Poster": "Publier",
"Paste your embed code below:": "Collez votre code d'int\u00e9gration ci-dessous :",
-"Insert video": "Ins\u00e9rer une vid\u00e9o",
"Embed": "Int\u00e9grer",
+"Media": "M\u00e9dia",
"Nonbreaking space": "Espace ins\u00e9cable",
"Page break": "Saut de page",
"Paste as text": "Coller comme texte",
"Preview": "Pr\u00e9visualiser",
"Print": "Imprimer",
"Save": "Enregistrer",
-"Could not find the specified string.": "Impossible de trouver la cha\u00eene sp\u00e9cifi\u00e9e.",
+"Find": "Chercher",
+"Replace with": "Remplacer par",
"Replace": "Remplacer",
+"Replace all": "Tout remplacer",
+"Prev": "Pr\u00e9c ",
"Next": "Suiv",
-"Whole words": "Mots entiers",
"Find and replace": "Trouver et remplacer",
-"Replace with": "Remplacer par",
-"Find": "Chercher",
-"Replace all": "Tout remplacer",
+"Could not find the specified string.": "Impossible de trouver la cha\u00eene sp\u00e9cifi\u00e9e.",
"Match case": "Respecter la casse",
-"Prev": "Pr\u00e9c ",
+"Whole words": "Mots entiers",
"Spellcheck": "V\u00e9rification orthographique",
-"Finish": "Finie",
-"Ignore all": "Tout ignorer",
"Ignore": "Ignorer",
+"Ignore all": "Tout ignorer",
+"Finish": "Finie",
"Add to Dictionary": "Ajouter au dictionnaire",
+"Insert table": "Ins\u00e9rer un tableau",
+"Table properties": "Propri\u00e9t\u00e9s du tableau",
+"Delete table": "Supprimer le tableau",
+"Cell": "Cellule",
+"Row": "Ligne",
+"Column": "Colonne",
+"Cell properties": "Propri\u00e9t\u00e9s de la cellule",
+"Merge cells": "Fusionner les cellules",
+"Split cell": "Diviser la cellule",
"Insert row before": "Ins\u00e9rer une ligne avant",
-"Rows": "Lignes",
-"Height": "Hauteur",
+"Insert row after": "Ins\u00e9rer une ligne apr\u00e8s",
+"Delete row": "Effacer la ligne",
+"Row properties": "Propri\u00e9t\u00e9s de la ligne",
+"Cut row": "Couper la ligne",
+"Copy row": "Copier la ligne",
+"Paste row before": "Coller la ligne avant",
"Paste row after": "Coller la ligne apr\u00e8s",
-"Alignment": "Alignement",
-"Border color": "Couleur de la bordure",
-"Column group": "Groupe de colonnes",
-"Row": "Ligne",
"Insert column before": "Ins\u00e9rer une colonne avant",
-"Split cell": "Diviser la cellule",
-"Cell padding": "Espacement interne cellule",
+"Insert column after": "Ins\u00e9rer une colonne apr\u00e8s",
+"Delete column": "Effacer la colonne",
+"Cols": "Colonnes",
+"Rows": "Lignes",
+"Width": "Largeur",
+"Height": "Hauteur",
"Cell spacing": "Espacement inter-cellulles",
-"Row type": "Type de ligne",
-"Insert table": "Ins\u00e9rer un tableau",
-"Body": "Corps",
+"Cell padding": "Espacement interne cellule",
"Caption": "Titre",
-"Footer": "Pied",
-"Delete row": "Effacer la ligne",
-"Paste row before": "Coller la ligne avant",
+"Left": "Gauche",
+"Center": "Centr\u00e9",
+"Right": "Droite",
+"Cell type": "Type de cellule",
"Scope": "Etendue",
-"Delete table": "Supprimer le tableau",
+"Alignment": "Alignement",
"H Align": "Alignement H",
+"V Align": "Alignement V",
"Top": "Haut",
-"Header cell": "Cellule d'en-t\u00eate",
-"Column": "Colonne",
-"Row group": "Groupe de lignes",
-"Cell": "Cellule",
"Middle": "Milieu",
-"Cell type": "Type de cellule",
-"Copy row": "Copier la ligne",
-"Row properties": "Propri\u00e9t\u00e9s de la ligne",
-"Table properties": "Propri\u00e9t\u00e9s du tableau",
"Bottom": "Bas",
-"V Align": "Alignement V",
+"Header cell": "Cellule d'en-t\u00eate",
+"Row group": "Groupe de lignes",
+"Column group": "Groupe de colonnes",
+"Row type": "Type de ligne",
"Header": "En-t\u00eate",
-"Right": "Droite",
-"Insert column after": "Ins\u00e9rer une colonne apr\u00e8s",
-"Cols": "Colonnes",
-"Insert row after": "Ins\u00e9rer une ligne apr\u00e8s",
-"Width": "Largeur",
-"Cell properties": "Propri\u00e9t\u00e9s de la cellule",
-"Left": "Gauche",
-"Cut row": "Couper la ligne",
-"Delete column": "Effacer la colonne",
-"Center": "Centr\u00e9",
-"Merge cells": "Fusionner les cellules",
+"Body": "Corps",
+"Footer": "Pied",
+"Border color": "Couleur de la bordure",
"Insert template": "Ajouter un th\u00e8me",
"Templates": "Th\u00e8mes",
+"Template": "Mod\u00e8le",
+"Text color": "Couleur du texte",
"Background color": "Couleur d'arri\u00e8re-plan",
"Custom...": "Personnalis\u00e9...",
"Custom color": "Couleur personnalis\u00e9e",
"No color": "Aucune couleur",
-"Text color": "Couleur du texte",
+"Table of Contents": "Table des mati\u00e8res",
"Show blocks": "Afficher les blocs",
"Show invisible characters": "Afficher les caract\u00e8res invisibles",
"Words: {0}": "Mots : {0}",
-"Insert": "Ins\u00e9rer",
+"{0} words": "{0} mots",
"File": "Fichier",
"Edit": "Editer",
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Zone Texte Riche. Appuyer sur ALT-F9 pour le menu. Appuyer sur ALT-F10 pour la barre d'outils. Appuyer sur ALT-0 pour de l'aide.",
-"Tools": "Outils",
+"Insert": "Ins\u00e9rer",
"View": "Voir",
+"Format": "Format",
"Table": "Tableau",
-"Format": "Format"
-});
+"Tools": "Outils",
+"Powered by {0}": "Propuls\u00e9 par {0}",
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Zone Texte Riche. Appuyer sur ALT-F9 pour le menu. Appuyer sur ALT-F10 pour la barre d'outils. Appuyer sur ALT-0 pour de l'aide."
+});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinymce/langs/it.js b/vendor/assets/javascripts/tinymce/langs/it.js
index d97803d2b3..3bdf168d19 100755
--- a/vendor/assets/javascripts/tinymce/langs/it.js
+++ b/vendor/assets/javascripts/tinymce/langs/it.js
@@ -1,219 +1,260 @@
tinymce.addI18n('it',{
+"Redo": "Ripeti",
+"Undo": "Indietro",
"Cut": "Taglia",
-"Heading 5": "Intestazione 5",
-"Header 2": "Header 2",
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctrl+X\/C\/V.",
-"Heading 4": "Intestazione 4",
-"Div": "Div",
-"Heading 2": "Intestazione 2",
+"Copy": "Copia",
"Paste": "Incolla",
-"Close": "Chiudi",
-"Font Family": "Famiglia font",
-"Pre": "Pre",
-"Align right": "Allinea a Destra",
+"Select all": "Seleziona Tutto",
"New document": "Nuovo Documento",
-"Blockquote": "Blockquote",
+"Ok": "Ok",
+"Cancel": "Annulla",
+"Visual aids": "Elementi Visivi",
+"Bold": "Grassetto",
+"Italic": "Corsivo",
+"Underline": "Sottolineato",
+"Strikethrough": "Barrato",
+"Superscript": "Apice",
+"Subscript": "Pedice",
+"Clear formatting": "Cancella Formattazione",
+"Align left": "Allinea a Sinistra",
+"Align center": "Allinea al Cento",
+"Align right": "Allinea a Destra",
+"Justify": "Giustifica",
+"Bullet list": "Elenchi Puntati",
"Numbered list": "Elenchi Numerati",
-"Heading 1": "Intestazione 1",
-"Headings": "Intestazioni",
+"Decrease indent": "Riduci Rientro",
"Increase indent": "Aumenta Rientro",
+"Close": "Chiudi",
"Formats": "Formattazioni",
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctrl+X\/C\/V.",
"Headers": "Intestazioni",
-"Select all": "Seleziona Tutto",
-"Header 3": "Intestazione 3",
-"Blocks": "Blocchi",
-"Undo": "Indietro",
-"Strikethrough": "Barrato",
-"Bullet list": "Elenchi Puntati",
"Header 1": "Intestazione 1",
-"Superscript": "Apice",
-"Clear formatting": "Cancella Formattazione",
-"Font Sizes": "Dimensioni font",
-"Subscript": "Pedice",
-"Header 6": "Intestazione 6",
-"Redo": "Ripeti",
-"Paragraph": "Paragrafo",
-"Ok": "Ok",
-"Bold": "Grassetto",
-"Code": "Codice",
-"Italic": "Corsivo",
-"Align center": "Allinea al Cento",
+"Header 2": "Header 2",
+"Header 3": "Intestazione 3",
+"Header 4": "Intestazione 4",
"Header 5": "Intestazione 5",
-"Heading 6": "Intestazione 6",
+"Header 6": "Intestazione 6",
+"Headings": "Intestazioni",
+"Heading 1": "Intestazione 1",
+"Heading 2": "Intestazione 2",
"Heading 3": "Intestazione 3",
-"Decrease indent": "Riduci Rientro",
-"Header 4": "Intestazione 4",
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Incolla \u00e8 in modalit\u00e0 testo normale. I contenuti sono incollati come testo normale se non disattivi l'opzione.",
-"Underline": "Sottolineato",
-"Cancel": "Annulla",
-"Justify": "Giustifica",
+"Heading 4": "Intestazione 4",
+"Heading 5": "Intestazione 5",
+"Heading 6": "Intestazione 6",
+"Div": "Div",
+"Pre": "Pre",
+"Code": "Codice",
+"Paragraph": "Paragrafo",
+"Blockquote": "Blockquote",
"Inline": "Inlinea",
-"Copy": "Copia",
-"Align left": "Allinea a Sinistra",
-"Visual aids": "Elementi Visivi",
-"Lower Greek": "Greek Minore",
-"Square": "Quadrato",
+"Blocks": "Blocchi",
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Incolla \u00e8 in modalit\u00e0 testo normale. I contenuti sono incollati come testo normale se non disattivi l'opzione.",
+"Font Family": "Famiglia font",
+"Font Sizes": "Dimensioni font",
+"Class": "Classe",
+"Browse for an image": "Scegli un'immagine",
+"OR": "o",
+"Drop an image here": "Incolla un'immagine qui",
+"Upload": "Carica",
+"Block": "Blocco",
+"Align": "Allinea",
"Default": "Default",
-"Lower Alpha": "Alpha Minore",
"Circle": "Cerchio",
"Disc": "Disco",
+"Square": "Quadrato",
+"Lower Alpha": "Alpha Minore",
+"Lower Greek": "Greek Minore",
+"Lower Roman": "Roman Minore",
"Upper Alpha": "Alpha Superiore",
"Upper Roman": "Roman Superiore",
-"Lower Roman": "Roman Minore",
-"Name": "Nome",
"Anchor": "Fissa",
+"Name": "Nome",
+"Id": "Id",
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "L'id dovrebbe cominciare con una lettera, seguito solo da lettere, numeri, linee, punti, virgole.",
"You have unsaved changes are you sure you want to navigate away?": "Non hai salvato delle modifiche, sei sicuro di andartene?",
"Restore last draft": "Ripristina l'ultima bozza.",
"Special character": "Carattere Speciale",
"Source code": "Codice Sorgente",
-"B": "B",
+"Insert\/Edit code sample": "Inserisci\/Modifica esempio di codice",
+"Language": "Lingua",
+"Code sample": "Esempio di codice",
+"Color": "Colore",
"R": "R",
"G": "G",
-"Color": "Colore",
-"Right to left": "Da Destra a Sinistra",
+"B": "B",
"Left to right": "Da Sinistra a Destra",
+"Right to left": "Da Destra a Sinistra",
"Emoticons": "Emoction",
-"Robots": "Robot",
"Document properties": "Propriet\u00e0 Documento",
"Title": "Titolo",
"Keywords": "Parola Chiave",
-"Encoding": "Codifica",
"Description": "Descrizione",
+"Robots": "Robot",
"Author": "Autore",
+"Encoding": "Codifica",
"Fullscreen": "Schermo Intero",
+"Action": "Action",
+"Shortcut": "Shortcut",
+"Help": "Help",
+"Address": "Address",
+"Focus to menubar": "Focus to menubar",
+"Focus to toolbar": "Focus to toolbar",
+"Focus to element path": "Focus to element path",
+"Focus to contextual toolbar": "Focus to contextual toolbar",
+"Insert link (if link plugin activated)": "Insert link (if link plugin activated)",
+"Save (if save plugin activated)": "Save (if save plugin activated)",
+"Find (if searchreplace plugin activated)": "Find (if searchreplace plugin activated)",
+"Plugins installed ({0}):": "Plugins installed ({0}):",
+"Premium plugins:": "Premium plugins:",
+"Learn more...": "Learn more...",
+"You are using {0}": "You are using {0}",
+"Plugins": "Plugins",
+"Handy Shortcuts": "Handy Shortcuts",
"Horizontal line": "Linea Orizzontale",
-"Horizontal space": "Spazio Orizzontale",
"Insert\/edit image": "Aggiungi\/Modifica Immagine",
-"General": "Generale",
-"Advanced": "Avanzato",
+"Image description": "Descrizione Immagine",
"Source": "Fonte",
-"Border": "Bordo",
+"Dimensions": "Dimenzioni",
"Constrain proportions": "Mantieni Proporzioni",
-"Vertical space": "Spazio Verticale",
-"Image description": "Descrizione Immagine",
+"General": "Generale",
+"Advanced": "Avanzato",
"Style": "Stile",
-"Dimensions": "Dimenzioni",
+"Vertical space": "Spazio Verticale",
+"Horizontal space": "Spazio Orizzontale",
+"Border": "Bordo",
"Insert image": "Inserisci immagine",
-"Zoom in": "Ingrandisci",
-"Contrast": "Contrasto",
-"Back": "Indietro",
-"Gamma": "Gamma",
-"Flip horizontally": "Rifletti orizzontalmente",
-"Resize": "Ridimensiona",
-"Sharpen": "Contrasta",
-"Zoom out": "Rimpicciolisci",
-"Image options": "Opzioni immagine",
-"Apply": "Applica",
-"Brightness": "Luminosit\u00e0",
-"Rotate clockwise": "Ruota in senso orario",
+"Image": "Immagine",
+"Image list": "Image list",
"Rotate counterclockwise": "Ruota in senso antiorario",
+"Rotate clockwise": "Ruota in senso orario",
+"Flip vertically": "Rifletti verticalmente",
+"Flip horizontally": "Rifletti orizzontalmente",
"Edit image": "Modifica immagine",
-"Color levels": "Livelli colore",
+"Image options": "Opzioni immagine",
+"Zoom in": "Ingrandisci",
+"Zoom out": "Rimpicciolisci",
"Crop": "Taglia",
+"Resize": "Ridimensiona",
"Orientation": "Orientamento",
-"Flip vertically": "Rifletti verticalmente",
+"Brightness": "Luminosit\u00e0",
+"Sharpen": "Contrasta",
+"Contrast": "Contrasto",
+"Color levels": "Livelli colore",
+"Gamma": "Gamma",
"Invert": "Inverti",
+"Apply": "Applica",
+"Back": "Indietro",
"Insert date\/time": "Inserisci Data\/Ora",
-"Remove link": "Rimuovi link",
-"Url": "Url",
-"Text to display": "Testo da Visualizzare",
-"Anchors": "Anchors",
+"Date\/time": "Data\/Ora",
"Insert link": "Inserisci il Link",
-"New window": "Nuova Finestra",
-"None": "No",
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?",
+"Insert\/edit link": "Inserisci\/Modifica Link",
+"Text to display": "Testo da Visualizzare",
+"Url": "Url",
"Target": "Target",
+"None": "No",
+"New window": "Nuova Finestra",
+"Remove link": "Rimuovi link",
+"Anchors": "Anchors",
+"Link": "Collegamento",
+"Paste or type a link": "Incolla o digita un collegamento",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL inserito sembra essere un indirizzo email. Vuoi aggiungere il prefisso necessario mailto:?",
-"Insert\/edit link": "Inserisci\/Modifica Link",
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?",
+"Link list": "Elenco link",
+"Insert video": "Inserisci Video",
"Insert\/edit video": "Inserisci\/Modifica Video",
-"Poster": "Anteprima",
+"Insert\/edit media": "Inserisci\/Modifica Media",
"Alternative source": "Alternativo",
+"Poster": "Anteprima",
"Paste your embed code below:": "Incolla il codice d'incorporamento qui:",
-"Insert video": "Inserisci Video",
"Embed": "Incorporare",
+"Media": "Media",
"Nonbreaking space": "Spazio unificatore",
"Page break": "Interruzione di pagina",
"Paste as text": "incolla come testo",
"Preview": "Anteprima",
"Print": "Stampa",
"Save": "Salva",
-"Could not find the specified string.": "Impossibile trovare la parola specifica.",
+"Find": "Trova",
+"Replace with": "Sostituisci Con",
"Replace": "Sostituisci",
+"Replace all": "Sostituisci Tutto",
+"Prev": "Precedente",
"Next": "Successivo",
-"Whole words": "Parole Sbagliate",
"Find and replace": "Trova e Sostituisci",
-"Replace with": "Sostituisci Con",
-"Find": "Trova",
-"Replace all": "Sostituisci Tutto",
+"Could not find the specified string.": "Impossibile trovare la parola specifica.",
"Match case": "Maiuscole\/Minuscole ",
-"Prev": "Precedente",
+"Whole words": "Parole Sbagliate",
"Spellcheck": "Controllo ortografico",
-"Finish": "Termina",
-"Ignore all": "Ignora Tutto",
"Ignore": "Ignora",
+"Ignore all": "Ignora Tutto",
+"Finish": "Termina",
"Add to Dictionary": "Aggiungi al Dizionario",
+"Insert table": "Inserisci Tabella",
+"Table properties": "Propiet\u00e0 della Tabella",
+"Delete table": "Cancella Tabella",
+"Cell": "Cella",
+"Row": "Riga",
+"Column": "Colonna",
+"Cell properties": "Propiet\u00e0 della Cella",
+"Merge cells": "Unisci Cella",
+"Split cell": "Dividi Cella",
"Insert row before": "Inserisci una Riga Prima",
-"Rows": "Righe",
-"Height": "Altezza",
+"Insert row after": "Inserisci una Riga Dopo",
+"Delete row": "Cancella Riga",
+"Row properties": "Propriet\u00e0 della Riga",
+"Cut row": "Taglia Riga",
+"Copy row": "Copia Riga",
+"Paste row before": "Incolla una Riga Prima",
"Paste row after": "Incolla una Riga Dopo",
-"Alignment": "Allineamento",
-"Border color": "Colore bordo",
-"Column group": "Gruppo di Colonne",
-"Row": "Riga",
"Insert column before": "Inserisci una Colonna Prima",
-"Split cell": "Dividi Cella",
-"Cell padding": "Padding della Cella",
+"Insert column after": "Inserisci una Colonna Dopo",
+"Delete column": "Cancella Colonna",
+"Cols": "Colonne",
+"Rows": "Righe",
+"Width": "Larghezza",
+"Height": "Altezza",
"Cell spacing": "Spaziatura della Cella",
-"Row type": "Tipo di Riga",
-"Insert table": "Inserisci Tabella",
-"Body": "Body",
+"Cell padding": "Padding della Cella",
"Caption": "Didascalia",
-"Footer": "Footer",
-"Delete row": "Cancella Riga",
-"Paste row before": "Incolla una Riga Prima",
+"Left": "Sinistra",
+"Center": "Centro",
+"Right": "Destra",
+"Cell type": "Tipo di Cella",
"Scope": "Campo",
-"Delete table": "Cancella Tabella",
+"Alignment": "Allineamento",
"H Align": "Allineamento H",
+"V Align": "Allineamento V",
"Top": "In alto",
-"Header cell": "cella d'intestazione",
-"Column": "Colonna",
-"Row group": "Gruppo di Righe",
-"Cell": "Cella",
"Middle": "In mezzo",
-"Cell type": "Tipo di Cella",
-"Copy row": "Copia Riga",
-"Row properties": "Propriet\u00e0 della Riga",
-"Table properties": "Propiet\u00e0 della Tabella",
"Bottom": "In fondo",
-"V Align": "Allineamento V",
+"Header cell": "cella d'intestazione",
+"Row group": "Gruppo di Righe",
+"Column group": "Gruppo di Colonne",
+"Row type": "Tipo di Riga",
"Header": "Header",
-"Right": "Destra",
-"Insert column after": "Inserisci una Colonna Dopo",
-"Cols": "Colonne",
-"Insert row after": "Inserisci una Riga Dopo",
-"Width": "Larghezza",
-"Cell properties": "Propiet\u00e0 della Cella",
-"Left": "Sinistra",
-"Cut row": "Taglia Riga",
-"Delete column": "Cancella Colonna",
-"Center": "Centro",
-"Merge cells": "Unisci Cella",
+"Body": "Body",
+"Footer": "Footer",
+"Border color": "Colore bordo",
"Insert template": "Inserisci Template",
"Templates": "Template",
+"Template": "Modello",
+"Text color": "Colore Testo",
"Background color": "Colore Background",
"Custom...": "Personalizzato...",
"Custom color": "Colore personalizzato",
"No color": "Nessun colore",
-"Text color": "Colore Testo",
+"Table of Contents": "Tabella dei contenuti",
"Show blocks": "Mostra Blocchi",
"Show invisible characters": "Mostra Caratteri Invisibili",
"Words: {0}": "Parole: {0}",
-"Insert": "Inserisci",
+"{0} words": "{0} parole",
"File": "File",
"Edit": "Modifica",
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Premi ALT-F9 per il men\u00f9. Premi ALT-F10 per la barra degli strumenti. Premi ALT-0 per l'aiuto.",
-"Tools": "Strumenti",
+"Insert": "Inserisci",
"View": "Visualiza",
+"Format": "Formato",
"Table": "Tabella",
-"Format": "Formato"
+"Tools": "Strumenti",
+"Powered by {0}": "Powered by {0}",
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Premi ALT-F9 per il men\u00f9. Premi ALT-F10 per la barra degli strumenti. Premi ALT-0 per l'aiuto."
});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinymce/langs/nl.js b/vendor/assets/javascripts/tinymce/langs/nl.js
index ee1f335624..9f3fd6f8fc 100755
--- a/vendor/assets/javascripts/tinymce/langs/nl.js
+++ b/vendor/assets/javascripts/tinymce/langs/nl.js
@@ -1,219 +1,260 @@
tinymce.addI18n('nl',{
+"Redo": "Opnieuw",
+"Undo": "Ongedaan maken",
"Cut": "Knippen",
-"Heading 5": "Kop 5",
-"Header 2": "Kop 2",
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Uw browser ondersteunt geen toegang tot het clipboard. Gelieve ctrl+X\/C\/V sneltoetsen te gebruiken.",
-"Heading 4": "Kop 4",
-"Div": "Div",
-"Heading 2": "Kop 2",
+"Copy": "Kopi\u00ebren",
"Paste": "Plakken",
-"Close": "Sluiten",
-"Font Family": "Lettertype",
-"Pre": "Pre",
-"Align right": "Rechts uitlijnen",
+"Select all": "Alles selecteren",
"New document": "Nieuw document",
-"Blockquote": "Quote",
+"Ok": "Ok\u00e9",
+"Cancel": "Annuleren",
+"Visual aids": "Hulpmiddelen",
+"Bold": "Vet",
+"Italic": "Cursief",
+"Underline": "Onderstreept",
+"Strikethrough": "Doorhalen",
+"Superscript": "Superscript",
+"Subscript": "Subscript",
+"Clear formatting": "Opmaak verwijderen",
+"Align left": "Links uitlijnen",
+"Align center": "Centreren",
+"Align right": "Rechts uitlijnen",
+"Justify": "Uitlijnen",
+"Bullet list": "Opsommingsteken",
"Numbered list": "Nummering",
-"Heading 1": "Kop 1",
-"Headings": "Koppen",
+"Decrease indent": "Inspringen verkleinen",
"Increase indent": "Inspringen vergroten",
+"Close": "Sluiten",
"Formats": "Opmaak",
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Uw browser ondersteunt geen toegang tot het clipboard. Gelieve ctrl+X\/C\/V sneltoetsen te gebruiken.",
"Headers": "Kopteksten",
-"Select all": "Alles selecteren",
-"Header 3": "Kop 3",
-"Blocks": "Blok",
-"Undo": "Ongedaan maken",
-"Strikethrough": "Doorhalen",
-"Bullet list": "Opsommingsteken",
"Header 1": "Kop 1",
-"Superscript": "Superscript",
-"Clear formatting": "Opmaak verwijderen",
-"Font Sizes": "Tekengrootte",
-"Subscript": "Subscript",
-"Header 6": "Kop 6",
-"Redo": "Opnieuw",
-"Paragraph": "Paragraaf",
-"Ok": "Ok\u00e9",
-"Bold": "Vet",
-"Code": "Code",
-"Italic": "Cursief",
-"Align center": "Centreren",
+"Header 2": "Kop 2",
+"Header 3": "Kop 3",
+"Header 4": "Kop 4",
"Header 5": "Kop 5",
-"Heading 6": "Kop 6",
+"Header 6": "Kop 6",
+"Headings": "Koppen",
+"Heading 1": "Kop 1",
+"Heading 2": "Kop 2",
"Heading 3": "Kop 3",
-"Decrease indent": "Inspringen verkleinen",
-"Header 4": "Kop 4",
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Plakken gebeurt nu als platte tekst. Tekst wordt nu ingevoegd zonder opmaak tot deze optie uitgeschakeld wordt.",
-"Underline": "Onderstreept",
-"Cancel": "Annuleren",
-"Justify": "Uitlijnen",
+"Heading 4": "Kop 4",
+"Heading 5": "Kop 5",
+"Heading 6": "Kop 6",
+"Div": "Div",
+"Pre": "Pre",
+"Code": "Code",
+"Paragraph": "Paragraaf",
+"Blockquote": "Quote",
"Inline": "Inlijn",
-"Copy": "Kopi\u00ebren",
-"Align left": "Links uitlijnen",
-"Visual aids": "Hulpmiddelen",
-"Lower Greek": "Griekse letters",
-"Square": "Vierkant",
+"Blocks": "Blok",
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Plakken gebeurt nu als platte tekst. Tekst wordt nu ingevoegd zonder opmaak tot deze optie uitgeschakeld wordt.",
+"Font Family": "Lettertype",
+"Font Sizes": "Tekengrootte",
+"Class": "Class",
+"Browse for an image": "Zoek naar een afbeelding",
+"OR": "OF",
+"Drop an image here": "Plaats hier een afbeelding",
+"Upload": "Uploaden",
+"Block": "Blok",
+"Align": "Uitlijnen",
"Default": "Standaard",
-"Lower Alpha": "Kleine letters",
"Circle": "Cirkel",
"Disc": "Bolletje",
+"Square": "Vierkant",
+"Lower Alpha": "Kleine letters",
+"Lower Greek": "Griekse letters",
+"Lower Roman": "Romeinse cijfers klein",
"Upper Alpha": "Hoofdletters",
"Upper Roman": "Romeinse cijfers groot",
-"Lower Roman": "Romeinse cijfers klein",
-"Name": "Naam",
"Anchor": "Anker",
+"Name": "Naam",
+"Id": "ID",
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "ID moet beginnen met een letter, gevolgd door letters, nummers, streepjes, punten, dubbele punten of underscores.",
"You have unsaved changes are you sure you want to navigate away?": "U hebt niet alles opgeslagen bent u zeker dat u de pagina wenst te verlaten?",
"Restore last draft": "Herstel het laatste concept",
"Special character": "Speciale karakters",
"Source code": "Broncode",
-"B": "Blauw",
+"Insert\/Edit code sample": "Broncode invoegen\/bewerken",
+"Language": "Programmeertaal",
+"Code sample": "Broncode voorbeeld",
+"Color": "Kleur",
"R": "Rood",
"G": "Groen",
-"Color": "Kleur",
-"Right to left": "Rechts naar links",
+"B": "Blauw",
"Left to right": "Links naar rechts",
+"Right to left": "Rechts naar links",
"Emoticons": "Emoticons",
-"Robots": "Robots",
"Document properties": "Document eigenschappen",
"Title": "Titel",
"Keywords": "Sleutelwoorden",
-"Encoding": "Codering",
"Description": "Omschrijving",
+"Robots": "Robots",
"Author": "Auteur",
+"Encoding": "Codering",
"Fullscreen": "Volledig scherm",
+"Action": "Actie",
+"Shortcut": "Snelkoppeling",
+"Help": "Help",
+"Address": "Adres",
+"Focus to menubar": "Menubalk selecteren",
+"Focus to toolbar": "Werkbalk selecteren",
+"Focus to element path": "Element pad selecteren",
+"Focus to contextual toolbar": "Contextuele werkbalk selecteren",
+"Insert link (if link plugin activated)": "Link invoegen (als link plug-in geactiveerd is)",
+"Save (if save plugin activated)": "Opslaan (als opslaan plug-in ingeschakeld is)",
+"Find (if searchreplace plugin activated)": "Zoeken (als zoeken\/vervangen plug-in ingeschakeld is)",
+"Plugins installed ({0}):": "Plug-ins ge\u00efnstalleerd ({0}):",
+"Premium plugins:": "Premium plug-ins:",
+"Learn more...": "Leer meer...",
+"You are using {0}": "Je gebruikt {0}",
+"Plugins": "Plug-ins",
+"Handy Shortcuts": "Handige snelkoppelingen",
"Horizontal line": "Horizontale lijn",
-"Horizontal space": "Horizontale ruimte",
"Insert\/edit image": "Afbeelding invoegen\/bewerken",
-"General": "Algemeen",
-"Advanced": "Geavanceerd",
+"Image description": "Afbeelding omschrijving",
"Source": "Bron",
-"Border": "Rand",
+"Dimensions": "Afmetingen",
"Constrain proportions": "Verhoudingen behouden",
-"Vertical space": "Verticale ruimte",
-"Image description": "Afbeelding omschrijving",
+"General": "Algemeen",
+"Advanced": "Geavanceerd",
"Style": "Stijl",
-"Dimensions": "Afmetingen",
+"Vertical space": "Verticale ruimte",
+"Horizontal space": "Horizontale ruimte",
+"Border": "Rand",
"Insert image": "Afbeelding invoegen",
-"Zoom in": "Inzoomen",
-"Contrast": "Contrast",
-"Back": "Terug",
-"Gamma": "Gamma",
-"Flip horizontally": "Horizontaal spiegelen",
-"Resize": "Formaat aanpassen",
-"Sharpen": "Scherpte",
-"Zoom out": "Uitzoomen",
-"Image options": "Afbeelding opties",
-"Apply": "Toepassen",
-"Brightness": "Helderheid",
-"Rotate clockwise": "Rechtsom draaien",
+"Image": "Afbeelding",
+"Image list": "Afbeeldingenlijst",
"Rotate counterclockwise": "Linksom draaien",
+"Rotate clockwise": "Rechtsom draaien",
+"Flip vertically": "Verticaal spiegelen",
+"Flip horizontally": "Horizontaal spiegelen",
"Edit image": "Bewerk afbeelding",
-"Color levels": "Kleurniveau's",
+"Image options": "Afbeelding opties",
+"Zoom in": "Inzoomen",
+"Zoom out": "Uitzoomen",
"Crop": "Uitsnijden",
+"Resize": "Formaat aanpassen",
"Orientation": "Orientatie",
-"Flip vertically": "Verticaal spiegelen",
+"Brightness": "Helderheid",
+"Sharpen": "Scherpte",
+"Contrast": "Contrast",
+"Color levels": "Kleurniveau's",
+"Gamma": "Gamma",
"Invert": "Omkeren",
+"Apply": "Toepassen",
+"Back": "Terug",
"Insert date\/time": "Voeg datum\/tijd in",
-"Remove link": "Link verwijderen",
-"Url": "Url",
-"Text to display": "Linktekst",
-"Anchors": "Anker",
+"Date\/time": "Datum\/tijd",
"Insert link": "Hyperlink invoegen",
-"New window": "Nieuw venster",
-"None": "Geen",
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"http:\/\/\" aan toevoegen?",
+"Insert\/edit link": "Hyperlink invoegen\/bewerken",
+"Text to display": "Linktekst",
+"Url": "Url",
"Target": "Doel",
+"None": "Geen",
+"New window": "Nieuw venster",
+"Remove link": "Link verwijderen",
+"Anchors": "Anker",
+"Link": "Link",
+"Paste or type a link": "Plak of typ een link",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "De ingegeven URL lijkt op een e-mailadres. Wil je er \"mailto:\" aan toevoegen?",
-"Insert\/edit link": "Hyperlink invoegen\/bewerken",
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"http:\/\/\" aan toevoegen?",
+"Link list": "Linklijst",
+"Insert video": "Video invoegen",
"Insert\/edit video": "Video invoegen\/bewerken",
-"Poster": "Poster",
+"Insert\/edit media": "Media invoegen\/bewerken",
"Alternative source": "Alternatieve bron",
+"Poster": "Poster",
"Paste your embed code below:": "Plak u in te sluiten code hieronder:",
-"Insert video": "Video invoegen",
"Embed": "Insluiten",
+"Media": "Media",
"Nonbreaking space": "Vaste spatie invoegen",
"Page break": "Pagina einde",
"Paste as text": "Plakken als tekst",
"Preview": "Voorbeeld",
"Print": "Print",
"Save": "Opslaan",
-"Could not find the specified string.": "Geen resultaten gevonden",
+"Find": "Zoeken",
+"Replace with": "Vervangen door",
"Replace": "Vervangen",
+"Replace all": "Alles vervangen",
+"Prev": "Vorige",
"Next": "Volgende",
-"Whole words": "Alleen hele woorden",
"Find and replace": "Zoek en vervang",
-"Replace with": "Vervangen door",
-"Find": "Zoeken",
-"Replace all": "Alles vervangen",
+"Could not find the specified string.": "Geen resultaten gevonden",
"Match case": "Identieke hoofd\/kleine letters",
-"Prev": "Vorige",
+"Whole words": "Alleen hele woorden",
"Spellcheck": "Spellingscontrole",
-"Finish": "Einde",
-"Ignore all": "Alles negeren",
"Ignore": "Negeren",
+"Ignore all": "Alles negeren",
+"Finish": "Einde",
"Add to Dictionary": "Toevoegen aan woordenlijst",
+"Insert table": "Tabel invoegen",
+"Table properties": "Tabel eigenschappen",
+"Delete table": "Verwijder tabel",
+"Cell": "Cel",
+"Row": "Rij",
+"Column": "Kolom",
+"Cell properties": "Cel eigenschappen",
+"Merge cells": "Cellen samenvoegen",
+"Split cell": "Cel splitsen",
"Insert row before": "Voeg rij boven toe",
-"Rows": "Rijen",
-"Height": "Hoogte",
+"Insert row after": "Voeg rij onder toe",
+"Delete row": "Verwijder rij",
+"Row properties": "Rij eigenschappen",
+"Cut row": "Knip rij",
+"Copy row": "Kopieer rij",
+"Paste row before": "Plak rij boven",
"Paste row after": "Plak rij onder",
-"Alignment": "Uitlijning",
-"Border color": "Randkleur",
-"Column group": "Kolomgroep",
-"Row": "Rij",
"Insert column before": "Voeg kolom in voor",
-"Split cell": "Cel splitsen",
-"Cell padding": "Ruimte binnen cel",
+"Insert column after": "Voeg kolom in na",
+"Delete column": "Verwijder kolom",
+"Cols": "Kolommen",
+"Rows": "Rijen",
+"Width": "Breedte",
+"Height": "Hoogte",
"Cell spacing": "Celruimte",
-"Row type": "Rijtype",
-"Insert table": "Tabel invoegen",
-"Body": "Body",
+"Cell padding": "Ruimte binnen cel",
"Caption": "Onderschrift",
-"Footer": "Voettekst",
-"Delete row": "Verwijder rij",
-"Paste row before": "Plak rij boven",
+"Left": "Links",
+"Center": "Midden",
+"Right": "Rechts",
+"Cell type": "Celtype",
"Scope": "Bereik",
-"Delete table": "Verwijder tabel",
+"Alignment": "Uitlijning",
"H Align": "Links uitlijnen",
+"V Align": "Boven uitlijnen",
"Top": "Bovenaan",
-"Header cell": "Kopcel",
-"Column": "Kolom",
-"Row group": "Rijgroep",
-"Cell": "Cel",
"Middle": "Centreren",
-"Cell type": "Celtype",
-"Copy row": "Kopieer rij",
-"Row properties": "Rij eigenschappen",
-"Table properties": "Tabel eigenschappen",
"Bottom": "Onderaan",
-"V Align": "Boven uitlijnen",
+"Header cell": "Kopcel",
+"Row group": "Rijgroep",
+"Column group": "Kolomgroep",
+"Row type": "Rijtype",
"Header": "Koptekst",
-"Right": "Rechts",
-"Insert column after": "Voeg kolom in na",
-"Cols": "Kolommen",
-"Insert row after": "Voeg rij onder toe",
-"Width": "Breedte",
-"Cell properties": "Cel eigenschappen",
-"Left": "Links",
-"Cut row": "Knip rij",
-"Delete column": "Verwijder kolom",
-"Center": "Midden",
-"Merge cells": "Cellen samenvoegen",
+"Body": "Body",
+"Footer": "Voettekst",
+"Border color": "Randkleur",
"Insert template": "Sjabloon invoegen",
"Templates": "Sjablonen",
+"Template": "Sjabloon",
+"Text color": "Tekstkleur",
"Background color": "Achtergrondkleur",
"Custom...": "Eigen...",
"Custom color": "Eigen kleur",
"No color": "Geen kleur",
-"Text color": "Tekstkleur",
+"Table of Contents": "Inhoudsopgave",
"Show blocks": "Blokken tonen",
"Show invisible characters": "Onzichtbare karakters tonen",
"Words: {0}": "Woorden: {0}",
-"Insert": "Invoegen",
+"{0} words": "{0} woorden",
"File": "Bestand",
"Edit": "Bewerken",
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Druk ALT-F9 voor het menu. Druk ALT-F10 voor de toolbar. Druk ALT-0 voor help.",
-"Tools": "Gereedschap",
+"Insert": "Invoegen",
"View": "Beeld",
+"Format": "Opmaak",
"Table": "Tabel",
-"Format": "Opmaak"
+"Tools": "Gereedschap",
+"Powered by {0}": "Gemaakt door {0}",
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich Text Area. Druk ALT-F9 voor het menu. Druk ALT-F10 voor de toolbar. Druk ALT-0 voor help."
});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinymce/langs/ru.js b/vendor/assets/javascripts/tinymce/langs/ru.js
index 110a978002..ad71a20475 100755
--- a/vendor/assets/javascripts/tinymce/langs/ru.js
+++ b/vendor/assets/javascripts/tinymce/langs/ru.js
@@ -1,219 +1,260 @@
tinymce.addI18n('ru',{
+"Redo": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
+"Undo": "\u0412\u0435\u0440\u043d\u0443\u0442\u044c",
"Cut": "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c",
-"Heading 5": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",
-"Header 2": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",
-"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0443\u0444\u0435\u0440\u0443 \u043e\u0431\u043c\u0435\u043d\u0430. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448: Ctrl+X\/C\/V.",
-"Heading 4": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",
-"Div": "\u0411\u043b\u043e\u043a",
-"Heading 2": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",
+"Copy": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
"Paste": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",
-"Close": "\u0417\u0430\u043a\u0440\u044b\u0442\u044c",
-"Font Family": "\u0428\u0440\u0438\u0444\u0442",
-"Pre": "\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",
-"Align right": "\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
+"Select all": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435",
"New document": "\u041d\u043e\u0432\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442",
-"Blockquote": "\u0426\u0438\u0442\u0430\u0442\u0430",
+"Ok": "\u041e\u043a",
+"Cancel": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
+"Visual aids": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0443\u0440\u044b",
+"Bold": "\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439",
+"Italic": "\u041a\u0443\u0440\u0441\u0438\u0432",
+"Underline": "\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439",
+"Strikethrough": "\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439",
+"Superscript": "\u0412\u0435\u0440\u0445\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",
+"Subscript": "\u041d\u0438\u0436\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",
+"Clear formatting": "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442",
+"Align left": "\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
+"Align center": "\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",
+"Align right": "\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
+"Justify": "\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435",
+"Bullet list": "\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a",
"Numbered list": "\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a",
-"Heading 1": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",
-"Headings": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438",
+"Decrease indent": "\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f",
"Increase indent": "\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f",
+"Close": "\u0417\u0430\u043a\u0440\u044b\u0442\u044c",
"Formats": "\u0424\u043e\u0440\u043c\u0430\u0442",
+"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0443\u0444\u0435\u0440\u0443 \u043e\u0431\u043c\u0435\u043d\u0430. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448: Ctrl+X\/C\/V.",
"Headers": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438",
-"Select all": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435",
-"Header 3": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",
-"Blocks": "\u0411\u043b\u043e\u043a\u0438",
-"Undo": "\u0412\u0435\u0440\u043d\u0443\u0442\u044c",
-"Strikethrough": "\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439",
-"Bullet list": "\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a",
"Header 1": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",
-"Superscript": "\u0412\u0435\u0440\u0445\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",
-"Clear formatting": "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442",
-"Font Sizes": "\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",
-"Subscript": "\u041d\u0438\u0436\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",
-"Header 6": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",
-"Redo": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
-"Paragraph": "\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",
-"Ok": "\u041e\u043a",
-"Bold": "\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439",
-"Code": "\u041a\u043e\u0434",
-"Italic": "\u041a\u0443\u0440\u0441\u0438\u0432",
-"Align center": "\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",
+"Header 2": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",
+"Header 3": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",
+"Header 4": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",
"Header 5": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",
-"Heading 6": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",
+"Header 6": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",
+"Headings": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438",
+"Heading 1": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",
+"Heading 2": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",
"Heading 3": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",
-"Decrease indent": "\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f",
-"Header 4": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",
-"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e.",
-"Underline": "\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439",
-"Cancel": "\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
-"Justify": "\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435",
+"Heading 4": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",
+"Heading 5": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",
+"Heading 6": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",
+"Div": "\u0411\u043b\u043e\u043a",
+"Pre": "\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",
+"Code": "\u041a\u043e\u0434",
+"Paragraph": "\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",
+"Blockquote": "\u0426\u0438\u0442\u0430\u0442\u0430",
"Inline": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435",
-"Copy": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
-"Align left": "\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
-"Visual aids": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0443\u0440\u044b",
-"Lower Greek": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0433\u0440\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
-"Square": "\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u044b",
+"Blocks": "\u0411\u043b\u043e\u043a\u0438",
+"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e.",
+"Font Family": "\u0428\u0440\u0438\u0444\u0442",
+"Font Sizes": "\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",
+"Class": "\u041a\u043b\u0430\u0441\u0441",
+"Browse for an image": "\u0412\u044b\u0431\u043e\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
+"OR": "\u0418\u041b\u0418",
+"Drop an image here": "\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u044e\u0434\u0430",
+"Upload": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c",
+"Block": "\u0411\u043b\u043e\u043a",
+"Align": "\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
"Default": "\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439",
-"Lower Alpha": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
"Circle": "\u041e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438",
"Disc": "\u041a\u0440\u0443\u0433\u0438",
+"Square": "\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u044b",
+"Lower Alpha": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
+"Lower Greek": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0433\u0440\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
+"Lower Roman": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b",
"Upper Alpha": "\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b",
"Upper Roman": "\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b",
-"Lower Roman": "\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b",
-"Name": "\u0418\u043c\u044f",
"Anchor": "\u042f\u043a\u043e\u0440\u044c",
+"Name": "\u0418\u043c\u044f",
+"Id": "Id",
+"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "Id \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u0431\u0443\u043a\u0432\u044b, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0431\u0443\u043a\u0432\u044b, \u0446\u0438\u0444\u0440\u044b, \u0442\u0438\u0440\u0435, \u0442\u043e\u0447\u043a\u0438, \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f \u0438\u043b\u0438 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f.",
"You have unsaved changes are you sure you want to navigate away?": "\u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0439\u0442\u0438?",
"Restore last draft": "\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430",
"Special character": "\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b",
"Source code": "\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434",
-"B": "B",
+"Insert\/Edit code sample": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430",
+"Language": "\u042f\u0437\u044b\u043a",
+"Code sample": "\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434",
+"Color": "\u0426\u0432\u0435\u0442",
"R": "R",
"G": "G",
-"Color": "\u0426\u0432\u0435\u0442",
-"Right to left": "\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",
+"B": "B",
"Left to right": "\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",
+"Right to left": "\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",
"Emoticons": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043c\u0430\u0439\u043b",
-"Robots": "\u0420\u043e\u0431\u043e\u0442\u044b",
"Document properties": "\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
"Title": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
"Keywords": "\u041a\u043b\u044e\u0447\u0438\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430",
-"Encoding": "\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",
"Description": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
+"Robots": "\u0420\u043e\u0431\u043e\u0442\u044b",
"Author": "\u0410\u0432\u0442\u043e\u0440",
+"Encoding": "\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",
"Fullscreen": "\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c",
+"Action": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435",
+"Shortcut": "\u042f\u0440\u043b\u044b\u043a",
+"Help": "\u041f\u043e\u043c\u043e\u0449\u044c",
+"Address": "\u0410\u0434\u0440\u0435\u0441",
+"Focus to menubar": "\u0424\u043e\u043a\u0443\u0441 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u043c\u0435\u043d\u044e",
+"Focus to toolbar": "\u0424\u043e\u043a\u0443\u0441 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432",
+"Focus to element path": "\u0424\u043e\u043a\u0443\u0441 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u043f\u0443\u0442\u0438",
+"Focus to contextual toolbar": "\u0424\u043e\u043a\u0443\u0441 \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432",
+"Insert link (if link plugin activated)": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 (\u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d link \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d)",
+"Save (if save plugin activated)": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c (\u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d save \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d)",
+"Find (if searchreplace plugin activated)": "\u041d\u0430\u0439\u0442\u0438 (\u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d searchreplace \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d)",
+"Plugins installed ({0}):": "\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b ({0}):",
+"Premium plugins:": "\u041f\u0440\u0435\u043c\u0438\u0443\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u044b:",
+"Learn more...": "\u0423\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435...",
+"You are using {0}": "\u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 {0}",
+"Plugins": "\u041f\u043b\u0430\u0433\u0438\u043d\u044b",
+"Handy Shortcuts": "\u0413\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438",
"Horizontal line": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f",
-"Horizontal space": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b",
"Insert\/edit image": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
-"General": "\u041e\u0431\u0449\u0435\u0435",
-"Advanced": "\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435",
+"Image description": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
"Source": "\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a",
-"Border": "\u0420\u0430\u043c\u043a\u0430",
+"Dimensions": "\u0420\u0430\u0437\u043c\u0435\u0440",
"Constrain proportions": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",
-"Vertical space": "\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b",
-"Image description": "\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
+"General": "\u041e\u0431\u0449\u0435\u0435",
+"Advanced": "\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435",
"Style": "\u0421\u0442\u0438\u043b\u044c",
-"Dimensions": "\u0420\u0430\u0437\u043c\u0435\u0440",
+"Vertical space": "\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b",
+"Horizontal space": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b",
+"Border": "\u0420\u0430\u043c\u043a\u0430",
"Insert image": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
-"Zoom in": "\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c",
-"Contrast": "\u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442",
-"Back": "\u041d\u0430\u0437\u0430\u0434",
-"Gamma": "\u0413\u0430\u043c\u043c\u0430",
-"Flip horizontally": "\u041e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438",
-"Resize": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",
-"Sharpen": "\u0427\u0435\u0442\u043a\u043e\u0441\u0442\u044c",
-"Zoom out": "\u041e\u0442\u0434\u0430\u043b\u0438\u0442\u044c",
-"Image options": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
-"Apply": "\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",
-"Brightness": "\u042f\u0440\u043a\u043e\u0441\u0442\u044c",
-"Rotate clockwise": "\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0435",
+"Image": "\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
+"Image list": "\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439",
"Rotate counterclockwise": "\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0438",
+"Rotate clockwise": "\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0435",
+"Flip vertically": "\u041e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438",
+"Flip horizontally": "\u041e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438",
"Edit image": "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
-"Color levels": "\u0426\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438",
+"Image options": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
+"Zoom in": "\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c",
+"Zoom out": "\u041e\u0442\u0434\u0430\u043b\u0438\u0442\u044c",
"Crop": "\u041e\u0431\u0440\u0435\u0437\u0430\u0442\u044c",
+"Resize": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",
"Orientation": "\u041e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f",
-"Flip vertically": "\u041e\u0442\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438",
+"Brightness": "\u042f\u0440\u043a\u043e\u0441\u0442\u044c",
+"Sharpen": "\u0427\u0435\u0442\u043a\u043e\u0441\u0442\u044c",
+"Contrast": "\u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442",
+"Color levels": "\u0426\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438",
+"Gamma": "\u0413\u0430\u043c\u043c\u0430",
"Invert": "\u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f",
+"Apply": "\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",
+"Back": "\u041d\u0430\u0437\u0430\u0434",
"Insert date\/time": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u0442\u0443\/\u0432\u0440\u0435\u043c\u044f",
-"Remove link": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
-"Url": "\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044b\u043b\u043a\u0438",
-"Text to display": "\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442",
-"Anchors": "\u042f\u043a\u043e\u0440\u044f",
+"Date\/time": "\u0414\u0430\u0442\u0430\/\u0432\u0440\u0435\u043c\u044f",
"Insert link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
-"New window": "\u0412 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435",
-"None": "\u041d\u0435\u0442",
-"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttp:\/\/\u00bb?",
+"Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
+"Text to display": "\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442",
+"Url": "\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044b\u043b\u043a\u0438",
"Target": "\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
+"None": "\u041d\u0435\u0442",
+"New window": "\u0412 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435",
+"Remove link": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
+"Anchors": "\u042f\u043a\u043e\u0440\u044f",
+"Link": "\u0421\u0441\u044b\u043b\u043a\u0430",
+"Paste or type a link": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043b\u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0441\u044b\u043b\u043a\u0443",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abmailto:\u00bb?",
-"Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
+"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttp:\/\/\u00bb?",
+"Link list": "\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a",
+"Insert video": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
"Insert\/edit video": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
-"Poster": "\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
+"Insert\/edit media": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
"Alternative source": "\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a",
+"Poster": "\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
"Paste your embed code below:": "\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432\u0430\u0448 \u043a\u043e\u0434 \u043d\u0438\u0436\u0435:",
-"Insert video": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
"Embed": "\u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438",
+"Media": "\u0412\u0438\u0434\u0435\u043e",
"Nonbreaking space": "\u041d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b",
"Page break": "\u0420\u0430\u0437\u0440\u044b\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b",
"Paste as text": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442",
"Preview": "\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",
"Print": "\u041f\u0435\u0447\u0430\u0442\u044c",
"Save": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c",
-"Could not find the specified string.": "\u0417\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430",
+"Find": "\u041d\u0430\u0439\u0442\u0438",
+"Replace with": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",
"Replace": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c",
+"Replace all": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",
+"Prev": "\u0412\u0432\u0435\u0440\u0445",
"Next": "\u0412\u043d\u0438\u0437",
-"Whole words": "\u0421\u043b\u043e\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c",
"Find and replace": "\u041f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0430",
-"Replace with": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",
-"Find": "\u041d\u0430\u0439\u0442\u0438",
-"Replace all": "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",
+"Could not find the specified string.": "\u0417\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430",
"Match case": "\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440",
-"Prev": "\u0412\u0432\u0435\u0440\u0445",
+"Whole words": "\u0421\u043b\u043e\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c",
"Spellcheck": "\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
-"Finish": "\u0417\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c",
-"Ignore all": "\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435",
"Ignore": "\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c",
+"Ignore all": "\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435",
+"Finish": "\u0417\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c",
"Add to Dictionary": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c",
+"Insert table": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443",
+"Table properties": "\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b",
+"Delete table": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443",
+"Cell": "\u042f\u0447\u0435\u0439\u043a\u0430",
+"Row": "\u0421\u0442\u0440\u043e\u043a\u0430",
+"Column": "\u0421\u0442\u043e\u043b\u0431\u0435\u0446",
+"Cell properties": "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438",
+"Merge cells": "\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",
+"Split cell": "\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0443",
"Insert row before": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",
-"Rows": "\u0421\u0442\u0440\u043e\u043a\u0438",
-"Height": "\u0412\u044b\u0441\u043e\u0442\u0430",
+"Insert row after": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443",
+"Delete row": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
+"Row properties": "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438",
+"Cut row": "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
+"Copy row": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
+"Paste row before": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",
"Paste row after": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443",
-"Alignment": "\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
-"Border color": "\u0426\u0432\u0435\u0442 \u0440\u0430\u043c\u043a\u0438",
-"Column group": "\u0413\u0440\u0443\u043f\u043f\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a",
-"Row": "\u0421\u0442\u0440\u043e\u043a\u0430",
"Insert column before": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043b\u0435\u0432\u0430",
-"Split cell": "\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0443",
-"Cell padding": "\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f",
+"Insert column after": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043f\u0440\u0430\u0432\u0430",
+"Delete column": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446",
+"Cols": "\u0421\u0442\u043e\u043b\u0431\u0446\u044b",
+"Rows": "\u0421\u0442\u0440\u043e\u043a\u0438",
+"Width": "\u0428\u0438\u0440\u0438\u043d\u0430",
+"Height": "\u0412\u044b\u0441\u043e\u0442\u0430",
"Cell spacing": "\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f",
-"Row type": "\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438",
-"Insert table": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443",
-"Body": "\u0422\u0435\u043b\u043e",
+"Cell padding": "\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f",
"Caption": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
-"Footer": "\u041d\u0438\u0437",
-"Delete row": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
-"Paste row before": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",
+"Left": "\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
+"Center": "\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",
+"Right": "\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
+"Cell type": "\u0422\u0438\u043f \u044f\u0447\u0435\u0439\u043a\u0438",
"Scope": "Scope",
-"Delete table": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443",
+"Alignment": "\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
"H Align": "\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
+"V Align": "\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
"Top": "\u041f\u043e \u0432\u0435\u0440\u0445\u0443",
-"Header cell": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
-"Column": "\u0421\u0442\u043e\u043b\u0431\u0435\u0446",
-"Row group": "\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",
-"Cell": "\u042f\u0447\u0435\u0439\u043a\u0430",
"Middle": "\u041f\u043e \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435",
-"Cell type": "\u0422\u0438\u043f \u044f\u0447\u0435\u0439\u043a\u0438",
-"Copy row": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
-"Row properties": "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438",
-"Table properties": "\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b",
"Bottom": "\u041f\u043e \u043d\u0438\u0437\u0443",
-"V Align": "\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",
+"Header cell": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
+"Row group": "\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",
+"Column group": "\u0413\u0440\u0443\u043f\u043f\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a",
+"Row type": "\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438",
"Header": "\u0428\u0430\u043f\u043a\u0430",
-"Right": "\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
-"Insert column after": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043f\u0440\u0430\u0432\u0430",
-"Cols": "\u0421\u0442\u043e\u043b\u0431\u0446\u044b",
-"Insert row after": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443",
-"Width": "\u0428\u0438\u0440\u0438\u043d\u0430",
-"Cell properties": "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438",
-"Left": "\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",
-"Cut row": "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443",
-"Delete column": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446",
-"Center": "\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",
-"Merge cells": "\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",
+"Body": "\u0422\u0435\u043b\u043e",
+"Footer": "\u041d\u0438\u0437",
+"Border color": "\u0426\u0432\u0435\u0442 \u0440\u0430\u043c\u043a\u0438",
"Insert template": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d",
"Templates": "\u0428\u0430\u0431\u043b\u043e\u043d\u044b",
+"Template": "\u0428\u0430\u0431\u043b\u043e\u043d",
+"Text color": "\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430",
"Background color": "\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430",
"Custom...": "\u0412\u044b\u0431\u0440\u0430\u0442\u044c\u2026",
"Custom color": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0446\u0432\u0435\u0442",
"No color": "\u0411\u0435\u0437 \u0446\u0432\u0435\u0442\u0430",
-"Text color": "\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430",
+"Table of Contents": "\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",
"Show blocks": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438",
"Show invisible characters": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b",
"Words: {0}": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432: {0}",
-"Insert": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",
+"{0} words": "\u0441\u043b\u043e\u0432: {0}",
"File": "\u0424\u0430\u0439\u043b",
"Edit": "\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c",
-"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-F9 \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e, ALT-F10 \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, ALT-0 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e\u043c\u043e\u0449\u0438.",
-"Tools": "\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b",
+"Insert": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",
"View": "\u0412\u0438\u0434",
+"Format": "\u0424\u043e\u0440\u043c\u0430\u0442",
"Table": "\u0422\u0430\u0431\u043b\u0438\u0446\u0430",
-"Format": "\u0424\u043e\u0440\u043c\u0430\u0442"
+"Tools": "\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b",
+"Powered by {0}": "\u041f\u0440\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 {0}",
+"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-F9 \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e, ALT-F10 \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, ALT-0 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e\u043c\u043e\u0449\u0438."
});
\ No newline at end of file
diff --git a/vendor/assets/javascripts/tinymce/license.txt b/vendor/assets/javascripts/tinymce/license.txt
index 1837b0acbe..b17fc90494 100755
--- a/vendor/assets/javascripts/tinymce/license.txt
+++ b/vendor/assets/javascripts/tinymce/license.txt
@@ -1,5 +1,5 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -10,7 +10,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
- GNU LESSER GENERAL PUBLIC LICENSE
+ GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
@@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
diff --git a/vendor/assets/javascripts/tinymce/tinymce.min.js b/vendor/assets/javascripts/tinymce/tinymce.min.js
index 5cc0f19365..e34576a3da 100755
--- a/vendor/assets/javascripts/tinymce/tinymce.min.js
+++ b/vendor/assets/javascripts/tinymce/tinymce.min.js
@@ -1,15 +1,2 @@
-// 4.4.3 (2016-09-01)
-!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),0>i-n||0>a-r?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,h,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,h=t.x+t.w,p=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-h),s=l(0,f-p),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r(c,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;or;r++)e[r].then(t,n)})},t}),r(u,[c],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;r=534;return{opera:r,webkit:i,ie:o,gecko:l,mac:c,iOS:u,android:d,contentEditable:g,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=o,range:window.getSelection&&"Range"in window,documentMode:o&&!s?document.documentMode||7:10,fileApi:f,ceFalse:o===!1||o>8,canHaveCSP:o===!1||o>11,desktop:!h&&!p,windowsPhone:m}}),r(f,[u,d],function(e,t){function n(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function r(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function i(e,t){var n,r=t;return n=e.path,n&&n.length>0&&(r=n[0]),e.deepPath&&(n=e.deepPath(),n&&n.length>0&&(r=n[0])),r}function o(e,n){function r(){return!1}function o(){return!0}var a,s=n||{},l;for(a in e)u[a]||(s[a]=e[a]);if(s.target||(s.target=s.srcElement||document),t.experimentalShadowDom&&(s.target=i(e,s.target)),e&&c.test(e.type)&&e.pageX===l&&e.clientX!==l){var d=s.target.ownerDocument||document,f=d.documentElement,h=d.body;s.pageX=e.clientX+(f&&f.scrollLeft||h&&h.scrollLeft||0)-(f&&f.clientLeft||h&&h.clientLeft||0),s.pageY=e.clientY+(f&&f.scrollTop||h&&h.scrollTop||0)-(f&&f.clientTop||h&&h.clientTop||0)}return s.preventDefault=function(){s.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},s.stopPropagation=function(){s.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},s.stopImmediatePropagation=function(){s.isImmediatePropagationStopped=o,s.stopPropagation()},s.isDefaultPrevented||(s.isDefaultPrevented=r,s.isPropagationStopped=r,s.isImmediatePropagationStopped=r),"undefined"==typeof s.metaKey&&(s.metaKey=!1),s}function a(t,i,o){function a(){o.domLoaded||(o.domLoaded=!0,i(u))}function s(){("complete"===c.readyState||"interactive"===c.readyState&&c.body)&&(r(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(t){return void e.setTimeout(l)}a()}var c=t.document,u={type:"ready"};return o.domLoaded?void i(u):(c.addEventListener?"complete"===c.readyState?a():n(t,"DOMContentLoaded",a):(n(c,"readystatechange",s),c.documentElement.doScroll&&t.self===t.top&&l()),void n(t,"load",a))}function s(){function e(e,t){var n,r,o,a,s=i[t];if(n=s&&s[e.type])for(r=0,o=n.length;o>r;r++)if(a=n[r],a&&a.func.call(a.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var t=this,i={},s,c,u,d,f;c=l+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},s=1,t.domLoaded=!1,t.events=i,t.bind=function(r,l,h,p){function m(t){e(o(t||N.event),g)}var g,v,y,b,C,x,w,N=window;if(r&&3!==r.nodeType&&8!==r.nodeType){for(r[c]?g=r[c]:(g=s++,r[c]=g,i[g]={}),p=p||r,l=l.split(" "),y=l.length;y--;)b=l[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),t.domLoaded&&"ready"===b&&"complete"==r.readyState?h.call(p,o({type:b})):(d||(C=f[b],C&&(x=function(t){var n,r;if(n=t.currentTarget,r=t.relatedTarget,r&&n.contains)r=n.contains(r);else for(;r&&r!==n;)r=r.parentNode;r||(t=o(t||N.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){t=o(t||N.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=i[g][b],v?"ready"===b&&t.domLoaded?h({type:b}):v.push({func:h,scope:p}):(i[g][b]=v=[{func:h,scope:p}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?a(r,x,t):n(r,C||b,x,w)));return r=v=0,h}},t.unbind=function(e,n,o){var a,s,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return t;if(a=e[c]){if(f=i[a],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],s=f[d]){if(o)for(u=s.length;u--;)if(s[u].func===o){var h=s.nativeHandler,p=s.fakeName,m=s.capture;s=s.slice(0,u).concat(s.slice(u+1)),s.nativeHandler=h,s.fakeName=p,s.capture=m,f[d]=s}o&&0!==s.length||(delete f[d],r(e,s.fakeName||d,s.nativeHandler,s.capture))}}else{for(d in f)s=f[d],r(e,s.fakeName||d,s.nativeHandler,s.capture);f={}}for(d in f)return t;delete i[a];try{delete e[c]}catch(g){e[c]=null}}return t},t.fire=function(n,r,i){var a;if(!n||3===n.nodeType||8===n.nodeType)return t;i=o(null,i),i.type=r,i.target=n;do a=n[c],a&&e(i,a),n=n.parentNode||n.ownerDocument||n.defaultView||n.parentWindow;while(n&&!i.isPropagationStopped());return t},t.clean=function(e){var n,r,i=t.unbind;if(!e||3===e.nodeType||8===e.nodeType)return t;if(e[c]&&i(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(i(e),r=e.getElementsByTagName("*"),n=r.length;n--;)e=r[n],e[c]&&i(e);return t},t.destroy=function(){i={}},t.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var l="mce-data-",c=/^(?:mouse|contextmenu)|click/,u={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};return s.Event=new s,s.Event.bind(window,"ready",function(){}),s}),r(h,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(M&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=_(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=W++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[U,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===U&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=U+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(U=C)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(U=C,T=y),m};return i?r(a):a}var C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,O,H,I,F="sizzle"+-new Date,z=window.document,U=0,W=0,V=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(z.childNodes),z.childNodes),G[z.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},E=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:z,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,L=r.documentElement,M=!E(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return M?t.getElementsByClassName(e):void 0},O=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(H=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),O.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),O=O.length&&new RegExp(O.join("|")),n=ge.test(L.compareDocumentPosition),I=n||ge.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===z&&I(z,e)?-1:t===r||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&M&&(!O||!O.test(n))&&(!P||!P.test(n)))try{var r=H.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!M):t;return i!==t?i:x.attributes||!M?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},N=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=N(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=_(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===U&&c[1],f=c[0]===U&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[U,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===U)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[U,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do if(n=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===L},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&M&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0],
-!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!M,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(p,[],function(){function e(e){var t=e,n,r;if(!u(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);ir;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r(m,[d,p],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?"array"==r&&n.isArray(e)?!0:typeof e==r:e!==t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function s(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function l(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){return t.call(i,e,n,r)===!1?!1:void l(e,t,r,i)}))}function c(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function d(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function f(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,extend:s,create:a,walk:l,createNS:c,resolve:u,explode:d,_addCacheSuffix:f}}),r(g,[f,h,m,d],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;ii&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,N=Array.prototype.push,E=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},L={},M={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)N.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;it;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:N,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(T[e]||(i=f.unique(i)),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(L,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),x(L,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(M,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=L,f.cssHooks=M,f}),r(v,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":"color"!==v&&"background-color"!==v||(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],!n||!n[e])}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(f&&!r(o,t)||(i+=(i.length>0?" ":"")+o+": "+a+";"));return i}}}}),r(y,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if(a=e.parentNode,a&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r(b,[m],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){N(F,e,t)}function o(e,t){N(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[V]=M[W],M[$]=M[U]):(M[W]=M[V],M[U]=M[$]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=M[W],r=M[U],i=M[V],o=M[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){E(I)}function m(){return E(O)}function g(){return E(H)}function v(e){var t=this[W],r=this[U],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return q(new t(n),{startContainer:M[W],startOffset:M[U],endContainer:M[V],endOffset:M[$],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return M[W]==M[V]&&M[U]==M[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function N(e,t,r){var i,o;for(e?(M[W]=t,M[U]=r):(M[V]=t,M[$]=r),i=M[V];i.parentNode;)i=i.parentNode;for(o=M[W];o.parentNode;)o=o.parentNode;o==i?w(M[W],M[U],M[V],M[$])>0&&M.collapse(e):M.collapse(e),M.collapsed=x(),M.commonAncestorContainer=n.findCommonAncestor(M[W],M[V])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[W]==M[V])return _(e);for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[W])return S(t,e);++n}for(t=M[W],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return k(t,e);++r}for(o=r-n,a=M[W];o>0;)a=a.parentNode,o--;for(s=M[V];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function _(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[U]==M[$])return t;if(3==M[W].nodeType){if(n=M[W].nodeValue,i=n.substring(M[U],M[$]),e!=H&&(o=M[W],c=M[U],u=M[$]-M[U],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(P.createTextNode(i)),t}for(o=C(M[W],M[U]),a=M[$]-M[U];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=H&&M.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[U],0>=a)return t!=H&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=H&&(M.setEndBefore(e),M.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=H&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=H&&(M.setStartAfter(e),M.collapse(F)),o}function R(e,t){var n=C(M[V],M[$]-1),r,i,o,a,s,l=n!=M[V];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(M[W],M[U]),r=n!=M[W],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[U],a=o.substring(l),s=o.substring(0,l)):(l=M[$],a=o.substring(0,l),s=o.substring(l)),i!=H&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==H?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var M=this,P=n.doc,O=0,H=1,I=2,F=!0,z=!1,U="startOffset",W="startContainer",V="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(M,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(C,[m],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||""+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||""+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(x,[m,u],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function h(e,n){e()||((new Date).getTime()-y0)return v=n.createElement("style"),v.textContent='@import "'+r+'"',m(),void i(v);p()}i(g),g.href=r}}var a=0,s={},l;r=r||{},l=r.maxLoadTime||5e3,this.load=o}}),r(w,[h,g,v,f,y,b,C,d,m,x],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function h(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n}function p(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!b||e.documentMode>=8,o.boxModel=!b||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var m=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(b&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),g(n,"string")&&(a=n,
-n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+""+e+">":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){m(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==p.DOM&&n===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==p.DOM&&n===document?void p.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void m(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),b&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),b?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="
"+t,r.removeChild(r.firstChild)}catch(i){n("").html("
"+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("
").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&m(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!x.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:h,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=y(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.insertBefore(n,e):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=h,p}),r(N,[w,m],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.remove=function(e){delete l[e],delete u[e]},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(E,[N,m],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(_,[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;n
n.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function a(e){this.walk=function(t,n){function r(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function i(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,o){var a=o?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=i(g==e?g:g[a],a),y.length&&(o||y.reverse(),n(r(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td[data-mce-selected],th[data-mce-selected]"),b.length>0)return void l(b,function(e){n([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=o(d,f)),c==d)return n(r([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return s(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return s(d,h);if(g===h)break}p=a(c,h)||c,m=a(d,h)||d,s(c,p,!0),y=i(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&n(r(y)),s(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return h=v,p=n?v.nodeValue.length:0,void(i=!0);if(e.isBlock(v)||y[v.nodeName.toLowerCase()])return;s=v}o&&s&&(h=s,i=!0,p=0)}var h,p,m,g=e.getRoot(),v,y,b,C;if(h=n[(r?"start":"end")+"Container"],p=n[(r?"start":"end")+"Offset"],C=1==h.nodeType&&p===h.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!u(h)){if(1==h.nodeType&&p>h.childNodes.length-1&&(b=!1),9===h.nodeType&&(h=e.getRoot(),p=0),h===g){if(b&&(v=h.childNodes[p>0?p-1:0])){if(u(v))return;if(y[v.nodeName]||"TABLE"==v.nodeName)return}if(h.hasChildNodes()){if(p=Math.min(!b&&p>0?p-1:p,h.childNodes.length-1),h=h.childNodes[p],p=0,!o&&h===g.lastChild&&"TABLE"===h.nodeName)return;if(l(h)||u(h))return;if(h.hasChildNodes()&&!/TABLE/.test(h.nodeName)){v=h,m=new t(h,g);do{if(c(v)||u(v)){i=!1;break}if(3===v.nodeType&&v.nodeValue.length>0){p=b?0:v.nodeValue.length,h=v,i=!0;break}if(y[v.nodeName.toLowerCase()]&&!a(v)){p=e.nodeIndex(v),h=v.parentNode,"IMG"!=v.nodeName||b||p++,i=!0;break}}while(v=b?m.next():m.prev())}}}o&&(3===h.nodeType&&0===p&&f(!0),1===h.nodeType&&(v=h.childNodes[p],v||(v=h.childNodes[p-1]),!v||"BR"!==v.nodeName||d(v,"A")||s(v)||s(v,!0)||f(!0,v))),b&&!o&&3===h.nodeType&&p===h.nodeValue.length&&f(!1),i&&n["set"+(r?"Start":"End")](h,p)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function s(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),i&&"HTML"!=i.tagName||(i=r.body),o.moveToElementText(i),a=e.toArray(o.getClientRects()),a=a.sort(function(e,t){return e=Math.abs(Math.max(e.top-n,e.bottom-n)),t=Math.abs(Math.max(t.top-n,t.bottom-n)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}var l=e.each,c=n.isContentEditableFalse,u=i.isCaretContainer;return a.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},a.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=s(e,t,n)}}return r},a.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},a.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},a}),r(R,[T,d,u],function(e,t,n){return function(r){function i(e){var t,n;if(n=r.$(e).parentsUntil(r.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;n=r.selection.getRng(),i={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t=r.selection,n,i,o;r.initialized&&t&&!r.settings.disable_nodechange&&!r.readonly&&(o=r.getBody(),n=t.getStart()||o,n.ownerDocument==r.getDoc()&&r.dom.isChildOf(n,o)||(n=o),"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),i=[],r.dom.getParent(n,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=n,e.parents=i,r.fire("NodeChange",e))}}}),r(A,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(B,[m],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;co;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,x,w,N,E,_,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,N=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(E in w)g[E]=w[E];v.push.apply(v,N)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],_=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:_}),c.defaultValue=_),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:_}),c.forcedValue=_),"<"===b&&(c.validValues=a(_,"?"))),
-T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,N=v),x&&(l.outputName=h,y[x]=l),T.test(h)?(l.pattern=d(h),C.push(l)):y[h]=l}}function h(e){y={},C=[],f(e),s(N,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],M[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i];a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n=r.exec(e),i,o;n&&(o=n[1],i=o?b[n[2]]:b[n[2]]={"#comment":{}},i=b[n[2]],s(t(n[3],"|"),function(e){"-"===o?delete i[e]:i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,N,E,_,S,k,T,R,A,B,D,L,M={},P={};e=e||{},N=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),E=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",D),L=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp(""+e+"[^>]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(N,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return L},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return _},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return E},v.getSpecialElements=function(){return P},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return M},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(D,[B,C,m],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),N&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(W[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(V.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,O,H,I,F=0,z=t.decode,U,W=n.makeMap("src,href,data,background,formaction,poster"),V=/((java|vb)script|mhtml):/i,$=/^data:/i;for(P=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),O=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),M=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),N=i.validate,b=i.remove_internals,U=i.fix_self_closing,H=a.getSpecialElements();c=P.exec(e);){if(u0&&h[h.length-1].name===d&&o(d),!N||(E=a.getElementRule(d))){if(_=!0,N&&(T=E.attributes,R=E.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(_=!1),p=[],p.map={},k.replace(O,s)):(p=[],p.map={}),N&&!y){if(A=E.attributesRequired,B=E.attributesDefault,D=E.attributesForced,L=E.removeEmptyAttrs,L&&!p.length&&(_=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(_=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,P.lastIndex),P.lastIndex=u;continue}_=!1}}_&&l.start(d,p,w)}else _=!1;if(f=H[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(_&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),_&&(g.length>0&&l.text(g,!0),l.end(d)),P.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?_&&l.end(d):h.push({name:d,valid:_}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(L,[A,B,D,m],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y,b;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),v=l.getSpecialElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,N,E,_,S,k,T,R,A=[],B,D,L,M,P,O,H,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),H=l.getNonEmptyElements(),O=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,P=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=O[b.name],s&&O[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(_=p[a],_?_.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&P[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&P[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(H))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(_=d[S],C=h[S],N=C.length;N--;)C[N].parent||C.splice(N,1);for(x=0,w=_.length;w>x;x++)_[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(_=f[x],_.name in p){for(C=p[_.name],N=C.length;N--;)C[N].parent||C.splice(N,1);for(N=0,E=_.callbacks.length;E>N;N++)_.callbacks[N](C,_.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push("",e,">"),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push("",e," ",s(t),"?>"):r.push("",e,"?>"),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(P,[M,B],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1&&(f=[],f.map={},m=r.getElementRule(e.name))){for(h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(O,[w,L,D,C,P,A,B,d,m,S],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;n=e.lastChild,t(n)&&(r=n.prev,t(r)&&(n.remove(),r.remove()))}var d=l.each,f=l.trim,h=e.DOM,p=["data-mce-selected"];return function(e,o){function m(e){var t=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+p.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function g(){var e=o.getBody().innerHTML,t=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r,i,a,s,l,c=o.schema;for(e=m(e),l=c.getShortEndedElements();s=t.exec(e);)i=t.lastIndex,a=s[0].length,r=l[s[1]]?i:n.findEndTag(c,e,i),e=e.substring(0,i-a)+e.substring(r),t.lastIndex=i-a;return f(e)}function v(e){-1===l.inArray(p,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),p.push(e))}var y,b,C;return o&&(y=o.dom,b=o.schema),y=y||h,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope,c;r--;)i=t[r],o=i.attributes.map[a],o!==c?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=y.serializeStyle(y.parseStyle(o),i.name):s&&(o=s.call(l,o,n,i.name)),i.attr(n,o.length>0?o:null))}),C.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t=e.length,n;t--;)n=e[t].firstChild,n&&(n.value=r.decode(n.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// ")):o.length>0&&(i.firstChild.value="")}),C.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&C.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,"ul"!==r.name&&"ol"!==r.name||n.prev&&"li"===n.prev.name&&n.prev.append(n)}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r=this,o,a,l,h,p,m;return s.ie&&y.select("script,style,select,map").length>0?(p=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,p)):t=t.cloneNode(!0),o=document.implementation,o.createHTMLDocument&&(a=o.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){a.body.appendChild(a.importNode(e,!0))}),t="BODY"!=t.nodeName?a.body.firstChild:a.body,l=y.doc,y.doc=a),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,r.onPreProcess(n)),m=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(m),h=new i(e,b),n.content=h.serialize(m),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||r.onPostProcess(n),l&&(y.doc=l),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:m,getTrimmedContent:g}}}),r(H,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=f&&t!=f.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(I,[d],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(F,[I,m,u,d,_],function(e,t,n,r,i){function o(e,t){for(;t&&t!=e;){if(s(t)||a(t))return t;t=t.parentNode}return null}var a=i.isContentEditableFalse,s=i.isContentEditableTrue;return function(i,s){function l(e){var t=s.settings.object_resizing;return t===!1||r.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:e==s.getBody()?!1:s.dom.is(e,t))}function c(t){var n,r,i,o,a;n=t.screenX-L,r=t.screenY-M,U=n*B[2]+H,W=r*B[3]+I,U=5>U?5:U,W=5>W?5:W,i="IMG"==k.nodeName&&s.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==k.nodeName&&B[2]*B[3]!==0,i&&(j(n)>j(r)?(W=Y(U*F),U=Y(W/F)):(U=Y(W/F),W=Y(U*F))),_.setStyles(T,{width:U,height:W}),o=B.startPos.x+n,a=B.startPos.y+r,o=o>0?o:0,a=a>0?a:0,_.setStyles(R,{left:o,top:a,display:"block"}),R.innerHTML=U+" × "+W,B[2]<0&&T.clientWidth<=U&&_.setStyle(T,"left",P+(H-U)),B[3]<0&&T.clientHeight<=W&&_.setStyle(T,"top",O+(I-W)),n=X.scrollWidth-K,r=X.scrollHeight-G,n+r!==0&&_.setStyles(R,{left:o-n,top:a-r}),z||(s.fire("ObjectResizeStart",{target:k,width:H,height:I}),z=!0)}function u(){function e(e,t){t&&(k.style[e]||!s.schema.isValid(k.nodeName.toLowerCase(),e)?_.setStyle(k,e,t):_.setAttrib(k,e,t))}z=!1,e("width",U),e("height",W),_.unbind(V,"mousemove",c),_.unbind(V,"mouseup",u),$!=V&&(_.unbind($,"mousemove",c),_.unbind($,"mouseup",u)),_.remove(T),_.remove(R),q&&"TABLE"!=k.nodeName||d(k),s.fire("ObjectResized",{target:k,width:U,height:W}),_.setAttrib(k,"style",_.getAttrib(k,"style")),s.nodeChanged()}function d(e,t,n){var i,o,a,d,h;f(),x(),i=_.getPos(e,X),P=i.x,O=i.y,h=e.getBoundingClientRect(),o=h.width||h.right-h.left,a=h.height||h.bottom-h.top,k!=e&&(C(),k=e,U=W=0),d=s.fire("ObjectSelected",{target:e}),l(e)&&!d.isDefaultPrevented()?S(A,function(e,i){function s(t){L=t.screenX,M=t.screenY,H=k.clientWidth,I=k.clientHeight,F=I/H,B=e,e.startPos={x:o*e[0]+P,y:a*e[1]+O},K=X.scrollWidth,G=X.scrollHeight,T=k.cloneNode(!0),_.addClass(T,"mce-clonedresizable"),_.setAttrib(T,"data-mce-bogus","all"),T.contentEditable=!1,T.unSelectabe=!0,_.setStyles(T,{left:P,top:O,margin:0}),T.removeAttribute("data-mce-selected"),X.appendChild(T),_.bind(V,"mousemove",c),_.bind(V,"mouseup",u),$!=V&&(_.bind($,"mousemove",c),_.bind($,"mouseup",u)),R=_.add(X,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},H+" × "+I)}var l;return t?void(i==t&&s(n)):(l=_.get("mceResizeHandle"+i),l&&_.remove(l),l=_.add(X,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(l.contentEditable=!1),_.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),s(e)}),e.elm=l,void _.setStyles(l,{left:o*e[0]+P-l.offsetWidth/2,top:a*e[1]+O-l.offsetHeight/2}))}):f(),k.setAttribute("data-mce-selected","1")}function f(){var e,t;x(),k&&k.removeAttribute("data-mce-selected");for(e in A)t=_.get("mceResizeHandle"+e),t&&(_.unbind(t),_.remove(t))}function h(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,r;if(!z&&!s.removed)return S(_.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=_.$(r).closest(q?"table":"table,img,hr")[0],t(r,X)&&(w(),n=i.getStart(!0),t(n,r)&&t(i.getEnd(!0),r)&&(!q||r!=n&&"IMG"!==n.nodeName))?void d(r):void f()}function p(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function m(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function g(e){var t=e.srcElement,n,r,i,o,a,l,c;n=t.getBoundingClientRect(),l=D.clientX-n.left,c=D.clientY-n.top;for(r in A)if(i=A[r],o=t.offsetWidth*i[0],a=t.offsetHeight*i[1],j(o-l)<8&&j(a-c)<8){B=i;break}z=!0,s.fire("ObjectResizeStart",{target:k,width:k.clientWidth,height:k.clientHeight}),s.getDoc().selection.empty(),d(t,r,D)}function v(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function y(e){return a(o(s.getBody(),e))}function b(e){var t=e.srcElement;if(y(t))return void v(e);if(t!=k){if(s.fire("ObjectSelected",{target:t}),C(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(f(),k=t,p(t,"resizestart",g))}}function C(){m(k,"resizestart",g)}function x(){for(var e in A){var t=A[e];t.elm&&(_.unbind(t.elm),delete t.elm)}}function w(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function N(e){var t;if(q){t=V.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function E(){k=T=null,q&&(C(),m(X,"controlselect",b))}var _=s.dom,S=t.each,k,T,R,A,B,D,L,M,P,O,H,I,F,z,U,W,V=s.getDoc(),$=document,q=r.ie&&r.ie<11,j=Math.abs,Y=Math.round,X=s.getBody(),K,G;A={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var J=".mce-content-body";return s.contentStyles.push(J+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+J+" .mce-resizehandle:hover {background: #000}"+J+" img[data-mce-selected],"+J+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+J+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+J+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),s.on("init",function(){q?(s.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(f(),N(e.target))}),p(X,"controlselect",b),s.on("mousedown",function(e){D=e})):(w(),r.ie>=11&&(s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;z||!/^(TABLE|IMG|HR)$/.test(n)||y(t)||(s.selection.select(t,"TABLE"==n),"mousedown"==e.type&&s.nodeChanged())}),s.dom.bind(X,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(s,function(){s.selection.select(e)})}return y(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var e=n.throttle(function(e){s.composing||h(e)});s.on("nodechange ResizeEditor ResizeWindow drop",e),s.on("keyup compositionend",function(t){k&&"TABLE"==k.nodeName&&e(t)}),s.on("hide blur",f)}),s.on("remove",x),{isResizable:l,showResizeRect:d,hideResizeRect:f,updateResizeRect:h,controlSelect:N,destroy:E}}}),r(z,[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=a.call(arguments);return function(t){for(var n=0;n=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}var a=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n}}),r(U,[_,p,k],function(e,t,n){function r(e){return m(e)?!1:d(e)?!f(e.parentNode):h(e)||u(e)||p(e)||c(e)}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return c(e)?t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t)},!1)!==!0:!1}function a(e){return h(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),h=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),m=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r(W,[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottomt.bottom?!1:r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom?!0:e.bottomt.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r(V,[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");return{isExtendingChar:e}}),r($,[z,_,w,T,U,W,V],function(e,t,n,r,i,o,a){function s(e){return"createRange"in e?e.createRange():n.DOM.createRng()}function l(e){return e&&/[\r\n\t ]/.test(e)}function c(e){var t=e.startContainer,n=e.startOffset,r;return!!(l(e.toString())&&v(t.parentNode)&&(r=t.data,l(r[n-1])||l(r[n+1])))}function u(e){function t(e){var t=e.ownerDocument,n=s(t),r=t.createTextNode("\xa0"),i=e.parentNode,a;return i.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1),a=o.clone(n.getBoundingClientRect()),i.removeChild(r),a}function n(e){var n,r;return r=e.getClientRects(),n=r.length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),b(e)&&0===n.left?t(e):n}function r(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(u.length>0&&o.isEqual(e,u[u.length-1])||u.push(e))}function l(e,t){var o=s(e.ownerDocument);if(t0&&(o.setStart(e,t-1),o.setEnd(e,t),c(o)||i(r(n(o),!1))),t=t.data.length:n>=t.childNodes.length}function a(){var e;return e=s(t.ownerDocument),e.setStart(t,n),e.setEnd(t,n),e}function l(){return r||(r=u(new d(t,n))),r}function c(){return l().length>0}function f(e){return e&&t===e.container()&&n===e.offset()}function h(e){return x(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:l,isVisible:c,isAtStart:i,isAtEnd:o,isEqual:f,getNode:h}}var f=t.isElement,h=i.isCaretCandidate,p=t.matchStyleValues("display","block table"),m=t.matchStyleValues("float","left right"),g=e.and(f,h,e.negate(m)),v=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),y=t.isText,b=t.isBr,C=n.nodeIndex,x=r.getNode;return d.fromRangeStart=function(e){return new d(e.startContainer,e.startOffset)},d.fromRangeEnd=function(e){return new d(e.endContainer,e.endOffset)},d.after=function(e){return new d(e.parentNode,C(e)+1)},d.before=function(e){return new d(e.parentNode,C(e))},d}),r(q,[_,w,z,p,$],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),i=r.findIndex(n,l(t),t),i-s}function u(e){var t;return t=g(e)?"text()":e.nodeName.toLowerCase(),t+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l=[],c,f,h;return o=i.container(),a=i.offset(),g(o)?c=s(o,a):(f=o.childNodes,a>=f.length?(c="after",a=f.length-1):c="before",o=f[a]),l.push(u(o)),h=d(t,o),h=r.filter(h,n.negate(e.isBogus)),l=l.concat(r.map(h,function(e){return u(e)})),l.reverse().join("/")+","+c}function h(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=r.filter(o,e.matchNodeNames(n)),o[i]}function p(e,t){for(var n=e,r=0,o;g(n);){if(o=n.data.length,t>=r&&r+o>=t){e=n,t-=r;break}if(!g(n.nextSibling)){e=n,t=o;break}r+=o,n=n.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function m(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),h(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:m}}),r(j,[d,m,k,q,$,_],function(e,t,n,r,i,o){function a(a){var l=a.dom;this.getBookmark=function(e,c){function u(e,n){var r=0;return t.each(l.select(e),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e==n?!1:void r++:void 0}),r}function d(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function f(e){function t(e,t){var r=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],o=[],a,s,u=0;if(3==r.nodeType){if(c)for(a=r.previousSibling;a&&3==a.nodeType;a=a.previousSibling)i+=a.nodeValue.length;o.push(i)}else s=r.childNodes,i>=s.length&&s.length&&(u=1,i=Math.max(0,s.length-1)),o.push(l.nodeIndex(s[i],c)+u);for(;r&&r!=n;r=r.parentNode)o.push(l.nodeIndex(r,c));return o}var n=l.getRoot(),r={};return r.start=t(e,!0),a.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e){var t;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),t=e.previousSibling,s(t))return t;if(t=e.nextSibling,s(t))return t}}return t(e.startContainer)||t(e.endContainer)}var p,m,g,v,y,b,C="",x;if(2==e)return b=a.getNode(),y=b?b.nodeName:null,p=a.getRng(),s(b)||"IMG"==y?{name:y,index:u(y,b)}:a.tridentSel?a.tridentSel.getBookmark(e):(b=h(p),b?(y=b.tagName,{name:y,index:u(y,b)}):f(p));if(3==e)return p=a.getRng(),{start:r.create(l.getRoot(),i.fromRangeStart(p)),end:r.create(l.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:a.getRng()};if(p=a.getRng(),g=l.uniqueId(),v=a.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return b=p.item(0),y=b.nodeName,{name:y,index:u(y,b)};m=p.duplicate();try{p.collapse(),p.pasteHTML(''+C+""),v||(m.collapse(!1),p.moveToElementText(m.parentElement()),0===p.compareEndPoints("StartToEnd",m)&&m.move("character",-1),m.pasteHTML(''+C+""))}catch(w){return null}}else{if(b=a.getNode(),y=b.nodeName,"IMG"==y)return{name:y,index:u(y,b)};m=d(p.cloneRange()),v||(m.collapse(!1),m.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_end",style:x},C))),p=d(p),p.collapse(!0),p.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_start",style:x},C))}return a.moveToBookmark({id:g,keep:1}),{id:g}},this.moveToBookmark=function(n){function i(e){var t=n[e?"start":"end"],r,i,o,a;if(t){for(o=t[0],i=d,r=t.length-1;r>=1;r--){if(a=i.childNodes,t[r]>a.length-1)return;i=a[t[r]]}3===i.nodeType&&(o=Math.min(t[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(t[0],i.childNodes.length)),e?u.setStart(i,o):u.setEnd(i,o)}return!0}function o(r){var i=l.get(n.id+"_"+r),o,a,s,c,u=n.keep;if(i&&(o=i.parentNode,"start"==r?(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),f=h=o,p=m=a):(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),h=o,m=a),!u)){for(c=i.previousSibling,s=i.nextSibling,t.each(t.grep(i.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});i=l.get(n.id+"_"+r);)l.remove(i,1);c&&s&&c.nodeType==s.nodeType&&3==c.nodeType&&!e.opera&&(a=c.nodeValue.length,c.appendData(s.nodeValue),l.remove(s),"start"==r?(f=h=c,p=m=a):(h=c,m=a))}}function s(t){return!l.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='
'),t}function c(){var e,t;return e=l.createRng(),t=r.resolve(l.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(l.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,h,p,m;if(n)if(t.isArray(n.start)){if(u=l.createRng(),d=l.getRoot(),a.tridentSel)return a.tridentSel.moveToBookmark(n);i(!0)&&i()&&a.setRng(u)}else"string"==typeof n.start?a.setRng(c(n)):n.id?(o("start"),o("end"),f&&(u=l.createRng(),u.setStart(s(f),p),u.setEnd(s(h),m),a.setRng(u))):n.name?a.select(l.select(n.name)[n.index]):n.rng&&a.setRng(n.rng)}}var s=o.isContentEditableFalse;return a.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},a}),r(Y,[y,H,F,T,j,_,d,m,$],function(e,n,r,i,o,a,s,l,c){function u(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var d=l.each,f=l.trim,h=s.ie;return u.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a,s,l;if(!n.win)return null;if(a=n.win.document,!e&&n.lastFocusBookmark){var c=n.lastFocusBookmark;return c.startContainer?(i=a.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(u){}if(l=n.editor.fire("GetSelectionRange",{range:i}),l.range!==i)return l.range;if(h&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(u){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i,o;if(e)if(e.select){n.explicitRange=null;try{e.select()}catch(a){}}else if(n.tridentSel){if(e.cloneRange)try{n.tridentSel.addRange(e)}catch(a){}}else{if(r=n.getSel(),o=n.editor.fire("SetSelectionRange",{range:e}),e=o.range,r){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(a){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!r.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i,o,a,s,l=t.dom.getRoot();return n?(i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r)):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};d(n.selectorChangedData,function(e,t){d(o,function(n){return i.is(n,t)?(r[t]||(d(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),d(r,function(e,n){a[n]||(delete r[n],d(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o=this,s=o.dom,l=s.getRoot(),c,u,d=0;if(a.isElement(e)){if(t===!1&&(d=e.offsetHeight),"BODY"!=l.nodeName){var f=o.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,u=f.clientHeight,c=f.scrollTop,void((c>r||r+25>c+u)&&(f.scrollTop=c>r?r:r-u+25))}i=s.getViewPort(o.editor.getWin()),r=s.getPos(e).y+d,c=i.y,u=i.h,(rc+u)&&o.editor.getWin().scrollTo(0,c>r?r:r-u+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==f(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?c.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},u}),r(X,[j,m],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&0!==i.indexOf("data-")&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(K,[m],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(G,[p,_,g],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o=[],a=e.filter,s=e.each;return r("pre",function(r){function i(t){return c(t.previousSibling)&&-1!=e.indexOf(u,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("
").append(t.childNodes)}var l=r.selection.getRng(),c,u;c=t.matchNodeNames("pre"),l.collapsed||(u=r.selection.getSelectedBlocks(),s(a(a(u,c),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r(J,[y,T,j,X,m,K,G],function(e,t,n,r,i,o,a){return function(s){function l(e){return e.nodeType&&(e=e.nodeName),!!s.schema.getTextBlockElements()[e.toLowerCase()]}function c(e){return/^(TH|TD)$/.test(e.nodeName)}function u(e){return e&&/^(IMG)$/.test(e.nodeName)}function d(e,t){return Y.getParents(e,t,Y.getRoot())}function f(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){g({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){ue(n,function(t,n){Y.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){g(e,{block:e,remove:"all"})}),g(s.settings.formats)}function p(){s.addShortcut("meta+b","bold_desc","Bold"),s.addShortcut("meta+i","italic_desc","Italic"),s.addShortcut("meta+u","underline_desc","Underline");for(var e=1;6>=e;e++)s.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])}function m(e){return e?j[e]:j}function g(e,t){e&&("string"!=typeof e?ue(e,function(e,t){g(t,e)}):(t=t.length?t:[t],ue(t,function(e){e.deep===oe&&(e.deep=!e.selector),e.split===oe&&(e.split=!e.selector||e.inline),e.remove===oe&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),j[e]=t))}function v(e){return e&&j[e]&&delete j[e],j}function y(e,t){var n=m(t);if(n)for(var r=0;r0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=s.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),l=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,l)}return n}function c(e,r,o){var a=[],s,c,h=!0;s=d.inline||d.block,c=Y.create(s),i(c),K.walk(e,function(e){function r(e){var m,v,y,b,C;return C=h,m=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ae(e)&&(C=h,h="true"===ae(e),b=!0),B(m,"br")?(p=0,void(d.block&&Y.remove(e))):d.wrapper&&E(e,t,n)?void(p=0):h&&!b&&d.block&&!d.wrapper&&l(m)&&G(v,s)?(e=Y.rename(e,s),i(e),a.push(e),void(p=0)):d.selector&&(ue(u,function(t){return"collapsed"in t&&t.collapsed!==g?void 0:Y.is(e,t.selector)&&!f(e)?(i(e,t),y=!0,!1):void 0}),!d.inline||y)?void(p=0):void(!h||b||!G(s,m)||!G(v,s)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||f(e)||d.inline&&J(e)?(p=0,ue(de(e.childNodes),r),b&&(h=C),p=0):(p||(p=Y.clone(c,ne),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;ue(e,r)}),d.links===!0&&ue(a,function(e){function t(e){"A"===e.nodeName&&i(e,d),ue(de(e.childNodes),t)}t(e)}),ue(a,function(e){function r(e){var t=0;return ue(e.childNodes,function(e){P(e)||ce(e)||t++}),t}function o(e){var t,n;return ue(e.childNodes,function(e){return 1!=e.nodeType||ce(e)||f(e)?void 0:(t=e,ne)}),t&&!ce(t)&&A(t,d)&&(n=Y.clone(t,ne),i(n),Y.replace(n,e,re),Y.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!J(e))&&0===s)return void Y.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),ue(u,function(t){ue(Y.select(t.inline,e),function(e){ce(e)||F(t,n,e,t.exact?e:null)})}),E(e.parentNode,t,n))return Y.remove(e,1),e=0,re;d.merge_with_parents&&Y.getParent(e.parentNode,function(r){return E(r,t,n)?(Y.remove(e,1),e=0,re):void 0}),e&&d.merge_siblings!==!1&&(e=W(U(e),e),e=W(e,U(e,re)))}})}var u=m(t),d=u[0],h,p,g=!r&&X.isCollapsed();if("false"!==ae(X.getNode())){if(d){if(r)r.nodeType?(p=Y.createRng(),p.setStartBefore(r),p.setEndAfter(r),c(H(p,u),null,!0)):c(r,null,!0);else if(g&&d.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length)$("apply",t,n);else{var v=s.selection.getNode();Q||!u[0].defaultBlock||Y.getParent(v,Y.isBlock)||x(u[0].defaultBlock),s.selection.setRng(o()),h=X.getBookmark(),c(H(X.getRng(re),u),h),d.styles&&(d.styles.color||d.styles.textDecoration)&&(fe(v,C,"childNodes"),C(v)),X.moveToBookmark(h),q(X.getRng(re)),s.nodeChanged()}a.postProcess(t,s)}}else{r=X.getNode();for(var y=0,b=u.length;b>y;y++)if(u[y].ceFalseOverride&&Y.is(r,u[y].selector))return void i(r,u[y])}}function w(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ae(e)&&(a=y,y="true"===ae(e),s=!0),n=de(e.childNodes),y&&!s)for(r=0,o=h.length;o>r&&!F(h[r],t,e,e);r++);if(p.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return ue(d(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=E(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,
-o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=Y.clone(o,ne),c=0;cC&&(!h[C].ceFalseOverride||!F(h[C],t,n,n));C++);}}function N(e,t,n){var r=m(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?x(e,t,n):w(e,t,n)}function E(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===oe){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?Y.getAttrib(e,o):D(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!B(a,L(M(s[o],n),o)))return}}else for(l=0;l=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return re;for(i=r.length-1;i>=0;i--)if(Y.is(r[i],a))return re}return ne}function T(e,t,n){var r;return ie||(ie={},r={},s.on("NodeChange",function(e){var t=d(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),ue(ie,function(e,i){ue(t,function(o){return E(o,i,{},e.similar)?(r[i]||(ue(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):y(o,i)?!1:void 0})}),ue(r,function(i,o){n[o]||(delete r[o],ue(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),ue(e.split(","),function(e){ie[e]||(ie[e]=[],ie[e].similar=n),ie[e].push(t)}),this}function R(e){return o.getCssText(s,e)}function A(e,t){return B(e,t.inline)?re:B(e,t.block)?re:t.selector?1==e.nodeType&&Y.is(e,t.selector):void 0}function B(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function D(e,t){return L(Y.getStyle(e,t),t)}function L(e,t){return"color"!=t&&"backgroundColor"!=t||(e=Y.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function M(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function P(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function O(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function H(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=Y.getRoot(),3==r.nodeType&&!P(r)&&(e?v>0:bo?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var a,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(a=new e(t,Y.getParent(t,J)||s.getBody());l=a[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(J(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=d(e),o=0;oh?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(ce(g.parentNode)||ce(g))&&(g=ce(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(ce(y.parentNode)||ce(y))&&(y=ce(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ne&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(J(g)||(g=i(!0)),J(y)||(y=i()))),1==g.nodeType&&(v=Z(g),g=g.parentNode),1==y.nodeType&&(b=Z(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function I(e,t){return t.links&&"A"==e.tagName}function F(e,t,n,r){var i,o,a;if(!A(n,e)&&!I(n,e))return ne;if("all"!=e.remove)for(ue(e.styles,function(i,o){i=L(M(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||B(D(r,o),i))&&Y.setStyle(n,o,""),a=1}),a&&""===Y.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),ue(e.attributes,function(e,i){var o;if(e=M(e,t),"number"==typeof i&&(i=e,r=0),!r||B(Y.getAttrib(r,i),e)){if("class"==i&&(e=Y.getAttrib(n,i),e&&(o="",ue(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void Y.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),te.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),ue(e.classes,function(e){e=M(e,t),r&&!Y.hasClass(r,e)||Y.removeClass(n,e)}),o=Y.getAttribs(n),i=0;io?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,s.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,s.getBody()).prev()||r),r}function $(t,n,r,i){function o(e){var t=Y.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(s.getDoc().createTextNode(ee)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ee||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=X.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),Y.remove(e)):(n=u(e),n.nodeValue.charAt(0)===ee&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),Y.remove(e,1)),X.setRng(r);else if(e=c(X.getStart()),!e)for(;e=Y.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=X.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(X.getStart()),t&&(i=u(t)),d&&a>0&&a=0;h--)u.appendChild(Y.clone(f[h],!1)),u=u.firstChild;u.appendChild(Y.doc.createTextNode(ee)),u=u.firstChild;var g=Y.getParent(d,l);g&&Y.isEmpty(g)?d.parentNode.replaceChild(p,d):Y.insertAfter(p,d),X.setCursorLocation(u,1),Y.isEmpty(d)&&Y.remove(d)}}function p(){var e;e=c(X.getStart()),e&&!Y.isEmpty(e)&&fe(e,function(e){1!=e.nodeType||e.id===g||Y.isEmpty(e)||Y.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=s.settings.caret_debug;s._hasCaretEvents||(le=function(){var e=[],t;if(a(c(X.getStart()),e))for(t=e.length;t--;)Y.setAttrib(e[t],"data-mce-bogus","1")},se=function(e){var t=e.keyCode;d(),8==t&&X.isCollapsed()&&X.getStart().innerHTML==ee&&d(c(X.getStart())),37!=t&&39!=t||d(c(X.getStart())),p()},s.on("SetContent",function(e){e.selection&&p()}),s._hasCaretEvents=!0),"apply"==t?f():h()}function q(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!u(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=Z(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,Y.getParent(n,Y.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!P(a))return l=Y.create("a",{"data-mce-bogus":"all"},ee),a.parentNode.insertBefore(l,a),t.setStart(a,0),X.setRng(t),void Y.remove(l)}var j={},Y=s.dom,X=s.selection,K=new t(Y),G=s.schema.isValidChild,J=Y.isBlock,Q=s.settings.forced_root_block,Z=Y.nodeIndex,ee="\ufeff",te=/^(src|href|style)$/,ne=!1,re=!0,ie,oe,ae=Y.getContentEditable,se,le,ce=n.isBookmarkNode,ue=i.each,de=i.grep,fe=i.walk,he=i.extend;he(this,{get:m,register:g,unregister:v,apply:x,remove:w,toggle:N,match:_,matchAll:S,matchNode:E,canApply:k,formatChanged:T,getCssText:R}),h(),p(),s.on("BeforeGetContent",function(e){le&&"raw"!=e.format&&le()}),s.on("mouseup keydown",function(e){se&&se(e)})}}),r(Q,[I,d],function(e,t){return function(e){function n(){return e.serializer.getTrimmedContent()}function r(t){e.setDirty(t)}function i(e){o.typing=!1,o.add({},e)}var o=this,a=0,s=[],l,c,u=0;return e.on("init",function(){o.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&i(e)}),e.on("ObjectResizeStart Cut",function(){o.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(a){var l=a.keyCode;a.isDefaultPrevented()||((l>=33&&36>=l||l>=37&&40>=l||45==l||13==l||a.ctrlKey)&&(i(),e.nodeChanged()),(46==l||8==l||t.mac&&(91==l||93==l))&&e.nodeChanged(),c&&o.typing&&(e.isDirty()||(r(s[0]&&n()!=s[0].content),e.isDirty()&&e.fire("change",{level:s[0],lastLevel:null})),e.fire("TypingUndo"),c=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(o.typing&&i(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),c=!0)}}),e.on("MouseDown",function(e){o.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),o={data:s,typing:!1,beforeChange:function(){u||(l=e.selection.getBookmark(2,!0))},add:function(t,i){var o,c=e.settings,d;if(t=t||{},t.content=n(),u||e.removed)return null;if(d=s[a],e.fire("BeforeAddUndo",{level:t,lastLevel:d,originalEvent:i}).isDefaultPrevented())return null;if(d&&d.content==t.content)return null;if(s[a]&&(s[a].beforeBookmark=l),c.custom_undo_redo_levels&&s.length>c.custom_undo_redo_levels){for(o=0;o0&&(r(!0),e.fire("change",f)),t},undo:function(){var t;return o.typing&&(o.add(),o.typing=!1),a>0&&(t=s[--a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return a0||o.typing&&s[0]&&n()!=s[0].content},hasRedo:function(){return aP)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function y(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'
'}function C(e){var t=D,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==z?(n=a.create(e||W),y(n)):n=M.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while((t=t.parentNode)&&t!=B);return r||(o.innerHTML='
'),n}function x(t){var n,r,i;if(3==D.nodeType&&(t?L>0:LD.childNodes.length-1,D=D.childNodes[Math.min(L,D.childNodes.length-1)]||D,L=V&&3==D.nodeType?D.nodeValue.length:0),B=S(D)){if(c.beforeChange(),!a.isBlock(B)&&B!=a.getRoot())return void(W&&!O||E());if((W&&!O||!W&&O)&&(D=w(D,L)),M=a.getParent(D,a.isBlock),F=M?a.getParent(M.parentNode,a.isBlock):null,z=M?M.nodeName.toUpperCase():"",U=F?F.nodeName.toUpperCase():"","LI"!=U||o.ctrlKey||(M=F,z=U),/^(LI|DT|DD)$/.test(z)){if(!W&&O)return void E();if(a.isEmpty(M))return void N()}if("PRE"==z&&l.br_in_pre!==!1){if(!O)return void E()}else if(!W&&!O&&"LI"!=z||W&&O)return void E();W&&M===i.getBody()||(W=W||"P",x()?T():x(!0)?(H=M.parentNode.insertBefore(C(),M),m(H),v(M)):(A=R.cloneRange(),A.setEndAfter(M),I=A.extractContents(),_(I),H=I.firstChild,a.insertAfter(I,M),g(H),k(M),a.isEmpty(M)&&b(M),H.normalize(),a.isEmpty(H)?(a.remove(H),T()):v(H)),a.setAttrib(H,"id",""),i.fire("NewBlock",{newBlock:H}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(ee,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(te,[z,y,_,$,k,U],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return 0>e}function l(e,n,r,i,o){var l=new t(e,i);if(s(n)){if(C(e)&&(e=l.prev(!0),r(e)))return e;for(;e=l.prev(o);)if(r(e))return e}if(a(n)){if(C(e)&&(e=l.next(!0),r(e)))return e;for(;e=l.next(o);)if(r(e))return e}return null}function c(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(b(e))return e;return t}function u(e,t){for(;e&&e!=t;){if(x(e))return e;e=e.parentNode}return null}function d(e,t,n){return u(e.container(),n)==u(t.container(),n)}function f(e,t,n){return c(e.container(),n)==c(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),E(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function m(e,t,n){return u(t,e)==u(n,e)}function g(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],w(r)&&(r=r[i]),C(r)){if(m(t,r,n))return r;break}if(_(r))break;n=n.parentNode}return null}function v(e,t,r){var o,a,s,l,c=N(g,!0,t),u=N(g,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(E(a)||(a=a.parentNode),l=a.getAttribute("data-mce-caret"),"before"==l&&(o=a.nextSibling,C(o)))return S(o);if("after"==l&&(o=a.previousSibling,C(o)))return k(o)}if(!r.collapsed)return r;if(n.isText(a)){if(w(a)){if(1===e){if(o=u(a))return S(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return S(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?S(o):r;if(i.startsWithCaretContainer(a)&&1>=s)return-1===e&&(o=c(a))?k(o):r;if(s===a.data.length)return o=u(a),o?S(o):r;if(0===s)return o=c(a),o?k(o):r}return r}function y(e,t){return C(h(e,t))}var b=n.isContentEditableTrue,C=n.isContentEditableFalse,x=n.matchStyleValues("display","block table table-cell table-caption"),w=i.isCaretContainer,N=e.curry,E=n.isElement,_=o.isCaretCandidate,S=N(p,!0),k=N(p,!1);return{isForwards:a,isBackwards:s,findNode:l,getEditingHost:c,getParentBlock:u,isInSameBlock:d,isInSameEditingHost:f,isBeforeContentEditableFalse:N(y,0),isAfterContentEditableFalse:N(y,-1),normalizeRange:v}}),r(ne,[_,U,$,te,p,z],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t0)return n(C,--x);if(m(e)&&x0&&(N=s(C,x-1),v(N)))return!y(N)&&(E=r.findNode(N,e,b,N))?f(E)?n(E,E.data.length):n.after(E):f(N)?n(N,N.data.length):n.before(N);if(m(e)&&x0&&s(e[e.length-1])?e.slice(0,-1):e},c=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},u=function(e,t){return!!c(e,t)},d=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]},f=function(e,r){var i=n.before(e),o=new t(r),a=o.next(i);return a?a.toRange():null},h=function(e,r){var i=n.after(e),o=new t(r),a=o.prev(i);return a?a.toRange():null},p=function(t,n,r,i){var o=d(t,i),a=t.parentNode;return a.insertBefore(o[0],t),e.each(n,function(e){a.insertBefore(e,t)}),a.insertBefore(o[1],t),a.removeChild(t),h(n[n.length-1],r)},m=function(t,n,r){var i=t.parentNode;return e.each(n,function(e){i.insertBefore(e,t)}),f(t,r)},g=function(e,t,n,r){return r.insertAfter(t.reverse(),e),h(t[0],n)},v=function(e,r,i,s){var u=o(r,e,s),d=c(r,i.startContainer),f=l(a(u.firstChild)),h=1,v=2,y=r.getRoot(),b=function(e){var o=n.fromRangeStart(i),a=new t(r.getRoot()),s=e===h?a.prev(o):a.next(o);return s?c(r,s.getNode())!==d:!0};return b(h)?m(d,f,y):b(v)?g(d,f,y,r):p(d,f,y,i)};return{isListFragment:r,insertAtCaret:v,isParentBlockLi:u,trimListItems:l,listItems:a}}),r(ie,[d,m,P,ne,$,X,_,re],function(e,t,n,r,i,o,a,s){var l=a.matchNodeNames("td th"),c=function(a,c,u){function d(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=D.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
|)$/," "))),e}function f(){var e,t,n;e=D.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(c)||(c+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(c)||(c=" "+c)))}function h(){if(A){var e=a.getBody(),n=new o(L);t.each(L.select("*[data-mce-fragment]"),function(t){for(var r=t.parentNode;r&&r!=e;r=r.parentNode)B[t.nodeName.toLowerCase()]&&n.compare(r,t)&&L.remove(t,!0)})}}function p(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}function m(e){t.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}function g(e){return!!e.getAttribute("data-mce-fragment")}function v(e){return e&&!a.schema.getShortEndedElements()[e.nodeName]}function y(t){function n(e){for(var t=a.getBody();e&&e!==t;e=e.parentNode)if("false"===a.dom.getContentEditable(e))return e;return null}function o(e){var t=i.fromRangeStart(e),n=new r(a.getBody());return t=n.next(t),t?t.toRange():void 0}var s,c,u;if(t){if(D.scrollIntoView(t),s=n(t))return L.remove(t),void D.select(s);S=L.createRng(),k=t.previousSibling,k&&3==k.nodeType?(S.setStart(k,k.nodeValue.length),e.ie||(T=t.nextSibling,T&&3==T.nodeType&&(k.appendData(T.data),T.parentNode.removeChild(T)))):(S.setStartBefore(t),S.setEndBefore(t)),c=L.getParent(t,L.isBlock),L.remove(t),c&&L.isEmpty(c)&&(a.$(c).empty(),S.setStart(c,0),S.setEnd(c,0),l(c)||g(c)||!(u=o(S))?L.add(c,L.create("br",{"data-mce-bogus":"1"})):(S=u,L.remove(c))),D.setRng(S)}}var b,C,x,w,N,E,_,S,k,T,R,A,B=a.schema.getTextInlineElements(),D=a.selection,L=a.dom;/^ | $/.test(c)&&(c=d(c)),b=a.parser,A=u.merge,C=new n({validate:a.settings.validate},a.schema),R='',E={content:c,format:"html",selection:!0},a.fire("BeforeSetContent",E),c=E.content,-1==c.indexOf("{$caret}")&&(c+="{$caret}"),c=c.replace(/\{\$caret\}/,R),S=D.getRng();var M=S.startContainer||(S.parentElement?S.parentElement():null),P=a.getBody();M===P&&D.isCollapsed()&&L.isBlock(P.firstChild)&&v(P.firstChild)&&L.isEmpty(P.firstChild)&&(S=L.createRng(),S.setStart(P.firstChild,0),S.setEnd(P.firstChild,0),D.setRng(S)),D.isCollapsed()||(a.selection.setRng(a.selection.getRng()),a.getDoc().execCommand("Delete",!1,null),
-f()),x=D.getNode();var O={context:x.nodeName.toLowerCase(),data:u.data};if(N=b.parse(c,O),u.paste===!0&&s.isListFragment(N)&&s.isParentBlockLi(L,x))return S=s.insertAtCaret(C,L,a.selection.getRng(!0),N),a.selection.setRng(S),void a.fire("SetContent",E);if(p(N),k=N.lastChild,"mce_marker"==k.attr("id"))for(_=k,k=k.prev;k;k=k.walk(!0))if(3==k.type||!L.isBlock(k.name)){a.schema.isValidChild(k.parent.name,"span")&&k.parent.insert(_,k,"br"===k.name);break}if(a._selectionOverrides.showBlockCaretContainer(x),O.invalid){for(D.setContent(R),x=D.getNode(),w=a.getBody(),9==x.nodeType?x=k=w:k=x;k!==w;)x=k,k=k.parentNode;c=x==w?w.innerHTML:L.getOuterHTML(x),c=C.serialize(b.parse(c.replace(//i,function(){return C.serialize(N)}))),x==w?L.setHTML(w,c):L.setOuterHTML(x,c)}else c=C.serialize(N),k=x.firstChild,T=x.lastChild,!k||k===T&&"BR"===k.nodeName?L.setHTML(x,c):D.setContent(c);h(),y(L.get("mce_marker")),m(a.getBody()),a.fire("SetContent",E),a.addVisual()},u=function(e){var n;return"string"!=typeof e?(n=t.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:n}):{content:e,details:{}}},d=function(e,t){var n=u(t);c(e,n.content,n.details)};return{insertAtCaret:d}}),r(oe,[d,m,T,y,ie],function(e,n,r,i,o){var a=n.each,s=n.extend,l=n.map,c=n.inArray,u=n.explode,d=e.ie&&e.ie<11,f=!0,h=!1;return function(n){function p(e,t,r,i){var o,s,l=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||n.focus(),i=n.fire("BeforeExecCommand",{command:e,ui:t,value:r}),i.isDefaultPrevented())return!1;if(s=e.toLowerCase(),o=B.exec[s])return o(s,t,r),n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;if(a(n.plugins,function(i){return i.execCommand&&i.execCommand(e,t,r)?(n.fire("ExecCommand",{command:e,ui:t,value:r}),l=!0,!1):void 0}),l)return l;if(n.theme&&n.theme.execCommand&&n.theme.execCommand(e,t,r))return n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;try{l=n.getDoc().execCommand(e,t,r)}catch(c){}return l?(n.fire("ExecCommand",{command:e,ui:t,value:r}),!0):!1}function m(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=B.state[e])return t(e);try{return n.getDoc().queryCommandState(e)}catch(r){}return!1}}function g(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=B.value[e])return t(e);try{return n.getDoc().queryCommandValue(e)}catch(r){}}}function v(e,t){t=t||"exec",a(e,function(e,n){a(n.toLowerCase().split(","),function(n){B[t][n]=e})})}function y(e,t,r){e=e.toLowerCase(),B.exec[e]=function(e,i,o,a){return t.call(r||n,i,o,a)}}function b(e){if(e=e.toLowerCase(),B.exec[e])return!0;try{return n.getDoc().queryCommandSupported(e)}catch(t){}return!1}function C(e,t,r){e=e.toLowerCase(),B.state[e]=function(){return t.call(r||n)}}function x(e,t,r){e=e.toLowerCase(),B.value[e]=function(){return t.call(r||n)}}function w(e){return e=e.toLowerCase(),!!B.exec[e]}function N(e,r,i){return r===t&&(r=h),i===t&&(i=null),n.getDoc().execCommand(e,r,i)}function E(e){return A.match(e)}function _(e,r){A.toggle(e,r?{value:r}:t),n.nodeChanged()}function S(e){L=R.getBookmark(e)}function k(){R.moveToBookmark(L)}var T,R,A,B={state:{},exec:{},value:{}},D=n.settings,L;n.on("PreInit",function(){T=n.dom,R=n.selection,D=n.settings,A=n.formatter}),s(this,{execCommand:p,queryCommandState:m,queryCommandValue:g,queryCommandSupported:b,addCommands:v,addCommand:y,addQueryStateHandler:C,addQueryValueHandler:x,hasCustomCommand:w}),v({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(t){var r=n.getDoc(),i;try{N(t)}catch(o){i=f}if("paste"!==t||r.queryCommandEnabled(t)||(i=!0),i||!r.queryCommandSupported(t)){var a=n.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");e.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),n.notificationManager.open({text:a,type:"error"})}},unlink:function(){if(R.isCollapsed()){var e=R.getNode();return void("A"==e.tagName&&n.dom.remove(e,!0))}A.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),a("left,center,right,justify".split(","),function(e){t!=e&&A.remove("align"+e)}),"none"!=t&&_("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;N(e),t=T.getParent(R.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(S(),T.split(n,t),k()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){_(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){_(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=u(D.font_size_style_values),r=u(D.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),_(e,n)},RemoveFormat:function(e){A.remove(e)},mceBlockQuote:function(){_("blockquote")},FormatBlock:function(e,t,n){return _(n||"p")},mceCleanup:function(){var e=R.getBookmark();n.setContent(n.getContent({cleanup:f}),{cleanup:f}),R.moveToBookmark(e)},mceRemoveNode:function(e,t,r){var i=r||R.getNode();i!=n.getBody()&&(S(),n.dom.remove(i,f),k())},mceSelectNodeDepth:function(e,t,r){var i=0;T.getParent(R.getNode(),function(e){return 1==e.nodeType&&i++==r?(R.select(e),h):void 0},n.getBody())},mceSelectNode:function(e,t,n){R.select(n)},mceInsertContent:function(e,t,r){o.insertAtCaret(n,r)},mceInsertRawHTML:function(e,t,r){R.setContent("tiny_mce_marker"),n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return r}))},mceToggleFormat:function(e,t,n){_(n)},mceSetContent:function(e,t,r){n.setContent(r)},"Indent,Outdent":function(e){var t,r,i;t=D.indentation,r=/[a-z%]+$/i.exec(t),t=parseInt(t,10),m("InsertUnorderedList")||m("InsertOrderedList")?N(e):(D.forced_root_block||T.getParent(R.getNode(),T.isBlock)||A.apply("div"),a(R.getSelectedBlocks(),function(o){if("false"!==T.getContentEditable(o)&&"LI"!=o.nodeName){var a=n.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==T.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),T.setStyle(o,a,i?i+r:"")):(i=parseInt(o.style[a]||0,10)+t+r,T.setStyle(o,a,i))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",!1,"
")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual,n.addVisual()},mceReplaceContent:function(e,t,r){n.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,R.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=T.getParent(R.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||A.remove("link"),n.href&&A.apply("link",n,r)},selectAll:function(){var e=T.getRoot(),t;R.getRng().setStart?(t=T.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),R.setRng(t)):(t=R.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){N("Delete");var e=n.getBody();T.isEmpty(e)&&(n.setContent(""),e.firstChild&&T.isBlock(e.firstChild)?n.selection.setCursorLocation(e.firstChild,0):n.selection.setCursorLocation(e,0))},mceNewDocument:function(){n.setContent("")},InsertLineBreak:function(e,t,o){function a(){for(var e=new i(m,v),t,r=n.schema.getNonEmptyElements();t=e.next();)if(r[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=o,l,c,u,h=R.getRng(!0);new r(T).normalize(h);var p=h.startOffset,m=h.startContainer;if(1==m.nodeType&&m.hasChildNodes()){var g=p>m.childNodes.length-1;m=m.childNodes[Math.min(p,m.childNodes.length-1)]||m,p=g&&3==m.nodeType?m.nodeValue.length:0}var v=T.getParent(m,T.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?T.getParent(v.parentNode,T.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(v=b,y=C),m&&3==m.nodeType&&p>=m.nodeValue.length&&(d||a()||(l=T.create("br"),h.insertNode(l),h.setStartAfter(l),h.setEndAfter(l),c=!0)),l=T.create("br"),h.insertNode(l);var w=T.doc.documentMode;return d&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(T.doc.createTextNode("\r"),l),u=T.create("span",{}," "),l.parentNode.insertBefore(u,l),R.scrollIntoView(u),T.remove(u),c?(h.setStartBefore(l),h.setEndBefore(l)):(h.setStartAfter(l),h.setEndAfter(l)),R.setRng(h),n.undoManager.add(),f}}),v({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=R.isCollapsed()?[T.getParent(R.getNode(),T.isBlock)]:R.getSelectedBlocks(),r=l(n,function(e){return!!A.matchNode(e,t)});return-1!==c(r,f)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return E(e)},mceBlockQuote:function(){return E("blockquote")},Outdent:function(){var e;if(D.inline_styles){if((e=T.getParent(R.getStart(),T.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return f;if((e=T.getParent(R.getEnd(),T.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return f}return m("InsertUnorderedList")||m("InsertOrderedList")||!D.inline_styles&&!!T.getParent(R.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=T.getParent(R.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),v({"FontSize,FontName":function(e){var t=0,n;return(n=T.getParent(R.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),v({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}),r(ae,[m],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t}),r(se,[m],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(le,[m],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(ce,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(ue,[le],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(de,[ce,ue,se,m],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(fe,[se],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(he,[m,fe,se],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(pe,[d,m,w],function(e,t,n){var r=0,i={id:function(){return"mceu_"+r++},create:function(e,r,i){var o=document.createElement(e);return n.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:t.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return n.DOM.createFragment(e)},getWindowSize:function(){return n.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return n.DOM.getPos(e,t||i.getContainer())},getContainer:function(){return e.container?e.container:document.body},getViewPort:function(e){return n.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return n.DOM.addClass(e,t)},removeClass:function(e,t){return n.DOM.removeClass(e,t)},hasClass:function(e,t){return n.DOM.hasClass(e,t)},toggleClass:function(e,t,r){return n.DOM.toggleClass(e,t,r)},css:function(e,t,r){return n.DOM.setStyle(e,t,r)},getRuntimeStyle:function(e,t){return n.DOM.getStyle(e,t,!0)},on:function(e,t,r,i){return n.DOM.bind(e,t,r,i)},off:function(e,t,r){return n.DOM.unbind(e,t,r)},fire:function(e,t,r){return n.DOM.fire(e,t,r)},innerHtml:function(e,t){n.DOM.setHTML(e,t)}};return i}),r(me,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(ge,[m],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(ve,[u],function(e){var t={},n;return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;t[i._id]||(t[i._id]=i),n||(n=!0,e.requestAnimationFrame(function(){var e,r;n=!1;for(e in t)r=t[e],r.state.get("rendered")&&r.reflow();t={}},document.body))}},remove:function(e){t[e._id]&&delete t[e._id]}}}),r(ye,[se,m,le,de,he,pe,g,me,ge,ve],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n=e.getParentCtrl(t.target),r=c._lastHoverCtrl,i=0,o,a,s;if(n!==r){if(c._lastHoverCtrl=n,a=n.parents().toArray().reverse(),a.push(n),r){for(s=r.parents().toArray().reverse(),s.push(r),i=0;i=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;oo;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;tn.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,r.x===n.x&&r.y===n.y&&r.w===n.w&&r.h===n.h||(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a,s,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return""+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;
-if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return''},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(be,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(Ce,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||C,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||C;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=C;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return o(e)&&!e.hidden?!0:!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t'+(e.settings.html||"")+t.renderHtml(e)+"
"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(we,[g],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n
").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(Ne,[g,we],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append(''),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(Ee,[xe,Ne],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n=''+t.renderHtml(e)+"
":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),''+(e._preBodyHtml||"")+n+"
"}})}),r(_e,[pe],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Se,[pe],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(ke,[Ee,_e,Se,pe,g,u],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=v.length;t--;){var n=v[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",p))}function c(){m||(m=function(){var e;for(e=v.length;e--;)d(v[e])},i(window).on("scroll",m))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;in&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY ').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),b=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=v.length;t--&&v[t]!==e;);return-1===t&&v.push(e),n},hide:function(){return h(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){h(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=v.length;e--;){var t=v[e];t&&t.settings.autohide&&(t.hide(),v.splice(e,1))}},C}),r(Te,[ke,Ee,pe,g,we,me,d,u],function(e,t,n,r,i,o,a,s){function l(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof f&&(f=i),n.setAttribute("content",e?t:f))}function c(e){for(var t=0;tr.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o=''),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'"},fullscreen:function(e){var t=this,i=document.documentElement,a,l=t.classPrefix,c;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=s.setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),c=t.layoutRect(),t._fullscreen=e,e){t._initial={x:c.x,y:c.y,w:c.w,h:c.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",c.deltaH-=c.headerH+2,r([i,document.body]).addClass(l+"fullscreen"),t.classes.add("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",c.deltaH+=c.headerH,r([i,document.body]).removeClass(l+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in"),e.fire("open")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),d.push(e),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=d.length;t--;)d[t]===e&&d.splice(t,1);l(d.length>0),c(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return u(),h}),r(Re,[Te],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Ae,[Te,Re],function(e,t){return function(n){function r(){return s.length?s[s.length-1]:void 0}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),i(a),a},a.alert=function(e,r,a){var s;s=t.alert(e,function(){r?r.call(a||this):n.focus()}),s.on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;a=t.confirm(e,function(e){n.call(r||this,e)}),a.on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r(Be,[ye,_e],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return''+e.encode(e.state.get("text"))+"
"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(De,[ye,Be],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Le,[De],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return''},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r(Me,[ye,_e,Le,u],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n=''),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r=''),e.progressBar&&(i=e.progressBar.renderHtml()),''+n+'
'+e.state.get("text")+"
"+i+r+"
"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Pe,[Me,u],function(e,t){return function(n){function r(){return l.length?l[l.length-1]:void 0}function i(){t.requestAnimationFrame(function(){o(),a()})}function o(){for(var e=0;e0){var e=l.slice(0,1)[0],t=n.inline?n.getElement():n.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),l.length>1)for(var r=1;r0&&(r.timer=setTimeout(function(){r.close()},t.timeout)),r.on("close",function(){var e=l.length;for(r.timer&&n.getWin().clearTimeout(r.timer);e--;)l[e]===r&&l.splice(e,1);a()}),r.renderTo(),a(),r},s.close=function(){r()&&r().close()},s.getNotifications=function(){return l},n.on("SkinLoaded",function(){var e=n.settings.service_message;e&&n.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r(Oe,[w],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r(He,[I,T,y,Oe,A,C,d,m,u,k,$,ne],function(e,t,n,r,i,o,a,s,l,c,u,d){return function(f){function h(e,t){try{f.getDoc().execCommand(e,!1,t)}catch(n){}}function p(){var e=f.getDoc().documentMode;return e?e:6}function m(e){return e.isDefaultPrevented()}function g(e){var t,n;e.dataTransfer&&(f.selection.isCollapsed()&&"IMG"==e.target.tagName&&re.select(e.target),t=f.selection.getContent(),t.length>0&&(n=ue+escape(f.id)+","+escape(t),e.dataTransfer.setData(de,n)))}function v(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(de),t&&t.indexOf(ue)>=0)?(t=t.substr(ue.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function y(e){f.queryCommandSupported("mceInsertClipboardContent")?f.execCommand("mceInsertClipboardContent",!1,{content:e}):f.execCommand("mceInsertContent",!1,e)}function b(){function i(e){var t=C.schema.getBlockElements(),n=f.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==Z.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;for(s=C.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=C.getParent(t.getNode(e.startContainer,e.startOffset),C.isBlock),
-r=C.getParent(t.getNode(e.endContainer,e.endOffset),C.isBlock),s=f.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==C.getContentEditable(n)&&"false"!==C.getContentEditable(r)))return e.deleteContents(),i=a(n,!1),o=a(r,!0),C.isEmpty(r)||Z(n).append(r.childNodes),Z(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),x.setRng(e),!0}function u(e,n){var r,i,s,l,c,u;if(!e.collapsed)return e;if(c=e.startContainer,u=e.startOffset,3==c.nodeType)if(n){if(u0)return e;if(r=t.getNode(e.startContainer,e.startOffset),s=C.getParent(r,C.isBlock),i=a(f.getBody(),n,r),l=C.getParent(i,C.isBlock),!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function d(e){var t=x.getRng();return t=u(t,e),c(t)?!0:void 0}function h(e,t){function n(e,n){return m=Z(n).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),m=s.map(m,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),m.length?(p=C.create("br"),m[0].appendChild(p),C.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),f.selection.setRng(t),p):null}function i(e){return e&&f.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,u,d,h,p,m;if(t.collapsed&&(d=t.startContainer,h=t.startOffset,a=C.getParent(d,C.isBlock),i(a)))if(1==d.nodeType){if(d=d.childNodes[h],d&&"BR"!=d.tagName)return;if(u=e?a.nextSibling:a.previousSibling,C.isEmpty(a)&&i(u)&&C.isEmpty(u)&&n(a,d))return C.remove(u),!0}else if(3==d.nodeType){if(o=r.create(a,d),c=a.cloneNode(!0),d=r.resolve(c,o),e){if(h>=d.data.length)return;d.deleteData(h,1)}else{if(0>=h)return;d.deleteData(h-1,1)}if(C.isEmpty(c))return n(a,d)}}function p(e){var t,n,r;d(e)||(s.each(f.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&f.dom.setAttrib(e,"style",f.dom.getAttrib(e,"style"))}),t=new w(function(){}),t.observe(f.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),f.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=f.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(C.isChildOf(e.target,f.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),C.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),f.selection.setRng(n))}})}}),t.disconnect(),s.each(f.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var b=f.getDoc(),C=f.dom,x=f.selection,w=window.MutationObserver,N,E;w||(N=!0,w=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),f.on("keydown",function(e){var t=e.keyCode==te,n=e.ctrlKey||e.metaKey;if(!m(e)&&(t||e.keyCode==ee)){var r=f.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(h(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o0))return;e.preventDefault(),n&&f.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),p(t)}}),f.on("keypress",function(t){if(!m(t)&&!x.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,r,i,o,a,s;n=f.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=Z(n.startContainer).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),p(!0),r=r.filter(function(e,t){return!Z.contains(f.getBody(),t)}),r.length?(i=C.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(f.getDoc().createTextNode(s)),o=C.getParent(n.startContainer,C.isBlock),C.isEmpty(o)?Z(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),f.selection.setRng(n)):f.selection.setContent(s)}}),f.addCommand("Delete",function(){p()}),f.addCommand("ForwardDelete",function(){p(!0)}),N||(f.on("dragstart",function(e){E=x.getRng(),g(e)}),f.on("drop",function(e){if(!m(e)){var n=v(e);n&&(e.preventDefault(),l.setEditorTimeout(f,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,b);E&&(x.setRng(E),E=null),p(),x.setRng(r),y(n.html)}))}}),f.on("cut",function(e){m(e)||!e.clipboardData||f.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",f.selection.getContent()),e.clipboardData.setData("text/plain",f.selection.getContent({format:"text"})),l.setEditorTimeout(f,function(){p(!0)}))}))}function C(){function e(e){var t=ne.create("body"),n=e.cloneContents();return t.appendChild(n),re.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(f.getBody()),t.compareRanges(n,r)}var i=e(n),o=ne.createRng();o.selectNode(f.getBody());var a=e(o);return i===a}f.on("keydown",function(e){var t=e.keyCode,r,i;if(!m(e)&&(t==te||t==ee)){if(r=f.selection.isCollapsed(),i=f.getBody(),r&&!ne.isEmpty(i))return;if(!r&&!n(f.selection.getRng()))return;e.preventDefault(),f.setContent(""),i.firstChild&&ne.isBlock(i.firstChild)?f.selection.setCursorLocation(i.firstChild,0):f.selection.setCursorLocation(i,0),f.nodeChanged()}})}function x(){f.shortcuts.add("meta+a",null,"SelectAll")}function w(){f.settings.content_editable||ne.bind(f.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==f.getDoc().documentElement)if(t=re.getRng(),f.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;re.placeCaretAt(e.clientX,e.clientY)}else re.setRng(t)})}function N(){f.on("keydown",function(e){if(!m(e)&&e.keyCode===ee){if(!f.getBody().getElementsByTagName("hr").length)return;if(re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return ne.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(ne.remove(n),e.preventDefault())}}})}function E(){window.Range.prototype.getClientRects||f.on("mousedown",function(e){if(!m(e)&&"HTML"===e.target.nodeName){var t=f.getBody();t.blur(),l.setEditorTimeout(f,function(){t.focus()})}})}function _(){f.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==ne.getContentEditableParent(t)&&(e.preventDefault(),re.getSel().setBaseAndExtent(t,0,t,1),f.nodeChanged()),"A"==t.nodeName&&ne.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),re.select(t))})}function S(){function e(){var e=ne.getAttribs(re.getStart().cloneNode(!1));return function(){var t=re.getStart();t!==f.getBody()&&(ne.setAttrib(t,"style",null),Q(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!re.isCollapsed()&&ne.getParent(re.getStart(),ne.isBlock)!=ne.getParent(re.getEnd(),ne.isBlock)}f.on("keypress",function(n){var r;return m(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),f.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),ne.bind(f.getDoc(),"cut",function(n){var r;!m(n)&&t()&&(r=e(),l.setEditorTimeout(f,function(){r()}))})}function k(){document.body.setAttribute("role","application")}function T(){f.on("keydown",function(e){if(!m(e)&&e.keyCode===ee&&re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function R(){p()>7||(h("RespectVisibilityInDesign",!0),f.contentStyles.push(".mceHideBrInPre pre br {display: none}"),ne.addClass(f.getBody(),"mceHideBrInPre"),oe.addNodeFilter("pre",function(e){for(var t=e.length,n,r,o,a;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)o=n[r],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new i("#text",3),o,!0).value="\n"}),ae.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function A(){ne.bind(f.getBody(),"mouseup",function(){var e,t=re.getNode();"IMG"==t.nodeName&&((e=ne.getStyle(t,"width"))&&(ne.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"width","")),(e=ne.getStyle(t,"height"))&&(ne.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"height","")))})}function B(){f.on("keydown",function(t){var n,r,i,o,a;if(!m(t)&&t.keyCode==e.BACKSPACE&&(n=re.getRng(),r=n.startContainer,i=n.startOffset,o=ne.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(f.formatter.toggle("blockquote",null,a),n=ne.createRng(),n.setStart(r,0),n.setEnd(r,0),re.setRng(n))}})}function D(){function e(){K(),h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),ie.object_resizing||h("enableObjectResizing",!1)}ie.readonly||f.on("BeforeExecCommand MouseDown",e)}function L(){function e(){Q(ne.select("a"),function(e){var t=e.parentNode,n=ne.getRoot();if(t.lastChild===e){for(;t&&!ne.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}ne.add(t,"br",{"data-mce-bogus":1})}})}f.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function M(){ie.forced_root_block&&f.on("init",function(){h("DefaultParagraphSeparator",ie.forced_root_block)})}function P(){f.on("keydown",function(e){var t;m(e)||e.keyCode!=ee||(t=f.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),f.undoManager.beforeChange(),ne.remove(t.item(0)),f.undoManager.add()))})}function O(){var e;p()>=10&&(e="",Q("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),f.contentStyles.push(e+"{padding-right: 1px !important}"))}function H(){p()<9&&(oe.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),ae.addNodeFilter("noscript",function(e){for(var t=e.length,n,r,a;t--;)n=e[t],r=e[t].firstChild,r?r.value=o.decode(r.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),r=new i("#text",3),r.value=a,r.raw=!0,n.append(r)))}))}function I(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),ne.unbind(r,"mouseup",n),ne.unbind(r,"mousemove",t),a=o=0}var r=ne.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,ne.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(ne.bind(r,"mouseup",n),ne.bind(r,"mousemove",t),ne.getRoot().focus(),a.select())}})}function F(){f.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||re.normalize()},!0)}function z(){f.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function U(){f.inline||f.on("keydown",function(){document.activeElement==document.body&&f.getWin().focus()})}function W(){f.inline||(f.contentStyles.push("body {min-height: 150px}"),f.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void f.getBody().focus();t=f.selection.getRng(),f.getBody().focus(),f.selection.setRng(t),f.selection.normalize(),f.nodeChanged()}}))}function V(){a.mac&&f.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),f.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function $(){h("AutoUrlDetect",!1)}function q(){f.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),f.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function j(){f.on("init",function(){f.dom.bind(f.getBody(),"submit",function(e){e.preventDefault()})})}function Y(){oe.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function X(){f.on("dragstart",function(e){g(e)}),f.on("drop",function(e){if(!m(e)){var n=v(e);if(n&&n.id!=f.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,f.getDoc());re.setRng(r),y(n.html)}}})}function K(){var e,t;G()&&(e=f.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())}function G(){var e;return se?(e=f.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}function J(){function t(e){var t=new d(e.getBody()),n=e.selection.getRng(),r=u.fromRangeStart(n),i=u.fromRangeEnd(n);return!e.selection.isCollapsed()&&!t.prev(r)&&!t.next(i)}f.on("keypress",function(n){!m(n)&&!re.isCollapsed()&&n.charCode>31&&!e.metaKeyPressed(n)&&t(f)&&(n.preventDefault(),f.setContent(String.fromCharCode(n.charCode)),f.selection.select(f.getBody(),!0),f.selection.collapse(!1),f.nodeChanged())}),f.on("keydown",function(e){var n=e.keyCode;m(e)||n!=te&&n!=ee||t(f)&&(e.preventDefault(),f.setContent(""),f.nodeChanged())})}var Q=s.each,Z=f.$,ee=e.BACKSPACE,te=e.DELETE,ne=f.dom,re=f.selection,ie=f.settings,oe=f.parser,ae=f.serializer,se=a.gecko,le=a.ie,ce=a.webkit,ue="data:text/mce-internal,",de=le?"Text":"URL";return B(),C(),a.windowsPhone||F(),ce&&(J(),b(),w(),_(),M(),j(),T(),Y(),a.iOS?(U(),W(),q()):x()),le&&a.ie<11&&(N(),k(),R(),A(),P(),O(),H(),I()),a.ie>=11&&(W(),T()),a.ie&&(x(),$(),X()),se&&(J(),N(),E(),S(),D(),L(),z(),V(),T()),{refreshContentEditable:K,isHidden:G}}}),r(Ie,[ue,w,m],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i=r(e,t),s;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;s=function(r){for(var i=r.target,a=e.editorManager.editors,s=a.length;s--;){var l=a[s].getBody();(l===i||o.isChildOf(i,l))&&n(a[s])&&a[s].fire(t,r)}},a[t]=s,o.bind(i,t,s)}else s=function(r){n(e)&&e.fire(t,r)},o.bind(i,t,s),e.delegates[t]=s}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(Fe,[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r(ze,[m,d],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return l=e.map(r(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return e.keyCode>=112&&e.keyCode<=123}function d(e,t){return t?t.ctrl!=e.ctrlKey||t.meta!=e.metaKey?!1:t.alt!=e.altKey||t.shift!=e.shiftKey?!1:e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),!0):!1:!1}function f(e){return e.func?e.func.call(e.scope):null}var h=this,p={},m=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){return d(e,t)?(m=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0):void 0}),d(e,m[0])&&(1===m.length&&"keydown"==e.type&&f(m[0]),m.shift()))}),h.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);p[t.id]=t}),!0},h.remove=function(e){var t=l(e);return p[t.id]?(delete p[t.id],!0):!1}}}),r(Ue,[c,m,z],function(e,t,n){return function(r,i){function o(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function a(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function s(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(o(e))}}function l(e,t,n,r){var s,l;s=new XMLHttpRequest,s.open("POST",i.url),s.withCredentials=i.credentials,s.upload.onprogress=function(e){r(e.loaded/e.total*100)},s.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return 200!=s.status?void n("HTTP Error: "+s.status):(e=JSON.parse(s.responseText),e&&"string"==typeof e.location?void t(a(i.basePath,e.location)):void n("Invalid JSON: "+s.responseText))},l=new FormData,l.append("file",e.blob(),o(e)),s.send(l)}function c(){return new e(function(e){e([])})}function u(e,t){return{url:t,blobInfo:e,status:!0}}function d(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,n){t.each(y[e],function(e){e(n)}),delete y[e]}function h(t,n,i){return r.markPending(t.blobUri()),new e(function(e){var o,a,l=function(){};try{var c=function(){o&&(o.close(),a=l)},h=function(n){c(),r.markUploaded(t.blobUri(),n),f(t.blobUri(),u(t,n)),e(u(t,n))},p=function(){c(),r.removeFailed(t.blobUri()),f(t.blobUri(),d(t,p)),e(d(t,p))};a=function(e){0>e||e>100||(o||(o=i()),o.progressBar.value(e))},n(s(t),h,p,a)}catch(m){e(d(t,m.message))}})}function p(e){return e===l}function m(t){var n=t.blobUri();return new e(function(e){y[n]=y[n]||[],y[n].push(e)})}function g(n,o){return n=t.grep(n,function(e){return!r.isUploaded(e.blobUri())}),e.all(t.map(n,function(e){return r.isPending(e.blobUri())?m(e):h(e,i.handler,o)}))}function v(e,t){return!i.url&&p(i.handler)?c():g(e,t)}var y={};return i=t.extend({credentials:!1,handler:l},i),{upload:v}}}),r(We,[c],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o0&&(n&&(l*=-1),r.left+=l,r.right+=l),r}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a').css(l).appendTo(t),o&&m.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),f=g.firstChild,c.setStart(f,0),c.setEnd(f,1),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}function d(){p=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function h(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"}var p,m,g;return{show:c,hide:u,getCss:h,destroy:f}}}),r(Xe,[p,_,W],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r(Ke,[z,p,Xe,U,te,ne,$,W],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s0&&r(l,t.last(f))&&u++,l.line=u,a(l))return!0;f.push(l)}}var u=0,d,f=[],h;return(h=t.last(s.getClientRects()))?(d=s.getNode(),c(d),l(e,o,c,d),f):f}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(n){return 1==e?t.last(n.getClientRects()):t.last(n.getClientRects())}var c=new o(n),u,d,f,h,p=[],m=0,g,v;1==e?(u=c.next,d=s.isBelow,f=s.isAbove,h=a.after(i)):(u=c.prev,d=s.isAbove,f=s.isBelow,h=a.before(i)),v=l(h);do if(h.isVisible()&&(g=l(h),!f(g,v))){if(p.length>0&&d(g,t.last(p))&&m++,g=s.clone(g),g.position=h,g.line=m,r(g))return p;p.push(g)}while(h=u(h));return p}var h=e.curry,p=h(c,-1,s.isAbove,s.isBelow),m=h(c,1,s.isBelow,s.isAbove);return{upUntil:p,downUntil:m,positionsUntil:f,isAboveLine:h(u),isLine:h(d)}}),r(Ge,[z,p,_,Xe,W,te,U],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&m(t.node)?t:i>o?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),m)}function h(e,t){return{node:e.node,before:s(e,t)=e.top&&i<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n),a&&m(a.node))?h(a,n):null}var m=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),r(Je,[],function(){var e=function(e){var t,n,r,i;return i=e.getBoundingClientRect(),t=e.ownerDocument,n=t.documentElement,r=t.defaultView,{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}},t=function(t){return t.inline?e(t.getBody()):{left:0,top:0}},n=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},i={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:i},i=function(t,n){if(n.target.ownerDocument!==t.getDoc()){var i=e(t.getContentAreaContainer()),o=r(t);return{left:n.pageX-i.left+o.left,top:n.pageY-i.top+o.top}}return{left:n.pageX,top:n.pageY}},o=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}},a=function(e,r){return o(t(e),n(e),i(e,r))};return{calc:a}}),r(Qe,[_,p,z,u,w,Je],function(e,t,n,r,i,o){var a=e.isContentEditableFalse,s=e.isContentEditableTrue,l=function(e){return a(e)},c=function(e,t,n){return t===n||e.dom.isChildOf(t,n)?!1:!a(t)},u=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},d=function(e,t,n,r){var i=t.cloneNode(!0);e.dom.setStyles(i,{width:n,height:r}),e.dom.setAttrib(i,"data-mce-selected",null);var o=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(i,{margin:0,boxSizing:"border-box"}),o.appendChild(i),o},f=function(e,t){e.parentNode!==t&&t.appendChild(e)},h=function(e,t,n,r,i,o){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>i&&(a=t.pageX+n-i),
-t.pageY+r>o&&(s=t.pageY+r-o),e.style.width=n-a+"px",e.style.height=r-s+"px"},p=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},m=function(e){return 0===e.button},g=function(e){return e.element},v=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},y=function(e,r){return function(i){if(m(i)){var o=t.find(r.dom.getParents(i.target),n.or(a,s));if(l(o)){var c=r.dom.getPos(o),u=r.getBody(),f=r.getDoc().documentElement;e.element=o,e.screenX=i.screenX,e.screenY=i.screenY,e.maxX=(r.inline?u.scrollWidth:f.offsetWidth)-2,e.maxY=(r.inline?u.scrollHeight:f.offsetHeight)-2,e.relX=i.pageX-c.x,e.relY=i.pageY-c.y,e.width=o.offsetWidth,e.height=o.offsetHeight,e.ghost=d(r,o,e.width,e.height)}}}},b=function(e,t){var n=r.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return function(r){var i=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(g(e)&&!e.dragging&&i>10){var a=t.fire("dragstart",{target:e.element});if(a.isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){var s=v(e,o.calc(t,r));f(e.ghost,t.getBody()),h(e.ghost,s,e.width,e.height,e.maxX,e.maxY),n(r.clientX,r.clientY)}}},C=function(e,t){return function(n){if(e.dragging&&c(t,t.selection.getNode(),e.element)){var r=u(e.element),i=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});i.isDefaultPrevented()||(r=i.targetClone,t.undoManager.transact(function(){p(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}w(e)}},x=function(e,t){return function(){w(e),e.dragging&&t.fire("dragend")}},w=function(e){e.dragging=!1,e.element=null,p(e.ghost)},N=function(e){var t={},n,r,o,a,s,l;n=i.DOM,l=document,r=y(t,e),o=b(t,e),a=C(t,e),s=x(t,e),e.on("mousedown",r),e.on("mousemove",o),e.on("mouseup",a),n.bind(l,"mousemove",o),n.bind(l,"mouseup",s),e.on("remove",function(){n.unbind(l,"mousemove",o),n.unbind(l,"mouseup",s)})},E=function(e){e.on("drop",function(t){var n="undefined"!=typeof t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(a(n)||a(e.dom.getContentEditableParent(n)))&&t.preventDefault()})},_=function(e){N(e),E(e)};return{init:_}}),r(Ze,[d,ne,$,k,te,Ye,Ke,Ge,_,T,W,I,z,p,u,Qe,S],function(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g){function v(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function y(c){function y(){var e=c.dom.get(le);return e?e.getElementsByTagName("*")[0]:e}function S(e){return c.dom.isBlock(e)}function k(e){e&&c.selection.setRng(e)}function T(){return c.selection.getRng()}function R(e,t){c.selection.scrollIntoView(e,t)}function A(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(R(t,-1===e),se.show(n,t))}function B(e){var t;return se.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:D(e)}function D(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function L(e,t){var n=i.isInSameBlock(e,t);return!n&&l.isBr(e.getNode())?!0:n}function M(e,t){return t=i.normalizeRange(e,re,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function P(e){return r.isCaretContainerBlock(e.startContainer)}function O(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?A(e,i,-1==e):(s=P(r),o=M(e,r),n(o)?B(o.getNode(-1==e)):(o=t(o))?n(o)?A(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&L(o,a)?A(e,a.getNode(-1==e),1==e):s?$(o.toRange()):null):s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,p;if(p=_(n),r=M(e,n),i=t(re,a.isAboveLine(1),r),o=h.filter(i,a.isLine(1)),c=h.last(r.getClientRects()),E(r)&&(p=r.getNode()),N(r)&&(p=r.getNode(!0)),!c)return null;if(u=c.left,l=s.findClosestClientRect(o,u),l&&x(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),A(e,l.node,f>d);if(p){var m=a.positionsUntil(e,re,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return $(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return $(l.position.toRange())}}function I(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='
'),t}var o,a,s;if(r.collapsed&&c.settings.forced_root_block){if(o=c.dom.getParent(r.startContainer,"PRE"),!o)return;a=1==t?oe(n.fromRangeStart(r)):ae(n.fromRangeStart(r)),a||(s=i(),1==t?c.$(o).after(s):c.$(o).before(s),c.selection.select(s,!0),c.selection.collapse())}}function F(e,t,n,r){var i;return(i=O(e,t,n,r))?i:(i=I(e,r),i?i:null)}function z(e,t,n){var r;return(r=H(e,t,n))?r:(r=I(e,n),r?r:null)}function U(){return ue("*[data-mce-caret]")[0]}function W(e){e=ue(e),e.attr("data-mce-caret")&&(se.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),k(T()),R(e[0]))}function V(e){var t,r;return e=i.normalizeRange(1,re,e),t=n.fromRangeStart(e),x(t.getNode())?A(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?A(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?A(1,r,!1):(se.hide(),null))}function $(e){var t;return e&&e.collapsed?(t=V(e),t?t:e):e}function q(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=ae(n.before(e)),i||(t=oe(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),ee(),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function j(e){var t=c.schema.getTextBlockElements();return e.nodeName in t}function Y(e){return c.dom.isEmpty(e)}function X(e,t,r){var i=c.dom,o,a,s,l;if(o=i.getParent(t.getNode(),i.isBlock),a=i.getParent(r.getNode(),i.isBlock),-1===e){if(l=r.getNode(!0),N(r)&&S(l))return j(o)?(Y(o)&&i.remove(o),n.after(l).toRange()):q(r.getNode(!0))}else if(l=t.getNode(),E(t)&&S(l))return j(a)?(Y(a)&&i.remove(a),n.before(l).toRange()):q(t.getNode());if(o===a||!j(o)||!j(a))return null;for(;s=o.firstChild;)a.appendChild(s);return c.dom.remove(o),r.toRange()}function K(e,t,n,i){var o,a,s,l;return!i.collapsed&&(o=_(i),x(o))?$(q(o)):(a=M(e,i),n(a)&&r.isCaretContainerBlock(i.startContainer)?(l=-1==e?ie.prev(a):ie.next(a),l?$(l.toRange()):i):t(a)?$(q(a.getNode(-1==e))):(s=-1==e?ie.prev(a):ie.next(a),t(s)?-1===e?X(e,a,s):X(e,s,a):void 0))}function G(){function r(e,t){var n=t(T());n&&!e.isDefaultPrevented()&&(e.preventDefault(),k(n))}function i(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function o(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function l(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(e){var n=i(e.target);x(n)?t||(e.preventDefault(),Z(B(n))):ee()})}function f(){var e,t=i(c.selection.getNode());C(t)&&S(t)&&c.dom.isEmpty(t)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(t).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function g(e){var t=U();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void W(t)):void(" "!=t.innerHTML&&W(t))}function v(e){var t;switch(e.keyCode){case d.DELETE:t=f();break;case d.BACKSPACE:t=f()}t&&e.preventDefault()}var w=b(F,1,oe,E),_=b(F,-1,ae,N),R=b(K,1,E,N),D=b(K,-1,N,E),L=b(z,-1,a.upUntil),M=b(z,1,a.downUntil);c.on("mouseup",function(){var e=T();e.collapsed&&k(V(e))}),c.on("click",function(e){var t;t=i(e.target),t&&x(t)&&(e.preventDefault(),c.focus())});var P=function(e){var r=new t(e);if(!e.firstChild)return!1;var i=n.before(e.firstChild),o=r.next(i);return o&&!E(o)&&!N(o)},O=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n===r},H=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n&&!O(n,r)&&P(n)};l(c),c.on("mousedown",function(e){var t;if(t=i(e.target))x(t)?(e.preventDefault(),Z(B(t))):(ee(),o(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{ee(),se.hide();var n=s.closestCaret(re,e.clientX,e.clientY);n&&(H(e.target,n.node)||(e.preventDefault(),c.getBody().focus(),k(A(1,n.node,n.before))))}}),c.on("keydown",function(e){if(!d.modifierPressed(e))switch(e.keyCode){case d.RIGHT:r(e,w);break;case d.DOWN:r(e,M);break;case d.LEFT:r(e,_);break;case d.UP:r(e,L);break;case d.DELETE:r(e,R);break;case d.BACKSPACE:r(e,D);break;default:x(c.selection.getNode())&&e.preventDefault()}}),c.on("keyup compositionstart",function(e){g(e),v(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){k($(q(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ce){if(!ce.parentNode)return void(ce=null);t=t.cloneRange(),t.selectNode(ce),e.range=t}}),c.on("setSelectionRange",function(e){var t;t=Z(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng($(c.selection.getRng()))},0)}),c.on("copy",function(t){var n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!e.ie){var r=y();r&&(t.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),m.init(c)}function J(){var e=c.contentStyles,t=".mce-content-body";e.push(se.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function Q(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function Z(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return ee(),null;if(t.collapsed){if(ee(),!Q(t)){if(f=M(1,t),x(f.getNode()))return A(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return A(1,f.getNode(!0),!1)}return null}return s=t.startContainer,l=t.startOffset,u=t.endOffset,3==s.nodeType&&0==l&&x(s.parentNode)&&(s=s.parentNode,l=i.nodeIndex(s),s=s.parentNode),1!=s.nodeType?(ee(),null):(u==l+1&&(n=s.childNodes[l]),x(n)?(h=p=n.cloneNode(!0),d=c.fire("ObjectSelected",{target:n,targetClone:h}),d.isDefaultPrevented()?(ee(),null):(h=d.targetClone,o=r("#"+le),0===o.length&&(o=r('').attr("id",le),o.appendTo(c.getBody())),t=c.dom.createRng(),h===p&&e.ie?(o.empty().append(g.ZWSP).append(h).append(g.ZWSP),t.setStart(o[0].firstChild,0),t.setEnd(o[0].lastChild,1)):(o.empty().append("\xa0").append(h).append("\xa0"),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:i.getPos(n,c.getBody()).y}),o[0].focus(),a=c.selection.getSel(),a.removeAllRanges(),a.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),ce=n,t)):(ee(),null))}function ee(){ce&&(ce.removeAttribute("data-mce-selected"),c.$("#"+le).remove(),ce=null)}function te(){se.destroy(),ce=null}function ne(){se.hide()}var re=c.getBody(),ie=new t(re),oe=b(v,ie.next),ae=b(v,ie.prev),se=new o(c.getBody(),S),le="sel-"+c.dom.uniqueId(),ce,ue=c.$;return e.ceFalse&&(G(),J()),{showBlockCaretContainer:W,hideFakeCaret:ne,destroy:te}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,N=i.isAfterContentEditableFalse,E=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(et,[],function(){var e=0,t=function(){var e=function(){return Math.round(4294967295*Math.random()).toString(36)},t=(new Date).getTime();return"s"+t.toString(36)+e()+e()+e()},n=function(n){return n+e++ +t()};return{uuid:n}}),r(tt,[w,g,E,R,A,O,P,Y,J,Q,Z,ee,oe,ae,N,f,Ae,Pe,B,L,He,d,m,u,Ie,Fe,ze,je,Ze,et],function(e,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A){function B(e,t,i){var o=this,a,s,l;a=o.documentBaseUrl=i.documentBaseURL,s=i.baseURI,l=i.defaultSettings,t=P({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},l,t),l&&l.external_plugins&&t.external_plugins&&(t.external_plugins=P({},l.external_plugins,t.external_plugins)),o.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.setDirty(!1),o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new k(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,o.settings.content_editable=o.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(w.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var D=e.DOM,L=r.ThemeManager,M=r.PluginManager,P=N.extend,O=N.each,H=N.explode,I=N.inArray,F=N.trim,z=N.resolve,U=g.Event,W=w.gecko,V=w.ie;return B.prototype={render:function(){function e(){D.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!L.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",L.load(r.theme,t)}N.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),O(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),O(r.plugins.split(/[ ,]/),function(e){if(e=F(e),e&&!M.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=M.dependencies(e);O(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=M.createUrl(t,e),M.load(e.resource,e)})}else M.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!U.domLoaded)return void D.bind(window,"ready",e);if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||D.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(D.insertAfter(D.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},D.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=D.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),t()}},init:function(){function e(n){var r=M.get(n),i,o;if(i=M.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=F(n),r&&-1===I(m,n)){if(O(M.dependencies(n),function(t){e(t)}),t.plugins[n])return;o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n))}}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(t.rtl=n.rtl_ui||t.editorManager.i18n.rtl,t.editorManager.i18n.setCode(n.language),n.aria_label=n.aria_label||D.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),t.fire("ScriptsLoaded"),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=L.get(n.theme),t.theme=new c(t,L.urls[n.theme]),t.theme.init&&t.theme.init(t,L.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),O(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&O(H(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',!/#$/.test(document.location.href))for(p=0;p',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+=''),t.iframeHTML+='
';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=D.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},D.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=D.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(D.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=D.isHidden(l.editorContainer)),t.getElement().style.display="none",D.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();D.removeClass(e,"mce-content-body"),D.removeClass(e,"mce-edit-focus"),D.setAttrib(e,"contentEditable",null)}),D.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==D.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,D.setAttrib(p,"spellcheck","false")),n.quirks=new x(n),n.fire("PostRender"),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){O(r.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",O(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),O(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&E.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?z(r):0,n=z(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?(e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}),this.editorManager.translate(e)):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?O(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[F(e[0])]=F(e[1]):i[F(e[0])]=F(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({id:A.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(D.show(e.getContainer()),D.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(D.hide(e.getContainer()),D.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=D.getParent(t.id,"form"))&&O(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'
',"TABLE"==r.nodeName?e="
"+o+" |
":/^(UL|OL)$/.test(r.nodeName)&&(e=""+o+""),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='
'),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=F(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=F(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=P({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=D.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=D.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),O(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&D.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),D.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),D.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),D.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},P(B.prototype,_),B}),r(nt,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(rt,[w,u,d],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,
-startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor,r=n.dom;if(n.inline&&r&&!r.isChildOf(t.target,n.getBody())){var i=n.selection.getRng();i.collapsed||(n.lastRng=i)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(it,[tt,g,w,ae,d,m,c,ue,nt,rt],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||n.push(t)})}return n}function d(){function a(t,n,r){var i=new e(t,n,f);m.push(i),i.on("init",function(){++c===y.length&&x(m)}),i.targetElm=i.targetElm||r,i.render()}var c=0,m=[],y;return p.unbind(window,"ready",d),l("onpageload"),y=t.unique(u(n)),n.types?void g(n.types,function(e){o.each(y,function(t){return p.is(t,e.selector)?(a(s(t),v({},n,e),t),!1):!0})}):(o.each(y,function(e){h(f.get(e.id))}),y=o.grep(y,function(e){return!f.get(e.id)}),void g(y,function(e){r(n,e)?i("Could not initialize inline editor on invalid inline target element",e):a(s(e),n,e)}))}var f=this,b,C;C=o.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var x=function(e){b=e};return f.settings=n,p.bind(window,"ready",d),new a(function(e){b?e(b):x=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(ot,[it,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(at,[ue,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(st,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(lt,[st,at,m],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(ct,[w],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ut,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(dt,[w,f,N,E,m,d],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(ft,[se,m],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(ht,[ft],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return''+this._super(e)}})}),r(pt,[De],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild,t;e&&(t=e.style,t.width=t.height="100%"),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text"),a="";return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'"},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append(''),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(mt,[xe],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),''+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),r(gt,[De],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return''+e.encode(e.state.get("text"))+"
"},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(vt,[De,be,pe,g],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='",e.classes.add("has-open")),''+s+"
"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(yt,[vt],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}})}),r(bt,[pt,ke],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(Ct,[bt,w],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a=''+e.encode(r)+""),''},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(xt,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(wt,[De,we,pe,xt],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='','"}})}),r(Nt,[De],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return''+e._getDataPathHtml(e.state.get("row"))+"
"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?' '+t.settings.delimiter+"
":"")+''+n[r].name+"
";return o||(o='\xa0
'),o}})}),r(Et,[Nt],function(e){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var t=this,n=t.settings.editor;return n.settings.elementpath!==!1&&(t.on("select",function(e){n.focus(),n.selection.select(this.row()[e.index].element),n.nodeChanged()}),n.on("nodeChange",function(r){for(var i=[],o=r.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=n.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}t.row(i)})),t._super()}})}),r(_t,[xe],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),''+(e.settings.title?'
'+e.settings.title+"
":"")+'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),r(St,[xe,_t,m],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(kt,[St],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'"}})}),r(Tt,[vt,m],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),s&&!s[e.filetype]||(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Rt,[ht],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(At,[ht],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,O,H,I,F,z=Math.max,U=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",E="h",_="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",O="left",M="w",D="x",L="innerW",
-P="minW",H="right",I="deltaW",F="contentW"):(S="x",E="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",O="top",M="h",D="y",L="innerH",P="minH",H="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],N=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[_],y=o[O]+p[P]+o[H],y>N&&(N=y);if(x={},0>d?x[_]=i[_]-d+i[A]:x[_]=i[R]-d+i[A],x[P]=N+i[I],x[B]=i[R]-d,x[F]=N,x.minW=U(x.minW,i.maxW),x.minH=U(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[_]+p.flex*C,y>b?(d-=p[k]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[O],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[_],"center"===s?x[D]=Math.round(i[L]/2-p[M]/2):"stretch"===s?(x[M]=z(p[P]||0,i[L]-o[O]-o[H]),x[D]=o[O]):"end"===s&&(x[D]=i[L]-p[M]-o.top),p.flex>0&&(y+=p.flex*C),x[E]=y,x[S]=w,h.layoutRect(x),h.recalc&&h.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var W=e.parent();W&&(W._lastRect=null,W.recalc())}}})}),r(Bt,[ft],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(Dt,[ye,De,ke,m,w,it,d],function(e,t,n,r,i,o,a){function s(e){e.settings.ui_container&&(a.container=i.DOM.select(e.settings.ui_container)[0])}function l(t){t.on("ScriptsLoaded",function(){t.rtl&&(e.rtl=!0)})}function c(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;u(i.parents,function(e){return u(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return u(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){u(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&l(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function a(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function s(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function l(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var c;c=i(),u({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:o(n),onclick:function(){l(n)}})}),u({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),u({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:o(n)})}),e.addButton("undo",{tooltip:"Undo",onPostRender:a("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:a("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:s,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),u({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:c}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return u(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:l,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return u(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return u(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:c})}var u=r.each;o.on("AddEditor",function(e){var t=e.editor;l(t),c(t),s(t)}),e.translate=function(e){return o.translate(e)},t.tooltips=!a.iOS}),r(Lt,[ht],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E=[],_=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)E.push(0);for(f=0;n>f;f++)_.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,E[d]=S>E[d]?S:E[d],_[f]=k>_[f]?k:_[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=E[d]+(d>0?y:0),T-=(d>0?y:0)+E[d];for(R=o.innerH-g.top-g.bottom,N=0,f=0;n>f;f++)N+=_[f]+(f>0?b:0),R-=(f>0?b:0)+_[f];if(w+=g.left+g.right,N+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=N+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var L=0,M=t.flexWidths;if(M)for(d=0;dd;d++)E[d]+=M?M[d]*P:P;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=_[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(E[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var O=e.parent();O&&(O._lastRect=null,O.recalc())}}})}),r(Mt,[De,u],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r(Pt,[De],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return''+e.encode(e.state.get("text"))+'
'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Ot,[De,pe],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e=this,t,n,r=e.settings.forId;return!r&&(n=e.settings.forName)&&(t=e.getRoot().find("#"+n)[0],t&&(r=t._id)),r?'":''+e.encode(e.state.get("text"))+""},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Ht,[xe],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(It,[Ht],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(Ft,[pt,be,It],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text"),s="";return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",a&&(e.classes.add("btn-has-text"),s=''+e.encode(a)+""),i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),''},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(zt,[De,be,d,u],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),"-"!==n&&"|"!==n||(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},e=e.split("+"),t=0;t'+("-"!==a?'\xa0":"")+("-"!==a?''+a+"":"")+(c?'":"")+(i.menu?'':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Ut,[g,ye,u],function(e,t,n){return function(r,i){var o=this,a,s=t.classPrefix,l;o.show=function(t,c){function u(){a&&(e(r).append(''),c&&c())}return o.hide(),a=!0,t?l=n.setTimeout(u,t):u(),o},o.hide=function(){var e=r.lastChild;return n.clearTimeout(l),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),a=!1,o}}}),r(Wt,[ke,zt,Ut,m],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){t.throbber&&(t.throbber.hide(),t.throbber=null)}var t=this,r,i;i=t.settings.itemsFactory,i&&(t.throbber||(t.throbber=new n(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",e)),t.requestTime=r=(new Date).getTime(),t.settings.itemsFactory(function(n){return 0===n.length?void t.hide():void(t.requestTime===r&&(t.getEl().style.width="",t.getEl("body").style.width="",e(),t.items().remove(),t.getEl("body").innerHTML="",t.add(n),t.renderNew(),t.fire("loaded")))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r(Vt,[Ft,Wt],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(jt,[De],function(e){function t(e){var t="";if(e)for(var n=0;n'+e[n]+"";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e=this,n,r="";return n=t(e._options),e.size&&(r=' size = "'+e.size+'"'),'"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r(Yt,[De,we,pe],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),r=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",i(c,"valuenow",t),i(c,"valuetext",""+e.settings.previewFilter(t)),i(c,"valuemin",e._minValue),i(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return''},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=s.value(),a=i(t,n,e(t,n,a)+.05*o),a=r(a,t,n),s.value(a),s.fire("dragstart",{value:a}),s.fire("drag",{value:a}),s.fire("dragend",{value:a})}s.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,l,c,p,m;s._dragHelper=new t(s._id,{handle:s._id+"-handle",start:function(e){a=e[u],l=parseInt(s.getEl("handle").style[d],10),c=(s.layoutRect()[h]||100)-n.getSize(o)[f],s.fire("dragstart",{value:m})},drag:function(t){var n=t[u]-a;p=r(l+n,0,c),o.style[d]=p+"px",m=e+p/c*(i-e),s.value(m),s.tooltip().text(""+s.settings.previewFilter(m)).show().moveRel(o,"bc tc"),s.fire("drag",{value:m})},stop:function(){s.tooltip().hide(),s.fire("dragend",{value:m})}})}var s=this,l,c,u,d,f,h;l=s._minValue,c=s._maxValue,"v"==s.settings.orientation?(u="screenY",d="top",f="height",h="h"):(u="screenX",d="left",f="width",h="w"),s._super(),o(l,c,s.getEl("handle")),a(l,c,s.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r(Xt,[De],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,''}})}),r(Kt,[Ft,pe,g],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text"),a="";return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),''},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(Gt,[Bt],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(Jt,[Ee,g,pe],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+=''+e.encode(t.settings.title)+"
"}),'"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(Qt,[De,m,pe],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,r=e.settings,i,o;return i={id:e._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){i[e]=r[e]}),e.disabled()&&(i.disabled="disabled"),r.subtype&&(i.type=r.subtype),o=n.create(r.multiline?"textarea":"input",i),o.value=e.state.get("value"),o.className=e.classes,o.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){
-e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(Zt,[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),{}}),a([l,c,u,d,f,h,m,g,v,y,C,w,N,E,T,A,B,D,L,M,P,O,I,F,j,Y,J,Q,oe,ae,se,le,ue,fe,he,ve,ye,be,Ce,xe,we,Ne,Ee,_e,Se,ke,Te,Re,Ae,Be,De,Le,Me,Pe,Ie,ze,tt,nt,rt,it,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,Ct,xt,wt,Nt,Et,_t,St,kt,Tt,Rt,At,Bt,Dt,Lt,Mt,Pt,Ot,Ht,It,Ft,zt,Ut,Wt,Vt,$t,qt,jt,Yt,Xt,Kt,Gt,Jt,Qt])}(this);!function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g9)&&(b.hasChildNodes()||(b.innerHTML='
'))}var c=function(a){return function(b,c){b&&(c=parseInt(c,10),1===c||0===c?b.removeAttribute(a,1):b.setAttribute(a,c,1))}},d=function(a){return function(b){return parseInt(b.getAttribute(a)||1,10)}};return{setColSpan:c("colSpan"),setRowSpan:c("rowspan"),getColSpan:d("colSpan"),getRowSpan:d("rowSpan"),setSpanVal:function(a,b,d){c(b)(a,d)},getSpanVal:function(a,b){return d(b)(a)},paddCell:b}}),d("tinymce/tableplugin/SplitCols",["tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b){var c=function(a,b,c){return a[c]?a[c][b]:null},d=function(a,b,d){var e=c(a,b,d);return e?e.elm:null},e=function(a,b,e,f){var g,h,i=0,j=d(a,b,e);for(g=e;(f>0?g=0)&&(h=c(a,b,g),j===h.elm);g+=f)i++;return i},f=function(a,b,c){for(var d,e=a[c],f=b;ff;f++)for(X[f]||(X[f]=[]),e=c;c+i>e;e++)X[f][e]={part:b,real:f==d&&e==c,elm:a,rowspan:h,colspan:i};Y=Math.max(Y,c+1)})}),a+=d.length})}function p(a){return i.fire("newrow",{node:a}),a}function q(a){return i.fire("newcell",{node:a}),a}function r(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function s(a,b){var c;return c=X[b],c?c[a]:void 0}function t(a,b){return a[b]?a[b]:null}function u(a,b){for(var c=[],d=0;d'),!1):void 0},"childNodes"),b=r(b,!1),q(b),h(b,"rowSpan",1),h(b,"colSpan",1),e?b.appendChild(e):d.paddCell(b),b}function z(){var a,b=aa.createRng();return f(aa.select("tr",j),function(a){0===a.cells.length&&aa.remove(a)}),0===aa.select("tr",j).length?(b.setStartBefore(j),b.setEndBefore(j),_.setRng(b),void aa.remove(j)):(f(aa.select("thead,tbody,tfoot",j),function(a){0===a.rows.length&&aa.remove(a)}),o(),void(Z&&(a=X[Math.min(X.length-1,Z.y)],a&&(_.select(a[Math.min(a.length-1,Z.x)].elm,!0),_.collapse(!0)))))}function A(a,b,c,d){var e,f,g,h,i;for(e=X[b][a].elm.parentNode,g=1;c>=g;g++)if(e=aa.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=X[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)aa.insertAfter(y(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(y(e.cells[0]),e.cells[0])}}function B(){f(X,function(a,b){f(a,function(a,c){var d,e,f;if(v(a)&&(a=a.elm,d=g(a,"colspan"),e=g(a,"rowspan"),d>1||e>1)){for(h(a,"rowSpan",1),h(a,"colSpan",1),f=0;d-1>f;f++)aa.insertAfter(y(a),a);A(c,b,e-1,d)}})})}function C(a,b,c){for(var d=[],e=0;ee||e>c)&&d.push(a[e]);return d}function D(b){return a.grep(b,function(a){return a.real===!1})}function E(a){for(var b=[],c=0;c=i;i++){var j=C(t(b,i),c,f),k=D(j);j.length===k.length&&(a.each(E(k),function(a){d.setRowSpan(a,d.getRowSpan(a)-1)}),h++)}return h}function G(b,c,e,f,g){for(var h=0,i=c;f>=i;i++){var j=C(u(b,i),e,g),k=D(j);j.length===k.length&&(a.each(E(k),function(a){d.setColSpan(a,d.getColSpan(a)-1)}),h++)}return h}function H(b,c,d){var e,g,i,j,k,l,m,n,p,q,r,t,u;if(b?(e=R(b),g=e.x,i=e.y,j=g+(c-1),k=i+(d-1)):(Z=$=null,f(X,function(a,b){f(a,function(a,c){v(a)&&(Z||(Z={x:c,y:b}),$={x:c,y:b})})}),Z&&(g=Z.x,i=Z.y,j=$.x,k=$.y)),n=s(g,i),p=s(j,k),n&&p&&n.part==p.part){B(),o(),t=F(X,g,i,j,k),u=G(X,g,i,j,k),n=s(g,i).elm;var w=j-g-u+1,x=k-i-t+1;for(w===Y&&x===X.length&&(w=1,x=1),w===Y&&x>1&&(x=1),h(n,"colSpan",w),h(n,"rowSpan",x),m=i;k>=m;m++)for(l=g;j>=l;l++)X[m]&&X[m][l]&&(b=X[m][l].elm,b!=n&&(q=a.grep(b.childNodes),f(q,function(a){n.appendChild(a)}),q.length&&(q=a.grep(n.childNodes),r=0,f(q,function(a){"BR"==a.nodeName&&r++0&&X[c-1][i]&&(m=X[c-1][i].elm,n=g(m,"rowSpan"),n>1)){h(m,"rowSpan",n+1);continue}}else if(n=g(d,"rowspan"),n>1){h(d,"rowSpan",n+1);continue}l=y(d),h(l,"colSpan",d.colSpan),k.appendChild(l),e=d}k.hasChildNodes()&&(a?j.parentNode.insertBefore(k,j):aa.insertAfter(k,j))}}function J(a){var b,c;f(X,function(c){return f(c,function(c,d){return v(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),f(X,function(d,e){var f,i,j;d[b]&&(f=d[b].elm,f!=c&&(j=g(f,"colspan"),i=g(f,"rowspan"),1==j?a?(f.parentNode.insertBefore(y(f),f),A(b,e,i-1,j)):(aa.insertAfter(y(f),f),A(b,e,i-1,j)):h(f,"colSpan",f.colSpan+1),c=f))})}function K(b){return a.grep(L(b),v)}function L(a){var b=[];return f(a,function(a){f(a,function(a){b.push(a)})}),b}function M(){var b=[];if(m(j)){if(1==X[0].length)return;if(K(X).length==L(X).length)return}f(X,function(c){f(c,function(c,d){v(c)&&-1===a.inArray(b,d)&&(f(X,function(a){var b,c=a[d].elm;b=g(c,"colSpan"),b>1?h(c,"colSpan",b-1):aa.remove(c)}),b.push(d))})}),z()}function N(){function a(a){var b,c;f(a.cells,function(a){var c=g(a,"rowSpan");c>1&&(h(a,"rowSpan",c-1),b=R(a),A(b.x,b.y,1,1))}),b=R(a.cells[0]),f(X[b.y],function(a){var b;a=a.elm,a!=c&&(b=g(a,"rowSpan"),1>=b?aa.remove(a):h(a,"rowSpan",b-1),c=a)})}var b;b=w(),m(j)&&b.length==j.rows.length||(f(b.reverse(),function(b){a(b)}),z())}function O(){var a=w();if(!m(j)||a.length!=j.rows.length)return aa.remove(a),z(),a}function P(){var a=w();return f(a,function(b,c){a[c]=r(b,!0)}),a}function Q(b,c){var d,g,i;b&&(d=e.splitAt(X,Z.x,Z.y,c),g=d.row,a.each(d.cells,q),i=a.map(b,function(a){return a.cloneNode(!0)}),c||i.reverse(),f(i,function(a){var b,d,e=a.cells.length;for(p(a),b=0;e>b;b++)d=a.cells[b],q(d),h(d,"colSpan",1),h(d,"rowSpan",1);for(b=e;Y>b;b++)a.appendChild(q(y(a.cells[e-1])));for(b=Y;e>b;b++)aa.remove(a.cells[b]);c?g.parentNode.insertBefore(a,g):aa.insertAfter(a,g)}),l())}function R(a){var b;return f(X,function(c,d){return f(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function S(a){Z=R(a)}function T(){var a,b;return a=b=0,f(X,function(c,d){f(c,function(c,e){var f,g;v(c)&&(c=X[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function U(a){var b,c,d,e,f,g,h,i,j,k;if($=R(a),Z&&$){for(b=Math.min(Z.x,$.x),c=Math.min(Z.y,$.y),d=Math.max(Z.x,$.x),e=Math.max(Z.y,$.y),f=d,g=e,k=c;e>=k;k++)for(j=b;d>=j;j++)a=X[k][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&k+i>g&&(g=k+i));for(l(),k=c;g>=k;k++)for(j=b;f>=j;j++)X[k][j]&&aa.setAttrib(X[k][j].elm,"data-mce-selected","1")}}function V(a,b){var c,d,e;c=R(a),d=c.y*Y+c.x;do{if(d+=b,e=s(d%Y,Math.floor(d/Y)),!e)break;if(e.elm!=a)return _.select(e.elm,!0),aa.isEmpty(e.elm)&&_.collapse(!0),!0}while(e.elm==a);return!1}function W(b){if(Z){var c=e.splitAt(X,Z.x,Z.y,b);a.each(c.cells,q)}}var X,Y,Z,$,_=i.selection,aa=_.dom;j=j||aa.getParent(_.getStart(!0),"table"),o(),k=k||aa.getParent(_.getStart(!0),"th,td"),k&&(Z=R(k),$=T(),k=s(Z.x,Z.y)),a.extend(this,{deleteTable:x,split:B,merge:H,insertRow:I,insertCol:J,splitCols:W,deleteCols:M,deleteRows:N,cutRows:O,copyRows:P,pasteRows:Q,getPos:R,setStartCell:S,setEndCell:U,moveRelIdx:V,refresh:o})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(-1===f){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){return c+=g(a,"colspan"),d=e,c>b?!1:void 0}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?" ":'
'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||p)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),p=!1)}function g(a,b){return a&&b?a===o.getParent(b,"table"):!1}function h(b){var c,f,h=b.target;if(!m&&!n&&h!==l&&(l=h,k&&j)){if(f=o.getParent(h,"td,th"),g(k,f)||(f=o.getParent(k,"td,th")),j===f&&!p)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),p=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(q){}}}}var i,j,k,l,m,n,o=d.dom,p=!0,q=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){p&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||n||(f(),j=o.getParent(a.target,"td,th"),k=o.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){o.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=o.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=o.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,o.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!o.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),q()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),q(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),d.on("dragstart",function(){n=!0}),d.on("drop dragend",function(){n=!1}),{clear:f}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;return a?function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}:void 0}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;dd;d++)c.push(d);return c}function C(a,b,c){for(var d,e=a(),f=0;f0?t(f,g,d):[],k=h.length>0?t(m,n,h):[];x(j,a.offsetWidth,i),y(k,a.offsetHeight,i)}function G(a,b,c,d){if(0>b||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g0?e:f}function J(b,c,d){for(var e=D(b),f=a.map(e,function(a){return m(a.colIndex,a.element).x}),g=[],h=0;h1?G(f,h):I(e[h].element,c,d);j=j?j:wa,g.push(j)}return g}function K(a){var b=H(a,"height"),c=parseInt(b,10);return R(b)&&(c=0),!isNaN(c)&&c>0?c:p(a,"height")}function L(b){for(var c=E(b),d=a.map(c,function(a){return f(a.rowIndex,a.element).y}),e=[],g=0;g1?G(d,g):K(c[g].element);i=i?i:xa,e.push(i)}return e}function M(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);
-c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&ce;e++)d+=c[e];return d}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function P(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function Q(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function R(a){return za.test(a)}function S(a){return Aa.test(a)}function T(b,c,d){function f(b,c){a.each(b,function(a){e.dom.setStyle(a.element,"width",a.width+c),e.dom.setAttrib(a.element,"width",null)})}function g(){return d',c=0;b>c;c++){for(e+="",d=0;a>d;d++)e+=""+(h.ie&&h.ie<10?" ":" ")+" | ";e+="
"}return e+="",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='';for(var b=0;10>b;b++){a+="";for(var c=0;10>c;c++)a+=' | ';a+="
"}return a+="
",a+='1 x 1
'}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;10>e;e++)for(d=0;10>d;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=e,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:y.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}function t(){return v}function u(a){v=a}var v,w,x=this,y=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(w=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:y.table}):f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),y.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:y.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var z=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?z.push({text:"-"}):z.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:z}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),x.quirks=new b(f),f.on("Init",function(){x.cellSelection=new c(f,function(a){a&&w.clearBars()}),x.resizeBars=w}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():y.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){v=a.cutRows()},mceTableCopyRow:function(a){v=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(v,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(v)},mceSplitColsBefore:function(a){a.splitCols(!0)},mceSplitColsAfter:function(a){a.splitCols(!1)},mceTableDelete:function(a){w&&w.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),x.cellSelection.clear())})}),k({mceInsertTable:y.table,mceTableProps:function(){y.table(!0)},mceTableRowProps:y.row,mceTableCellProps:y.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),x.insertTable=i,x.setClipboardRows=u,x.getClipboardRows=t}var k=f.each;i.add("table",j)})}(this);tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():tinymce.util.Delay.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})});!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f/g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/|/g,[/( ?)\u00a0<\/span>( ?)/g,b],/
/g,/
$/i])}function g(a){var b=0;return function(){return a+b++}}return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g}}),d("tinymce/pasteplugin/SmartPaste",["tinymce/util/Tools"],function(a){var b=function(a){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(a)},c=function(a){return b(a)&&/.(gif|jpe?g|png)$/.test(a)},d=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('
')}),!0},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},f=function(a,c,d){return a.selection.isCollapsed()===!1&&b(c)?e(a,c,d):!1},g=function(a,b,e){return c(b)?d(a,b,e):!1},h=function(a,b){return a.insertContent(b,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),!0},i=function(b,c){a.each([f,g,h],function(a){return a(b,c,h)!==!0})},j=function(a,b){a.settings.smart_paste===!1?h(a,b):i(a,b)};return{isImageUrl:c,isAbsoluteUrl:b,insertContent:j}}),d("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils","tinymce/pasteplugin/SmartPaste","tinymce/util/Delay"],function(a,b,c,d,e,f){return function(g){function h(a){var b,c=g.dom;if(b=g.fire("BeforePastePreProcess",{content:a}),b=g.fire("PastePreProcess",b),a=b.content,!b.isDefaultPrevented()){if(g.hasEventListeners("PastePostProcess")&&!b.isDefaultPrevented()){var d=c.add(g.getBody(),"div",{style:"display:none"},a);b=g.fire("PastePostProcess",{node:d}),c.remove(d),a=b.node.innerHTML}b.isDefaultPrevented()||e.insertContent(g,a)}}function i(a){a=g.dom.encode(a).replace(/\r\n/g,"\n");var b,c=g.dom.getParent(g.selection.getStart(),g.dom.isBlock),e=g.settings.forced_root_block;e&&(b=g.dom.createHTML(e,g.settings.forced_root_block_attrs),b=b.substr(0,b.length-3)+">"),c&&/^(PRE|DIV)$/.test(c.nodeName)||!e?a=d.filter(a,[[/\n/g,"
"]]):(a=d.filter(a,[[/\n\n/g,"
"+b],[/^(.*<\/p>)()$/,b+"$1"],[/\n/g,"
"]]),-1!=a.indexOf("
")&&(a=b+a)),h(a)}function j(){function b(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[z.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=g.dom,e=g.getBody(),f=g.dom.getViewPort(g.getWin()),h=f.y,i=20;if(z=g.selection.getRng(),g.inline&&(c=g.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),z.getClientRects){var j=b(z);if(j)i=h+(j.top-d.getPos(e).y);else{i=h;var k=z.startContainer;k&&(3==k.nodeType&&k.parentNode!=e&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||e).y))}}y=d.add(g.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},E),(a.ie||a.gecko)&&d.setStyle(y,"left","rtl"==d.getStyle(e,"direction",!0)?65535:-65535),d.bind(y,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),y.focus(),g.selection.select(y,!0)}function k(){if(y){for(var a;a=g.dom.get("mcepastebin");)g.dom.remove(a),g.dom.unbind(a);z&&g.selection.setRng(z)}y=z=null}function l(){var a,b,c,d,e="";for(a=g.dom.select("div[id=mcepastebin]"),b=0;b0&&-1==c.indexOf(F)&&(b["text/plain"]=c)}if(a.types)for(var d=0;d')}else h('
')}function s(a,b){function c(c){var d,e,f,g=!1;if(c)for(d=0;d0}function w(a){return c.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function x(){function b(a,b,c){var e;return v(a,"text/html")?e=a["text/html"]:(e=l(),e==E&&(c=!0)),e=d.trimHtml(e),y&&y.firstChild&&"mcepastebin"===y.firstChild.id&&(c=!0),k(),e.length||(c=!0),c&&(e=v(a,"text/plain")&&-1==e.indexOf("
")?a["text/plain"]:d.innerText(e)),e==E?void(b||g.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?i(e):h(e))}function c(a){return 0===a["text/plain"].indexOf("file://")}g.on("keydown",function(b){function c(a){w(a)&&!a.isDefaultPrevented()&&k()}if(w(b)&&!b.isDefaultPrevented()){if(A=b.shiftKey&&86==b.keyCode,A&&a.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(b.stopImmediatePropagation(),C=(new Date).getTime(),a.ie&&A)return b.preventDefault(),void g.fire("paste",{ieFake:!0});k(),j(),g.once("keyup",c),g.once("paste",function(){g.off("keyup",c)})}});var e=function(){return z||g.selection.getRng()};g.on("paste",function(c){var d=(new Date).getTime(),h=n(c),i=(new Date).getTime()-d,m=(new Date).getTime()-C-i<1e3,p="text"==B.pasteFormat||A;return A=!1,c.isDefaultPrevented()||t(c)?void k():!o(h)&&s(c,e())?void k():(m||c.preventDefault(),!a.ie||m&&!c.ieFake||(j(),g.dom.bind(y,"paste",function(a){a.stopPropagation()}),g.getDoc().execCommand("Paste",!1,null),h["text/html"]=l()),void(v(h,"text/html")?(c.preventDefault(),b(h,m,p)):f.setEditorTimeout(g,function(){b(h,m,p)},0)))}),g.on("dragstart dragend",function(a){D="dragstart"==a.type}),g.on("drop",function(a){var b,e;if(e=u(a),!a.isDefaultPrevented()&&!D&&(b=m(a.dataTransfer),(o(b)&&!c(b)||!s(a,e))&&e&&g.settings.paste_filter_drop!==!1)){var j=b["mce-internal"]||b["text/html"]||b["text/plain"];j&&(a.preventDefault(),f.setEditorTimeout(g,function(){g.undoManager.transact(function(){b["mce-internal"]&&g.execCommand("Delete"),g.selection.setRng(e),j=d.trimHtml(j),b["text/html"]?h(j):i(j)})}))}}),g.on("dragover dragend",function(a){g.settings.paste_data_images&&a.preventDefault()})}var y,z,A,B=this,C=0,D=!1,E="%MCEPASTEBIN%",F="data:text/mce-internal,",G=d.createIdGenerator("mceclip");B.pasteHtml=h,B.pasteText=i,B.pasteImageData=s,g.on("preInit",function(){x(),g.parser.addNodeFilter("img",function(b,c,d){function e(a){return a.data&&a.data.paste===!0}function f(b){b.attr("data-mce-object")||k===a.transparentSrc||b.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!g.settings.paste_data_images&&e(d))for(var j=b.length;j--;){var k=b[j].attributes.map.src;k&&(h(k)?f(b[j]):!g.settings.allow_html_data_urls&&i(k)&&f(b[j]))}})})}}),d("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(a,b,c,d,e,f){function g(a){return/h?g&&(g=g.parent.parent):(j=g,g=null)),g&&g.name==b?g.append(a):(j=j||g,g=new e(b,1),f>1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/
/gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&-1!=c.indexOf("#_msocom_"))b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({validate:k.validate},s).serialize(u)}})}return j.isWordContent=g,j}),d("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(a,b,c,d){return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:
[\\s\\r\\n]+|
)*(<\\/?("+f.join("|")+")[^>]*>)(?:
[\\s\\r\\n]+|
)*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/
/g,"
"],[/
/g," "],[/
/g,"
"]])}function h(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(e,"span"),i={};if("none"===b)return c+g;for(var j=0;j]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}a.webkit&&f(h),a.ie&&f(g)}}),d("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(a,b,c,d){var e;a.add("paste",function(f){function g(){return e||f.settings.paste_plaintext_inform===!1}function h(){if("text"==i.pasteFormat)this.active(!1),i.pasteFormat="html",f.fire("PastePlainTextToggle",{state:!1});else if(i.pasteFormat="text",this.active(!0),!g()){var a=f.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");f.notificationManager.open({text:a,type:"info"}),e=!0,f.fire("PastePlainTextToggle",{state:!0})}f.focus()}var i,j=this,k=f.settings;return/(^|[ ,])powerpaste([, ]|$)/.test(k.plugins)&&a.get("powerpaste")?void("undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.")):(j.clipboard=i=new b(f),j.quirks=new d(f),j.wordFilter=new c(f),f.settings.paste_as_text&&(j.clipboard.pasteFormat="text"),k.paste_preprocess&&f.on("PastePreProcess",function(a){k.paste_preprocess.call(j,j,a)}),k.paste_postprocess&&f.on("PastePostProcess",function(a){k.paste_postprocess.call(j,j,a)}),f.addCommand("mceInsertClipboardContent",function(a,b){b.content&&j.clipboard.pasteHtml(b.content),b.text&&j.clipboard.pasteText(b.text)}),f.settings.paste_block_drop&&f.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),f.settings.paste_data_images||f.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),f.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:h,active:"text"==j.clipboard.pasteFormat}),void f.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:i.pasteFormat,onclick:h}))})}),f(["tinymce/pasteplugin/Utils"])}(this);tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",j?u.target=w.getAttrib(j,"target"):a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();tinymce.util.Delay.setEditorTimeout(a,function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})})}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):a.settings.link_assume_external_targets&&!/^\w+:/i.test(e)||!a.settings.link_assume_external_targets&&/^\s*www[\.|\d\.]/i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Meta+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})});tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"
")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Shift+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});tinymce.PluginManager.add("directionality",function(a){function b(b){var c,d=a.dom,e=a.selection.getSelectedBlocks();e.length&&(c=d.getAttrib(e[0],"dir"),tinymce.each(e,function(a){d.getParent(a.parentNode,"*[dir='"+b+"']",d.getRoot())||(c!=b?d.setAttrib(a,"dir",b):d.setAttrib(a,"dir",null))}),a.nodeChanged())}function c(a){var b=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(c){b.push(c+"[dir="+a+"]")}),b.join(",")}a.addCommand("mceDirectionLTR",function(){b("ltr")}),a.addCommand("mceDirectionRTL",function(){b("rtl")}),a.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:c("ltr")}),a.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:c("rtl")})});tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});tinymce.PluginManager.add("charmap",function(a){function b(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function c(a){return tinymce.util.Tools.grep(a,function(a){return i(a)&&2==a.length})}function d(a){return i(a)?[].concat(c(a)):"function"==typeof a?a():[]}function e(b){var c=a.settings;return c.charmap&&(b=d(c.charmap)),c.charmap_append?[].concat(b).concat(d(c.charmap_append)):b}function f(){return e(b())}function g(b){a.fire("insertCustomChar",{chr:b}).chr,a.execCommand("mceInsertContent",!1,b)}function h(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var c,d,e,h;c='';var i=f(),j=Math.min(i.length,25),k=Math.ceil(i.length/j);for(e=0;k>e;e++){for(c+="",d=0;j>d;d++){var l=e*j+d;if(l'+(m?String.fromCharCode(parseInt(m[0],10)):" ")+"
"}else c+=" | "}c+="
"}c+="
";var n={type:"container",html:c,onclick:function(a){var c=a.target;/^(TD|DIV)$/.test(c.nodeName)&&b(c).firstChild&&(g(tinymce.trim(c.innerText||c.textContent)),a.ctrlKey||h.close())},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(h.find("#preview").text(c.firstChild.firstChild.data),h.find("#previewTitle").text(c.title)):(h.find("#preview").text(" "),h.find("#previewTitle").text(" "))}};h=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[n,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){h.close()}}]})}var i=tinymce.util.Tools.isArray;return a.addCommand("mceShowCharmap",h),a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:f,insertChar:g}});tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(b,e,f){tinymce.util.Delay.setEditorTimeout(a,function(){c({}),b--?d(b,e,f):f&&f()},e)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))});tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="",d="A"==b.tagName&&""===a.dom.getAttrib(b,"href");d&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(c){var e=c.data.name;d?b.id=e:(a.selection.collapse(!0),a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:e})))}})}a.addCommand("mceAnchor",b),a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});tinymce.ThemeManager.add("modern",function(a){function b(b,c){var d,e=[];if(b)return o(b.split(/[ ,]/),function(b){function f(){function c(a){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););b.active(c&&e==a)}}var d=a.selection;"bullist"==g&&d.selectorChanged("ul > li",c("UL")),"numlist"==g&&d.selectorChanged("ol > li",c("OL")),b.settings.stateSelector&&d.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&d.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var g;"|"==b?d=null:n.has(b)?(b={type:b,size:c},e.push(b),d=null):(d||(d={type:"buttongroup",items:[]},e.push(d)),a.buttons[b]&&(g=b,b=a.buttons[g],"function"==typeof b&&(b=b()),b.type=b.type||"button",b.size=c,b=n.create(b),d.items.push(b),a.initialized?f():a.on("init",f)))}),{type:"toolbar",layout:"flow",items:e}}function c(a){function c(c){return c?(d.push(b(c,a)),!0):void 0}var d=[];if(tinymce.isArray(m.toolbar)){if(0===m.toolbar.length)return;tinymce.each(m.toolbar,function(a,b){m["toolbar"+(b+1)]=a}),delete m.toolbar}for(var e=1;10>e&&c(m["toolbar"+e]);e++);return d.length||m.toolbar===!1||c(m.toolbar||t),d.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:d}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((m.removed_menuitems||"").split(/[ ,]/)),m.menu?(e=m.menu[c],g=!0):e=s[c],e){d={text:e.title},f=[],o((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||o(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var t;a.on("click keyup setContent",function(b){("setcontent"!=b.type||b.selection)&&tinymce.util.Delay.setEditorTimeout(a,function(){var b;b=s(a.selection.getNode()),b?(r(),p(b)):r()})}),a.on("blur hide",r),a.on("ObjectResizeStart",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",k),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})}function i(a){return function(){a.initialized?a.fire("SkinLoaded"):a.on("init",function(){a.fire("SkinLoaded")})}}function j(b){function f(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=p.getPos(c),g=p.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){o&&(o.show(),f(),p.addClass(a.getBody(),"mce-edit-focus"))}function j(){o&&(o.hide(),r.hideAll(),p.removeClass(a.getBody(),"mce-edit-focus"))}function k(){return o?void(o.visible()||g()):(o=l.panel=n.create({type:q?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!q,border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size)]}),a.fire("BeforeRenderUI"),o.renderTo(q||document.body).reflow(),e(o),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",j),void a.nodeChanged())}var o,q;return m.fixed_toolbar_container&&(q=p.select(m.fixed_toolbar_container)[0]),m.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,k,k):k()}),a.on("blur hide",j),a.on("remove",function(){o&&(o.remove(),o=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),{}}function k(b){function g(){return function(a){"readonly"==a.mode?j.find("*").disabled(!0):j.find("*").disabled(!1)}}var j,k,o;return b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),j=l.panel=n.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),m.resize!==!1&&(k={type:"resizehandle",direction:m.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;o={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==m.resize?f(o.width+a.deltaX,o.height+a.deltaY):f(null,o.height+a.deltaY)}}),m.statusbar!==!1&&j.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:a},k]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",g()),j.renderBefore(b.targetNode).reflow(),m.readonly&&a.setMode("readonly"),m.width&&tinymce.DOM.setStyle(j.getEl(),"width",m.width),a.on("remove",function(){j.remove(),j=null}),e(j),h(),{iframeContainer:j.find("#iframe")[0].getEl(),editorContainer:j.getEl()}}var l=this,m=a.settings,n=tinymce.ui.Factory,o=tinymce.each,p=tinymce.DOM,q=tinymce.geom.Rect,r=tinymce.ui.FloatPanel,s={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},t="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(b){var c=m.skin!==!1?m.skin||"lightgray":!1;if(c){var d=m.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,tinymce.Env.documentMode<=7?b.skinUiCss=d+"/skin.ie7.min.css":b.skinUiCss=d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),a.state?l.throbber.show(a.time):l.throbber.hide()}),m.inline?j(b):k(b)},l.resizeTo=f,l.resizeBy=g});
\ No newline at end of file
+// 4.7.5 (2018-01-22)
+!function(){"use strict";var e,t,n,r,o,i,a,s,u,c,l,f,d,m,p,g,h,v=function(e){return function(){return e}},y={noop:function(){},noarg:function(e){return function(){return e()}},compose:function(e,t){return function(){return e(t.apply(null,arguments))}},constant:v,identity:function(e){return e},tripleEquals:function(e,t){return e===t},curry:function(e){for(var t=new Array(arguments.length-1),n=1;n-1},T=function(e,t){for(var n=e.length,r=new Array(n),o=0;o=0;n--)t(e[n],n,e)},B=function(e,t){for(var n=[],r=0,o=e.length;r=534,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==a,range:window.getSelection&&"Range"in window,documentMode:a&&!u?document.documentMode||7:10,fileApi:m,ceFalse:!1===a||a>8,cacheSuffix:"",container:null,overrideViewPort:null,experimentalShadowDom:!1,canHaveCSP:!1===a||a>11,desktop:!p&&!g,windowsPhone:h},pe=window.Promise?window.Promise:function(){function e(e,t){return function(){e.apply(t,arguments)}}var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],u(t,e(i,this),e(a,this))},r=n.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)};function o(e){var t=this;null!==this._state?r(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void e.reject(o)}e.resolve(r)}else(t._state?e.resolve:e.reject)(t._value)}):this._deferreds.push(e)}function i(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void u(e(n,t),e(i,this),e(a,this))}this._state=!0,this._value=t,s.call(this)}catch(r){a.call(this,r)}}function a(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;e0&&(a=i[0]),r.deepPath&&(i=r.deepPath())&&i.length>0&&(a=i[0]),a)),e&&be.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var c=u.target.ownerDocument||document,l=c.documentElement,f=c.body;u.pageX=e.clientX+(l&&l.scrollLeft||f&&f.scrollLeft||0)-(l&&l.clientLeft||f&&f.clientLeft||0),u.pageY=e.clientY+(l&&l.scrollTop||f&&f.scrollTop||0)-(l&&l.clientTop||f&&f.clientTop||0)}return u.preventDefault=function(){u.isDefaultPrevented=we,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},u.stopPropagation=function(){u.isPropagationStopped=we,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},u.stopImmediatePropagation=function(){u.isImmediatePropagationStopped=we,u.stopPropagation()},0==((s=u).isDefaultPrevented===we||s.isDefaultPrevented===xe)&&(u.isDefaultPrevented=xe,u.isPropagationStopped=xe,u.isImmediatePropagationStopped=xe),"undefined"==typeof u.metaKey&&(u.metaKey=!1),u},ke=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){n.domLoaded||(n.domLoaded=!0,t(o))},s=function(){i()&&(Ee(r,"readystatechange",s),a())},u=function(){try{r.documentElement.doScroll("left")}catch(e){return void ye.setTimeout(u)}a()};!r.addEventListener||me.ie&&me.ie<11?(Ne(r,"readystatechange",s),r.documentElement.doScroll&&e.self===e.top&&u()):i()?a():Ne(e,"DOMContentLoaded",a),Ne(e,"load",a)}},Te=function(){var e,t,n,r,o,i=this,a={};t="mce-data-"+(+new Date).toString(32),r="onmouseenter"in document.documentElement,n="onfocusin"in document.documentElement,o={mouseenter:"mouseover",mouseleave:"mouseout"},e=1,i.domLoaded=!1,i.events=a;var s=function(e,t){var n,r,o,i,s=a[t];if(n=s&&s[e.type])for(r=0,o=n.length;r+~]|"+$e+")"+$e+"*"),Qe=new RegExp("="+$e+"*([^\\]'\"]*?)"+$e+"*\\]","g"),Ze=new RegExp(Xe),et=new RegExp("^"+We+"$"),tt={ID:new RegExp("^#("+We+")"),CLASS:new RegExp("^\\.("+We+")"),TAG:new RegExp("^("+We+"|[*])"),ATTR:new RegExp("^"+Ke),PSEUDO:new RegExp("^"+Xe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+$e+"*(even|odd|(([+-]|)(\\d*)n|)"+$e+"*(?:([+-]|)"+$e+"*(\\d+)|))"+$e+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+$e+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+$e+"*((?:-\\d)?\\d*)"+$e+"*\\)|)(?=[^-]|$)","i")},nt=/^(?:input|select|textarea|button)$/i,rt=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,it=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,at=/[+~]/,st=/'|\\/g,ut=new RegExp("\\\\([\\da-f]{1,6}"+$e+"?|("+$e+")|.)","ig"),ct=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{He.apply(ze=qe.call(_e.childNodes),_e.childNodes),ze[_e.childNodes.length].nodeType}catch(yC){He={apply:ze.length?function(e,t){Ve.apply(e,qe.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var lt=function(e,t,n,r){var o,i,a,s,u,c,l,f,d,m;if((t?t.ownerDocument||t:_e)!==se&&ae(t),t=t||se,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(ce&&!r){if(o=it.exec(e))if(a=o[1]){if(9===s){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&de(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return He.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&G.getElementsByClassName)return He.apply(n,t.getElementsByClassName(a)),n}if(G.qsa&&(!le||!le.test(e))){if(f=l=Ae,d=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=ee(e),(l=t.getAttribute("id"))?f=l.replace(st,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",u=c.length;u--;)c[u]=f+bt(c[u]);d=at.test(e)&&vt(t.parentNode)||t,m=c.join(",")}if(m)try{return He.apply(n,d.querySelectorAll(m)),n}catch(p){}finally{l||t.removeAttribute("id")}}}return ne(e.replace(Ye,"$1"),t,n,r)};function ft(){var e=[];return function t(n,r){return e.push(n+" ")>J.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function dt(e){return e[Ae]=!0,e}function mt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Me)-(~e.sourceIndex||Me);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function gt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return dt(function(t){return t=+t,dt(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function vt(e){return e&&typeof e.getElementsByTagName!==Le&&e}for(Y in G=lt.support={},Z=lt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},ae=lt.setDocument=function(e){var t,n=e?e.ownerDocument||e:_e,r=n.defaultView;return n!==se&&9===n.nodeType&&n.documentElement?(se=n,ue=n.documentElement,ce=!Z(n),r&&r!==function(e){try{return e.top}catch(t){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",function(){ae()},!1):r.attachEvent&&r.attachEvent("onunload",function(){ae()})),G.attributes=!0,G.getElementsByTagName=!0,G.getElementsByClassName=ot.test(n.getElementsByClassName),G.getById=!0,J.find.ID=function(e,t){if(typeof t.getElementById!==Le&&ce){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},J.filter.ID=function(e){var t=e.replace(ut,ct);return function(e){return e.getAttribute("id")===t}},J.find.TAG=G.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Le)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},J.find.CLASS=G.getElementsByClassName&&function(e,t){if(ce)return t.getElementsByClassName(e)},fe=[],le=[],G.disconnectedMatch=!0,le=le.length&&new RegExp(le.join("|")),fe=fe.length&&new RegExp(fe.join("|")),t=ot.test(ue.compareDocumentPosition),de=t||ot.test(ue.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Ie=t?function(e,t){if(e===t)return ie=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!G.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===_e&&de(_e,e)?-1:t===n||t.ownerDocument===_e&&de(_e,t)?1:oe?je.call(oe,e)-je.call(oe,t):0:4&r?-1:1)}:function(e,t){if(e===t)return ie=!0,0;var r,o=0,i=e.parentNode,a=t.parentNode,s=[e],u=[t];if(!i||!a)return e===n?-1:t===n?1:i?-1:a?1:oe?je.call(oe,e)-je.call(oe,t):0;if(i===a)return mt(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)u.unshift(r);for(;s[o]===u[o];)o++;return o?mt(s[o],u[o]):s[o]===_e?-1:u[o]===_e?1:0},n):se},lt.matches=function(e,t){return lt(e,null,null,t)},lt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==se&&ae(e),t=t.replace(Qe,"='$1']"),G.matchesSelector&&ce&&(!fe||!fe.test(t))&&(!le||!le.test(t)))try{var n=(void 0).call(e,t);if(n||G.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(yC){}return lt(t,se,null,[e]).length>0},lt.contains=function(e,t){return(e.ownerDocument||e)!==se&&ae(e),de(e,t)},lt.attr=function(e,t){(e.ownerDocument||e)!==se&&ae(e);var n=J.attrHandle[t.toLowerCase()],r=n&&Fe.call(J.attrHandle,t.toLowerCase())?n(e,t,!ce):undefined;return r!==undefined?r:G.attributes||!ce?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},lt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},lt.uniqueSort=function(e){var t,n=[],r=0,o=0;if(ie=!G.detectDuplicates,oe=!G.sortStable&&e.slice(0),e.sort(Ie),ie){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return oe=null,e},Q=lt.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Q(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Q(t);return n},(J=lt.selectors={cacheLength:50,createPseudo:dt,match:tt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ut,ct),e[3]=(e[3]||e[4]||e[5]||"").replace(ut,ct),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||lt.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&<.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return tt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Ze.test(n)&&(t=ee(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ut,ct).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=De[e+" "];return t||(t=new RegExp("(^|"+$e+")"+e+"("+$e+"|$)"))&&De(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Le&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=lt.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,m,p,g=i!==a?"nextSibling":"previousSibling",h=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s;if(h){if(i){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?h.firstChild:h.lastChild],a&&y){for(m=(c=(l=h[Ae]||(h[Ae]={}))[e]||[])[0]===Be&&c[1],d=c[0]===Be&&c[2],f=m&&h.childNodes[m];f=++m&&f&&f[g]||(d=m=0)||p.pop();)if(1===f.nodeType&&++d&&f===t){l[e]=[Be,m,d];break}}else if(y&&(c=(t[Ae]||(t[Ae]={}))[e])&&c[0]===Be)d=c[1];else for(;(f=++m&&f&&f[g]||(d=m=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(y&&((f[Ae]||(f[Ae]={}))[e]=[Be,d]),f!==t)););return(d-=o)===r||d%r==0&&d/r>=0}}},PSEUDO:function(e,t){var n,r=J.pseudos[e]||J.setFilters[e.toLowerCase()]||lt.error("unsupported pseudo: "+e);return r[Ae]?r(t):r.length>1?(n=[e,e,"",t],J.setFilters.hasOwnProperty(e.toLowerCase())?dt(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=je.call(e,i[a])]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:dt(function(e){var t=[],n=[],r=te(e.replace(Ye,"$1"));return r[Ae]?dt(function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),!n.pop()}}),has:dt(function(e){return function(t){return lt(e,t).length>0}}),contains:dt(function(e){return e=e.replace(ut,ct),function(t){return(t.textContent||t.innerText||Q(t)).indexOf(e)>-1}}),lang:dt(function(e){return et.test(e||"")||lt.error("unsupported lang: "+e),e=e.replace(ut,ct).toLowerCase(),function(t){var n;do{if(n=ce?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===ue},focus:function(e){return e===se.activeElement&&(!se.hasFocus||se.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!J.pseudos.empty(e)},header:function(e){return rt.test(e.nodeName)},input:function(e){return nt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[n<0?n+t:n]}),even:ht(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:ht(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function wt(e,t,n,r,o){for(var i,a=[],s=0,u=e.length,c=null!=t;s-1&&(i[c]=!(a[c]=f))}}else v=wt(v===a?v.splice(p,v.length):v),o?o(null,a,v,u):He.apply(a,v)})}function Et(e){for(var t,n,r,o=e.length,i=J.relative[e[0].type],a=i||J.relative[" "],s=i?1:0,u=Ct(function(e){return e===t},a,!0),c=Ct(function(e){return je.call(t,e)>-1},a,!0),l=[function(e,n,r){return!i&&(r||n!==re)||((t=n).nodeType?u(e,n,r):c(e,n,r))}];s1&&xt(l),s>1&&bt(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(Ye,"$1"),n,s0,a=r.length>0,s=function(e,t,n,s,u){var c,l,f,d=0,m="0",p=e&&[],g=[],h=re,v=e||a&&J.find.TAG("*",u),y=Be+=null==h?1:Math.random()||.1,b=v.length;for(u&&(re=t!==se&&t);m!==b&&null!=(c=v[m]);m++){if(a&&c){for(l=0;f=r[l++];)if(f(c,t,n)){s.push(c);break}u&&(Be=y)}i&&((c=!f&&c)&&d--,e&&p.push(c))}if(d+=m,i&&m!==d){for(l=0;f=o[l++];)f(p,g,t,n);if(e){if(d>0)for(;m--;)p[m]||g[m]||(g[m]=Ue.call(s));g=wt(g)}He.apply(s,g),u&&!e&&g.length>0&&d+o.length>1&<.uniqueSort(s)}return u&&(Be=y,re=h),p},i?dt(s):s))).selector=e}return l},ne=lt.select=function(e,t,n,r){var o,i,a,s,u,c="function"==typeof e&&e,l=!r&&ee(e=c.selector||e);if(n=n||[],1===l.length){if((i=l[0]=l[0].slice(0)).length>2&&"ID"===(a=i[0]).type&&G.getById&&9===t.nodeType&&ce&&J.relative[i[1].type]){if(!(t=(J.find.ID(a.matches[0].replace(ut,ct),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=tt.needsContext.test(e)?0:i.length;o--&&(a=i[o],!J.relative[s=a.type]);)if((u=J.find[s])&&(r=u(a.matches[0].replace(ut,ct),at.test(i[0].type)&&vt(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&bt(i)))return He.apply(n,r),n;break}}return(c||te(e,l))(r,t,!ce,n,at.test(e)&&vt(t.parentNode)||t),n},G.sortStable=Ae.split("").sort(Ie).join("")===Ae,G.detectDuplicates=!!ie,ae(),G.sortDetached=!0;var St=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},kt=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r)[^>]*$|#([\w\-]*)$)/,Ft=Te.Event,zt=Ot.makeMap("children,contents,next,prev"),Ut=function(e){return void 0!==e},Vt=function(e){return"string"==typeof e},Ht=function(e,t){var n,r,o;for(o=(t=t||Pt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},qt=function(e,t,n,r){var o;if(Vt(t))t=Ht(t,rn(e[0]));else if(t.length&&!t.nodeType){if(t=Qt.makeArray(t),r)for(o=t.length-1;o>=0;o--)qt(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Mt.exec(e)))return Qt(t).find(e);if(n[1])for(r=Ht(e,rn(t)).firstChild;r;)It.call(o,r),r=r.nextSibling;else{if(!(r=rn(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return Ot.toArray(this)},add:function(e,t){var n,r,o=this;if(Vt(e))return o.add(Qt(e));if(!1!==t)for(n=Qt.unique(o.toArray().concat(Qt.makeArray(e))),o.length=n.length,r=0;r1&&(zt[e]||(r=Qt.unique(r)),0===e.indexOf("parents")&&(r=r.reverse())),r=Qt(r),n?r.filter(n):r}}),tn({parentsUntil:function(e,t){return on(e,"parentNode",t)},nextUntil:function(e,t){return an(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return an(e,"previousSibling",1,t).slice(1)}},function(e,t){Qt.fn[e]=function(n,r){var o=[];return this.each(function(){var e=t.call(o,this,n,o);e&&(Qt.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=Qt.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=Qt(o),r?o.filter(r):o}}),Qt.fn.is=function(e){return!!e&&this.filter(e).length>0},Qt.fn.init.prototype=Qt.fn,Qt.overrideDefaults=function(e){var t,n=function(r,o){return t=t||e(),0===arguments.length&&(r=t.element),o||(o=t.context),new n.fn.init(r,o)};return Qt.extend(n,this),n};var un=function(e,t,n){tn(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})};me.ie&&me.ie<8&&(un(Gt,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?undefined:t},size:function(e){var t=e.size;return 20===t?undefined:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?undefined:t}}),un(Gt,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),me.ie&&me.ie<9&&(Yt["float"]="styleFloat",un(Jt,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),Qt.attrHooks=Gt,Qt.cssHooks=Jt;var cn,ln,fn,dn,mn=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(null,arguments)),t}},pn=function(e,t){var n=function(e,t){for(var n=0;n1)throw console.error("HTML does not have a single root node",e),"HTML must have a single root node";return Vn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return Vn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return Vn(n)},fromDom:Vn,fromPoint:function(e,t,n){return E.from(e.dom().elementFromPoint(t,n)).map(Vn)}},qn=8,jn=9,$n=1,Wn=3,Kn=function(e){return e.dom().nodeName.toLowerCase()},Xn=function(e){return e.dom().nodeType},Yn=function(e){return function(t){return Xn(t)===e}},Gn=Yn($n),Jn=Yn(Wn),Qn=Yn(jn),Zn={name:Kn,type:Xn,value:function(e){return e.dom().nodeValue},isElement:Gn,isText:Jn,isDocument:Qn,isComment:function(e){return Xn(e)===qn||"#comment"===Kn(e)}},er=function(e){return function(t){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(t)===e}},tr={isString:er("string"),isObject:er("object"),isArray:er("array"),isNull:er("null"),isBoolean:er("boolean"),isUndefined:er("undefined"),isFunction:er("function"),isNumber:er("number")},nr=(cn=Object.keys)===undefined?function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}:cn,rr=function(e,t){for(var n=nr(e),r=0,o=n.length;r0&&t=e.length&&t(n)}))})})},Gr=function(e){return Yr(e,Xr.nu)},Jr=Gr,Qr=function(e){return{is:function(t){return e===t},isValue:y.constant(!0),isError:y.constant(!1),getOr:y.constant(e),getOrThunk:y.constant(e),getOrDie:y.constant(e),or:function(t){return Qr(e)},orThunk:function(t){return Qr(e)},fold:function(t,n){return n(e)},map:function(t){return Qr(t(e))},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return E.some(e)}}},Zr=function(e){return{is:y.constant(!1),isValue:y.constant(!1),isError:y.constant(!0),getOr:y.identity,getOrThunk:function(e){return e()},getOrDie:function(){return y.die(e)()},or:function(e){return e},orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return Zr(e)},each:y.noop,bind:function(t){return Zr(e)},exists:y.constant(!1),forall:y.constant(!0),toOption:E.none}},eo={value:Qr,error:Zr},to=function(e,t){var n=e,r=function(e,n,r,o){var i,a;if(e){if(!o&&e[n])return e[n];if(e!==t){if(i=e[r])return i;for(a=e.parentNode;a&&a!==t;a=a.parentNode)if(i=a[r])return i}}};this.current=function(){return n},this.next=function(e){return n=r(n,"firstChild","nextSibling",e)},this.prev=function(e){return n=r(n,"lastChild","previousSibling",e)},this.prev2=function(e){return n=function(e,n,r,o){var i,a,s;if(e){if(i=e[r],t&&i===t)return;if(i){if(!o)for(s=i[n];s;s=s[n])if(!s[n])return s;return i}if((a=e.parentNode)&&a!==t)return a}}(n,"lastChild","previousSibling",e)}},no=function(e){var t;return function(n){return(t=t||M.mapToObject(e,y.constant(!0))).hasOwnProperty(Zn.name(n))}},ro=no(["h1","h2","h3","h4","h5","h6"]),oo=no(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),io={isBlock:oo,isInline:function(e){return Zn.isElement(e)&&!oo(e)},isHeading:ro,isTextBlock:no(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),isList:no(["ul","ol","dl"]),isListItem:no(["li","dd","dt"]),isVoid:no(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),isTableSection:no(["thead","tbody","tfoot"]),isTableCell:no(["td","th"]),isBr:function(e){return Zn.isElement(e)&&"br"===Zn.name(e)}},ao=function(e){return function(t){return!!t&&t.nodeType===e}},so=ao(1),uo=function(e){var t=e.toLowerCase().split(" ");return function(e){var n,r;if(e&&e.nodeType)for(r=e.nodeName.toLowerCase(),n=0;n=0;n--)bo(e,r[n]);if(!1===vo.isDocument(t)){if(vo.isText(t)&&t.nodeValue.length>0){var o=Ot.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||o>0)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,s=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&s))return}else if(vo.isElement(t)&&(1===(r=t.childNodes).length&&yo(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||io.isVoid(Hn.fromDom(t))))return;e.remove(t)}var i,a,s;return t}},Co={trimNode:bo},xo=Ot.makeMap,wo=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,No=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Eo=/[<>&\"\']/g,So=/([a-z0-9]+);?|&([a-z0-9]+);/gi,ko={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};fn={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},dn={"<":"<",">":">","&":"&",""":'"',"'":"'"};var To=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n1?""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":fn[e]||""+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||ln,e.replace(t?wo:No,function(e){return fn[e]||n[e]||e})},getEncodeFunc:function(e,t){return t=To(t)||ln,(e=xo(e.replace(/\+/g,","))).named&&e.numeric?function(e,n){return e.replace(n?wo:No,function(e){return fn[e]!==undefined?fn[e]:t[e]!==undefined?t[e]:e.length>1?""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":""+e.charCodeAt(0)+";"})}:e.named?t?function(e,n){return Ao.encodeNamed(e,n,t)}:Ao.encodeNamed:e.numeric?Ao.encodeNumeric:Ao.encodeRaw},decode:function(e){return e.replace(So,function(e,t){return t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):ko[t]||String.fromCharCode(t):dn[e]||ln[e]||(n=e,(r=Hn.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},_o={},Bo={},Ro=Ot.makeMap,Do=Ot.each,Oo=Ot.extend,Po=Ot.explode,Io=Ot.inArray,Lo=function(e,t){return(e=Ot.trim(e))?e.split(t||" "):[]},Mo=function(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),Do(e,function(e,r){n[r]=n[r.toUpperCase()]="map"===t?Ro(e,/[, ]/):Po(e,/[, ]/)})),n},Fo=function(e){var t,n,r,o,i,a,s,u,c,l,f,d,m,p,g,h,v,y,b,C,x,w,N,E={},S={},k={},T=[],A={},_={},B=function(t,n,r){var o=e[t];return o?o=Ro(o,/[, ]/,Ro(o.toUpperCase(),/[, ]/)):(o=_o[t])||(o=Ro(n," ",Ro(n.toUpperCase()," ")),o=Oo(o,r),_o[t]=o),o};p=(e=e||{}).schema,x={},w=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n]*>","gi")});var R=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},D=function(e){var t,n,r,o,i,a,s,u,c,l,f,d,m,p,g,h,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,x=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=Lo(e,","),S["@"]&&(h=S["@"].attributes,v=S["@"].attributesOrder),t=0,n=e.length;t1?e:"0"+e};return"#"+o(t)+o(n)+o(r)};return{toHex:function(e){return e.replace(a,d)},parse:function(t){var r,o,i,m,p,g,h,v,y={},b=e.url_converter,C=e.url_converter_scope||this,x=function(e,t,r){var o,i,a,s;if((o=y[e+"-top"+t])&&(i=y[e+"-right"+t])&&(a=y[e+"-bottom"+t])&&(s=y[e+"-left"+t])){var u=[o,i,a,s];for(n=u.length-1;n--&&u[n]===u[n+1];);n>-1&&r||(y[e+t]=-1===n?u[0]:u.join(" "),delete y[e+"-top"+t],delete y[e+"-right"+t],delete y[e+"-bottom"+t],delete y[e+"-left"+t])}},w=function(e){var t,n=y[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return y[e]=n[0],!0}},N=function(e){return m=!0,l[e]},E=function(e,t){return m&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return l[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},S=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},k=function(e){return e.replace(/\\[0-9a-f]+/gi,S)},T=function(t,n,r,o,i,a){if(i=i||a)return"'"+(i=E(i)).replace(/\'/g,"\\'")+"'";if(n=E(n||r||o),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return b&&(n=b.call(C,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,N).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,N)});r=u.exec(t);)if(u.lastIndex=r.index+r[0].length,o=r[1].replace(c,"").toLowerCase(),i=r[2].replace(c,""),o&&i){if(o=k(o),i=k(i),-1!==o.indexOf(f)||-1!==o.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(i)))continue;"font-weight"===o&&"700"===i?i="bold":"color"!==o&&"background-color"!==o||(i=i.toLowerCase()),i=(i=i.replace(a,d)).replace(s,T),y[o]=m?E(i,!0):i}x("border","",!0),x("border","-width"),x("border","-color"),x("border","-style"),x("padding",""),x("margin",""),p="border",h="border-style",v="border-color",w(g="border-width")&&w(h)&&w(v)&&(y[p]=y[g]+" "+y[h]+" "+y[v],delete y[g],delete y[h],delete y[v]),"medium none"===y.border&&delete y.border,"none"===y["border-image"]&&delete y["border-image"]}return y},serialize:function(e,t){var n,r,a,s,u,c="",l=function(t){var n,r,i,a;if(n=o[t])for(r=0,i=n.length;r0?" ":"")+t+": "+a+";")};if(t&&o)l("*"),l(t);else for(n in e)!(r=e[n])||i&&(a=n,s=t,u=void 0,(u=i["*"])&&u[a]||(u=i[s])&&u[a])||(c+=(c.length>0?" ":"")+n+": "+r+";");return c}}},Uo=Ot.each,Vo=Ot.is,Ho=Ot.grep,qo=me.ie,jo=/^([a-z0-9],?)+$/i,$o=/^[ \t\r\n]*$/,Wo=function(e,t){var n=t.attr("style");(n=e.serializeStyle(e.parseStyle(n),t[0].nodeName))||(n=null),t.attr("data-mce-style",n)},Ko=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o},Xo=function(e,t){var n,r,o,i,a,s,u=this;u.doc=e,u.win=window,u.files={},u.counter=0,u.stdMode=!qo||e.documentMode>=8,u.boxModel=!qo||"CSS1Compat"===e.compatMode||u.stdMode,u.styleSheetLoader=function(e,t){var n,r=0,o={};n=(t=t||{}).maxLoadTime||5e3;var i=function(t){e.getElementsByTagName("head")[0].appendChild(t)},a=function(t,a,s){var u,c,l,f,d=function(){for(var e=f.passed,t=e.length;t--;)e[t]();f.status=2,f.passed=[],f.failed=[]},m=function(){for(var e=f.failed,t=e.length;t--;)e[t]();f.status=3,f.passed=[],f.failed=[]},p=function(e,t){e()||((new Date).getTime()-l0)return(c=e.createElement("style")).textContent='@import "'+t+'"',h(),void i(c);g()}var v;i(u),u.href=t}else m();else d()},s=function(e){return Xr.nu(function(t){a(e,y.compose(t,y.constant(eo.value(e))),y.compose(t,y.constant(eo.error(e))))})},u=function(e){return e.fold(y.identity,y.identity)};return{load:a,loadAll:function(e,t,n){Jr(M.map(e,s)).get(function(e){var r=M.partition(e,function(e){return e.isValue()});r.fail.length>0?n(r.fail.map(u)):t(r.pass.map(u))})}}}(e),u.boundEvents=[],u.settings=t=t||{},u.schema=t.schema?t.schema:Fo({}),u.styles=zo({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),u.fixDoc(e),u.events=t.ownEvents?new Te(t.proxy):Te.Event,u.attrHooks=(r=u,a={},s=(o=t).keep_values,i={set:function(e,t,n){o.url_converter&&(t=o.url_converter.call(o.url_converter_scope||r,t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},a={style:{set:function(e,t){null===t||"object"!=typeof t?(s&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=r.serializeStyle(r.parseStyle(t),e[0].nodeName)}}},s&&(a.href=a.src=i),a),n=u.schema.getBlockElements(),u.$=Qt.overrideDefaults(function(){return{context:e,element:u.getRoot()}}),u.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!n[e.nodeName]):!!n[e]}};Xo.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){},clone:function(e,t){var n,r,o=this;return!qo||1!==e.nodeType||t?e.cloneNode(t):(r=o.doc,t?n.firstChild:(n=r.createElement(e.nodeName),Uo(o.getAttribs(e),function(t){o.setAttrib(n,t.nodeName,o.getAttrib(e,t.nodeName))}),n))},getRoot:function(){return this.settings.root_element||this.doc.body},getViewPort:function(e){var t,n;return t=(e=e||this.win).document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n;return e=this.get(e),t=this.getPos(e),n=this.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n;return e=this.get(e),t=this.getStyle(e,"width"),n=this.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,t,n,r){var o,i=this,a=[];for(e=i.get(e),r=r===undefined,n=n||("BODY"!==i.getRoot().nodeName?i.getRoot().parentNode:null),Vo(t,"string")&&(o=t,t="*"===t?function(e){return 1===e.nodeType}:function(e){return i.is(e,o)});e&&e!==n&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!r)return e;a.push(e)}e=e.parentNode}return r?a:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,(e=this.doc.getElementById(e))&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(e,t){return lt(e,this.get(t)||this.settings.root_element||this.doc,[])},is:function(e,t){var n;if(!e)return!1;if(e.length===undefined){if("*"===t)return 1===e.nodeType;if(jo.test(t)){for(t=t.toLowerCase().split(/,/),e=e.nodeName.toLowerCase(),n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}}if(e.nodeType&&1!==e.nodeType)return!1;var r=e.nodeType?[e]:e;return lt(t,r[0].ownerDocument||r[0],null,r).length>0},add:function(e,t,n,r,o){var i=this;return this.run(e,function(e){var a;return a=Vo(t,"string")?i.doc.createElement(t):t,i.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):i.setHTML(a,r)),o?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+this.encode(t[r])+'"');return void 0!==n?o+">"+n+""+e+">":o+" />"},createFragment:function(e){var t,n,r,o=this.doc;for(r=o.createElement("div"),t=o.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&Wo(this,e)},getStyle:function(e,t,n){return e=this.$$(e),n?e.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=me.ie&&me.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[t]:undefined)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&Wo(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r,o,i=this.settings;""===n&&(n=null),r=(e=this.$$(e)).attr(t),e.length&&((o=this.attrHooks[t])&&o.set?o.set(e,n,t):e.attr(t,n),r!==n&&i.onSetAttrib&&i.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){Uo(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r,o;return(e=this.$$(e)).length&&(o=(r=this.attrHooks[t])&&r.get?r.get(e,t):e.attr(t)),void 0===o&&(o=n||""),o},getPos:function(e,t){return qr(this.doc.body,this.get(e),t)},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n,r=this.doc;if(this!==Xo.DOM&&r===document){var o=Xo.DOM.addedStyles;if((o=o||[])[e])return;o[e]=!0,Xo.DOM.addedStyles=o}(n=r.getElementById("mceDefaultStyles"))||((n=r.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=r.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(r.createTextNode(e))},loadCSS:function(e){var t,n=this,r=n.doc;n===Xo.DOM||r!==document?(e||(e=""),t=r.getElementsByTagName("head")[0],Uo(e.split(","),function(e){var o;e=Ot._addCacheSuffix(e),n.files[e]||(n.files[e]=!0,o=n.create("link",{rel:"stylesheet",href:e}),qo&&r.documentMode&&r.recalc&&(o.onload=function(){r.recalc&&r.recalc(),o.onload=null}),t.appendChild(o))})):Xo.DOM.loadCSS(e)},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,n){this.$$(e).toggleClass(t,n).each(function(){""===this.className&&Qt(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"===this.$$(e).css("display")},uniqueId:function(e){return(e||"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),qo?e.each(function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="
"+t,n.removeChild(n.firstChild)}catch(r){Qt("").html("
"+t).contents().slice(1).appendTo(n)}return t}}):e.html(t)},getOuterHTML:function(e){return 1===(e=this.get(e)).nodeType&&"outerHTML"in e?e.outerHTML:Qt("").append(Qt(e).clone()).html()},setOuterHTML:function(e,t){var n=this;n.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}n.remove(Qt(this).html(t),!0)})},decode:Ao.decode,encode:Ao.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,(r=t.nextSibling)?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){return this.run(t,function(t){return Vo(t,"array")&&(e=e.cloneNode(!0)),n&&Uo(Ho(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n,r=this;return e.nodeName!==t.toUpperCase()&&(n=r.create(t),Uo(r.getAttribs(e),function(t){r.setAttrib(n,t.nodeName,r.getAttrib(e,t.nodeName))}),r.replace(n,e,1)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return this.styles.toHex(Ot.trim(e))},run:function(e,t,n){var r,o=this;return"string"==typeof e&&(e=o.get(e)),!!e&&(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(r=[],Uo(e,function(e,i){e&&("string"==typeof e&&(e=o.get(e)),r.push(t.call(n,e,i)))}),r))},getAttribs:function(e){var t;return(e=this.get(e))?qo?(t=[],"OBJECT"===e.nodeName?e.attributes:("OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"}),e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t)):e.attributes:[]},isEmpty:function(e,t){var n,r,o,i,a,s,u=0;if(e=e.firstChild){a=new to(e,e.parentNode),t=t||(this.schema?this.schema.getNonEmptyElements():null),i=this.schema?this.schema.getWhiteSpaceElements():{};do{if(1===(o=e.nodeType)){var c=e.getAttribute("data-mce-bogus");if(c){e=a.next("all"===c);continue}if(s=e.nodeName.toLowerCase(),t&&t[s]){if("br"===s){u++,e=a.next();continue}return!1}for(n=(r=this.getAttribs(e)).length;n--;)if("name"===(s=r[n].nodeName)||"data-mce-bookmark"===s)return!1}if(8===o)return!1;if(3===o&&!$o.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&i[e.parentNode.nodeName]&&$o.test(e.nodeValue))return!1;e=a.next()}while(e)}return u<=1},createRng:function(){return this.doc.createRange()},nodeIndex:Ko,split:function(e,t,n){var r,o,i,a=this.createRng();if(e&&t)return a.setStart(e.parentNode,this.nodeIndex(e)),a.setEnd(t.parentNode,this.nodeIndex(t)),r=a.extractContents(),(a=this.createRng()).setStart(t.parentNode,this.nodeIndex(t)+1),a.setEnd(e.parentNode,this.nodeIndex(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Co.trimNode(this,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Co.trimNode(this,o),e),this.remove(e),n||t},bind:function(e,t,n,r){if(Ot.isArray(e)){for(var o=e.length;o--;)e[o]=this.bind(e[o],t,n,r);return e}return!this.settings.collect||e!==this.doc&&e!==this.win||this.boundEvents.push([e,t,n,r]),this.events.bind(e,t,n,r||this)},unbind:function(e,t,n){var r;if(Ot.isArray(e)){for(r=e.length;r--;)e[r]=this.unbind(e[r],t,n);return e}if(this.boundEvents&&(e===this.doc||e===this.win))for(r=this.boundEvents.length;r--;){var o=this.boundEvents[r];e!==o[0]||t&&t!==o[1]||n&&n!==o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1===e.nodeType?(t=e.getAttribute("data-mce-contenteditable"))&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null:null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&null===(n=this.getContentEditable(e));e=e.parentNode);return n},destroy:function(){if(this.boundEvents){for(var e=this.boundEvents.length;e--;){var t=this.boundEvents[e];this.events.unbind(t[0],t[1],t[2])}this.boundEvents=null}lt.setDocument&<.setDocument(),this.win=this.doc=this.root=this.events=this.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,o=t;if(e)for("string"==typeof o&&(o=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(o(e))return e;return null}},Xo.DOM=new Xo(document),Xo.nodeIndex=Ko;var Yo=Xo.DOM,Go=Ot.each,Jo=Ot.grep,Qo=function(e){return"function"==typeof e},Zo=function(){var e={},t=[],n={},r=[],o=0;this.isDone=function(t){return 2===e[t]},this.markDone=function(t){e[t]=2},this.add=this.load=function(r,o,i,a){e[r]===undefined&&(t.push(r),e[r]=0),o&&(n[r]||(n[r]=[]),n[r].push({success:o,failure:a,scope:i||this}))},this.remove=function(t){delete e[t],delete n[t]},this.loadQueue=function(e,n,r){this.loadScripts(t,e,n,r)},this.loadScripts=function(t,i,a,s){var u,c=[],l=function(e,t){Go(n[t],function(t){Qo(t[e])&&t[e].call(t.scope)}),n[t]=undefined};r.push({success:i,failure:s,scope:a||this}),(u=function(){var n=Jo(t);if(t.length=0,Go(n,function(t){var n,r,i,a,s,f,d;2!==e[t]?3!==e[t]?1!==e[t]&&(e[t]=1,o++,n=t,r=function(){e[t]=2,o--,l("success",t),u()},i=function(){e[t]=3,o--,c.push(t),l("failure",t),u()},d=function(){f.remove(s),a&&(a.onreadystatechange=a.onload=a=null),r()},s=(f=Yo).uniqueId(),(a=document.createElement("script")).id=s,a.type="text/javascript",a.src=Ot._addCacheSuffix(n),"onreadystatechange"in a?a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&d()}:a.onload=d,a.onerror=function(){Qo(i)?i():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+n)},(document.getElementsByTagName("head")[0]||document.body).appendChild(a)):l("failure",t):l("success",t)}),!o){var i=r.slice(0);r.length=0,Go(i,function(e){0===c.length?Qo(e.success)&&e.success.call(e.scope):Qo(e.failure)&&e.failure.call(e.scope,c)})}})()}};Zo.ScriptLoader=new Zo;var ei=Ot.each,ti=function(){this.items=[],this.urls={},this.lookup={},this._listeners=[]};ti.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:undefined},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(e,t){var n=ti.language;if(n&&!1!==ti.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;Zo.ScriptLoader.add(this.urls[e]+"/langs/"+n+".js")}},add:function(e,t,n){this.items.push(t),this.lookup[e]={instance:t,dependencies:n};var r=M.partition(this._listeners,function(t){return t.name===e});return this._listeners=r.fail,ei(r.pass,function(e){e.callback()}),t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(e,t){var n=this.urls[e];ei(t,function(e){Zo.ScriptLoader.add(n+"/"+e)})},load:function(e,t,n,r,o){var i=this,a=t,s=function(){var o=i.dependencies(e);ei(o,function(e){var n=i.createUrl(t,e);i.load(n.resource,n,undefined,undefined)}),n&&(r?n.call(r):n.call(Zo))};i.urls[e]||("object"==typeof t&&(a=t.prefix+t.resource+t.suffix),0!==a.indexOf("/")&&-1===a.indexOf("://")&&(a=ti.baseURL+"/"+a),i.urls[e]=a.substring(0,a.lastIndexOf("/")),i.lookup[e]?s():Zo.ScriptLoader.add(a,s,r,o))},waitFor:function(e,t){this.lookup.hasOwnProperty(e)?t():this._listeners.push({name:e,callback:t})}},ti.PluginManager=new ti,ti.ThemeManager=new ti;var ni="\ufeff",ri=function(e){return e===ni},oi=ni,ii=function(e){return e.replace(new RegExp(ni,"g"),"")},ai=vo.isElement,si=vo.isText,ui=function(e){return si(e)&&(e=e.parentNode),ai(e)&&e.hasAttribute("data-mce-caret")},ci=function(e){return si(e)&&ri(e.data)},li=function(e){return ui(e)||ci(e)},fi=function(e){return si(e)&&e.data[0]===oi},di=function(e){return si(e)&&e.data[e.data.length-1]===oi},mi={isCaretContainer:li,isCaretContainerBlock:ui,isCaretContainerInline:ci,showCaretContainerBlock:function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],vo.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},insertInline:function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(oi),o=e.parentNode,t){if(n=e.previousSibling,si(n)){if(li(n))return n;if(di(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,si(n)){if(li(n))return n;if(fi(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r},prependInline:function(e){if(vo.isText(e)){var t=e.data;return t.length>0&&t.charAt(0)!==oi&&e.insertData(0,oi),e}return null},appendInline:function(e){if(vo.isText(e)){var t=e.data;return t.length>0&&t.charAt(t.length-1)!==oi&&e.insertData(t.length,oi),e}return null},isBeforeInline:function(e){return e&&vo.isText(e.container())&&e.container().data.charAt(e.offset())===oi},isAfterInline:function(e){return e&&vo.isText(e.container())&&e.container().data.charAt(e.offset()-1)===oi},insertBlock:function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},hasContent:function(e){return e.firstChild!==e.lastChild||!vo.isBr(e.firstChild)},startsWithCaretContainer:fi,endsWithCaretContainer:di},pi=vo.isContentEditableTrue,gi=vo.isContentEditableFalse,hi=vo.isBr,vi=vo.isText,yi=vo.matchNodeNames("script style textarea"),bi=vo.matchNodeNames("img input textarea hr iframe video audio object"),Ci=vo.matchNodeNames("table"),xi=mi.isCaretContainer,wi=function(e){return!xi(e)&&(vi(e)?!yi(e.parentNode):bi(e)||hi(e)||Ci(e)||gi(e))},Ni=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(gi(e))return!1;if(pi(e))return!0}return!0},Ei=wi,Si=function(e){return bi(e)||!!gi(t=e)&&!0!==At.reduce(t.getElementsByTagName("*"),function(e,t){return e||pi(t)},!1);var t},ki=function(e,t){return wi(e)&&Ni(e,t)},Ti=Math.round,Ai=function(e){return e?{left:Ti(e.left),top:Ti(e.top),bottom:Ti(e.bottom),right:Ti(e.right),width:Ti(e.width),height:Ti(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},_i=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},Bi=function(e,t){return e.bottom-e.height/2t.bottom)&&_i(t.top-e.bottom,e,t)},Ri=function(e,t){return e.top>t.bottom||!(e.bottom=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Fi=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},zi=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},Ui=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),Vi=function(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&Ui.test(e)},Hi=[].slice,qi=function(e){for(var t=[],n=1;n=e.length?e.apply(this,r.slice(1)):function(){var e=r.concat([].slice.call(arguments));return qi.apply(this,e)}},ji={constant:function(e){return function(){return e}},negate:function(e){return function(t){return!e(t)}},and:function(){for(var e=[],t=0;t0?Di(n[0]):Di(e.getBoundingClientRect()),Qi(e)&&0===t.left?(i=(r=e).ownerDocument,a=ta(i),s=i.createTextNode("\xa0"),(u=r.parentNode).insertBefore(s,r),a.setStart(s,0),a.setEnd(s,1),o=Di(a.getBoundingClientRect()),u.removeChild(s),o):t},i=function(e,t){return(e=Oi(e,t)).width=1,e.right=e.left+1,e},a=function(e){0!==e.height&&(r.length>0&&Pi(e,r[r.length-1])||r.push(e))},s=function(e,t){var n=ta(e.ownerDocument);if(t0&&(n.setStart(e,t-1),n.setEnd(e,t),ra(n)||a(i(o(n),!1))),t0},isAtStart:function(){return Ji(e),0===t},isAtEnd:function(){return Ji(e)?t>=e.data.length:t>=e.childNodes.length},isEqual:function(n){return n&&e===n.container()&&t===n.offset()},getNode:function(n){return ea(e,n?t-1:t)}}};ia.fromRangeStart=function(e){return new ia(e.startContainer,e.startOffset)},ia.fromRangeEnd=function(e){return new ia(e.endContainer,e.endOffset)},ia.after=function(e){return new ia(e.parentNode,Zi(e)+1)},ia.before=function(e){return new ia(e.parentNode,Zi(e))},ia.isAtStart=function(e){return!!e&&e.isAtStart()},ia.isAtEnd=function(e){return!!e&&e.isAtEnd()},ia.isTextPosition=function(e){return!!e&&vo.isText(e.container())};var aa,sa,ua,ca,la,fa=vo.isContentEditableTrue,da=vo.isContentEditableFalse,ma=vo.matchStyleValues("display","block table table-cell table-caption list-item"),pa=mi.isCaretContainer,ga=mi.isCaretContainerBlock,ha=ji.curry,va=vo.isElement,ya=Ei,ba=function(e){return e>0},Ca=function(e){return e<0},xa=function(e,t){for(var n;n=e(t);)if(!ga(n))return n;return null},wa=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode)if(fa(e))return e;return t},Na=function(e,t){for(;e&&e!==t;){if(ma(e))return e;e=e.parentNode}return null},Ea=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Sa=function(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],pa(r)&&(r=r[o]),da(r)){if(a=n,Na(r,i=t)===Na(a,i))return r;break}if(ya(r))break;n=n.parentNode}return null},ka=ha(Ea,!0),Ta=ha(Ea,!1),Aa=function(e,t){return da((n=e,(r=t)?(o=r.container(),i=r.offset(),va(o)?o.childNodes[i+n]:null):null));var n,r,o,i},_a={isForwards:ba,isBackwards:Ca,findNode:function(e,t,n,r,o){var i=new to(e,r);if(Ca(t)){if((da(e)||ga(e))&&n(e=xa(i.prev,!0)))return e;for(;e=xa(i.prev,o);)if(n(e))return e}if(ba(t)){if((da(e)||ga(e))&&n(e=xa(i.next,!0)))return e;for(;e=xa(i.next,o);)if(n(e))return e}return null},getEditingHost:wa,getParentBlock:Na,isInSameBlock:function(e,t,n){return Na(e.container(),n)===Na(t.container(),n)},isInSameEditingHost:function(e,t,n){return wa(e.container(),n)===wa(t.container(),n)},isBeforeContentEditableFalse:ha(Aa,0),isAfterContentEditableFalse:ha(Aa,-1),normalizeRange:function(e,t,n){var r,o,i,a,s=ha(Sa,!0,t),u=ha(Sa,!1,t);if(o=n.startContainer,i=n.startOffset,mi.isCaretContainerBlock(o)){if(va(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,da(r)))return ka(r);if("after"===a&&(r=o.previousSibling,da(r)))return Ta(r)}if(!n.collapsed)return n;if(vo.isText(o)){if(pa(o)){if(1===e){if(r=u(o))return ka(r);if(r=s(o))return Ta(r)}if(-1===e){if(r=s(o))return Ta(r);if(r=u(o))return ka(r)}return n}if(mi.endsWithCaretContainer(o)&&i>=o.data.length-1)return 1===e&&(r=u(o))?ka(r):n;if(mi.startsWithCaretContainer(o)&&i<=1)return-1===e&&(r=s(o))?Ta(r):n;if(i===o.data.length)return(r=u(o))?ka(r):n;if(0===i)return(r=s(o))?Ta(r):n}return n}},Ba=vo.isContentEditableFalse,Ra=vo.isText,Da=vo.isElement,Oa=vo.isBr,Pa=_a.isForwards,Ia=_a.isBackwards,La=Ei,Ma=Si,Fa=ki,za=function(e,t){return e.hasChildNodes()&&t0)return ia(r,--o);if(Pa(e)&&o0&&(a=za(r,o-1),La(a)))return!Ma(a)&&(s=_a.findNode(a,e,Fa,a))?Ra(s)?ia(s,s.data.length):ia.after(s):Ra(a)?ia(a,a.data.length):ia.before(a);if(Pa(e)&&o0&&(!(t=e[e.length-1]).firstChild||ja(t))?e.slice(0,-1):e;var t},Wa=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Ka=function(e,t){var n=ia.after(e),r=Ha(t).prev(n);return r?r.toRange():null},Xa=function(e,t,n){var r,o,i,a,s=e.parentNode;return Ot.each(t,function(t){s.insertBefore(t,e)}),r=e,o=n,i=ia.before(r),(a=Ha(o).next(i))?a.toRange():null},Ya=function(e,t){var n,r,o,i,a,s,u=t.firstChild,c=t.lastChild;return u&&"meta"===u.name&&(u=u.next),c&&"mce_marker"===c.attr("id")&&(c=c.prev),r=c,s=(n=e).getNonEmptyElements(),r&&(r.isEmpty(s)||(o=r,n.getBlockElements()[o.name]&&(a=o).firstChild&&a.firstChild===a.lastChild&&("br"===(i=o.firstChild).name||"\xa0"===i.value)))&&(c=c.prev),!(!u||u!==c||"ul"!==u.name&&"ol"!==u.name)},Ga=function(e,t,n,r){var o,i,a,s,u,c,l,f,d,m,p,g,h,v,y,b,C,x,w,N=(o=t,i=r,c=e.serialize(i),l=o.createFragment(c),s=(a=l).firstChild,u=a.lastChild,s&&"META"===s.nodeName&&s.parentNode.removeChild(s),u&&"mce_marker"===u.id&&u.parentNode.removeChild(u),a),E=Wa(t,n.startContainer),S=$a(qa(N.firstChild)),k=t.getRoot(),T=function(e){var r=ia.fromRangeStart(n),o=Ha(t.getRoot()),i=1===e?o.prev(r):o.next(r);return!i||Wa(t,i.getNode())!==E};return T(1)?Xa(E,S,k):T(2)?(f=E,d=S,m=k,t.insertAfter(d.reverse(),f),Ka(d[0],m)):(g=S,h=k,v=p=E,b=(y=n).cloneRange(),C=y.cloneRange(),b.setStartBefore(v),C.setEndAfter(v),x=[b.cloneContents(),C.cloneContents()],(w=p.parentNode).insertBefore(x[0],p),Ot.each(g,function(e){w.insertBefore(e,p)}),w.insertBefore(x[1],p),w.removeChild(p),Ka(g[g.length-1],h))},Ja=function(e,t){return!!Wa(e,t)},Qa=vo.isText,Za=vo.isBogus,es=Xo.nodeIndex,ts=function(e){var t=e.parentNode;return Za(t)?ts(t):t},ns=function(e){return e?At.reduce(e.childNodes,function(e,t){return Za(t)&&"BR"!==t.nodeName?e=e.concat(ns(t)):e.push(t),e},[]):[]},rs=function(e){return function(t){return e===t}},os=function(e){var t,n,r,o;return(Qa(e)?"text()":e.nodeName.toLowerCase())+"["+(n=ns(ts(t=e)),r=At.findIndex(n,rs(t),t),n=n.slice(0,r+1),o=At.reduce(n,function(e,t,r){return Qa(t)&&Qa(n[r-1])&&e++,e},0),n=At.filter(n,vo.matchNodeNames(t.nodeName)),(r=At.findIndex(n,rs(t),t))-o)+"]"},is=function(e,t){var n,r,o,i,a,s=[];return n=t.container(),r=t.offset(),Qa(n)?o=function(e,t){for(;(e=e.previousSibling)&&Qa(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),s.push(os(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=At.filter(a,ji.negate(vo.isBogus)),(s=s.concat(At.map(a,function(e){return os(e)}))).reverse().join("/")+","+o},as=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=n.length>1?n[1]:"before",(r=At.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=ns(n),i=At.filter(i,function(e,t){return!Qa(e)||!Qa(i[t-1])}),(i=At.filter(i,vo.matchNodeNames(r)))[o]):null;var n,r,o,i},e))?Qa(r)?function(e,t){for(var n,r=e,o=0;Qa(r);){if(n=r.data.length,t>=o&&t<=o+n){e=r,t-=o;break}if(!Qa(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return t>e.data.length&&(t=e.data.length),new ia(e,t)}(r,parseInt(o,10)):(o="after"===o?es(r)+1:es(r),new ia(r.parentNode,o)):null):null},ss=vo.isContentEditableFalse,us=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],s=r[o?"startOffset":"endOffset"],u=[],c=0,l=e.getRoot();for(vo.isText(a)?u.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&vo.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,s):s):(s>=(i=a.childNodes).length&&i.length&&(c=1,s=Math.max(0,i.length-1)),u.push(e.nodeIndex(i[s],n)+c));a&&a!==l;a=a.parentNode)u.push(e.nodeIndex(a,n));return u},cs=function(e){vo.isText(e)&&0===e.data.length&&e.parentNode.removeChild(e)},ls=function(e,t,n){var r=0;return Ot.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},fs=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],vo.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},ds=function(e){return fs(e,!0),fs(e,!1),e},ms=function(e,t){var n;if(vo.isElement(e)&&(e=zi(e,t),ss(e)))return e;if(mi.isCaretContainer(e)){if(vo.isText(e)&&mi.isCaretContainerBlock(e)&&(e=e.parentNode),n=e.previousSibling,ss(n))return n;if(n=e.nextSibling,ss(n))return n}},ps=function(e,t,n){var r,o,i,a,s,u,c,l=n.getNode(),f=l?l.nodeName:null,d=n.getRng();return ss(l)||"IMG"===f?{name:f,index:ls(n.dom,f,l)}:(l=ms((r=d).startContainer,r.startOffset)||ms(r.endContainer,r.endOffset))?{name:f=l.tagName,index:ls(n.dom,f,l)}:(o=e,a=t,s=d,u=(i=n).dom,(c={}).start=us(u,o,a,s,!0),i.isCollapsed()||(c.end=us(u,o,a,s,!1)),c)},gs={getBookmark:function(e,t,n){return 2===t?ps(ii,n,e):3===t?(o=(r=e).getRng(),{start:is(r.dom.getRoot(),ia.fromRangeStart(o)),end:is(r.dom.getRoot(),ia.fromRangeEnd(o))}):t?{rng:e.getRng()}:function(e){var t=e.dom,n=e.getRng(),r=t.uniqueId(),o=e.isCollapsed(),i="overflow:hidden;line-height:0px",a=e.getNode(),s=a.nodeName;if("IMG"===s)return{name:s,index:ls(t,s,a)};var u=ds(n.cloneRange());if(!o){u.collapse(!1);var c=t.create("span",{"data-mce-type":"bookmark",id:r+"_end",style:i},"");u.insertNode(c),cs(c.nextSibling)}(n=ds(n)).collapse(!0);var l=t.create("span",{"data-mce-type":"bookmark",id:r+"_start",style:i},"");return n.insertNode(l),cs(l.previousSibling),e.moveToBookmark({id:r,keep:1}),{id:r}}(e);var r,o},getUndoBookmark:y.curry(ps,y.identity,!0)},hs=function(e,t){for(var n=[],r=0;r'),t},ys=function(e,t,n,r){var o,i,a,s,u=n[t?"start":"end"],c=e.getRoot();if(u){for(a=u[0],i=c,o=u.length-1;o>=1;o--){if(s=i.childNodes,u[o]>s.length-1)return;i=s[u[o]]}3===i.nodeType&&(a=Math.min(u[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(u[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},bs=function(e,t,n){var r,o,i,a,s,u,c=e.get(n.id+"_"+t),l=n.keep;if(c){if(r=c.parentNode,l?(r=c.firstChild,o=1):o=e.nodeIndex(c),s=r,u=o,!l){for(a=c.previousSibling,i=c.nextSibling,Ot.each(Ot.grep(c.childNodes),function(e){vo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=e.get(n.id+"_"+t);)e.remove(c,1);a&&i&&a.nodeType===i.nodeType&&vo.isText(a)&&!me.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=a,u=o)}return E.some(ia(s,u))}return E.none()},Cs=function(e,t){var n,r,o,i,a,s,u,c,l,f,d,m,p,g,h,v=e.dom;if(t){if(Ot.isArray(t.start))return g=t,h=(p=v).createRng(),ys(p,!0,g,h)&&ys(p,!1,g,h)?E.some(h):E.none();if("string"==typeof t.start)return E.some((f=t,d=(l=v).createRng(),m=as(l.getRoot(),f.start),d.setStart(m.container(),m.offset()),m=as(l.getRoot(),f.end),d.setEnd(m.container(),m.offset()),d));if(t.id)return u=bs(o=v,"start",i=t),c=bs(o,"end",i),hs([u,(a=c,s=u,a.isSome()?a:s)],function(e,t){var n=o.createRng();return n.setStart(vs(o,e.container()),e.offset()),n.setEnd(vs(o,t.container()),t.offset()),n});if(t.name)return n=v,r=t,E.from(n.select(r.name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(t.rng)return E.some(t.rng)}return E.none()},xs={getBookmark:function(e,t,n){return gs.getBookmark(e,t,n)},moveToBookmark:function(e,t){Cs(e,t).each(function(t){e.setRng(t)})},isBookmarkNode:function(e){return vo.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")}},ws=Ot.each,Ns=function(e){this.compare=function(t,n){if(t.nodeName!==n.nodeName)return!1;var r=function(t){var n={};return ws(e.getAttribs(t),function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=e.getAttrib(t,o))}),n},o=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!(!o(r(t),r(n))||!o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))||xs.isBookmarkNode(t)||xs.isBookmarkNode(n))}},Es=function(e,t){Ur.parent(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})},Ss=function(e,t){e.dom().appendChild(t.dom())},ks={before:Es,after:function(e,t){Ur.nextSibling(e).fold(function(){Ur.parent(e).each(function(e){Ss(e,t)})},function(e){Es(e,t)})},prepend:function(e,t){Ur.firstChild(e).fold(function(){Ss(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},append:Ss,appendAt:function(e,t,n){Ur.child(e,n).fold(function(){Ss(e,t)},function(e){Es(e,t)})},wrap:function(e,t){Es(e,t),Ss(t,e)}},Ts=function(e,t){M.each(t,function(t){ks.before(e,t)})},As=function(e,t){M.each(t,function(t){ks.append(e,t)})},_s=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Bs={empty:function(e){e.dom().textContent="",M.each(Ur.children(e),function(e){_s(e)})},remove:_s,unwrap:function(e){var t=Ur.children(e);t.length>0&&Ts(e,t),_s(e)}},Rs=(aa=Zn.isText,sa="text",ua=function(e){return aa(e)?E.from(e.dom().nodeValue):E.none()},ca=Un.detect().browser,{get:function(e){if(!aa(e))throw new Error("Can only get "+sa+" value of a "+sa+" node");return la(e).getOr("")},getOption:la=ca.isIE()&&10===ca.version.major?function(e){try{return ua(e)}catch(yC){return E.none()}}:ua,set:function(e,t){if(!aa(e))throw new Error("Can only set raw "+sa+" value of a "+sa+" node");e.dom().nodeValue=t}}),Ds=function(e){return Rs.get(e)},Os=function(e,t){return _r.all(t,e)},Ps=function(e){var t=Os(e,"br"),n=M.filter(function(e){for(var t=[],n=e.dom();n;)t.push(Hn.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),io.isBr);t.length===n.length&&M.each(n,Bs.remove)},Is=function(e){Bs.empty(e),ks.append(e,Hn.fromHtml('
'))},Ls=function(e){Ur.lastChild(e).each(function(t){Ur.prevSibling(t).each(function(n){io.isBlock(e)&&io.isBr(t)&&io.isBlock(n)&&Bs.remove(t)})})},Ms=Ot.makeMap,Fs=function(e){var t,n,r,o,i,a=[];return t=(e=e||{}).indent,n=Ms(e.indent_before||""),r=Ms(e.indent_after||""),o=Ao.getEncodeFunc(e.entity_encoding||"raw",e.entities),i="html"===e.element_format,{start:function(e,s,u){var c,l,f,d;if(t&&n[e]&&a.length>0&&(d=a[a.length-1]).length>0&&"\n"!==d&&a.push("\n"),a.push("<",e),s)for(c=0,l=s.length;c":" />",u&&t&&r[e]&&a.length>0&&(d=a[a.length-1]).length>0&&"\n"!==d&&a.push("\n")},end:function(e){var n;a.push("",e,">"),t&&r[e]&&a.length>0&&(n=a[a.length-1]).length>0&&"\n"!==n&&a.push("\n")},text:function(e,t){e.length>0&&(a[a.length]=t?e:o(e))},cdata:function(e){a.push("")},comment:function(e){a.push("\x3c!--",e,"--\x3e")},pi:function(e,n){n?a.push("",e," ",o(n),"?>"):a.push("",e,"?>"),t&&a.push("\n")},doctype:function(e){a.push("",t?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}},zs=function(e,t){var n={},r=Fs(e);return(e=e||{}).validate=!("validate"in e)||e.validate,n.schema=t=t||Fo(),n.writer=r,n.serialize=function(n){var o,i;i=e.validate,o={3:function(e){r.text(e.value,e.raw)},8:function(e){r.comment(e.value)},7:function(e){r.pi(e.name,e.value)},10:function(e){r.doctype(e.value)},4:function(e){r.cdata(e.value)},11:function(e){if(e=e.firstChild)do{a(e)}while(e=e.next)}},r.reset();var a=function(e){var n,s,u,c,l,f,d,m,p,g=o[e.type];if(g)g(e);else{if(n=e.name,s=e.shortEnded,u=e.attributes,i&&u&&u.length>1&&((f=[]).map={},p=t.getElementRule(e.name))){for(d=0,m=p.attributesOrder.length;d0?e=e.replace(/^ /," "):o("previousSibling")||(e=e.replace(/^ /," ")),r|)$/," "):o("nextSibling")||(e=e.replace(/( | )(
|)$/," "))),e}(t)),r=e.parser,p=n.merge,o=zs({validate:e.settings.validate},e.schema),m='',u={content:t,format:"html",selection:!0,paste:n.paste},(u=e.fire("BeforeSetContent",u)).isDefaultPrevented())e.fire("SetContent",{content:u.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=u.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,m);var y,b,C,x,w=(l=h.getRng()).startContainer||(l.parentElement?l.parentElement():null),N=e.getBody();w===N&&h.isCollapsed()&&v.isBlock(N.firstChild)&&(y=N.firstChild)&&!e.schema.getShortEndedElements()[y.nodeName]&&v.isEmpty(N.firstChild)&&((l=v.createRng()).setStart(N.firstChild,0),l.setEnd(N.firstChild,0),h.setRng(l)),h.isCollapsed()||(e.selection.setRng(Xs(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),C=(b=h.getRng()).startContainer,x=b.startOffset,3===C.nodeType&&b.collapsed&&("\xa0"===C.data[x]?(C.deleteData(x,1),/[\u00a0| ]$/.test(t)||(t+=" ")):"\xa0"===C.data[x-1]&&(C.deleteData(x-1,1),/[\u00a0| ]$/.test(t)||(t=" "+t))));var S,k,T,A={context:(i=h.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(s=r.parse(t,A),!0===n.paste&&Ya(e.schema,s)&&Ja(v,i))return l=Ga(o,v,e.selection.getRng(!0),s),e.selection.setRng(l),void e.fire("SetContent",u);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(s),"mce_marker"===(f=s.lastChild).attr("id"))for(c=f,f=f.prev;f;f=f.walk(!0))if(3===f.type||!v.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),A.invalid){for(h.setContent(m),i=h.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)i=f,f=f.parentNode;t=i===a?a.innerHTML:v.getOuterHTML(i),t=o.serialize(r.parse(t.replace(//i,function(){return o.serialize(s)}))),i===a?v.setHTML(a,t):v.setOuterHTML(i,t)}else t=o.serialize(s),function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}}(e,t,i);!function(){if(p){var t=e.getBody(),n=new Ns(v);Ot.each(v.select("*[data-mce-fragment]"),function(e){for(var r=e.parentNode;r&&r!==t;r=r.parentNode)g[e.nodeName.toLowerCase()]&&n.compare(r,e)&&v.remove(e,!0)})}}(),function(t){var n,r,o;if(t){if(h.scrollIntoView(t),n=function(t){for(var n=e.getBody();t&&t!==n;t=t.parentNode)if("false"===e.dom.getContentEditable(t))return t;return null}(t))return v.remove(t),void h.select(n);l=v.createRng(),(f=t.previousSibling)&&3===f.nodeType?(l.setStart(f,f.nodeValue.length),me.ie||(d=t.nextSibling)&&3===d.nodeType&&(f.appendData(d.data),d.parentNode.removeChild(d))):(l.setStartBefore(t),l.setEndBefore(t)),r=v.getParent(t,v.isBlock),v.remove(t),r&&v.isEmpty(r)&&(e.$(r).empty(),l.setStart(r,0),l.setEnd(r,0),Ys(r)||r.getAttribute("data-mce-fragment")||!(o=function(t){var n=ia.fromRangeStart(t);if(n=Ha(e.getBody()).next(n))return n.toRange()}(l))?v.add(r,v.create("br",{"data-mce-bogus":"1"})):(l=o,v.remove(r))),h.setRng(l)}}(v.get("mce_marker")),S=e.getBody(),Ot.each(S.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),k=e.dom,T=e.selection.getStart(),E.from(k.getParent(T,"td,th")).map(Hn.fromDom).each(Ls),e.fire("SetContent",u),e.addVisual()}},Js=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Ot.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};Gs(e,o.content,o.details)},Qs=function(e,t,n,r,o){return e(n,r)?E.some(n):tr.isFunction(o)&&o(n)?E.none():t(n,r,o)},Zs=function(e,t,n){for(var r=e.dom(),o=tr.isFunction(n)?n:y.constant(!1);r.parentNode;){r=r.parentNode;var i=Hn.fromDom(r);if(t(i))return E.some(i);if(o(i))break}return E.none()},eu=function(e,t){return M.find(e.dom().childNodes,y.compose(t,Hn.fromDom)).map(Hn.fromDom)},tu=function(e,t){var n=function(e){for(var r=0;r0})},uu=function(e,t){return e.sections().hasOwnProperty(t)},cu=function(e,t,n,r){var o,i,a=su(n.forced_plugins),s=su(r.plugins),u=e&&uu(t,"mobile")?(o=s,M.filter(o,y.curry(M.contains,iu))):s,c=(i=u,[].concat(su(a)).concat(su(i)));return Ot.extend(r,{plugins:c.join(" ")})},lu=function(e,t,n,r){var o,i,a,s,u,c,l,f,d,m,p,g,h,v=(o=["mobile"],i=r,a=sr.bifilter(i,function(e,t){return M.contains(o,t)}),ru(a.t,a.f)),y=Ot.extend(t,n,v.settings(),(p=e,h=(g=v).settings().inline,p&&uu(g,"mobile")&&!h?(l="mobile",f=au,d=v.sections(),m=d.hasOwnProperty(l)?d[l]:{},Ot.extend({},f,m)):{}),{validate:!0,content_editable:v.settings().inline,external_plugins:(s=n,u=v.settings(),c=u.external_plugins?u.external_plugins:{},s&&s.external_plugins?Ot.extend({},s.external_plugins,c):c)});return cu(e,v,n,y)},fu=function(e,t,n){return E.from(t.settings[n]).filter(e)},du=y.curry(fu,tr.isString),mu=function(e,t,n,r){var o,i,a=t in e.settings?e.settings[t]:n;return"hash"===r?(i={},"string"==typeof(o=a)?M.each(o.indexOf("=")>0?o.split(/[;,](?![^=;,]*(?:[;,]|$))/):o.split(","),function(e){(e=e.split("=")).length>1?i[Ot.trim(e[0])]=Ot.trim(e[1]):i[Ot.trim(e[0])]=Ot.trim(e)}):i=o,i):"string"===r?fu(tr.isString,e,t).getOr(n):"number"===r?fu(tr.isNumber,e,t).getOr(n):"boolean"===r?fu(tr.isBoolean,e,t).getOr(n):"object"===r?fu(tr.isObject,e,t).getOr(n):"array"===r?fu(tr.isArray,e,t).getOr(n):"function"===r?fu(tr.isFunction,e,t).getOr(n):a},pu=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,gu=function(e){return pu.test(e)},hu=function(e,t){var n=t.container(),r=t.offset();return e?mi.isCaretContainerInline(n)?vo.isText(n.nextSibling)?new ia(n.nextSibling,0):ia.after(n):mi.isBeforeInline(t)?new ia(n,r+1):t:mi.isCaretContainerInline(n)?vo.isText(n.previousSibling)?new ia(n.previousSibling,n.previousSibling.data.length):ia.before(n):mi.isAfterInline(t)?new ia(n,r-1):t},vu={isInlineTarget:function(e,t){var n=du(e,"inline_boundaries_selector").getOr("a[href],code");return _r.is(Hn.fromDom(t),n)},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,M.filter(Xo.DOM.getParents(i.container(),"*",o),r));return E.from(a[a.length-1])},isRtl:function(e){return"rtl"===Xo.DOM.getStyle(e,"direction",!0)||gu(e.textContent)},isAtZwsp:function(e){return mi.isBeforeInline(e)||mi.isAfterInline(e)},normalizePosition:hu,normalizeForwards:y.curry(hu,!0),normalizeBackwards:y.curry(hu,!1),hasSameParentBlock:function(e,t,n){var r=_a.getParentBlock(t,e),o=_a.getParentBlock(n,e);return r&&r===o}},yu=function(e,t){return Dr.contains(e,t)?nu.closest(t,function(e){return io.isTextBlock(e)||io.isListItem(e)},(n=e,function(e){return Dr.eq(n,Hn.fromDom(e.dom().parentNode))})):E.none();var n},bu=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},Cu=function(e,t,n){return hs([Ws.firstPositionIn(n),Ws.lastPositionIn(n)],function(r,o){var i=vu.normalizePosition(!0,r),a=vu.normalizePosition(!1,o),s=vu.normalizePosition(!1,t);return e?Ws.nextPosition(n,s).map(function(e){return e.isEqual(a)&&t.isEqual(i)}).getOr(!1):Ws.prevPosition(n,s).map(function(e){return e.isEqual(i)&&t.isEqual(a)}).getOr(!1)}).getOr(!0)},xu=function(e,t,n){return nu.ancestor(e,function(e){return _r.is(e,t)},n)},wu=xu,Nu=function(e,t){return _r.one(t,e)},Eu=function(e,t,n){return Qs(_r.is,xu,e,t,n)},Su=function(e,t,n){return wu(e,t,n).isSome()},ku=function(e,t){return vo.isText(t)&&/^[ \t\r\n]*$/.test(t.data)&&!1===(n=e,r=t,o=Hn.fromDom(n),i=Hn.fromDom(r),Su(i,"pre,code",y.curry(Dr.eq,o)));var n,r,o,i},Tu=function(e,t){return Ei(t)&&!1===ku(e,t)||(n=t,vo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||Au(t);var n},Au=vo.hasAttribute("data-mce-bookmark"),_u=vo.hasAttribute("data-mce-bogus"),Bu=vo.hasAttributeValue("data-mce-bogus","all"),Ru=function(e){return function(e){var t,n,r=0;if(Tu(e,e))return!1;if(!(n=e.firstChild))return!0;t=new to(n,e);do{if(Bu(n))n=t.next(!0);else if(_u(n))n=t.next();else if(vo.isBr(n))r++,n=t.next();else{if(Tu(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},Du=xr("block","position"),Ou=xr("from","to"),Pu=function(e,t){var n=Hn.fromDom(e),r=Hn.fromDom(t.container());return yu(n,r).map(function(e){return Du(e,t)})},Iu=function(e,t,n){var r=Pu(e,ia.fromRangeStart(n)),o=r.bind(function(n){return Ws.fromPosition(t,e,n.position()).bind(function(n){return Pu(e,n).map(function(n){return r=e,o=t,i=n,vo.isBr(i.position().getNode())&&!1===Ru(i.block())?Ws.positionIn(!1,i.block().dom()).bind(function(e){return e.isEqual(i.position())?Ws.fromPosition(o,r,e).bind(function(e){return Pu(r,e)}):E.some(i)}).getOr(i):i;var r,o,i})})});return hs([r,o],Ou).filter(function(e){return r=e,!1===Dr.eq(r.from().block(),r.to().block())&&(n=e,Ur.parent(n.from().block()).bind(function(e){return Ur.parent(n.to().block()).filter(function(t){return Dr.eq(e,t)})}).isSome())&&(t=e,!1===vo.isContentEditableFalse(t.from().block())&&!1===vo.isContentEditableFalse(t.to().block()));var t,n,r})},Lu=function(e,t,n){return n.collapsed?Iu(e,t,n):E.none()},Mu=function(e,t,n){return Dr.contains(t,e)?Ur.parents(e,function(e){return n(e)||Dr.eq(e,t)}).slice(0,-1):[]},Fu=function(e,t){return Mu(e,t,y.constant(!1))},zu=Fu,Uu=function(e,t){return[e].concat(Fu(e,t))},Vu=function(e){var t,n,r=(t=e,n=Ur.children(t),M.findIndex(n,io.isBlock).fold(function(){return n},function(e){return n.slice(0,e)}));return M.each(r,function(e){Bs.remove(e)}),r},Hu=function(e,t){Ws.positionIn(e,t.dom()).each(function(e){var t=e.getNode();vo.isBr(t)&&Bs.remove(Hn.fromDom(t))})},qu=function(e,t){var n=Uu(t,e);return M.find(n.reverse(),Ru).each(Bs.remove)},ju=function(e,t){return Dr.contains(t,e)?Ur.parent(e).bind(function(n){return Dr.eq(n,t)?E.some(e):(r=t,o=e,i=Ur.parents(o,function(e){return Dr.eq(e,r)}),E.from(i[i.length-2]));var r,o,i}):E.none()},$u=function(e,t,n){if(Ru(n))return Bs.remove(n),Ru(t)&&Is(t),Ws.firstPositionIn(t.dom());Hu(!0,t),Hu(!1,n);var r=Vu(t);return ju(t,n).fold(function(){qu(e,t);var o=Ws.lastPositionIn(n.dom());return M.each(r,function(e){ks.append(n,e)}),o},function(o){var i=Ws.prevPosition(n.dom(),ia.before(o.dom()));return M.each(r,function(e){ks.before(o,e)}),qu(e,t),i})},Wu=function(e,t,n,r){return t?$u(e,r,n):$u(e,n,r)},Ku=function(e,t){var n,r=Hn.fromDom(e.getBody());return(n=Lu(r.dom(),t,e.selection.getRng()).bind(function(e){return Wu(r,t,e.from().block(),e.to().block())})).each(function(t){e.selection.setRng(t.toRange())}),n.isSome()},Xu=function(e,t){var n=Hn.fromDom(t),r=y.curry(Dr.eq,e);return nu.ancestor(n,io.isTableCell,r).isSome()},Yu=function(e,t){var n,r,o=Ws.prevPosition(e.dom(),ia.fromRangeStart(t)).isNone(),i=Ws.nextPosition(e.dom(),ia.fromRangeEnd(t)).isNone();return!(Xu(n=e,(r=t).startContainer)||Xu(n,r.endContainer))&&o&&i},Gu=function(e){var t,n,r,o,i=Hn.fromDom(e.getBody()),a=e.selection.getRng();return Yu(i,a)?((o=e).setContent(""),o.selection.setCursorLocation(),!0):(t=i,n=e.selection,r=n.getRng(),hs([yu(t,Hn.fromDom(r.startContainer)),yu(t,Hn.fromDom(r.endContainer))],function(e,o){return!1===Dr.eq(e,o)&&(r.deleteContents(),Wu(t,!0,e,o).each(function(e){n.setRng(e.toRange())}),!0)}).getOr(!1))},Ju=function(e,t){return!e.selection.isCollapsed()&&Gu(e)},Qu=function(e){if(!tr.isArray(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return M.each(e,function(r,o){var i=sr.keys(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],s=r[a];if(n[a]!==undefined)throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!tr.isArray(s))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){var n=arguments.length;if(n!==s.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+s.length+" ("+s+"), got "+n);for(var r=new Array(n),i=0;iia.before(r).offset()?new ia(t.container(),t.offset()-1):t;var n,r,o,i},ic=function(e){return Ei(e.previousSibling)?E.some((t=e.previousSibling,vo.isText(t)?new ia(t,t.data.length):ia.after(t))):e.previousSibling?Ws.lastPositionIn(e.previousSibling):E.none();var t},ac=function(e){return Ei(e.nextSibling)?E.some((t=e.nextSibling,vo.isText(t)?new ia(t,0):ia.before(t))):e.nextSibling?Ws.firstPositionIn(e.nextSibling):E.none();var t},sc=function(e,t){return ic(t).orThunk(function(){return ac(t)}).orThunk(function(){return n=e,r=t,o=ia.before(r.previousSibling?r.previousSibling:r.parentNode),Ws.prevPosition(n,o).fold(function(){return Ws.nextPosition(n,ia.after(r))},E.some);var n,r,o})},uc=function(e,t){return ac(t).orThunk(function(){return ic(t)}).orThunk(function(){return n=e,r=t,Ws.nextPosition(n,ia.after(r)).fold(function(){return Ws.prevPosition(n,ia.before(r))},E.some);var n,r})},cc=function(e,t,n){return(r=e,o=t,i=n,r?uc(o,i):sc(o,i)).map(y.curry(oc,n));var r,o,i},lc=function(e,t,n){n.fold(function(){e.focus()},function(n){e.selection.setRng(n.toRange(),t)})},fc=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(Zn.name(t))},dc=function(e){if(Ru(e)){var t=Hn.fromHtml('
');return Bs.empty(e),ks.append(e,t),E.some(ia.before(t.dom()))}return E.none()},mc=function(e,t,n){var r,o,i,a=cc(t,e.getBody(),n.dom()),s=nu.ancestor(n,y.curry(fc,e),(r=e.getBody(),function(e){return e.dom()===r})),u=(o=n,i=a,hs([Ur.prevSibling(o),Ur.nextSibling(o),i],function(e,t,n){var r,i=e.dom(),a=t.dom();return vo.isText(i)&&vo.isText(a)?(r=i.data.length,i.appendData(a.data),Bs.remove(t),Bs.remove(o),n.container()===a?new ia(i,r):n):(Bs.remove(o),n)}).orThunk(function(){return Bs.remove(o),i}));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):s.bind(dc).fold(function(){lc(e,t,u)},function(n){lc(e,t,E.some(n))})},pc=function(e,t){return rc(e.getBody(),t,e.selection.getRng()).map(function(n){return n.fold((a=e,s=t,function(e){return a._selectionOverrides.hideFakeCaret(),mc(a,s,Hn.fromDom(e)),!0}),(o=e,i=t,function(e){var t=i?ia.before(e):ia.after(e);return o.selection.setRng(t.toRange()),!0}),(r=e,function(e){return r.selection.setRng(e.toRange()),!0}));var r,o,i,a,s}).getOr(!1)},gc=function(e,t){var n,r=e.selection.getNode();return!!vo.isContentEditableFalse(r)&&(n=Hn.fromDom(e.getBody()),M.each(Os(n,".mce-offscreen-selection"),Bs.remove),mc(e,t,Hn.fromDom(e.selection.getNode())),bu(e),!0)},hc=function(e,t){return e.selection.isCollapsed()?pc(e,t):gc(e,t)},vc=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(vo.isContentEditableTrue(t)||vo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return vo.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(ia.before(t).toRange())),!0},yc=vo.isText,bc=function(e){return yc(e)&&e.data[0]===oi},Cc=function(e){return yc(e)&&e.data[e.data.length-1]===oi},xc=function(e){return e.ownerDocument.createTextNode(oi)},wc=function(e,t){return e?function(e){if(yc(e.previousSibling))return Cc(e.previousSibling)?e.previousSibling:(e.previousSibling.appendData(oi),e.previousSibling);if(yc(e))return bc(e)?e:(e.insertData(0,oi),e);var t=xc(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(yc(e.nextSibling))return bc(e.nextSibling)?e.nextSibling:(e.nextSibling.insertData(0,oi),e.nextSibling);if(yc(e))return Cc(e)?e:(e.appendData(oi),e);var t=xc(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},Nc={insertInline:wc,insertInlineBefore:y.curry(wc,!0),insertInlineAfter:y.curry(wc,!1)},Ec=vo.isElement,Sc=vo.isText,kc=function(e){var t=e.parentNode;t&&t.removeChild(e)},Tc=function(e,t){0===t.length?kc(e):e.nodeValue=t},Ac=function(e){var t=ii(e);return{count:e.length-t.length,text:t}},_c=function(e,t){return Dc(e),t},Bc=function(e,t){return t.container()===e?(r=t,o=Ac((n=e).data.substr(0,r.offset())),i=Ac(n.data.substr(r.offset())),(a=o.text+i.text).length>0?(Tc(n,a),new ia(n,r.offset()-o.count)):r):_c(e,t);var n,r,o,i,a},Rc=function(e,t){return t.container()===e.parentNode?(n=e,o=(r=t).container(),i=M.indexOf(o.childNodes,n).map(function(e){return e=a.nodeValue.length&&(s=e.nodeIndex(a),a=a.parentNode),1===a.nodeType))for(s<(i=a.childNodes).length?(a=i[s],r=new to(a,e.getParent(a,e.isBlock))):(a=i[i.length-1],(r=new to(a,e.getParent(a,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!Fc(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!Fc(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:Fc,replaceVars:function(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e},isEq:function(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:zc,getStyle:function(e,t,n){return zc(e,e.getStyle(t,n),n)},getTextDecoration:function(e,t){var n;return e.getParent(t,function(t){return(n=e.getStyle(t,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},Vc=xs.isBookmarkNode,Hc=Uc.getParents,qc=Uc.isWhiteSpaceNode,jc=Uc.isTextBlock,$c=function(e,t){for(void 0===t&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}},Wc=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Kc=function(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?-1===(o=(o=a.lastIndexOf(" ",r))>(i=a.lastIndexOf("\xa0",r))?o:i)||t||o++:(o=a.indexOf(" ",r),i=a.indexOf("\xa0",r),o=-1!==o&&(-1===i||o0:i0&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&n.offset>1&&(e=n.node).splitText(n.offset-1)}return e}(s,u)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Jc(c,n,i,a,s,u,!0)),n[0].inline&&3===s.nodeType&&u!==s.nodeValue.length||(s=Jc(c,n,i,a,s,u,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=Yc(c,n,t,i,"previousSibling"),s=Yc(c,n,t,s,"nextSibling")),(n[0].block||n[0].selector)&&(i=Gc(e,n,i,"previousSibling"),s=Gc(e,n,s,"nextSibling"),n[0].block&&(c.isBlock(i)||(i=Jc(c,n,i,a,s,u,!0)),c.isBlock(s)||(s=Jc(c,n,i,a,s,u,!1)))),1===i.nodeType&&(a=c.nodeIndex(i),i=i.parentNode),1===s.nodeType&&(u=c.nodeIndex(s)+1,s=s.parentNode),{startContainer:i,startOffset:a,endContainer:s,endOffset:u}},Zc=Uc.isEq,el=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o=0;i--){if(!(a=s[i].selector)||s[i].defaultBlock)return!0;for(o=r.length-1;o>=0;o--)if(u.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:el},al=function(e,t){return e.splitText(t)},sl={split:function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&vo.isText(t)?n>0&&nn?(t=r=al(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(vo.isText(t)&&n>0&&n0&&o1)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length>0},dl=function(e){var t;if(e)for(e=(t=new to(e,e)).current();e;e=t.next())if(3===e.nodeType)return e;return null},ml=function(e){var t=Hn.fromTag("span");return dr.setAll(t,{id:cl,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&ks.append(t,Hn.fromText(ul)),t},pl=function(e,t){for(;t&&t!==e;){if(t.id===cl)return t;t=t.parentNode}return null},gl=function(e,t,n,r){var o,i,a,s;o=t.getRng(!0),i=e.getParent(n,e.isBlock),fl(n)?(!1!==r&&(o.setStartBefore(n),o.setEndBefore(n)),e.remove(n)):((s=dl(n))&&s.nodeValue.charAt(0)===ul&&s.deleteData(0,1),a=s,o.startContainer===a&&o.startOffset>0&&o.setStart(a,o.startOffset-1),o.endContainer===a&&o.endOffset>0&&o.setEnd(a,o.endOffset-1),e.remove(n,!0)),i&&e.isEmpty(i)&&Is(Hn.fromDom(i)),t.setRng(o)},hl=function(e,t,n,r,o){if(r)gl(t,n,r,o);else if(!(r=pl(e,n.getStart())))for(;r=t.get(cl);)gl(t,n,r,!1)},vl=function(e,t,n){var r=e.dom,o=r.getParent(n,ji.curry(Uc.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(Ps(Hn.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},yl=function(e,t){return e.appendChild(t),t},bl=function(e,t){var n=M.foldr(e,function(e,t){return yl(e,t.cloneNode(!1))},t);return yl(n,n.ownerDocument.createTextNode(ul))},Cl=function(e){var t=e.dom,n=e.selection,r=e.getBody();e.on("mouseup keydown",function(e){var o,i,a,s;o=r,i=t,a=n,s=e.keyCode,hl(o,i,a,null,!1),8===s&&a.isCollapsed()&&a.getStart().innerHTML===ul&&hl(o,i,a,pl(o,a.getStart())),37!==s&&39!==s||hl(o,i,a,pl(o,a.getStart()))})},xl=function(e,t,n){var r,o,i,a,s,u,c=e.selection;a=(r=c.getRng(!0)).startOffset,u=r.startContainer.nodeValue,(o=pl(e.getBody(),c.getStart()))&&(i=dl(o));var l,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;u&&a>0&&a1},Sf=function(e){return M.filter(Nf(e),io.isTableCell)},kf=function(e){return Os(e,"td[data-mce-selected],th[data-mce-selected]")},Tf=function(e,t){var n=kf(t),r=Sf(e);return n.length>0?n:r},Af=Tf,_f=function(e){return Tf(wf(e.selection.getSel()),Hn.fromDom(e.getBody()))},Bf=function(e,t){return M.each(t,Is),e.selection.setCursorLocation(t[0].dom(),0),!0},Rf=function(e,t){return mc(e,!1,t),!0},Df=function(e,t,n,r){return Pf(t,r).fold(function(){return r=e,Cf(t,n).map(function(e){return e.fold(y.curry(Rf,r),y.curry(Bf,r))});var r},function(t){return If(e,t)}).getOr(!1)},Of=function(e,t){return M.find(Uu(t,e),io.isTableCell)},Pf=function(e,t){return M.find(Uu(t,e),function(e){return"caption"===Zn.name(e)})},If=function(e,t){return Is(t),e.selection.setCursorLocation(t.dom(),0),E.some(!0)},Lf=function(e,t,n,r,o){return Ws.navigate(n,e.getBody(),o).bind(function(i){return u=r,c=n,l=o,f=i,Ws.firstPositionIn(u.dom()).bind(function(e){return Ws.lastPositionIn(u.dom()).map(function(t){return c?l.isEqual(e)&&f.isEqual(t):l.isEqual(t)&&f.isEqual(e)})}).getOr(!0)?If(e,r):(a=r,s=i,Pf(t,Hn.fromDom(s.getNode())).map(function(e){return!1===Dr.eq(e,a)}));var a,s,u,c,l,f}).or(E.some(!0))},Mf=function(e,t,n,r){var o=ia.fromRangeStart(e.selection.getRng());return Of(n,r).bind(function(r){return Ru(r)?If(e,r):(i=e,a=n,s=t,u=r,c=o,Ws.navigate(s,i.getBody(),c).bind(function(e){return Of(a,Hn.fromDom(e.getNode())).map(function(e){return!1===Dr.eq(e,u)})}));var i,a,s,u,c})},Ff=function(e,t,n){var r=Hn.fromDom(e.getBody());return Pf(r,n).fold(function(){return Mf(e,t,r,n)},function(n){return o=e,i=t,a=r,s=n,u=ia.fromRangeStart(o.selection.getRng()),Ru(s)?If(o,s):Lf(o,a,i,s,u);var o,i,a,s,u}).getOr(!1)},zf=function(e,t){var n,r,o,i,a,s=Hn.fromDom(e.selection.getStart(!0));return e.selection.isCollapsed()?Ff(e,t,s):(n=e,r=s,o=Hn.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=_f(n)).length?Bf(n,a):Df(n,o,i,r))},Uf=function(e,t){e.getDoc().execCommand(t,!1,null)},Vf=function(e){hc(e,!1)||cf(e,!1)||Ku(e,!1)||zf(e)||Ju(e,!1)||(Uf(e,"Delete"),bu(e))},Hf=function(e){hc(e,!0)||cf(e,!0)||Ku(e,!0)||zf(e)||Ju(e,!0)||Uf(e,"ForwardDelete")},qf=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},jf=xr("container","offset"),$f=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},Wf=function(e,t,n){return $f(e,t,function(e){return e.nodeName===n})},Kf=function(e){return e&&"TABLE"===e.nodeName},Xf=function(e,t,n){for(var r=new to(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(vo.isBr(t))return!0},Yf=function(e,t,n,r,o){var i,a,s,u,c,l,f=e.getRoot(),d=e.schema.getNonEmptyElements();if(s=e.getParent(o.parentNode,e.isBlock)||f,r&&vo.isBr(o)&&t&&e.isEmpty(s))return E.some(jf(o.parentNode,e.nodeIndex(o)));for(i=new to(o,s);u=i[r?"prev":"next"]();){if("false"===e.getContentEditableParent(u)||(c=u,l=f,mi.isCaretContainer(c)&&!1===$f(c,l,Nl)))return E.none();if(vo.isText(u)&&u.nodeValue.length>0)return!1===Wf(u,f,"A")?E.some(jf(u,r?u.nodeValue.length:0)):E.none();if(e.isBlock(u)||d[u.nodeName.toLowerCase()])return E.none();a=u}return n&&a?E.some(jf(a,0)):E.none()},Gf=function(e,t,n,r){var o,i,a,s,u,c,l,f,d,m,p=e.getRoot(),g=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],l=vo.isElement(o)&&i===o.childNodes.length,u=e.schema.getNonEmptyElements(),c=n,mi.isCaretContainer(o))return E.none();if(vo.isElement(o)&&i>o.childNodes.length-1&&(c=!1),vo.isDocument(o)&&(o=p,i=0),o===p){if(c&&(s=o.childNodes[i>0?i-1:0])){if(mi.isCaretContainer(s))return E.none();if(u[s.nodeName]||Kf(s))return E.none()}if(o.hasChildNodes()){if(i=Math.min(!c&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=vo.isText(o)&&l?o.data.length:0,!t&&o===p.lastChild&&Kf(o))return E.none();if(function(e,t){for(;t&&t!==e;){if(vo.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(p,o)||mi.isCaretContainer(o))return E.none();if(o.hasChildNodes()&&!1===Kf(o)){s=o,a=new to(o,p);do{if(vo.isContentEditableFalse(s)||mi.isCaretContainer(s)){g=!1;break}if(vo.isText(s)&&s.nodeValue.length>0){i=c?0:s.nodeValue.length,o=s,g=!0;break}if(u[s.nodeName.toLowerCase()]&&(!(f=s)||!/^(TD|TH|CAPTION)$/.test(f.nodeName))){i=e.nodeIndex(s),o=s.parentNode,"IMG"!==s.nodeName&&"PRE"!==s.nodeName||c||i++,g=!0;break}}while(s=c?a.next():a.prev())}}}return t&&(vo.isText(o)&&0===i&&Yf(e,l,t,!0,o).each(function(e){o=e.container(),i=e.offset(),g=!0}),vo.isElement(o)&&((s=o.childNodes[i])||(s=o.childNodes[i-1]),!s||!vo.isBr(s)||(m="A",(d=s).previousSibling&&d.previousSibling.nodeName===m)||Xf(e,s,!1)||Xf(e,s,!0)||Yf(e,l,t,!0,s).each(function(e){o=e.container(),i=e.offset(),g=!0}))),c&&!t&&vo.isText(o)&&i===o.nodeValue.length&&Yf(e,l,t,!1,o).each(function(e){o=e.container(),i=e.offset(),g=!0}),g?E.some(jf(o,i)):E.none()},Jf={normalize:function(e,t){var n=t.collapsed,r=t.cloneRange();return Gf(e,n,!0,r).each(function(e){r.setStart(e.container(),e.offset())}),n||Gf(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),qf(t,r)?E.none():E.some(r)}},Qf=function(e,t,n){var r=e.create("span",{}," ");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Zf=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},ed=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Jf.normalize(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var s=a.startOffset,u=a.startContainer;if(1===u.nodeType&&u.hasChildNodes()){var c=s>u.childNodes.length-1;u=u.childNodes[Math.min(s,u.childNodes.length-1)]||u,s=c&&3===u.nodeType?u.nodeValue.length:0}var l=i.getParent(u,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=t&&t.ctrlKey;"LI"!==d||m||(l=f),u&&3===u.nodeType&&s>=u.nodeValue.length&&(function(e,t,n){for(var r,o=new to(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0}(e.schema,u,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),a.insertNode(n),Qf(i,o,n),Zf(i,o,n,r),e.undoManager.add()},td=function(e,t){var n=Hn.fromTag("br");ks.before(Hn.fromDom(t),n),e.undoManager.add()},nd=function(e,t){rd(e.getBody(),t)||ks.after(Hn.fromDom(t),Hn.fromTag("br"));var n=Hn.fromTag("br");ks.after(Hn.fromDom(t),n),Qf(e.dom,e.selection,n.dom()),Zf(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},rd=function(e,t){return n=ia.after(t),!!vo.isBr(n.getNode())||Ws.nextPosition(e,ia.after(t)).map(function(e){return vo.isBr(e.getNode())}).getOr(!1);var n},od=function(e){return e&&"A"===e.nodeName&&"href"in e},id=function(e){return e.fold(y.constant(!1),od,od,y.constant(!1))},ad=function(e,t){t.fold(y.noop,y.curry(td,e),y.curry(nd,e),y.noop)},sd=function(e,t){var n,r,o,i=(n=e,r=y.curry(vu.isInlineTarget,n),o=ia.fromRangeStart(n.selection.getRng()),$l(r,n.getBody(),o).filter(id));i.isSome()?i.each(y.curry(ad,e)):ed(e,t)},ud=Qu([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),cd=(ud.before,ud.on,ud.after,function(e){return e.fold(y.identity,y.identity,y.identity)}),ld=Qu([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),fd=xr("start","soffset","finish","foffset"),dd={domRange:ld.domRange,relative:ld.relative,exact:ld.exact,exactFromRange:function(e){return ld.exact(e.start(),e.soffset(),e.finish(),e.foffset())},range:fd,getWin:function(e){var t=e.match({domRange:function(e){return Hn.fromDom(e.startContainer)},relative:function(e,t){return cd(e)},exact:function(e,t,n,r){return e}});return Ur.defaultView(t)}},md=Un.detect().browser,pd=function(e,t){var n=Zn.isText(t)?Ds(t).length:Ur.children(t).length+1;return e>n?n:e<0?0:e},gd=function(e){return dd.range(e.start(),pd(e.soffset(),e.start()),e.finish(),pd(e.foffset(),e.finish()))},hd=function(e,t){return Dr.contains(e,t)||Dr.eq(e,t)},vd=function(e){return function(t){return hd(e,t.start())&&hd(e,t.finish())}},yd=function(e){return!0===e.inline||md.isIE()},bd=function(e){return dd.range(Hn.fromDom(e.startContainer),e.startOffset,Hn.fromDom(e.endContainer),e.endOffset)},Cd=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?E.from(t.getRangeAt(0)):E.none()).map(bd)},xd=function(e){var t=Ur.defaultView(e);return Cd(t.dom()).filter(vd(e))},wd=function(e,t){return E.from(t).filter(vd(e)).map(gd)},Nd=function(e){var t=document.createRange();return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),E.some(t)},Ed=function(e){return(e.bookmark?e.bookmark:E.none()).bind(y.curry(wd,Hn.fromDom(e.getBody()))).bind(Nd)},Sd=function(e){var t=yd(e)?xd(Hn.fromDom(e.getBody())):E.none();e.bookmark=t.isSome()?t:e.bookmark},kd=function(e){Ed(e).each(function(t){e.selection.setRng(t)})},Td=Ed,Ad=Ot.each,_d=Ot.extend,Bd=Ot.map,Rd=Ot.inArray,Dd=Ot.explode,Od=function(e){var t,n,r,o,i={state:{},exec:{},value:{}},a=e.settings;e.on("PreInit",function(){t=e.dom,n=e.selection,a=e.settings,r=e.formatter});var s=function(t){var n;if(!e.quirks.isHidden()&&!e.removed){if(t=t.toLowerCase(),n=i.state[t])return n(t);try{return e.getDoc().queryCommandState(t)}catch(r){}return!1}},u=function(e,t){t=t||"exec",Ad(e,function(e,n){Ad(n.toLowerCase().split(","),function(n){i[t][n]=e})})};_d(this,{execCommand:function(t,n,r,o){var a,s,u=!1;if(!e.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||o&&o.skip_focus?kd(e):e.focus(),(o=e.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(s=t.toLowerCase(),a=i.exec[s])return a(s,n,r),e.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(Ad(e.plugins,function(o){if(o.execCommand&&o.execCommand(t,n,r))return e.fire("ExecCommand",{command:t,ui:n,value:r}),u=!0,!1}),u)return u;if(e.theme&&e.theme.execCommand&&e.theme.execCommand(t,n,r))return e.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{u=e.getDoc().execCommand(t,n,r)}catch(c){}return!!u&&(e.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},queryCommandState:s,queryCommandValue:function(t){var n;if(!e.quirks.isHidden()&&!e.removed){if(t=t.toLowerCase(),n=i.value[t])return n(t);try{return e.getDoc().queryCommandValue(t)}catch(r){}}},queryCommandSupported:function(t){if(t=t.toLowerCase(),i.exec[t])return!0;try{return e.getDoc().queryCommandSupported(t)}catch(n){}return!1},addCommands:u,addCommand:function(t,n,r){t=t.toLowerCase(),i.exec[t]=function(t,o,i,a){return n.call(r||e,o,i,a)}},addQueryStateHandler:function(t,n,r){t=t.toLowerCase(),i.state[t]=function(){return n.call(r||e)}},addQueryValueHandler:function(t,n,r){t=t.toLowerCase(),i.value[t]=function(){return n.call(r||e)}},hasCustomCommand:function(e){return e=e.toLowerCase(),!!i.exec[e]}});var c=function(t,n,r){return n===undefined&&(n=!1),r===undefined&&(r=null),e.getDoc().execCommand(t,n,r)},l=function(e){return r.match(e)},f=function(t,n){r.toggle(t,n?{value:n}:undefined),e.nodeChanged()},d=function(e){o=n.getBookmark(e)},m=function(){n.moveToBookmark(o)};u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},"Cut,Copy,Paste":function(t){var n,r=e.getDoc();try{c(t)}catch(i){n=!0}if("paste"!==t||r.queryCommandEnabled(t)||(n=!0),n||!r.queryCommandSupported(t)){var o=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");me.mac&&(o=o.replace(/Ctrl\+/g,"\u2318+")),e.notificationManager.open({text:o,type:"error"})}},unlink:function(){if(n.isCollapsed()){var t=e.dom.getParent(e.selection.getStart(),"a");t&&e.dom.remove(t,!0)}else r.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),Ad("left,center,right,justify".split(","),function(e){t!==e&&r.remove("align"+e)}),"none"!==t&&f("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var r,o;c(e),(r=t.getParent(n.getNode(),"ol,ul"))&&(o=r.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(o.nodeName)&&(d(),t.split(o,r),m()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){f(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){f(e,n)},FontSize:function(e,t,n){var r,o;n>=1&&n<=7&&(o=Dd(a.font_size_style_values),n=(r=Dd(a.font_size_classes))?r[n-1]||n:o[n-1]||n),f(e,n)},RemoveFormat:function(e){r.remove(e)},mceBlockQuote:function(){f("blockquote")},FormatBlock:function(e,t,n){return f(n||"p")},mceCleanup:function(){var t=n.getBookmark();e.setContent(e.getContent({cleanup:!0}),{cleanup:!0}),n.moveToBookmark(t)},mceRemoveNode:function(t,r,o){var i=o||n.getNode();i!==e.getBody()&&(d(),e.dom.remove(i,!0),m())},mceSelectNodeDepth:function(r,o,i){var a=0;t.getParent(n.getNode(),function(e){if(1===e.nodeType&&a++===i)return n.select(e),!1},e.getBody())},mceSelectNode:function(e,t,r){n.select(r)},mceInsertContent:function(t,n,r){Js(e,r)},mceInsertRawHTML:function(t,r,o){n.setContent("tiny_mce_marker"),e.setContent(e.getContent().replace(/tiny_mce_marker/g,function(){return o}))},mceToggleFormat:function(e,t,n){f(n)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(o){var i,u,l;i=a.indentation,u=/[a-z%]+$/i.exec(i),i=parseInt(i,10),s("InsertUnorderedList")||s("InsertOrderedList")?c(o):(a.forced_root_block||t.getParent(n.getNode(),t.isBlock)||r.apply("div"),Ad(n.getSelectedBlocks(),function(n){if("false"!==t.getContentEditable(n)&&"LI"!==n.nodeName){var r=e.getParam("indent_use_margin",!1)?"margin":"padding";r="TABLE"===n.nodeName?"margin":r,r+="rtl"===t.getStyle(n,"direction",!0)?"Right":"Left","outdent"===o?(l=Math.max(0,parseInt(n.style[r]||0,10)-i),t.setStyle(n,r,l?l+u:"")):(l=parseInt(n.style[r]||0,10)+i+u,t.setStyle(n,r,l))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1,"
")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,r,o){e.execCommand("mceInsertContent",!1,o.replace(/\{\$selection\}/g,n.getContent({format:"text"})))},mceInsertLink:function(e,o,i){var a;"string"==typeof i&&(i={href:i}),a=t.getParent(n.getNode(),"a"),i.href=i.href.replace(" ","%20"),a&&i.href||r.remove("link"),i.href&&r.apply("link",i,a)},selectAll:function(){var e=t.getParent(n.getStart(),vo.isContentEditableTrue);if(e){var r=t.createRng();r.selectNodeContents(e),n.setRng(r)}},"delete":function(){Vf(e)},forwardDelete:function(){Hf(e)},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return sd(e,r),!0}}),u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var o="align"+e.substring(7),i=n.isCollapsed()?[t.getParent(n.getNode(),t.isBlock)]:n.getSelectedBlocks(),a=Bd(i,function(e){return!!r.matchNode(e,o)});return-1!==Rd(a,!0)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return l(e)},mceBlockQuote:function(){return l("blockquote")},Outdent:function(){var e;if(a.inline_styles){if((e=t.getParent(n.getStart(),t.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return!0;if((e=t.getParent(n.getEnd(),t.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return!0}return s("InsertUnorderedList")||s("InsertOrderedList")||!a.inline_styles&&!!t.getParent(n.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var r=t.getParent(n.getNode(),"ul,ol");return r&&("insertunorderedlist"===e&&"UL"===r.tagName||"insertorderedlist"===e&&"OL"===r.tagName)}},"state"),u({"FontSize,FontName":function(e){var r,o=0;return(r=t.getParent(n.getNode(),"span"))&&(o="fontsize"===e?r.style.fontSize:r.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),o}},"value"),u({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}})},Pd=Ot.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),Id=function(e){var t,n,r=this,o={},i=function(){return!1},a=function(){return!0};t=(e=e||{}).scope||r,n=e.toggleEvent||i;var s=function(e,t,a,s){var u,c,l;if(!1===t&&(t=i),t)for(t={func:t},s&&Ot.extend(t,s),l=(c=e.toLowerCase().split(" ")).length;l--;)e=c[l],(u=o[e])||(u=o[e]=[],n(e,!0)),a?u.unshift(t):u.push(t);return r},u=function(e,t){var i,a,s,u,c;if(e)for(i=(u=e.toLowerCase().split(" ")).length;i--;){if(e=u[i],a=o[e],!e){for(s in o)n(s,!1),delete o[s];return r}if(a){if(t)for(c=a.length;c--;)a[c].func===t&&(a=a.slice(0,c).concat(a.slice(c+1)),o[e]=a);else a.length=0;a.length||(n(e,!1),delete o[e])}}else{for(e in o)n(e,!1);o={}}return r};r.fire=function(n,r){var s,c,l,f;if(n=n.toLowerCase(),(r=r||{}).type=n,r.target||(r.target=t),r.preventDefault||(r.preventDefault=function(){r.isDefaultPrevented=a},r.stopPropagation=function(){r.isPropagationStopped=a},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=a},r.isDefaultPrevented=i,r.isPropagationStopped=i,r.isImmediatePropagationStopped=i),e.beforeFire&&e.beforeFire(r),s=o[n])for(c=0,l=s.length;c0&&e.preventDefault()},n.dom.bind(r,"click",o),{unbind:function(){n.dom.unbind(r,"click",o)}}),e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable=!1):(e.readonly=!1,e.getBody().contentEditable=!0,jd(e,"StyleWithCSS",!1),jd(e,"enableInlineTableEditing",!1),jd(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())},Wd=function(e,t){var n=e.readonly?"readonly":"design";t!==n&&(e.initialized?$d(e,"readonly"===t):e.on("init",function(){$d(e,"readonly"===t)}),e.fire("SwitchMode",{mode:t}))},Kd=Ot.each,Xd=Ot.explode,Yd={f9:120,f10:121,f11:122},Gd=Ot.makeMap("alt,ctrl,shift,meta,access"),Jd=function(e){var t={},n=[],r=function(e){var t,n,r={};for(n in Kd(Xd(e,"+"),function(e){e in Gd?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=Yd[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],Gd)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,me.mac?r.ctrl=!0:r.shift=!0),r.meta&&(me.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},o=function(t,n,o,i){var a;return(a=Ot.map(Xd(t,">"),r))[a.length-1]=Ot.extend(a[a.length-1],{func:o,scope:i||e}),Ot.extend(a[0],{desc:e.translate(n),subpatterns:a.slice(1)})},i=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},a=function(e){return e.func?e.func.call(e.scope):null};e.on("keyup keypress keydown",function(e){var r,o;((o=e).altKey||o.ctrlKey||o.metaKey||"keydown"===(r=e).type&&r.keyCode>=112&&r.keyCode<=123)&&!e.isDefaultPrevented()&&(Kd(t,function(t){if(i(e,t))return n=t.subpatterns.slice(0),"keydown"===e.type&&a(t),!0}),i(e,n[0])&&(1===n.length&&"keydown"===e.type&&a(n[0]),n.shift()))}),this.add=function(n,r,i,a){var s;return s=i,"string"==typeof i?i=function(){e.execCommand(s,!1,null)}:Ot.isArray(s)&&(i=function(){e.execCommand(s[0],s[1],s[2])}),Kd(Xd(Ot.trim(n.toLowerCase())),function(e){var n=o(e,r,i,a);t[n.id]=n}),!0},this.remove=function(e){var n=o(e);return!!t[n.id]&&(delete t[n.id],!0)}},Qd=Ot.each,Zd=function(e,t,n){var r,o,i,a,s=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])s--;else if(!o[1]){if(o[2]in a)continue;s++}if(0===s)break}return r},em=function(e,t){var n=this,r=function(){};e=e||{},n.schema=t=t||Fo(),!1!==e.fix_self_closing&&(e.fix_self_closing=!0),Qd("comment cdata text start end pi doctype".split(" "),function(t){t&&(n[t]=e[t]||r)}),n.parse=function(n){var r,o,i,a,s,u,c,l,f,d,m,p,g,h,v,y,b,C,x,w,N,E,S,k,T,A,_,B,R,D=this,O=0,P=[],I=0,L=Ao.decode,M=Ot.makeMap("src,href,data,background,formaction,poster"),F=/((java|vb)script|mhtml):/i,z=/^data:/i,U=function(e){var t,n;for(t=P.length;t--&&P[t].name!==e;);if(t>=0){for(n=P.length-1;n>=t;n--)(e=P[n]).valid&&D.end(e.name);P.length=t}},V=function(t,n,r,o,i){var s,u,c;if(r=(n=n.toLowerCase())in m?n:L(r||o||i||""),g&&!l&&0==(0===(c=n).indexOf("data-")||0===c.indexOf("aria-"))){if(!(s=C[n])&&x){for(u=x.length;u--&&!(s=x[u]).pattern.test(n););-1===u&&(s=null)}if(!s)return;if(s.validValues&&!(r in s.validValues))return}if(M[n]&&!e.allow_script_urls){var f=r.replace(/[\s\u0000-\u001F]+/g,"");try{f=decodeURIComponent(f)}catch(d){f=unescape(f)}if(F.test(f))return;if(!e.allow_html_data_urls&&z.test(f)&&!/^data:image\//i.test(f))return}l&&(n in M||0===n.indexOf("on"))||(a.map[n]=r,a.push({name:n,value:r}))};for(T=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),A=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,d=t.getShortEndedElements(),k=e.self_closing_elements||t.getSelfClosingElements(),m=t.getBoolAttrs(),g=e.validate,f=e.remove_internals,R=e.fix_self_closing,_=t.getSpecialElements(),S=n+">";r=T.exec(S);){if(On.length){D.text(L(n.substr(r.index))),O=r.index+r[0].length;continue}if(":"===(o=o.toLowerCase()).charAt(0)&&(o=o.substr(1)),p=o in d,R&&k[o]&&P.length>0&&P[P.length-1].name===o&&U(o),!g||(h=t.getElementRule(o))){if(v=!0,g&&(C=h.attributes,x=h.attributePatterns),(b=r[8])?((l=-1!==b.indexOf("data-mce-type"))&&f&&(v=!1),(a=[]).map={},b.replace(A,V)):(a=[]).map={},g&&!l){if(w=h.attributesRequired,N=h.attributesDefault,E=h.attributesForced,h.removeEmptyAttrs&&!a.length&&(v=!1),E)for(s=E.length;s--;)c=(y=E[s]).name,"{$uid}"===(B=y.value)&&(B="mce_"+I++),a.map[c]=B,a.push({name:c,value:B});if(N)for(s=N.length;s--;)(c=(y=N[s]).name)in a.map||("{$uid}"===(B=y.value)&&(B="mce_"+I++),a.map[c]=B,a.push({name:c,value:B}));if(w){for(s=w.length;s--&&!(w[s]in a.map););-1===s&&(v=!1)}if(y=a.map["data-mce-bogus"]){if("all"===y){O=Zd(t,n,T.lastIndex),T.lastIndex=O;continue}v=!1}}v&&D.start(o,a,p)}else v=!1;if(i=_[o]){i.lastIndex=O=r.index+r[0].length,(r=i.exec(n))?(v&&(u=n.substr(O,r.index-O)),O=r.index+r[0].length):(u=n.substr(O),O=n.length),v&&(u.length>0&&D.text(u,!0),D.end(o)),T.lastIndex=O;continue}p||(b&&b.indexOf("/")===b.length-1?v&&D.end(o):P.push({name:o,valid:v}))}else(o=r[1])?(">"===o.charAt(0)&&(o=" "+o),e.allow_conditional_comments||"[if"!==o.substr(0,3).toLowerCase()||(o=" "+o),D.comment(o)):(o=r[2])?D.cdata(o.replace(//g,"")):(o=r[3])?D.doctype(o):(o=r[4])&&D.pi(o,r[5]);O=r.index+r[0].length}for(O=0;s--)(o=P[s]).valid&&D.end(o.name)}};em.findEndTag=Zd;var tm,nm,rm=function(e,t){var n,r,o,i,a,s,u,c,l=t,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(s=e.getTempAttrs(),u=l,c=new RegExp(["\\s?("+s.join("|")+')="[^"]+"'].join("|"),"gi"),l=u.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:em.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return l},om=function(e,t){return ii(rm(e,t))},im=rm,am=function(e){var t=e!==undefined?e.dom():document;return E.from(t.activeElement).map(Hn.fromDom)},sm=function(e){var t=Ur.owner(e).dom();return e.dom()===t.activeElement},um=function(e){return am(Ur.owner(e)).filter(function(t){return e.dom().contains(t.dom())})},cm=function(e,t){return(n=t,n.collapsed?E.from(zi(n.startContainer,n.startOffset)).map(Hn.fromDom):E.none()).bind(function(t){return io.isTableSection(t)?E.some(t):!1===Dr.contains(e,t)?E.some(e):E.none()});var n},lm=function(e,t){cm(Hn.fromDom(e.getBody()),t).bind(function(e){return Ws.firstPositionIn(e.dom())}).fold(function(){e.selection.normalize()},function(t){e.selection.setRng(t.toRange())})},fm=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},dm=function(e){var t,n=e.getBody();return n&&(t=Hn.fromDom(n),sm(t)||um(t).isSome())},mm=function(e){return e.inline?dm(e):(t=e).iframeElement&&sm(Hn.fromDom(t.iframeElement));var t},pm=function(e){e.editorManager.setActive(e)},gm=function(e,t){e.removed||(t?pm(e):function(e){var t,n,r,o=e.selection,i=e.settings.content_editable,a=e.getBody(),s=o.getRng();if(e.quirks.refreshContentEditable(),n=e,r=o.getNode(),t=n.dom.getParent(r,function(e){return"true"===n.dom.getContentEditable(e)}),e.$.contains(a,t))return fm(t),lm(e,s),void pm(e);e.bookmark!==undefined&&!1===mm(e)&&Td(e).each(function(t){e.selection.setRng(t),s=t}),i||(me.opera||fm(a),e.getWin().focus()),(me.gecko||i)&&(fm(a),lm(e,s)),pm(e)}(e))},hm=mm,vm=function(e,t){return t.dom()[e]},ym=function(e,t){return parseInt(Cr(t,e),10)},bm=y.curry(vm,"clientWidth"),Cm=y.curry(vm,"clientHeight"),xm=y.curry(ym,"margin-top"),wm=y.curry(ym,"margin-left"),Nm=function(e,t,n){var r,o,i,a,s,u,c,l,f,d,m=Hn.fromDom(e.getBody()),p=e.inline?m:Ur.documentElement(m),g=(r=e.inline,i=t,a=n,s=(o=p).dom().getBoundingClientRect(),{x:i-(r?s.left+o.dom().clientLeft+wm(o):0),y:a-(r?s.top+o.dom().clientTop+xm(o):0)});return c=g.x,l=g.y,f=bm(u=p),d=Cm(u),c>=0&&l>=0&&c<=f&&l<=d},Em=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,E.from(t).map(Hn.fromDom)).map(function(e){return Dr.contains(Ur.owner(e),e)}).getOr(!1)},Sm=function(e){var t,n=[],r=function(){var t,n=e.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:t,reposition:t,getArgs:t}},o=function(){n.length>0&&r().reposition(n)},i=function(e){M.findIndex(n,function(t){return t===e}).each(function(e){n.splice(e,1)})},a=function(t){if(!e.removed&&Em(e))return M.find(n,function(e){return n=r().getArgs(e),o=t,!(n.type!==o.type||n.text!==o.text||n.progressBar||n.timeout||o.progressBar||o.timeout);var n,o}).getOrThunk(function(){e.editorManager.setActive(e);var a,s=r().open(t,function(){i(s),o()});return a=s,n.push(a),o(),s})};return(t=e).on("SkinLoaded",function(){var e=t.settings.service_message;e&&a({text:e,type:"warning",timeout:0,icon:""})}),t.on("ResizeEditor ResizeWindow",function(){ye.requestAnimationFrame(o)}),t.on("remove",function(){M.each(n,function(e){r().close(e)})}),{open:a,close:function(){E.from(n[0]).each(function(e){r().close(e),i(e),o()})},getNotifications:function(){return n}}},km=function(e){var t=[],n=function(){var t,n=e.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:t=function(){throw new Error("Theme did not provide a WindowManager implementation.")},alert:t,confirm:t,close:t,getParams:t,setParams:t}},r=function(e,t){return function(){return t?t.apply(e,arguments):undefined}},o=function(n){var r;t.push(n),r=n,e.fire("OpenWindow",{win:r})},i=function(n){M.findIndex(t,function(e){return e===n}).each(function(r){var o;t.splice(r,1),o=n,e.fire("CloseWindow",{win:o}),0===t.length&&e.focus()})},a=function(){return E.from(t[t.length-1])};return e.on("remove",function(){M.each(t.slice(0),function(e){n().close(e)})}),{windows:t,open:function(t,r){e.editorManager.setActive(e),Sd(e);var a=n().open(t,r,i);return o(a),a},alert:function(e,t,a){var s=n().alert(e,r(a||this,t),i);o(s)},confirm:function(e,t,a){var s=n().confirm(e,r(a||this,t),i);o(s)},close:function(){a().each(function(e){n().close(e),i(e)})},getParams:function(){return a().map(n().getParams).getOr(null)},setParams:function(e){a().each(function(t){n().setParams(t,e)})},getWindows:function(){return t}}},Tm=ti.PluginManager,Am=function(e,t){var n=function(e,t){for(var n in Tm.urls)if(Tm.urls[n]+"/plugin"+t+".js"===e)return n;return null}(t,e.suffix);return n?"Failed to load plugin: "+n+" from url "+t:"Failed to load plugin url: "+t},_m=function(e,t){e.notificationManager.open({type:"error",text:t})},Bm=function(e,t){e._skinLoaded?_m(e,t):e.on("SkinLoaded",function(){_m(e,t)})},Rm=function(e,t){Bm(e,Am(e,t))},Dm=function(e,t){Bm(e,"Failed to upload image: "+t)},Om=Bm,Pm=function(e){for(var t=[],n=1;n=300?r("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?n((o=t.basePath,a=e.location,o?o.replace(/\/$/,"")+"/"+a.replace(/^\//,""):a)):r("Invalid JSON: "+i.responseText)},(a=new FormData).append("file",e.blob(),e.filename()),i.send(a)},o=function(e,t){return{url:t,blobInfo:e,status:!0}},i=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},a=function(e,t){Ot.each(n[e],function(e){e(t)}),delete n[e]},s=function(r,s){return r=Ot.grep(r,function(t){return!e.isUploaded(t.blobUri())}),pe.all(Ot.map(r,function(r){return e.isPending(r.blobUri())?(f=r.blobUri(),new pe(function(e){n[f]=n[f]||[],n[f].push(e)})):(u=r,c=t.handler,l=s,e.markPending(u.blobUri()),new pe(function(t){var n;try{var r=function(){n&&n.close()};c(u,function(n){r(),e.markUploaded(u.blobUri(),n),a(u.blobUri(),o(u,n)),t(o(u,n))},function(n){r(),e.removeFailed(u.blobUri()),a(u.blobUri(),i(u,n)),t(i(u,n))},function(e){e<0||e>100||(n||(n=l()),n.progressBar.value(e))})}catch(s){t(i(u,s.message))}}));var u,c,l,f}))};return t=Ot.extend({credentials:!1,handler:r},t),{upload:function(e,n){return t.url||t.handler!==r?s(e,n):new pe(function(e){e([])})}}},zm=function(e,t){return new(V("Blob"))(e,t)},Um=function(e){return V("atob")(e)},Vm=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},Hm=function(e){return new pe(function(t){var n,r,o;e=Vm(e);try{n=Um(e.data)}catch(yC){return void t(new zm([]))}for(r=new function(e){return new(V("Uint8Array"))(e)}(n.length),o=0;o=0&&o[r]===n[r];r--);if(-1===r)return n=o,!0}return n=o,!1}(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("MouseUp",function(t){t.isDefaultPrevented()||("IMG"===e.selection.getNode().nodeName?ye.setEditorTimeout(e,function(){e.nodeChanged()}):e.nodeChanged())}),this.nodeChanged=function(t){var n,r,o,i=e.selection;e.initialized&&i&&!e.settings.disable_nodechange&&!e.readonly&&(o=e.getBody(),(n=i.getStart(!0)||o).ownerDocument===e.getDoc()&&e.dom.isChildOf(n,o)||(n=o),r=[],e.dom.getParent(n,function(e){if(e===o)return!0;r.push(e)}),(t=t||{}).element=n,t.parents=r,e.fire("NodeChange",t))}},np=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},rp=function(e,t){return n=(s=e).inline?np(s.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=np(e.getContentAreaContainer()),r=(i=(o=e).getBody(),a=o.getDoc().documentElement,s={left:i.scrollLeft,top:i.scrollTop},u={left:i.scrollLeft||a.scrollLeft,top:i.scrollTop||a.scrollTop},o.inline?s:u);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}var o,i,a,s,u;return{left:t.pageX,top:t.pageY}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,s},op=vo.isContentEditableFalse,ip=vo.isContentEditableTrue,ap=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},sp=function(e,t){return function(n){if(0===n.button){var r=At.find(t.dom.getParents(n.target),ji.or(op,ip));if(s=t.getBody(),op(u=r)&&u!==s){var o=t.dom.getPos(r),i=t.getBody(),a=t.getDoc().documentElement;e.element=r,e.screenX=n.screenX,e.screenY=n.screenY,e.maxX=(t.inline?i.scrollWidth:a.offsetWidth)-2,e.maxY=(t.inline?i.scrollHeight:a.offsetHeight)-2,e.relX=n.pageX-o.x,e.relY=n.pageY-o.y,e.width=r.offsetWidth,e.height=r.offsetHeight,e.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(t,r,e.width,e.height)}}var s,u}},up=function(e,t){return function(n){if(e.dragging&&(s=t,l=t.selection,f=l.getSel().getRangeAt(0).startContainer,u=3===f.nodeType?f.parentNode:f,c=e.element,u!==c&&!s.dom.isChildOf(u,c)&&!op(u))){var r=(i=e.element,(a=i.cloneNode(!0)).removeAttribute("data-mce-selected"),a),o=t.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||(r=o.targetClone,t.undoManager.transact(function(){ap(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}var i,a,s,u,c,l,f;cp(e)}},cp=function(e){e.dragging=!1,e.element=null,ap(e.ghost)},lp=function(e){var t,n,r,o,i,a,s,u,c,l,f,d={};t=Xo.DOM,a=document,n=sp(d,e),s=d,u=e,c=ye.throttle(function(e,t){u._selectionOverrides.hideFakeCaret(),u.selection.placeCaretAt(e,t)},0),r=function(e){var t,n,r,o,i,a,l,f,d,m,p,g,h=Math.max(Math.abs(e.screenX-s.screenX),Math.abs(e.screenY-s.screenY));if(s.element&&!s.dragging&&h>10){if(u.fire("dragstart",{target:s.element}).isDefaultPrevented())return;s.dragging=!0,u.focus()}if(s.dragging){var v=(p=s,{pageX:(g=rp(u,e)).pageX-p.relX,pageY:g.pageY+5});d=s.ghost,m=u.getBody(),d.parentNode!==m&&m.appendChild(d),t=s.ghost,n=v,r=s.width,o=s.height,i=s.maxX,a=s.maxY,l=0,f=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+r>i&&(l=n.pageX+r-i),n.pageY+o>a&&(f=n.pageY+o-a),t.style.width=r-l+"px",t.style.height=o-f+"px",c(e.clientX,e.clientY)}},o=up(d,e),l=d,f=e,i=function(){cp(l),l.dragging&&f.fire("dragend")},e.on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},fp=function(e){var t;lp(e),(t=e).on("drop",function(e){var n="undefined"!=typeof e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(op(n)||op(t.dom.getContentEditableParent(n)))&&e.preventDefault()})},dp=vo.isContentEditableFalse,mp=function(e,t){var n,r,o=null,i=function(){!function(){var t,n,r,o,i;for(t=Qt("*[contentEditable=false]",e),o=0;o0&&(d&&(h*=-1),y.left+=h,y.right+=h),u=y,Qt(r).css("top",u.top),o=Qt('').css(u).appendTo(e),n&&o.addClass("mce-visual-caret-before"),a(),(c=s.ownerDocument.createRange()).setStart(r,0),c.setEnd(r,0),c):(r=mi.insertInline(s,n),c=s.ownerDocument.createRange(),dp(r.nextSibling)?(c.setStart(r,0),c.setEnd(r,0)):(c.setStart(r,1),c.setEnd(r,1)),c)},hide:i,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},destroy:function(){ye.clearInterval(n)}}},pp=function(e){var t=function(t){return At.map(t,function(t){return(t=Di(t)).node=e,t})};if(At.isArray(e))return At.reduce(e,function(e,t){return e.concat(pp(t))},[]);if(vo.isElement(e))return t(e.getClientRects());if(vo.isText(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},gp={getClientRects:pp},hp=vo.isContentEditableFalse,vp=_a.findNode,yp=ji.curry,bp=function(e,t){return Math.abs(e.left-t)},Cp=function(e,t){return Math.abs(e.right-t)},xp=function(e,t){var n=function(e,t){return e>=t.left&&e<=t.right};return At.reduce(e,function(e,r){var o,i;return o=Math.min(bp(e,t),Cp(e,t)),i=Math.min(bp(r,t),Cp(r,t)),n(t,r)?r:n(t,e)?e:i===o&&hp(r.node)?r:i=e.top&&n<=e.bottom}),(o=xp(r,t))&&(o=xp(Np(e,o),t))&&hp(o.node)?(s=t,{node:(a=o).node,before:bp(a,s)').attr("id",a)).appendTo(e.getBody()),n=e.dom.createRng(),v===y&&me.ie?(i.empty().append('\xa0
').append(v),n.setStartAfter(i[0].firstChild.firstChild),n.setEndAfter(v)):(i.empty().append("\xa0").append(v).append("\xa0"),n.setStart(i[0].firstChild,1),n.setEnd(i[0].lastChild,0)),i.css({top:C.getPos(o,e.getBody()).y}),i[0].focus(),(s=e.selection.getSel()).removeAllRanges(),s.addRange(n),M.each(Os(Hn.fromDom(e.getBody()),"*[data-mce-selected]"),function(e){dr.remove(e,"data-mce-selected")}),o.setAttribute("data-mce-selected","1"),t=o,h(),n)):null)},g=function(){t&&(t.removeAttribute("data-mce-selected"),Nu(Hn.fromDom(e.getBody()),"#"+a).each(Bs.remove),t=null)},h=function(){i.hide()};return me.ceFalse&&(function(){var n=function(t){for(var n=e.getBody();t&&t!==n;){if(Fp(t)||zp(t))return t;t=t.parentNode}return null};e.on("mouseup",function(t){var n=u();n.collapsed&&Nm(e,t.clientX,t.clientY)&&s(Pp(e,n))}),e.on("click",function(t){var r;(r=n(t.target))&&(zp(r)&&(t.preventDefault(),e.focus()),Fp(r)&&e.dom.isChildOf(r,e.selection.getNode())&&g())}),e.on("blur NewBlock",function(){g()});var r,i,c=function(t,n){var r,o,i=e.dom.getParent(t,e.dom.isBlock),a=e.dom.getParent(n,e.dom.isBlock);return i&&(r=i,o=a,!(e.dom.getParent(r,e.dom.isBlock)===e.dom.getParent(o,e.dom.isBlock)))&&function(e){var t=Ha(e);if(!e.firstChild)return!1;var n=ia.before(e.firstChild),r=t.next(n);return r&&!Vp(r)&&!Up(r)}(i)};i=!1,(r=e).on("touchstart",function(){i=!1}),r.on("touchmove",function(){i=!0}),r.on("touchend",function(e){var t=n(e.target);zp(t)&&(i||(e.preventDefault(),p(Op(r,t))))}),e.on("mousedown",function(t){var r;if(!1!==Nm(e,t.clientX,t.clientY))if(r=n(t.target))zp(r)?(t.preventDefault(),p(Op(e,r))):(g(),Fp(r)&&t.shiftKey||kp(t.clientX,t.clientY,e.selection.getRng())||e.selection.placeCaretAt(t.clientX,t.clientY));else{g(),h();var i=Sp(o,t.clientX,t.clientY);i&&(c(t.target,i.node)||(t.preventDefault(),e.getBody().focus(),s(l(1,i.node,i.before))))}}),e.on("keypress",function(t){Mp.modifierPressed(t)||(t.keyCode,zp(e.selection.getNode())&&t.preventDefault())}),e.on("getSelectionRange",function(e){var n=e.range;if(t){if(!t.parentNode)return void(t=null);(n=n.cloneRange()).selectNode(t),e.range=n}}),e.on("setSelectionRange",function(e){var t;(t=p(e.range,e.forward))&&(e.range=t)}),e.on("AfterSetSelectionRange",function(t){var n,r=t.range;m(r)||h(),n=r.startContainer.parentNode,e.dom.hasClass(n,"mce-offscreen-selection")||g()}),e.on("copy",function(t){var n,r=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!me.ie){var o=(n=e.dom.get(a))?n.getElementsByTagName("*")[0]:n;o&&(t.preventDefault(),r.clearData(),r.setData("text/html",o.outerHTML),r.setData("text/plain",o.outerText))}}),fp(e),Lp(e)}(),n=e.contentStyles,r=".mce-content-body",n.push(i.getCss()),n.push(r+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+r+" *[contentEditable=false] {cursor: default;}"+r+" *[contentEditable=true] {cursor: text;}")),{showCaret:l,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(mi.showCaretContainerBlock(e),s(u()),c(e[0]))},hideFakeCaret:h,destroy:function(){i.destroy(),t=null}}},qp=0,jp=2,$p=1,Wp=function(e,t){var n=e.length+t.length+2,r=new Array(n),o=new Array(n),i=function(n,r,o,a,u){var c=s(n,r,o,a);if(null===c||c.start===r&&c.diag===r-a||c.end===n&&c.diag===n-o)for(var l=n,f=o;la-o?(u.push([2,e[l]]),++l):(u.push([1,t[f]]),++f);else{i(n,c.start,o,c.start-c.diag,u);for(var d=c.start;d=n&&g>=s&&e[p]===t[g];)o[m]=p--,g--;if(h%2==0&&-f<=d&&d<=f&&o[m]<=r[m+h])return a(o[m],d+n-s,i,u)}}},u=[];return i(0,e.length,0,t.length,u),u},Kp=function(e){return 1===e.nodeType?e.outerHTML:3===e.nodeType?Ao.encodeRaw(e.data,!1):8===e.nodeType?"\x3c!--"+e.data+"--\x3e":""},Xp=function(e,t,n){var r=function(e){var t,n,r;for(r=document.createElement("div"),t=document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n0})},Gp=function(e,t){var n,r,o,i=At.map(t.childNodes,Kp);return n=Wp(i,e),r=t,o=0,At.each(n,function(e){e[0]===qp?o++:e[0]===$p?(Xp(r,e[1],o),o++):e[0]===jp&&function(e,t){if(e.hasChildNodes()&&t0?[n]:[]})).join("")).indexOf("")?Jp(r):Qp(n)},tg=function(e,t,n){"fragmented"===t.type?Gp(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},ng=function(e,t){return!!e&&!!t&&Zp(e)===Zp(t)},rg=function(e){var t,n,r=this,o=0,i=[],a=0,s=function(){return 0===a},u=function(e){s()&&(r.typing=e)},c=function(t){e.setDirty(t)},l=function(e){u(!1),r.add({},e)},f=function(){r.typing&&(u(!1),r.add())};return e.on("init",function(){r.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(f(),r.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&l(e)}),e.on("ObjectResizeStart Cut",function(){r.beforeChange()}),e.on("SaveContent ObjectResized blur",l),e.on("DragEnd",l),e.on("KeyUp",function(t){var o=t.keyCode;t.isDefaultPrevented()||((o>=33&&o<=36||o>=37&&o<=40||45===o||t.ctrlKey)&&(l(),e.nodeChanged()),46!==o&&8!==o||e.nodeChanged(),n&&r.typing&&!1===ng(eg(e),i[0])&&(!1===e.isDirty()&&(c(!0),e.fire("change",{level:i[0],lastLevel:null})),e.fire("TypingUndo"),n=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(t>=33&&t<=36||t>=37&&t<=40||45===t)r.typing&&l(e);else{var o=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||t>20)||224===t||91===t||r.typing||o||(r.beforeChange(),u(!0),r.add({},e),n=!0)}}),e.on("MouseDown",function(e){r.typing&&l(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),r={data:i,typing:!1,beforeChange:function(){s()&&(t=gs.getUndoBookmark(e.selection))},add:function(n,r){var a,u,l,f=e.settings;if(l=eg(e),n=n||{},n=Ot.extend(n,l),!1===s()||e.removed)return null;if(u=i[o],e.fire("BeforeAddUndo",{level:n,lastLevel:u,originalEvent:r}).isDefaultPrevented())return null;if(u&&ng(u,n))return null;if(i[o]&&(i[o].beforeBookmark=t),f.custom_undo_redo_levels&&i.length>f.custom_undo_redo_levels){for(a=0;a0&&(c(!0),e.fire("change",d)),n},undo:function(){var t;return r.typing&&(r.add(),r.typing=!1,u(!1)),o>0&&(t=i[--o],tg(e,t,!0),c(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return o0||r.typing&&i[0]&&!ng(eg(e),i[0])},hasRedo:function(){return o
").append(n.childNodes)}))},og[tm="pre"]||(og[tm]=[]),og[tm].push(nm);var sg=function(e,t){ag(og[e],function(e){e(t)})},ug=Ot.each,cg={walk:function(e,t,n){var r,o,i,a,s,u,c,l=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset;if((c=e.select("td[data-mce-selected],th[data-mce-selected]")).length>0)ug(c,function(e){n([e])});else{var p,g,h,v=function(e){var t;return 3===(t=e[0]).nodeType&&t===l&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},y=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},b=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},C=function(e,t,r){var o=r?"nextSibling":"previousSibling";for(s=(a=e).parentNode;a&&a!==t;a=s)s=a.parentNode,(u=y(a===e?a:a[o],o)).length&&(r||u.reverse(),n(v(u)))};if(1===l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(g=m,h=(p=d).childNodes,--g>h.length-1?g=h.length-1:g<0&&(g=0),d=h[g]||p),l===d)return n(v([l]));for(r=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return C(l,r,!0);if(a===r)break}for(a=d;a;a=a.parentNode){if(a===l)return C(d,r);if(a===r)break}o=b(l,r)||l,i=b(d,r)||d,C(l,o,!0),(u=y(o===l?o:o.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&n(v(u)),C(d,i)}}},lg=/^(src|href|style)$/,fg=Ot.each,dg=Uc.isEq,mg=function(e){return/^(TH|TD)$/.test(e.nodeName)},pg=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],vo.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[o>i?i:o]),vo.isText(r)&&n&&o>=r.nodeValue.length&&(r=new to(r,e.getBody()).next()||r),vo.isText(r)&&!n&&0===o&&(r=new to(r,e.getBody()).prev()||r),r},gg=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},hg=function(e,t,n,r){return!(t=Uc.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},vg=function(e,t,n,r,o){var i,a,s,u,c,l,f,d,m,p,g,h,v,y,b,C=e.dom;if(l=C,!(dg(f=r,(d=t).inline)||dg(f,d.block)||(d.selector?vo.isElement(f)&&l.is(f,d.selector):void 0)||(u=r,c=t,c.links&&"A"===u.tagName)))return!1;if("all"!==t.remove)for(fg(t.styles,function(e,i){e=Uc.normalizeStyleValue(C,Uc.replaceVars(e,n),i),"number"==typeof i&&(i=e,o=0),(t.remove_similar||!o||dg(Uc.getStyle(C,o,i),e))&&C.setStyle(r,i,""),s=1}),s&&""===C.getAttrib(r,"style")&&(r.removeAttribute("style"),r.removeAttribute("data-mce-style")),fg(t.attributes,function(e,t){var i;if(e=Uc.replaceVars(e,n),"number"==typeof t&&(t=e,o=0),!o||dg(C.getAttrib(o,t),e)){if("class"===t&&(e=C.getAttrib(r,t))&&(i="",fg(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(i+=(i?" ":"")+e)}),i))return void C.setAttrib(r,t,i);"class"===t&&r.removeAttribute("className"),lg.test(t)&&r.removeAttribute("data-mce-"+t),r.removeAttribute(t)}}),fg(t.classes,function(e){e=Uc.replaceVars(e,n),o&&!C.hasClass(o,e)||C.removeClass(r,e)}),a=C.getAttribs(r),i=0;i1)&&r.isBlock(o)||0!==i?(s.inline||s.wrapper)&&(s.exact||1!==i||((l=p(c=o))&&!xs.isBookmarkNode(l)&&il.matchName(r,l,s)&&(d=r.clone(l,!1),f(d),r.replace(d,c,!0),r.remove(l,1)),o=d||c),_g(e,a,n,o),Pg(e,s,t,n,o),Rg(r,s,n,o),Dg(r,s,n,o),Og(r,s,n,o)):r.remove(o,1)})};if("false"!==c.getContentEditable(l.getNode())){if(s){if(r)r.nodeType?d(a,r)||((i=c.createRng()).setStartBefore(r),i.setEndAfter(r),m(c,Qc(e,i,a),0,!0)):m(c,r,0,!0);else if(u&&s.inline&&!c.select("td[data-mce-selected],th[data-mce-selected]").length)xl(e,t,n);else{var p=e.selection.getNode();e.settings.forced_root_block||!a[0].defaultBlock||c.getParent(p,c.isBlock)||Lg(e,a[0].defaultBlock),e.selection.setRng(Xs(e.selection.getRng())),o=l.getBookmark(),m(c,Qc(e,l.getRng(),a)),s.styles&&Bg(c,s,n,p),l.moveToBookmark(o),Uc.moveStart(c,l,l.getRng()),e.nodeChanged()}sg(t,e)}}else{r=l.getNode();for(var g=0,h=a.length;g0&&t[0],g=p&&p.name;if(l=g,f="string"!=typeof(c=e)?c.nodeName.toLowerCase():c,d=i.getElementRule(f),u=!(!(m=d&&d.parentsRequired)||!m.length)&&(l&&-1!==Ot.inArray(m,l)?l:m[0]))g===u?(o=t[0],t=t.slice(1)):o=u;else if(p)o=t[0],t=t.slice(1);else if(!n)return e;return o&&(r=a(o)).appendChild(e),n&&(r||(r=Hg.create("div")).appendChild(e),Ot.each(n,function(t){var n=a(t);r.insertBefore(n,e)})),s(r,t,o&&o.siblings)};return e&&e.length?(r=e[0],n=a(r),(o=Hg.create("div")).appendChild(s(n,e.slice(1),r.siblings)),o):""},jg=function(e){var t,n={classes:[],attrs:{}};return"*"!==(e=n.selector=Ot.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,r,o,i){switch(t){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==Ot.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""})),n.name=t||"div",n},$g=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Ot.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=Ot.map(e.split(/(?:~\+|~|\+)/),jg),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},Wg=function(e,t){var n,r,o,i,a,s,u="";if(!1===(s=e.settings.preview_styles))return"";"string"!=typeof s&&(s="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var c=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}return"preview"in t&&!1===(s=t.preview)?"":(n=t.block||t.inline||"span",(i=$g(t.selector)).length?(i[0].name||(i[0].name=n),n=t.selector,r=qg(i,e)):r=qg([n],e),o=Hg.select(n,r)[0]||r.firstChild,Vg(t.styles,function(e,t){(e=c(e))&&Hg.setStyle(o,t,e)}),Vg(t.attributes,function(e,t){(e=c(e))&&Hg.setAttrib(o,t,e)}),Vg(t.classes,function(e){e=c(e),Hg.hasClass(o,e)||Hg.addClass(o,e)}),e.fire("PreviewFormats"),Hg.setStyles(r,{position:"absolute",left:-65535}),e.getBody().appendChild(r),a=Hg.getStyle(e.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Vg(s.split(" "),function(t){var n=Hg.getStyle(o,t,!0);if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Hg.getStyle(e.getBody(),t,!0),"#ffffff"===Hg.toHex(n).toLowerCase())||"color"===t&&"#000000"===Hg.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===a)return;n=(n=parseFloat(n)/(/%$/.test(n)?100:1))*a+"px"}"border"===t&&n&&(u+="padding:0 2px;"),u+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),Hg.remove(r),u)},Kg=function(e,t,n,r,o){var i=t.get(n);!il.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?Mg.applyFormat(e,n,r,o):bg(e,n,r,o)},Xg=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},Yg=function(e){var t,n,r,o=(n={},(r=function(e,t){e&&("string"!=typeof e?Ot.each(e,function(e,t){r(t,e)}):(t=t.length?t:[t],Ot.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))})(Ug((t=e).dom)),r(t.settings.formats),{get:function(e){return e?n[e]:n},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}),i=Yl(null);return Xg(e),Cl(e),{get:o.get,register:o.register,unregister:o.unregister,apply:y.curry(Mg.applyFormat,e),remove:y.curry(bg,e),toggle:y.curry(Kg,e,o),match:y.curry(il.match,e),matchAll:y.curry(il.matchAll,e),matchNode:y.curry(il.matchNode,e),canApply:y.curry(il.canApply,e),formatChanged:y.curry(zg,e,i),getCssText:y.curry(Wg,e)}},Gg=function(e){return function(){for(var t=new Array(arguments.length),n=0;n0?i:null),o.attr(s,null)):(i=o.attributes.map[r],"style"===r?i=n.serializeStyle(n.parseStyle(i),o.name):u&&(i=u.call(c,i,r,o.name)),o.attr(r,i.length>0?i:null))}),e.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",n.length>0?n:null))}),e.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attributes.map["data-mce-type"]||n.cleanup||r.remove()}),e.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=Ao.decode(t.value))}),e.addNodeFilter("script,style",function(e,n){for(var r,o,i,a=e.length,s=function(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};a--;)o=(r=e[a]).firstChild?r.firstChild.value:"","script"===n?((i=r.attr("type"))&&r.attr("type","mce-no/type"===i?null:i.replace(/^mce\-/,"")),"xhtml"===t.element_format&&o.length>0&&(r.firstChild.value="// ")):"xhtml"===t.element_format&&o.length>0&&(r.firstChild.value="\x3c!--\n"+s(o)+"\n--\x3e")}),e.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),e.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),e.addAttributeFilter("data-mce-type",function(t){M.each(t,function(t){"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())})}),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},rh=function(e){var t,n,r=function(e){return e&&"br"===e.name};r(t=e.lastChild)&&r(n=t.prev)&&(t.remove(),n.remove())},oh=function(e,t,n){return f=n,(l=e)&&l.hasEventListeners("PreProcess")&&!f.no_events?(o=t,i=n,c=(r=e).dom,o=o.cloneNode(!0),(a=document.implementation).createHTMLDocument&&(s=a.createHTMLDocument(""),Ot.each("BODY"===o.nodeName?o.childNodes:[o],function(e){s.body.appendChild(s.importNode(e,!0))}),o="BODY"!==o.nodeName?s.body.firstChild:s.body,u=c.doc,c.doc=s),eh(r,Zg.merge(i,{node:o})),u&&(c.doc=u),o):t;var r,o,i,a,s,u,c,l,f},ih=function(e,t,n){e.addNodeFilter("font",function(e){M.each(e,function(e){var r,o,i=t.parse(e.attr("style")),a=e.attr("color"),s=e.attr("face"),u=e.attr("size");a&&(i.color=a),s&&(i["font-family"]=s),u&&(i["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(i)),r=e,o=["color","face","size"],M.each(o,function(e){r.attr(e,null)})})})},ah=function(e,t){var n,r=zo();t.convert_fonts_to_spans&&ih(e,r,Ot.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){M.each(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},sh=function(e,t){t.inline_styles&&ah(e,t)},uh=/^[ \t\r\n]*$/,ch={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},lh=function(e,t,n){var r,o,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(r=e[a])return r;for(o=e.parent;o&&o!==t;o=o.parent)if(r=o[a])return r}},fh=function(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})};fh.prototype={replace:function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},attr:function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(t!==undefined){if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}return n.map[e]}},clone:function(){var e,t,n,r,o,i=new fh(this.name,this.type);if(n=this.attributes){for((o=[]).map={},e=0,t=n.length;e0)return void(n.value=o);if(r=n.next){if(3===r.type&&r.value.length){n=n.prev;continue}if(!a[r.name]&&"script"!==r.name&&"style"!==r.name){n=n.prev;continue}}i=n.prev,n.remove(),n=i}};if(c=new em({validate:b,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(t.getSelfClosingElements()),cdata:function(e){f.append(R("#cdata",4)).value=e},text:function(e,t){var n;w||(e=e.replace(E," "),f.lastChild&&C[f.lastChild.name]&&(e=e.replace(x,""))),0!==e.length&&((n=R("#text",3)).raw=!!t,f.append(n).value=e)},comment:function(e){f.append(R("#comment",8)).value=e},pi:function(e,t){f.append(R(e,7)).value=t,D(f)},doctype:function(e){f.append(R("#doctype",10)).value=e,D(f)},start:function(e,n,r){var i,s,u,c,l;if(u=b?t.getElementRule(e):{}){for((i=R(u.outputName||e,1)).attributes=n,i.shortEnded=r,f.append(i),(l=T[f.name])&&T[i.name]&&!l[i.name]&&B.push(i),s=o.length;s--;)(c=o[s].name)in n.map&&((v=a[c])?v.push(i):a[c]=[i]);C[e]&&D(i),r||(f=i),!w&&k[e]&&(w=!0)}},end:function(n){var r,o,i,a,s,c;if(o=b?t.getElementRule(n):{}){if(C[n]&&!w){if((r=f.firstChild)&&3===r.type)if((i=r.value.replace(x,"")).length>0)r.value=i,r=r.next;else for(a=r.next,r.remove(),r=a;r&&3===r.type;)i=r.value,a=r.next,(0===i.length||S.test(i))&&(r.remove(),r=a),r=a;if((r=f.lastChild)&&3===r.type)if((i=r.value.replace(N,"")).length>0)r.value=i,r=r.prev;else for(a=r.prev,r.remove(),r=a;r&&3===r.type;)i=r.value,a=r.prev,(0===i.length||S.test(i))&&(r.remove(),r=a),r=a}if(w&&k[n]&&(w=!1),o.removeEmpty&&yh(t,A,k,f)&&!f.attributes.map.name&&!f.attributes.map.id)return s=f.parent,C[f.name]?f.empty().remove():f.unwrap(),void(f=s);o.paddEmpty&&(vh(c=f,"#text")&&"\xa0"===c.firstChild.value||yh(t,A,k,f))&&hh(e,u,C,f),f=f.parent}}},t),l=f=new fh(u.context||e.root_name,11),c.parse(s),b&&B.length&&(u.context?u.invalid=!0:function(e){var r,o,i,a,s,u,c,l,f,d,m,p,g,h,v,y;for(p=dh("tr,td,th,tbody,thead,tfoot,table"),d=t.getNonEmptyElements(),m=t.getWhiteSpaceElements(),g=t.getTextBlockElements(),h=t.getSpecialElements(),r=0;r1){for(a.reverse(),s=u=n.filterNode(a[0].clone()),f=0;f0}).concat(["noopener"]).sort().join(" ")))}),e.allow_html_in_named_anchor||n.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href")){r=o.parent,t=o.lastChild;do{n=t.prev,r.insert(t,o),t=n}while(t)}}),e.fix_list_elements&&n.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new fh("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),e.validate&&t.getValidClasses()&&n.addAttributeFilter("class",function(e){for(var n,r,o,i,a,s,u,c=e.length,l=t.getValidClasses();c--;){for(r=(n=e[c]).attr("class").split(" "),a="",o=0;oN(C)?(h=E(g*m),g=E(h/m)):(g=E(h/m),h=E(g*m))),b.setStyles(_(r),{width:g,height:h}),x=a.startPos.x+i,w=a.startPos.y+C,x=x>0?x:0,w=w>0?w:0,b.setStyles(o,{left:x,top:w,display:"block"}),o.innerHTML=g+" × "+h,a[2]<0&&r.clientWidth<=g&&b.setStyle(r,"left",c+(f-g)),a[3]<0&&r.clientHeight<=h&&b.setStyle(r,"top",l+(d-h)),(i=S.scrollWidth-v)+(C=S.scrollHeight-y)!=0&&b.setStyles(o,{left:x-i,top:w-C}),p||(t.fire("ObjectResizeStart",{target:n,width:f,height:d}),p=!0)},D=function(){p=!1;var e=function(e,r){r&&(n.style[e]||!t.schema.isValid(n.nodeName.toLowerCase(),e)?b.setStyle(_(n),e,r):b.setAttrib(_(n),e,r))};e("width",g),e("height",h),b.unbind(x,"mousemove",R),b.unbind(x,"mouseup",D),w!==x&&(b.unbind(w,"mousemove",R),b.unbind(w,"mouseup",D)),b.remove(r),b.remove(o),O(n),t.fire("ObjectResized",{target:n,width:g,height:h}),b.setAttrib(n,"style",b.getAttrib(n,"style")),t.nodeChanged()},O=function(e){var p,N,E,k,T;P(),M(),p=b.getPos(e,S),c=p.x,l=p.y,T=e.getBoundingClientRect(),N=T.width||T.right-T.left,E=T.height||T.bottom-T.top,n!==e&&(n=e,g=h=0),k=t.fire("ObjectSelected",{target:e}),B(e)&&!k.isDefaultPrevented()?C(i,function(e,t){var i;(i=b.get("mceResizeHandle"+t))&&b.remove(i),i=b.add(S,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),me.ie&&(i.contentEditable=!1),b.bind(i,"mousedown",function(t){var i;t.stopImmediatePropagation(),t.preventDefault(),s=(i=t).screenX,u=i.screenY,f=_(n).clientWidth,d=_(n).clientHeight,m=d/f,a=e,e.startPos={x:N*e[0]+c,y:E*e[1]+l},v=S.scrollWidth,y=S.scrollHeight,r=n.cloneNode(!0),b.addClass(r,"mce-clonedresizable"),b.setAttrib(r,"data-mce-bogus","all"),r.contentEditable=!1,r.unSelectabe=!0,b.setStyles(r,{left:c,top:l,margin:0}),r.removeAttribute("data-mce-selected"),S.appendChild(r),b.bind(x,"mousemove",R),b.bind(x,"mouseup",D),w!==x&&(b.bind(w,"mousemove",R),b.bind(w,"mouseup",D)),o=b.add(S,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},f+" × "+d)}),e.elm=i,b.setStyles(i,{left:N*e[0]+c-i.offsetWidth/2,top:E*e[1]+l-i.offsetHeight/2})}):P(),n.setAttribute("data-mce-selected","1")},P=function(){var e,t;for(e in M(),n&&n.removeAttribute("data-mce-selected"),i)(t=b.get("mceResizeHandle"+e))&&(b.unbind(t),b.remove(t))},I=function(n){var r,o=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};p||t.removed||(C(b.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"===n.type?n.target:e.getNode(),o(r=b.$(r).closest("table,img,figure.image,hr")[0],S)&&(F(),o(e.getStart(!0),r)&&o(e.getEnd(!0),r))?O(r):P())},L=function(e){return _h(function(e,t){for(;t&&t!==e;){if(Bh(t)||_h(t))return t;t=t.parentNode}return null}(t.getBody(),e))},M=function(){for(var e in i){var t=i[e];t.elm&&(b.unbind(t.elm),delete t.elm)}},F=function(){try{t.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return t.on("init",function(){F(),me.ie&&me.ie>=11&&(t.on("mousedown click",function(e){var n=e.target,r=n.nodeName;p||!/^(TABLE|IMG|HR)$/.test(r)||L(n)||(2!==e.button&&t.selection.select(n,"TABLE"===r),"mousedown"===e.type&&t.nodeChanged())}),t.dom.bind(S,"mscontrolselect",function(e){var n=function(e){ye.setEditorTimeout(t,function(){t.selection.select(e)})};if(L(e.target))return e.preventDefault(),void n(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&n(e.target))}));var e=ye.throttle(function(e){t.composing||I(e)});t.on("nodechange ResizeEditor ResizeWindow drop",e),t.on("keyup compositionend",function(t){n&&"TABLE"===n.nodeName&&e(t)}),t.on("hide blur",P),t.on("contextmenu",A)}),t.on("remove",M),{isResizable:B,showResizeRect:O,hideResizeRect:P,updateResizeRect:I,destroy:function(){n=r=null}}},Dh=function(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}},Oh=function(e,t,n){var r,o,i,a,s,u=e.dom,c=u.getRoot(),l=0;if(s={elm:t,alignToTop:n},e.fire("scrollIntoView",s),!s.isDefaultPrevented()&&vo.isElement(t)){if(!1===n&&(l=t.offsetHeight),"BODY"!==c.nodeName){var f=e.selection.getScrollContainer();if(f)return r=Dh(t).y-Dh(f).y+l,a=f.clientHeight,void((r<(i=f.scrollTop)||r+25>i+a)&&(f.scrollTop=ri+a)&&e.getWin().scrollTo(0,r0){t=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,t),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,s=i&&i.parentElement?i.parentElement():null,vo.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(s,a,Ph))?null:i}return r},Lh=function(e,t){return M.map(t,function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t})},Mh=function(e,t){return Hn.fromDom(e.dom().cloneNode(t))},Fh=function(e){return Mh(e,!0)},zh=function(e){return Mh(e,!1)},Uh=Fh,Vh=function(e,t){var n=(t||document).createDocumentFragment();return M.each(e,function(e){n.appendChild(e.dom())}),Hn.fromDom(n)},Hh=function(e){return Ur.firstChild(e).fold(y.constant([e]),function(t){return[e].concat(Hh(t))})},qh=function(e){return Ur.lastChild(e).fold(y.constant([e]),function(t){return"br"===Zn.name(t)?Ur.prevSibling(t).map(function(t){return[e].concat(qh(t))}).getOr([]):[e].concat(qh(t))})},jh=function(e,t){return hs([(i=t,a=i.startContainer,s=i.startOffset,vo.isText(a)?0===s?E.some(Hn.fromDom(a)):E.none():E.from(a.childNodes[s]).map(Hn.fromDom)),(n=t,r=n.endContainer,o=n.endOffset,vo.isText(r)?o===r.data.length?E.some(Hn.fromDom(r)):E.none():E.from(r.childNodes[o-1]).map(Hn.fromDom))],function(t,n){var r=M.find(Hh(e),y.curry(Dr.eq,t)),o=M.find(qh(e),y.curry(Dr.eq,n));return r.isSome()&&o.isSome()}).getOr(!1);var n,r,o,i,a,s},$h=function(e,t,n,r){var o=n,i=new to(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==Ot.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(me.ie&&me.ie<11&&e.isBlock(n)&&e.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Wh=xr("element","width","rows"),Kh=xr("element","cells"),Xh=xr("x","y"),Yh=function(e,t){var n=parseInt(dr.get(e,t),10);return isNaN(n)?1:n},Gh=function(e){return M.foldl(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},Jh=function(e,t){for(var n=e.rows(),r=0;r0?Vh([o]):o;var n,r,o},av=function(e,t){return(n=e,r=t[0],wu(r,"table",y.curry(Dr.eq,n))).bind(function(e){var n=t[0],r=t[t.length-1],o=Zh(e);return tv(o,n,r).map(function(e){return Vh([ev(e)])})}).getOrThunk(ov);var n,r},sv=function(e,t){var n,r,o=Af(t,e);return o.length>0?av(e,o):(n=e,(r=t).length>0&&r[0].collapsed?ov():iv(n,r[0]))},uv=function(e,t){var n,r=e.selection.getRng(),o=e.dom.create("body"),i=e.selection.getSel(),a=Lh(e,wf(i));if((t=t||{}).get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return e.selection.isCollapsed()?"":ii(r.text||(i.toString?i.toString():""));r.cloneContents?(n=t.contextual?sv(Hn.fromDom(e.getBody()),a).dom():r.cloneContents())&&o.appendChild(n):r.item!==undefined||r.htmlText!==undefined?(o.innerHTML="
"+(r.item?r.item(0).outerHTML:r.htmlText),o.removeChild(o.firstChild)):o.innerHTML=r.toString(),t.getInner=!0;var s=e.selection.serializer.serialize(o,t);return"tree"===t.format?s:(t.content=e.selection.isCollapsed()?"":s,e.fire("GetContent",t),t.content)},cv=function(e,t,n){var r,o,i,a=e.selection.getRng(),s=e.getDoc();if((n=n||{format:"html"}).set=!0,n.selection=!0,n.content=t,n.no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){if(t=n.content,a.insertNode){t+='_',a.startContainer===s&&a.endContainer===s?s.body.innerHTML=t:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=t:a.createContextualFragment?a.insertNode(a.createContextualFragment(t)):(o=s.createDocumentFragment(),i=s.createElement("div"),o.appendChild(i),i.outerHTML=t,a.insertNode(o))),r=e.dom.get("__caret"),(a=s.createRange()).setStartBefore(r),a.setEndBefore(r),e.selection.setRng(a),e.dom.remove("__caret");try{e.selection.setRng(a)}catch(u){}}else a.item&&(s.execCommand("Delete",!1,null),a=e.getRng()),/^\s+/.test(t)?(a.pasteHTML('_'+t),e.dom.remove("__mce_tmp")):a.pasteHTML(t);n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)},lv=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return E.from(i).map(Hn.fromDom).map(function(e){return r&&t.collapsed?e:Ur.child(e,o(e,a)).getOr(e)}).bind(function(e){return Zn.isElement(e)?E.some(e):Ur.parent(e)}).map(function(e){return e.dom()}).getOr(e)},fv=function(e,t,n){return lv(e,t,!0,n,function(e,t){return Math.min(Ur.childNodesCount(e),t)})},dv=function(e,t,n){return lv(e,t,!1,n,function(e,t){return t>0?t-1:t})},mv=function(e,t){for(var n=e;e&&vo.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},pv=Ot.each,gv=function(e){return!!e.select},hv=function(e){return!(!e||!e.ownerDocument)&&Dr.contains(Hn.fromDom(e.ownerDocument),Hn.fromDom(e))},vv=function(e,t,n,r){var o,i,a,s,u,c=function(e,t){return cv(r,e,t)},l=function(e){var t=d();t.collapse(!!e),m(t)},f=function(){return t.getSelection?t.getSelection():t.document.selection},d=function(){var n,o,i,u,c=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!t)return null;if(void 0===(u=t.document)||null===u)return null;if(r.bookmark!==undefined&&!1===hm(r)){var l=Td(r);if(l.isSome())return l.map(function(e){return Lh(r,[e])[0]}).getOr(u.createRange())}try{(n=f())&&(o=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():u.createRange())}catch(d){}return(o=Lh(r,[o])[0])||(o=u.createRange?u.createRange():u.body.createTextRange()),o.setStart&&9===o.startContainer.nodeType&&o.collapsed&&(i=e.getRoot(),o.setStart(i,0),o.setEnd(i,0)),a&&s&&(0===c(o.START_TO_START,o,a)&&0===c(o.END_TO_END,o,a)?o=s:(a=null,s=null)),o},m=function(e,t){var n,o;if((i=e)&&(gv(i)||hv(i.startContainer)&&hv(i.endContainer))){var i,u=gv(e)?e:null;if(u){s=null;try{u.select()}catch(c){}}else{if(n=f(),e=r.fire("SetSelectionRange",{range:e,forward:t}).range,n){s=e;try{n.removeAllRanges(),n.addRange(e)}catch(c){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),a=n.rangeCount>0?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||me.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(o=e.startContainer.childNodes[e.startOffset])&&"IMG"===o.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(o,0,o,1)),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}},p=function(){var t,n,r=f();return!(r&&r.anchorNode&&r.focusNode)||((t=e.createRng()).setStart(r.anchorNode,r.anchorOffset),t.collapse(!0),(n=e.createRng()).setStart(r.focusNode,r.focusOffset),n.collapse(!0),t.compareBoundaryPoints(t.START_TO_START,n)<=0)},g={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:n,editor:r,collapse:l,setCursorLocation:function(t,n){var o=e.createRng();t?(o.setStart(t,n),o.setEnd(t,n),m(o),l(!1)):($h(e,o,r.getBody(),!0),m(o))},getContent:function(e){return uv(r,e)},setContent:c,getBookmark:function(e,t){return o.getBookmark(e,t)},moveToBookmark:function(e){return o.moveToBookmark(e)},select:function(t,n){var r,o,i;return(r=e,o=t,i=n,E.from(o).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),i&&($h(r,n,e,!0),$h(r,n,e,!1)),n})).each(m),t},isCollapsed:function(){var e=d(),t=f();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:p,setNode:function(t){return c(e.getOuterHTML(t)),t},getNode:function(){return e=r.getBody(),(t=d())?(o=t.startContainer,i=t.endContainer,a=t.startOffset,s=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(o===i&&s-a<2&&o.hasChildNodes()&&(n=o.childNodes[a]),3===o.nodeType&&3===i.nodeType&&(o=o.length===a?mv(o.nextSibling,!0):o.parentNode,i=0===s?mv(i.previousSibling,!1):i.parentNode,o&&o===i))?o:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,o,i,a,s},getSel:f,setRng:m,getRng:d,getStart:function(e){return fv(r.getBody(),d(),e)},getEnd:function(e){return dv(r.getBody(),d(),e)},getSelectedBlocks:function(t,n){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||fv(i,t,!1),e.isBlock),r=e.getParent(r||dv(i,t,!1),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r){o=n;for(var s=new to(n,i);(o=s.next())&&o!==r;)e.isBlock(o)&&a.push(o)}return r&&n!==r&&r!==i&&a.push(r),a}(e,d(),t,n)},normalize:function(){var t=d();if(!Ef(f())){var n=Jf.normalize(e,t);return n.each(function(e){m(e,p())}),n.getOr(t)}return t},selectorChanged:function(t,n){var o;return u||(u={},o={},r.on("NodeChange",function(t){var n=t.element,r=e.getParents(n,null,e.getRoot()),i={};pv(u,function(t,n){pv(r,function(a){if(e.is(a,n))return o[n]||(pv(t,function(e){e(!0,{node:a,selector:n,parents:r})}),o[n]=t),i[n]=t,!1})}),pv(o,function(e,t){i[t]||(delete o[t],pv(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),u[t]||(u[t]=[]),u[t].push(n),g},getScrollContainer:function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(e,t){return Oh(r,e,t)},placeCaretAt:function(e,t){return m(Ih(e,t,r.getDoc()))},getBoundingClientRect:function(){var e=d();return e.collapsed?ia.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){t=null,i.destroy()}};return o=Ah(g),i=Rh(g,r),g.bookmarkManager=o,g.controlSelection=i,g},yv=ji.curry,bv=function(e,t,n,r,o,i){var a,s,u=0,c=[],l=function(r){var i,a,l;for(l=gp.getClientRects(r),-1===e&&(l=l.reverse()),i=0;i0&&t(a,At.last(c))&&u++,a.line=u,o(a))return!0;c.push(a)}};return(s=At.last(i.getClientRects()))?(l(a=i.getNode()),function(e,t,n,r){for(;r=_a.findNode(r,e,ki,t);)if(n(r))return}(e,r,l,a),c):c},Cv={upUntil:yv(bv,-1,Ii,Li),downUntil:yv(bv,1,Li,Ii),positionsUntil:function(e,t,n,r){var o,i,a,s,u,c,l=Ha(t),f=[],d=0,m=function(e){return At.last(e.getClientRects())};1===e?(o=l.next,i=Li,a=Ii,s=ia.after(r)):(o=l.prev,i=Ii,a=Li,s=ia.before(r)),c=m(s);do{if(s.isVisible()&&!a(u=m(s),c)){if(f.length>0&&i(u,At.last(f))&&d++,(u=Di(u)).position=s,u.line=d,n(u))return f;f.push(u)}}while(s=o(s));return f},isAboveLine:yv(function(e,t){return t.line>e}),isLine:yv(function(e,t){return t.line===e})},xv=vo.isContentEditableFalse,wv=Fi,Nv=_a.isAfterContentEditableFalse,Ev=_a.isBeforeContentEditableFalse,Sv=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},kv=function(e,t,n){return n=_a.normalizeRange(e,t,n),-1===e?ia.fromRangeStart(n):ia.fromRangeEnd(n)},Tv=function(e,t,n,r,o){var i,a,s,u,c,l,f,d;return!o.collapsed&&(i=wv(o),xv(i))?Dp(e,t,i,-1===e):(c=o,u=mi.isCaretContainerBlock(c.startContainer),r(a=kv(e,t.getBody(),o))?Op(t,a.getNode(-1===e)):(a=n(a))?r(a)?Dp(e,t,a.getNode(-1===e),1===e):r(s=n(a))&&(l=a,f=s,!(d=_a.isInSameBlock(l,f))&&vo.isBr(l.getNode())||d)?Dp(e,t,s.getNode(-1===e),1===e):u?Ip(t,a.toRange()):null:u?o:null)},Av=function(e,t,n){var r,o,i,a,s=Ha(e.getBody()),u=ji.curry(Sv,s.next),c=ji.curry(Sv,s.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?u(ia.fromRangeStart(n)):c(ia.fromRangeStart(n)))||(a=(i=e).dom.create(i.settings.forced_root_block),(!me.ie||me.ie>=11)&&(a.innerHTML='
'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},_v=function(e,t){var n,r=t?1:-1,o=t?Cv.downUntil:Cv.upUntil,i=e.selection.getRng();return(n=function(e,t,n,r){var o,i,a,s,u,c,l,f,d;if(d=wv(r),o=kv(e,t.getBody(),r),i=n(t.getBody(),Cv.isAboveLine(1),o),a=At.filter(i,Cv.isLine(1)),u=At.last(o.getClientRects()),Ev(o)&&(d=o.getNode()),Nv(o)&&(d=o.getNode(!0)),!u)return null;if(c=u.left,(s=Ep(a,c))&&xv(s.node))return l=Math.abs(c-s.left),f=Math.abs(c-s.right),Dp(e,t,s.node,l")},qv=function(e){return e.getParam("document_base_url","")},jv=function(e){return Uv(e,"body_id","tinymce")},$v=function(e){return Uv(e,"body_class","")},Wv=function(e){return e.getParam("content_security_policy","")},Kv=function(e){return e.getParam("br_in_pre",!0)},Xv=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},Yv=function(e){return e.getParam("forced_root_block_attrs",{})},Gv=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Jv=function(e){return e.getParam("no_newline_selector","")},Qv=function(e){return e.getParam("keep_styles",!0)},Zv=function(e){return e.getParam("end_container_on_empty_block",!1)},ey=function(e){return E.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},ty=function(e,t){var n,r,o,i=t,a=e.dom,s=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var u=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(o=a.createRng(),t.normalize(),t.hasChildNodes()){for(n=new to(t,t);r=n.current();){if(vo.isText(r)){o.setStart(r,0),o.setEnd(r,0);break}if(s[r.nodeName.toLowerCase()]){o.setStartBefore(r),o.setEndBefore(r);break}i=r,r=n.next()}r||(o.setStart(i,0),o.setEnd(i,0))}else vo.isBr(t)?t.nextSibling&&a.isBlock(t.nextSibling)?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)):(o.setStart(t,0),o.setEnd(t,0));e.selection.setRng(o),a.remove(void 0),e.selection.scrollIntoView(t)}},ny=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},ry=ey,oy=function(e){return ey(e).fold(y.constant(""),function(e){return e.nodeName.toUpperCase()})},iy=function(e){return ey(e).filter(function(e){return io.isListItem(Hn.fromDom(e))}).isSome()},ay=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},sy=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},uy=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},cy=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!vo.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},ly=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var s;sy(s=n)&&sy(s.parentNode)&&(o="LI");var u,c,l=o?t(o):i.create("BR");if(cy(n,r,!0)&&cy(n,r,!1))ay(n,"LI")?i.insertAfter(l,uy(n)):i.replace(l,n);else if(cy(n,r,!0))ay(n,"LI")?(i.insertAfter(l,uy(n)),l.appendChild(i.doc.createTextNode(" ")),l.appendChild(n)):n.parentNode.insertBefore(l,n);else if(cy(n,r,!1))i.insertAfter(l,uy(n));else{n=uy(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var d=f.extractContents();"LI"===o&&(c="LI",(u=d).firstChild&&u.firstChild.nodeName===c)?(l=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(l,n))}i.remove(r),ty(e,l)}},fy=function(e){e.innerHTML='
'},dy=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},my=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},py=function(e,t,n){return!1===vo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===oi?0:n:n===t.data.length-1&&t.data.charAt(n)===oi?t.data.length:n},gy=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},hy=function(e,t){var n=Xv(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,Yv(e))},vy=function(e,t){var n,r,o,i,a,s,u,c,l,f,d,m,p,g,h,v,y,b,C=e.dom,x=e.schema,w=x.getNonEmptyElements(),N=e.selection.getRng(),E=function(t){var n,i,s,u=o,c=x.getTextInlineElements();if(t||"TABLE"===f||"HR"===f?(n=C.create(t||m),hy(e,n)):n=a.cloneNode(!1),s=n,!1===Qv(e))C.setAttrib(n,"style",null),C.setAttrib(n,"class",null);else do{if(c[u.nodeName]){if(Nl(u))continue;i=u.cloneNode(!1),C.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(s=i,n.appendChild(i))}}while((u=u.parentNode)&&u!==r);return fy(s),n},S=function(e){var t,n,r,s;if(s=py(e,o,i),vo.isText(o)&&(e?s>0:so.childNodes.length-1,o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o,i=p&&vo.isText(o)?o.nodeValue.length:0),(r=gy(C,o))&&((m&&!s||!m&&s)&&(o=function(e,t,n,r,o){var i,a,s,u,c,l,f,d=t||"P",m=e.dom,p=gy(m,r);if(!(a=m.getParent(r,m.isBlock))||!my(m,a)){if(l=(a=a||p)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),hy(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(u=r;u.parentNode!==a;)u=u.parentNode;for(;u&&!m.isBlock(u);)s=u,u=u.previousSibling;if(s&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),hy(e,i),s.parentNode.insertBefore(i,s),u=s;u&&!m.isBlock(u);)c=u.nextSibling,i.appendChild(u),u=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(e,m,N,o,i)),a=C.getParent(o,C.isBlock),l=a?C.getParent(a.parentNode,C.isBlock):null,f=a?a.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||t.ctrlKey||(a=l,l=l.parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&C.isEmpty(a)?ly(e,E,l,a,m):m&&a===e.getBody()||(m=m||"P",mi.isCaretContainerBlock(a)?(u=mi.showCaretContainerBlock(a),C.isEmpty(a)&&fy(a),ty(e,u)):S()?k():S(!0)?(u=a.parentNode.insertBefore(E(),a),ty(e,dy(a,"HR")?u:a)):((n=(y=N,b=y.cloneRange(),b.setStart(y.startContainer,py(!0,y.startContainer,y.startOffset)),b.setEnd(y.endContainer,py(!1,y.endContainer,y.endOffset)),b).cloneRange()).setEndAfter(a),function(e){do{vo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)}(c=n.extractContents()),u=c.firstChild,C.insertAfter(c,a),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;vo.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=o)&&"A"===a.nodeName&&0===Ot.trim(ii(a.innerText||a.textContent)).length&&e.remove(o);var a}}(C,w,u),g=C,(h=a).normalize(),(v=h.lastChild)&&!/^(left|right)$/gi.test(g.getStyle(v,"float",!0))||g.add(h,"br"),C.isEmpty(a)&&fy(a),u.normalize(),C.isEmpty(u)?(C.remove(u),k()):ty(e,u)),C.setAttrib(u,"id",""),e.fire("NewBlock",{newBlock:u})))},yy=function(e,t){return ry(e).filter(function(e){return t.length>0&&_r.is(Hn.fromDom(e),t)}).isSome()},by=function(e){return yy(e,Gv(e))},Cy=function(e){return yy(e,Jv(e))},xy=Qu([{br:[]},{block:[]},{none:[]}]),wy=function(e,t){return Cy(e)},Ny=function(e){return function(t,n){return""===Xv(t)===e}},Ey=function(e){return function(t,n){return iy(t)===e}},Sy=function(e){return function(t,n){return"PRE"===oy(t)===e}},ky=function(e){return function(t,n){return Kv(t)===e}},Ty=function(e,t){return by(e)},Ay=function(e,t){return t},_y=function(e){var t=Xv(e),n=ny(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},By=function(e,t){return function(n,r){return M.foldl(e,function(e,t){return e&&t(n,r)},!0)?E.some(t):E.none()}},Ry=function(e,t){return Tl([By([wy],xy.none()),By([Sy(!0),ky(!1),Ay],xy.br()),By([Sy(!0),ky(!1)],xy.block()),By([Sy(!0),ky(!0),Ay],xy.block()),By([Sy(!0),ky(!0)],xy.br()),By([Ey(!0),Ay],xy.br()),By([Ey(!0)],xy.block()),By([Ny(!0),Ay,_y],xy.block()),By([Ny(!0)],xy.br()),By([Ty],xy.br()),By([Ny(!1),Ay],xy.br()),By([_y],xy.block())],[e,t.shiftKey]).getOr(xy.none())},Dy=function(e,t){Ry(e,t).fold(function(){sd(e,t)},function(){vy(e,t)},y.noop)},Oy=function(e){e.on("keydown",function(t){var n,r,o;t.keyCode===Mp.ENTER&&(n=e,(r=t).isDefaultPrevented()||(r.preventDefault(),(o=n.undoManager).typing&&(o.typing=!1,o.add()),n.undoManager.transact(function(){!1===n.selection.isCollapsed()&&n.execCommand("Delete"),Dy(n,r)})))})},Py=function(e,t,n){return s=t,!(!Iy(n)||!vo.isText(s.container())||(r=e,i=(o=t).container(),a=o.offset(),i.insertData(a,"\xa0"),r.selection.setCursorLocation(i,a+1),0));var r,o,i,a,s},Iy=function(e){return e.fold(y.constant(!1),y.constant(!0),y.constant(!0),y.constant(!1))},Ly=function(e){return!!e.selection.isCollapsed()&&(t=e,n=y.curry(vu.isInlineTarget,t),r=ia.fromRangeStart(t.selection.getRng()),$l(n,t.getBody(),r).map(y.curry(Py,t,r)).getOr(!1));var t,n,r},My=function(e){e.on("keydown",function(t){var n,r;!1===t.isDefaultPrevented()&&(n=e,r=t,Pv([{keyCode:Mp.SPACEBAR,action:Ov(Ly,n)}],r).each(function(e){r.preventDefault()}))})},Fy=function(e){var t=of.setupSelectedState(e);Iv(e,t),zv(e,t),Oy(e),My(e)},zy=function(e){var t,n,r,o=Ot.each,i=Mp.BACKSPACE,a=Mp.DELETE,s=e.dom,u=e.selection,c=e.settings,l=e.parser,f=me.gecko,d=me.ie,m=me.webkit,p="data:text/mce-internal,",g=d?"Text":"URL",h=function(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},v=function(e){return e.isDefaultPrevented()},y=function(){e.shortcuts.add("meta+a",null,"SelectAll")},b=function(){e.on("keydown",function(e){if(!v(e)&&e.keyCode===i&&u.isCollapsed()&&0===u.getRng().startOffset){var t=u.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(t){var n;if("HTML"===t.target.nodeName){if(me.ie>11)return void e.getBody().focus();n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()}}))};return e.on("keydown",function(t){var n,r,o,i,a;if(!v(t)&&t.keyCode===Mp.BACKSPACE&&(r=(n=u.getRng()).startContainer,o=n.startOffset,i=s.getRoot(),a=r,n.collapsed&&0===o)){for(;a&&a.parentNode&&a.parentNode.firstChild===a&&a.parentNode!==i;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(e.formatter.toggle("blockquote",null,a),(n=s.createRng()).setStart(r,0),n.setEnd(r,0),u.setRng(n))}}),t=function(e){var t=s.create("body"),n=e.cloneContents();return t.appendChild(n),u.serializer.serialize(t,{format:"html"})},e.on("keydown",function(n){var r,o,u,c,l,f=n.keyCode;if(!v(n)&&(f===a||f===i)){if(r=e.selection.isCollapsed(),o=e.getBody(),r&&!s.isEmpty(o))return;if(!r&&(u=e.selection.getRng(),c=t(u),(l=s.createRng()).selectNode(e.getBody()),c!==t(l)))return;n.preventDefault(),e.setContent(""),o.firstChild&&s.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()}}),me.windowsPhone||e.on("keyup focusin mouseup",function(e){Mp.modifierPressed(e)||u.normalize()},!0),m&&(e.settings.content_editable||s.bind(e.getDoc(),"mousedown mouseup",function(t){var n;if(t.target===e.getDoc().documentElement)if(n=u.getRng(),e.getBody().focus(),"mousedown"===t.type){if(mi.isCaretContainer(n.startContainer))return;u.placeCaretAt(t.clientX,t.clientY)}else u.setRng(n)}),e.on("click",function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==s.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&s.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),u.select(n))}),c.forced_root_block&&e.on("init",function(){h("DefaultParagraphSeparator",c.forced_root_block)}),e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(e){e.preventDefault()})}),b(),l.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),me.iOS?(e.inline||e.on("keydown",function(){document.activeElement===document.body&&e.getWin().focus()}),C(),e.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):y()),me.ie>=11&&(C(),b()),me.ie&&(y(),h("AutoUrlDetect",!1),e.on("dragstart",function(t){var n,r,o;(n=t).dataTransfer&&(e.selection.isCollapsed()&&"IMG"===n.target.tagName&&u.select(n.target),(r=e.selection.getContent()).length>0&&(o=p+escape(e.id)+","+escape(r),n.dataTransfer.setData(g,o)))}),e.on("drop",function(t){if(!v(t)){var n=(a=t).dataTransfer&&(s=a.dataTransfer.getData(g))&&s.indexOf(p)>=0?(s=s.substr(p.length).split(","),{id:unescape(s[0]),html:unescape(s[1])}):null;if(n&&n.id!==e.id){t.preventDefault();var r=Ih(t.x,t.y,e.getDoc());u.setRng(r),o=n.html,i=!0,e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):e.execCommand("mceInsertContent",!1,o)}}var o,i,a,s})),f&&(e.on("keydown",function(t){if(!v(t)&&t.keyCode===i){if(!e.getBody().getElementsByTagName("hr").length)return;if(u.isCollapsed()&&0===u.getRng().startOffset){var n=u.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return s.remove(n),void t.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(s.remove(r),t.preventDefault())}}}),Range.prototype.getClientRects||e.on("mousedown",function(t){if(!v(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),ye.setEditorTimeout(e,function(){n.focus()})}}),n=function(){var t=s.getAttribs(u.getStart().cloneNode(!1));return function(){var n=u.getStart();n!==e.getBody()&&(s.setAttrib(n,"style",null),o(t,function(e){n.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!u.isCollapsed()&&s.getParent(u.getStart(),s.isBlock)!==s.getParent(u.getEnd(),s.isBlock)},e.on("keypress",function(t){var o;if(!v(t)&&(8===t.keyCode||46===t.keyCode)&&r())return o=n(),e.getDoc().execCommand("delete",!1,null),o(),t.preventDefault(),!1}),s.bind(e.getDoc(),"cut",function(t){var o;!v(t)&&r()&&(o=n(),ye.setEditorTimeout(e,function(){o()}))}),c.readonly||e.on("BeforeExecCommand MouseDown",function(){h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),c.object_resizing||h("enableObjectResizing",!1)}),e.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(s.select("a"),function(e){var t=e.parentNode,n=s.getRoot();if(t.lastChild===e){for(;t&&!s.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}s.add(t,"br",{"data-mce-bogus":1})}})}),e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),me.mac&&e.on("keydown",function(t){!Mp.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))}),b()),{refreshContentEditable:function(){},isHidden:function(){var t;return!f||e.removed?0:!(t=e.selection.getSel())||!t.rangeCount||0===t.rangeCount}}},Uy=Xo.DOM,Vy=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&ye.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)},Hy=function(e,t){var n,r,o,i,a,s,u,c,l,f=e.settings,d=e.getElement(),m=e.getDoc();f.inline||(e.getElement().style.visibility=e.orgVisibility),t||f.content_editable||(m.open(),m.write(e.iframeHTML),m.close()),f.content_editable&&(e.on("remove",function(){var e=this.getBody();Uy.removeClass(e,"mce-content-body"),Uy.removeClass(e,"mce-edit-focus"),Uy.setAttrib(e,"contentEditable",null)}),Uy.addClass(d,"mce-content-body"),e.contentDocument=m=f.content_document||document,e.contentWindow=f.content_window||window,e.bodyElement=d,f.content_document=f.content_window=null,f.root_name=d.nodeName.toLowerCase()),(n=e.getBody()).disabled=!0,e.readonly=f.readonly,e.readonly||(e.inline&&"static"===Uy.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=e.getParam("content_editable_state",!0)),n.disabled=!1,e.editorUpload=Jm(e),e.schema=Fo(f),e.dom=new Xo(m,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:f.force_hex_style_colors,class_filter:f.class_filter,update_styles:!0,root_element:e.inline?e.getBody():null,collect:f.content_editable,schema:e.schema,onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=((i=bh((o=e).settings,o.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,i,a=e.length,s=o.dom;a--;)if(r=(n=e[a]).attr(t),i="data-mce-"+t,!n.attributes.map[i]){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=s.serializeStyle(s.parseStyle(r),n.name)).length||(r=null),n.attr(i,r),n.attr(t,r)):"tabindex"===t?(n.attr(i,r),n.attr(t,null)):n.attr(i,o.convertURL(r,t,n.name))}}),i.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),i.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),i.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=o.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new fh("br",1)).shortEnded=!0)}),i),e.serializer=Nh(f,e),e.selection=vv(e.dom,e.getWin(),e.serializer,e),e.formatter=Yg(e),e.undoManager=rg(e),e._nodeChangeDispatcher=new tp(e),e._selectionOverrides=Hp(e),kh(e),Fy(e),ep(e),e.fire("PreInit"),f.browser_spellcheck||f.gecko_spellcheck||(m.body.spellcheck=!1,Uy.setAttrib(n,"spellcheck","false")),e.quirks=zy(e),e.fire("PostRender"),f.directionality&&(n.dir=f.directionality),f.nowrap&&(n.style.whiteSpace="nowrap"),f.protect&&e.on("BeforeSetContent",function(e){Ot.each(f.protect,function(t){e.content=e.content.replace(t,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),f.padd_empty_editor&&e.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|
|)<\/p>[\r\n]*|
[\r\n]*)$/,"")}),e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"}),e.on("compositionstart compositionend",function(t){e.composing="compositionstart"===t.type}),e.contentStyles.length>0&&(r="",Ot.each(e.contentStyles,function(e){r+=e+"\r\n"}),e.dom.addStyle(r)),(a=e,a.inline?Uy.styleSheetLoader:a.dom.styleSheetLoader).loadAll(e.contentCSS,function(t){Vy(e)},function(t){Vy(e)}),f.content_style&&(s=e,u=f.content_style,c=Hn.fromDom(s.getDoc().head),l=Hn.fromTag("style"),dr.set(l,"type","text/css"),ks.append(l,Hn.fromText(u)),ks.append(c,l))},qy=Xo.DOM,jy=function(e,t){var n,r,o,i,a,s,u,c=e.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),l=(n=e.id,r=c,o=t.height,i=Vv(e),u=Hn.fromTag("iframe"),dr.setAll(u,i),dr.setAll(u,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),br(u,{width:"100%",height:(a=o,s="number"==typeof a?a+"px":a,s||""),display:"block"}),u).dom();l.onload=function(){l.onload=null,e.fire("load")};var f,d,m,p,g=function(e,t){if(document.domain!==window.location.hostname&&me.ie&&me.ie<12){var n=Gm("mce");e[n]=function(){Hy(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return qy.setAttrib(t,"src",r),!0}return!1}(e,l);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=l,e.iframeHTML=(p=Hv(f=e)+"
",qv(f)!==f.documentBaseUrl&&(p+=''),p+='',d=jv(f),m=$v(f),Wv(f)&&(p+=''),p+='
'),qy.add(t.iframeContainer,l),g},$y=function(e,t){var n=jy(e,t);t.editorContainer&&(qy.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=qy.isHidden(t.editorContainer)),e.getElement().style.display="none",qy.setAttrib(e.id,"aria-hidden",!0),n||Hy(e)},Wy=Xo.DOM,Ky=function(e,t,n){var r,o,i=Im.get(n);if(r=Im.urls[n]||e.documentBaseUrl.replace(/\/$/,""),n=Ot.trim(n),i&&-1===Ot.inArray(t,n)){if(Ot.each(Im.dependencies(n),function(n){Ky(e,t,n)}),e.plugins[n])return;o=new i(e,r,e.$),e.plugins[n]=o,o.init&&(o.init(e,r),t.push(n))}},Xy=function(e){return e.replace(/^\-/,"")},Yy=function(e){return{editorContainer:e,iframeContainer:e}},Gy=function(e){var t,n,r=e.getElement();return e.inline?Yy(null):(t=r,n=Wy.create("div"),Wy.insertAfter(n,t),Yy(n))},Jy=function(e){var t,n,r,o,i,a,s,u,c,l,f,d=e.settings,m=e.getElement();return e.orgDisplay=m.style.display,tr.isString(d.theme)?(l=(o=e).settings,f=o.getElement(),i=l.width||Wy.getStyle(f,"width")||"100%",a=l.height||Wy.getStyle(f,"height")||f.offsetHeight,s=l.min_height||100,(u=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),u.test(""+a)&&(a=Math.max(parseInt(a,10),s)),c=o.theme.renderUI({targetNode:f,width:i,height:a,deltaWidth:l.delta_width,deltaHeight:l.delta_height}),l.content_editable||(a=(c.iframeHeight||a)+("number"==typeof a?c.deltaHeight||0:""))=n.length)for(r=0,o=e.length;r=n.length||e[r]!==n[r]){i=r+1;break}if(e.length=e.length||e[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=e.length-(i-1);r=0;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?i>0?i--:a.push(t[n]):i++);return 0!==(o=(n=e.length-i)<=0?a.reverse().join("/"):e.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(n.protocol?t+=n.protocol+"://":t+="//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},ub.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},ub.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t};var cb=Xo.DOM,lb=Ot.extend,fb=Ot.each,db=Ot.trim,mb=Ot.resolve,pb=me.ie,gb=function(e,t,n){var r,o,i,a,s,u,c,l,f,d=this;r=d.documentBaseUrl=n.documentBaseURL,o=n.baseURI,i=d,a=e,s=r,u=n.defaultSettings,c=t,f={id:a,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:s,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(l=i).convertURL,url_converter_scope:l,ie7_compat:!0},t=lu(ou,f,u,c),d.settings=t,ti.language=t.language||"en",ti.languageLoad=t.language_load,ti.baseURL=n.baseURL,d.id=e,d.setDirty(!1),d.plugins={},d.documentBaseURI=new ub(t.document_base_url,{base_uri:o}),d.baseURI=o,d.contentCSS=[],d.contentStyles=[],d.shortcuts=new Jd(d),d.loadedCSS={},d.editorCommands=new Od(d),d.suffix=n.suffix,d.editorManager=n,d.inline=t.inline,d.buttons={},d.menuItems={},t.cache_suffix&&(me.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(me.overrideViewPort=!1),n.fire("SetupEditor",d),d.execCallback("setup",d),d.$=Qt.overrideDefaults(function(){return{context:d.inline?d.getBody():d.getDoc(),element:d.getBody()}})};lb(gb.prototype={render:function(){nb(this)},focus:function(e){gm(this,e)},execCallback:function(e){var t,n=this.settings[e];if(n)return this.callbackLookup&&(t=this.callbackLookup[e])&&(n=t.func,t=t.scope),"string"==typeof n&&(t=(t=n.replace(/\.\w+$/,""))?mb(t):0,n=mb(n),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:n,scope:t}),n.apply(t||this,Array.prototype.slice.call(arguments,1))},translate:function(e){if(e&&Ot.is(e,"string")){var t=this.settings.language||"en",n=this.editorManager.i18n;e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"})}return this.editorManager.translate(e)},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(t!==undefined?t:"{#"+e+"}")},getParam:function(e,t,n){return mu(this,e,t,n)},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.stateSelector&&"undefined"==typeof t.active&&(t.active=!1),t.text||t.icon||(t.icon=e),n.buttons=n.buttons,t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return rb(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems,n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:Gm("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(cb.show(this.getContainer()),cb.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(pb&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(cb.hide(e.getContainer()),cb.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();return this.removed?"":n?((e=e||{}).load=!0,t=this.setContent(n.value!==undefined?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t):void 0},save:function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(o.nodeName)?o.value=t:(r.inline||(o.innerHTML=t),(n=cb.getParent(r.id,"form"))&&fb(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){var n,r,o=this,i=o.getBody();return(t=t||{}).format=t.format||"html",t.set=!0,t.content=e,t.no_events||o.fire("BeforeSetContent",t),0===(e=t.content).length||/^\s+$/.test(e)?(r=pb&&pb<11?"":'
',"TABLE"===i.nodeName?e=""+r+" |
":/^(UL|OL)$/.test(i.nodeName)&&(e=""+r+""),(n=o.settings.forced_root_block)&&o.schema.isValidChild(i.nodeName.toLowerCase(),n.toLowerCase())?(e=r,e=o.dom.createHTML(n,o.settings.forced_root_block_attrs,e)):pb||e||(e='
'),o.dom.setHTML(i,e),o.fire("SetContent",t)):("raw"!==t.format&&(e=zs({validate:o.validate},o.schema).serialize(o.parser.parse(e,{isRootContent:!0,insert:!0}))),t.content=db(e),o.dom.setHTML(i,t.content),t.no_events||o.fire("SetContent",t)),t.content},getContent:function(e){var t,n=this.getBody();if(this.removed)return"";if((e=e||{}).format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||this.fire("BeforeGetContent",e),"raw"===e.format)t=Ot.trim(om(this.serializer,n.innerHTML));else if("text"===e.format)t=n.innerText||n.textContent;else{if("tree"===e.format)return this.serializer.serialize(n,e);t=this.serializer.serialize(n,e)}return"text"!==e.format?e.content=db(t):e.content=t,e.no_events||this.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=lb({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},setMode:function(e){Wd(this,e)},getContainer:function(){return this.container||(this.container=cb.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=cb.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var t,n=this,r=n.settings,o=n.dom;e=e||n.getBody(),n.hasVisual===undefined&&(n.hasVisual=r.visual),fb(o.select("table,a",e),function(e){var i;switch(e.nodeName){case"TABLE":return t=r.visual_table_class||"mce-item-table",void((i=o.getAttrib(e,"border"))&&"0"!==i||!n.hasVisual?o.removeClass(e,t):o.addClass(e,t));case"A":return void(o.getAttrib(e,"href",!1)||(i=o.getAttrib(e,"name")||e.id,t=r.visual_anchor_class||"mce-item-anchor",i&&n.hasVisual?o.addClass(e,t):o.removeClass(e,t)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&cb.remove(e.getElement().nextSibling),e.inline||(pb&&pb<10&&e.getDoc().execCommand("SelectAll",!1,null),cb.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),cb.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t,n=this;n.destroyed||(e||n.removed?(e||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.selection.destroy(),n.dom.destroy()),(t=n.formElement)&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),cb.unbind(t,"submit reset",n.formEventDelegate)),n.contentAreaContainer=n.formElement=n.container=n.editorContainer=null,n.bodyElement=n.contentDocument=n.contentWindow=null,n.iframeElement=n.targetElm=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1):n.remove())},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},qd);var hb,vb,yb,bb={isEditorUIElement:function(e){return-1!==e.className.toString().indexOf("mce-")}},Cb=function(e,t){var n,r,o=Un.detect().browser;o.isIE()||o.isEdge()?(r=e).on("focusout",function(){Sd(r)}):(n=t,e.on("mouseup touchend",function(e){n.throttle()})),e.on("keyup nodechange",function(t){var n;"nodechange"===(n=t).type&&n.selectionChange||Sd(e)})},xb=function(e){var t,n,r,o=Tp(function(){Sd(e)},0);e.inline&&(t=e,n=o,r=function(){n.throttle()},Xo.DOM.bind(document,"mouseup",r),t.on("remove",function(){Xo.DOM.unbind(document,"mouseup",r)})),e.on("init",function(){Cb(e,o)}),e.on("remove",function(){o.cancel()})},wb=Xo.DOM,Nb=function(e){return bb.isEditorUIElement(e)},Eb=function(e,t){var n=e?e.settings.custom_ui_selector:"";return null!==wb.getParent(t,function(t){return Nb(t)||!!n&&e.dom.is(t,n)})},Sb=function(e,t){var n=t.editor;xb(n),n.on("focusin",function(){var t=e.focusedEditor;t!==this&&(t&&t.fire("blur",{focusedEditor:this}),e.setActive(this),e.focusedEditor=this,this.fire("focus",{blurredEditor:t}),this.focus(!0))}),n.on("focusout",function(){var t=this;ye.setEditorTimeout(t,function(){var n=e.focusedEditor;Eb(t,function(){try{return document.activeElement}catch(e){return document.body}}())||n!==t||(t.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),hb||(hb=function(t){var n,r=e.activeEditor;n=t.target,r&&n.ownerDocument===document&&(n===document.body||Eb(r,n)||e.focusedEditor!==r||(r.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},wb.bind(document,"focusin",hb))},kb=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(wb.unbind(document,"focusin",hb),hb=null)},Tb=function(e){e.on("AddEditor",y.curry(Sb,e)),e.on("RemoveEditor",y.curry(kb,e))},Ab={},_b="en",Bb={setCode:function(e){e&&(_b=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return _b},rtl:!1,add:function(e,t){var n=Ab[e];for(var r in n||(Ab[e]=n={}),t)n[r]=t[r];this.setCode(e)},translate:function(e){var t=Ab[_b]||{},n=function(e){return Ot.is(e,"function")?Object.prototype.toString.call(e):r(e)?"":""+e},r=function(e){return""===e||null===e||Ot.is(e,"undefined")},o=function(e){return e=n(e),Ot.hasOwn(t,e)?n(t[e]):e};if(r(e))return"";if(Ot.is(e,"object")&&Ot.hasOwn(e,"raw"))return n(e.raw);if(Ot.is(e,"array")){var i=e.slice(1);e=o(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Ot.hasOwn(i,t)?n(i[t]):e})}return o(e).replace(/{context:\w+}$/,"")},data:Ab},Rb=Xo.DOM,Db=Ot.explode,Ob=Ot.each,Pb=Ot.extend,Ib=0,Lb=!1,Mb=[],Fb=[],zb=function(e){Ob(yb.get(),function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})},Ub=function(e){e!==Lb&&(e?Qt(window).on("resize scroll",zb):Qt(window).off("resize scroll",zb),Lb=e)},Vb=function(e){var t=Fb;delete Mb[e.id];for(var n=0;n0?Fb[0]:null),yb.focusedEditor===e&&(yb.focusedEditor=null),t.length!==Fb.length};Pb(yb={defaultSettings:{},$:Qt,majorVersion:"4",minorVersion:"7.5",releaseDate:"2018-01-22",editors:Mb,i18n:Bb,activeEditor:null,settings:{},setup:function(){var e,t,n,r,o="";if(t=ub.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,o=n.suffix;else{for(var i=document.getElementsByTagName("script"),a=0;a0&&Ob(Db(t),function(e){var t;(t=Rb.get(e))?n.push(t):Ob(document.forms,function(t){Ob(t.elements,function(t){t.name===e&&(e="mce_editor_"+Ib++,Rb.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":Ob(Rb.select("textarea"),function(t){e.editor_deselector&&i(t,e.editor_deselector)||e.editor_selector&&!i(t,e.editor_selector)||n.push(t)})}return n}(e)),e.types?Ob(e.types,function(n){Ot.each(t,function(t){return!Rb.is(t,n.selector)||(l(o(t),Pb({},e,n),t),!1)})}):(Ot.each(t,function(e){var t;(t=r.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(Vb(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(t=Ot.grep(t,function(e){return!r.get(e.id)})).length?a([]):Ob(t,function(t){var r;r=t,e.inline&&r.tagName.toLowerCase()in n?Pm("Could not initialize inline editor on invalid inline target element",t):l(o(t),e,t)}))};return r.settings=e,Rb.bind(window,"ready",s),new pe(function(e){t?e(t):a=function(t){e(t)}})},get:function(e){return 0===arguments.length?Fb.slice(0):tr.isString(e)?M.find(Fb,function(t){return t.id===e}).getOr(null):tr.isNumber(e)&&Fb[e]?Fb[e]:null},add:function(e){var t=this;return Mb[e.id]===e?e:(null===t.get(e.id)&&("length"!==e.id&&(Mb[e.id]=e),Mb.push(e),Fb.push(e)),Ub(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),vb||(vb=function(){t.fire("BeforeUnload")},Rb.bind(window,"beforeunload",vb)),e)},createEditor:function(e,t){return this.add(new gb(e,t,this))},remove:function(e){var t,n,r=this;if(e)return tr.isString(e)?(e=e.selector||e,void Ob(Rb.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})):(n=e,tr.isNull(r.get(n.id))?null:(Vb(n)&&r.fire("RemoveEditor",{editor:n}),0===Fb.length&&Rb.unbind(window,"beforeunload",vb),n.remove(),Ub(Fb.length>0),n));for(t=Fb.length-1;t>=0;t--)r.remove(Fb[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new gb(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",0,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){Ob(Fb,function(e){e.save()})},addI18n:function(e,t){Bb.add(e,t)},translate:function(e){return Bb.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},Fd),yb.setup();var Hb,qb=yb;function jb(e){return{walk:function(t,n){return cg.walk(e,t,n)},split:sl.split,normalize:function(t){return Jf.normalize(e,t).fold(y.constant(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}(Hb=jb||(jb={})).compareRanges=qf,Hb.getCaretRangeFromPoint=Ih,Hb.getSelectedNode=Fi,Hb.getNode=zi;var $b,Wb,Kb=jb,Xb=Math.min,Yb=Math.max,Gb=Math.round,Jb=function(e,t,n){var r,o,i,a,s,u;return r=t.x,o=t.y,i=e.w,a=e.h,s=t.w,u=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=u),"r"===n[1]&&(r+=s),"c"===n[0]&&(o+=Gb(u/2)),"c"===n[1]&&(r+=Gb(s/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=Gb(a/2)),"c"===n[4]&&(r-=Gb(i/2)),Qb(r,o,i,a)},Qb=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},Zb={inflate:function(e,t,n){return Qb(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:Jb,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=Yb(e.x,t.x),r=Yb(e.y,t.y),o=Xb(e.x+e.w,t.x+t.w),i=Xb(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:Qb(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,s,u,c,l,f,d;return s=e.x,u=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=Yb(0,t.x-s),o=Yb(0,t.y-u),i=Yb(0,c-f),a=Yb(0,l-d),s+=r,u+=o,n&&(c+=r,l+=o,s-=i,u-=a),Qb(s,u,(c-=i)-s,(l-=a)-u)},create:Qb,fromClientRect:function(e){return Qb(e.left,e.top,e.width,e.height)}},eC={},tC={add:function(e,t){eC[e.toLowerCase()]=t},has:function(e){return!!eC[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=eC.hasOwnProperty(t)?eC[t]:null;if(null===n)throw new Error("Could not find module for type: "+e);return n},create:function(e,t){var n;if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=eC[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},nC=Ot.each,rC=Ot.extend,oC=function(){};oC.extend=$b=function(e){var t,n,r,o=this.prototype,i=function(){var e,t,n;if(!Wb&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},s=function(e,t){return function(){var n,r=this._super;return this._super=o[e],n=t.apply(this,arguments),this._super=r,n}};for(n in Wb=!0,t=new this,Wb=!1,e.Mixins&&(nC(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),o.Mixins&&(e.Mixins=o.Mixins.concat(e.Mixins))),e.Methods&&nC(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&nC(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){return e!==undefined?(this[n]=e,this):this[n]}}),e.Statics&&nC(e.Statics,function(e,t){i[t]=e}),e.Defaults&&o.Defaults&&(e.Defaults=rC({},o.Defaults,e.Defaults)),e)"function"==typeof(r=e[n])&&o[n]?t[n]=s(n,r):t[n]=r;return i.prototype=t,i.constructor=i,i.extend=$b,i};var iC=Math.min,aC=Math.max,sC=Math.round,uC=function(e,t){var n,r,o,i;if(t=t||'"',null===e)return"null";if("string"==(o=typeof e))return r="\bb\tt\nn\ff\rr\"\"''\\\\",t+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,o){return'"'===t&&"'"===e?e:(n=r.indexOf(o))+1?"\\"+r.charAt(n+1):(e=o.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+t;if("object"===o){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(n=0,r="[";n0?",":"")+uC(e[n],t);return r+"]"}for(i in r="{",e)e.hasOwnProperty(i)&&(r+="function"!=typeof e[i]?(r.length>1?","+t:t)+i+t+":"+uC(e[i],t):"");return r+"}"}return""+e},cC={serialize:uC,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}},lC={callbacks:{},count:0,send:function(e){var t=this,n=Xo.DOM,r=e.count!==undefined?e.count:t.count,o="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(o),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:o,src:e.url,type:"text/javascript"}),t.count++}},fC={send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||n++>1e4?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,n>1e4?"TIMED_OUT":"GENERAL",t,e),t=null):setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",fC.fire("beforeInitialize",{settings:e}),t=new Mm){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&Ot.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=fC.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();setTimeout(r,10)}}};Ot.extend(fC,Fd);var dC=Ot.extend,mC=function(e){this.settings=dC({},e),this.count=0};mC.sendRPC=function(e){return(new mC).send(e)},mC.prototype={send:function(e){var t=e.error,n=e.success;(e=dC(this.settings,e)).success=function(r,o){void 0===(r=cC.parse(r))&&(r={error:"JSON Parse error."}),r.error?t.call(e.error_scope||e.scope,r.error,o):n.call(e.success_scope||e.scope,r.result)},e.error=function(n,r){t&&t.call(e.error_scope||e.scope,n,r)},e.data=cC.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),e.content_type="application/json",fC.send(e)}};var pC,gC=window.localStorage,hC=qb,vC={geom:{Rect:Zb},util:{Promise:pe,Delay:ye,Tools:Ot,VK:Mp,URI:ub,Class:oC,EventDispatcher:Id,Observable:Fd,I18n:Bb,XHR:fC,JSON:cC,JSONRequest:mC,JSONP:lC,LocalStorage:gC,Color:function(e){var t={},n=0,r=0,o=0,i=function(e){var i;return"object"==typeof e?"r"in e?(n=e.r,r=e.g,o=e.b):"v"in e&&function(e,t,i){var a,s,u,c;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,i=parseInt(i,10)/100,t=aC(0,iC(t,1)),i=aC(0,iC(i,1)),0!==t){switch(a=e/60,u=(s=i*t)*(1-Math.abs(a%2-1)),c=i-s,Math.floor(a)){case 0:n=s,r=u,o=0;break;case 1:n=u,r=s,o=0;break;case 2:n=0,r=s,o=u;break;case 3:n=0,r=u,o=s;break;case 4:n=u,r=0,o=s;break;case 5:n=s,r=0,o=u;break;default:n=r=o=0}n=sC(255*(n+c)),r=sC(255*(r+c)),o=sC(255*(o+c))}else n=r=o=sC(255*i)}(e.h,e.s,e.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,t};return e&&i(e),t.toRgb=function(){return{r:n,g:r,b:o}},t.toHsv=function(){return e=n,t=r,i=o,s=0,(u=iC(e/=255,iC(t/=255,i/=255)))===(c=aC(e,aC(t,i)))?{h:0,s:0,v:100*(s=u)}:(a=(c-u)/c,s=c,{h:sC(60*((e===u?3:i===u?1:5)-(e===u?t-i:i===u?e-t:i-e)/(c-u))),s:sC(100*a),v:sC(100*s)});var e,t,i,a,s,u,c},t.toHex=function(){var e=function(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e};return"#"+e(n)+e(r)+e(o)},t.parse=i,t}},dom:{EventUtils:Te,Sizzle:lt,DomQuery:Qt,TreeWalker:to,DOMUtils:Xo,ScriptLoader:Zo,RangeUtils:Kb,Serializer:Nh,ControlSelection:Rh,BookmarkManager:Ah,Selection:vv,Event:Te.Event},html:{Styles:zo,Entities:Ao,Node:fh,Schema:Fo,SaxParser:em,DomParser:bh,Writer:Fs,Serializer:zs},ui:{Factory:tC},Env:me,AddOnManager:ti,Formatter:Yg,UndoManager:rg,EditorCommands:Od,WindowManager:km,NotificationManager:Sm,EditorObservable:qd,Shortcuts:Jd,Editor:gb,FocusManager:bb,EditorManager:qb,DOM:Xo.DOM,ScriptLoader:Zo.ScriptLoader,PluginManager:ti.PluginManager,ThemeManager:ti.ThemeManager,trim:Ot.trim,isArray:Ot.isArray,is:Ot.is,toArray:Ot.toArray,makeMap:Ot.makeMap,each:Ot.each,map:Ot.map,grep:Ot.grep,inArray:Ot.inArray,extend:Ot.extend,create:Ot.create,walk:Ot.walk,createNS:Ot.createNS,resolve:Ot.resolve,explode:Ot.explode,_addCacheSuffix:Ot._addCacheSuffix,isOpera:me.opera,isWebKit:me.webkit,isIE:me.ie,isGecko:me.gecko,isMac:me.mac};hC=Ot.extend(hC,vC),pC=hC,window.tinymce=pC,window.tinyMCE=pC}();!function(){"use strict";var n,t,e,r,o,i,u,a,c,l,s,f=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(n){return function(){return n}},m={noop:function(){},noarg:function(n){return function(){return n()}},compose:function(n,t){return function(){return n(t.apply(null,arguments))}},constant:d,identity:function(n){return n},tripleEquals:function(n,t){return n===t},curry:function(n){for(var t=new Array(arguments.length-1),e=1;e-1},C=function(n,t){for(var e=n.length,r=new Array(e),o=0;o=0;e--)t(n[e],e,n)},T=function(n,t){for(var e=[],r=0,o=n.length;r0&&H(i);var u={};return B.each(n,function(n){u[n]=m.constant(r[n])}),B.each(t,function(n){u[n]=m.constant(Object.prototype.hasOwnProperty.call(r,n)?w.some(r[n]):w.none())}),u}}},Y=X.immutable("width","height"),$=X.immutable("rows","columns"),K=X.immutable("row","column"),J=X.immutable("x","y"),Q=X.immutable("element","rowspan","colspan"),Z=X.immutable("element","rowspan","colspan","isNew"),nn={dimensions:Y,grid:$,address:K,coords:J,extended:X.immutable("element","rowspan","colspan","row","column"),detail:Q,detailnew:Z,rowdata:X.immutable("element","cells","section"),elementnew:X.immutable("element","isNew"),rowdatanew:X.immutable("element","cells","section","isNew"),rowcells:X.immutable("cells","section"),rowdetails:X.immutable("details","section"),bounds:X.immutable("startRow","startCol","finishRow","finishCol")},tn=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:m.constant(n)}},en={fromHtml:function(n,t){var e=(t||document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||e.childNodes.length>1)throw console.error("HTML does not have a single root node",n),"HTML must have a single root node";return tn(e.childNodes[0])},fromTag:function(n,t){var e=(t||document).createElement(n);return tn(e)},fromText:function(n,t){var e=(t||document).createTextNode(n);return tn(e)},fromDom:tn,fromPoint:function(n,t,e){return w.from(n.dom().elementFromPoint(t,e)).map(tn)}},rn=8,on=9,un=1,an=3,cn=un,ln=on,sn=function(n){return n.nodeType!==cn&&n.nodeType!==ln||0===n.childElementCount},fn={all:function(n,t){var e=t===undefined?document:t.dom();return sn(e)?[]:B.map(e.querySelectorAll(n),en.fromDom)},is:function(n,t){var e=n.dom();if(e.nodeType!==cn)return!1;if(e.matches!==undefined)return e.matches(t);if(e.msMatchesSelector!==undefined)return e.msMatchesSelector(t);if(e.webkitMatchesSelector!==undefined)return e.webkitMatchesSelector(t);if(e.mozMatchesSelector!==undefined)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},one:function(n,t){var e=t===undefined?document:t.dom();return sn(e)?w.none():w.from(e.querySelector(n)).map(en.fromDom)}},dn=function(n,t){var e=[],r=function(n){return e.push(n),t(n)},o=t(n);do{o=o.bind(r)}while(o.isSome());return e},mn="undefined"!=typeof window?window:Function("return this;")(),gn=function(n,t){for(var e=t!==undefined&&null!==t?t:mn,r=0;r0&&t0?w.some(r[0]):w.none()},filterItems:$t,justCells:function(n){var t=B.map(n.all(),function(n){return n.cells()});return B.flatten(t)}},Jt=function(n){return n.style!==undefined},Qt=function(n,t,e){if(!z.isString(e))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",e,":: Element ",n),new Error("CSS value must be a string: "+e);Jt(n)&&n.style.setProperty(t,e)},Zt=function(n,t){Jt(n)&&n.style.removeProperty(t)},ne=function(n,t,e){var r=n.dom();Qt(r,t,e)},te=function(n,t){return Jt(n)?n.style.getPropertyValue(t):""},ee=function(n,t){var e=n.dom(),r=te(e,t);return w.from(r).filter(function(n){return n.length>0})},re={copy:function(n,t){var e=n.dom(),r=t.dom();Jt(e)&&Jt(r)&&(r.style.cssText=e.style.cssText)},set:ne,preserve:function(n,t){var e=Dt.get(n,"style"),r=t(n);return(e===undefined?Dt.remove:Dt.set)(n,"style",e),r},setAll:function(n,t){var e=n.dom();L.each(t,function(n,t){Qt(e,t,n)})},setOptions:function(n,t){var e=n.dom();L.each(t,function(n,t){n.fold(function(){Zt(e,t)},function(n){Qt(e,t,n)})})},remove:function(n,t){var e=n.dom();Zt(e,t),Dt.has(n,"style")&&""===Yn.trim(Dt.get(n,"style"))&&Dt.remove(n,"style")},get:function(n,t){var e=n.dom(),r=window.getComputedStyle(e).getPropertyValue(t),o=""!==r||Nt.inBody(n)?r:te(e,t);return null===o?undefined:o},getRaw:ee,getAllRaw:function(n){var t={},e=n.dom();if(Jt(e))for(var r=0;r0&&ae.before(n,t),ce(n)}},se=X.immutable("minRow","minCol","maxRow","maxCol"),fe=function(n,t){var e,r,o,i,u,a,c,l,s,f,d=function(n){return fn.is(n.element(),t)},m=Gt(n),g=Kt.generate(m),p=(r=d,o=(e=g).grid().columns(),i=e.grid().rows(),u=o,a=0,c=0,L.each(e.access(),function(n){if(r(n)){var t=n.row(),e=t+n.rowspan()-1,o=n.column(),l=o+n.colspan()-1;ta&&(a=e),oc&&(c=l)}}),se(i,u,a,c)),h="th:not("+t+"),td:not("+t+")",v=gt.filterFirstLayer(n,"th,td",function(n){return fn.is(n,h)});return B.each(v,le.remove),function(n,t,e,r){for(var o,i,u,a=t.grid().columns(),c=t.grid().rows(),l=0;le.maxRow()||fe.maxCol()||(Kt.getAt(t,l,f).filter(r).isNone()?(o=s,i=n[l].element(),u=en.fromTag("td"),ue.append(u,en.fromTag("br")),(o?ue.append:ue.prepend)(i,u)):s=!0)}(m,g,p,d),l=n,s=p,f=B.filter(gt.firstLayer(l,"tr"),function(n){return 0===n.dom().childElementCount}),B.each(f,le.remove),s.minCol()!==s.maxCol()&&s.minRow()!==s.maxRow()||B.each(gt.firstLayer(l,"th,td"),function(n){Dt.remove(n,"rowspan"),Dt.remove(n,"colspan")}),Dt.remove(l,"width"),Dt.remove(l,"height"),re.remove(l,"width"),re.remove(l,"height"),n},de=function(n,t){return en.fromDom(n.dom().cloneNode(t))},me=function(n){return de(n,!0)},ge=function(n,t){var e=en.fromTag(t),r=Dt.clone(n);return Dt.setAll(e,r),e},pe=function(n){return de(n,!1)},he=me,ve=function(n,t){var e=ge(n,t),r=dt.children(me(n));return ae.append(e,r),e},be=(u=xt.isText,a="text",c=function(n){return u(n)?w.from(n.dom().nodeValue):w.none()},l=tt.detect().browser,{get:function(n){if(!u(n))throw new Error("Can only get "+a+" value of a "+a+" node");return s(n).getOr("")},getOption:s=l.isIE()&&10===l.version.major?function(n){try{return c(n)}catch(t){return w.none()}}:c,set:function(n,t){if(!u(n))throw new Error("Can only set raw "+a+" value of a "+a+" node");n.dom().nodeValue=t}}),we={get:function(n){return be.get(n)},getOption:function(n){return be.getOption(n)},set:function(n,t){be.set(n,t)}},ye=function(n){return"img"===xt.name(n)?1:we.getOption(n).fold(function(){return dt.children(n).length},function(n){return n.length})},xe=["img","br"],Ce=ye,Se=function(n){return we.getOption(n).filter(function(n){return 0!==n.trim().length||n.indexOf("\xa0")>-1}).isSome()||B.contains(xe,xt.name(n))},Re=function(n,t){var e=function(n){for(var r=dt.children(n),o=r.length-1;o>=0;o--){var i=r[o];if(t(i))return w.some(i);var u=e(i);if(u.isSome())return u}return w.none()};return e(n)},Te={first:function(n){return Mt.descendant(n,Se)},last:function(n){return Re(n,Se)}},De=function(){var n=en.fromTag("td");return ue.append(n,en.fromTag("br")),n},Ae=function(n,t,e){var r=ve(n,t);return L.each(e,function(n,t){null===n?Dt.remove(r,t):Dt.set(r,t,n)}),r},ke=function(n){return n},Ne=function(n){return function(){return en.fromTag("tr",n.dom())}},Oe=function(n,t,e){return{row:Ne(t),cell:function(t){var r,o,i,u=dt.owner(t.element()),a=en.fromTag(xt.name(t.element()),u.dom()),c=e.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),l=c.length>0?(r=t.element(),o=a,i=c,Te.first(r).map(function(n){var t=i.join(","),e=Bt.ancestors(n,t,function(n){return ot.eq(n,r)});return B.foldr(e,function(n,t){var e=pe(t);return ue.append(n,e),e},o)}).getOr(o)):a;return ue.append(l,en.fromTag("br")),re.copy(t.element(),a),re.remove(a,"height"),1!==t.colspan()&&re.remove(t.element(),"width"),n(t.element(),a),a},replace:Ae,gap:De}},Ee=function(n){return{row:Ne(n),cell:De,replace:ke,gap:De}},Be=function(n,t){var e=(t||document).createElement("div");return e.innerHTML=n,dt.children(en.fromDom(e))},Ie=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Pe=function(){return{up:m.constant({selector:qt.ancestor,closest:qt.closest,predicate:Mt.ancestor,all:dt.parents}),down:m.constant({selector:Bt.descendants,predicate:Et.descendants}),styles:m.constant({get:re.get,getRaw:re.getRaw,set:re.set,remove:re.remove}),attrs:m.constant({get:Dt.get,set:Dt.set,remove:Dt.remove,copyTo:function(n,t){var e=Dt.clone(n);Dt.setAll(t,e)}}),insert:m.constant({before:ue.before,after:ue.after,afterAll:ae.after,append:ue.append,appendAll:ae.append,prepend:ue.prepend,wrap:ue.wrap}),remove:m.constant({unwrap:le.unwrap,remove:le.remove}),create:m.constant({nu:en.fromTag,clone:function(n){return en.fromDom(n.dom().cloneNode(!1))},text:en.fromText}),query:m.constant({comparePosition:function(n,t){return n.dom().compareDocumentPosition(t.dom())},prevSibling:dt.prevSibling,nextSibling:dt.nextSibling}),property:m.constant({children:dt.children,name:xt.name,parent:dt.parent,isText:xt.isText,isComment:xt.isComment,isElement:xt.isElement,getText:we.get,setText:we.set,isBoundary:function(n){return!!xt.isElement(n)&&("body"===xt.name(n)||B.contains(Ie,xt.name(n)))},isEmptyTag:function(n){return!!xt.isElement(n)&&B.contains(["br","img","hr","input"],xt.name(n))}}),eq:ot.eq,is:ot.is}},We=(X.immutable("left","right"),function(n,t,e,r){var o=t(n,e);return B.foldr(r,function(e,r){var o=t(n,r);return _e(n,e,o)},o)}),_e=function(n,t,e){return t.bind(function(t){return e.filter(m.curry(n.eq,t))})},Me=function(n,t,e){return e.length>0?We(n,t,(r=e)[0],r.slice(1)):w.none();var r},Le=function(n,t){return m.curry(n.eq,t)},qe=function(n,t,e,r){var o=r!==undefined?r:m.constant(!1),i=[t].concat(n.up().all(t)),u=[e].concat(n.up().all(e)),a=function(n){return B.findIndex(n,o).fold(function(){return n},function(t){return n.slice(0,t+1)})},c=a(i),l=a(u),s=B.find(c,function(t){return B.exists(l,Le(n,t))});return{firstpath:m.constant(c),secondpath:m.constant(l),shared:m.constant(s)}},ze=qe,Fe=function(n,t,e){return Me(n,t,e)},je=function(n,t,e,r){return ze(n,t,e,r)},He=Pe(),Ve=function(n,t){return Fe(He,function(t,e){return n(e)},t)},Ue=function(n,t,e){return je(He,n,t,e)},Ge=function(n,t){return t.column()>=n.startCol()&&t.column()+t.colspan()-1<=n.finishCol()&&t.row()>=n.startRow()&&t.row()+t.rowspan()-1<=n.finishRow()},Xe=function(n,t){var e=t.column(),r=t.column()+t.colspan()-1,o=t.row(),i=t.row()+t.rowspan()-1;return e<=n.finishCol()&&r>=n.startCol()&&o<=n.finishRow()&&i>=n.startRow()},Ye=function(n,t){for(var e=!0,r=m.curry(Ge,t),o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)e=e&&Kt.getAt(n,o,i).exists(r);return e?w.some(t):w.none()},$e=function(n,t,e){var r=Kt.findItem(n,t,ot.eq),o=Kt.findItem(n,e,ot.eq);return r.bind(function(n){return o.map(function(t){return e=n,r=t,nn.bounds(Math.min(e.row(),r.row()),Math.min(e.column(),r.column()),Math.max(e.row()+e.rowspan()-1,r.row()+r.rowspan()-1),Math.max(e.column()+e.colspan()-1,r.column()+r.colspan()-1));var e,r})})},Ke=$e,Je=function(n,t,e){return $e(n,t,e).bind(function(t){return Ye(n,t)})},Qe=function(n,t,e,r){return Kt.findItem(n,t,ot.eq).bind(function(t){var o=e>0?t.row()+t.rowspan()-1:t.row(),i=r>0?t.column()+t.colspan()-1:t.column();return Kt.getAt(n,o+e,i+r).map(function(n){return n.element()})})},Ze=function(n,t,e){return Ke(n,t,e).map(function(t){var e=Kt.filterItems(n,m.curry(Xe,t));return B.map(e,function(n){return n.element()})})},nr=function(n,t){return Kt.findItem(n,t,function(n,t){return ot.contains(t,n)}).bind(function(n){return n.element()})},tr=function(n){var t=Gt(n);return Kt.generate(t)},er=function(n,t,e){return Vt(n).bind(function(r){var o=tr(r);return Qe(o,n,t,e)})},rr=function(n,t,e){var r=tr(n);return Ze(r,t,e)},or=function(n,t,e,r,o){var i=tr(n),u=ot.eq(n,e)?t:nr(i,t),a=ot.eq(n,o)?r:nr(i,r);return Ze(i,u,a)},ir=function(n,t,e){var r=tr(n);return Je(r,t,e)},ur=function(n,t){return qt.ancestor(n,"table")},ar=X.immutableBag(["boxes","start","finish"],[]),cr=function(n,t,e){var r=function(n){return function(t){return e(t)||ot.eq(t,n)}};return ot.eq(n,t)?w.some(ar({boxes:w.some([n]),start:n,finish:t})):ur(n).bind(function(o){return ur(t).bind(function(i){if(ot.eq(o,i))return w.some(ar({boxes:rr(o,n,t),start:n,finish:t}));if(ot.contains(o,i)){var u=(a=Bt.ancestors(t,"td,th",r(o))).length>0?a[a.length-1]:t;return w.some(ar({boxes:or(o,n,o,t,i),start:n,finish:u}))}if(ot.contains(i,o)){var a,c=(a=Bt.ancestors(n,"td,th",r(i))).length>0?a[a.length-1]:n;return w.some(ar({boxes:or(i,n,o,t,i),start:n,finish:c}))}return Ue(n,t).shared().bind(function(u){return qt.closest(u,"table",e).bind(function(e){var u=Bt.ancestors(t,"td,th",r(e)),a=u.length>0?u[u.length-1]:t,c=Bt.ancestors(n,"td,th",r(e)),l=c.length>0?c[c.length-1]:n;return w.some(ar({boxes:or(e,n,o,t,i),start:l,finish:a}))})})})})},lr=cr,sr=function(n,t){var e=Bt.descendants(n,t);return e.length>0?w.some(e):w.none()},fr=function(n,t,e,r,o){return(i=n,u=o,B.find(i,function(n){return fn.is(n,u)})).bind(function(n){return er(n,t,e).bind(function(n){return e=r,qt.ancestor(t=n,"table").bind(function(n){return qt.descendant(n,e).bind(function(n){return cr(n,t).bind(function(n){return n.boxes().map(function(t){return{boxes:m.constant(t),start:m.constant(n.start()),finish:m.constant(n.finish())}})})})});var t,e})});var i,u},dr=function(n,t,e){return qt.descendant(n,t).bind(function(t){return qt.descendant(n,e).bind(function(n){return Ve(ur,[t,n]).map(function(e){return{first:m.constant(t),last:m.constant(n),table:m.constant(e)}})})})},mr=function(n,t){return sr(n,t)},gr=function(n,t,e){return dr(n,t,e).bind(function(t){var e=function(t){return ot.eq(n,t)},r=qt.ancestor(t.first(),"thead,tfoot,tbody,table",e),o=qt.ancestor(t.last(),"thead,tfoot,tbody,table",e);return r.bind(function(n){return o.bind(function(e){return ot.eq(n,e)?ir(t.table(),t.first(),t.last()):w.none()})})})},pr="data-mce-selected",hr="data-mce-first-selected",vr="data-mce-last-selected",br={selected:m.constant(pr),selectedSelector:m.constant("td[data-mce-selected],th[data-mce-selected]"),attributeSelector:m.constant("[data-mce-selected]"),firstSelected:m.constant(hr),firstSelectedSelector:m.constant("td[data-mce-first-selected],th[data-mce-first-selected]"),lastSelected:m.constant(vr),lastSelectedSelector:m.constant("td[data-mce-last-selected],th[data-mce-last-selected]")},wr=function(n){if(!z.isArray(n))throw new Error("cases must be an array");if(0===n.length)throw new Error("there must be at least one case");var t=[],e={};return B.each(n,function(r,o){var i=L.keys(r);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],a=r[u];if(e[u]!==undefined)throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!z.isArray(a))throw new Error("case arguments must be an array");t.push(u),e[u]=function(){var e=arguments.length;if(e!==a.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+a.length+" ("+a+"), got "+e);for(var r=new Array(e),i=0;i1?w.some({bounds:m.constant(n),cells:m.constant(t)}):w.none()})},w.none)},Rr=function(n,t){var e=Cr(n,t);return e.length>0&&B.forall(e,function(n){return Dt.has(n,"rowspan")&&parseInt(Dt.get(n,"rowspan"),10)>1||Dt.has(n,"colspan")&&parseInt(Dt.get(n,"colspan"),10)>1})?w.some(e):w.none()},Tr=Cr,Dr=function(n){return{element:m.constant(n),mergable:w.none,unmergable:w.none,selection:m.constant([n])}},Ar=X.immutable("element","clipboard","generators"),kr={noMenu:Dr,forMenu:function(n,t,e){return{element:m.constant(e),mergable:m.constant(Sr(t,n)),unmergable:m.constant(Rr(e,n)),selection:m.constant(Tr(e,n))}},notCell:function(n){return Dr(n)},paste:Ar,pasteRows:function(n,t,e,r,o){return{element:m.constant(e),mergable:w.none,unmergable:w.none,selection:m.constant(Tr(e,n)),clipboard:m.constant(r),generators:m.constant(o)}}},Nr={registerEvents:function(n,t,e,r){n.on("BeforeGetContent",function(e){!0===e.selection&&xr.cata(t.get(),m.noop,function(t){var r;e.preventDefault(),(r=t,Vt(r[0]).map(he).map(function(n){return[fe(n,br.attributeSelector())]})).each(function(t){e.content=B.map(t,function(t){return e=t,n.selection.serializer.serialize(e.dom(),{});var e}).join("")})},m.noop)}),n.on("BeforeSetContent",function(t){!0===t.selection&&!0===t.paste&&w.from(n.dom.getParent(n.selection.getStart(),"th,td")).each(function(o){var i=en.fromDom(o);Vt(i).bind(function(o){var u=B.filter(Be(t.content),function(n){return"meta"!==xt.name(n)});if(1===u.length&&"table"===xt.name(u[0])){t.preventDefault();var a=en.fromDom(n.getDoc()),c=Ee(a),l=kr.paste(i,u[0],c);e.pasteCells(o,l).each(function(t){n.selection.setRng(t),n.focus(),r.clear(o)})}})})})}},Or={render:function(n,t,e,r){var o=en.fromTag("table");re.setAll(o,{"border-collapse":"collapse",width:"100%"}),Dt.set(o,"border","1");var i=en.fromTag("tbody");ue.append(o,i);for(var u=[],a=0;ao?t-o:0}}},_r=Wr("height",function(n){return Nt.inBody(n)?n.dom().getBoundingClientRect().height:n.dom().offsetHeight}),Mr=function(n){return _r.get(n)},Lr=function(n){return _r.getOuter(n)},qr=Wr("width",function(n){return n.dom().offsetWidth}),zr=function(n){return qr.get(n)},Fr=function(n){return qr.getOuter(n)},jr=tt.detect(),Hr=function(n,t,e){return r=re.get(n,t),o=e,i=parseFloat(r),isNaN(i)?o:i;var r,o,i},Vr=function(n){return jr.browser.isIE()||jr.browser.isEdge()?(e=Hr(t=n,"padding-top",0),r=Hr(t,"padding-bottom",0),o=Hr(t,"border-top-width",0),i=Hr(t,"border-bottom-width",0),u=t.dom().getBoundingClientRect().height,"border-box"===re.get(t,"box-sizing")?u:u-e-r-(o+i)):Hr(n,"height",Mr(n));var t,e,r,o,i,u},Ur=/(\d+(\.\d+)?)(\w|%)*/,Gr=/(\d+(\.\d+)?)%/,Xr=/(\d+(\.\d+)?)px|em/,Yr=function(n,t){re.set(n,"height",t+"px")},$r=function(n,t,e,r){var o,i,u,a,c,l=parseInt(n,10);return Yn.endsWith(n,"%")&&"table"!==xt.name(t)?(i=l,u=e,a=r,c=Vt(o=t).map(function(n){var t=u(n);return Math.floor(i/100*t)}).getOr(i),a(o,c),c):l},Kr=function(n){var t,e=re.getRaw(t=n,"height").getOrThunk(function(){return Vr(t)+"px"});return e?$r(e,n,Mr,Yr):Mr(n)},Jr=function(n,t){return Dt.has(n,t)?parseInt(Dt.get(n,t),10):1},Qr=function(n){return re.getRaw(n,"width").fold(function(){return w.from(Dt.get(n,"width"))},function(n){return w.some(n)})},Zr=function(n,t){return n/t.pixelWidth()*100},no={percentageBasedSizeRegex:m.constant(Gr),pixelBasedSizeRegex:m.constant(Xr),setPixelWidth:function(n,t){re.set(n,"width",t+"px")},setPercentageWidth:function(n,t){re.set(n,"width",t+"%")},setHeight:Yr,getPixelWidth:function(n,t){return Qr(n).fold(function(){var t=zr(n);return parseInt(t,10)},function(e){return function(n,t,e){if(Xr.test(t)){var r=Xr.exec(t);return parseInt(r[1],10)}if(Gr.test(t)){var o=Gr.exec(t),i=parseFloat(o[1]);return i/100*e.pixelWidth()}var u=zr(n);return parseInt(u,10)}(n,e,t)})},getPercentageWidth:function(n,t){return Qr(n).fold(function(){var e=zr(n),r=parseInt(e,10);return Zr(r,t)},function(e){return function(n,t,e){if(Gr.test(t)){var r=Gr.exec(t);return parseFloat(r[1])}var o=zr(n),i=parseInt(o,10);return Zr(i,e)}(n,e,t)})},getGenericWidth:function(n){return Qr(n).bind(function(n){if(Ur.test(n)){var t=Ur.exec(n);return w.some({width:m.constant(t[1]),unit:m.constant(t[3])})}return w.none()})},setGenericWidth:function(n,t,e){re.set(n,"width",t+e)},getHeight:function(n){return e="rowspan",Kr(t=n)/Jr(t,e);var t,e},getRawWidth:Qr},to=function(n,t){no.getGenericWidth(n).each(function(e){var r=e.width()/2;no.setGenericWidth(n,r,e.unit()),no.setGenericWidth(t,r,e.unit())})},eo=function(n,t){var e=t||en.fromDom(document.documentElement);return Mt.ancestor(n,m.curry(ot.eq,e)).isSome()},ro=function(n){var t=n.dom();return t===t.window?n:xt.isDocument(n)?t.defaultView||t.parentWindow:null},oo=function(n,t){return{left:m.constant(n),top:m.constant(t),translate:function(e,r){return oo(n+e,t+r)}}},io=function(n,t){return n!==undefined?n:t!==undefined?t:0},uo=function(n){var t,e=n.dom(),r=e.ownerDocument,o=r.body,i=en.fromDom(r.documentElement);return o===e?oo(o.offsetLeft,o.offsetTop):eo(n,i)?(t=e.getBoundingClientRect(),oo(t.left,t.top)):oo(0,0)},ao=function(n){var t=n.dom().ownerDocument,e=t.body,r=ro(en.fromDom(t)),o=t.documentElement,i=io(r.pageYOffset,o.scrollTop),u=io(r.pageXOffset,o.scrollLeft),a=io(o.clientTop,e.clientTop),c=io(o.clientLeft,e.clientLeft);return uo(n).translate(u-c,i-a)},co=X.immutable("row","y"),lo=X.immutable("col","x"),so=function(n){return ao(n).left()+Fr(n)},fo=function(n){return ao(n).left()},mo=function(n,t){return lo(n,fo(t))},go=function(n,t){return lo(n,so(t))},po=function(n){return ao(n).top()},ho=function(n,t,e){if(0===e.length)return[];var r=B.map(e.slice(1),function(t,e){return t.map(function(t){return n(e,t)})}),o=e[e.length-1].map(function(n){return t(e.length-1,n)});return r.concat([o])},vo={delta:m.identity,positions:m.curry(ho,function(n,t){return co(n,po(t))},function(n,t){return co(n,po(t)+Lr(t))}),edge:po},bo={delta:m.identity,edge:fo,positions:m.curry(ho,mo,go)},wo={height:vo,rtl:{delta:function(n,t){return-n},edge:so,positions:m.curry(ho,go,mo)},ltr:bo},yo={ltr:wo.ltr,rtl:wo.rtl},xo=function(n){var t=function(t){return n(t).isRtl()?yo.rtl:yo.ltr};return{delta:function(n,e){return t(e).delta(n,e)},edge:function(n){return t(n).edge(n)},positions:function(n,e){return t(e).positions(n,e)}}},Co=function(n){var t=Gt(n);return Kt.generate(t).grid()},So=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return So(e())}}},Ro=function(n,t){return To(n,t,{validate:z.isFunction,label:"function"})},To=function(n,t,e){if(0===t.length)throw new Error("You must specify at least one required field.");return V("required",t),G(t),function(r){var o=L.keys(r);B.forall(t,function(n){return B.contains(o,n)})||j(t,o),n(t,o);var i=B.filter(t,function(n){return!e.validate(r[n],n)});return i.length>0&&U(i,e.label),r}},Do=m.noop,Ao={exactly:m.curry(Ro,function(n,t){var e=B.filter(t,function(t){return!B.contains(n,t)});e.length>0&&H(e)}),ensure:m.curry(Ro,Do),ensureWith:m.curry(To,Do)},ko=function(n){var t=Dt.has(n,"colspan")?parseInt(Dt.get(n,"colspan"),10):1,e=Dt.has(n,"rowspan")?parseInt(Dt.get(n,"rowspan"),10):1;return{element:m.constant(n),colspan:m.constant(t),rowspan:m.constant(e)}},No=Ao.exactly(["cell","row","replace","gap"]),Oo=function(n,t){No(n);var e=So(w.none()),r=t!==undefined?t:ko,o=function(t){var e,o=r(t);return e=o,n.cell(e)},i=function(n){var t=o(n);return e.get().isNone()&&e.set(w.some(t)),u=w.some({item:n,replacement:t}),t},u=w.none();return{getOrInit:function(n,t){return u.fold(function(){return i(n)},function(e){return t(n,e.item)?e.replacement:i(n)})},cursor:e.get}},Eo=function(n,t){return function(e){var r=So(w.none());No(e);var o=[],i=function(i){var u=e.replace(i,t,{scope:n});return o.push({item:i,sub:u}),r.get().isNone()&&r.set(w.some(u)),u};return{replaceOrInit:function(n,t){return(e=n,r=t,B.find(o,function(n){return r(n.item,e)})).fold(function(){return i(n)},function(e){return t(n,e.item)?e.sub:i(n)});var e,r},cursor:r.get}}},Bo=function(n){No(n);var t=So(w.none());return{combine:function(e){return t.get().isNone()&&t.set(w.some(e)),function(){var t=n.cell({element:m.constant(e),colspan:m.constant(1),rowspan:m.constant(1)});return re.remove(t,"width"),re.remove(e,"width"),t}},cursor:t.get}},Io=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Po=function(n,t){var e=n.property().name(t);return B.contains(Io,e)},Wo=function(n,t){return B.contains(["br","img","hr","input"],n.property().name(t))},_o=Po,Mo=function(n,t){var e=n.property().name(t);return B.contains(["ol","ul"],e)},Lo=Wo,qo=Pe(),zo=function(n){return _o(qo,n)},Fo=function(n){return Mo(qo,n)},jo=function(n){return Lo(qo,n)},Ho=function(n){var t,e=function(n){return"br"===xt.name(n)},r=function(n){return Te.last(n).bind(function(t){var r,o=(r=t,dt.nextSibling(r).map(function(n){return!!zo(n)||(jo(n)?"img"!==xt.name(n):void 0)}).getOr(!1));return dt.parent(t).map(function(r){return!0===o||(i=r,"li"===xt.name(i)||Mt.ancestor(i,Fo).isSome())||e(t)||zo(r)&&!ot.eq(n,r)?[]:[en.fromTag("br")];var i})}).getOr([])},o=0===(t=B.bind(n,function(n){var t,o=dt.children(n);return t=o,B.forall(t,function(n){return e(n)||xt.isText(n)&&0===we.get(n).trim().length})?[]:o.concat(r(n))})).length?[en.fromTag("br")]:t;le.empty(n[0]),ae.append(n[0],o)},Vo=function(n){return function(){for(var t=new Array(arguments.length),e=0;e0?function(t,o){var i=qt.child(n,o).getOrThunk(function(){var t=en.fromTag(o,dt.owner(n).dom());return ue.append(n,t),t});le.empty(i);var u=B.map(t,function(n){n.isNew()&&e.push(n.element());var t=n.element();return le.empty(t),B.each(n.cells(),function(n){n.isNew()&&r.push(n.element()),ri(n.element(),"colspan",n.colspan(),1),ri(n.element(),"rowspan",n.rowspan(),1),ue.append(t,n.element())}),t});ae.append(i,u)}(t,o):qt.child(n,o).bind(le.remove)},i=[],u=[],a=[];return B.each(t,function(n){switch(n.section()){case"thead":i.push(n);break;case"tbody":u.push(n);break;case"tfoot":a.push(n)}}),o(i,"thead"),o(u,"tbody"),o(a,"tfoot"),{newRows:m.constant(e),newCells:m.constant(r)}},ii=function(n){return B.map(n,function(n){var t=pe(n.element());return B.each(n.cells(),function(n){var e=he(n.element());ri(e,"colspan",n.colspan(),1),ri(e,"rowspan",n.rowspan(),1),ue.append(t,e)}),t})},ui=function(n,t){for(var e=[],r=0;r=n.length-1)return w.none();var e=n[t].fold(function(){var e=B.reverse(n.slice(0,t));return $o(e,function(n,t){return n.map(function(n){return{value:n,delta:t+1}})})},function(n){return w.some({value:n,delta:0})}),r=n[t+1].fold(function(){var e=n.slice(t+1);return $o(e,function(n,t){return n.map(function(n){return{value:n,delta:t+1}})})},function(n){return w.some({value:n,delta:1})});return e.bind(function(n){return r.map(function(t){var e=t.delta+n.delta;return Math.abs(t.value-n.value)/e})})},li=function(n,t,e){var r=n();return B.find(r,t).orThunk(function(){return w.from(r[0]).orThunk(e)}).map(function(n){return n.element()})},si=function(n){var t=n.grid(),e=ai(0,t.columns()),r=ai(0,t.rows());return B.map(e,function(t){return li(function(){return B.bind(r,function(e){return Kt.getAt(n,e,t).filter(function(n){return n.column()===t}).fold(m.constant([]),function(n){return[n]})})},function(n){return 1===n.colspan()},function(){return Kt.getAt(n,0,t)})})},fi=function(n){var t=n.grid(),e=ai(0,t.rows()),r=ai(0,t.columns());return B.map(e,function(t){return li(function(){return B.bind(r,function(e){return Kt.getAt(n,t,e).filter(function(n){return n.row()===t}).fold(m.constant([]),function(n){return[n]})})},function(n){return 1===n.rowspan()},function(){return Kt.getAt(n,t,0)})})},di=function(n,t,e,r,o){var i=en.fromTag("div");return re.setAll(i,{position:"absolute",left:t-r/2+"px",top:e+"px",height:o+"px",width:r+"px"}),Dt.setAll(i,{"data-column":n,role:"presentation"}),i},mi=function(n,t,e,r,o){var i=en.fromTag("div");return re.setAll(i,{position:"absolute",left:t+"px",top:e-o/2+"px",height:o+"px",width:r+"px"}),Dt.setAll(i,{"data-row":n,role:"presentation"}),i},gi=function(n){var t=n.replace(/\./g,"-");return{resolve:function(n){return t+"-"+n}}},pi={resolve:gi("ephox-snooker").resolve},hi=function(n,t){var e=Dt.get(n,t);return e===undefined||""===e?[]:e.split(" ")},vi=hi,bi=function(n,t,e){var r=hi(n,t).concat([e]);Dt.set(n,t,r.join(" "))},wi=function(n,t,e){var r=B.filter(hi(n,t),function(n){return n!==e});r.length>0?Dt.set(n,t,r.join(" ")):Dt.remove(n,t)},yi=function(n){return vi(n,"class")},xi=function(n,t){return bi(n,"class",t)},Ci=function(n,t){return wi(n,"class",t)},Si=yi,Ri=xi,Ti=Ci,Di=function(n,t){B.contains(yi(n),t)?Ci(n,t):xi(n,t)},Ai=function(n){return n.dom().classList!==undefined},ki=function(n,t){return Ai(n)&&n.dom().classList.contains(t)},Ni={add:function(n,t){Ai(n)?n.dom().classList.add(t):Ri(n,t)},remove:function(n,t){var e;Ai(n)?n.dom().classList.remove(t):Ti(n,t),0===(Ai(e=n)?e.dom().classList:Si(e)).length&&Dt.remove(e,"class")},toggle:function(n,t){return Ai(n)?n.dom().classList.toggle(t):Di(n,t)},toggler:function(n,t){var e,r,o,i,u,a,c=Ai(n),l=n.dom().classList;return e=function(){c?l.remove(t):Ti(n,t)},r=function(){c?l.add(t):Ri(n,t)},o=ki(n,t),i=o||!1,{on:u=function(){r(),i=!0},off:a=function(){e(),i=!1},toggle:function(){(i?a:u)()},isOn:function(){return i}}},has:ki},Oi=pi.resolve("resizer-bar"),Ei=pi.resolve("resizer-rows"),Bi=pi.resolve("resizer-cols"),Ii=function(n){var t=Bt.descendants(n.parent(),"."+Oi);B.each(t,le.remove)},Pi=function(n,t,e){var r=n.origin();B.each(t,function(t,o){t.each(function(t){var o=e(r,t);Ni.add(o,Oi),ue.append(n.parent(),o)})})},Wi=function(n,t,e,r,o,i){var u,a,c,l,s=ao(t),f=e.length>0?o.positions(e,t):[];u=n,a=f,c=s,l=Fr(t),Pi(u,a,function(n,t){var e=mi(t.row(),c.left()-n.left(),t.y()-n.top(),l,7);return Ni.add(e,Ei),e});var d,m,g,p,h=r.length>0?i.positions(r,t):[];d=n,m=h,g=s,p=Lr(t),Pi(d,m,function(n,t){var e=di(t.col(),t.x()-n.left(),g.top()-n.top(),7,p);return Ni.add(e,Bi),e})},_i=function(n,t){var e=Bt.descendants(n.parent(),"."+Oi);B.each(e,t)},Mi=function(n,t,e,r){Ii(n);var o=Gt(t),i=Kt.generate(o),u=fi(i),a=si(i);Wi(n,t,u,a,e,r)},Li=function(n){_i(n,function(n){re.set(n,"display","none")})},qi=function(n){_i(n,function(n){re.set(n,"display","block")})},zi=Ii,Fi=function(n){return Ni.has(n,Ei)},ji=function(n){return Ni.has(n,Bi)},Hi=function(n,t){return B.map(n,function(n){var e,r=(e=n.details(),$o(e,function(n){return dt.parent(n.element()).map(function(n){var t=dt.parent(n).isNone();return nn.elementnew(n,t)})}).getOrThunk(function(){return nn.elementnew(t.row(),!0)}));return nn.rowdatanew(r.element(),n.details(),n.section(),r.isNew())})},Vi=function(n,t){var e=ti(n,ot.eq);return Hi(e,t)},Ui=function(n,t){var e=B.flatten(B.map(n.all(),function(n){return n.cells()}));return B.find(e,function(n){return ot.eq(t,n.element())})},Gi=function(n,t,e,r,o){return function(i,u,a,c,l){var s=Gt(u),f=Kt.generate(s);return t(f,a).map(function(t){var e=ei(f,c,!1),r=n(e,t,ot.eq,o(c)),i=Vi(r.grid(),c);return{grid:m.constant(i),cursor:r.cursor}}).fold(function(){return w.none()},function(n){var t=oi(u,n.grid());return e(u,n.grid(),l),r(u),Mi(i,u,wo.height,l),w.some({cursor:n.cursor,newRows:t.newRows,newCells:t.newCells})})}},Xi=Vi,Yi=function(n,t){return jt(t.element()).bind(function(t){return Ui(n,t)})},$i=function(n,t){var e=B.map(t.selection(),function(t){return jt(t).bind(function(t){return Ui(n,t)})}),r=Yo(e);return r.length>0?w.some(r):w.none()},Ki=function(n,t){return jt(t.element()).bind(function(e){return Ui(n,e).map(function(n){return Xo.merge(n,{generators:t.generators,clipboard:t.clipboard})})})},Ji=function(n,t){var e=B.map(t.selection(),function(t){return jt(t).bind(function(t){return Ui(n,t)})}),r=Yo(e);return r.length>0?w.some(Xo.merge({cells:r},{generators:t.generators,clipboard:t.clipboard})):w.none()},Qi=function(n,t){return t.mergable()},Zi=function(n,t){return t.unmergable()},nu=function(n){return{is:function(t){return n===t},isValue:m.constant(!0),isError:m.constant(!1),getOr:m.constant(n),getOrThunk:m.constant(n),getOrDie:m.constant(n),or:function(t){return nu(n)},orThunk:function(t){return nu(n)},fold:function(t,e){return e(n)},map:function(t){return nu(t(n))},each:function(t){t(n)},bind:function(t){return t(n)},exists:function(t){return t(n)},forall:function(t){return t(n)},toOption:function(){return w.some(n)}}},tu=function(n){return{is:m.constant(!1),isValue:m.constant(!1),isError:m.constant(!0),getOr:m.identity,getOrThunk:function(n){return n()},getOrDie:function(){return m.die(n)()},or:function(n){return n},orThunk:function(n){return n()},fold:function(t,e){return t(n)},map:function(t){return tu(n)},each:m.noop,bind:function(t){return tu(n)},exists:m.constant(!1),forall:m.constant(!0),toOption:w.none}},eu={value:nu,error:tu},ru=function(n,t){return B.map(n,function(){return nn.elementnew(t.cell(),!0)})},ou=function(n,t,e){return n.concat(ui(t,function(t){return Qo.setCells(n[n.length-1],ru(n[n.length-1].cells(),e))}))},iu=function(n,t,e){return B.map(n,function(n){return Qo.setCells(n,n.cells().concat(ru(ai(0,t),e)))})},uu=function(n,t,e){if(n.row()>=t.length||n.column()>Qo.cellLength(t[0]))return eu.error("invalid start address out of table bounds, row: "+n.row()+", column: "+n.column());var r=t.slice(n.row()),o=r[0].cells().slice(n.column()),i=Qo.cellLength(e[0]),u=e.length;return eu.value({rowDelta:m.constant(r.length-u),colDelta:m.constant(o.length-i)})},au=function(n,t){var e=Qo.cellLength(n[0]),r=Qo.cellLength(t[0]);return{rowDelta:m.constant(0),colDelta:m.constant(e-r)}},cu=function(n,t,e){var r=t.colDelta()<0?iu:m.identity;return(t.rowDelta()<0?ou:m.identity)(r(n,Math.abs(t.colDelta()),e),Math.abs(t.rowDelta()),e)},lu=function(n,t,e,r){if(0===n.length)return n;for(var o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)Qo.mutateCell(n[o],i,nn.elementnew(r(),!1));return n},su=function(n,t,e,r){for(var o=!0,i=0;i0&&t1&&Qo.cellLength(f)>1&&(a>0&&s(Qo.getCellElement(f,a-1))||a0&&s(Qo.getCellElement(i[u-1],a))||u0&&t0&&t0})},yu=function(n,t,e,r){return B.map(n,function(n){return Qo.mapCells(n,function(n){return o=n,B.exists(t,function(n){return e(o.element(),n.element())})?nn.elementnew(r(n.element(),e),!0):n;var o})})},xu=function(n,t,e,r){return Qo.getCellElement(n[t],e)!==undefined&&t>0&&r(Qo.getCellElement(n[t-1],e),Qo.getCellElement(n[t],e))},Cu=function(n,t,e){return t>0&&e(Qo.getCellElement(n,t-1),Qo.getCellElement(n,t))},Su=function(n,t,e,r){var o=B.bind(n,function(r,o){return xu(n,o,t,e)||Cu(r,t,e)?[]:[Qo.getCell(r,t)]});return yu(n,o,e,r)},Ru=function(n,t,e,r){var o=n[t],i=B.bind(o.cells(),function(r,i){return xu(n,t,i,e)||Cu(o,i,e)?[]:[r]});return yu(n,i,e,r)},Tu=function(n){return{fold:n}},Du=function(){return Tu(function(n,t,e,r,o){return n()})},Au=function(n){return Tu(function(t,e,r,o,i){return e(n)})},ku=function(n,t){return Tu(function(e,r,o,i,u){return o(n,t)})},Nu=function(n,t,e){return Tu(function(r,o,i,u,a){return u(n,t,e)})},Ou=function(n,t){return Tu(function(e,r,o,i,u){return u(n,t)})},Eu=function(n,t,e,r){var o,i,u=n.slice(0),a=(i=t,0===(o=n).length?Du():1===o.length?Au(0):0===i?ku(0,1):i===o.length-1?Ou(i-1,i):i>0&&i=0){var o=Math.max(r.minCellWidth(),u[t]-e);return c(u.slice(0,n)).concat([e,o-u[t]]).concat(c(u.slice(t+1)))}var i=Math.max(r.minCellWidth(),u[n]+e),a=u[n]-i;return c(u.slice(0,n)).concat([i-u[n],a]).concat(c(u.slice(t+1)))},f=s;return a.fold(l,function(n){return r.singleColumnWidth(u[n],e)},f,function(n,t,e){return s(t,e)},function(n,t){if(e>=0)return c(u.slice(0,t)).concat([e]);var o=Math.max(r.minCellWidth(),u[t]+e);return c(u.slice(0,t)).concat([o-u[t]])})},Bu=function(n,t){return Dt.has(n,t)&&parseInt(Dt.get(n,t),10)>1},Iu={hasColspan:function(n){return Bu(n,"colspan")},hasRowspan:function(n){return Bu(n,"rowspan")},minWidth:m.constant(10),minHeight:m.constant(10),getInt:function(n,t){return parseInt(re.get(n,t),10)}},Pu=function(n,t,e){return re.getRaw(n,t).fold(function(){return e(n)+"px"},function(n){return n})},Wu=function(n){return Pu(n,"width",no.getPixelWidth)},_u=function(n){return Pu(n,"height",no.getHeight)},Mu=function(n,t,e,r,o){var i=si(n),u=B.map(i,function(n){return n.map(t.edge)});return B.map(i,function(n,t){return n.filter(m.not(Iu.hasColspan)).fold(function(){var n=ci(u,t);return r(n)},function(n){return e(n,o)})})},Lu=function(n){return n.map(function(n){return n+"px"}).getOr("")},qu=function(n,t,e,r){var o=fi(n),i=B.map(o,function(n){return n.map(t.edge)});return B.map(o,function(n,t){return n.filter(m.not(Iu.hasRowspan)).fold(function(){var n=ci(i,t);return r(n)},function(n){return e(n)})})},zu={getRawWidths:function(n,t){return Mu(n,t,Wu,Lu)},getPixelWidths:function(n,t,e){return Mu(n,t,no.getPixelWidth,function(n){return n.getOrThunk(e.minCellWidth)},e)},getPercentageWidths:function(n,t,e){return Mu(n,t,no.getPercentageWidth,function(n){return n.fold(function(){return e.minCellWidth()},function(n){return n/e.pixelWidth()*100})},e)},getPixelHeights:function(n,t){return qu(n,t,no.getHeight,function(n){return n.getOrThunk(Iu.minHeight)})},getRawHeights:function(n,t){return qu(n,t,_u,Lu)}},Fu=function(n,t,e){for(var r=0,o=n;o0&&r.setElementWidth(n,a)},Zu=function(n){0===Ht(n).length&&le.remove(n)},na=X.immutable("grid","cursor"),ta=function(n,t,e){return ea(n,t,e).orThunk(function(){return ea(n,0,0)})},ea=function(n,t,e){return w.from(n[t]).bind(function(n){return w.from(n.cells()[e]).bind(function(n){return w.from(n.element())})})},ra=function(n,t,e){return na(n,ea(n,t,e))},oa=function(n){return B.foldl(n,function(n,t){return B.exists(n,function(n){return n.row()===t.row()})?n:n.concat([t])},[]).sort(function(n,t){return n.row()-t.row()})},ia=function(n){return B.foldl(n,function(n,t){return B.exists(n,function(n){return n.column()===t.column()})?n:n.concat([t])},[]).sort(function(n,t){return n.column()-t.column()})},ua=function(n,t,e){var r=Xt(n,e),o=Kt.generate(r);return ei(o,t,!0)},aa=Qu,ca={insertRowBefore:Gi(function(n,t,e,r){var o=t.row(),i=t.row(),u=gu(n,i,o,e,r.getOrInit);return ra(u,i,t.column())},Yi,m.noop,m.noop,Oo),insertRowsBefore:Gi(function(n,t,e,r){var o=t[0].row(),i=t[0].row(),u=oa(t),a=B.foldl(u,function(n,t){return gu(n,i,o,e,r.getOrInit)},n);return ra(a,i,t[0].column())},$i,m.noop,m.noop,Oo),insertRowAfter:Gi(function(n,t,e,r){var o=t.row(),i=t.row()+t.rowspan(),u=gu(n,i,o,e,r.getOrInit);return ra(u,i,t.column())},Yi,m.noop,m.noop,Oo),insertRowsAfter:Gi(function(n,t,e,r){var o=oa(t),i=o[o.length-1].row(),u=o[o.length-1].row()+o[o.length-1].rowspan(),a=B.foldl(o,function(n,t){return gu(n,u,i,e,r.getOrInit)},n);return ra(a,u,t[0].column())},$i,m.noop,m.noop,Oo),insertColumnBefore:Gi(function(n,t,e,r){var o=t.column(),i=t.column(),u=pu(n,i,o,e,r.getOrInit);return ra(u,t.row(),i)},Yi,aa,m.noop,Oo),insertColumnsBefore:Gi(function(n,t,e,r){var o=ia(t),i=o[0].column(),u=o[0].column(),a=B.foldl(o,function(n,t){return pu(n,u,i,e,r.getOrInit)},n);return ra(a,t[0].row(),u)},$i,aa,m.noop,Oo),insertColumnAfter:Gi(function(n,t,e,r){var o=t.column(),i=t.column()+t.colspan(),u=pu(n,i,o,e,r.getOrInit);return ra(u,t.row(),i)},Yi,aa,m.noop,Oo),insertColumnsAfter:Gi(function(n,t,e,r){var o=t[t.length-1].column(),i=t[t.length-1].column()+t[t.length-1].colspan(),u=ia(t),a=B.foldl(u,function(n,t){return pu(n,i,o,e,r.getOrInit)},n);return ra(a,t[0].row(),i)},$i,aa,m.noop,Oo),splitCellIntoColumns:Gi(function(n,t,e,r){var o=hu(n,t.row(),t.column(),e,r.getOrInit);return ra(o,t.row(),t.column())},Yi,aa,m.noop,Oo),splitCellIntoRows:Gi(function(n,t,e,r){var o=vu(n,t.row(),t.column(),e,r.getOrInit);return ra(o,t.row(),t.column())},Yi,m.noop,m.noop,Oo),eraseColumns:Gi(function(n,t,e,r){var o=ia(t),i=wu(n,o[0].column(),o[o.length-1].column()),u=ta(i,t[0].row(),t[0].column());return na(i,u)},$i,aa,Zu,Oo),eraseRows:Gi(function(n,t,e,r){var o=oa(t),i=bu(n,o[0].row(),o[o.length-1].row()),u=ta(i,t[0].row(),t[0].column());return na(i,u)},$i,m.noop,Zu,Oo),makeColumnHeader:Gi(function(n,t,e,r){var o=Su(n,t.column(),e,r.replaceOrInit);return ra(o,t.row(),t.column())},Yi,m.noop,m.noop,Eo("row","th")),unmakeColumnHeader:Gi(function(n,t,e,r){var o=Su(n,t.column(),e,r.replaceOrInit);return ra(o,t.row(),t.column())},Yi,m.noop,m.noop,Eo(null,"td")),makeRowHeader:Gi(function(n,t,e,r){var o=Ru(n,t.row(),e,r.replaceOrInit);return ra(o,t.row(),t.column())},Yi,m.noop,m.noop,Eo("col","th")),unmakeRowHeader:Gi(function(n,t,e,r){var o=Ru(n,t.row(),e,r.replaceOrInit);return ra(o,t.row(),t.column())},Yi,m.noop,m.noop,Eo(null,"td")),mergeCells:Gi(function(n,t,e,r){var o=t.cells();Ho(o);var i=lu(n,t.bounds(),e,m.constant(o[0]));return na(i,w.from(o[0]))},Qi,m.noop,m.noop,Bo),unmergeCells:Gi(function(n,t,e,r){var o=B.foldr(t,function(n,t){return su(n,t,e,r.combine(t))},n);return na(o,w.from(t[0]))},Zi,aa,m.noop,Bo),pasteCells:Gi(function(n,t,e,r){var o,i,u,a,c=(o=t.clipboard(),i=t.generators(),u=Gt(o),a=Kt.generate(u),ei(a,i,!0)),l=nn.address(t.row(),t.column());return du(l,n,c,t.generators(),e).fold(function(){return na(n,w.some(t.element()))},function(n){var e=ta(n,t.row(),t.column());return na(n,e)})},Ki,aa,m.noop,Oo),pasteRowsBefore:Gi(function(n,t,e,r){var o=n[t.cells[0].row()],i=t.cells[0].row(),u=ua(t.clipboard(),t.generators(),o),a=mu(i,n,u,t.generators(),e),c=ta(a,t.cells[0].row(),t.cells[0].column());return na(a,c)},Ji,m.noop,m.noop,Oo),pasteRowsAfter:Gi(function(n,t,e,r){var o=n[t.cells[0].row()],i=t.cells[t.cells.length-1].row()+t.cells[t.cells.length-1].rowspan(),u=ua(t.clipboard(),t.generators(),o),a=mu(i,n,u,t.generators(),e),c=ta(a,t.cells[0].row(),t.cells[0].column());return na(a,c)},Ji,m.noop,m.noop,Oo)},la=function(n){return en.fromDom(n.getBody())},sa={getBody:la,getIsRoot:function(n){return function(t){return ot.eq(t,la(n))}},addSizeSuffix:function(n){return/^[0-9]+$/.test(n)&&(n+="px"),n},removePxSuffix:function(n){return n?n.replace(/px$/,""):""}},fa=function(n){return"rtl"===re.get(n,"direction")?"rtl":"ltr"},da={onDirection:function(n,t){return function(e){return"rtl"===fa(e)?t:n}},getDirection:fa},ma={isRtl:m.constant(!1)},ga={isRtl:m.constant(!0)},pa=function(n){return"rtl"===da.getDirection(n)?ga:ma},ha=function(n,t){var e,r=function(n){return"table"===xt.name(sa.getBody(n))};!1!==n.settings.table_clone_elements&&("string"==typeof n.settings.table_clone_elements?e=n.settings.table_clone_elements.split(/[ ,]/):Array.isArray(n.settings.table_clone_elements)&&(e=n.settings.table_clone_elements));var o=w.from(e),i=function(t,e,r,i){return function(u,a){var c=Bt.descendants(u,"td[data-mce-style],th[data-mce-style]");B.each(c,function(n){Dt.remove(n,"data-mce-style")});var l=i(),s=en.fromDom(n.getDoc()),f=xo(pa),d=Oe(r,s,o);return e(u)?t(l,u,a,d,f).bind(function(t){return B.each(t.newRows(),function(t){var e;e=t,n.fire("newrow",{node:e.dom()}),e.dom()}),B.each(t.newCells(),function(t){var e;e=t,n.fire("newcell",{node:e.dom()}),e.dom()}),t.cursor().map(function(t){var e=n.dom.createRng();return e.setStart(t.dom(),0),e.setEnd(t.dom(),0),e})}):w.none()}};return{deleteRow:i(ca.eraseRows,function(t){var e=Co(t);return!1===r(n)||e.rows()>1},m.noop,t),deleteColumn:i(ca.eraseColumns,function(t){var e=Co(t);return!1===r(n)||e.columns()>1},m.noop,t),insertRowsBefore:i(ca.insertRowsBefore,m.always,m.noop,t),insertRowsAfter:i(ca.insertRowsAfter,m.always,m.noop,t),insertColumnsBefore:i(ca.insertColumnsBefore,m.always,to,t),insertColumnsAfter:i(ca.insertColumnsAfter,m.always,to,t),mergeCells:i(ca.mergeCells,m.always,m.noop,t),unmergeCells:i(ca.unmergeCells,m.always,m.noop,t),pasteRowsBefore:i(ca.pasteRowsBefore,m.always,m.noop,t),pasteRowsAfter:i(ca.pasteRowsAfter,m.always,m.noop,t),pasteCells:i(ca.pasteCells,m.always,m.noop,t)}},va=function(n,t,e){var r=Gt(n),o=Kt.generate(r);return $i(o,t).map(function(n){var t=ei(o,e,!1).slice(n[0].row(),n[n.length-1].row()+n[n.length-1].rowspan()),r=Xi(t,e);return ii(r)})},ba=tinymce.util.Tools.resolve("tinymce.util.Tools"),wa=tinymce.util.Tools.resolve("tinymce.Env"),ya={applyAlign:function(n,t,e){e&&n.formatter.apply("align"+e,{},t)},applyVAlign:function(n,t,e){e&&n.formatter.apply("valign"+e,{},t)},unApplyAlign:function(n,t){ba.each("left center right".split(" "),function(e){n.formatter.remove("align"+e,{},t)})},unApplyVAlign:function(n,t){ba.each("top middle bottom".split(" "),function(e){n.formatter.remove("valign"+e,{},t)})},getTDTHOverallStyle:function(n,t,e){var r;return r=function(t,r){for(var o=0;o',t.insertBefore(r,t.firstChild)),ya.unApplyAlign(n,t),o.align&&ya.applyAlign(n,t,o.align),n.focus(),n.addVisual()})},Ta=function(n,t){var e,r,o,i,u,a,c,l,s,f=n.dom,d={};!0===t?(e=f.getParent(n.selection.getStart(),"table"))&&(c=e,l=(a=n).dom,s={width:l.getStyle(c,"width")||l.getAttrib(c,"width"),height:l.getStyle(c,"height")||l.getAttrib(c,"height"),cellspacing:l.getStyle(c,"border-spacing")||l.getAttrib(c,"cellspacing"),cellpadding:l.getAttrib(c,"data-mce-cell-padding")||l.getAttrib(c,"cellpadding")||ya.getTDTHOverallStyle(a.dom,c,"padding"),border:l.getAttrib(c,"data-mce-border")||l.getAttrib(c,"border")||ya.getTDTHOverallStyle(a.dom,c,"border"),borderColor:l.getAttrib(c,"data-mce-border-color"),caption:!!l.select("caption",c)[0],"class":l.getAttrib(c,"class")},ba.each("left center right".split(" "),function(n){a.formatter.matchNode(c,"align"+n)&&(s.align=n)}),!1!==a.settings.table_advtab&&ba.extend(s,Ca.extractAdvancedStyles(l,c)),d=s):(r={label:"Cols",name:"cols"},o={label:"Rows",name:"rows"}),n.settings.table_class_list&&(d["class"]&&(d["class"]=d["class"].replace(/\s*mce\-item\-table\s*/g,"")),i={name:"class",type:"listbox",label:"Class",values:Ca.buildListItems(n.settings.table_class_list,function(t){t.value&&(t.textStyle=function(){return n.formatter.getCssText({block:"table",classes:[t.value]})})})}),u={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:!1!==n.settings.table_appearance_options?[r,o,{label:"Width",name:"width",onchange:m.curry(Ca.updateStyleField,n)},{label:"Height",name:"height",onchange:m.curry(Ca.updateStyleField,n)},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[r,o,{label:"Width",name:"width",onchange:m.curry(Ca.updateStyleField,n)},{label:"Height",name:"height",onchange:m.curry(Ca.updateStyleField,n)}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},i]},!1!==n.settings.table_advtab?n.windowManager.open({title:"Table properties",data:d,bodyType:"tabpanel",body:[{title:"General",type:"form",items:u},Ca.createStyleForm(n)],onsubmit:m.curry(Ra,n,e)}):n.windowManager.open({title:"Table properties",data:d,body:u,onsubmit:m.curry(Ra,n,e)})},Da=function(n,t,e){var r=n.getParent(t,"table"),o=t.parentNode,i=n.select(e,r)[0];i||(i=n.create(e),r.firstChild?"CAPTION"===r.firstChild.nodeName?n.insertAfter(i,r.firstChild):r.insertBefore(i,r.firstChild):r.appendChild(i)),i.appendChild(t),o.hasChildNodes()||n.remove(o)};function Aa(n,t,e){var r,o=n.dom;function i(n,t,e){e&&o.setAttrib(n,t,e)}Ca.updateStyleField(n,e),r=e.control.rootControl.toJSON(),n.undoManager.transact(function(){ba.each(t,function(e){var u,a,c;i(e,"scope",r.scope),i(e,"style",r.style),i(e,"class",r["class"]),u=e,a="height",(c=sa.addSizeSuffix(r.height))&&o.setStyle(u,a,c),r.type!==e.parentNode.nodeName.toLowerCase()&&Da(n.dom,e,r.type),1===t.length&&ya.unApplyAlign(n,e),r.align&&ya.applyAlign(n,e,r.align)}),n.focus()})}var ka=function(n){var t,e,r,o,i,u,a,c,l,s,f=n.dom,d=[];t=f.getParent(n.selection.getStart(),"table"),e=f.getParent(n.selection.getStart(),"td,th"),ba.each(t.rows,function(n){ba.each(n.cells,function(t){if(f.getAttrib(t,"data-mce-selected")||t===e)return d.push(n),!1})}),(r=d[0])&&(d.length>1?i={height:"",scope:"","class":"",align:"",type:r.parentNode.nodeName.toLowerCase()}:(c=r,l=(a=n).dom,(s={height:l.getStyle(c,"height")||l.getAttrib(c,"height"),scope:l.getAttrib(c,"scope"),"class":l.getAttrib(c,"class")}).type=c.parentNode.nodeName.toLowerCase(),ba.each("left center right".split(" "),function(n){a.formatter.matchNode(c,"align"+n)&&(s.align=n)}),!1!==a.settings.table_row_advtab&&ba.extend(s,Ca.extractAdvancedStyles(l,c)),i=s),n.settings.table_row_class_list&&(o={name:"class",type:"listbox",label:"Class",values:Ca.buildListItems(n.settings.table_row_class_list,function(t){t.value&&(t.textStyle=function(){return n.formatter.getCssText({block:"tr",classes:[t.value]})})})}),u={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},o]},!1!==n.settings.table_row_advtab?n.windowManager.open({title:"Row properties",data:i,bodyType:"tabpanel",body:[{title:"General",type:"form",items:u},Ca.createStyleForm(n)],onsubmit:m.curry(Aa,n,d)}):n.windowManager.open({title:"Row properties",data:i,body:u,onsubmit:m.curry(Aa,n,d)}))},Na=function(n,t,e){var r,o=n.dom;function i(n,t,e){e&&o.setAttrib(n,t,e)}function u(n,t,e){e&&o.setStyle(n,t,e)}Ca.updateStyleField(n,e),r=e.control.rootControl.toJSON(),n.undoManager.transact(function(){ba.each(t,function(e){var a,c;i(e,"scope",r.scope),1===t.length?i(e,"style",r.style):(a=e,c=r.style,a.style.cssText+=";"+c),i(e,"class",r["class"]),u(e,"width",sa.addSizeSuffix(r.width)),u(e,"height",sa.addSizeSuffix(r.height)),r.type&&e.nodeName.toLowerCase()!==r.type&&(e=o.rename(e,r.type)),1===t.length&&(ya.unApplyAlign(n,e),ya.unApplyVAlign(n,e)),r.align&&ya.applyAlign(n,e,r.align),r.valign&&ya.applyVAlign(n,e,r.valign)}),n.focus()})},Oa=function(n){var t,e,r,o=[];if(o=n.dom.select("td[data-mce-selected],th[data-mce-selected]"),t=n.dom.getParent(n.selection.getStart(),"td,th"),!o.length&&t&&o.push(t),t=t||o[0]){var i,u,a,c;o.length>1?e={width:"",height:"",scope:"","class":"",align:"",style:"",type:t.nodeName.toLowerCase()}:(u=t,a=(i=n).dom,(c={width:a.getStyle(u,"width")||a.getAttrib(u,"width"),height:a.getStyle(u,"height")||a.getAttrib(u,"height"),scope:a.getAttrib(u,"scope"),"class":a.getAttrib(u,"class")}).type=u.nodeName.toLowerCase(),ba.each("left center right".split(" "),function(n){i.formatter.matchNode(u,"align"+n)&&(c.align=n)}),ba.each("top middle bottom".split(" "),function(n){i.formatter.matchNode(u,"valign"+n)&&(c.valign=n)}),!1!==i.settings.table_cell_advtab&&ba.extend(c,Ca.extractAdvancedStyles(a,u)),e=c),n.settings.table_cell_class_list&&(r={name:"class",type:"listbox",label:"Class",values:Ca.buildListItems(n.settings.table_cell_class_list,function(t){t.value&&(t.textStyle=function(){return n.formatter.getCssText({block:"td",classes:[t.value]})})})});var l={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width",onchange:m.curry(Ca.updateStyleField,n)},{label:"Height",name:"height",onchange:m.curry(Ca.updateStyleField,n)},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},r]};!1!==n.settings.table_cell_advtab?n.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:e,body:[{title:"General",type:"form",items:l},Ca.createStyleForm(n)],onsubmit:m.curry(Na,n,o)}):n.windowManager.open({title:"Cell properties",data:e,body:l,onsubmit:m.curry(Na,n,o)})}},Ea=ba.each,Ba=w.none(),Ia={registerCommands:function(n,t,e,r){var o=sa.getIsRoot(n),i=function(){return en.fromDom(n.dom.getParent(n.selection.getStart(),"th,td"))},u=function(n){return Vt(n,o)},a=function(t){var o=i();u(o).each(function(i){var u=kr.forMenu(r,i,o);t(i,u).each(function(t){n.selection.setRng(t),n.focus(),e.clear(i)})})},c=function(t){var e=i();return u(e).bind(function(t){var o=en.fromDom(n.getDoc()),i=kr.forMenu(r,t,e),u=Oe(m.noop,o,w.none());return va(t,i,u)})},l=function(t){Ba.each(function(o){var a=B.map(o,function(n){return he(n)}),c=i();u(c).bind(function(o){var i=en.fromDom(n.getDoc()),u=Ee(i),l=kr.pasteRows(r,o,c,a,u);t(o,l).each(function(t){n.selection.setRng(t),n.focus(),e.clear(o)})})})};Ea({mceTableSplitCells:function(){a(t.unmergeCells)},mceTableMergeCells:function(){a(t.mergeCells)},mceTableInsertRowBefore:function(){a(t.insertRowsBefore)},mceTableInsertRowAfter:function(){a(t.insertRowsAfter)},mceTableInsertColBefore:function(){a(t.insertColumnsBefore)},mceTableInsertColAfter:function(){a(t.insertColumnsAfter)},mceTableDeleteCol:function(){a(t.deleteColumn)},mceTableDeleteRow:function(){a(t.deleteRow)},mceTableCutRow:function(n){Ba=c(),a(t.deleteRow)},mceTableCopyRow:function(n){Ba=c()},mceTablePasteRowBefore:function(n){l(t.pasteRowsBefore)},mceTablePasteRowAfter:function(n){l(t.pasteRowsAfter)},mceTableDelete:function(){var t=en.fromDom(n.dom.getParent(n.selection.getStart(),"th,td"));Vt(t,o).filter(m.not(o)).each(function(t){var e=en.fromText("");ue.after(t,e),le.remove(t);var r=n.dom.createRng();r.setStart(e.dom(),0),r.setEnd(e.dom(),0),n.selection.setRng(r)})}},function(t,e){n.addCommand(e,t)}),Ea({mceInsertTable:m.curry(Ta,n),mceTableProps:m.curry(Ta,n,!0),mceTableRowProps:m.curry(ka,n),mceTableCellProps:m.curry(Oa,n)},function(t,e){n.addCommand(e,function(n,e){t(e)})})},getClipboardRows:function(){return Ba.fold(function(){},function(n){return B.map(n,function(n){return n.dom()})})},setClipboardRows:function(n){var t=B.map(n,en.fromDom);Ba=w.from(t)}},Pa=function(n){var t=w.from(n.dom().documentElement).map(en.fromDom).getOr(n);return{parent:m.constant(t),view:m.constant(n),origin:m.constant(oo(0,0))}},Wa=function(n,t){return{parent:m.constant(t),view:m.constant(n),origin:m.constant(oo(0,0))}},_a=function(n){var t=X.immutable.apply(null,n),e=[];return{bind:function(n){if(n===undefined)throw"Event bind error: undefined handler";e.push(n)},unbind:function(n){e=B.filter(e,function(t){return t!==n})},trigger:function(){var n=t.apply(null,arguments);B.each(e,function(t){t(n)})}}},Ma=function(n){return{registry:L.map(n,function(n){return{bind:n.bind,unbind:n.unbind}}),trigger:L.map(n,function(n){return n.trigger})}},La={mode:Ao.exactly(["compare","extract","mutate","sink"]),sink:Ao.exactly(["element","start","stop","destroy"]),api:Ao.exactly(["forceDrop","drop","move","delayDrop"])},qa={resolve:gi("ephox-dragster").resolve},za=function(n,t){return function(e){if(n(e)){var r,o,i,u,a,c,l,s=en.fromDom(e.target),f=function(){e.stopPropagation()},d=function(){e.preventDefault()},g=m.compose(d,f),p=(r=s,o=e.clientX,i=e.clientY,u=f,a=d,c=g,l=e,{target:m.constant(r),x:m.constant(o),y:m.constant(i),stop:u,prevent:a,kill:c,raw:m.constant(l)});t(p)}}},Fa=function(n,t,e,r,o){var i=za(e,r);return n.dom().addEventListener(t,i,o),{unbind:m.curry(ja,n,t,i,o)}},ja=function(n,t,e,r){n.dom().removeEventListener(t,e,r)},Ha=function(n,t,e,r){return Fa(n,t,e,r,!1)},Va=m.constant(!0),Ua=function(n,t,e){return Ha(n,t,Va,e)},Ga=La.mode({compare:function(n,t){return oo(t.left()-n.left(),t.top()-n.top())},extract:function(n){return w.some(oo(n.x(),n.y()))},sink:function(n,t){var e,r,o,i=(e=t,r=Xo.merge({layerClass:qa.resolve("blocker")},e),o=en.fromTag("div"),Dt.set(o,"role","presentation"),re.setAll(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Ni.add(o,qa.resolve("blocker")),Ni.add(o,r.layerClass),{element:function(){return o},destroy:function(){le.remove(o)}}),u=Ua(i.element(),"mousedown",n.forceDrop),a=Ua(i.element(),"mouseup",n.drop),c=Ua(i.element(),"mousemove",n.move),l=Ua(i.element(),"mouseout",n.delayDrop);return La.sink({element:i.element,start:function(n){ue.append(n,i.element())},stop:function(){le.remove(i.element())},destroy:function(){i.destroy(),a.unbind(),c.unbind(),l.unbind(),u.unbind()}})},mutate:function(n,t){n.mutate(t.left(),t.top())}}),Xa=function(){var n=w.none(),t=Ma({move:_a(["info"])});return{onEvent:function(e,r){r.extract(e).each(function(e){var o,i,u;(o=r,i=e,u=n.map(function(n){return o.compare(n,i)}),n=w.some(i),u).each(function(n){t.trigger.move(n)})})},reset:function(){n=w.none()},events:t.registry}},Ya=function(){var n={onEvent:function(n,t){},reset:m.noop},t=Xa(),e=n;return{on:function(){e.reset(),e=t},off:function(){e.reset(),e=n},isOn:function(){return e===t},onEvent:function(n,t){e.onEvent(n,t)},events:t.events}},$a=function(n,t){var e=null;return{cancel:function(){null!==e&&(clearTimeout(e),e=null)},throttle:function(){var r=arguments;null!==e&&clearTimeout(e),e=setTimeout(function(){n.apply(null,r),e=null,r=null},t)}}},Ka=function(n,t,e){var r=!1,o=Ma({start:_a([]),stop:_a([])}),i=Ya(),u=function(){l.stop(),i.isOn()&&(i.off(),o.trigger.stop())},a=$a(u,200);i.events.move.bind(function(e){t.mutate(n,e.info())});var c=function(n){return function(){var t=Array.prototype.slice.call(arguments,0);if(r)return n.apply(null,t)}},l=t.sink(La.api({forceDrop:u,drop:c(u),move:c(function(n,e){a.cancel(),i.onEvent(n,t)}),delayDrop:c(a.throttle)}),e);return{element:l.element,go:function(n){l.start(n),i.on(),o.trigger.start()},on:function(){r=!0},off:function(){r=!1},destroy:function(){l.destroy()},events:o.registry}},Ja=function(n,t){var e=t!==undefined?t:{},r=e.mode!==undefined?e.mode:Ga;return Ka(n,r,t)},Qa=function(){var n,t=Ma({drag:_a(["xDelta","yDelta","target"])}),e=w.none(),r={mutate:function(t,e){n.trigger.drag(t,e)},events:(n=Ma({drag:_a(["xDelta","yDelta"])})).registry};return r.events.drag.bind(function(n){e.each(function(e){t.trigger.drag(n.xDelta(),n.yDelta(),e)})}),{assign:function(n){e=w.some(n)},get:function(){return e},mutate:r.mutate,events:t.registry}},Za=function(n,t,e){return qt.ancestor(n,t,e).isSome()},nc=pi.resolve("resizer-bar-dragging"),tc=function(n,t){var e=wo.height,r=function(n,t,e){var r=Qa(),o=Ja(r,{}),i=w.none(),u=function(n,t){return w.from(Dt.get(n,t))};r.events.drag.bind(function(n){u(n.target(),"data-row").each(function(t){var e=Iu.getInt(n.target(),"top");re.set(n.target(),"top",e+n.yDelta()+"px")}),u(n.target(),"data-column").each(function(t){var e=Iu.getInt(n.target(),"left");re.set(n.target(),"left",e+n.xDelta()+"px")})});var a=function(n,t){return Iu.getInt(n,t)-parseInt(Dt.get(n,"data-initial-"+t),10)};o.events.stop.bind(function(){r.get().each(function(r){i.each(function(o){u(r,"data-row").each(function(n){var t=a(r,"top");Dt.remove(r,"data-initial-top"),d.trigger.adjustHeight(o,t,parseInt(n,10))}),u(r,"data-column").each(function(n){var t=a(r,"left");Dt.remove(r,"data-initial-left"),d.trigger.adjustWidth(o,t,parseInt(n,10))}),Mi(n,o,e,t)})})});var c=function(t,e){d.trigger.startAdjust(),r.assign(t),Dt.set(t,"data-initial-"+e,parseInt(re.get(t,e),10)),Ni.add(t,nc),re.set(t,"opacity","0.2"),o.go(n.parent())},l=Ua(n.parent(),"mousedown",function(n){Fi(n.target())&&c(n.target(),"top"),ji(n.target())&&c(n.target(),"left")}),s=function(t){return ot.eq(t,n.view())},f=Ua(n.view(),"mouseover",function(r){"table"===xt.name(r.target())||Za(r.target(),"table",s)?(i="table"===xt.name(r.target())?w.some(r.target()):qt.ancestor(r.target(),"table",s)).each(function(r){Mi(n,r,e,t)}):Nt.inBody(r.target())&&zi(n)}),d=Ma({adjustHeight:_a(["table","delta","row"]),adjustWidth:_a(["table","delta","column"]),startAdjust:_a([])});return{destroy:function(){l.unbind(),f.unbind(),o.destroy(),zi(n)},refresh:function(r){Mi(n,r,e,t)},on:o.on,off:o.off,hideBars:m.curry(Li,n),showBars:m.curry(qi,n),events:d.registry}}(n,t,e),o=Ma({beforeResize:_a(["table"]),afterResize:_a(["table"]),startDrag:_a([])});return r.events.adjustHeight.bind(function(n){o.trigger.beforeResize(n.table());var t=e.delta(n.delta(),n.table());Ju(n.table(),t,n.row(),e),o.trigger.afterResize(n.table())}),r.events.startAdjust.bind(function(n){o.trigger.startDrag()}),r.events.adjustWidth.bind(function(n){o.trigger.beforeResize(n.table());var e=t.delta(n.delta(),n.table());Ku(n.table(),e,n.column(),t),o.trigger.afterResize(n.table())}),{on:r.on,off:r.off,hideBars:r.hideBars,showBars:r.showBars,destroy:r.destroy,events:o.registry}},ec=function(n,t){return n.inline?Wa(sa.getBody(n),(e=en.fromTag("div"),re.setAll(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),ue.append(Nt.body(),e),e)):Pa(en.fromDom(n.getDoc()));var e},rc=function(n,t){n.inline&&le.remove(t.parent())},oc=function(n){var t,e,r=w.none(),o=w.none(),i=w.none(),u=/(\d+(\.\d+)?)%/,a=function(n){return"TABLE"===n.nodeName};return n.on("init",function(){var t=xo(pa),e=ec(n);if(i=w.some(e),n.settings.object_resizing&&!1!==n.settings.table_resize_bars&&(!0===n.settings.object_resizing||"table"===n.settings.object_resizing)){var u=tc(e,t);u.on(),u.events.startDrag.bind(function(t){r=w.some(n.selection.getRng())}),u.events.afterResize.bind(function(t){var e=t.table(),o=Bt.descendants(e,"td[data-mce-style],th[data-mce-style]");B.each(o,function(n){Dt.remove(n,"data-mce-style")}),r.each(function(t){n.selection.setRng(t),n.focus()}),n.undoManager.add()}),o=w.some(u)}}),n.on("ObjectResizeStart",function(r){var o;a(r.target)&&(t=r.width,o=r.target,e=n.dom.getStyle(o,"width")||n.dom.getAttrib(o,"width"))}),n.on("ObjectResized",function(r){if(a(r.target)){var o=r.target;if(u.test(e)){var i=parseFloat(u.exec(e)[1]),c=r.width*i/t;n.dom.setStyle(o,"width",c+"%")}else{var l=[];ba.each(o.rows,function(t){ba.each(t.cells,function(t){var e=n.dom.getStyle(t,"width",!0);l.push({cell:t,width:e})})}),ba.each(l,function(t){n.dom.setStyle(t.cell,"width",t.width),n.dom.setAttrib(t.cell,"width",null)})}}}),{lazyResize:function(){return o},lazyWire:function(){return i.getOr(Pa(en.fromDom(n.getBody())))},destroy:function(){o.each(function(n){n.destroy()}),i.each(function(t){rc(n,t)})}}},ic=function(n){return{fold:n}},uc=function(n){return ic(function(t,e,r,o){return t(n)})},ac=function(n){return ic(function(t,e,r,o){return e(n)})},cc=function(n,t){return ic(function(e,r,o,i){return o(n,t)})},lc=function(n){return ic(function(t,e,r,o){return o(n)})},sc=function(n,t){return Vt(n,t).bind(function(t){var e=Ht(t);return B.findIndex(e,function(t){return ot.eq(n,t)}).map(function(n){return{index:m.constant(n),all:m.constant(e)}})})},fc=function(n,t){return sc(n,t).fold(function(){return uc(n)},function(t){return t.index()+1=0?cc(n,t.all()[t.index()-1]):ac(n)})},mc=wr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),gc={before:mc.before,on:mc.on,after:mc.after,cata:function(n,t,e,r){return n.fold(t,e,r)},getStart:function(n){return n.fold(m.identity,m.identity,m.identity)}},pc=wr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),hc=X.immutable("start","soffset","finish","foffset"),vc={domRange:pc.domRange,relative:pc.relative,exact:pc.exact,exactFromRange:function(n){return pc.exact(n.start(),n.soffset(),n.finish(),n.foffset())},range:hc,getWin:function(n){var t=n.match({domRange:function(n){return en.fromDom(n.startContainer)},relative:function(n,t){return gc.getStart(n)},exact:function(n,t,e,r){return n}});return dt.defaultView(t)}},bc=function(n,t,e,r){var o=dt.owner(n).dom().createRange();return o.setStart(n.dom(),t),o.setEnd(e.dom(),r),o},wc=function(n,t,e,r){var o=bc(n,t,e,r),i=ot.eq(n,e)&&t===r;return o.collapsed&&!i},yc=function(n,t){n.selectNodeContents(t.dom())},xc=function(n){n.deleteContents()},Cc=function(n){return{left:m.constant(n.left),top:m.constant(n.top),right:m.constant(n.right),bottom:m.constant(n.bottom),width:m.constant(n.width),height:m.constant(n.height)}},Sc={create:function(n){return n.document.createRange()},replaceWith:function(n,t){xc(n),n.insertNode(t.dom())},selectNodeContents:function(n,t){var e=n.document.createRange();return yc(e,t),e},selectNodeContentsUsing:yc,relativeToNative:function(n,t,e){var r,o,i=n.document.createRange();return r=i,t.fold(function(n){r.setStartBefore(n.dom())},function(n,t){r.setStart(n.dom(),t)},function(n){r.setStartAfter(n.dom())}),o=i,e.fold(function(n){o.setEndBefore(n.dom())},function(n,t){o.setEnd(n.dom(),t)},function(n){o.setEndAfter(n.dom())}),i},exactToNative:function(n,t,e,r,o){var i=n.document.createRange();return i.setStart(t.dom(),e),i.setEnd(r.dom(),o),i},deleteContents:xc,cloneFragment:function(n){var t=n.cloneContents();return en.fromDom(t)},getFirstRect:function(n){var t=n.getClientRects(),e=t.length>0?t[0]:n.getBoundingClientRect();return e.width>0||e.height>0?w.some(e).map(Cc):w.none()},getBounds:function(n){var t=n.getBoundingClientRect();return t.width>0||t.height>0?w.some(t).map(Cc):w.none()},isWithin:function(n,t){return t.compareBoundaryPoints(n.END_TO_START,n)<1&&t.compareBoundaryPoints(n.START_TO_END,n)>-1},toString:function(n){return n.toString()}},Rc=wr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Tc=function(n,t,e){return t(en.fromDom(e.startContainer),e.startOffset,en.fromDom(e.endContainer),e.endOffset)},Dc=function(n,t){var e,r,o,i=(e=n,t.match({domRange:function(n){return{ltr:m.constant(n),rtl:w.none}},relative:function(n,t){return{ltr:yn(function(){return Sc.relativeToNative(e,n,t)}),rtl:yn(function(){return w.some(Sc.relativeToNative(e,t,n))})}},exact:function(n,t,r,o){return{ltr:yn(function(){return Sc.exactToNative(e,n,t,r,o)}),rtl:yn(function(){return w.some(Sc.exactToNative(e,r,o,n,t))})}}}));return(o=(r=i).ltr()).collapsed?r.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Rc.rtl(en.fromDom(n.endContainer),n.endOffset,en.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Tc(0,Rc.ltr,o)}):Tc(0,Rc.ltr,o)},Ac=(Rc.ltr,Rc.rtl,Dc),kc=function(n,t){return Dc(n,t).match({ltr:function(t,e,r,o){var i=n.document.createRange();return i.setStart(t.dom(),e),i.setEnd(r.dom(),o),i},rtl:function(t,e,r,o){var i=n.document.createRange();return i.setStart(r.dom(),o),i.setEnd(t.dom(),e),i}})},Nc=function(n,t,e){return t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom},Oc=function(n,t,e,r,o){if(0===o)return 0;if(t===r)return o-1;for(var i=r,u=1;ua.bottom);else{if(ei)return u-1;i=c}}return 0},Ec={locate:function(n,t,e,r){var o=n.dom().createRange();o.selectNode(t.dom());var i=o.getClientRects();return $o(i,function(n){return Nc(n,e,r)?w.some(n):w.none()}).map(function(o){return i=n,a=e,c=r,l=o,s=function(n){var t=i.dom().createRange();return t.setStart(u.dom(),n),t.collapse(!0),t},f=we.get(u=t).length,d=Oc(function(n){return s(n).getBoundingClientRect()},a,c,l.right,f),s(d);var i,u,a,c,l,s,f,d})}},Bc=function(n,t,e,r){var o=n.dom().createRange(),i=dt.children(t);return $o(i,function(t){return o.selectNode(t.dom()),Nc(o.getBoundingClientRect(),e,r)?Ic(n,t,e,r):w.none()})},Ic=function(n,t,e,r){return(xt.isText(t)?Ec.locate:Bc)(n,t,e,r)},Pc=function(n,t,e,r){var o=n.dom().createRange();o.selectNode(t.dom());var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,e)),a=Math.max(i.top,Math.min(i.bottom,r));return Ic(n,t,u,a)},Wc=function(n,t){return t-n.left0){var t=n.getRangeAt(0),e=n.getRangeAt(n.rangeCount-1);return w.some(vc.range(en.fromDom(t.startContainer),t.startOffset,en.fromDom(e.endContainer),e.endOffset))}return w.none()}(n)},Qc=function(n){var t=n.getSelection();return t.rangeCount>0?Jc(t):w.none()},Zc=function(n,t,e,r,o){var i=Xc(t,e,r,o);Kc(n,i)},nl=function(n){return Qc(n).map(function(n){return vc.exact(n.start(),n.soffset(),n.finish(),n.foffset())})},tl=function(n,t,e){var r=Gc(t,e);Kc(n,r)},el=function(n){var t=vc.getWin(n).dom(),e=function(n,e,r,o){return Sc.exactToNative(t,n,e,r,o)},r=Uc(n);return Ac(t,r).match({ltr:e,rtl:e})},rl=function(n,t){var e=Sc.selectNodeContents(n,t);Yc(n,e)},ol=function(n){n.getSelection().removeAllRanges()},il=function(n,t){var e=kc(n,t);return Sc.getFirstRect(e)},ul=function(n,t,e){return Fc(n,t,e)},al=tinymce.util.Tools.resolve("tinymce.util.VK"),cl=function(n,t,e,r){return fl(n,t,fc(e),r)},ll=function(n,t,e,r){return fl(n,t,dc(e),r)},sl=function(n,t){var e=vc.exact(t,0,t,0);return el(e)},fl=function(n,t,e,r,o){return e.fold(w.none,w.none,function(n,t){return Te.first(t).map(function(n){return sl(0,n)})},function(e){return Vt(e,t).bind(function(t){var o,i=kr.noMenu(e);return n.undoManager.transact(function(){r.insertRowsAfter(t,i)}),o=Bt.descendants(t,"tr"),B.last(o).bind(function(n){return qt.descendant(n,"td,th").map(function(n){return sl(0,n)})})})})},dl=["table","li","dl"],ml={handle:function(n,t,e,r){if(n.keyCode===al.TAB){var o=sa.getBody(t),i=function(n){var t=xt.name(n);return ot.eq(n,o)||B.contains(dl,t)},u=t.selection.getRng();if(u.collapsed){var a=en.fromDom(u.startContainer);jt(a,i).each(function(o){n.preventDefault(),(n.shiftKey?ll:cl)(t,i,o,e,r).each(function(n){t.selection.setRng(n)})})}}}},gl={response:X.immutable("selection","kill")},pl=function(n){return function(t){return t===n}},hl=pl(38),vl=pl(40),bl={ltr:{isBackward:pl(37),isForward:pl(39)},rtl:{isBackward:pl(39),isForward:pl(37)},isUp:hl,isDown:vl,isNavigation:function(n){return n>=37&&n<=40}},wl=function(n,t){var e=kc(n,t);return{start:m.constant(en.fromDom(e.startContainer)),soffset:m.constant(e.startOffset),finish:m.constant(en.fromDom(e.endContainer)),foffset:m.constant(e.endOffset)}},yl=function(n,t,e,r){return{start:m.constant(gc.on(n,t)),finish:m.constant(gc.on(e,r))}},xl=(tt.detect().browser.isSafari(),function(n){var t=n!==undefined?n.dom():document,e=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return oo(e,r)}),Cl=xl,Sl=function(n,t,e){(e!==undefined?e.dom():document).defaultView.scrollBy(n,t)},Rl=function(n){return{elementFromPoint:function(t,e){return w.from(n.document.elementFromPoint(t,e)).map(en.fromDom)},getRect:function(n){return n.dom().getBoundingClientRect()},getRangedRect:function(t,e,r,o){var i=vc.exact(t,e,r,o);return il(n,i).map(function(n){return L.map(n,m.apply)})},getSelection:function(){return nl(n).map(function(t){return wl(n,t)})},fromSitus:function(t){var e=vc.relative(t.start(),t.finish());return wl(n,e)},situsFromPoint:function(t,e){return ul(n,t,e).map(function(n){return{start:m.constant(gc.on(n.start(),n.soffset())),finish:m.constant(gc.on(n.finish(),n.foffset()))}})},clearSelection:function(){ol(n)},setSelection:function(t){Zc(n,t.start(),t.soffset(),t.finish(),t.foffset())},setRelativeSelection:function(t,e){tl(n,t,e)},selectContents:function(t){rl(n,t)},getInnerHeight:function(){return n.innerHeight},getScrollY:function(){return Cl(en.fromDom(n.document)).top()},scrollBy:function(t,e){Sl(t,e,en.fromDom(n.document))}}},Tl=function(n,t,e,r,o){if(!ot.eq(e,r))return lr(e,r,t).bind(function(t){var r=t.boxes().getOr([]);return r.length>0?(o(n,r,t.start(),t.finish()),w.some(gl.response(w.some(yl(e,0,e,Ce(e))),!0))):w.none()})},Dl={sync:function(n,t,e,r,o,i,u){return ot.eq(e,o)&&r===i?w.none():qt.closest(e,"td,th",t).bind(function(e){return qt.closest(o,"td,th",t).bind(function(r){return Tl(n,t,e,r,u)})})},detect:Tl,update:function(n,t,e,r,o){return fr(r,n,t,o.firstSelectedSelector(),o.lastSelectedSelector()).map(function(n){return o.clear(e),o.selectRange(e,n.boxes(),n.start(),n.finish()),n.boxes()})}},Al=X.immutableBag(["left","top","right","bottom"],[]),kl={nu:Al,moveUp:function(n,t){return Al({left:n.left(),top:n.top()-t,right:n.right(),bottom:n.bottom()-t})},moveDown:function(n,t){return Al({left:n.left(),top:n.top()+t,right:n.right(),bottom:n.bottom()+t})},moveBottomTo:function(n,t){var e=n.bottom()-n.top();return Al({left:n.left(),top:t-e,right:n.right(),bottom:t})},moveTopTo:function(n,t){var e=n.bottom()-n.top();return Al({left:n.left(),top:t,right:n.right(),bottom:t+e})},getTop:function(n){return n.top()},getBottom:function(n){return n.bottom()},translate:function(n,t,e){return Al({left:n.left()+t,top:n.top()+e,right:n.right()+t,bottom:n.bottom()+e})},toString:function(n){return"("+n.left()+", "+n.top()+") -> ("+n.right()+", "+n.bottom()+")"}},Nl=function(n){return kl.nu({left:n.left,top:n.top,right:n.right,bottom:n.bottom})},Ol=function(n,t){return w.some(n.getRect(t))},El=function(n,t,e){return xt.isElement(t)?Ol(n,t).map(Nl):xt.isText(t)?(r=n,o=t,i=e,i>=0&&i0?r.getRangedRect(o,i-1,o,i):w.none()).map(Nl):w.none();var r,o,i},Bl=function(n,t){return xt.isElement(t)?Ol(n,t).map(Nl):xt.isText(t)?n.getRangedRect(t,0,t,Ce(t)).map(Nl):w.none()},Il=X.immutable("item","mode"),Pl=function(n,t,e,r){var o=r!==undefined?r:Wl;return n.property().parent(t).map(function(n){return Il(n,o)})},Wl=function(n,t,e,r){var o=r!==undefined?r:_l;return e.sibling(n,t).map(function(n){return Il(n,o)})},_l=function(n,t,e,r){var o=r!==undefined?r:_l,i=n.property().children(t);return e.first(i).map(function(n){return Il(n,o)})},Ml=[{current:Pl,next:Wl,fallback:w.none()},{current:Wl,next:_l,fallback:w.some(Pl)},{current:_l,next:_l,fallback:w.some(Wl)}],Ll=function(n,t,e,r,o){return o=o!==undefined?o:Ml,B.find(o,function(n){return n.current===e}).bind(function(e){return e.current(n,t,r,e.next).orThunk(function(){return e.fallback.bind(function(e){return Ll(n,t,e,r)})})})},ql={backtrack:Pl,sidestep:Wl,advance:_l,go:Ll},zl={left:function(){return{sibling:function(n,t){return n.query().prevSibling(t)},first:function(n){return n.length>0?w.some(n[n.length-1]):w.none()}}},right:function(){return{sibling:function(n,t){return n.query().nextSibling(t)},first:function(n){return n.length>0?w.some(n[0]):w.none()}}}},Fl=function(n,t,e,r,o,i){return ql.go(n,t,r,o).bind(function(t){return i(t.item())?w.none():e(t.item())?w.some(t.item()):Fl(n,t.item(),e,t.mode(),o,i)})},jl=function(n,t,e,r){return Fl(n,t,e,ql.sidestep,zl.left(),r)},Hl=function(n,t,e,r){return Fl(n,t,e,ql.sidestep,zl.right(),r)},Vl=function(n,t){return 0===n.property().children(t).length},Ul=function(n,t,e,r){return jl(n,t,e,r)},Gl=function(n,t,e,r){return Hl(n,t,e,r)},Xl={before:function(n,t,e){return Ul(n,t,m.curry(Vl,n),e)},after:function(n,t,e){return Gl(n,t,m.curry(Vl,n),e)},seekLeft:Ul,seekRight:Gl,walkers:function(){return{left:zl.left,right:zl.right}},walk:function(n,t,e,r,o){return ql.go(n,t,e,r,o)},backtrack:ql.backtrack,sidestep:ql.sidestep,advance:ql.advance},Yl=Pe(),$l={gather:function(n,t,e){return Xl.gather(Yl,n,t,e)},before:function(n,t){return Xl.before(Yl,n,t)},after:function(n,t){return Xl.after(Yl,n,t)},seekLeft:function(n,t,e){return Xl.seekLeft(Yl,n,t,e)},seekRight:function(n,t,e){return Xl.seekRight(Yl,n,t,e)},walkers:function(){return Xl.walkers()},walk:function(n,t,e,r){return Xl.walk(Yl,n,t,e,r)}},Kl=wr([{none:[]},{retry:["caret"]}]),Jl=function(n,t,e){return Mt.closest(t,zo).fold(m.constant(!1),function(t){return Bl(n,t).exists(function(n){return r=n,(t=e).left()r.right();var t,r})})},Ql={point:kl.getTop,adjuster:function(n,t,e,r,o){var i=kl.moveUp(o,5);return Math.abs(e.top()-r.top())<1?Kl.retry(i):e.bottom()o.bottom()?Kl.retry(i):e.top()===o.bottom()?Kl.retry(kl.moveDown(o,1)):Jl(n,t,o)?Kl.retry(kl.translate(i,5,0)):Kl.none()},move:kl.moveDown,gather:$l.after},ns=function(n,t,e,r,o){return 0===o?w.some(r):(c=n,l=r.left(),s=t.point(r),c.elementFromPoint(l,s).filter(function(n){return"table"===xt.name(n)}).isSome()?(u=r,a=o-1,ns(n,i=t,e,i.move(u,5),a)):n.situsFromPoint(r.left(),t.point(r)).bind(function(i){return i.start().fold(w.none,function(i,u){return Bl(n,i,u).bind(function(u){return t.adjuster(n,i,u,e,r).fold(w.none,function(r){return ns(n,t,e,r,o-1)})}).orThunk(function(){return w.some(r)})},w.none)}));var i,u,a,c,l,s},ts=function(n,t,e){var r,o,i,u=n.move(e,5),a=ns(t,n,e,u,100).getOr(u);return(r=n,o=a,i=t,r.point(o)>i.getInnerHeight()?w.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?w.some(-r.point(o)):w.none()).fold(function(){return t.situsFromPoint(a.left(),n.point(a))},function(e){return t.scrollBy(0,e),t.situsFromPoint(a.left(),n.point(a)-e)})},es={tryUp:m.curry(ts,Ql),tryDown:m.curry(ts,Zl),ieTryUp:function(n,t){return n.situsFromPoint(t.left(),t.top()-5)},ieTryDown:function(n,t){return n.situsFromPoint(t.left(),t.bottom()+5)},getJumpSize:m.constant(5)},rs=wr([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),os=function(n){return qt.closest(n,"tr")},is={verify:function(n,t,e,r,o,i,u){return qt.closest(r,"td,th",u).bind(function(e){return qt.closest(t,"td,th",u).map(function(t){return ot.eq(e,t)?ot.eq(r,e)&&Ce(e)===o?i(t):rs.none("in same cell"):Ve(os,[e,t]).fold(function(){return o=t,u=e,a=(r=n).getRect(o),(c=r.getRect(u)).right>a.left&&c.left1||1===r.length&&!ot.eq(t,n))&&(a.selectRange(i,r,e.start(),e.finish()),o.selectContents(n))})})})},mouseup:function(){c.each(l)}});return{mousedown:f.mousedown,mouseover:f.mouseover,mouseup:f.mouseup}},Bs=function(n,t,e,r){var o=Rl(n),i=function(){return r.clear(t),w.none()};return{keydown:function(n,u,a,c,l,s){var f=n.raw().which,d=!0===n.raw().shiftKey;return sr(t,r.selectedSelector()).fold(function(){return bl.isDown(f)&&d?m.curry(Ts,o,t,e,Ns.down,c,u,r.selectRange):bl.isUp(f)&&d?m.curry(Ts,o,t,e,Ns.up,c,u,r.selectRange):bl.isDown(f)?m.curry(Rs,o,e,Ns.down,c,u,As):bl.isUp(f)?m.curry(Rs,o,e,Ns.up,c,u,Ds):w.none},function(n){var e=function(e){return function(){return $o(e,function(e){return Dl.update(e.rows(),e.cols(),t,n,r)}).fold(function(){return dr(t,r.firstSelectedSelector(),r.lastSelectedSelector()).map(function(n){var e=bl.isDown(f)||s.isForward(f)?gc.after:gc.before;return o.setRelativeSelection(gc.on(n.first(),0),e(n.table())),r.clear(t),gl.response(w.none(),!0)})},function(n){return w.some(gl.response(w.none(),!0))})}};return bl.isDown(f)&&d?e([Os(1,0)]):bl.isUp(f)&&d?e([Os(-1,0)]):s.isBackward(f)&&d?e([Os(0,-1),Os(-1,0)]):s.isForward(f)&&d?e([Os(0,1),Os(1,0)]):bl.isNavigation(f)&&!1===d?i:w.none})()},keyup:function(n,o,i,u,a){return sr(t,r.selectedSelector()).fold(function(){var c=n.raw().which;return 0==(!0===n.raw().shiftKey)?w.none():bl.isNavigation(c)?Dl.sync(t,e,o,i,u,a,r.selectRange):w.none()},w.none)}}},Is=function(n){var t=function(t){Dt.remove(t,n.selected()),Dt.remove(t,n.firstSelected()),Dt.remove(t,n.lastSelected())},e=function(t){Dt.set(t,n.selected(),"1")},r=function(e){var r=Bt.descendants(e,n.selectedSelector());B.each(r,t)};return{clear:r,selectRange:function(t,o,i,u){r(t),B.each(o,e),Dt.set(i,n.firstSelected(),"1"),Dt.set(u,n.lastSelected(),"1")},selectedSelector:n.selectedSelector,firstSelectedSelector:n.firstSelectedSelector,lastSelectedSelector:n.lastSelectedSelector}},Ps=function(n,t){var e=X.immutableBag(["mousedown","mouseover","mouseup","keyup","keydown"],[]),r=w.none(),o=Is(br);return n.on("init",function(i){var u=n.getWin(),a=sa.getBody(n),c=sa.getIsRoot(n),l=Es(u,a,c,o),s=Bs(u,a,c,o),f=function(t,e){e.kill()&&t.kill(),e.selection().each(function(t){var e=vc.relative(t.start(),t.finish()),r=kc(u,e);n.selection.setRng(r)})},d=function(t){var e=h(t);if(e.raw().shiftKey&&bl.isNavigation(e.raw().which)){var r=n.selection.getRng(),o=en.fromDom(r.startContainer),i=en.fromDom(r.endContainer);s.keyup(e,o,r.startOffset,i,r.endOffset).each(function(n){f(e,n)})}},g=function(n){return!(Dt.has(n,"data-mce-bogus")||"br"===xt.name(n)||xt.isText(n)&&0===we.get(n).length)},p=function(e){var r,o,i=h(e);t().each(function(n){n.hideBars()}),40===e.which&&(r=en.fromDom(n.getBody()),o=function(n){return dt.prevSibling(n).bind(function(n){return g(n)?w.some(n):o(n)})},dt.lastChild(r).bind(function(n){return g(n)?w.some(n):o(n)})).each(function(t){"table"===xt.name(t)&&(n.settings.forced_root_block?n.dom.add(n.getBody(),n.settings.forced_root_block,n.settings.forced_root_block_attrs,"
"):n.dom.add(n.getBody(),"br"))});var u=n.selection.getRng(),a=en.fromDom(n.selection.getStart()),c=en.fromDom(u.startContainer),l=en.fromDom(u.endContainer),d=pa(a).isRtl()?bl.rtl:bl.ltr;s.keydown(i,c,u.startOffset,l,u.endOffset,d).each(function(n){f(i,n)}),t().each(function(n){n.showBars()})},h=function(n){var t=en.fromDom(n.target),e=function(){n.stopPropagation()},r=function(){n.preventDefault()},o=m.compose(r,e);return{target:m.constant(t),x:m.constant(n.x),y:m.constant(n.y),stop:e,prevent:r,kill:o,raw:m.constant(n)}},v=function(n){return 0===n.button},b=function(n){v(n)&&l.mousedown(h(n))},y=function(n){var t;((t=n).buttons===undefined||0!=(1&t.buttons))&&l.mouseover(h(n))},x=function(n){v&&l.mouseup(h(n))};n.on("mousedown",b),n.on("mouseover",y),n.on("mouseup",x),n.on("keyup",d),n.on("keydown",p),n.on("nodechange",function(){var t=n.selection,e=en.fromDom(t.getStart()),r=en.fromDom(t.getEnd()),i=Vt(e),u=Vt(r);i.bind(function(n){return u.bind(function(t){return ot.eq(n,t)?w.some(!0):w.none()})}).fold(function(){o.clear(a)},m.noop)}),r=w.some(e({mousedown:b,mouseover:y,mouseup:x,keyup:d,keydown:p}))}),{clear:o.clear,destroy:function(){r.each(function(n){})}}},Ws=function(n){return{get:function(){var t=sa.getBody(n);return mr(t,br.selectedSelector()).fold(function(){return n.selection.getStart()===undefined?xr.none():xr.single(n.selection)},function(n){return xr.multiple(n)})}}},_s=ba.each,Ms={addButtons:function(n){var t=[];function e(t){return function(){n.execCommand(t)}}_s("inserttable tableprops deletetable | cell row column".split(" "),function(e){"|"===e?t.push({text:"-"}):t.push(n.menuItems[e])}),n.addButton("table",{type:"menubutton",title:"Table",menu:t}),n.addButton("tableprops",{title:"Table properties",onclick:m.curry(Ta,n,!0),icon:"table"}),n.addButton("tabledelete",{title:"Delete table",onclick:e("mceTableDelete")}),n.addButton("tablecellprops",{title:"Cell properties",onclick:e("mceTableCellProps")}),n.addButton("tablemergecells",{title:"Merge cells",onclick:e("mceTableMergeCells")}),n.addButton("tablesplitcells",{title:"Split cell",onclick:e("mceTableSplitCells")}),n.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:e("mceTableInsertRowBefore")}),n.addButton("tableinsertrowafter",{title:"Insert row after",onclick:e("mceTableInsertRowAfter")}),n.addButton("tabledeleterow",{title:"Delete row",onclick:e("mceTableDeleteRow")}),n.addButton("tablerowprops",{title:"Row properties",onclick:e("mceTableRowProps")}),n.addButton("tablecutrow",{title:"Cut row",onclick:e("mceTableCutRow")}),n.addButton("tablecopyrow",{title:"Copy row",onclick:e("mceTableCopyRow")}),n.addButton("tablepasterowbefore",{title:"Paste row before",onclick:e("mceTablePasteRowBefore")}),n.addButton("tablepasterowafter",{title:"Paste row after",onclick:e("mceTablePasteRowAfter")}),n.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:e("mceTableInsertColBefore")}),n.addButton("tableinsertcolafter",{title:"Insert column after",onclick:e("mceTableInsertColAfter")}),n.addButton("tabledeletecol",{title:"Delete column",onclick:e("mceTableDeleteCol")})},addToolbars:function(n){var t=n.settings.table_toolbar;""!==t&&!1!==t&&(t||(t="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),n.addContextToolbar(function(t){return n.dom.is(t,"table")&&n.getBody().contains(t)},t))}},Ls={addMenuItems:function(n,t){var e=w.none(),r=[],o=[],i=[],u=[],a=function(n){n.disabled(!0)},c=function(n){n.disabled(!1)},l=function(){var n=this;r.push(n),e.fold(function(){a(n)},function(t){c(n)})},s=function(){var n=this;o.push(n),e.fold(function(){a(n)},function(t){c(n)})};n.on("init",function(){n.on("nodechange",function(l){var s=w.from(n.dom.getParent(n.selection.getStart(),"th,td"));(e=s.bind(function(n){var e=en.fromDom(n);return Vt(e).map(function(n){return kr.forMenu(t,n,e)})})).fold(function(){B.each(r,a),B.each(o,a),B.each(i,a),B.each(u,a)},function(n){B.each(r,c),B.each(o,c),B.each(i,function(t){t.disabled(n.mergable().isNone())}),B.each(u,function(t){t.disabled(n.unmergable().isNone())})})})});var f=function(n,t,e,r){var o,i,u,a,c,l=r.getEl().getElementsByTagName("table")[0],s=r.isRtl()||"tl-tr"===r.parent().rel;for(l.nextSibling.innerHTML=t+1+" x "+(e+1),s&&(t=9-t),i=0;i<10;i++)for(o=0;o<10;o++)a=l.rows[i].childNodes[o].firstChild,c=(s?o>=t:o<=t)&&i<=e,n.dom.toggleClass(a,"mce-active",c),c&&(u=a);return u.parentNode},d=!1===n.settings.table_grid?{text:"Table",icon:"table",context:"table",onclick:m.curry(Ta,n)}:{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(t){t.aria&&(this.parent().hideAll(),t.stopImmediatePropagation(),Ta(n))},onshow:function(){f(n,0,0,this.menu.items()[0])},onhide:function(){var t=this.menu.items()[0].getEl().getElementsByTagName("a");n.dom.removeClass(t,"mce-active"),n.dom.addClass(t[0],"mce-active")},menu:[{type:"container",html:function(){var n="";n='';for(var t=0;t<10;t++){n+="";for(var e=0;e<10;e++)n+=' | ';n+="
"}return n+="
",n+='1 x 1
'}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(t){var e,r,o=t.target;"A"===o.tagName.toUpperCase()&&(e=parseInt(o.getAttribute("data-mce-x"),10),r=parseInt(o.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"===this.parent().rel)&&(e=9-e),e===this.lastX&&r===this.lastY||(f(n,e,r,t.control),this.lastX=e,this.lastY=r))},onclick:function(t){var e=this;"A"===t.target.tagName.toUpperCase()&&(t.preventDefault(),t.stopPropagation(),e.parent().cancel(),n.undoManager.transact(function(){Pr.insert(n,e.lastX+1,e.lastY+1)}),n.addVisual())}}]};function g(t){return function(){n.execCommand(t)}}var p={text:"Table properties",context:"table",onPostRender:l,onclick:m.curry(Ta,n,!0)},h={text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"},v={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:s},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:s},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:s},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:s},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:s},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:s},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:s},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:s}]},b={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:s},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:s},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:s}]},y={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:s},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:function(){var n=this;i.push(n),e.fold(function(){a(n)},function(t){n.disabled(t.mergable().isNone())})}},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:function(){var n=this;u.push(n),e.fold(function(){a(n)},function(t){n.disabled(t.unmergable().isNone())})}}]};n.addMenuItem("inserttable",d),n.addMenuItem("tableprops",p),n.addMenuItem("deletetable",h),n.addMenuItem("row",v),n.addMenuItem("column",b),n.addMenuItem("cell",y)}};f.add("table",function(n){var t=oc(n),e=Ps(n,t.lazyResize),r=ha(n,t.lazyWire),o=Ws(n);Ia.registerCommands(n,r,e,o),Nr.registerEvents(n,o,r,e),Ls.addMenuItems(n,o),Ms.addButtons(n),Ms.addToolbars(n),n.on("PreInit",function(){n.serializer.addTempAttr(br.firstSelected()),n.serializer.addTempAttr(br.lastSelected())}),!1!==n.settings.table_tab_navigation&&n.on("keydown",function(e){ml.handle(e,n,r,t.lazyWire)}),n.on("remove",function(){t.destroy(),e.destroy()}),this.insertTable=function(t,e){return Pr.insert(n,t,e)},this.setClipboardRows=Ia.setClipboardRows,this.getClipboardRows=Ia.getClipboardRows})}();!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),n=tinymce.util.Tools.resolve("tinymce.EditorManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Delay"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),r={getTabFocus:function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))}},c=t.DOM,s=function(e){e.keyCode!==u.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},a=function(e){function t(t){var s,a,y,f;if(!(t.keyCode!==u.TAB||t.ctrlKey||t.altKey||t.metaKey||t.isDefaultPrevented())&&(1===(y=l.explode(r.getTabFocus(e))).length&&(y[1]=y[0],y[0]=":prev"),a=t.shiftKey?":prev"===y[0]?m(-1):c.get(y[0]):":next"===y[1]?m(1):c.get(y[1]))){var d=n.get(a.id||a.name);a.id&&d?d.focus():o.setTimeout(function(){i.webkit||window.focus(),a.focus()},10),t.preventDefault()}function m(i){function o(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&n.get(t.id)&&-1!==e.tabIndex&&function i(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&i(e.parentNode)}(e)}if(a=c.select(":input:enabled,*[tabindex]:not(iframe)"),l.each(a,function(t,n){if(t.id===e.id)return s=n,!1}),i>0){for(f=s+1;f=0;f--)if(o(a[f]))return a[f];return null}}e.on("init",function(){e.inline&&c.setAttrib(e.getBody(),"tabIndex",null),e.on("keyup",s),i.gecko?e.on("keypress keydown",t):e.on("keydown",t)})};e.add("tabfocus",function(e){a(e)})}();!function(){"use strict";var e=function(t){var n=t,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return e(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!t.get("powerpaste")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},r=function(e,t){return{clipboard:e,quirks:t}},a={firePastePreProcess:function(e,t,n,r){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:r})},firePastePostProcess:function(e,t,n,r){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:r})},firePastePlainTextToggle:function(e,t){return e.fire("PastePlainTextToggle",{state:t})},firePaste:function(e,t){return e.fire("paste",{ieFake:t})}},i={shouldPlainTextInform:function(e){return e.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(e){return e.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(e){return e.getParam("paste_data_images",!1)},shouldFilterDrop:function(e){return e.getParam("paste_filter_drop",!0)},getPreProcess:function(e){return e.getParam("paste_preprocess")},getPostProcess:function(e){return e.getParam("paste_postprocess")},getWebkitStyles:function(e){return e.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(e){return e.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(e){return e.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(e){return e.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(e){return e.getParam("paste_as_text",!1)},getRetainStyleProps:function(e){return e.getParam("paste_retain_style_properties")},getWordValidElements:function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(e){return e.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(e){return e.getParam("paste_enable_default_filters",!0)}},o=function(e,t,n){var r,o,s;"text"===t.pasteFormat?(t.pasteFormat="html",a.firePastePlainTextToggle(e,!1)):(t.pasteFormat="text",a.firePastePlainTextToggle(e,!0),s=e,!1===n.get()&&i.shouldPlainTextInform(s)&&(o="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=e).notificationManager.open({text:r.translate(o),type:"info"}),n.set(!0))),e.focus()},s=function(e,t,n){e.addCommand("mceTogglePlainTextPaste",function(){o(e,t,n)}),e.addCommand("mceInsertClipboardContent",function(e,n){n.content&&t.pasteHtml(n.content,n.internal),n.text&&t.pasteText(n.text)})},l=tinymce.util.Tools.resolve("tinymce.Env"),u=tinymce.util.Tools.resolve("tinymce.util.Delay"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d="x-tinymce/html",m="\x3c!-- "+d+" --\x3e",p={mark:function(e){return m+e},unmark:function(e){return e.replace(m,"")},isMarked:function(e){return-1!==e.indexOf(m)},internalHtmlMime:function(){return d}},g=tinymce.util.Tools.resolve("tinymce.html.Entities"),v=function(e){return e.replace(/\r?\n/g,"
")},h=function(e,t,n){var r=e.split(/\n\n/),a=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+g.encodeAllRaw(t[n])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(t,n),i=""+t+">",o=c.map(r,function(e){return e.split(/\n/).join("
")});return 1===o.length?o[0]:c.map(o,function(e){return a+e+i}).join("")},P={isPlainText:function(e){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e)},convert:function(e,t,n){return t?h(e,t,n):v(e)},toBRs:v,toBlockElements:h},y=tinymce.util.Tools.resolve("tinymce.html.DomParser"),b=tinymce.util.Tools.resolve("tinymce.html.Node"),x=tinymce.util.Tools.resolve("tinymce.html.Schema"),w=tinymce.util.Tools.resolve("tinymce.html.Serializer");function T(e,t){return c.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var C={filter:T,innerText:function(e){var t=x(),n=y({},t),r="",a=t.getShortEndedElements(),i=c.makeMap("script noscript style textarea video audio iframe object"," "),o=t.getBlockElements();return e=T(e,[//g]),function s(e){var t=e.name,n=e;if("br"!==t)if(a[t]&&(r+=" "),i[t])r+=" ";else{if(3===e.type&&(r+=e.value),!e.shortEnded&&(e=e.firstChild))do{s(e)}while(e=e.next);o[t]&&n.next&&(r+="\n","p"===t&&(r+="\n"))}else r+="\n"}(n.parse(e)),r},trimHtml:function(e){return e=T(e,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/
/g,/
$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}};function _(e){var t,n;return n=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],e=e.replace(/^[\u00a0 ]+/,""),c.each(n,function(n){if(n.test(e))return t=!0,!1}),t}function D(e){var t,n,r=1;function a(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)do{t+=a(e)}while(e=e.next);return t}function i(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!i(e,t))return!1}while(e=e.next);return!0}function o(e,a,o){var s=e._listLevel||r;s!==r&&(s1&&t.attr("start",""+o),e.wrap(t)),e.name="li",s>r&&n&&n.lastChild.append(t),r=s,function l(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)do{l(e)}while(e=e.next)}(e),i(e,/^\u00a0+/),i(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(e,/^\u00a0+/)}for(var s=[],l=e.firstChild;void 0!==l&&null!==l;)if(s.push(l),null!==(l=l.walk()))for(;void 0!==l&&l.parent!==e;)l=l.walk();for(var u=0;u/gi,/]+id="?docs-internal-[^>]*>/gi,//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var a=i.getWordValidElements(e),o=x({valid_elements:a,valid_children:"-li[p]"});c.each(o.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var s=y({},o);s.addAttributeFilter("style",function(t){for(var n,a=t.length;a--;)(n=t[a]).attr("style",k(e,r,n,n.attr("style"))),"span"===n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),s.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),s.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),s.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)if(n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var l=s.parse(t);return i.shouldConvertWordFakeLists(e)&&D(l),t=w({validate:e.settings.validate},o).serialize(l)}(e,t):t},isWordContent:function(e){return/')}),!0);var r,a,i},B=function(e,t){return e.insertContent(t,{merge:i.shouldMergeFormats(e),paste:!0}),!0},H={isImageUrl:I,isAbsoluteUrl:S,insertContent:function(e,t){var n,r;!1===i.isSmartPasteEnabled(e)?B(e,t):(n=e,r=t,c.each([A,O,B],function(e){return!0!==e(n,r,B)}))}},N=function(e){var t,n,r,o,s,d,m=this,g=0,v=(t=e,r="%MCEPASTEBIN%",{create:function(){var e,a,i=t.dom,o=t.getBody(),s=t.dom.getViewPort(t.getWin()).y,u=20;if(n=t.selection.getRng(),t.inline&&(a=t.selection.getScrollContainer())&&a.scrollTop>0&&(s=a.scrollTop),n.getClientRects){var c=function(e){var t,r,a,o=e.startContainer;if((t=e.getClientRects()).length)return t[0];if(e.collapsed&&1===o.nodeType){for(a=o.childNodes[n.startOffset];a&&3===a.nodeType&&!a.data.length;)a=a.nextSibling;if(a)return"BR"===a.tagName&&(r=i.doc.createTextNode("\ufeff"),a.parentNode.insertBefore(r,a),(e=i.createRng()).setStartBefore(r),e.setEndAfter(r),t=e.getClientRects(),i.remove(r)),t.length?t[0]:void 0}}(n);if(c)u=s+(c.top-i.getPos(o).y);else{u=s;var f=n.startContainer;f&&(3===f.nodeType&&f.parentNode!==o&&(f=f.parentNode),1===f.nodeType&&(u=i.getPos(f,a||o).y))}}e=t.dom.add(t.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+u+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"},r),(l.ie||l.gecko)&&i.setStyle(e,"left","rtl"===i.getStyle(o,"direction",!0)?65535:-65535),i.bind(e,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),e.focus(),t.selection.select(e,!0)},remove:function(){if(o()){for(var e=void 0;e=t.dom.get("mcepastebin");)t.dom.remove(e),t.dom.unbind(e);n&&t.selection.setRng(n)}n=null},getEl:o=function(){return t.dom.get("mcepastebin")},getHtml:function(){var e,n,r,a,i,o=function(e,n){e.appendChild(n),t.dom.remove(n,!0)};for(n=c.grep(t.getBody().childNodes,function(e){return"mcepastebin"===e.id}),e=n.shift(),c.each(n,function(t){o(e,t)}),r=(a=t.dom.select("div[id=mcepastebin]",e)).length-1;r>=0;r--)i=t.dom.create("div"),e.insertBefore(i,a[r]),o(i,a[r]);return e?e.innerHTML:""},getLastRng:function(){return n},isDefault:function(){var e,t=o();return(e=t)&&"mcepastebin"===e.id&&s(t.innerHTML)},isDefaultContent:s=function(e){return e===r}}),h="data:text/mce-internal,",y=C.createIdGenerator("mceclip");function b(t,n){var r=n||p.isMarked(t),a=M.process(e,p.unmark(t),r);!1===a.cancelled&&H.insertContent(e,a.content)}function x(t){t=e.dom.encode(t).replace(/\r\n/g,"\n"),b(t=P.convert(t,e.settings.forced_root_block,e.settings.forced_root_block_attrs),!1)}function w(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&n.length>0&&-1===n.indexOf(h)&&(t["text/plain"]=n)}if(e.types)for(var r=0;r',!1)}else b('
',!1)}function D(t,n){var r=t.clipboardData||t.dataTransfer;function a(e){var r,a,i,o=!1;if(e)for(r=0;r0}function R(e){return f.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode}function E(){function t(t,n,r,a){var i,o;k(t,"text/html")?i=t["text/html"]:(i=v.getHtml(),a=a||p.isMarked(i),v.isDefaultContent(i)&&(r=!0)),i=C.trimHtml(i),v.remove(),o=!1===a&&P.isPlainText(i),i.length&&!o||(r=!0),r&&(i=k(t,"text/plain")&&o?t["text/plain"]:C.innerText(i)),v.isDefaultContent(i)?n||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?x(i):b(i,a)}e.on("keydown",function(t){function n(e){R(e)&&!e.isDefaultPrevented()&&v.remove()}if(R(t)&&!t.isDefaultPrevented()){if((d=t.shiftKey&&86===t.keyCode)&&l.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),g=(new Date).getTime(),l.ie&&d)return t.preventDefault(),void a.firePaste(e,!0);v.remove(),v.create(),e.once("keyup",n),e.once("paste",function(){e.off("keyup",n)})}}),e.on("paste",function(n){var r,a,i=(new Date).getTime(),o=(r=w(n.clipboardData||e.getDoc().dataTransfer),C.isMsEdge()?c.extend(r,{"text/html":""}):r),s=(new Date).getTime()-i,f=(new Date).getTime()-g-s<1e3,h="text"===m.pasteFormat||d,P=k(o,p.internalHtmlMime());d=!1,n.isDefaultPrevented()||(a=n.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&a&&a.items&&0===a.items.length)?v.remove():T(o)||!D(n,v.getLastRng()||e.selection.getRng())?(f||n.preventDefault(),!l.ie||f&&!n.ieFake||k(o,"text/html")||(v.create(),e.dom.bind(v.getEl(),"paste",function(e){e.stopPropagation()}),e.getDoc().execCommand("Paste",!1,null),o["text/html"]=v.getHtml()),k(o,"text/html")?(n.preventDefault(),P||(P=p.isMarked(o["text/html"])),t(o,f,h,P)):u.setEditorTimeout(e,function(){t(o,f,h,P)},0)):v.remove()})}m.pasteFormat=i.isPasteAsTextEnabled(e)?"text":"html",m.pasteHtml=b,m.pasteText=x,m.pasteImageData=D,m.getDataTransferItems=w,m.hasHtmlOrText=T,m.hasContentType=k,e.on("preInit",function(){var t;E(),e.parser.addNodeFilter("img",function(n,r,a){function i(e){e.attr("data-mce-object")||t===l.transparentSrc||e.remove()}if(!e.settings.paste_data_images&&(s=a).data&&!0===s.data.paste)for(var o=n.length;o--;)(t=n[o].attributes.map.src)&&(0===t.indexOf("webkit-fake-url")?i(n[o]):e.settings.allow_html_data_urls||0!==t.indexOf("data:")||i(n[o]));var s})})},L=function(){},$=function(e,t,n){if(r=e,!1!==l.iOS||r===undefined||"function"!=typeof r.setData||!0===C.isMsEdge())return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(p.internalHtmlMime(),t),!0}catch(a){return!1}var r},W=function(e,t,n,r){$(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},j=function(e){return function(t,n){var r=p.mark(t),a=e.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=e.dom.create("div",{contenteditable:"true"},r);e.dom.setStyles(a,{position:"fixed",left:"-3000px",width:"1000px",overflow:"hidden"}),a.appendChild(i),e.dom.add(e.getBody(),a);var o=e.selection.getRng();i.focus();var s=e.dom.createRng();s.selectNodeContents(i),e.selection.setRng(s),setTimeout(function(){a.parentNode.removeChild(a),e.selection.setRng(o),n()},0)}},U=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},V=function(e){var t,n;e.on("cut",(t=e,function(e){!1===t.selection.isCollapsed()&&W(e,U(t),j(t),function(){setTimeout(function(){t.execCommand("Delete")},0)})})),e.on("copy",(n=e,function(e){!1===n.selection.isCollapsed()&&W(e,U(n),j(n),L)}))},z=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),K=function(e,t){return z.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},G=function(e,t){e.focus(),e.selection.setRng(t)},X=function(e,t,n){i.shouldBlockDrop(e)&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),i.shouldPasteDataImages(e)||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.on("drop",function(r){var a,o;if(o=K(e,r),!r.isDefaultPrevented()&&!n.get()){a=t.getDataTransferItems(r.dataTransfer);var s,l=t.hasContentType(a,p.internalHtmlMime());if((t.hasHtmlOrText(a)&&(!(s=a["text/plain"])||0!==s.indexOf("file://"))||!t.pasteImageData(r,o))&&o&&i.shouldFilterDrop(e)){var c=a["mce-internal"]||a["text/html"]||a["text/plain"];c&&(r.preventDefault(),u.setEditorTimeout(e,function(){e.undoManager.transact(function(){a["mce-internal"]&&e.execCommand("Delete"),G(e,o),c=C.trimHtml(c),a["text/html"]?t.pasteHtml(c,l):t.pasteText(c)})}))}}}),e.on("dragstart",function(e){n.set(!0)}),e.on("dragover dragend",function(t){i.shouldPasteDataImages(e)&&!1===n.get()&&(t.preventDefault(),G(e,K(e,t))),"dragend"===t.type&&n.set(!1)})},q=function(e){var t=e.plugins.paste,n=i.getPreProcess(e);n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=i.getPostProcess(e);r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})};function Y(e,t){e.on("PastePreProcess",function(n){n.content=t(e,n.content,n.internal,n.wordContent)})}function Z(e,t){if(!R.isWordContent(t))return t;var n=[];c.each(e.schema.getBlockElements(),function(e,t){n.push(t)});var r=new RegExp("(?:
[\\s\\r\\n]+|
)*(<\\/?("+n.join("|")+")[^>]*>)(?:
[\\s\\r\\n]+|
)*","g");return t=C.filter(t,[[r,"$1"]]),t=C.filter(t,[[/
/g,"
"],[/
/g," "],[/
/g,"
"]])}function J(e,t,n,r){if(r||n)return t;var a=i.getWebkitStyles(e);if(!1===i.shouldRemoveWebKitStyles(e)||"all"===a)return t;if(a&&(a=a.split(/[, ]/)),a){var o=e.dom,s=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var i=o.parseStyle(o.decode(n),"span"),l={};if("none"===a)return t+r;for(var u=0;u]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function Q(e,t){e.$("a",t).find("font,u").each(function(t,n){e.dom.remove(n,!0)})}var ee=function(e){var t,n;l.webkit&&Y(e,J),l.ie&&(Y(e,Z),n=Q,(t=e).on("PastePostProcess",function(e){n(t,e.node)}))},te=function(e){return function(){return e}},ne=function(e){for(var t=new Array(arguments.length-1),n=1;n10){var e=document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r=e,a=n,document.body.appendChild(r),r.dispatchEvent(a),document.body.removeChild(r)}else{var o=window.open("","_blank");if(o){o.opener=null;var i=o.document;i.open(),i.write(''),i.close()}}var r,a},_=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===_.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,_.trim(o.sort().join(" "))):null},T=function(t,e){return e=e||t.selection.getNode(),M(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},C=function(t){return t&&"A"===t.nodeName&&t.href},M=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},O=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},N=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},R=function(t,e){return function(n){t.undoManager.transact(function(){var o=t.selection.getNode(),i=T(t,o),r={href:n.href,target:n.target?n.target:null,rel:n.rel?n.rel:null,"class":n["class"]?n["class"]:null,title:n.title?n.title:null};v(t.settings)||!1!==p(t.settings)||(r.rel=w(r.rel,"_blank"===r.target)),n.href===e.href&&(e.attach(),e={}),i?(t.focus(),n.hasOwnProperty("text")&&("innerText"in i?i.innerText=n.text:i.textContent=n.text),t.dom.setAttribs(i,r),t.selection.select(i),t.undoManager.add()):M(o)?N(t,o,r):n.hasOwnProperty("text")?t.insertContent(t.dom.createHTML("a",r,t.dom.encode(n.text))):t.execCommand("mceInsertLink",!1,r)})}},A=function(t){return function(){t.undoManager.transact(function(){var e=t.selection.getNode();M(e)?O(t,e):t.execCommand("unlink")})}},L=C,P=function(t){return _.grep(t,C).length>0},E=function(t){return!(/]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},K=T,S=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},U=w,D=tinymce.util.Tools.resolve("tinymce.util.Delay"),I=tinymce.util.Tools.resolve("tinymce.util.XHR"),B={},F=function(t,e,n){var o=function(t,n){return n=n||[],_.each(t,function(t){var i={text:t.text||t.title};t.menu?i.menu=o(t.menu):(i.value=t.value,e&&e(i)),n.push(i)}),n};return o(t,n||[])},q=function(t,e,n){var o=t.selection.getRng();D.setEditorTimeout(t,function(){t.windowManager.confirm(e,function(e){t.selection.setRng(o),n(e)})})},V=function(t,e){var n,o,i,a,l,y,k,b,w,T,C,M={},O=t.selection,N=t.dom,L=function(t){var e=i.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),i.find("#href").value(t.control.value())},P=function(){o||!a||M.text||this.parent().parent().find("#text")[0].value(this.value())};a=E(O.getContent()),n=K(t),M.text=o=S(t.selection,n),M.href=n?N.getAttrib(n,"href"):"",n?M.target=N.getAttrib(n,"target"):u(t.settings)&&(M.target=c(t.settings)),(C=N.getAttrib(n,"rel"))&&(M.rel=C),(C=N.getAttrib(n,"class"))&&(M["class"]=C),(C=N.getAttrib(n,"title"))&&(M.title=C),a&&(l={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){M.text=this.value()}}),e&&(y={type:"listbox",label:"Link list",values:F(e,function(e){e.value=t.convertURL(e.value||e.url,"href")},[{text:"None",value:""}]),onselect:L,value:t.convertURL(M.href,"href"),onPostRender:function(){y=this}}),d(t.settings)&&(s(t.settings)===undefined&&f(t,[{text:"None",value:""},{text:"New window",value:"_blank"}]),b={name:"target",type:"listbox",label:"Target",values:F(s(t.settings))}),v(t.settings)&&(k={name:"rel",type:"listbox",label:"Rel",values:F(m(t.settings),function(e){!1===p(t.settings)&&(e.value=U(e.value,"_blank"===M.target))})}),h(t.settings)&&(w={name:"class",type:"listbox",label:"Class",values:F(g(t.settings),function(e){e.value&&(e.textStyle=function(){return t.formatter.getCssText({inline:"a",classes:[e.value]})})})}),x(t.settings)&&(T={name:"title",type:"textbox",label:"Title",value:M.title}),i=t.windowManager.open({title:"Insert link",data:M,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(e){var n=e.meta||{};y&&y.value(t.convertURL(this.value(),"href")),_.each(e.meta,function(t,e){var n=i.find("#"+e);"text"===e?0===o.length&&(n.value(t),M.text=t):n.value(t)}),n.attach&&(B={href:this.value(),attach:n.attach}),n.text||P.call(this)},onkeyup:P,onbeforecall:function(t){t.meta=i.toJSON()}},l,T,function(e){var n=[];if(_.each(t.dom.select("a:not([href])"),function(t){var o=t.name||t.id;o&&n.push({text:o,value:"#"+o,selected:-1!==e.indexOf("#"+o)})}),n.length)return n.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:n,onselect:L}}(M.href),y,k,b,w],onSubmit:function(e){var n=r(t.settings),i=R(t,B),l=A(t),u=_.extend({},M,e.data),c=u.href;c?(a&&u.text!==o||delete u.text,c.indexOf("@")>0&&-1===c.indexOf("//")&&-1===c.indexOf("mailto:")?q(t,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(u.href="mailto:"+c),i(u)}):!0===n&&!/^\w+:/i.test(c)||!1===n&&/^\s*www[\.|\d\.]/i.test(c)?q(t,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(u.href="http://"+c),i(u)}):i(u)):l()}})},z=function(t){var e,n,o;n=V,"string"==typeof(o=l((e=t).settings))?I.send({url:o,success:function(t){n(e,JSON.parse(t))}}):"function"==typeof o?o(function(t){n(e,t)}):n(e,o)},H=function(t,e){return t.dom.getParent(e,"a[href]")},J=function(t){return H(t,t.selection.getStart())},$=function(t,e){if(e){var n=(i=e).getAttribute("data-mce-href")||i.getAttribute("href");if(/^#/.test(n)){var o=t.$(n);o.length&&t.selection.scrollIntoView(o[0],!0)}else b(e.href)}var i},j=function(t){return function(){z(t)}},G=function(t){return function(){$(t,J(t))}},X=function(t){return function(e){var n,o,i,r,l;return!!(a(t.settings)&&(r=t,l=r.plugins.contextmenu,!l||!l.isContextMenuVisible())&&L(e)&&3===(i=(o=(n=t.selection).getRng()).startContainer).nodeType&&n.isCollapsed()&&o.startOffset>0&&o.startOffset")})},t=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(o){n(o),t(o)})}();!function(){"use strict";var e=function(t){var n=t,i=function(){return n};return{get:i,set:function(e){n=e},clone:function(){return e(i())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{isFullscreen:function(){return null!==e.get()}}},i=function(e,t){e.fire("FullscreenStateChanged",{state:t})},r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,l=function(e,t){var n,l,o,c,s,u,d=document.body,a=document.documentElement,h=t.get(),f=function(){var e,t,n,i;r.setStyle(o,"height",(n=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}).h-(l.clientHeight-o.clientHeight))},m=function(){r.unbind(window,"resize",f)};if(n=(l=e.getContainer()).style,c=(o=e.getContentAreaContainer().firstChild).style,h)c.width=h.iframeWidth,c.height=h.iframeHeight,h.containerWidth&&(n.width=h.containerWidth),h.containerHeight&&(n.height=h.containerHeight),r.removeClass(d,"mce-fullscreen"),r.removeClass(a,"mce-fullscreen"),r.removeClass(l,"mce-fullscreen"),s=h.scrollPos,window.scrollTo(s.x,s.y),r.unbind(window,"resize",h.resizeHandler),e.off("remove",h.removeHandler),t.set(null),i(e,!1);else{var g={scrollPos:(u=r.getViewPort(),{x:u.x,y:u.y}),containerWidth:n.width,containerHeight:n.height,iframeWidth:c.width,iframeHeight:c.height,resizeHandler:f,removeHandler:m};c.width=c.height="100%",n.width=n.height="",r.addClass(d,"mce-fullscreen"),r.addClass(a,"mce-fullscreen"),r.addClass(l,"mce-fullscreen"),r.bind(window,"resize",f),e.on("remove",m),f(),t.set(g),i(e,!0)}},o=function(e,t){e.addCommand("mceFullScreen",function(){l(e,t)})},c=function(e){return function(t){var n=t.control;e.on("FullscreenStateChanged",function(e){n.active(e.state)})}},s=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:c(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:c(e)})};t.add("fullscreen",function(t){var i=e(null);return o(t,i),s(t),t.addShortcut("Ctrl+Shift+F","","mceFullScreen"),n(i)})}();!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,i){var n,o=t.dom,c=t.selection.getSelectedBlocks();c.length&&(n=o.getAttrib(c[0],"dir"),e.each(c,function(t){o.getParent(t.parentNode,'*[dir="'+i+'"]',o.getRoot())||o.setAttrib(t,"dir",n!==i?i:null)}),t.nodeChanged())},n=function(t){t.addCommand("mceDirectionLTR",function(){i(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){i(t,"rtl")})},o=function(t){var i=[];return e.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(e){i.push(e+"[dir="+t+"]")}),i.join(",")},c=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:o("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:o("rtl")})};t.add("directionality",function(t){n(t),c(t)})}();!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),e=function(t){return t.getParam("code_dialog_width",600)},o=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},i=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},c=function(t){return t.getContent({source_view:!0})},d=function(t){var n=e(t),d=o(t);t.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:n,minHeight:d,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(n){i(t,n.data.code)}}).find("#code").value(c(t))},u=function(t){t.addCommand("mceCodeEditor",function(){d(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){d(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){d(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,t){return e.fire("insertCustomChar",{chr:t})},a=function(e,a){var i=t(e,a).chr;e.execCommand("mceInsertContent",!1,i)},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=i.isArray,l=function(e){return o(e)?[].concat((t=e,i.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},c=function(e){return function(e,t){var a=r(e);a&&(t=l(a));var i=n(e);return i?[].concat(t).concat(l(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},s=function(e){return{getCharMap:function(){return c(e)},insertChar:function(t){a(e,t)}}},u=function(e){var t,a,i,r=Math.min(e.length,25),n=Math.ceil(e.length/r);for(t='',i=0;i",a=0;a'+s+"
"}else t+=" | "}t+=""}return t+="
"},d=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},m=function(e){var t,i={type:"container",html:u(c(e)),onclick:function(i){var r=i.target;if(/^(TD|DIV)$/.test(r.nodeName)){var n=d(r).firstChild;if(n&&n.hasAttribute("data-chr")){var o=n.getAttribute("data-chr"),l=parseInt(o,10);isNaN(l)||a(e,String.fromCharCode(l)),i.ctrlKey||t.close()}}},onmouseover:function(e){var a=d(e.target);a&&a.firstChild?(t.find("#preview").text(a.firstChild.firstChild.data),t.find("#previewTitle").text(a.title)):(t.find("#preview").text(" "),t.find("#previewTitle").text(" "))}};t=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[i,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){t.close()}}]})},g=function(e){e.addCommand("mceShowCharmap",function(){m(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return g(e),p(e),s(e)})}();!function(){"use strict";var t=function(e){var n=e,i=function(){return n};return{get:i,set:function(t){n=t},clone:function(){return t(i())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=function(t){return parseInt(t.getParam("autoresize_min_height",t.getElement().offsetHeight),10)},r=function(t){return parseInt(t.getParam("autoresize_max_height",0),10)},a=function(t){return t.getParam("autoresize_overflow_padding",1)},u=function(t){return t.getParam("autoresize_bottom_margin",50)},s=function(t){return t.getParam("autoresize_on_init",!0)},l=function(t,e,n,o,r){i.setEditorTimeout(t,function(){c(t,e),n--?l(t,e,n,o,r):r&&r()},o)},g=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},c=function(t,e){var i,a,u,s,l,f,d,m,p,y,h,v=t.dom;if(a=t.getDoc())if((S=t).plugins.fullscreen&&S.plugins.fullscreen.isFullscreen())g(t,!0);else{var S;u=a.body,s=o(t),f=v.getStyle(u,"margin-top",!0),d=v.getStyle(u,"margin-bottom",!0),m=v.getStyle(u,"padding-top",!0),p=v.getStyle(u,"padding-bottom",!0),y=v.getStyle(u,"border-top-width",!0),h=v.getStyle(u,"border-bottom-width",!0),l=u.offsetHeight+parseInt(f,10)+parseInt(d,10)+parseInt(m,10)+parseInt(p,10)+parseInt(y,10)+parseInt(h,10),(isNaN(l)||l<=0)&&(l=n.ie?u.scrollHeight:n.webkit&&0===u.clientHeight?0:u.offsetHeight),l>o(t)&&(s=l);var _=r(t);_&&l>_?(s=_,g(t,!0)):g(t,!1),s!==e.get()&&(i=s-e.get(),v.setStyle(t.iframeElement,"height",s+"px"),e.set(s),n.webkit&&i<0&&c(t,e))}},f={setup:function(t,e){t.on("init",function(){var e,n,i=t.dom;e=a(t),n=u(t),!1!==e&&i.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e}),!1!==n&&i.setStyles(t.getBody(),{paddingBottom:n})}),t.on("nodechange setcontent keyup FullscreenStateChanged",function(n){c(t,e)}),s(t)&&t.on("init",function(){l(t,e,20,100,function(){l(t,e,5,1e3)})})},resize:c},d=function(t,e){t.addCommand("mceAutoResize",function(){f.resize(t,e)})};e.add("autoresize",function(e){if(!e.inline){var n=t(0);d(e,n),f.setup(e,n)}})}();!function(){"use strict";var t=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},n=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},o=function(o){var r=e(o);o.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:r},onsubmit:function(e){var r,a,i=e.data.id;r=o,(t(a=i)?(n(r,a),0):(r.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&e.preventDefault()}})},r=function(t){t.addCommand("mceAnchor",function(){o(t)})},a=function(t){return function(e){for(var n=0;n0}):function(e,t){for(var n=[],i=1;i<10;i++){var r=e["toolbar"+i];if(!r)break;n.push(r)}var o=e.toolbar?[e.toolbar]:[t];return n.length>0?n:o}(n.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),function(n){var i;(i=n)&&r.push(N(e,i,t))}),r.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:r}},O=m.DOM,z=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},L=function(e,t){e.moveTo(t.left,t.top)},I=function(e,t,n,i,r,o){return o=z({x:t,y:n,w:o.w,h:o.h}),e&&(o=e({elementRect:z(i),contentAreaRect:z(r),panelRect:o})),o},F=function(e){var t,n=function(){return e.contextToolbars||[]},i=function(t,n){var i,r,o,s,l,u,c,d=e.getParam("inline_toolbar_position_handler");if(!e.removed){if(!t||!t.toolbar.panel)return f=e,void a.each(f.contextToolbars,function(e){e.panel&&e.panel.hide()});var f,h,m,g,p;c=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],l=t.toolbar.panel,n&&l.show(),h=t.element,m=O.getPos(e.getContentAreaContainer()),g=e.dom.getRect(h),"BODY"===(p=e.dom.getRoot()).nodeName&&(g.x-=p.ownerDocument.documentElement.scrollLeft||p.scrollLeft,g.y-=p.ownerDocument.documentElement.scrollTop||p.scrollTop),g.x+=m.x,g.y+=m.y,o=g,r=O.getRect(l.getEl()),s=O.getRect(e.getContentAreaContainer()||e.getBody());var v,b,y,x=D().getOr({x:0,y:0});if(o.x+=x.x,o.y+=x.y,r.x+=x.x,r.y+=x.y,s.x+=x.x,s.y+=x.y,"inline"!==O.getStyle(t.element,"display",!0)){var w=t.element.getBoundingClientRect();o.w=w.width,o.h=w.height}e.inline||(s.w=e.getDoc().documentElement.offsetWidth),e.selection.controlSelection.isResizable(t.element)&&o.w<25&&(o=R.inflate(o,0,8)),i=R.findBestRelativePosition(r,o,s,c),o=R.clamp(o,s),i?(u=R.relativePosition(r,o,i),L(l,I(d,u.x,u.y,o,s,r))):(s.h+=r.h,(o=R.intersect(s,o))?(i=R.findBestRelativePosition(r,o,s,["bc-tc","bl-tl","br-tr"]))?(u=R.relativePosition(r,o,i),L(l,I(d,u.x,u.y,o,s,r))):L(l,I(d,o.x,o.y,o,s,r)):l.hide()),v=l,y=function(e,t){return e===t},b=(b=i)?b.substr(0,2):"",a.each({t:"down",b:"up"},function(e,t){v.classes.toggle("arrow-"+e,y(t,b.substr(0,1)))}),a.each({l:"left",r:"right"},function(e,t){v.classes.toggle("arrow-"+e,y(t,b.substr(1,1)))})}},r=function(t){return function(){C.requestAnimationFrame(function(){e.selection&&i(l(e.selection.getNode()),t)})}},o=function(n){var o;if(n.toolbar.panel)return n.toolbar.panel.show(),void i(n);!function(){if(!t){var n=r(!0);t=e.selection.getScrollContainer()||e.getWin(),O.bind(t,"scroll",n),O.bind(_.container,"scroll",n),e.on("remove",function(){O.unbind(t,"scroll",n),O.unbind(_.container,"scroll",n)})}}(),o=g.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:A(e,n.toolbar.items),oncancel:function(){e.focus()}}),n.toolbar.panel=o,o.renderTo().reflow(),i(n)},s=function(){a.each(n(),function(e){e.panel&&e.panel.hide()})},l=function(t){var i,r,o,s=n();for(i=(o=e.$(t).parents().add(t)).length-1;i>=0;i--)for(r=s.length-1;r>=0;r--)if(s[r].predicate(o[i]))return{toolbar:s[r],element:o[i]};return null};e.on("click keyup setContent ObjectResized",function(t){("setcontent"!==t.type||t.selection)&&C.setEditorTimeout(e,function(){var t;(t=l(e.selection.getNode()))?(s(),o(t)):s()})}),e.on("blur hide contextmenu",s),e.on("ObjectResizeStart",function(){var t=l(e.selection.getNode());t&&t.toolbar.panel&&t.toolbar.panel.hide()}),e.on("ResizeEditor ResizeWindow",r(!0)),e.on("nodeChange",r(!1)),e.on("remove",function(){a.each(n(),function(e){e.panel&&e.panel.remove()}),e.contextToolbars={}}),e.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var t=l(e.selection.getNode());t&&t.toolbar.panel&&t.toolbar.panel.items()[0].focus()})},V=(r=Array.prototype.indexOf)===undefined?function(e,t){return J(e,t)}:function(e,t){return r.call(e,t)},U=function(e,t){return V(e,t)>-1},Y=function(e,t){for(var n=e.length,i=new Array(n),r=0;r=0;n--)t(e[n],n,e)},q=function(e,t){for(var n=[],i=0,r=e.length;i0&&t=11)||!e.sidebars)&&e.sidebars.length>0},me=function(e){return{type:"panel",name:"sidebar",layout:"stack",classes:"sidebar",items:[{type:"toolbar",layout:"stack",classes:"sidebar-toolbar",items:a.map(e.sidebars,function(t){var n=t.settings;return{type:"button",icon:n.icon,image:n.image,tooltip:n.tooltip,onclick:fe(e,t.name,e.sidebars)}})}]}},ge=function(e){var t=function(){e._skinLoaded=!0,v(e)};return function(){e.initialized?t():e.on("init",t)}},pe=m.DOM,ve=function(e){return{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",border:e,html:""}},be=function(e,t,n){var i,r,o,s,a;if(!1===f(e)&&n.skinUiCss?pe.styleSheetLoader.load(n.skinUiCss,ge(e)):ge(e)(),i=t.panel=g.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[{type:"container",classes:"top-part",items:[!1===l(e)?null:{type:"menubar",border:"0 0 1 0",items:oe(e)},B(e,c(e))]},he(e)?(s=e,{type:"panel",layout:"stack",classes:"edit-aria-container",border:"1 0 0 0",items:[ve("0"),me(s)]}):ve("1 0 0 0")]}),"none"!==h(e)&&(r={type:"resizehandle",direction:h(e),onResizeStart:function(){var t=e.getContentAreaContainer().firstChild;o={width:t.clientWidth,height:t.clientHeight}},onResize:function(t){"both"===h(e)?ue(e,o.width+t.deltaX,o.height+t.deltaY):ue(e,null,o.height+t.deltaY)}}),e.getParam("statusbar",!0,"boolean")){var u=p.translate(["Powered by {0}",'tinymce']),d=e.getParam("branding",!0,"boolean")?{type:"label",classes:"branding",html:" "+u}:null;i.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:e},r,d]})}return y(e),e.on("SwitchMode",(a=i,function(e){a.find("*").disabled("readonly"===e.mode)})),i.renderBefore(n.targetNode).reflow(),e.getParam("readonly",!1,"boolean")&&e.setMode("readonly"),n.width&&pe.setStyle(i.getEl(),"width",n.width),e.on("remove",function(){i.remove(),i=null}),w(e,i),F(e),{iframeContainer:i.find("#iframe")[0].getEl(),editorContainer:i.getEl()}},ye=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),xe=0,we={id:function(){return"mceu_"+xe++},create:function(e,t,n){var i=document.createElement(e);return m.DOM.setAttribs(i,t),"string"==typeof n?i.innerHTML=n:a.each(n,function(e){e.nodeType&&i.appendChild(e)}),i},createFragment:function(e){return m.DOM.createFragment(e)},getWindowSize:function(){return m.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();t=Math.max(i.width||i.right-i.left,e.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return m.DOM.getPos(e,t||we.getContainer())},getContainer:function(){return _.container?_.container:document.body},getViewPort:function(e){return m.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return m.DOM.addClass(e,t)},removeClass:function(e,t){return m.DOM.removeClass(e,t)},hasClass:function(e,t){return m.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return m.DOM.toggleClass(e,t,n)},css:function(e,t,n){return m.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return m.DOM.getStyle(e,t,!0)},on:function(e,t,n,i){return m.DOM.bind(e,t,n,i)},off:function(e,t,n){return m.DOM.unbind(e,t,n)},fire:function(e,t,n){return m.DOM.fire(e,t,n)},innerHtml:function(e,t){m.DOM.setHTML(e,t)}};function _e(e,t,n){var i,r,o,s,a,l,u,c,d,f;return d=we.getViewPort(),o=(r=we.getPos(t)).x,s=r.y,e.state.get("fixed")&&"static"===we.getRuntimeStyle(document.body,"position")&&(o-=d.x,s-=d.y),i=e.getEl(),a=(f=we.getSize(i)).width,l=f.height,u=(f=we.getSize(t)).width,c=f.height,"b"===(n=(n||"").split(""))[0]&&(s+=c),"r"===n[1]&&(o+=u),"c"===n[0]&&(s+=Math.round(c/2)),"c"===n[1]&&(o+=Math.round(u/2)),"b"===n[3]&&(s-=l),"r"===n[4]&&(o-=a),"c"===n[3]&&(s-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(a/2)),{x:o,y:s,w:a,h:l}}var Re={testMoveRel:function(e,t){for(var n=we.getViewPort(),i=0;i0&&r.x+r.w0&&r.y+r.hn.x&&r.x+r.wn.y&&r.y+r.ht&&(e=t-n)<0?0:e}if(n.settings.constrainToViewport){var r=we.getViewPort(window),o=n.layoutRect();e=i(e,r.w+r.x,o.w),t=i(t,r.h+r.y,o.h)}return n.state.get("rendered")?n.layoutRect({x:e,y:t}).repaint():(n.settings.x=e,n.settings.y=t),n.fire("move",{x:e,y:t}),n}},Ce=tinymce.util.Tools.resolve("tinymce.util.Class"),ke=tinymce.util.Tools.resolve("tinymce.util.EventDispatcher"),Ee=function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},He=function(e,t){function n(t){var n=parseFloat(function(t){var n=e.ownerDocument.defaultView;if(n){var i=n.getComputedStyle(e,null);return i?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),i.getPropertyValue(t)):null}return e.currentStyle[t]}(t));return isNaN(n)?0:n}return{top:n(t+"TopWidth"),right:n(t+"RightWidth"),bottom:n(t+"BottomWidth"),left:n(t+"LeftWidth")}};function Se(){}function Me(e){this.cls=[],this.cls._map={},this.onchange=e||Se,this.prefix=""}a.extend(Me.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){var t=void 0;for(t=0;t0&&(e+=" "),e+=this.prefix+this.cls[t];return e};var Te,Pe,We,De=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,Ne=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Ae=/^\s*|\s*$/g,Be=Ce.extend({init:function(e){var t=this.match;function n(e,n,r){var o;function s(e){e&&n.push(e)}return s(function(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}((o=De.exec(e.replace(Ae,"")))[1])),s(function(e){if(e)return function(t){return t._name===e}}(o[2])),s(function(e){if(e)return e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}}(o[3])),s(function(e,t,n){if(e)return function(i){var r=i[e]?i[e]():"";return t?"="===t?r===n:"*="===t?r.indexOf(n)>=0:"~="===t?(" "+r+" ").indexOf(" "+n+" ")>=0:"!="===t?r!==n:"^="===t?0===r.indexOf(n):"$="===t&&r.substr(r.length-n.length)===n:!!n}}(o[4],o[5],o[6])),s(function(e){var n;if(e)return(e=/(?:not\((.+)\))|(.+)/i.exec(e))[1]?(n=i(e[1],[]),function(e){return!t(e,n)}):(e=e[2],function(t,n,i){return"first"===e?0===n:"last"===e?n===i-1:"even"===e?n%2==0:"odd"===e?n%2==1:!!t[e]&&t[e]()})}(o[7])),n.pseudo=!!o[7],n.direct=r,n}function i(e,t){var r,o,s,a=[];do{if(Ne.exec(""),(o=Ne.exec(e))&&(e=o[3],a.push(o[1]),o[2])){r=o[3];break}}while(o);for(r&&i(r,t),e=[],s=0;s"!==a[s]&&e.push(n(a[s],[],">"===a[s-1]));return t.push(e),t}this._selectors=i(e,[])},match:function(e,t){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(t=t||this._selectors).length;n=0;r--)for(u=s[r];m;){if(u.pseudo)for(c=d=(f=m.parent().items()).length;c--&&f[c]!==m;);for(a=0,l=u.length;a1&&(i=function(e){for(var t,n=[],i=e.length;i--;)(t=e[i]).__checked||(n.push(t),t.__checked=1);for(i=n.length;i--;)delete n[i].__checked;return n}(i))}return Te||(Te=Be.Collection),new Te(i)}}),Oe=Array.prototype.push,ze=Array.prototype.slice;We={length:0,init:function(e){e&&this.add(e)},add:function(e){return a.isArray(e)?Oe.apply(this,e):e instanceof Pe?this.add(e.toArray()):Oe.call(this,e),this},set:function(e){var t,n=this,i=n.length;for(n.length=0,n.add(e),t=n.length;t0}var Ue,Ye,$e=Ce.extend({Mixins:[Fe],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof Ie&&(e[t]=n.create(this,t));this.data=e},set:function(e,t){var n,i,r=this.data[e];if(t instanceof Ie&&(t=t.create(this,e)),"object"==typeof e){for(n in e)this.set(n,e[n]);return this}return function o(e,t){var n,i;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(a.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(Ve(e)||Ve(t))return e===t;for(n in i={},t){if(!o(e[n],t[n]))return!1;i[n]=!0}for(n in e)if(!i[n]&&!o(e[n],t[n]))return!1;return!0}(r,t)||(this.data[e]=t,i={target:this,name:e,value:t,oldValue:r},this.fire("change:"+e,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return Ie.create(this,e)},destroy:function(){this.fire("destroy")}}),je={},qe={add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;je[t._id]||(je[t._id]=t),Ue||(Ue=!0,C.requestAnimationFrame(function(){var e,t;for(e in Ue=!1,je)(t=je[e]).state.get("rendered")&&t.reflow();je={}},document.body))}},remove:function(e){je[e._id]&&delete je[e._id]}},Xe="onmousewheel"in document,Je=!1,Ge=0,Ke={Statics:{classPrefix:"mce-"},isRtl:function(){return Ye.rtl},classPrefix:"mce-",init:function(e){var t,n,i=this;function r(e){var t;for(e=e.split(" "),t=0;ta.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=e.h)!==undefined&&(n=(n=na.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=e.innerW)!==undefined&&(n=(n=na.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=e.innerH)!==undefined&&(n=(n=na.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),e.contentW!==undefined&&(a.contentW=e.contentW),e.contentH!==undefined&&(a.contentH=e.contentH),(t=s._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((o=Ye.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),s):a},repaint:function(){var e,t,n,i,r,o,s,a,l,u,c=this;l=document.createRange?function(e){return e}:Math.round,e=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(e.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(e.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),e.width=(u>=0?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),e.height=(u>=0?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((t=n.style).width=(u>=0?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((t=t||n.style).height=(u>=0?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,we.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){var n,i,r,o=this;return Ze(o).on(e,"string"!=typeof(n=t)?n:function(e){return i||o.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(i=t[n]))return r=e,!1}),i?i.call(r,e):(e.action=n,void this.fire("execute",e))}),o},off:function(e,t){return Ze(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=Ze(this).fire(e,t),!1!==n&&this.parent)for(var i=this.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return Ze(this).has(e)},parents:function(e){var t,n=new Le;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new Le(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=ye("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,i=n.getEl(n.ariaTarget);return void 0===t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&i.setAttribute("role"===e?e:"aria-"+e,t),n)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return""+e.charCodeAt(0)+";"})},translate:function(e){return Ye.translate?Ye.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var e,t,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(t=o.length;t--;)o[t].remove()}r&&r.items&&(e=[],r.items().each(function(t){t!==n&&e.push(t)}),r.items().set(e),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&ye(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return ye(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return ye(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return''},postRender:function(){var e,t,n,i,r,o=this,s=o.settings;for(i in o.$el=ye(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}Qe(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),a.controlIdLookup[o._id]=o,o._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),qe.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(e,t){var n,i,r=e;for(n=i=0;r&&r!==t&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return t=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===e?(t-=o-i,n-=s-r):"center"===e&&(t-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),e=t,t=t.parent()}e||(e=this);for(var i=n.length;i--;)n[i].rootControl=e;return e},reflow:function(){qe.remove(this);var e=this.parent();return e&&e._layout&&!e._layout.isNative()&&e.reflow(),this}};function Ze(e){return e._eventDispatcher||(e._eventDispatcher=new ke({scope:e,toggleEvent:function(t,n){n&&ke.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&Qe(e))}})),e._eventDispatcher}function Qe(e){var t,n,i,r,o,s;function a(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function l(){var e=r._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),r._lastHoverCtrl=null)}function u(t){var n,i,o,s=e.getParentCtrl(t.target),a=r._lastHoverCtrl,l=0;if(s!==a){if(r._lastHoverCtrl=s,(i=s.parents().toArray().reverse()).push(s),a){for((o=a.parents().toArray().reverse()).push(a),l=0;l=l;n--)(a=o[n]).fire("mouseleave",{target:a.getEl()})}for(n=l;n=t.length&&(e=0),t[e]&&t[e].focus(),e}function f(e,n){var i=-1,r=c();n=n||u(r.getEl());for(var o=0;o=0&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,i=[];return a.isArray(e)||(e=[e]),a.each(e,function(e){e&&(e instanceof et||("string"==typeof e&&(e={type:e}),t=a.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=g.create(t)),i.push(e))}),i},renderNew:function(){var e=this;return e.items().each(function(t,n){var i;t.parent(e),t.state.get("rendered")||((i=e.getEl("body")).hasChildNodes()&&n<=i.childNodes.length-1?ye(i.childNodes[n]).before(t.renderHtml()):ye(i).append(t.renderHtml()),t.postRender(),qe.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var i,r,o;return e=this.create(e),i=this.items(),!n&&t=0&&t'+(e.settings.html||"")+t.renderHtml(e)+"
"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=nt({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!==t.w||n.h!==t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var e;if(qe.remove(this),this.visible()){for(et.repaintControls=[],et.repaintControls.map={},this.recalc(),e=et.repaintControls.length;e--;)et.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),et.repaintControls=[]}return this}});function ot(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n").css({position:"absolute",top:0,left:0,width:_.width,height:_.height,zIndex:2147483647,opacity:1e-4,cursor:w}).appendTo(u.body),ye(u).on("mousemove touchmove",s).on("mouseup touchend",o),t.start(e)},s=function(e){if(ot(e),e.button!==i)return o(e);e.deltaX=e.screenX-a,e.deltaY=e.screenY-l,e.preventDefault(),t.drag(e)},o=function(e){ot(e),ye(u).off("mousemove touchmove",s).off("mouseup touchend",o),n.remove(),t.stop&&t.stop(e)},this.destroy=function(){ye(c()).off()},ye(c()).on("mousedown touchstart",r)},dt={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var e=this,t=2;function n(){var n,i,r;function o(r,o,s,a,l,u){var c,d,f,h,m,g,p,v;if(d=e.getEl("scroll"+r)){if(p=o.toLowerCase(),v=s.toLowerCase(),ye(e.getEl("absend")).css(p,e.layoutRect()[a]-1),!l)return void ye(d).css("display","none");ye(d).css("display","block"),c=e.getEl("body"),f=e.getEl("scroll"+r+"t"),h=c["client"+s]-2*t,m=(h-=n&&i?d["client"+u]:0)/c["scroll"+s],(g={})[p]=c["offset"+o]+t,g[v]=h,ye(d).css(g),(g={})[p]=c["scroll"+o]*m,g[v]=h*m,ye(f).css(g)}}r=e.getEl("body"),n=r.scrollWidth>r.clientWidth,i=r.scrollHeight>r.clientHeight,o("h","Left","Width","contentW",n,"Height"),o("v","Top","Height","contentH",i,"Width")}e.settings.autoScroll&&(e._hasScroll||(e._hasScroll=!0,function(){function n(n,i,r,o,s){var a,l=e._id+"-scroll"+n,u=e.classPrefix;ye(e.getEl()).append(''),e.draghelper=new ct(l+"t",{start:function(){a=e.getEl("body")["scroll"+i],ye("#"+l).addClass(u+"active")},drag:function(l){var u,c,d,f,h=e.layoutRect();c=h.contentW>h.innerW,d=h.contentH>h.innerH,f=e.getEl("body")["client"+r]-2*t,u=(f-=c&&d?e.getEl("scroll"+n)["client"+s]:0)/e.getEl("body")["scroll"+r],e.getEl("body")["scroll"+i]=a+l["delta"+o]/u},stop:function(){ye("#"+l).removeClass(u+"active")}})}e.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}(),e.on("wheel",function(t){var i=e.getEl("body");i.scrollLeft+=10*(t.deltaX||0),i.scrollTop+=10*t.deltaY,n()}),ye(e.getEl("body")).on("scroll",n)),n())}},ft=rt.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[dt],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n=''+t.renderHtml(e)+"
":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),''+(e._preBodyHtml||"")+n+"
"}}),ht={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=we.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}},mt=[],gt=[];function pt(e,t){for(;e;){if(e===t)return!0;e=e.parent()}}function vt(){st||(st=function(e){2!==e.button&&function(e){for(var t=mt.length;t--;){var n=mt[t],i=n.getParentCtrl(e.target);if(n.settings.autohide){if(i&&(pt(i,n)||n.parent()===i))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},ye(document).on("click touchstart",st))}function bt(e){var t=we.getViewPort().y;function n(t,n){for(var i,r=0;rt&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),n(!1,e._autoFixY-t)):(e._autoFixY=e.layoutRect().y,e._autoFixY').appendTo(t.getContainerElm())),C.setTimeout(function(){n.addClass(i+"in"),ye(t.getEl()).addClass(i+"in")}),ut=!0),yt(!0,t)}}),t.on("show",function(){t.parents().each(function(e){if(e.state.get("fixed"))return t.fixed(!0),!1})}),e.popover&&(t._preBodyHtml='',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!==e){if(t.state.get("rendered")){var n=we.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e,t=this._super();for(e=mt.length;e--&&mt[e]!==this;);return-1===e&&mt.push(this),t},hide:function(){return wt(this),yt(!1,this),this._super()},hideAll:function(){xt.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),yt(!1,this)),this},remove:function(){wt(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function wt(e){var t;for(t=mt.length;t--;)mt[t]===e&&mt.splice(t,1);for(t=gt.length;t--;)gt[t]===e&>.splice(t,1)}xt.hideAll=function(){for(var e=mt.length;e--;){var t=mt[e];t&&t.settings.autohide&&(t.hide(),mt.splice(e,1))}};var _t,Rt=function(e){return!(!e||_.container)},Ct=function(e,t,n){var i,r,o=m.DOM,s=e.getParam("fixed_toolbar_container");s&&(r=o.select(s)[0]);var a=function(){if(i&&i.moveRel&&i.visible()&&!i._fixed){var t=e.selection.getScrollContainer(),n=e.getBody(),r=0,s=0;if(t){var a=o.getPos(n),l=o.getPos(t);r=Math.max(0,l.x-a.x),s=Math.max(0,l.y-a.y)}i.fixed(!1).moveRel(n,e.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(r,s)}},u=function(){i&&(i.show(),a(),o.addClass(e.getBody(),"mce-edit-focus"))},d=function(){i&&(i.hide(),xt.hideAll(),o.removeClass(e.getBody(),"mce-edit-focus"))},h=function(){i?i.visible()||u():(i=t.panel=g.create({type:r?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:Rt(r),fixed:Rt(r),border:1,items:[!1===l(e)?null:{type:"menubar",border:"0 0 1 0",items:oe(e)},B(e,c(e))]}),y(e),r?i.renderTo(r).reflow():i.renderTo().reflow(),w(e,i),u(),F(e),e.on("nodeChange",a),e.on("ResizeWindow",a),e.on("activate",u),e.on("deactivate",d),e.nodeChanged())};return e.settings.content_editable=!0,e.on("focus",function(){!1===f(e)&&n.skinUiCss?o.styleSheetLoader.load(n.skinUiCss,h,h):h()}),e.on("blur hide",d),e.on("remove",function(){i&&(i.remove(),i=null)}),!1===f(e)&&n.skinUiCss?o.styleSheetLoader.load(n.skinUiCss,ge(e)):ge(e)(),{}},kt=function(e,t){var n,i,r=this,o=et.classPrefix;r.show=function(s,a){function l(){n&&(ye(e).append(''),a&&a())}return r.hide(),n=!0,s?i=C.setTimeout(l,s):l(),r},r.hide=function(){var t=e.lastChild;return C.clearTimeout(i),t&&-1!==t.className.indexOf("throbber")&&t.parentNode.removeChild(t),n=!1,r}},Et=function(e,t){var n;e.on("ProgressState",function(e){n=n||new kt(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})},Ht=function(e,t,n){var i=function(e){var t=e.settings,n=t.skin,i=t.skin_url;if(!1!==n){var r=n||"lightgray";i=i?e.documentBaseURI.toAbsolute(i):s.baseURL+"/skins/"+r}return i}(e);return i&&(n.skinUiCss=i+"/skin.min.css",e.contentCSS.push(i+"/content"+(e.inline?".inline":"")+".min.css")),Et(e,t),e.getParam("inline",!1,"boolean")?Ct(e,t,n):be(e,t,n)},St=et.extend({Mixins:[Re],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return''+e.encode(e.state.get("text"))+"
"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}}),Mt=et.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&!1!==Mt.tooltips&&(t.on("mouseenter",function(n){var i=t.tooltip().moveTo(-65535);if(n.control===t){var r=i.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);i.classes.toggle("tooltip-n","bc-tc"===r),i.classes.toggle("tooltip-nw","bc-tl"===r),i.classes.toggle("tooltip-ne","bc-tr"===r),i.moveRel(t.getEl(),r)}else i.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return _t||(_t=new St({type:"tooltip"})).renderTo(),_t},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){var e=this;function t(t){e.aria("disabled",t),e.classes.toggle("disabled",t)}function n(t){e.aria("pressed",t),e.classes.toggle("active",t)}return e.state.on("change:disabled",function(e){t(e.value)}),e.state.on("change:active",function(e){n(e.value)}),e.state.get("disabled")&&t(!0),e.state.get("active")&&n(!0),e._super()},remove:function(){this._super(),_t&&(_t.remove(),_t=null)}}),Tt=Mt.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return''},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var e=this;function t(t){t=e.settings.filter(t),e.getEl().lastChild.innerHTML=t+"%",e.getEl().firstChild.firstChild.style.width=t+"%"}return e.state.on("change:value",function(e){t(e.value)}),t(e.state.get("value")),e._super()}}),Pt=function(e,t){e.getEl().lastChild.textContent=t+(e.progressBar?" "+e.progressBar.value()+"%":"")},Wt=et.extend({Mixins:[Re],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),t.maxWidth=e.maxWidth,e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new Tt),t.on("click",function(e){-1!==e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e,t=this,n=t.classPrefix,i="",r="",o="";return t.icon&&(i=''),e=' style="max-width: '+t.maxWidth+"px;"+(t.color?"background-color: "+t.color+';"':'"'),t.closeButton&&(r=''),t.progressBar&&(o=t.progressBar.renderHtml()),''+i+'
'+t.state.get("text")+"
"+o+r+'
'},postRender:function(){var e=this;return C.setTimeout(function(){e.$el.addClass(e.classPrefix+"in"),Pt(e,e.state.get("text"))},100),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().firstChild.innerHTML=t.value,Pt(e,t.value)}),e.progressBar&&(e.progressBar.bindStates(),e.progressBar.state.on("change:value",function(t){Pt(e,e.state.get("text"))})),e._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}}),Dt=function(e){var t=function(e){return e.inline?e.getElement():e.getContentAreaContainer()};return{open:function(n,i){var r,o=a.extend(n,{maxWidth:(r=t(e),we.getSize(r).width)}),s=new Wt(o);return s.args=o,o.timeout>0&&(s.timer=setTimeout(function(){s.close(),i()},o.timeout)),s.on("close",function(){i()}),s.renderTo(),s},close:function(e){e.close()},reposition:function(n){var i;i=n,ee.each(i,function(e){e.moveTo(0,0)}),function(n){if(n.length>0){var i=n.slice(0,1)[0],r=t(e);i.moveRel(r,"tc-tc"),ee.each(n,function(e,t){t>0&&e.moveRel(n[t-1].getEl(),"bc-tc")})}}(n)},getArgs:function(e){return e.args}}},Nt=[],At="";function Bt(e){var t,n=ye("meta[name=viewport]")[0];!1!==_.overrideViewPort&&(n||((n=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==At&&(At=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":At))}function Ot(e,t){(function(){for(var e=0;ee.w&&(n=e.x-Math.max(0,t/2),r.layoutRect({w:t,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),r.layoutRect({w:t,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var e,t=this,n=t._super(),i=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var r=we.getSize(e);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}t.statusbar&&(i+=t.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=we.getWindowSize();return n.x=t.settings.x||Math.max(0,o.w/2-n.w/2),n.y=t.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",s="",a=r.html;return e.preRender(),t.preRender(e),r.title&&(o=''),r.url&&(a=''),void 0===a&&(a=t.renderHtml(e)),e.statusbar&&(s=e.statusbar.renderHtml()),'"},fullscreen:function(e){var t,n,i=this,r=document.documentElement,o=i.classPrefix;if(e!==i._fullscreen)if(ye(window).on("resize",function(){var e;if(i._fullscreen)if(t)i._timer||(i._timer=C.setTimeout(function(){var e=we.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),i._timer=0},50));else{e=(new Date).getTime();var n=we.getWindowSize();i.moveTo(0,0).resizeTo(n.w,n.h),(new Date).getTime()-e>50&&(t=!0)}}),n=i.layoutRect(),i._fullscreen=e,e){i._initial={x:n.x,y:n.y,w:n.w,h:n.h},i.borderBox=Ee("0"),i.getEl("head").style.display="none",n.deltaH-=n.headerH+2,ye([r,document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=we.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Ee(i.settings.border),i.getEl("head").style.display="",n.deltaH+=n.headerH,ye([r,document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var e,t=this;setTimeout(function(){t.classes.add("in"),t.fire("open")},0),t._super(),t.statusbar&&t.statusbar.postRender(),t.focus(),this.dragHelper=new ct(t._id+"-dragh",{start:function(){e={x:t.layoutRect().x,y:t.layoutRect().y}},drag:function(n){t.moveTo(e.x+n.deltaX,e.y+n.deltaY)}}),t.on("submit",function(e){e.isDefaultPrevented()||t.close()}),Nt.push(t),Bt(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e,t=this;for(t.dragHelper.destroy(),t._super(),t.statusbar&&this.statusbar.remove(),Ot(t.classPrefix,!1),e=Nt.length;e--;)Nt[e]===t&&Nt.splice(e,1);Bt(Nt.length>0)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});!function(){if(!_.desktop){var e={w:window.innerWidth,h:window.innerHeight};C.setInterval(function(){var t=window.innerWidth,n=window.innerHeight;e.w===t&&e.h===n||(e={w:t,h:n},ye(window).trigger("resize"))},100)}ye(window).on("resize",function(){var e,t,n=we.getWindowSize();for(e=0;e'+this._super(e)}}),Ut=Mt.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(e=l.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",s&&(n.classes.add("btn-has-text"),a=''+n.encode(s)+""),o=o?r+"ico "+r+"i-"+o:"",t="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'"},bindStates:function(){var e=this,t=e.$,n=e.classPrefix+"txt";function i(i){var r=t("span."+n,e.getEl());i?(r[0]||(t("button:first",e.getEl()).append(''),r=t("span."+n,e.getEl())),r.html(e.encode(i))):r.remove(),e.classes.toggle("btn-has-text",!!i)}return e.state.on("change:text",function(e){i(e.value)}),e.state.on("change:icon",function(t){var n=t.value,r=e.classPrefix;e.settings.icon=n,n=n?r+"ico "+r+"i-"+e.settings.icon:"";var o=e.getEl().firstChild,s=o.getElementsByTagName("i")[0];n?(s&&s===o.firstChild||(s=document.createElement("i"),o.insertBefore(s,o.firstChild)),s.className=n):s&&o.removeChild(s),i(e.state.get("text"))}),e._super()}}),Yt=Ut.extend({init:function(e){e=a.extend({text:"Browse...",multiple:!1,accept:null},e),this._super(e),this.classes.add("browsebutton"),e.multiple&&this.classes.add("multiple")},postRender:function(){var e=this,t=we.create("input",{type:"file",id:e._id+"-browse",accept:e.settings.accept});e._super(),ye(t).on("change",function(t){var n=t.target.files;e.value=function(){return n.length?e.settings.multiple?n:n[0]:null},t.preventDefault(),n.length&&e.fire("change",t)}),ye(t).on("click",function(e){e.stopPropagation()}),ye(e.getEl("button")).on("click",function(e){e.stopPropagation(),t.click()}),e.getEl().appendChild(t)},remove:function(){ye(this.getEl("button")).off(),ye(this.getEl("input")).off(),this._super()}}),$t=rt.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),''+(e.settings.html||"")+t.renderHtml(e)+"
"}}),jt=Mt.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return''+e.encode(e.state.get("text"))+"
"},bindStates:function(){var e=this;function t(t){e.classes.toggle("checked",t),e.aria("checked",t)}return e.state.on("change:text",function(t){e.getEl("al").firstChild.data=e.translate(t.value)}),e.state.on("change:checked change:value",function(n){e.fire("change"),t(n.value)}),e.state.on("change:icon",function(t){var n=t.value,i=e.classPrefix;if(void 0===n)return e.settings.icon;e.settings.icon=n,n=n?i+"ico "+i+"i-"+e.settings.icon:"";var r=e.getEl().firstChild,o=r.getElementsByTagName("i")[0];n?(o&&o===r.firstChild||(o=document.createElement("i"),r.insertBefore(o,r.firstChild)),o.className=n):o&&r.removeChild(o)}),e.state.get("checked")&&t(!0),e._super()}}),qt=tinymce.util.Tools.resolve("tinymce.util.VK"),Xt=Mt.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,r=t.getEl();if(ye.contains(r,i)||i===r)for(;i&&i!==r;)i.id&&-1!==i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){var n;13===e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){if("INPUT"===e.target.nodeName){var n=t.state.get("value"),i=e.target.value;i!==n&&(t.state.set("value",i),t.fire("autocomplete",e))}}),t.on("mouseover",function(e){var n=t.tooltip().moveTo(-65535);if(t.statusLevel()&&-1!==e.target.className.indexOf(t.classPrefix+"status")){var i=t.statusMessage()||"Ok",r=n.text(i).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);n.classes.toggle("tooltip-n","bc-tc"===r),n.classes.toggle("tooltip-nw","bc-tl"===r),n.classes.toggle("tooltip-ne","bc-tr"===r),n.moveRel(e.target,r)}})},statusLevel:function(e){return arguments.length>0&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return arguments.length>0&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=g.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()===t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"===e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this,i=n.getEl(),r=n.getEl("open"),o=n.layoutRect(),s=0,a=i.firstChild;n.statusLevel()&&"none"!==n.statusLevel()&&(s=parseInt(we.getRuntimeStyle(a,"padding-right"),10)-parseInt(we.getRuntimeStyle(a,"padding-left"),10)),e=r?o.w-we.getSize(r).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(t=n.layoutRect().h-2+"px"),ye(a).css({width:e-s,lineHeight:t}),n._super(),n},postRender:function(){var e=this;return ye(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e,t,n,i=this,r=i._id,o=i.settings,s=i.classPrefix,a=i.state.get("value")||"",l="",u="";return"spellcheck"in o&&(u+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(u+=' maxlength="'+o.maxLength+'"'),o.size&&(u+=' size="'+o.size+'"'),o.subtype&&(u+=' type="'+o.subtype+'"'),n='',i.disabled()&&(u+=' disabled="disabled"'),(e=o.icon)&&"caret"!==e&&(e=s+"ico "+s+"i-"+o.icon),t=i.state.get("text"),(e||t)&&(l='",i.classes.add("has-open")),''+n+l+"
"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,t){var n=this;if(0!==e.length){n.menu?n.menu.items().remove():n.menu=g.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(n).renderTo(),a.each(e,function(e){var i,r;n.menu.add({text:e.title,url:e.previewUrl,match:t,classes:"menu-item-ellipsis",onclick:(i=e.value,r=e.title,function(){n.fire("selectitem",{title:r,value:i})})})}),n.menu.renderNew(),n.hideMenu(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()});var i=n.layoutRect().w;n.menu.layoutRect({w:i,minW:0,maxW:i}),n.menu.repaint(),n.menu.reflow(),n.menu.show(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else n.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var e=this;e.state.on("change:value",function(t){e.getEl("inp").value!==t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e.state.on("change:statusLevel",function(t){var n=e.getEl("status"),i=e.classPrefix,r=t.value;we.css(n,"display","none"===r?"none":""),we.toggleClass(n,i+"i-checkmark","ok"===r),we.toggleClass(n,i+"i-warning","warn"===r),we.toggleClass(n,i+"i-error","error"===r),e.classes.toggle("has-status","none"!==r),e.repaint()}),we.on(e.getEl("status"),"mouseleave",function(){e.tooltip().hide()}),e.on("cancel",function(t){e.menu&&e.menu.visible()&&(t.stopPropagation(),e.hideMenu())});var t=function(e,t){t&&t.items().length>0&&t.items().eq(e)[0].focus()};return e.on("keydown",function(n){var i=n.keyCode;"INPUT"===n.target.nodeName&&(i===qt.DOWN?(n.preventDefault(),e.fire("autocomplete"),t(0,e.menu)):i===qt.UP&&(n.preventDefault(),t(-1,e.menu)))}),e._super()},remove:function(){ye(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}}),Jt=Xt.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(i){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}}),Gt=Ut.extend({showPanel:function(){var e=this,t=e.settings;if(e.classes.add("opened"),e.panel)e.panel.show();else{var n=t.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,e.panel=new xt(n).on("hide",function(){e.classes.remove("opened")}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}var i=e.panel.testMoveRel(e.getEl(),t.popoverAlign||(e.isRtl()?["bc-tc","bc-tl","bc-tr"]:["bc-tc","bc-tr","bc-tl"]));e.panel.classes.toggle("start","bc-tl"===i),e.panel.classes.toggle("end","bc-tr"===i),e.panel.moveRel(e.getEl(),i)},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}}),Kt=m.DOM,Zt=Gt.extend({init:function(e){this._super(e),this.classes.add("splitbtn"),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,i=e.state.get("text"),r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",s="";return i&&(e.classes.add("btn-has-text"),s=''+e.encode(i)+""),''},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(n){n.aria&&"down"===n.aria.key||n.control!==e||Kt.getParent(n.target,"."+e.classPrefix+"open")||(n.stopImmediatePropagation(),t.call(e,n))}),delete e.settings.onclick,e._super()}}),Qt=tinymce.util.Tools.resolve("tinymce.util.Color"),en=Mt.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){var e,t,n,i,r,o=this,s=o.color();function a(e,t){var n,i,r=we.getPos(e);return n=t.pageX-r.x,i=t.pageY-r.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:i=Math.max(0,Math.min(i/e.clientHeight,1))}}function l(e,t){var s=(360-e.h)/360;we.css(n,{top:100*s+"%"}),t||we.css(r,{left:e.s+"%",top:100-e.v+"%"}),i.style.background=Qt({s:100,v:100,h:e.h}).toHex(),o.color().parse({s:e.s,v:e.v,h:e.h})}function u(t){var n;n=a(i,t),e.s=100*n.x,e.v=100*(1-n.y),l(e),o.fire("change")}function c(n){var i;i=a(t,n),(e=s.toHsv()).h=360*(1-i.y),l(e,!0),o.fire("change")}t=o.getEl("h"),n=o.getEl("hp"),i=o.getEl("sv"),r=o.getEl("svp"),o._repaint=function(){l(e=s.toHsv())},o._super(),o._svdraghelper=new ct(o._id+"-sv",{start:u,drag:u}),o._hdraghelper=new ct(o._id+"-h",{start:c,drag:c}),o._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){if(!arguments.length)return this.color().toHex();this.color().parse(e),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=Qt()),this._color},renderHtml:function(){var e,t=this._id,n=this.classPrefix,i="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e=''+function(){var e,t,r,o,s="";for(r="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(o=i.split(",")).length-1;e
';return s}()+'','"}}),tn=Mt.extend({init:function(e){e=a.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},e),this._super(e),this.classes.add("dropzone"),e.multiple&&this.classes.add("multiple")},renderHtml:function(){var e,t,n=this.settings;return e={id:this._id,hidefocus:"1"},t=we.create("div",e,""+this.translate(n.text)+""),n.height&&we.css(t,"height",n.height+"px"),n.width&&we.css(t,"width",n.width+"px"),t.className=this.classes,t.outerHTML},postRender:function(){var e=this,t=function(t){t.preventDefault(),e.classes.toggle("dragenter"),e.getEl().className=e.classes};e._super(),e.$el.on("dragover",function(e){e.preventDefault()}),e.$el.on("dragenter",t),e.$el.on("dragleave",t),e.$el.on("drop",function(t){if(t.preventDefault(),!e.state.get("disabled")){var n=function(t){var n=e.settings.accept;if("string"!=typeof n)return t;var i=new RegExp("("+n.split(/\s*,\s*/).join("|")+")$","i");return a.grep(t,function(e){return i.test(e.name)})}(t.dataTransfer.files);e.value=function(){return n.length?e.settings.multiple?n:n[0]:null},n.length&&e.fire("change",t)}})},remove:function(){this.$el.off(),this._super()}}),nn=Mt.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n;(n=e.target.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return''+this._getDataPathHtml(this.state.get("row"))+"
"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t,n,i=e||[],r="",o=this.classPrefix;for(t=0,n=i.length;t0?' '+this.settings.delimiter+"
":"")+''+i[t].name+"
";return r||(r='\xa0
'),r}}),rn=nn.extend({postRender:function(){var e=this,t=e.settings.editor;function n(e){if(1===e.nodeType){if("BR"===e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}return!1!==t.settings.elementpath&&(e.on("select",function(e){t.focus(),t.selection.select(this.row()[e.index].element),t.nodeChanged()}),t.on("nodeChange",function(i){for(var r=[],o=i.parents,s=o.length;s--;)if(1===o[s].nodeType&&!n(o[s])){var a=t.fire("ResolveName",{name:o[s].nodeName.toLowerCase(),target:o[s]});if(a.isDefaultPrevented()||r.push({name:a.name,element:o[s]}),a.isPropagationStopped())break}e.row(r)})),e._super()}}),on=rt.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),''+(e.settings.title?'
'+e.settings.title+"
":"")+'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}}),sn=rt.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:15,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,t=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),t.each(function(t){var n,i=t.settings.label;i&&((n=new on(a.extend({items:{type:"label",id:t._id+"-l",text:i,flex:0,forId:t._id,disabled:t.disabled()}},e.settings.formItemDefaults))).type="formitem",t.aria("labelledby",t._id+"-l"),"undefined"==typeof t.settings.flex&&(t.settings.flex=1),e.replace(t,n),n.add(t))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){var e=this;function t(){var t,n,i=0,r=[];if(!1!==e.settings.labelGapCalc)for(("children"===e.settings.labelGapCalc?e.find("formitem"):e.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;i=n>i?n:i,r.push(t)}),n=e.settings.labelGap||0,t=r.length;t--;)r[t].settings.minWidth=i+n}e._super(),e.on("show",t),t()}}),an=sn.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'"}}),ln=0,un=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++ln+String(t)},cn=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:E.constant(e)}},dn={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",e),"HTML must have a single root node";return cn(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return cn(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return cn(n)},fromDom:cn,fromPoint:function(e,t,n){return W.from(e.dom().elementFromPoint(t,n)).map(cn)}},fn=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(null,arguments)),t}},hn=8,mn=9,gn=1,pn=3,vn=function(e){return e.dom().nodeName.toLowerCase()},bn=function(e){return e.dom().nodeType},yn=function(e){return function(t){return bn(t)===e}},xn=yn(gn),wn=yn(pn),_n=yn(mn),Rn={name:vn,type:bn,value:function(e){return e.dom().nodeValue},isElement:xn,isText:wn,isDocument:_n,isComment:function(e){return bn(e)===hn||"#comment"===vn(e)}},Cn=(fn(function(){return Cn(dn.fromDom(document))}),function(e){var t=e.dom().body;if(null===t||t===undefined)throw"Body is not available yet";return dn.fromDom(t)}),kn=function(e){return function(t){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(t)===e}},En=(kn("string"),kn("object"),kn("array"),kn("null"),kn("boolean"),kn("undefined"),kn("function"),kn("number"),Object.keys,undefined,function(){var e=arguments;return function(){for(var t=new Array(arguments.length),n=0;n0},vi=function(e){var t,n,i=gi(e);return ee.filter((n=i,ee.map(ee.filter(n,fi),hi)).concat((t=i,ee.map(ee.filter(t,ui),mi))),pi)},bi={},yi=function(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}},xi=function(e,t){return{title:e,value:{title:e,url:t,attach:E.noop}}},wi=function(e,t,n){var i=t in e?e[t]:n;return!1===i?null:i},_i=function(e,t,n,i){var r,o,s,l,u={title:"-"},c=function(e){var i=e.hasOwnProperty(n)?e[n]:[],r=ee.filter(i,function(e){return n=e,i=t,!ee.exists(i,function(e){return e.url===n});var n,i});return a.map(r,function(e){return{title:e,value:{title:e,url:e,attach:E.noop}}})},d=function(e){var n,i=ee.filter(t,function(t){return t.type===e});return n=i,a.map(n,yi)};return!1===i.typeahead_urls?[]:"file"===n?(r=[Ri(e,c(bi)),Ri(e,d("header")),Ri(e,(o=d("anchor"),s=wi(i,"anchor_top","#top"),l=wi(i,"anchor_bottom","#bottom"),null!==s&&o.unshift(xi("",s)),null!==l&&o.push(xi("",l)),o))],ee.foldl(r,function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(u,t)},[])):Ri(e,c(bi))},Ri=function(e,t){var n=e.toLowerCase(),i=a.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===i.length&&i[0].title===e?[]:i},Ci=function(e,t,n,i){var r=function(r){var o=vi(n),s=_i(r,o,i,t);e.showAutoComplete(s,r)};e.on("autocomplete",function(){r(e.value())}),e.on("selectitem",function(t){var n=t.value;e.value(n.url);var r,o=(r=n.title).raw?r.raw:r;"image"===i?e.fire("change",{meta:{alt:o,attach:n.attach}}):e.fire("change",{meta:{text:o,attach:n.attach}}),e.focus()}),e.on("click",function(t){0===e.value().length&&"INPUT"===t.target.nodeName&&r("")}),e.on("PostRender",function(){e.getRoot().on("submit",function(t){var n,r,o;t.isDefaultPrevented()||(n=e.value(),o=bi[r=i],/^https?/.test(n)&&(o?-1===ee.indexOf(o,n)&&(bi[r]=o.slice(0,5).concat(n)):bi[r]=[n]))})})},ki=function(e,t,n){var i=t.filepicker_validator_handler;i&&e.state.on("change:value",function(t){var r;0!==(r=t.value).length?i({url:r,type:n},function(t){var n,i,r,o=(i=(n=t).status,r=n.message,"valid"===i?{status:"ok",message:r}:"unknown"===i?{status:"warn",message:r}:"invalid"===i?{status:"warn",message:r}:{status:"none",message:""});e.statusMessage(o.message),e.statusLevel(o.status)}):e.statusLevel("none")})},Ei=Xt.extend({Statics:{clearHistory:function(){bi={}}},init:function(e){var t,n,i,r=this,o=window.tinymce?window.tinymce.activeEditor:s.activeEditor,l=o.settings,u=e.filetype;e.spellcheck=!1,(i=l.file_picker_types||l.file_browser_callback_types)&&(i=a.makeMap(i,/[, ]/)),i&&!i[u]||(!(n=l.file_picker_callback)||i&&!i[u]?!(n=l.file_browser_callback)||i&&!i[u]||(t=function(){n(r.getEl("inp").id,r.value(),u,window)}):t=function(){var e=r.fire("beforecall").meta;e=a.extend({filetype:u},e),n.call(o,function(e,t){r.value(e).fire("change",{meta:t})},r.value(),e)}),t&&(e.icon="browse",e.onaction=t),r._super(e),r.classes.add("filepicker"),Ci(r,l,o.getBody(),u),ki(r,l,u)}}),Hi=Vt.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}}),Si=Vt.extend({recalc:function(e){var t,n,i,r,o,s,a,l,u,c,d,f,h,m,g,p,v,b,y,x,w,_,R,C,k,E,H,S,M,T,P,W,D,N,A,B,O,z=[],L=Math.max,I=Math.min;for(i=e.items().filter(":visible"),r=e.layoutRect(),o=e.paddingBox,s=e.settings,f=e.isRtl()?s.direction||"row-reversed":s.direction,a=s.align,l=e.isRtl()?s.pack||"end":s.pack,u=s.spacing||0,"row-reversed"!==f&&"column-reverse"!==f||(i=i.set(i.toArray().reverse()),f=f.split("-")[0]),"column"===f?(C="y",_="h",R="minH",k="maxH",H="innerH",E="top",S="deltaH",M="contentH",N="left",W="w",T="x",P="innerW",D="minW",A="right",B="deltaW",O="contentW"):(C="x",_="w",R="minW",k="maxW",H="innerW",E="left",S="deltaW",M="contentW",N="top",W="h",T="y",P="innerH",D="minH",A="bottom",B="deltaH",O="contentH"),d=r[H]-o[E]-o[E],w=c=0,t=0,n=i.length;t0&&(c+=g,m[k]&&z.push(h),m.flex=g),d-=m[R],(p=o[N]+m[D]+o[A])>w&&(w=p);if((y={})[R]=d<0?r[R]-d+r[S]:r[H]-d+r[S],y[D]=w+r[B],y[M]=r[H]-d,y[O]=w,y.minW=I(y.minW,r.maxW),y.minH=I(y.minH,r.maxH),y.minW=L(y.minW,r.startMinWidth),y.minH=L(y.minH,r.startMinHeight),!r.autoResize||y.minW===r.minW&&y.minH===r.minH){for(b=d/c,t=0,n=z.length;tv?(d-=m[k]-m[R],c-=m.flex,m.flex=0,m.maxFlexSize=v):m.maxFlexSize=0;for(b=d/c,x=o[E],y={},0===c&&("end"===l?x=d+o[E]:"center"===l?(x=Math.round(r[H]/2-(r[H]-d)/2)+o[E])<0&&(x=o[E]):"justify"===l&&(x=o[E],u=Math.floor(d/(i.length-1)))),y[T]=o[N],t=0,n=i.length;t0&&(p+=m.flex*b),y[_]=p,y[C]=x,h.layoutRect(y),h.recalc&&h.recalc(),x+=p+u}else if(y.w=y.minW,y.h=y.minH,e.layoutRect(y),this.recalc(e),null===e._lastRect){var F=e.parent();F&&(F._lastRect=null,F.recalc())}}}),Mi=Ft.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}}),Ti=function(e,t){return ti.one(t,e)},Pi=function(e,t){return function(){e.execCommand("mceToggleFormat",!1,t)}},Wi=function(e,t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}},Di=function(e){e.addMenuItem("align",{text:"Align",menu:[{text:"Left",icon:"alignleft",onclick:Pi(e,"alignleft")},{text:"Center",icon:"aligncenter",onclick:Pi(e,"aligncenter")},{text:"Right",icon:"alignright",onclick:Pi(e,"alignright")},{text:"Justify",icon:"alignjustify",onclick:Pi(e,"alignjustify")}]}),a.each({alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{active:!1,tooltip:t[0],cmd:t[1],onPostRender:Wi(e,n)})})},Ni=function(e){return function(t,n){return W.from(n).map(dn.fromDom).filter(Rn.isElement).bind(function(n){return function(e,t,n){for(;n!==t;){if(n.style[e]){var i=n.style[e];return""!==i?W.some(i):W.none()}n=n.parentNode}return W.none()}(e,t,n.dom()).or((i=e,r=n.dom(),W.from(m.DOM.getStyle(r,i,!0))));var i,r}).getOr("")}},Ai={getFontSize:Ni("fontSize"),getFontFamily:E.compose(function(e){return e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")},Ni("fontFamily")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,i=t||0,r=Math.pow(10,i),Math.round(n*r)/r+"pt"):e;var n,i,r}},Bi=function(e){return e?e.split(",")[0]:""},Oi=function(e,t){return function(){var n=this;e.on("init nodeChange",function(i){var r,o,s,l=Ai.getFontFamily(e.getBody(),i.element),u=(r=t,o=l,a.each(r,function(e){e.value.toLowerCase()===o.toLowerCase()&&(s=e.value)}),a.each(r,function(e){s||Bi(e.value).toLowerCase()!==Bi(o).toLowerCase()||(s=e.value)}),s);n.value(u||null),!u&&l&&n.text(Bi(l))})}},zi=function(e){e.addButton("fontselect",function(){var t,n=(t=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),a.map(t,function(e){return{text:{raw:e[0]},value:e[1],textStyle:-1===e[1].indexOf("dings")?"font-family:"+e[1]:""}}));return{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:Oi(e,n),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}})},Li=function(e){zi(e)},Ii=function(e,t,n){var i;return a.each(e,function(e){e.value===n?i=n:e.value===t&&(i=t)}),i},Fi=function(e){e.addButton("fontsizeselect",function(){var t,n,i,r=(t=e.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt",a.map(t.split(" "),function(e){var t=e,n=e,i=e.split("=");return i.length>1&&(t=i[0],n=i[1]),{text:t,value:n}}));return{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:r,fixedWidth:!0,onPostRender:(n=e,i=r,function(){var e=this;n.on("init nodeChange",function(t){var r,o,s,a;if(r=Ai.getFontSize(n.getBody(),t.element))for(s=3;!a&&s>=0;s--)o=Ai.toPt(r,s),a=Ii(i,o,r);e.value(a||null),a||e.text(o)})}),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}})},Vi=function(e){Fi(e)},Ui=function(e,t){return function(){var n,i,r,o=[];return a.each(t,function(t){o.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:t[0][0],values:o,fixedWidth:!0,onselect:function(t){if(t.control){var n=t.control.value();Pi(e,n)()}},onPostRender:(n=e,i=o,function(){var e=this;n.on("nodeChange",function(t){var o=n.formatter,s=null;a.each(t.parents,function(e){if(a.each(i,function(t){if(r?o.matchNode(e,r,{value:t.value})&&(s=t.value):o.matchNode(e,t.value)&&(s=t.value),s)return!1}),s)return!1}),e.value(s)})})}}},Yi=function(e){var t,n,i=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");e.addMenuItem("blockformats",{text:"Blocks",menu:(t=e,n=i,a.map(n,function(e){return{text:e[0],onclick:Pi(t,e[1]),textStyle:function(){return t.formatter.getCssText(e[1])}}}))}),e.addButton("formatselect",Ui(e,i))},$i=function(e,t){var n=t.length;return a.each(t,function(t){t.menu&&(t.hidden=0===$i(e,t.menu));var i=t.format;i&&(t.hidden=!e.formatter.canApply(i)),t.hidden&&n--}),n},ji=function(e,t){var n=t.items().length;return t.items().each(function(t){t.menu&&t.visible(ji(e,t.menu)>0),!t.menu&&t.settings.menu&&t.visible($i(e,t.settings.menu)>0);var i=t.settings.format;i&&t.visible(e.formatter.canApply(i)),t.visible()||n--}),n},qi=function(e){var t,n,i,r,o,s,l,u,c=(n=0,i=[],r=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],o=function(e){var t=[];if(e)return a.each(e,function(e){var r={text:e.title,icon:e.icon};if(e.items)r.menu=o(e.items);else{var s=e.format||"custom"+n++;e.format||(e.name=s,i.push(e)),r.format=s,r.cmd=e.cmd}t.push(r)}),t},(t=e).on("init",function(){a.each(i,function(e){t.formatter.register(e.name,e)})}),{type:"menu",items:t.settings.style_formats_merge?t.settings.style_formats?o(r.concat(t.settings.style_formats)):o(r):o(t.settings.style_formats||r),onPostRender:function(e){t.fire("renderFormatsMenu",{control:e.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return t.formatter.getCssText(this.settings.format)},onPostRender:function(){var e=this;e.parent().on("show",function(){var n,i;(n=e.settings.format)&&(e.disabled(!t.formatter.canApply(n)),e.active(t.formatter.match(n))),(i=e.settings.cmd)&&e.active(t.queryCommandState(i))})},onclick:function(){this.settings.format&&Pi(t,this.settings.format)(),this.settings.cmd&&t.execCommand(this.settings.cmd)}}});s=c,e.addMenuItem("formats",{text:"Formats",menu:s}),u=c,(l=e).addButton("styleselect",{type:"menubutton",text:"Formats",menu:u,onShowMenu:function(){l.settings.style_formats_autohide&&ji(l,this.menu)}})},Xi=function(e,t){var n,i;if("string"==typeof t)i=t.split(" ");else if(a.isArray(t))return ee.flatten(a.map(t,function(t){return Xi(e,t)}));return n=a.grep(i,function(t){return"|"===t||t in e.menuItems}),a.map(n,function(t){return"|"===t?{text:"-"}:e.menuItems[t]})},Ji=function(e){return e&&"-"===e.text},Gi=function(e){var t=ee.filter(e,function(e,t,n){return!Ji(e)||!Ji(n[t-1])});return ee.filter(t,function(e,t,n){return!Ji(e)||t>0&&tM[d]?C:M[d],T[f]=k>T[f]?k:T[f];for(E=o.innerW-p.left-p.right,_=0,d=0;d0?b:0),E-=(d>0?b:0)+M[d];for(H=o.innerH-p.top-p.bottom,R=0,f=0;f0?y:0),H-=(f>0?y:0)+T[f];if(_+=p.left+p.right,R+=p.top+p.bottom,(l={}).minW=_+(o.w-o.innerW),l.minH=R+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW===o.minW&&l.minH===o.minH){var P;o.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),P="start"===t.packV?0:H>0?Math.floor(H/n):0;var W=0,D=t.flexWidths;if(D)for(d=0;d'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,t&&t()):C.setTimeout(function(){n.html(e)}),this}}),ar=Mt.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return''+e.encode(e.state.get("text"))+'
'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}}),lr=Mt.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,t=e._super();return e.settings.multiline&&(we.getSize(e.getEl()).width>t.maxW&&(t.minW=t.maxW,e.classes.add("multiline")),e.getEl().style.width=t.minW+"px",t.startMinH=t.h=t.minH=Math.min(t.maxH,we.getSize(e.getEl()).height)),t},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,i=n.settings.forId,r=n.settings.html?n.settings.html:n.encode(n.state.get("text"));return!i&&(t=n.settings.forName)&&(e=n.getRoot().find("#"+t)[0])&&(i=e._id),i?'":''+r+""},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}}),ur=rt.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}}),cr=ur.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}}),dr=Ut.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(e){var t,n=this;if(n.menu&&n.menu.visible()&&!1!==e)return n.hideMenu();n.menu||(t=n.state.get("menu")||[],n.classes.add("opened"),t.length?t={type:"menu",animate:!0,items:t}:(t.type=t.type||"menu",t.animate=!0),t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=g.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){e.control===n.menu&&(n.activeMenu("show"===e.type),n.classes.toggle("opened","show"===e.type)),n.aria("expanded","show"===e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.repaint(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),n.fire("showmenu")},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.settings.icon,o=t.state.get("text"),s="";return(e=t.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o&&(t.classes.add("btn-has-text"),s=''+t.encode(o)+""),r=t.settings.icon?i+"ico "+i+"i-"+r:"",t.aria("role",t.parent()instanceof cr?"menuitem":"button"),''},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(t.target,e.getEl())&&(e.focus(),e.showMenu(!t.aria),t.aria&&e.menu.items().filter(":visible")[0].focus())}),e.on("mouseenter",function(t){var n,i=t.control,r=e.parent();i&&r&&i instanceof dr&&i.parent()===r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!==i&&(e.menu&&e.menu.visible()&&(n=!0),e.hideMenu())}),n&&(i.focus(),i.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}}),fr=xt.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=a.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu"),e.animate&&11!==_.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var e,t=this;function n(){t.throbber&&(t.throbber.hide(),t.throbber=null)}t.settings.itemsFactory&&(t.throbber||(t.throbber=new kt(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",n)),t.requestTime=e=(new Date).getTime(),t.settings.itemsFactory(function(i){0!==i.length?t.requestTime===e&&(t.getEl().style.width="",t.getEl("body").style.width="",n(),t.items().remove(),t.getEl("body").innerHTML="",t.add(i),t.renderNew(),t.fire("loaded")):t.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;if(n.icon||n.image||n.selectable)return e._hasIcons=!0,!1}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e.on("show hide",function(t){t.control===e&&("show"===t.type?C.setTimeout(function(){e.classes.add("in")},0):e.classes.remove("in"))}),e._super()}}),hr=dr.extend({init:function(e){var t,n,i,r,o=this;o._super(e),e=o.settings,o._values=t=e.values,t&&("undefined"!=typeof e.value&&function s(t){for(var r=0;r0&&(i=t[0].text,o.state.set("value",t[0].value)),o.state.set("menu",t)),o.state.set("text",e.text||i),o.classes.add("listbox"),o.on("select",function(t){var n=t.control;r&&(t.lastControl=r),e.multiple?n.active(!n.active()):o.value(t.control.value()),r=n})},bindStates:function(){var e=this;return e.on("show",function(t){var n,i;n=t.control,i=e.value(),n instanceof fr&&n.items().each(function(e){e.hasMenus()||e.active(e.value()===i)})}),e.state.on("change:value",function(t){var n=function i(e,t){var n;if(e)for(var r=0;r").replace(new RegExp(c("]mce~match!"),"g"),"")}return s&&t.parent().classes.add("menu-has-icons"),i.image&&(a=" style=\"background-image: url('"+i.image+"')\""),l&&(l=function(e){var t,n,i={};for(i=_.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},e=e.split("+"),t=0;t\xa0":"",o=f(t.encode(d(o))),u=f(t.encode(d(u))),''+e+("-"!==o?'
'+o+"":"")+(l?'":"")+(i.menu?'
':"")+(u?'":"")+"
"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&(i.setAttribute("style",n),e._textStyle=n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),C.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return function(e,t){var n=e._textStyle;if(n){var i=e.getEl("text");i.setAttribute("style",n),t&&(i.style.color="",i.style.backgroundColor="")}}(this,e),void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),gr=jt.extend({Defaults:{classes:"radio",role:"radio"}}),pr=Mt.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"===e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'
'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new ct(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!==e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function vr(e){var t="";if(e)for(var n=0;n'+e[n]+"";return t}var br=Mt.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13===e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t=this,n="";return e=vr(t._options),t.size&&(n=' size = "'+t.size+'"'),'"},bindStates:function(){var e=this;return e.state.on("change:options",function(t){e.getEl().innerHTML=vr(t.value)}),e._super()}});function yr(e,t,n){return en&&(e=n),e}function xr(e,t,n){e.setAttribute("aria-"+t,n)}function wr(e,t){var n,i,r,o,s;"v"===e.settings.orientation?(r="top",i="height",n="h"):(r="left",i="width",n="w"),s=e.getEl("handle"),o=((e.layoutRect()[n]||100)-we.getSize(s)[i])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",s.style[r]=o,s.style.height=e.layoutRect().h+"px",xr(s,"valuenow",t),xr(s,"valuetext",""+e.settings.previewFilter(t)),xr(s,"valuemin",e._minValue),xr(s,"valuemax",e._maxValue)}var _r=Mt.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"===e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return''},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,i,r,o,s,a,l,u,c,d,f,h,m=this;e=m._minValue,t=m._maxValue,"v"===m.settings.orientation?(n="screenY",i="top",r="height",o="h"):(n="screenX",i="left",r="width",o="w"),m._super(),function(e,t){function n(n){var i,r,o;i=yr(i=(((i=m.value())+(o=e))/(t-o)+.05*n)*(t-(r=e))-r,e,t),m.value(i),m.fire("dragstart",{value:i}),m.fire("drag",{value:i}),m.fire("dragend",{value:i})}m.on("keydown",function(e){switch(e.keyCode){case 37:case 38:n(-1);break;case 39:case 40:n(1)}})}(e,t),s=e,a=t,l=m.getEl("handle"),m._dragHelper=new ct(m._id,{handle:m._id+"-handle",start:function(e){u=e[n],c=parseInt(m.getEl("handle").style[i],10),d=(m.layoutRect()[o]||100)-we.getSize(l)[r],m.fire("dragstart",{value:h})},drag:function(e){var t=e[n]-u;f=yr(c+t,0,d),l.style[i]=f+"px",h=s+f/d*(a-s),m.value(h),m.tooltip().text(""+m.settings.previewFilter(h)).show().moveRel(l,"bc tc"),m.fire("drag",{value:h})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:h})}})},repaint:function(){this._super(),wr(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){wr(e,t.value)}),e._super()}}),Rr=Mt.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,''}}),Cr=dr.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),i=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,ye(e).css({width:i.w-we.getSize(t).width,height:i.h-2}),ye(t).css({height:i.h-2}),this},activeMenu:function(e){ye(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a=n.settings,l="";return(e=a.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o=a.icon?r+"ico "+r+"i-"+o:"",s&&(n.classes.add("btn-has-text"),l=''+n.encode(s)+""),t="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",''},postRender:function(){var e=this.settings.onclick;return this.on("click",function(t){var n=t.target;if(t.control===this)for(;n;){if(t.aria&&"down"!==t.aria.key||"BUTTON"===n.nodeName&&-1===n.className.indexOf("open"))return t.stopImmediatePropagation(),void(e&&e.call(this,t));n=n.parentNode}}),delete this.settings.onclick,this._super()}}),kr=Mi.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),Er=ft.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var t;this.activeTabId&&(t=this.getEl(this.activeTabId),ye(t).removeClass(this.classPrefix+"active"),t.setAttribute("aria-selected","false")),this.activeTabId="t"+e,(t=this.getEl("t"+e)).setAttribute("aria-selected","true"),ye(t).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!==n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",i=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,r){var o=e._id+"-t"+r;t.aria("role","tabpanel"),t.aria("labelledby",o),n+=''+e.encode(t.settings.title)+"
"}),'"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(n&&n.id===e._id+"-head")for(var i=n.childNodes.length;i--;)n.childNodes[i]===t.target&&e.activateTab(i)})},initLayoutRect:function(){var e,t,n,i=this;t=(t=we.getSize(i.getEl("head")).width)<0?0:t,n=0,i.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),i.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=we.getSize(i.getEl("head")).height;return i.settings.minWidth=t,i.settings.minHeight=n+r,(e=i._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}}),Hr=Mt.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13===e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){if(e.toJSON)return n=e,!1}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,i,r,o=this,s=0;e=o.getEl().style,t=o._layoutRect,r=o._lastRepaintRect||{};var a=document;return!o.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-s+"px"),i=(n=o.borderBox).left+n.right+8,s=n.top+n.bottom+(o.settings.multiline?8:0),t.x!==r.x&&(e.left=t.x+"px",r.x=t.x),t.y!==r.y&&(e.top=t.y+"px",r.y=t.y),t.w!==r.w&&(e.width=t.w-i+"px",r.w=t.w),t.h!==r.h&&(e.height=t.h-s+"px",r.h=t.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var e,t,n=this,i=n.settings;return e={id:n._id,hidefocus:"1"},a.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(t){e[t]=i[t]}),n.disabled()&&(e.disabled="disabled"),i.subtype&&(e.type=i.subtype),(t=we.create(i.multiline?"textarea":"input",e)).value=n.state.get("value"),t.className=n.classes,t.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!==t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}}),Sr=function(){return{Selector:Be,Collection:Le,ReflowQueue:qe,Control:et,Factory:g,KeyboardNavigation:nt,Container:rt,DragHelper:ct,Scrollable:dt,Panel:ft,Movable:Re,Resizable:ht,FloatPanel:xt,Window:zt,MessageBox:Lt,Tooltip:St,Widget:Mt,Progress:Tt,Notification:Wt,Layout:Ft,AbsoluteLayout:Vt,Button:Ut,ButtonGroup:$t,Checkbox:jt,ComboBox:Xt,ColorBox:Jt,PanelButton:Gt,ColorButton:Zt,ColorPicker:en,Path:nn,ElementPath:rn,FormItem:on,Form:sn,FieldSet:an,FilePicker:Ei,FitLayout:Hi,FlexLayout:Si,FlowLayout:Mi,FormatControls:rr,GridLayout:or,Iframe:sr,InfoBox:ar,Label:lr,Toolbar:ur,MenuBar:cr,MenuButton:dr,MenuItem:mr,Throbber:kt,Menu:fr,ListBox:hr,Radio:gr,ResizeHandle:pr,SelectBox:br,Slider:_r,Spacer:Rr,SplitButton:Cr,StackLayout:kr,TabPanel:Er,TextBox:Hr,DropZone:tn,BrowseButton:Yt}},Mr=function(e){e.ui?a.each(Sr(),function(t,n){e.ui[n]=t}):e.ui=Sr()};a.each(Sr(),function(e,t){g.add(t,e)}),Mr(window.tinymce?window.tinymce:{}),o.add("modern",function(e){return rr.setup(e),It(e)})}();
\ No newline at end of file