tinymce-rails 4.9.10 → 4.9.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fa577ba4bb17221c1c259c4a18147670dcb81722b0202b28c08913a4d872751
4
- data.tar.gz: 86ec35ae2896adbad31380729974a58e08d953bedb61223dccb2ebf16d81e7d8
3
+ metadata.gz: 2d4a9e6b463099f136b4a76925e428f4adbdc905d04d316a97b1ea3508a10ddf
4
+ data.tar.gz: 103162d595c1bd4948ef0f41c101a5388a77d521737855a076c4c077d7b92038
5
5
  SHA512:
6
- metadata.gz: 25c329bdd1abb59169c61009a187ccb20345f3ec97cf57f0babbf19bde9a1eb9bf4af731be4916c0615e0ff0dcacefec12223198290e9fb54933f76bb03b8dcf
7
- data.tar.gz: 8ac5274d54ef0df889162f70f8fa62164dd631d5c92744a9ca47a8abb56aa63022acabb785e58747be3284b3296867293d75ad9ce505f32b7c8a66a1aab6432f
6
+ metadata.gz: 80ed2f75eb71bab2b14c5d380d6c8c9400079f253baa34471102fd71afa3019a3931f1843375a00f47d0398e43eb672568a2c6960bb6cf06ce62a2f00bbc28c6
7
+ data.tar.gz: cbc4371630d008d8b2d308ad0cd9687b43487bfbdf9e6f1d15f0bff8295ea5c41a03fa213a3d1e488103ae234600cce3660993c411718d4bedf70ac6fe62ac14
@@ -1,4 +1,4 @@
1
- // 4.9.10 (2020-04-23)
1
+ // 4.9.11 (2020-07-13)
2
2
  (function () {
3
3
  (function (domGlobals) {
4
4
  'use strict';
@@ -5657,7 +5657,7 @@
5657
5657
  textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' + 'blockquote center dir fieldset header footer article section hgroup aside main nav figure');
5658
5658
  blockElementsMap = createLookupTable('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 details summary', textBlockElementsMap);
5659
5659
  textInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font strike u var cite ' + 'dfn code mark q sup sub samp');
5660
- each$4((settings.special || 'script noscript noframes noembed title style textarea xmp').split(' '), function (name) {
5660
+ each$4((settings.special || 'script noscript iframe noframes noembed title style textarea xmp').split(' '), function (name) {
5661
5661
  specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
5662
5662
  });
5663
5663
  var patternToRegExp = function (str) {
@@ -8103,7 +8103,8 @@
8103
8103
  return overflowY >= 0 && overflowY <= Math.min(rect1.height, rect2.height) / 2;
8104
8104
  };
8105
8105
  var isAbove = function (rect1, rect2) {
8106
- if (rect1.bottom - rect1.height / 2 < rect2.top) {
8106
+ var halfHeight = Math.min(rect2.height / 2, rect1.height / 2);
8107
+ if (rect1.bottom - halfHeight < rect2.top) {
8107
8108
  return true;
8108
8109
  }
8109
8110
  if (rect1.top > rect2.bottom) {
@@ -13290,6 +13291,99 @@
13290
13291
  };
13291
13292
  var InlineFormatDelete = { backspaceDelete: backspaceDelete$5 };
13292
13293
 
13294
+ var getPos$1 = function (elm) {
13295
+ var x = 0, y = 0;
13296
+ var offsetParent = elm;
13297
+ while (offsetParent && offsetParent.nodeType) {
13298
+ x += offsetParent.offsetLeft || 0;
13299
+ y += offsetParent.offsetTop || 0;
13300
+ offsetParent = offsetParent.offsetParent;
13301
+ }
13302
+ return {
13303
+ x: x,
13304
+ y: y
13305
+ };
13306
+ };
13307
+ var fireScrollIntoViewEvent = function (editor, elm, alignToTop) {
13308
+ var scrollEvent = {
13309
+ elm: elm,
13310
+ alignToTop: alignToTop
13311
+ };
13312
+ editor.fire('scrollIntoView', scrollEvent);
13313
+ return scrollEvent.isDefaultPrevented();
13314
+ };
13315
+ var scrollElementIntoView = function (editor, elm, alignToTop) {
13316
+ var y, viewPort;
13317
+ var dom = editor.dom;
13318
+ var root = dom.getRoot();
13319
+ var viewPortY, viewPortH, offsetY = 0;
13320
+ if (fireScrollIntoViewEvent(editor, elm, alignToTop)) {
13321
+ return;
13322
+ }
13323
+ if (!NodeType.isElement(elm)) {
13324
+ return;
13325
+ }
13326
+ if (alignToTop === false) {
13327
+ offsetY = elm.offsetHeight;
13328
+ }
13329
+ if (root.nodeName !== 'BODY') {
13330
+ var scrollContainer = editor.selection.getScrollContainer();
13331
+ if (scrollContainer) {
13332
+ y = getPos$1(elm).y - getPos$1(scrollContainer).y + offsetY;
13333
+ viewPortH = scrollContainer.clientHeight;
13334
+ viewPortY = scrollContainer.scrollTop;
13335
+ if (y < viewPortY || y + 25 > viewPortY + viewPortH) {
13336
+ scrollContainer.scrollTop = y < viewPortY ? y : y - viewPortH + 25;
13337
+ }
13338
+ return;
13339
+ }
13340
+ }
13341
+ viewPort = dom.getViewPort(editor.getWin());
13342
+ y = dom.getPos(elm).y + offsetY;
13343
+ viewPortY = viewPort.y;
13344
+ viewPortH = viewPort.h;
13345
+ if (y < viewPort.y || y + 25 > viewPortY + viewPortH) {
13346
+ editor.getWin().scrollTo(0, y < viewPortY ? y : y - viewPortH + 25);
13347
+ }
13348
+ };
13349
+ var getViewPortRect = function (editor) {
13350
+ if (editor.inline) {
13351
+ return editor.getBody().getBoundingClientRect();
13352
+ } else {
13353
+ var win = editor.getWin();
13354
+ return {
13355
+ left: 0,
13356
+ right: win.innerWidth,
13357
+ top: 0,
13358
+ bottom: win.innerHeight,
13359
+ width: win.innerWidth,
13360
+ height: win.innerHeight
13361
+ };
13362
+ }
13363
+ };
13364
+ var scrollBy = function (editor, dx, dy) {
13365
+ if (editor.inline) {
13366
+ editor.getBody().scrollLeft += dx;
13367
+ editor.getBody().scrollTop += dy;
13368
+ } else {
13369
+ editor.getWin().scrollBy(dx, dy);
13370
+ }
13371
+ };
13372
+ var scrollRangeIntoView = function (editor, rng) {
13373
+ head(CaretPosition.fromRangeStart(rng).getClientRects()).each(function (rngRect) {
13374
+ var bodyRect = getViewPortRect(editor);
13375
+ var overflow = getOverflow(bodyRect, rngRect);
13376
+ var margin = 4;
13377
+ var dx = overflow.x > 0 ? overflow.x + margin : overflow.x - margin;
13378
+ var dy = overflow.y > 0 ? overflow.y + margin : overflow.y - margin;
13379
+ scrollBy(editor, overflow.x !== 0 ? dx : 0, overflow.y !== 0 ? dy : 0);
13380
+ });
13381
+ };
13382
+ var ScrollIntoView = {
13383
+ scrollElementIntoView: scrollElementIntoView,
13384
+ scrollRangeIntoView: scrollRangeIntoView
13385
+ };
13386
+
13293
13387
  var isContentEditableTrue$2 = NodeType.isContentEditableTrue;
13294
13388
  var isContentEditableFalse$6 = NodeType.isContentEditableFalse;
13295
13389
  var showCaret = function (direction, editor, node, before, scrollIntoView) {
@@ -13336,6 +13430,10 @@
13336
13430
  }
13337
13431
  return range;
13338
13432
  };
13433
+ var moveToRange = function (editor, rng) {
13434
+ editor.selection.setRng(rng);
13435
+ ScrollIntoView.scrollRangeIntoView(editor, editor.selection.getRng());
13436
+ };
13339
13437
 
13340
13438
  var trimEmptyTextNode$1 = function (dom, node) {
13341
13439
  if (NodeType.isText(node) && node.data.length === 0) {
@@ -20415,7 +20513,7 @@
20415
20513
  var blockElements = Tools.extend({}, schema.getBlockElements());
20416
20514
  var nonEmptyElements = schema.getNonEmptyElements();
20417
20515
  var parent, lastParent, prev, prevName;
20418
- var whiteSpaceElements = schema.getNonEmptyElements();
20516
+ var whiteSpaceElements = schema.getWhiteSpaceElements();
20419
20517
  var elementRule, textNode;
20420
20518
  blockElements.body = 1;
20421
20519
  for (i = 0; i < l; i++) {
@@ -21490,99 +21588,6 @@
21490
21588
  };
21491
21589
  };
21492
21590
 
21493
- var getPos$1 = function (elm) {
21494
- var x = 0, y = 0;
21495
- var offsetParent = elm;
21496
- while (offsetParent && offsetParent.nodeType) {
21497
- x += offsetParent.offsetLeft || 0;
21498
- y += offsetParent.offsetTop || 0;
21499
- offsetParent = offsetParent.offsetParent;
21500
- }
21501
- return {
21502
- x: x,
21503
- y: y
21504
- };
21505
- };
21506
- var fireScrollIntoViewEvent = function (editor, elm, alignToTop) {
21507
- var scrollEvent = {
21508
- elm: elm,
21509
- alignToTop: alignToTop
21510
- };
21511
- editor.fire('scrollIntoView', scrollEvent);
21512
- return scrollEvent.isDefaultPrevented();
21513
- };
21514
- var scrollElementIntoView = function (editor, elm, alignToTop) {
21515
- var y, viewPort;
21516
- var dom = editor.dom;
21517
- var root = dom.getRoot();
21518
- var viewPortY, viewPortH, offsetY = 0;
21519
- if (fireScrollIntoViewEvent(editor, elm, alignToTop)) {
21520
- return;
21521
- }
21522
- if (!NodeType.isElement(elm)) {
21523
- return;
21524
- }
21525
- if (alignToTop === false) {
21526
- offsetY = elm.offsetHeight;
21527
- }
21528
- if (root.nodeName !== 'BODY') {
21529
- var scrollContainer = editor.selection.getScrollContainer();
21530
- if (scrollContainer) {
21531
- y = getPos$1(elm).y - getPos$1(scrollContainer).y + offsetY;
21532
- viewPortH = scrollContainer.clientHeight;
21533
- viewPortY = scrollContainer.scrollTop;
21534
- if (y < viewPortY || y + 25 > viewPortY + viewPortH) {
21535
- scrollContainer.scrollTop = y < viewPortY ? y : y - viewPortH + 25;
21536
- }
21537
- return;
21538
- }
21539
- }
21540
- viewPort = dom.getViewPort(editor.getWin());
21541
- y = dom.getPos(elm).y + offsetY;
21542
- viewPortY = viewPort.y;
21543
- viewPortH = viewPort.h;
21544
- if (y < viewPort.y || y + 25 > viewPortY + viewPortH) {
21545
- editor.getWin().scrollTo(0, y < viewPortY ? y : y - viewPortH + 25);
21546
- }
21547
- };
21548
- var getViewPortRect = function (editor) {
21549
- if (editor.inline) {
21550
- return editor.getBody().getBoundingClientRect();
21551
- } else {
21552
- var win = editor.getWin();
21553
- return {
21554
- left: 0,
21555
- right: win.innerWidth,
21556
- top: 0,
21557
- bottom: win.innerHeight,
21558
- width: win.innerWidth,
21559
- height: win.innerHeight
21560
- };
21561
- }
21562
- };
21563
- var scrollBy = function (editor, dx, dy) {
21564
- if (editor.inline) {
21565
- editor.getBody().scrollLeft += dx;
21566
- editor.getBody().scrollTop += dy;
21567
- } else {
21568
- editor.getWin().scrollBy(dx, dy);
21569
- }
21570
- };
21571
- var scrollRangeIntoView = function (editor, rng) {
21572
- head(CaretPosition.fromRangeStart(rng).getClientRects()).each(function (rngRect) {
21573
- var bodyRect = getViewPortRect(editor);
21574
- var overflow = getOverflow(bodyRect, rngRect);
21575
- var margin = 4;
21576
- var dx = overflow.x > 0 ? overflow.x + margin : overflow.x - margin;
21577
- var dy = overflow.y > 0 ? overflow.y + margin : overflow.y - margin;
21578
- scrollBy(editor, overflow.x !== 0 ? dx : 0, overflow.y !== 0 ? dy : 0);
21579
- });
21580
- };
21581
- var ScrollIntoView = {
21582
- scrollElementIntoView: scrollElementIntoView,
21583
- scrollRangeIntoView: scrollRangeIntoView
21584
- };
21585
-
21586
21591
  var hasCeProperty = function (node) {
21587
21592
  return NodeType.isContentEditableTrue(node) || NodeType.isContentEditableFalse(node);
21588
21593
  };
@@ -21901,22 +21906,37 @@
21901
21906
  };
21902
21907
  var GetSelectionContent = { getContent: getContent };
21903
21908
 
21909
+ var setupArgs = function (args, content) {
21910
+ return __assign(__assign({ format: 'html' }, args), {
21911
+ set: true,
21912
+ selection: true,
21913
+ content: content
21914
+ });
21915
+ };
21916
+ var cleanContent = function (editor, args) {
21917
+ if (args.format !== 'raw') {
21918
+ var node = editor.parser.parse(args.content, __assign({
21919
+ isRootContent: true,
21920
+ forced_root_block: false
21921
+ }, args));
21922
+ return HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(node);
21923
+ } else {
21924
+ return args.content;
21925
+ }
21926
+ };
21904
21927
  var setContent = function (editor, content, args) {
21928
+ var contentArgs = setupArgs(args, content);
21905
21929
  var rng = editor.selection.getRng(), caretNode;
21906
21930
  var doc = editor.getDoc();
21907
21931
  var frag, temp;
21908
- args = args || { format: 'html' };
21909
- args.set = true;
21910
- args.selection = true;
21911
- args.content = content;
21912
- if (!args.no_events) {
21913
- args = editor.fire('BeforeSetContent', args);
21914
- if (args.isDefaultPrevented()) {
21915
- editor.fire('SetContent', args);
21932
+ if (!contentArgs.no_events) {
21933
+ contentArgs = editor.fire('BeforeSetContent', contentArgs);
21934
+ if (contentArgs.isDefaultPrevented()) {
21935
+ editor.fire('SetContent', contentArgs);
21916
21936
  return;
21917
21937
  }
21918
21938
  }
21919
- content = args.content;
21939
+ content = cleanContent(editor, contentArgs);
21920
21940
  if (rng.insertNode) {
21921
21941
  content += '<span id="__caret">_</span>';
21922
21942
  if (rng.startContainer === doc && rng.endContainer === doc) {
@@ -21948,19 +21968,20 @@
21948
21968
  } catch (ex) {
21949
21969
  }
21950
21970
  } else {
21951
- if (rng.item) {
21971
+ var anyRng = rng;
21972
+ if (anyRng.item) {
21952
21973
  doc.execCommand('Delete', false, null);
21953
- rng = editor.getRng();
21974
+ anyRng = editor.selection.getRng();
21954
21975
  }
21955
21976
  if (/^\s+/.test(content)) {
21956
- rng.pasteHTML('<span id="__mce_tmp">_</span>' + content);
21977
+ anyRng.pasteHTML('<span id="__mce_tmp">_</span>' + content);
21957
21978
  editor.dom.remove('__mce_tmp');
21958
21979
  } else {
21959
- rng.pasteHTML(content);
21980
+ anyRng.pasteHTML(content);
21960
21981
  }
21961
21982
  }
21962
- if (!args.no_events) {
21963
- editor.fire('SetContent', args);
21983
+ if (!contentArgs.no_events) {
21984
+ editor.fire('SetContent', contentArgs);
21964
21985
  }
21965
21986
  };
21966
21987
  var SetSelectionContent = { setContent: setContent };
@@ -22649,7 +22670,7 @@
22649
22670
  return function () {
22650
22671
  var newRng = getHorizontalRange(editor, forward);
22651
22672
  if (newRng) {
22652
- editor.selection.setRng(newRng);
22673
+ moveToRange(editor, newRng);
22653
22674
  return true;
22654
22675
  } else {
22655
22676
  return false;
@@ -22660,7 +22681,7 @@
22660
22681
  return function () {
22661
22682
  var newRng = getVerticalRange(editor, down);
22662
22683
  if (newRng) {
22663
- editor.selection.setRng(newRng);
22684
+ moveToRange(editor, newRng);
22664
22685
  return true;
22665
22686
  } else {
22666
22687
  return false;
@@ -22762,10 +22783,6 @@
22762
22783
  });
22763
22784
  };
22764
22785
 
22765
- var moveToRange = function (editor, rng) {
22766
- editor.selection.setRng(rng);
22767
- ScrollIntoView.scrollRangeIntoView(editor, rng);
22768
- };
22769
22786
  var hasNextBreak = function (getPositionsUntil, scope, lineInfo) {
22770
22787
  return lineInfo.breakAt.map(function (breakPos) {
22771
22788
  return getPositionsUntil(scope, breakPos).breakAt.isSome();
@@ -26364,8 +26381,8 @@
26364
26381
  defaultSettings: {},
26365
26382
  $: DomQuery,
26366
26383
  majorVersion: '4',
26367
- minorVersion: '9.10',
26368
- releaseDate: '2020-04-23',
26384
+ minorVersion: '9.11',
26385
+ releaseDate: '2020-07-13',
26369
26386
  editors: legacyEditors,
26370
26387
  i18n: I18n,
26371
26388
  activeEditor: null,
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "4.9.10"
4
- TINYMCE_VERSION = "4.9.10"
3
+ VERSION = "4.9.11"
4
+ TINYMCE_VERSION = "4.9.11"
5
5
  end
6
6
  end
":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),(i=Nl(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='
    '),qw(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=al({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Ao(ar.fromDom(n))?r:Xt.trim(r),qw(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Ww=Si.DOM,Kw=function(e){return _.from(e).each(function(e){return e.destroy()})},Xw=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Ww.remove(o.nextSibling),bp(e),e.editorManager.remove(e),!e.inline&&r&&(i=e,Ww.setStyle(i.id,"display",i.orgDisplay)),Cp(e),Ww.remove(e.getContainer()),Kw(t),Kw(n),e.destroy()}var i},Yw=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Kw(i),Kw(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Ww.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Gw=Si.DOM,Jw=Xt.extend,Qw=Xt.each,Zw=Xt.resolve,eN=fe.ie,tN=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,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,render_ui:!0,indentation:"40px",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,summary,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,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=jp(Ip,c,a,u),l.settings=t,Bi.language=t.language||"en",Bi.languageLoad=t.language_load,Bi.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new zw(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new Xp(l),l.loadedCSS={},l.editorCommands=new fp(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(fe.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(fe.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=gn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};Jw(tN.prototype={render:function(){Bw(this)},focus:function(e){rh(this,e)},hasFocus:function(){return oh(this)},execCallback:function(e){for(var t=[],n=1;n=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=ON(e.x,t.x),r=ON(e.y,t.y),o=DN(e.x+e.w,t.x+t.w),i=DN(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:IN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=ON(0,t.x-u),o=ON(0,t.y-s),i=ON(0,c-f),a=ON(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),IN(u,s,(c-=i)-u,(l-=a)-s)},create:IN,fromClientRect:function(e){return IN(e.left,e.top,e.width,e.height)}},FN={},MN={add:function(e,t){FN[e.toLowerCase()]=t},has:function(e){return!!FN[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=FN.hasOwnProperty(t)?FN[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=FN[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},zN=Xt.each,UN=Xt.extend,jN=function(){};jN.extend=_N=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!AN&&(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},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in AN=!0,e=new this,AN=!1,n.Mixins&&(zN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&zN(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&zN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&zN(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=UN({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=_N,i};var VN=Math.min,HN=Math.max,qN=Math.round,$N=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r ":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),(i=Nl(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='
    '),qw(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=al({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Ao(ar.fromDom(n))?r:Xt.trim(r),qw(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Ww=Si.DOM,Kw=function(e){return _.from(e).each(function(e){return e.destroy()})},Xw=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Ww.remove(o.nextSibling),Np(e),e.editorManager.remove(e),!e.inline&&r&&(i=e,Ww.setStyle(i.id,"display",i.orgDisplay)),Ep(e),Ww.remove(e.getContainer()),Kw(t),Kw(n),e.destroy()}var i},Yw=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Kw(i),Kw(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),Ww.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Gw=Si.DOM,Jw=Xt.extend,Qw=Xt.each,Zw=Xt.resolve,eN=fe.ie,tN=function(e,t,n){var r,o,i,a,u,s,c,l=this,f=l.documentBaseUrl=n.documentBaseURL,d=n.baseURI;r=l,o=e,i=f,a=n.defaultSettings,u=t,c={id:o,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:i,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,render_ui:!0,indentation:"40px",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,summary,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,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s,ie7_compat:!0},t=$p(zp,c,a,u),l.settings=t,Bi.language=t.language||"en",Bi.languageLoad=t.language_load,Bi.baseURL=n.baseURL,l.id=e,l.setDirty(!1),l.plugins={},l.documentBaseURI=new zw(t.document_base_url,{base_uri:d}),l.baseURI=d,l.contentCSS=[],l.contentStyles=[],l.shortcuts=new Qp(l),l.loadedCSS={},l.editorCommands=new pp(l),l.suffix=n.suffix,l.editorManager=n,l.inline=t.inline,l.buttons={},l.menuItems={},t.cache_suffix&&(fe.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(fe.overrideViewPort=!1),n.fire("SetupEditor",{editor:l}),l.execCallback("setup",l),l.$=gn.overrideDefaults(function(){return{context:l.inline?l.getBody():l.getDoc(),element:l.getBody()}})};Jw(tN.prototype={render:function(){Bw(this)},focus:function(e){uh(this,e)},hasFocus:function(){return sh(this)},execCallback:function(e){for(var t=[],n=1;n=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=ON(e.x,t.x),r=ON(e.y,t.y),o=DN(e.x+e.w,t.x+t.w),i=DN(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:IN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=ON(0,t.x-u),o=ON(0,t.y-s),i=ON(0,c-f),a=ON(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),IN(u,s,(c-=i)-u,(l-=a)-s)},create:IN,fromClientRect:function(e){return IN(e.left,e.top,e.width,e.height)}},FN={},MN={add:function(e,t){FN[e.toLowerCase()]=t},has:function(e){return!!FN[e.toLowerCase()]},get:function(e){var t=e.toLowerCase(),n=FN.hasOwnProperty(t)?FN[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=FN[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}},zN=Xt.each,UN=Xt.extend,jN=function(){};jN.extend=_N=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!AN&&(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},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in AN=!0,e=new this,AN=!1,n.Mixins&&(zN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&zN(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&zN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&zN(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=UN({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=_N,i};var VN=Math.min,HN=Math.max,qN=Math.round,$N=function(e,n){var r,o,t,i;if(n=n||'"',null===e)return"null";if("string"==(t=typeof e))return o="\bb\tt\nn\ff\rr\"\"''\\\\",n+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=o.indexOf(t))+1?"\\"+o.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"===t){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(r=0,o="[";r
    @@ -1,2 +1,2 @@
    1
    - // 4.9.10 (2020-04-23)
    2
    - !function(V){"use strict";var o=function(){},H=function(n,r){return function(){for(var e=[],t=0;t+~]|"+at+")"+at+"*"),mt=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),gt=new RegExp(ct),pt=new RegExp("^"+ut+"$"),ht={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/^[^{]+\{\s*\[native \w/,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,wt=/'|\\/g,Nt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Et=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{rt.apply(et=ot.call($e.childNodes),$e.childNodes),et[$e.childNodes.length].nodeType}catch(iE){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var St=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:$e)!==Me&&Fe(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Me).nodeType)&&9!==u)return[];if(Ue&&!r){if(o=Ct.exec(e))if(a=o[1]){if(9===u){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))&&He(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&ke.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(ke.qsa&&(!je||!je.test(e))){if(f=l=qe,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=De(e),(l=t.getAttribute("id"))?f=l.replace(wt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Pt(c[s]);d=xt.test(e)&&Ot(t.parentNode)||t,m=c.join(",")}if(m)try{return rt.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return Be(e.replace(lt,"$1"),t,n,r)};function Tt(){var r=[];return function e(t,n){return r.push(t+" ")>_e.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function kt(e){return e[qe]=!0,e}function _t(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function At(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Rt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Dt(a){return kt(function(i){return i=+i,kt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(Te in ke=St.support={},Re=St.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fe=St.setDocument=function(e){var t,s=e?e.ownerDocument||e:$e,n=s.defaultView;return s!==Me&&9===s.nodeType&&s.documentElement?(ze=(Me=s).documentElement,Ue=!Re(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fe()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fe()})),ke.attributes=!0,ke.getElementsByTagName=!0,ke.getElementsByClassName=bt.test(s.getElementsByClassName),ke.getById=!0,_e.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ue){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_e.filter.ID=function(e){var t=e.replace(Nt,Et);return function(e){return e.getAttribute("id")===t}},_e.find.TAG=ke.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)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},_e.find.CLASS=ke.getElementsByClassName&&function(e,t){if(Ue)return t.getElementsByClassName(e)},Ve=[],je=[],ke.disconnectedMatch=!0,je=je.length&&new RegExp(je.join("|")),Ve=Ve.length&&new RegExp(Ve.join("|")),t=bt.test(ze.compareDocumentPosition),He=t||bt.test(ze.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},Je=t?function(e,t){if(e===t)return Le=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!ke.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===$e&&He($e,e)?-1:t===s||t.ownerDocument===$e&&He($e,t)?1:Ie?it.call(Ie,e)-it.call(Ie,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Le=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Ie?it.call(Ie,e)-it.call(Ie,t):0;if(o===i)return _t(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?_t(a[r],u[r]):a[r]===$e?-1:u[r]===$e?1:0},s):Me},St.matches=function(e,t){return St(e,null,null,t)},St.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Me&&Fe(e),t=t.replace(mt,"='$1']"),ke.matchesSelector&&Ue&&(!Ve||!Ve.test(t))&&(!je||!je.test(t)))try{var n=(void 0).call(e,t);if(n||ke.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(iE){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Nt,Et),e[3]=(e[3]||e[4]||e[5]||"").replace(Nt,Et),"~="===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]||St.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]&&St.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&>.test(n)&&(t=De(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(Nt,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Xe[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Xe(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=St.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,Zt=Se.Event,en=Xt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Yt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,bn(e[0]));else if(t.length&&!t.nodeType){if(t=gn.makeArray(t),r)for(o=t.length-1;0<=o;o--)on(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return gn(t).find(e);if(n[1])for(r=rn(e,bn(t)).firstChild;r;)Gt.call(o,r),r=r.nextSibling;else{if(!(r=bn(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 Xt.toArray(this)},add:function(e,t){var n,r,o=this;if(nn(e))return o.add(gn(e));if(!1!==t)for(n=gn.unique(o.toArray().concat(gn.makeArray(e))),o.length=n.length,r=0;r=a.length&&r(o)}))})})},co=function(e){return so(e,uo.nu)},lo=function(n){return{is:function(e){return n===e},isValue:C,isError:b,getOr:q(n),getOrThunk:q(n),getOrDie:q(n),or:function(e){return lo(n)},orThunk:function(e){return lo(n)},fold:function(e,t){return t(n)},map:function(e){return lo(e(n))},mapError:function(e){return lo(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return _.some(n)}}},fo=function(n){return{is:b,isValue:b,isError:C,getOr:$,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return fo(n)},mapError:function(e){return fo(e(n))},each:o,bind:function(e){return fo(n)},exists:b,forall:C,toOption:_.none}},mo={value:lo,error:fo,fromOption:function(e,t){return e.fold(function(){return fo(t)},lo)}};function go(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var po,ho,vo,yo=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ko=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xo=/[<>&\"\']/g,Yo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Go={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"};ho={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},vo={"<":"<",">":">","&":"&",""":'"',"'":"'"};var Jo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):Go[t]||String.fromCharCode(t):vo[e]||po[e]||(n=e,(r=ar.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},ni={},ri={},oi=Xt.makeMap,ii=Xt.each,ai=Xt.extend,ui=Xt.explode,si=Xt.inArray,ci=function(e,t){return(e=Xt.trim(e))?e.split(t||" "):[]},li=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n
    ').css(n).appendTo(a)[0];return c.set(_.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&gn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:l,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;}"},reposition:function(){c.get().each(function(e){var t=fs(a,e.element,e.before);gn(e.caret).css(t)})},destroy:function(){return he.clearInterval(t)}}},ms=function(){return cs.isIE()||cs.isEdge()||cs.isFirefox()},gs=function(e){return ls(e)||jo.isTable(e)&&ms()},ps=jo.isContentEditableFalse,hs=jo.matchStyleValues("display","block table table-cell table-caption list-item"),vs=ka,ys=Sa,bs=jo.isElement,Cs=Ha,xs=function(e){return 0=o.data.length-1)return 1===e&&(r=s(o))?Rs(r):n;if(Oa(o)&&i<=1)return-1===e&&(r=u(o))?Ds(r):n;if(i===o.data.length)return(r=s(o))?Rs(r):n;if(0===i)return(r=u(o))?Ds(r):n}return n},Bs=function(e,t){return _.from(ks(e?0:-1,t)).filter(ps)},Ps=function(e,t,n){var r=Os(e,t,n);return-1===e?Su.fromRangeStart(r):Su.fromRangeEnd(r)},Is=function(e){return _.from(e.getNode()).map(ar.fromDom)},Ls=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Fs=function(e,t){var n=Ts(e,t);return!(n||!jo.isBr(e.getNode()))||n};(ku=Tu||(Tu={}))[ku.Backwards=-1]="Backwards",ku[ku.Forwards=1]="Forwards";var Ms,zs,Us,js=jo.isContentEditableFalse,Vs=jo.isText,Hs=jo.isElement,qs=jo.isBr,$s=Ha,Ws=function(e){return Ua(e)||!!qa(t=e)&&!0!==j(te(t.getElementsByTagName("*")),function(e,t){return e||Ia(t)},!1);var t},Ks=$a,Xs=function(e,t){return e.hasChildNodes()&&tu.length-1)return!!fc(c,i,r)||lc(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},mc=function(e){return jo.isText(e)&&0=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&0h.length-1?p=h.length-1:p<0&&(p=0),d=h[p]||g),l===d)return o(v([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return C(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return C(d,n);if(a===n)break}r=b(l,n)||l,i=b(d,n)||d,C(l,r,!0),(s=y(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(s)),C(d,i)}},Fc=(Ms=mr,zs="text",{get:function(e){if(!Ms(e))throw new Error("Can only get "+zs+" value of a "+zs+" node");return Us(e).getOr("")},getOption:Us=function(e){return Ms(e)?_.from(e.dom().nodeValue):_.none()},set:function(e,t){if(!Ms(e))throw new Error("Can only set raw "+zs+" value of a "+zs+" node");e.dom().nodeValue=t}}),Mc=function(e){return Fc.get(e)},zc=function(r,o,i,a){return Vr(o).fold(function(){return"skipping"},function(e){return"br"===a||mr(n=o)&&"\ufeff"===Mc(n)?"valid":dr(t=o)&&Gi(t,aa())?"existing":Ju(o)?"caret":wc.isValid(r,i,a)&&wc.isValid(r,lr(e),i)?"valid":"invalid-child";var t,n})},Uc=function(e,t,n,r){var o,i,a=t.uid,u=void 0===a?(o="mce-annotation",i=(new Date).getTime(),o+"_"+Math.floor(1e9*Math.random())+ ++ga+String(i)):a,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o=n.startOffset&&"\xa0"===n.startContainer.nodeValue[n.startOffset]),t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),e.selection.setRng(t)),s.selection.getRng().collapsed){var i=Uc(s.getDoc(),f,c,l.decorate);ya(i,"\xa0"),s.selection.getRng().insertNode(i.dom()),s.selection.select(i.dom())}else{var a=Yu.getPersistentBookmark(s.selection,!1),u=s.selection.getRng();jc(s,u,c,l.decorate,f),s.selection.moveToBookmark(a)}})};function Hc(s){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?_.from(n[e]).map(function(e){return e.settings}):_.none()}});da(s,r);var o=fa(s);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){Vc(s,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){ca(s,_.some(e)).each(function(e){var t=e.elements;z(t,ji)})},getAll:function(e){var t,n,r,o,i,a,u=(t=s,n=e,r=ar.fromDom(t.getBody()),o=Qi(r,"["+ua()+'="'+n+'"]'),i={},z(o,function(e){var t=Er(e,sa()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return a=function(e){return W(e,function(e){return e.dom()})},vr(u,function(e,t){return{k:t,v:a(e,t)}})}}}var qc=function(e){return Xt.grep(e.childNodes,function(e){return"LI"===e.nodeName})},$c=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&("\xa0"===(t=e.firstChild).data||jo.isBr(t));var t},Wc=function(e){return 0'))},rl=function(n){Gr(n).each(function(t){Hr(t).each(function(e){Co(n)&&wo(t)&&Co(e)&&Ui(t)})})},ol=Xt.makeMap;function il(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=ol(e.indent_before||""),c=ol(e.indent_after||""),l=ti.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0":" />",n&&u&&c[e]&&0"),u&&c[e]&&0")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push(""):d.push(""),u&&d.push("\n")},doctype:function(e){d.push("",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function al(t,g){void 0===g&&(g=di());var p=il(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){p.text(e.value,e.raw)},8:function(e){p.comment(e.value)},7:function(e){p.pi(e.name,e.value)},10:function(e){p.doctype(e.value)},4:function(e){p.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},p.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1|)$/," "):o("nextSibling")||(t=t.replace(/( | )(
    |)$/," "))),t}(g.getRng(),t)),r=e.parser,m=n.merge,o=al({validate:e.settings.validate},e.schema),d='​',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,x,w=(l=g.getRng()).startContainer||(l.parentElement?l.parentElement():null),N=e.getBody();w===N&&g.isCollapsed()&&p.isBlock(N.firstChild)&&(h=e,(v=N.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&p.isEmpty(N.firstChild)&&((l=p.createRng()).setStart(N.firstChild,0),l.setEnd(N.firstChild,0),g.setRng(l)),g.isCollapsed()||(e.selection.setRng(cl(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),y=e.selection.getRng(),b=t,C=y.startContainer,x=y.startOffset,3===C.nodeType&&y.collapsed&&("\xa0"===C.data[x]?(C.deleteData(x,1),/[\u00a0| ]$/.test(b)||(b+=" ")):"\xa0"===C.data[x-1]&&(C.deleteData(x-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var E,S,T,k={context:(i=g.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,k),!0===n.paste&&Gc(e.schema,u)&&Qc(p,i))return l=Jc(o,p,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!p.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),k.invalid){for(fl(e,d),i=g.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:p.getOuterHTML(i),t=o.serialize(r.parse(t.replace(//i,function(){return o.serialize(u)}))),i===a?p.setHTML(a,t):p.setOuterHTML(i,t)}else!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):fl(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new el(r);Xt.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),fe.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),ll(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=_u.fromRangeStart(e);if(t=Js(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,p.get("mce_marker")),E=e.getBody(),Xt.each(E.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),S=e.dom,T=e.selection.getStart(),_.from(S.getParent(T,"td,th")).map(ar.fromDom).each(rl),e.fire("SetContent",s),e.addVisual()}},ml=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Xt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};dl(e,o.content,o.details)},gl=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,pl=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}return r},hl=function(e){return e.getParam("iframe_attrs",{})},vl=function(e){return e.getParam("doctype","")},yl=function(e){return e.getParam("document_base_url","")},bl=function(e){return pl(e,"body_id","tinymce")},Cl=function(e){return pl(e,"body_class","")},xl=function(e){return e.getParam("content_security_policy","")},wl=function(e){return e.getParam("br_in_pre",!0)},Nl=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},El=function(e){return e.getParam("forced_root_block_attrs",{})},Sl=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Tl=function(e){return e.getParam("no_newline_selector","")},kl=function(e){return e.getParam("keep_styles",!0)},_l=function(e){return e.getParam("end_container_on_empty_block",!1)},Al=function(e){return Xt.explode(e.getParam("font_size_style_values",""))},Rl=function(e){return Xt.explode(e.getParam("font_size_classes",""))},Dl=function(e){return e.getParam("images_dataimg_filter",q(!0),"function")},Ol=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Bl=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Pl=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Il=function(e){return e.getParam("images_upload_url","","string")},Ll=function(e){return e.getParam("images_upload_base_path","","string")},Fl=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Ml=function(e){return e.getParam("images_upload_handler",null,"function")},zl=function(e){return e.getParam("content_css_cors",!1,"boolean")},Ul=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},jl=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ta(n)?jo.isText(n.nextSibling)?_u(n.nextSibling,0):_u.after(n):Aa(t)?_u(n,r+1):t:Ta(n)?jo.isText(n.previousSibling)?_u(n.previousSibling,n.previousSibling.data.length):_u.before(n):Ra(t)?_u(n,r-1):t},Vl={isInlineTarget:function(e,t){return Lr(ar.fromDom(t),Ul(e))},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,U(Si.DOM.getParents(i.container(),"*",o),r));return _.from(a[a.length-1])},isRtl:function(e){return"rtl"===Si.DOM.getStyle(e,"direction",!0)||(t=e.textContent,gl.test(t));var t},isAtZwsp:function(e){return Aa(e)||Ra(e)},normalizePosition:jl,normalizeForwards:d(jl,!0),normalizeBackwards:d(jl,!1),hasSameParentBlock:function(e,t,n){var r=Ss(t,e),o=Ss(n,e);return r&&r===o}},Hl=function(e,t){return zr(e,t)?na(t,function(e){return No(e)||So(e)},(n=e,function(e){return Mr(n,ar.fromDom(e.dom().parentNode))})):_.none();var n},ql=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))},$l=function(i,a,u){return ru(sc.firstPositionIn(u),sc.lastPositionIn(u),function(e,t){var n=Vl.normalizePosition(!0,e),r=Vl.normalizePosition(!1,t),o=Vl.normalizePosition(!1,a);return i?sc.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):sc.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Wl=function(e,t){var n,r,o,i=ar.fromDom(e),a=ar.fromDom(t);return n=a,r="pre,code",o=d(Mr,i),ra(n,r,o).isSome()},Kl=function(e,t){return Ha(t)&&!1===(r=e,o=t,jo.isText(o)&&/^[ \t\r\n]*$/.test(o.data)&&!1===Wl(r,o))||(n=t,jo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||Xl(t);var n,r,o},Xl=jo.hasAttribute("data-mce-bookmark"),Yl=jo.hasAttribute("data-mce-bogus"),Gl=jo.hasAttributeValue("data-mce-bogus","all"),Jl=function(e){return function(e){var t,n,r=0;if(Kl(e,e))return!1;if(!(n=e.firstChild))return!0;t=new go(n,e);do{if(Gl(n))n=t.next(!0);else if(Yl(n))n=t.next();else if(jo.isBr(n))r++,n=t.next();else{if(Kl(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},Ql=Ar("block","position"),Zl=Ar("from","to"),ef=function(e,t){var n=ar.fromDom(e),r=ar.fromDom(t.container());return Hl(n,r).map(function(e){return Ql(e,t)})},tf=function(o,i,e){var t=ef(o,_u.fromRangeStart(e)),n=t.bind(function(e){return sc.fromPosition(i,o,e.position()).bind(function(e){return ef(o,e).map(function(e){return t=o,n=i,r=e,jo.isBr(r.position().getNode())&&!1===Jl(r.block())?sc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?sc.fromPosition(n,t,e).bind(function(e){return ef(t,e)}):_.some(r)}).getOr(r):r;var t,n,r})})});return ru(t,n,Zl).filter(function(e){return!1===Mr((r=e).from().block(),r.to().block())&&Vr((n=e).from().block()).bind(function(t){return Vr(n.to().block()).filter(function(e){return Mr(t,e)})}).isSome()&&(t=e,!1===jo.isContentEditableFalse(t.from().block().dom())&&!1===jo.isContentEditableFalse(t.to().block().dom()));var t,n,r})},nf=function(e,t,n){return n.collapsed?tf(e,t,n):_.none()},rf=function(e,t,n){return zr(t,e)?function(e,t){for(var n=D(t)?t:b,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=ar.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||Mr(e,t)}).slice(0,-1):[]},of=function(e,t){return rf(e,t,q(!1))},af=of,uf=function(e,t){return[e].concat(of(e,t))},sf=function(e){var t,n=(t=Kr(e),Y(t,Co).fold(function(){return t},function(e){return t.slice(0,e)}));return z(n,Ui),n},cf=function(e,t){var n=uf(t,e);return X(n.reverse(),Jl).each(Ui)},lf=function(e,t,n,r){if(Jl(n))return nl(n),sc.firstPositionIn(n.dom());0===U($r(r),function(e){return!Jl(e)}).length&&Jl(t)&&Pi(r,ar.fromTag("br"));var o=sc.prevPosition(n.dom(),_u.before(r.dom()));return z(sf(t),function(e){Pi(r,e)}),cf(e,t),o},ff=function(e,t,n){if(Jl(n))return Ui(n),Jl(t)&&nl(t),sc.firstPositionIn(t.dom());var r=sc.lastPositionIn(n.dom());return z(sf(t),function(e){Fi(n,e)}),cf(e,t),r},df=function(e,t){return zr(t,e)?(n=uf(e,t),_.from(n[n.length-1])):_.none();var n},mf=function(e,t){sc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(ar.fromDom).filter(wo).each(Ui)},gf=function(e,t,n){return mf(!0,t),mf(!1,n),df(t,n).fold(d(ff,e,t,n),d(lf,e,t,n))},pf=function(e,t,n,r){return t?gf(e,r,n):gf(e,n,r)},hf=function(t,n){var e,r=ar.fromDom(t.getBody());return(e=nf(r.dom(),n,t.selection.getRng()).bind(function(e){return pf(r,n,e.from().block(),e.to().block())})).each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},vf=function(e,t){var n=ar.fromDom(t),r=d(Mr,e);return ta(n,_o,r).isSome()},yf=function(e,t){var n,r,o=sc.prevPosition(e.dom(),_u.fromRangeStart(t)).isNone(),i=sc.nextPosition(e.dom(),_u.fromRangeEnd(t)).isNone();return!(vf(n=e,(r=t).startContainer)||vf(n,r.endContainer))&&o&&i},bf=function(e){var n,r,o,t,i=ar.fromDom(e.getBody()),a=e.selection.getRng();return yf(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),ru(Hl(n,ar.fromDom(o.startContainer)),Hl(n,ar.fromDom(o.endContainer)),function(e,t){return!1===Mr(e,t)&&(o.deleteContents(),pf(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},Cf=function(e,t){return!e.selection.isCollapsed()&&bf(e)},xf=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=gr(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,j((r=a).split(""),function(e,t){return-1!==" \f\n\r\t\x0B".indexOf(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},Wf=function(e,t){var n,r=e.data.slice(t),o=r.length-(n=r,n.replace(/^\s+/g,"")).length;return $f(e,t,o)},Kf=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===_u.isTextPosition(n)&&o===r.parentNode&&i>_u.before(r).offset()?_u(t.container(),t.offset()-1):t;var n,r,o,i},Xf=function(e){return Ha(e.previousSibling)?_.some((t=e.previousSibling,jo.isText(t)?_u(t,t.data.length):_u.after(t))):e.previousSibling?sc.lastPositionIn(e.previousSibling):_.none();var t},Yf=function(e){return Ha(e.nextSibling)?_.some((t=e.nextSibling,jo.isText(t)?_u(t,0):_u.before(t))):e.nextSibling?sc.firstPositionIn(e.nextSibling):_.none();var t},Gf=function(r,o){return Xf(o).orThunk(function(){return Yf(o)}).orThunk(function(){return e=r,t=o,n=_u.before(t.previousSibling?t.previousSibling:t.parentNode),sc.prevPosition(e,n).fold(function(){return sc.nextPosition(e,_u.after(t))},_.some);var e,t,n})},Jf=function(n,r){return Yf(r).orThunk(function(){return Xf(r)}).orThunk(function(){return e=n,t=r,sc.nextPosition(e,_u.after(t)).fold(function(){return sc.prevPosition(e,_u.before(t))},_.some);var e,t})},Qf=function(e,t,n){return(r=e,o=t,i=n,r?Jf(o,i):Gf(o,i)).map(d(Kf,n));var r,o,i},Zf=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},ed=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(lr(t))},td=function(e){if(Jl(e)){var t=ar.fromHtml('
    ');return zi(e),Fi(e,t),_.some(_u.before(t.dom()))}return _.none()},nd=function(e,t,l){var n,r,o,i,a=Hr(e).filter(mr),u=qr(e).filter(mr);return Ui(e),(n=a,r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Jn((r=u).data).length,r.appendData(o.data),Ui(ar.fromDom(o)),i&&Wf(r,a),n.container()===s?_u(u,c):n},n.isSome()&&r.isSome()&&o.isSome()?_.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):_.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Jn(r).length,$f(t,n-o,o);var t,n,r,o}),u.each(function(e){return Wf(e.dom(),0)})),t})},rd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=Qf(n,t.getBody(),e.dom()),u=ta(e,d(ed,t),(o=t.getBody(),function(e){return e.dom()===o})),s=nd(e,a,(i=e,br(t.schema.getTextInlineElements(),lr(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(td).fold(function(){r&&Zf(t,n,s)},function(e){r&&Zf(t,n,_.some(e))})},od=function(a,u){var e,t,n,r,o,i;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Os(t?1:-1,e,n),o=_u.fromRangeStart(r),i=ar.fromDom(e),!1===t&&Ff(o)?_.some(jf.remove(o.getNode(!0))):t&&Lf(o)?_.some(jf.remove(o.getNode())):!1===t&&Lf(o)&&Sf(i,o)?Tf(i,o).map(function(e){return jf.remove(e.getNode())}):t&&Ff(o)&&Ef(i,o)?kf(i,o).map(function(e){return jf.remove(e.getNode())}):qf(e,t,o)).map(function(e){return e.fold((o=a,i=u,function(e){return o._selectionOverrides.hideFakeCaret(),rd(o,i,ar.fromDom(e)),!0}),(n=a,r=u,function(e){var t=r?_u.before(e):_u.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},id=function(e,t){var n,r=e.selection.getNode();return!!jo.isContentEditableFalse(r)&&(n=ar.fromDom(e.getBody()),z(Qi(n,".mce-offscreen-selection"),Ui),rd(e,t,ar.fromDom(e.selection.getNode())),ql(e),!0)},ad=function(e,t){return e.selection.isCollapsed()?od(e,t):id(e,t)},ud=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(jo.isContentEditableTrue(t)||jo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return jo.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(_u.before(t).toRange())),!0},sd=jo.isText,cd=function(e){return sd(e)&&e.data[0]===xa},ld=function(e){return sd(e)&&e.data[e.data.length-1]===xa},fd=function(e){return e.ownerDocument.createTextNode(xa)},dd=function(e,t){return e?function(e){if(sd(e.previousSibling))return ld(e.previousSibling)||e.previousSibling.appendData(xa),e.previousSibling;if(sd(e))return cd(e)||e.insertData(0,xa),e;var t=fd(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(sd(e.nextSibling))return cd(e.nextSibling)||e.nextSibling.insertData(0,xa),e.nextSibling;if(sd(e))return ld(e)||e.appendData(xa),e;var t=fd(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},md=d(dd,!0),gd=d(dd,!1),pd=function(e,t){return jo.isText(e.container())?dd(t,e.container()):dd(t,e.getNode())},hd=function(e,t){var n=t.get();return n&&e.container()===n&&Ta(n)},vd=function(n,e){return e.fold(function(e){ss.remove(n.get());var t=md(e);return n.set(t),_.some(_u(t,t.length-1))},function(e){return sc.firstPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),1);ss.remove(n.get());var t=pd(e,!0);return n.set(t),_u(t,1)})},function(e){return sc.lastPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),n.get().length-1);ss.remove(n.get());var t=pd(e,!1);return n.set(t),_u(t,t.length-1)})},function(e){ss.remove(n.get());var t=gd(e);return n.set(t),_.some(_u(t,1))})},yd=function(e,t){for(var n=0;no.childNodes.length-1&&(c=!1),jo.isDocument(o)&&(o=g,i=0),o===g){if(c&&(u=o.childNodes[0s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,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),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(e,t,n){for(var r,o=new go(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0")},mceToggleVisualAid:function(){s.hasVisual=!s.hasVisual,s.addVisual()},mceReplaceContent:function(e,t,n){s.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=o.getParent(i.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=o.getParent(i.getStart(),jo.isContentEditableTrue);if(e){var t=o.createRng();t.selectNodeContents(e),i.setRng(t)}},"delete":function(){dg(s)},forwardDelete:function(){mg(s)},mceNewDocument:function(){s.setContent("")},InsertLineBreak:function(e,t,n){return Fg(s,n),!0}});var p=function(n){return function(){var e=i.isCollapsed()?[o.getParent(i.getNode(),o.isBlock)]:i.getSelectedBlocks(),t=cp(e,function(e){return!!a.matchNode(e,n)});return-1!==lp(t,!0)}};e({JustifyLeft:p("alignleft"),JustifyCenter:p("aligncenter"),JustifyRight:p("alignright"),JustifyFull:p("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(n.inline_styles){if((e=o.getParent(i.getStart(),o.isBlock))&&0"),u))[o.length-1]=Xt.extend(o[o.length-1],{func:n,scope:r||i}),Xt.extend(o[0],{desc:i.translate(t),subpatterns:o.slice(1)})},o=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)},c=function(e){return e.func?e.func.call(e.scope):null};i.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(qp(a,function(e){if(o(t,e))return r=e.subpatterns.slice(0),"keydown"===t.type&&c(e),!0}),o(t,r[0])&&(1===r.length&&"keydown"===t.type&&c(r[0]),r.shift()))}),this.add=function(e,n,r,o){var t;return"string"==typeof(t=r)?r=function(){i.execCommand(t,!1,null)}:Xt.isArray(t)&&(r=function(){i.execCommand(t[0],t[1],t[2])}),qp($p(Xt.trim(e.toLowerCase())),function(e){var t=s(e,n,r,o);a[t.id]=t}),!0},this.remove=function(e){var t=s(e);return!!a[t.id]&&(delete a[t.id],!0)}}var Yp=function(e){var t=Ur(e).dom();return e.dom()===t.activeElement},Gp=function(t){return(e=Ur(t),n=e!==undefined?e.dom():V.document,_.from(n.activeElement).map(ar.fromDom)).filter(function(e){return t.dom().contains(e.dom())});var e,n},Jp=function(t,e){return(n=e,n.collapsed?_.from(eu(n.startContainer,n.startOffset)).map(ar.fromDom):_.none()).bind(function(e){return ko(e)?_.some(e):!1===zr(t,e)?_.some(t):_.none()});var n},Qp=function(t,e){Jp(ar.fromDom(t.getBody()),e).bind(function(e){return sc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},Zp=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},eh=function(e){var t,n=e.getBody();return n&&(t=ar.fromDom(n),Yp(t)||Gp(t).isSome())},th=function(e){return e.inline?eh(e):(t=e).iframeElement&&Yp(ar.fromDom(t.iframeElement));var t},nh=function(e){return e.editorManager.setActive(e)},rh=function(e,t){e.removed||(t?nh(e):function(t){var e=t.selection,n=t.settings.content_editable,r=t.getBody(),o=e.getRng();t.quirks.refreshContentEditable();var i,a,u=(i=t,a=e.getNode(),i.dom.getParent(a,function(e){return"true"===i.dom.getContentEditable(e)}));if(t.$.contains(r,u))return Zp(u),Qp(t,o),nh(t);t.bookmark!==undefined&&!1===th(t)&&rp(t).each(function(e){t.selection.setRng(e),o=e}),n||(fe.opera||Zp(r),t.getWin().focus()),(fe.gecko||n)&&(Zp(r),Qp(t,o)),nh(t)}(e))},oh=th,ih=function(e,t){return t.dom()[e]},ah=function(e,t){return parseInt(kr(t,e),10)},uh=d(ih,"clientWidth"),sh=d(ih,"clientHeight"),ch=d(ah,"margin-top"),lh=d(ah,"margin-left"),fh=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,g=ar.fromDom(e.getBody()),p=e.inline?g:(r=g,ar.fromDom(r.dom().ownerDocument.documentElement)),h=(o=e.inline,a=t,u=n,s=(i=p).dom().getBoundingClientRect(),{x:a-(o?s.left+i.dom().clientLeft+lh(i):0),y:u-(o?s.top+i.dom().clientTop+ch(i):0)});return l=h.x,f=h.y,d=uh(c=p),m=sh(c),0<=l&&0<=f&&l<=d&&f<=m},dh=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,_.from(t).map(ar.fromDom)).map(function(e){return zr(Ur(e),e)}).getOr(!1)};function mh(n){var t,o=[],i=function(){var e,t=n.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},a=function(){0t;var t}},iv=function(n){return function(e){return t=n,e.line===t;var t}},av=jo.isContentEditableFalse,uv=Es,sv=function(e,t){return Math.abs(e.left-t)},cv=function(e,t){return Math.abs(e.right-t)},lv=function(e,t){return e>=t.left&&e<=t.right},fv=function(e,o){return Ht.reduce(e,function(e,t){var n,r;return n=Math.min(sv(e,o),cv(e,o)),r=Math.min(sv(t,o),cv(t,o)),lv(o,t)?t:lv(o,e)?e:r===n&&av(t.node)?t:r=e.top&&n<=e.bottom});return(r=fv(f,t))&&(r=fv((a=e,c=function(t,e){var n;return n=U(ev([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),dv(Jh.Up,a,d(c,Ga),u.node),dv(Jh.Down,a,d(c,Ja),u.node),s),t))&&gs(r.node)?(i=t,{node:(o=r).node,before:sv(o,i)i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}},o=xv(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),wv(u)},(s=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)})},Ev=function(e){var n;Nv(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(vv(t)||vv(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},Sv=function(t){var e=Vi(function(){if(!t.removed&&t.selection.getRng().collapsed){var e=sg(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Tv=jo.isContentEditableTrue,kv=jo.isContentEditableFalse,_v=function(e,t){for(var n=e.getBody();t&&t!==n;){if(Tv(t)||kv(t))return t;t=t.parentNode}return null},Av=function(g){var p,e,t,a=g.getBody(),o=ds(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return oh(g)}),h="sel-"+g.dom.uniqueId(),u=function(e){e&&g.selection.setRng(e)},s=function(){return g.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},y=function(e,t){return t=Os(e,a,t),-1===e?_u.fromRangeStart(t):_u.fromRangeEnd(t)},n=function(e){return ka(e)||Oa(e)||Ba(e)},b=function(e){return n(e.startContainer)||n(e.endContainer)},c=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return br(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),br(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},l=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!b(e))if(!1===t){if(c=y(-1,e),gs(c.getNode(!0)))return v(-1,c.getNode(!0),!1,!1);if(gs(c.getNode()))return v(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=y(1,e),gs(c.getNode()))return v(1,c.getNode(),!c.isAtEnd(),!1);if(gs(c.getNode(!0)))return v(1,c.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&kv(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),kv(n)?(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented()?null:(r=oa(ar.fromDom(g.getBody()),"#"+h).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('
    ').attr("id",h)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&fe.ie?(r.empty().append('

    \xa0

    ').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e),z(Qi(ar.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){Sr(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),p=n,C(),e)):null)},f=function(){p&&(p.removeAttribute("data-mce-selected"),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null},C=function(){o.hide()};return fe.ceFalse&&(function(){g.on("mouseup",function(e){var t=s();t.collapsed&&fh(g,e.clientX,e.clientY)&&u(ug(g,t,!1))}),g.on("click",function(e){var t;(t=_v(g,e.target))&&(kv(t)&&(e.preventDefault(),g.focus()),Tv(t)&&g.dom.isChildOf(t,g.selection.getNode())&&f())}),g.on("blur NewBlock",function(){f()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==kv(_v(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Js(e);if(!e.firstChild)return!1;var n=_u.before(e.firstChild),r=t.next(n);return r&&!Lf(r)&&!Ff(r)}(o)};r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=_v(n,e.target);kv(t)&&(r||(e.preventDefault(),l(ag(n,t))))}),g.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||g.dom.isChildOf(n,a))&&!1!==fh(g,e.clientX,e.clientY))if(t=_v(g,n))kv(t)?(e.preventDefault(),l(ag(g,t))):(f(),Tv(t)&&e.shiftKey||gv(e.clientX,e.clientY,g.selection.getRng())||(C(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===gs(n)){f(),C();var r=mv(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);g.getBody().focus(),u(o)}}}),g.on("keypress",function(e){Zh.modifierPressed(e)||(e.keyCode,kv(g.selection.getNode())&&e.preventDefault())}),g.on("getSelectionRange",function(e){var t=e.range;if(p){if(!p.parentNode)return void(p=null);(t=t.cloneRange()).selectNode(p),e.range=t}}),g.on("setSelectionRange",function(e){e.range=c(e.range);var t=l(e.range,e.forward);t&&(e.range=t)}),g.on("AfterSetSelectionRange",function(e){var t,n=e.range;b(n)||"mcepastebin"===n.startContainer.parentNode.id||C(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||f()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!fe.ie){var r=(t=g.dom.get(h))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),Ev(g),Sv(g)}(),e=g.contentStyles,t=".mce-content-body",e.push(o.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Pa(e),u(s()),g.selection.scrollIntoView(e[0]))},hideFakeCaret:C,destroy:function(){o.destroy(),p=null}}},Rv=function(e){for(var t=e;/)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0")):"xhtml"===s.element_format&&0k(n)?(C=_(b*y),b=_(C/y)):(b=_(C/y),C=_(b*y))),N.setStyles(D(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,N.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=b+" × "+C,f[2]<0&&s.clientWidth<=b&&N.setStyle(s,"left",g+(h-b)),f[3]<0&&s.clientHeight<=C&&N.setStyle(s,"top",p+(v-C)),(t=A.scrollWidth-x)+(n=A.scrollHeight-w)!=0&&N.setStyles(c,{left:r-t,top:o-n}),i||(wp(a,u,h,v),i=!0)},P=function(){i=!1;var e=function(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?N.setStyle(D(u),e,t):N.setAttrib(D(u),e,t))};e("width",b),e("height",C),N.unbind(S,"mousemove",B),N.unbind(S,"mouseup",P),T!==S&&(N.unbind(T,"mousemove",B),N.unbind(T,"mouseup",P)),N.remove(s),N.remove(c),o(u),Np(a,u,b,C),N.setAttrib(u,"style",N.getAttrib(u,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;I(),M(),t=N.getPos(e,A),g=t.x,p=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),O(e)&&!n.isDefaultPrevented()?E(l,function(n,e){var t;(t=N.get("mceResizeHandle"+e))&&N.remove(t),t=N.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===fe.ie&&(t.contentEditable=!1),N.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,m=t.screenY,h=D(u).clientWidth,v=D(u).clientHeight,y=v/h,(f=n).startPos={x:r*n[0]+g,y:o*n[1]+p},x=A.scrollWidth,w=A.scrollHeight,s=u.cloneNode(!0),N.addClass(s,"mce-clonedresizable"),N.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,N.setStyles(s,{left:g,top:p,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),N.bind(S,"mousemove",B),N.bind(S,"mouseup",P),T!==S&&(N.bind(T,"mousemove",B),N.bind(T,"mouseup",P)),c=N.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},h+" × "+v)}),n.elm=t,N.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+p-t.offsetHeight/2})}):I(),u.setAttribute("data-mce-selected","1")},I=function(){var e,t;for(e in M(),u&&u.removeAttribute("data-mce-selected"),l)(t=N.get("mceResizeHandle"+e))&&(N.unbind(t),N.remove(t))},L=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(E(N.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=N.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):I())},F=function(e){return Sb(function(e,t){for(;t&&t!==e;){if(Tb(t)||Sb(t))return t;t=t.parentNode}return null}(a.getBody(),e))},M=function(){for(var e in l){var t=l[e];t.elm&&(N.unbind(t.elm),delete t.elm)}},z=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){z(),fe.ie&&11<=fe.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){var t=function(e){he.setEditorTimeout(a,function(){a.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=he.throttle(function(e){a.composing||L(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",I),a.on("contextmenu",n)}),a.on("remove",M),{isResizable:O,showResizeRect:o,hideResizeRect:I,updateResizeRect:L,destroy:function(){u=s=null}}},_b=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}},Ab=function(e,t,n){var r,o,i,a,u,s=e.dom,c=s.getRoot(),l=0;if(u={elm:t,alignToTop:n},e.fire("scrollIntoView",u),!u.isDefaultPrevented()&&jo.isElement(t)){if(!1===n&&(l=t.offsetHeight),"BODY"!==c.nodeName){var f=e.selection.getScrollContainer();if(f)return r=_b(t).y-_b(f).y+l,a=f.clientHeight,void((r<(i=f.scrollTop)||i+ai.left&&a.rightr.top&&o.bottome?t.cells().length:e},0)},Ub=function(e,t){for(var n=e.rows(),r=0;r_
    ',a.startContainer===u&&a.endContainer===u?u.body.innerHTML=t:(a.deleteContents(),0===u.body.childNodes.length?u.body.innerHTML=t:a.createContextualFragment?a.insertNode(a.createContextualFragment(t)):(o=u.createDocumentFragment(),i=u.createElement("div"),o.appendChild(i),i.outerHTML=t,a.insertNode(o))),r=e.dom.get("__caret"),(a=u.createRange()).setStartBefore(r),a.setEndBefore(r),e.selection.setRng(a),e.dom.remove("__caret");try{e.selection.setRng(a)}catch(s){}}else a.item&&(u.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)},Zb=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return _.from(i).map(ar.fromDom).map(function(e){return r&&t.collapsed?e:Xr(e,o(e,a)).getOr(e)}).bind(function(e){return dr(e)?_.some(e):Vr(e)}).map(function(e){return e.dom()}).getOr(e)},eC=function(e,t,n){return Zb(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},tC=function(e,t,n){return Zb(e,t,!1,n,function(e,t){return 0t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return Ab(c,e,t)},placeCaretAt:function(e,t){return i(Ob(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?_u.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=Eb(p),t=kb(p,c),p.bookmarkManager=n,p.controlSelection=t,p};(Nb=wb||(wb={}))[Nb.Br=0]="Br",Nb[Nb.Block=1]="Block",Nb[Nb.Wrap=2]="Wrap",Nb[Nb.Eol=3]="Eol";var uC=function(e,t){return e===Tu.Backwards?t.reverse():t},sC=function(e,t,n,r){for(var o,i,a,u,s,c,l=Js(n),f=r,d=[];f&&(s=l,c=f,o=t===Tu.Forwards?s.next(c):s.prev(c));){if(jo.isBr(o.getNode(!1)))return t===Tu.Forwards?{positions:uC(t,d).concat([o]),breakType:wb.Br,breakAt:_.some(o)}:{positions:uC(t,d),breakType:wb.Br,breakAt:_.some(o)};if(o.isVisible()){if(e(f,o)){var m=(i=t,a=f,u=o,jo.isBr(u.getNode(i===Tu.Forwards))?wb.Br:!1===Ts(a,u)?wb.Block:wb.Wrap);return{positions:uC(t,d),breakType:m,breakAt:_.some(o)}}d.push(o),f=o}else f=o}return{positions:uC(t,d),breakType:wb.Eol,breakAt:_.none()}},cC=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Tu.Backwards?t.concat(e):[e].concat(t)}).getOr([])},lC=function(e,i){return j(e,function(e,o){return e.fold(function(){return _.some(o)},function(r){return ru(Z(r.getClientRects()),Z(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},_.none())},fC=function(t,e){return Z(e.getClientRects()).bind(function(e){return lC(t,e.left)})},dC=d(sC,Su.isAbove,-1),mC=d(sC,Su.isBelow,1),gC=d(cC,-1,dC),pC=d(cC,1,mC),hC=jo.isContentEditableFalse,vC=Za,yC=function(e,t,n,r){var o=e===Tu.Forwards,i=o?Lf:Ff;if(!r.collapsed){var a=vC(r);if(hC(a))return ig(e,t,a,e===Tu.Backwards,!0)}var u=Sa(r.startContainer),s=Ps(e,t.getBody(),r);if(i(s))return ag(t,s.getNode(!o));var c=Vl.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return ig(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&Fs(c,l)?ig(e,t,l.getNode(!o),o,!0):u?sg(t,c.toRange(),!0):null},bC=function(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=vC(r),o=Ps(e,t.getBody(),r),i=n(t.getBody(),ov(1),o),a=U(i,iv(1)),s=Ht.last(o.getClientRects()),(Lf(o)||zf(o))&&(d=o.getNode()),(Ff(o)||Uf(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=fv(a,c))&&hC(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),ig(e,t,u.node,l'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},xC=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Js((e=l).getBody()),o=d(Ls,r.next),i=d(Ls,r.prev),a=t?Tu.Forwards:Tu.Backwards,u=t?o:i,s=e.selection.getRng(),(n=yC(a,e,u,s))?n:(n=CC(e,a,s))||null);return!!c&&(l.selection.setRng(c),!0)}},wC=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?rv:nv,i=(e=u).selection.getRng(),(n=bC(r,e,o,i))?n:(n=CC(e,r,i))||null);return!!a&&(u.selection.setRng(a),!0)}},NC=function(r,o){return function(){var t,e=o?_u.fromRangeEnd(r.selection.getRng()):_u.fromRangeStart(r.selection.getRng()),n=o?mC(r.getBody(),e):dC(r.getBody(),e);return(o?ee(n.positions):Z(n.positions)).filter((t=o,function(e){return t?Ff(e):Lf(e)})).fold(q(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},EC=function(e,t,n,r,o){var i,a,u,s,c=Qi(ar.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),l=U((i=e,G(c,function(e){var t,n,r=(t=Ka(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:i(r),cell:e},{x:r.right,y:i(r),cell:e}]})),function(e){return t(e,o)});return(a=l,u=r,s=o,j(a,function(e,r){return e.fold(function(){return _.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-u)+Math.abs(e.y-s)),n=Math.sqrt(Math.abs(r.x-u)+Math.abs(r.y-s));return _.some(nt}),kC=function(t,n){return Z(n.getClientRects()).bind(function(e){return SC(t,e.left,e.top)}).bind(function(e){return fC((t=e,sc.lastPositionIn(t).map(function(e){return dC(t,e).positions.concat(e)}).getOr([])),n);var t})},_C=function(t,n){return ee(n.getClientRects()).bind(function(e){return TC(t,e.left,e.top)}).bind(function(e){return fC((t=e,sc.firstPositionIn(t).map(function(e){return[e].concat(mC(t,e).positions)}).getOr([])),n);var t})},AC=function(e,t){e.selection.setRng(t),Rb(e,t)},RC=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===wb.Wrap&&0===a.positions.length||!jo.isBr(n.getNode())&&(i=u).breakType===wb.Br&&1===i.positions.length?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},DC=d(RC,dC),OC=d(RC,mC),BC=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(ms()&&(o=t,i=s,a=n,u=_u.fromRangeStart(i),sc.positionIn(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=ig(c,e,n,!t,!0);return AC(e,l),!0}return!1},PC=function(e,t){var n=t.getNode(e);return jo.isElement(n)&&"TABLE"===n.nodeName?_.some(n):_.none()},IC=function(u,s,c){var e=PC(!!s,c),t=!1===s;e.fold(function(){return AC(u,c.toRange())},function(a){return sc.positionIn(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return AC(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Nl(r=u))?r.undoManager.transact(function(){var e=ar.fromTag(i);Nr(e,El(r)),Fi(e,ar.fromTag("br")),n?Ii(ar.fromDom(o),e):Pi(ar.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),AC(r,t)}):AC(r,t.toRange()));var n,r,o,t,i})})},LC=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=_u.fromRangeStart(l),d=e.getBody();if(!t&&DC(r,f)){var m=(u=d,kC(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return lC(gC(u,_u.before(s)),e.left)})}).getOr(_u.before(s)));return IC(e,t,m),!0}return!(!t||!OC(r,f))&&(o=d,m=_C(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return lC(pC(o,_u.after(i)),e.left)})}).getOr(_u.after(i)),IC(e,t,m),!0)},FC=function(t,n){return function(){return _.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return _.from(t.dom.getParent(e,"table")).map(function(e){return BC(t,n,e)})}).getOr(!1)}},MC=function(n,r){return function(){return _.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return _.from(n.dom.getParent(t,"table")).map(function(e){return LC(n,r,e,t)})}).getOr(!1)}},zC=function(e){return F(["figcaption"],lr(e))},UC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},jC=function(e,t,n){n?Fi(e,t):Li(e,t)},VC=function(e,t,n,r){return""===t?(l=e,f=r,d=ar.fromTag("br"),jC(l,d,f),UC(d)):(o=e,i=r,a=t,u=n,s=ar.fromTag(a),c=ar.fromTag("br"),Nr(s,u),Fi(s,c),jC(o,s,i),UC(c));var o,i,a,u,s,c,l,f,d},HC=function(e,t,n){return t?(o=e.dom(),mC(o,n).breakAt.isNone()):(r=e.dom(),dC(r,n).breakAt.isNone());var r,o},qC=function(t,n){var e,r,o,i=ar.fromDom(t.getBody()),a=_u.fromRangeStart(t.selection.getRng()),u=Nl(t),s=El(t);return(e=a,r=i,o=d(Mr,r),na(ar.fromDom(e.container()),Co,o).filter(zC)).exists(function(){if(HC(i,n,a)){var e=VC(i,u,s,n);return t.selection.setRng(e),!0}return!1})},$C=function(e,t){return function(){return!!e.selection.isCollapsed()&&qC(e,t)}},WC=function(e,r){return G(W(e,function(e){return Yy({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:o},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},KC=function(e){for(var t=[],n=1;n'},cx=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},lx=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)},fx=function(e,t,n){return!1===jo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===xa?0:n:n===t.data.length-1&&t.data.charAt(n)===xa?t.data.length:n},dx=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},mx=function(o,i,e){_.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(Cr(n))for(var r=0;rs.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=g&&jo.isText(s)?s.nodeValue.length:0),(u=dx(x,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,g=dx(m,r);if(!(a=m.getParent(r,m.isBlock))||!lx(m,a)){if(l=(a=a||g)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),gx(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),gx(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,E,s,i)),c=x.getParent(s,x.isBlock),l=c?x.getParent(c.parentNode,x.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||e.ctrlKey||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&x.isEmpty(c)?ux(a,S,l,c,m):m&&c===a.getBody()||(m=m||"P",Sa(c)?(r=Pa(c),x.isEmpty(c)&&sx(c),gx(a,r),QC(a,r)):T()?k():T(!0)?(r=c.parentNode.insertBefore(S(),c),QC(a,cx(c,"HR")?r:c)):((t=(b=E,C=b.cloneRange(),C.setStart(b.startContainer,fx(!0,b.startContainer,b.startOffset)),C.setEnd(b.endContainer,fx(!1,b.endContainer,b.endOffset)),C).cloneRange()).setEndAfter(c),o=t.extractContents(),y=o,z(Ji(ar.fromDom(y),mr),function(e){var t=e.dom();t.nodeValue=wa(t.nodeValue)}),function(e){for(;jo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,x.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;jo.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=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(x,N,r),p=x,(h=c).normalize(),(v=h.lastChild)&&!/^(left|right)$/gi.test(p.getStyle(v,"float",!0))||p.add(h,"br"),x.isEmpty(c)&&sx(c),r.normalize(),x.isEmpty(r)?(x.remove(r),k()):(gx(a,r),QC(a,r))),x.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},hx=function(e,t){return ex(e).filter(function(e){return 0",yl(f)!==f.documentBaseUrl&&(g+=''),g+='',d=bl(f),m=Cl(f),xl(f)&&(g+=''),g+='
    '),Cw.add(t.iframeContainer,l),p},ww=function(e,t){var n=xw(e,t);t.editorContainer&&(Cw.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Cw.isHidden(t.editorContainer)),e.getElement().style.display="none",Cw.setAttrib(e.id,"aria-hidden","true"),n||bw(e)},Nw=Si.DOM,Ew=function(t,n,e){var r=Eh.get(e),o=Eh.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=Xt.trim(e),r&&-1===Xt.inArray(n,e)){if(Xt.each(Eh.dependencies(e),function(e){Ew(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(iE){Nh.pluginInitError(t,e,iE)}}},Sw=function(e){return e.replace(/^\-/,"")},Tw=function(e){return{editorContainer:e,iframeContainer:e}},kw=function(e){var t,n,r=e.getElement();return e.inline?Tw(null):(t=r,n=Nw.create("div"),Nw.insertAfter(n,t),Tw(n))},_w=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.getElement();return e.orgDisplay=m.style.display,S(d.theme)?(l=(o=e).settings,f=o.getElement(),i=l.width||Nw.getStyle(f,"width")||"100%",a=l.height||Nw.getStyle(f,"height")||f.offsetHeight,u=l.min_height||100,(s=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),s.test(""+a)&&(a=Math.max(parseInt(a,10),u)),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]*>( | |\\s|\xa0|
    |)<\\/"+a+">[\r\n]*|
    [\r\n]*)$"),r=i.replace(u,"")}return"text"===t.format||Ao(ar.fromDom(n))?t.content=r:t.content=Xt.trim(r),t.no_events||e.fire("GetContent",t),t.content},jw=function(e,t){t(e),e.firstChild&&jw(e.firstChild,t),e.next&&jw(e.next,t)},Vw=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&jw(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Hw=function(e){return e instanceof ob},qw=function(e,t){var r;e.dom.setHTML(e.getBody(),t),oh(r=e)&&sc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=jo.isTable(t)?sc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},$w=function(u,s,c){return void 0===c&&(c={}),c.format=c.format?c.format:"html",c.set=!0,c.content=Hw(s)?"":s,Hw(s)||c.no_events||(u.fire("BeforeSetContent",c),s=c.content),_.from(u.getBody()).fold(q(s),function(e){return Hw(s)?function(e,t,n,r){Vw(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=al({validate:e.validate},e.schema).serialize(n);return r.content=Ao(ar.fromDom(t))?o:Xt.trim(o),qw(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,c):(t=u,n=e,o=c,0===(r=s).length||/^\s+$/.test(r)?(a='
    ',"TABLE"===n.nodeName?r="
    "+a+"
    1
    + // 4.9.11 (2020-07-13)
    2
    + !function(V){"use strict";var o=function(){},H=function(n,r){return function(){for(var e=[],t=0;t+~]|"+at+")"+at+"*"),mt=new RegExp("="+at+"*([^\\]'\"]*?)"+at+"*\\]","g"),gt=new RegExp(ct),pt=new RegExp("^"+ut+"$"),ht={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+at+"*(even|odd|(([+-]|)(\\d*)n|)"+at+"*(?:([+-]|)"+at+"*(\\d+)|))"+at+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+at+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+at+"*((?:-\\d)?\\d*)"+at+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/^[^{]+\{\s*\[native \w/,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,wt=/'|\\/g,Nt=new RegExp("\\\\([\\da-f]{1,6}"+at+"?|("+at+")|.)","ig"),Et=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{rt.apply(et=ot.call($e.childNodes),$e.childNodes),et[$e.childNodes.length].nodeType}catch(iE){rt={apply:et.length?function(e,t){nt.apply(e,ot.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var St=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,m;if((t?t.ownerDocument||t:$e)!==Me&&Fe(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Me).nodeType)&&9!==u)return[];if(Ue&&!r){if(o=Ct.exec(e))if(a=o[1]){if(9===u){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))&&He(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return rt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&ke.getElementsByClassName)return rt.apply(n,t.getElementsByClassName(a)),n}if(ke.qsa&&(!je||!je.test(e))){if(f=l=qe,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(c=De(e),(l=t.getAttribute("id"))?f=l.replace(wt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Pt(c[s]);d=xt.test(e)&&Ot(t.parentNode)||t,m=c.join(",")}if(m)try{return rt.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||t.removeAttribute("id")}}}return Be(e.replace(lt,"$1"),t,n,r)};function Tt(){var r=[];return function e(t,n){return r.push(t+" ")>_e.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function kt(e){return e[qe]=!0,e}function _t(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function At(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Rt(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Dt(a){return kt(function(i){return i=+i,kt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Ot(e){return e&&typeof e.getElementsByTagName!==Qe&&e}for(Te in ke=St.support={},Re=St.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Fe=St.setDocument=function(e){var t,s=e?e.ownerDocument||e:$e,n=s.defaultView;return s!==Me&&9===s.nodeType&&s.documentElement?(ze=(Me=s).documentElement,Ue=!Re(s),n&&n!==function(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Fe()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Fe()})),ke.attributes=!0,ke.getElementsByTagName=!0,ke.getElementsByClassName=bt.test(s.getElementsByClassName),ke.getById=!0,_e.find.ID=function(e,t){if(typeof t.getElementById!==Qe&&Ue){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_e.filter.ID=function(e){var t=e.replace(Nt,Et);return function(e){return e.getAttribute("id")===t}},_e.find.TAG=ke.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==Qe)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},_e.find.CLASS=ke.getElementsByClassName&&function(e,t){if(Ue)return t.getElementsByClassName(e)},Ve=[],je=[],ke.disconnectedMatch=!0,je=je.length&&new RegExp(je.join("|")),Ve=Ve.length&&new RegExp(Ve.join("|")),t=bt.test(ze.compareDocumentPosition),He=t||bt.test(ze.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},Je=t?function(e,t){if(e===t)return Le=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!ke.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===$e&&He($e,e)?-1:t===s||t.ownerDocument===$e&&He($e,t)?1:Ie?it.call(Ie,e)-it.call(Ie,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Le=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Ie?it.call(Ie,e)-it.call(Ie,t):0;if(o===i)return _t(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?_t(a[r],u[r]):a[r]===$e?-1:u[r]===$e?1:0},s):Me},St.matches=function(e,t){return St(e,null,null,t)},St.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Me&&Fe(e),t=t.replace(mt,"='$1']"),ke.matchesSelector&&Ue&&(!Ve||!Ve.test(t))&&(!je||!je.test(t)))try{var n=(void 0).call(e,t);if(n||ke.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(iE){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Nt,Et),e[3]=(e[3]||e[4]||e[5]||"").replace(Nt,Et),"~="===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]||St.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]&&St.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&>.test(n)&&(t=De(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(Nt,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Xe[e+" "];return t||(t=new RegExp("(^|"+at+")"+e+"("+at+"|$)"))&&Xe(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Qe&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=St.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1)[^>]*$|#([\w\-]*)$)/,Zt=Se.Event,en=Xt.makeMap("children,contents,next,prev"),tn=function(e){return void 0!==e},nn=function(e){return"string"==typeof e},rn=function(e,t){var n,r,o;for(o=(t=t||Yt).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},on=function(e,t,n,r){var o;if(nn(t))t=rn(t,bn(e[0]));else if(t.length&&!t.nodeType){if(t=gn.makeArray(t),r)for(o=t.length-1;0<=o;o--)on(e,t[o],n,r);else for(o=0;o"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Qt.exec(e)))return gn(t).find(e);if(n[1])for(r=rn(e,bn(t)).firstChild;r;)Gt.call(o,r),r=r.nextSibling;else{if(!(r=bn(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 Xt.toArray(this)},add:function(e,t){var n,r,o=this;if(nn(e))return o.add(gn(e));if(!1!==t)for(n=gn.unique(o.toArray().concat(gn.makeArray(e))),o.length=n.length,r=0;r=a.length&&r(o)}))})})},co=function(e){return so(e,uo.nu)},lo=function(n){return{is:function(e){return n===e},isValue:C,isError:b,getOr:q(n),getOrThunk:q(n),getOrDie:q(n),or:function(e){return lo(n)},orThunk:function(e){return lo(n)},fold:function(e,t){return t(n)},map:function(e){return lo(e(n))},mapError:function(e){return lo(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return _.some(n)}}},fo=function(n){return{is:b,isValue:b,isError:C,getOr:$,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return fo(n)},mapError:function(e){return fo(e(n))},each:o,bind:function(e){return fo(n)},exists:b,forall:C,toOption:_.none}},mo={value:lo,error:fo,fromOption:function(e,t){return e.fold(function(){return fo(t)},lo)}};function go(e,u){var t=e,n=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==u){if(o=e[n])return o;for(i=e.parentNode;i&&i!==u;i=i.parentNode)if(o=i[n])return o}}};this.current=function(){return t},this.next=function(e){return t=n(t,"firstChild","nextSibling",e)},this.prev=function(e){return t=n(t,"lastChild","previousSibling",e)},this.prev2=function(e){return t=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],u&&o===u)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==u)return i}}(t,"lastChild","previousSibling",e)}}var po,ho,vo,yo=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ko=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xo=/[<>&\"\']/g,Yo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Go={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"};ho={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},vo={"<":"<",">":">","&":"&",""":'"',"'":"'"};var Jo=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):Go[t]||String.fromCharCode(t):vo[e]||po[e]||(n=e,(r=ar.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},ni={},ri={},oi=Xt.makeMap,ii=Xt.each,ai=Xt.extend,ui=Xt.explode,si=Xt.inArray,ci=function(e,t){return(e=Xt.trim(e))?e.split(t||" "):[]},li=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n
    ').css(n).appendTo(a)[0];return c.set(_.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&gn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:l,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;}"},reposition:function(){c.get().each(function(e){var t=fs(a,e.element,e.before);gn(e.caret).css(t)})},destroy:function(){return he.clearInterval(t)}}},ms=function(){return cs.isIE()||cs.isEdge()||cs.isFirefox()},gs=function(e){return ls(e)||jo.isTable(e)&&ms()},ps=jo.isContentEditableFalse,hs=jo.matchStyleValues("display","block table table-cell table-caption list-item"),vs=ka,ys=Sa,bs=jo.isElement,Cs=Ha,xs=function(e){return 0=o.data.length-1)return 1===e&&(r=s(o))?Rs(r):n;if(Oa(o)&&i<=1)return-1===e&&(r=u(o))?Ds(r):n;if(i===o.data.length)return(r=s(o))?Rs(r):n;if(0===i)return(r=u(o))?Ds(r):n}return n},Bs=function(e,t){return _.from(ks(e?0:-1,t)).filter(ps)},Ps=function(e,t,n){var r=Os(e,t,n);return-1===e?Su.fromRangeStart(r):Su.fromRangeEnd(r)},Is=function(e){return _.from(e.getNode()).map(ar.fromDom)},Ls=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Fs=function(e,t){var n=Ts(e,t);return!(n||!jo.isBr(e.getNode()))||n};(ku=Tu||(Tu={}))[ku.Backwards=-1]="Backwards",ku[ku.Forwards=1]="Forwards";var Ms,zs,Us,js=jo.isContentEditableFalse,Vs=jo.isText,Hs=jo.isElement,qs=jo.isBr,$s=Ha,Ws=function(e){return Ua(e)||!!qa(t=e)&&!0!==j(te(t.getElementsByTagName("*")),function(e,t){return e||Ia(t)},!1);var t},Ks=$a,Xs=function(e,t){return e.hasChildNodes()&&tu.length-1)return!!fc(c,i,r)||lc(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},mc=function(e){return jo.isText(e)&&0=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===m&&0h.length-1?p=h.length-1:p<0&&(p=0),d=h[p]||g),l===d)return o(v([l]));for(n=e.findCommonAncestor(l,d),a=l;a;a=a.parentNode){if(a===d)return C(l,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===l)return C(d,n);if(a===n)break}r=b(l,n)||l,i=b(d,n)||d,C(l,r,!0),(s=y(r===l?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(s)),C(d,i)}},Fc=(Ms=mr,zs="text",{get:function(e){if(!Ms(e))throw new Error("Can only get "+zs+" value of a "+zs+" node");return Us(e).getOr("")},getOption:Us=function(e){return Ms(e)?_.from(e.dom().nodeValue):_.none()},set:function(e,t){if(!Ms(e))throw new Error("Can only set raw "+zs+" value of a "+zs+" node");e.dom().nodeValue=t}}),Mc=function(e){return Fc.get(e)},zc=function(r,o,i,a){return Vr(o).fold(function(){return"skipping"},function(e){return"br"===a||mr(n=o)&&"\ufeff"===Mc(n)?"valid":dr(t=o)&&Gi(t,aa())?"existing":Ju(o)?"caret":wc.isValid(r,i,a)&&wc.isValid(r,lr(e),i)?"valid":"invalid-child";var t,n})},Uc=function(e,t,n,r){var o,i,a=t.uid,u=void 0===a?(o="mce-annotation",i=(new Date).getTime(),o+"_"+Math.floor(1e9*Math.random())+ ++ga+String(i)):a,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o=n.startOffset&&"\xa0"===n.startContainer.nodeValue[n.startOffset]),t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),e.selection.setRng(t)),s.selection.getRng().collapsed){var i=Uc(s.getDoc(),f,c,l.decorate);ya(i,"\xa0"),s.selection.getRng().insertNode(i.dom()),s.selection.select(i.dom())}else{var a=Yu.getPersistentBookmark(s.selection,!1),u=s.selection.getRng();jc(s,u,c,l.decorate,f),s.selection.moveToBookmark(a)}})};function Hc(s){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?_.from(n[e]).map(function(e){return e.settings}):_.none()}});da(s,r);var o=fa(s);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){Vc(s,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){ca(s,_.some(e)).each(function(e){var t=e.elements;z(t,ji)})},getAll:function(e){var t,n,r,o,i,a,u=(t=s,n=e,r=ar.fromDom(t.getBody()),o=Qi(r,"["+ua()+'="'+n+'"]'),i={},z(o,function(e){var t=Er(e,sa()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return a=function(e){return W(e,function(e){return e.dom()})},vr(u,function(e,t){return{k:t,v:a(e,t)}})}}}var qc=function(e){return Xt.grep(e.childNodes,function(e){return"LI"===e.nodeName})},$c=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&("\xa0"===(t=e.firstChild).data||jo.isBr(t));var t},Wc=function(e){return 0'))},rl=function(n){Gr(n).each(function(t){Hr(t).each(function(e){Co(n)&&wo(t)&&Co(e)&&Ui(t)})})},ol=Xt.makeMap;function il(e){var u,s,c,l,f,d=[];return u=(e=e||{}).indent,s=ol(e.indent_before||""),c=ol(e.indent_after||""),l=ti.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0":" />",n&&u&&c[e]&&0"),u&&c[e]&&0")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push(""):d.push(""),u&&d.push("\n")},doctype:function(e){d.push("",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}}function al(t,g){void 0===g&&(g=di());var p=il(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(e){var f,d;d=t.validate,f={3:function(e){p.text(e.value,e.raw)},8:function(e){p.comment(e.value)},7:function(e){p.pi(e.name,e.value)},10:function(e){p.doctype(e.value)},4:function(e){p.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},p.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1|)$/," "):o("nextSibling")||(t=t.replace(/( | )(
    |)$/," "))),t}(g.getRng(),t)),r=e.parser,m=n.merge,o=al({validate:e.settings.validate},e.schema),d='​',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,x,w=(l=g.getRng()).startContainer||(l.parentElement?l.parentElement():null),N=e.getBody();w===N&&g.isCollapsed()&&p.isBlock(N.firstChild)&&(h=e,(v=N.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&p.isEmpty(N.firstChild)&&((l=p.createRng()).setStart(N.firstChild,0),l.setEnd(N.firstChild,0),g.setRng(l)),g.isCollapsed()||(e.selection.setRng(cl(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),y=e.selection.getRng(),b=t,C=y.startContainer,x=y.startOffset,3===C.nodeType&&y.collapsed&&("\xa0"===C.data[x]?(C.deleteData(x,1),/[\u00a0| ]$/.test(b)||(b+=" ")):"\xa0"===C.data[x-1]&&(C.deleteData(x-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var E,S,T,k={context:(i=g.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,k),!0===n.paste&&Gc(e.schema,u)&&Qc(p,i))return l=Jc(o,p,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!p.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),k.invalid){for(fl(e,d),i=g.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:p.getOuterHTML(i),t=o.serialize(r.parse(t.replace(//i,function(){return o.serialize(u)}))),i===a?p.setHTML(a,t):p.setOuterHTML(i,t)}else!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):fl(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new el(r);Xt.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),fe.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),ll(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=_u.fromRangeStart(e);if(t=Js(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,p.get("mce_marker")),E=e.getBody(),Xt.each(E.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),S=e.dom,T=e.selection.getStart(),_.from(S.getParent(T,"td,th")).map(ar.fromDom).each(rl),e.fire("SetContent",s),e.addVisual()}},ml=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=Xt.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};dl(e,o.content,o.details)},gl=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,pl=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n}return r},hl=function(e){return e.getParam("iframe_attrs",{})},vl=function(e){return e.getParam("doctype","")},yl=function(e){return e.getParam("document_base_url","")},bl=function(e){return pl(e,"body_id","tinymce")},Cl=function(e){return pl(e,"body_class","")},xl=function(e){return e.getParam("content_security_policy","")},wl=function(e){return e.getParam("br_in_pre",!0)},Nl=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":t},El=function(e){return e.getParam("forced_root_block_attrs",{})},Sl=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Tl=function(e){return e.getParam("no_newline_selector","")},kl=function(e){return e.getParam("keep_styles",!0)},_l=function(e){return e.getParam("end_container_on_empty_block",!1)},Al=function(e){return Xt.explode(e.getParam("font_size_style_values",""))},Rl=function(e){return Xt.explode(e.getParam("font_size_classes",""))},Dl=function(e){return e.getParam("images_dataimg_filter",q(!0),"function")},Ol=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Bl=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Pl=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Il=function(e){return e.getParam("images_upload_url","","string")},Ll=function(e){return e.getParam("images_upload_base_path","","string")},Fl=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Ml=function(e){return e.getParam("images_upload_handler",null,"function")},zl=function(e){return e.getParam("content_css_cors",!1,"boolean")},Ul=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},jl=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Ta(n)?jo.isText(n.nextSibling)?_u(n.nextSibling,0):_u.after(n):Aa(t)?_u(n,r+1):t:Ta(n)?jo.isText(n.previousSibling)?_u(n.previousSibling,n.previousSibling.data.length):_u.before(n):Ra(t)?_u(n,r-1):t},Vl={isInlineTarget:function(e,t){return Lr(ar.fromDom(t),Ul(e))},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,U(Si.DOM.getParents(i.container(),"*",o),r));return _.from(a[a.length-1])},isRtl:function(e){return"rtl"===Si.DOM.getStyle(e,"direction",!0)||(t=e.textContent,gl.test(t));var t},isAtZwsp:function(e){return Aa(e)||Ra(e)},normalizePosition:jl,normalizeForwards:d(jl,!0),normalizeBackwards:d(jl,!1),hasSameParentBlock:function(e,t,n){var r=Ss(t,e),o=Ss(n,e);return r&&r===o}},Hl=function(e,t){return zr(e,t)?na(t,function(e){return No(e)||So(e)},(n=e,function(e){return Mr(n,ar.fromDom(e.dom().parentNode))})):_.none();var n},ql=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))},$l=function(i,a,u){return ru(sc.firstPositionIn(u),sc.lastPositionIn(u),function(e,t){var n=Vl.normalizePosition(!0,e),r=Vl.normalizePosition(!1,t),o=Vl.normalizePosition(!1,a);return i?sc.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):sc.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},Wl=function(e,t){var n,r,o,i=ar.fromDom(e),a=ar.fromDom(t);return n=a,r="pre,code",o=d(Mr,i),ra(n,r,o).isSome()},Kl=function(e,t){return Ha(t)&&!1===(r=e,o=t,jo.isText(o)&&/^[ \t\r\n]*$/.test(o.data)&&!1===Wl(r,o))||(n=t,jo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||Xl(t);var n,r,o},Xl=jo.hasAttribute("data-mce-bookmark"),Yl=jo.hasAttribute("data-mce-bogus"),Gl=jo.hasAttributeValue("data-mce-bogus","all"),Jl=function(e){return function(e){var t,n,r=0;if(Kl(e,e))return!1;if(!(n=e.firstChild))return!0;t=new go(n,e);do{if(Gl(n))n=t.next(!0);else if(Yl(n))n=t.next();else if(jo.isBr(n))r++,n=t.next();else{if(Kl(e,n))return!1;n=t.next()}}while(n);return r<=1}(e.dom())},Ql=Ar("block","position"),Zl=Ar("from","to"),ef=function(e,t){var n=ar.fromDom(e),r=ar.fromDom(t.container());return Hl(n,r).map(function(e){return Ql(e,t)})},tf=function(o,i,e){var t=ef(o,_u.fromRangeStart(e)),n=t.bind(function(e){return sc.fromPosition(i,o,e.position()).bind(function(e){return ef(o,e).map(function(e){return t=o,n=i,r=e,jo.isBr(r.position().getNode())&&!1===Jl(r.block())?sc.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?sc.fromPosition(n,t,e).bind(function(e){return ef(t,e)}):_.some(r)}).getOr(r):r;var t,n,r})})});return ru(t,n,Zl).filter(function(e){return!1===Mr((r=e).from().block(),r.to().block())&&Vr((n=e).from().block()).bind(function(t){return Vr(n.to().block()).filter(function(e){return Mr(t,e)})}).isSome()&&(t=e,!1===jo.isContentEditableFalse(t.from().block().dom())&&!1===jo.isContentEditableFalse(t.to().block().dom()));var t,n,r})},nf=function(e,t,n){return n.collapsed?tf(e,t,n):_.none()},rf=function(e,t,n){return zr(t,e)?function(e,t){for(var n=D(t)?t:b,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=ar.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||Mr(e,t)}).slice(0,-1):[]},of=function(e,t){return rf(e,t,q(!1))},af=of,uf=function(e,t){return[e].concat(of(e,t))},sf=function(e){var t,n=(t=Kr(e),Y(t,Co).fold(function(){return t},function(e){return t.slice(0,e)}));return z(n,Ui),n},cf=function(e,t){var n=uf(t,e);return X(n.reverse(),Jl).each(Ui)},lf=function(e,t,n,r){if(Jl(n))return nl(n),sc.firstPositionIn(n.dom());0===U($r(r),function(e){return!Jl(e)}).length&&Jl(t)&&Pi(r,ar.fromTag("br"));var o=sc.prevPosition(n.dom(),_u.before(r.dom()));return z(sf(t),function(e){Pi(r,e)}),cf(e,t),o},ff=function(e,t,n){if(Jl(n))return Ui(n),Jl(t)&&nl(t),sc.firstPositionIn(t.dom());var r=sc.lastPositionIn(n.dom());return z(sf(t),function(e){Fi(n,e)}),cf(e,t),r},df=function(e,t){return zr(t,e)?(n=uf(e,t),_.from(n[n.length-1])):_.none();var n},mf=function(e,t){sc.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(ar.fromDom).filter(wo).each(Ui)},gf=function(e,t,n){return mf(!0,t),mf(!1,n),df(t,n).fold(d(ff,e,t,n),d(lf,e,t,n))},pf=function(e,t,n,r){return t?gf(e,r,n):gf(e,n,r)},hf=function(t,n){var e,r=ar.fromDom(t.getBody());return(e=nf(r.dom(),n,t.selection.getRng()).bind(function(e){return pf(r,n,e.from().block(),e.to().block())})).each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},vf=function(e,t){var n=ar.fromDom(t),r=d(Mr,e);return ta(n,_o,r).isSome()},yf=function(e,t){var n,r,o=sc.prevPosition(e.dom(),_u.fromRangeStart(t)).isNone(),i=sc.nextPosition(e.dom(),_u.fromRangeEnd(t)).isNone();return!(vf(n=e,(r=t).startContainer)||vf(n,r.endContainer))&&o&&i},bf=function(e){var n,r,o,t,i=ar.fromDom(e.getBody()),a=e.selection.getRng();return yf(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),ru(Hl(n,ar.fromDom(o.startContainer)),Hl(n,ar.fromDom(o.endContainer)),function(e,t){return!1===Mr(e,t)&&(o.deleteContents(),pf(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},Cf=function(e,t){return!e.selection.isCollapsed()&&bf(e)},xf=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=gr(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,j((r=a).split(""),function(e,t){return-1!==" \f\n\r\t\x0B".indexOf(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},Wf=function(e,t){var n,r=e.data.slice(t),o=r.length-(n=r,n.replace(/^\s+/g,"")).length;return $f(e,t,o)},Kf=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===_u.isTextPosition(n)&&o===r.parentNode&&i>_u.before(r).offset()?_u(t.container(),t.offset()-1):t;var n,r,o,i},Xf=function(e){return Ha(e.previousSibling)?_.some((t=e.previousSibling,jo.isText(t)?_u(t,t.data.length):_u.after(t))):e.previousSibling?sc.lastPositionIn(e.previousSibling):_.none();var t},Yf=function(e){return Ha(e.nextSibling)?_.some((t=e.nextSibling,jo.isText(t)?_u(t,0):_u.before(t))):e.nextSibling?sc.firstPositionIn(e.nextSibling):_.none();var t},Gf=function(r,o){return Xf(o).orThunk(function(){return Yf(o)}).orThunk(function(){return e=r,t=o,n=_u.before(t.previousSibling?t.previousSibling:t.parentNode),sc.prevPosition(e,n).fold(function(){return sc.nextPosition(e,_u.after(t))},_.some);var e,t,n})},Jf=function(n,r){return Yf(r).orThunk(function(){return Xf(r)}).orThunk(function(){return e=n,t=r,sc.nextPosition(e,_u.after(t)).fold(function(){return sc.prevPosition(e,_u.before(t))},_.some);var e,t})},Qf=function(e,t,n){return(r=e,o=t,i=n,r?Jf(o,i):Gf(o,i)).map(d(Kf,n));var r,o,i},Zf=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},ed=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(lr(t))},td=function(e){if(Jl(e)){var t=ar.fromHtml('
    ');return zi(e),Fi(e,t),_.some(_u.before(t.dom()))}return _.none()},nd=function(e,t,l){var n,r,o,i,a=Hr(e).filter(mr),u=qr(e).filter(mr);return Ui(e),(n=a,r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Jn((r=u).data).length,r.appendData(o.data),Ui(ar.fromDom(o)),i&&Wf(r,a),n.container()===s?_u(u,c):n},n.isSome()&&r.isSome()&&o.isSome()?_.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):_.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Jn(r).length,$f(t,n-o,o);var t,n,r,o}),u.each(function(e){return Wf(e.dom(),0)})),t})},rd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=Qf(n,t.getBody(),e.dom()),u=ta(e,d(ed,t),(o=t.getBody(),function(e){return e.dom()===o})),s=nd(e,a,(i=e,br(t.schema.getTextInlineElements(),lr(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(td).fold(function(){r&&Zf(t,n,s)},function(e){r&&Zf(t,n,_.some(e))})},od=function(a,u){var e,t,n,r,o,i;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Os(t?1:-1,e,n),o=_u.fromRangeStart(r),i=ar.fromDom(e),!1===t&&Ff(o)?_.some(jf.remove(o.getNode(!0))):t&&Lf(o)?_.some(jf.remove(o.getNode())):!1===t&&Lf(o)&&Sf(i,o)?Tf(i,o).map(function(e){return jf.remove(e.getNode())}):t&&Ff(o)&&Ef(i,o)?kf(i,o).map(function(e){return jf.remove(e.getNode())}):qf(e,t,o)).map(function(e){return e.fold((o=a,i=u,function(e){return o._selectionOverrides.hideFakeCaret(),rd(o,i,ar.fromDom(e)),!0}),(n=a,r=u,function(e){var t=r?_u.before(e):_u.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},id=function(e,t){var n,r=e.selection.getNode();return!!jo.isContentEditableFalse(r)&&(n=ar.fromDom(e.getBody()),z(Qi(n,".mce-offscreen-selection"),Ui),rd(e,t,ar.fromDom(e.selection.getNode())),ql(e),!0)},ad=function(e,t){return e.selection.isCollapsed()?od(e,t):id(e,t)},ud=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(jo.isContentEditableTrue(t)||jo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return jo.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(_u.before(t).toRange())),!0},sd=jo.isText,cd=function(e){return sd(e)&&e.data[0]===xa},ld=function(e){return sd(e)&&e.data[e.data.length-1]===xa},fd=function(e){return e.ownerDocument.createTextNode(xa)},dd=function(e,t){return e?function(e){if(sd(e.previousSibling))return ld(e.previousSibling)||e.previousSibling.appendData(xa),e.previousSibling;if(sd(e))return cd(e)||e.insertData(0,xa),e;var t=fd(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(sd(e.nextSibling))return cd(e.nextSibling)||e.nextSibling.insertData(0,xa),e.nextSibling;if(sd(e))return ld(e)||e.appendData(xa),e;var t=fd(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},md=d(dd,!0),gd=d(dd,!1),pd=function(e,t){return jo.isText(e.container())?dd(t,e.container()):dd(t,e.getNode())},hd=function(e,t){var n=t.get();return n&&e.container()===n&&Ta(n)},vd=function(n,e){return e.fold(function(e){ss.remove(n.get());var t=md(e);return n.set(t),_.some(_u(t,t.length-1))},function(e){return sc.firstPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),1);ss.remove(n.get());var t=pd(e,!0);return n.set(t),_u(t,1)})},function(e){return sc.lastPositionIn(e).map(function(e){if(hd(e,n))return _u(n.get(),n.get().length-1);ss.remove(n.get());var t=pd(e,!1);return n.set(t),_u(t,t.length-1)})},function(e){ss.remove(n.get());var t=gd(e);return n.set(t),_.some(_u(t,1))})},yd=function(e,t){for(var n=0;ni.left&&a.rightr.top&&o.bottomo.childNodes.length-1&&(c=!1),jo.isDocument(o)&&(o=g,i=0),o===g){if(c&&(u=o.childNodes[0s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,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),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(e,t,n){for(var r,o=new go(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0")},mceToggleVisualAid:function(){s.hasVisual=!s.hasVisual,s.addVisual()},mceReplaceContent:function(e,t,n){s.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=o.getParent(i.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=o.getParent(i.getStart(),jo.isContentEditableTrue);if(e){var t=o.createRng();t.selectNodeContents(e),i.setRng(t)}},"delete":function(){hg(s)},forwardDelete:function(){vg(s)},mceNewDocument:function(){s.setContent("")},InsertLineBreak:function(e,t,n){return jg(s,n),!0}});var p=function(n){return function(){var e=i.isCollapsed()?[o.getParent(i.getNode(),o.isBlock)]:i.getSelectedBlocks(),t=mp(e,function(e){return!!a.matchNode(e,n)});return-1!==gp(t,!0)}};e({JustifyLeft:p("alignleft"),JustifyCenter:p("aligncenter"),JustifyRight:p("alignright"),JustifyFull:p("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return f(e)},mceBlockQuote:function(){return f("blockquote")},Outdent:function(){var e;if(n.inline_styles){if((e=o.getParent(i.getStart(),o.isBlock))&&0"),u))[o.length-1]=Xt.extend(o[o.length-1],{func:n,scope:r||i}),Xt.extend(o[0],{desc:i.translate(t),subpatterns:o.slice(1)})},o=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)},c=function(e){return e.func?e.func.call(e.scope):null};i.on("keyup keypress keydown",function(t){var e,n;((n=t).altKey||n.ctrlKey||n.metaKey||"keydown"===(e=t).type&&112<=e.keyCode&&e.keyCode<=123)&&!t.isDefaultPrevented()&&(Xp(a,function(e){if(o(t,e))return r=e.subpatterns.slice(0),"keydown"===t.type&&c(e),!0}),o(t,r[0])&&(1===r.length&&"keydown"===t.type&&c(r[0]),r.shift()))}),this.add=function(e,n,r,o){var t;return"string"==typeof(t=r)?r=function(){i.execCommand(t,!1,null)}:Xt.isArray(t)&&(r=function(){i.execCommand(t[0],t[1],t[2])}),Xp(Yp(Xt.trim(e.toLowerCase())),function(e){var t=s(e,n,r,o);a[t.id]=t}),!0},this.remove=function(e){var t=s(e);return!!a[t.id]&&(delete a[t.id],!0)}}var Zp=function(e){var t=Ur(e).dom();return e.dom()===t.activeElement},eh=function(t){return(e=Ur(t),n=e!==undefined?e.dom():V.document,_.from(n.activeElement).map(ar.fromDom)).filter(function(e){return t.dom().contains(e.dom())});var e,n},th=function(t,e){return(n=e,n.collapsed?_.from(eu(n.startContainer,n.startOffset)).map(ar.fromDom):_.none()).bind(function(e){return ko(e)?_.some(e):!1===zr(t,e)?_.some(t):_.none()});var n},nh=function(t,e){th(ar.fromDom(t.getBody()),e).bind(function(e){return sc.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},rh=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},oh=function(e){var t,n=e.getBody();return n&&(t=ar.fromDom(n),Zp(t)||eh(t).isSome())},ih=function(e){return e.inline?oh(e):(t=e).iframeElement&&Zp(ar.fromDom(t.iframeElement));var t},ah=function(e){return e.editorManager.setActive(e)},uh=function(e,t){e.removed||(t?ah(e):function(t){var e=t.selection,n=t.settings.content_editable,r=t.getBody(),o=e.getRng();t.quirks.refreshContentEditable();var i,a,u=(i=t,a=e.getNode(),i.dom.getParent(a,function(e){return"true"===i.dom.getContentEditable(e)}));if(t.$.contains(r,u))return rh(u),nh(t,o),ah(t);t.bookmark!==undefined&&!1===ih(t)&&up(t).each(function(e){t.selection.setRng(e),o=e}),n||(fe.opera||rh(r),t.getWin().focus()),(fe.gecko||n)&&(rh(r),nh(t,o)),ah(t)}(e))},sh=ih,ch=function(e,t){return t.dom()[e]},lh=function(e,t){return parseInt(kr(t,e),10)},fh=d(ch,"clientWidth"),dh=d(ch,"clientHeight"),mh=d(lh,"margin-top"),gh=d(lh,"margin-left"),ph=function(e,t,n){var r,o,i,a,u,s,c,l,f,d,m,g=ar.fromDom(e.getBody()),p=e.inline?g:(r=g,ar.fromDom(r.dom().ownerDocument.documentElement)),h=(o=e.inline,a=t,u=n,s=(i=p).dom().getBoundingClientRect(),{x:a-(o?s.left+i.dom().clientLeft+gh(i):0),y:u-(o?s.top+i.dom().clientTop+mh(i):0)});return l=h.x,f=h.y,d=fh(c=p),m=dh(c),0<=l&&0<=f&&l<=d&&f<=m},hh=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,_.from(t).map(ar.fromDom)).map(function(e){return zr(Ur(e),e)}).getOr(!1)};function vh(n){var t,o=[],i=function(){var e,t=n.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},a=function(){0t;var t}},cv=function(n){return function(e){return t=n,e.line===t;var t}},lv=jo.isContentEditableFalse,fv=Es,dv=function(e,t){return Math.abs(e.left-t)},mv=function(e,t){return Math.abs(e.right-t)},gv=function(e,t){return e>=t.left&&e<=t.right},pv=function(e,o){return Ht.reduce(e,function(e,t){var n,r;return n=Math.min(dv(e,o),mv(e,o)),r=Math.min(dv(t,o),mv(t,o)),gv(o,t)?t:gv(o,e)?e:r===n&&lv(t.node)?t:r=e.top&&n<=e.bottom});return(r=pv(f,t))&&(r=pv((a=e,c=function(t,e){var n;return n=U(ov([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),hv(tv.Up,a,d(c,Ga),u.node),hv(tv.Down,a,d(c,Ja),u.node),s),t))&&gs(r.node)?(i=t,{node:(o=r).node,before:dv(o,i)i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}},o=Sv(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Tv(u)},(s=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)})},_v=function(e){var n;kv(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(xv(t)||xv(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},Av=function(t){var e=Vi(function(){if(!t.removed&&t.selection.getRng().collapsed){var e=fg(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Rv=jo.isContentEditableTrue,Dv=jo.isContentEditableFalse,Ov=function(e,t){for(var n=e.getBody();t&&t!==n;){if(Rv(t)||Dv(t))return t;t=t.parentNode}return null},Bv=function(g){var p,e,t,a=g.getBody(),o=ds(g.getBody(),function(e){return g.dom.isBlock(e)},function(){return sh(g)}),h="sel-"+g.dom.uniqueId(),u=function(e){e&&g.selection.setRng(e)},s=function(){return g.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},y=function(e,t){return t=Os(e,a,t),-1===e?_u.fromRangeStart(t):_u.fromRangeEnd(t)},n=function(e){return ka(e)||Oa(e)||Ba(e)},b=function(e){return n(e.startContainer)||n(e.endContainer)},c=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return br(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),br(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},l=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!b(e))if(!1===t){if(c=y(-1,e),gs(c.getNode(!0)))return v(-1,c.getNode(!0),!1,!1);if(gs(c.getNode()))return v(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=y(1,e),gs(c.getNode()))return v(1,c.getNode(),!c.isAtEnd(),!1);if(gs(c.getNode(!0)))return v(1,c.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&Dv(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),Dv(n)?(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented()?null:(r=oa(ar.fromDom(g.getBody()),"#"+h).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('
    ').attr("id",h)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&fe.ie?(r.empty().append('

    \xa0

    ').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append("\xa0").append(l).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e),z(Qi(ar.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){Sr(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),p=n,C(),e)):null)},f=function(){p&&(p.removeAttribute("data-mce-selected"),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null),oa(ar.fromDom(g.getBody()),"#"+h).each(Ui),p=null},C=function(){o.hide()};return fe.ceFalse&&(function(){g.on("mouseup",function(e){var t=s();t.collapsed&&ph(g,e.clientX,e.clientY)&&u(lg(g,t,!1))}),g.on("click",function(e){var t;(t=Ov(g,e.target))&&(Dv(t)&&(e.preventDefault(),g.focus()),Rv(t)&&g.dom.isChildOf(t,g.selection.getNode())&&f())}),g.on("blur NewBlock",function(){f()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==Dv(Ov(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Js(e);if(!e.firstChild)return!1;var n=_u.before(e.firstChild),r=t.next(n);return r&&!Lf(r)&&!Ff(r)}(o)};r=!1,(n=g).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=Ov(n,e.target);Dv(t)&&(r||(e.preventDefault(),l(cg(n,t))))}),g.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||g.dom.isChildOf(n,a))&&!1!==ph(g,e.clientX,e.clientY))if(t=Ov(g,n))Dv(t)?(e.preventDefault(),l(cg(g,t))):(f(),Rv(t)&&e.shiftKey||yv(e.clientX,e.clientY,g.selection.getRng())||(C(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===gs(n)){f(),C();var r=vv(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);g.getBody().focus(),u(o)}}}),g.on("keypress",function(e){rv.modifierPressed(e)||(e.keyCode,Dv(g.selection.getNode())&&e.preventDefault())}),g.on("getSelectionRange",function(e){var t=e.range;if(p){if(!p.parentNode)return void(p=null);(t=t.cloneRange()).selectNode(p),e.range=t}}),g.on("setSelectionRange",function(e){e.range=c(e.range);var t=l(e.range,e.forward);t&&(e.range=t)}),g.on("AfterSetSelectionRange",function(e){var t,n=e.range;b(n)||"mcepastebin"===n.startContainer.parentNode.id||C(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||f()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!fe.ie){var r=(t=g.dom.get(h))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),_v(g),Av(g)}(),e=g.contentStyles,t=".mce-content-body",e.push(o.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Pa(e),u(s()),g.selection.scrollIntoView(e[0]))},hideFakeCaret:C,destroy:function(){o.destroy(),p=null}}},Pv=function(e){for(var t=e;/)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0")):"xhtml"===s.element_format&&0k(n)?(C=_(b*y),b=_(C/y)):(b=_(C/y),C=_(b*y))),N.setStyles(D(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,N.setStyles(c,{left:r,top:o,display:"block"}),c.innerHTML=b+" × "+C,f[2]<0&&s.clientWidth<=b&&N.setStyle(s,"left",g+(h-b)),f[3]<0&&s.clientHeight<=C&&N.setStyle(s,"top",p+(v-C)),(t=A.scrollWidth-x)+(n=A.scrollHeight-w)!=0&&N.setStyles(c,{left:r-t,top:o-n}),i||(Tp(a,u,h,v),i=!0)},P=function(){i=!1;var e=function(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?N.setStyle(D(u),e,t):N.setAttrib(D(u),e,t))};e("width",b),e("height",C),N.unbind(S,"mousemove",B),N.unbind(S,"mouseup",P),T!==S&&(N.unbind(T,"mousemove",B),N.unbind(T,"mouseup",P)),N.remove(s),N.remove(c),o(u),kp(a,u,b,C),N.setAttrib(u,"style",N.getAttrib(u,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;I(),M(),t=N.getPos(e,A),g=t.x,p=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),O(e)&&!n.isDefaultPrevented()?E(l,function(n,e){var t;(t=N.get("mceResizeHandle"+e))&&N.remove(t),t=N.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===fe.ie&&(t.contentEditable=!1),N.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,m=t.screenY,h=D(u).clientWidth,v=D(u).clientHeight,y=v/h,(f=n).startPos={x:r*n[0]+g,y:o*n[1]+p},x=A.scrollWidth,w=A.scrollHeight,s=u.cloneNode(!0),N.addClass(s,"mce-clonedresizable"),N.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,N.setStyles(s,{left:g,top:p,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),N.bind(S,"mousemove",B),N.bind(S,"mouseup",P),T!==S&&(N.bind(T,"mousemove",B),N.bind(T,"mouseup",P)),c=N.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},h+" × "+v)}),n.elm=t,N.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+p-t.offsetHeight/2})}):I(),u.setAttribute("data-mce-selected","1")},I=function(){var e,t;for(e in M(),u&&u.removeAttribute("data-mce-selected"),l)(t=N.get("mceResizeHandle"+e))&&(N.unbind(t),N.remove(t))},L=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(E(N.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=N.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):I())},F=function(e){return Ab(function(e,t){for(;t&&t!==e;){if(Rb(t)||Ab(t))return t;t=t.parentNode}return null}(a.getBody(),e))},M=function(){for(var e in l){var t=l[e];t.elm&&(N.unbind(t.elm),delete t.elm)}},z=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};return a.on("init",function(){z(),fe.ie&&11<=fe.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){var t=function(e){he.setEditorTimeout(a,function(){a.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=he.throttle(function(e){a.composing||L(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",I),a.on("contextmenu",n)}),a.on("remove",M),{isResizable:O,showResizeRect:o,hideResizeRect:I,updateResizeRect:L,destroy:function(){u=s=null}}},Ob=function(e){return jo.isContentEditableTrue(e)||jo.isContentEditableFalse(e)},Bb=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=Xt.toArray(o.getClientRects())).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)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,jo.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Ob))?null:i}return r},Pb=function(n,e){return W(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},Ib=function(e,t){var n=(t||V.document).createDocumentFragment();return z(e,function(e){n.appendChild(e.dom())}),ar.fromDom(n)},Lb=Ar("element","width","rows"),Fb=Ar("element","cells"),Mb=Ar("x","y"),zb=function(e,t){var n=parseInt(Er(e,t),10);return isNaN(n)?1:n},Ub=function(e){return j(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},jb=function(e,t){for(var n=e.rows(),r=0;r_
    '+t),e.dom.remove("__mce_tmp")):l.pasteHTML(t)}u.no_events||e.fire("SetContent",u)}else e.fire("SetContent",u)},eC=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return _.from(i).map(ar.fromDom).map(function(e){return r&&t.collapsed?e:Xr(e,o(e,a)).getOr(e)}).bind(function(e){return dr(e)?_.some(e):Vr(e)}).map(function(e){return e.dom()}).getOr(e)},tC=function(e,t,n){return eC(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},nC=function(e,t,n){return eC(e,t,!1,n,function(e,t){return 0t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return og(c,e,t)},placeCaretAt:function(e,t){return i(Bb(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?_u.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=_b(p),t=Db(p,c),p.bookmarkManager=n,p.controlSelection=t,p};(kb=Tb||(Tb={}))[kb.Br=0]="Br",kb[kb.Block=1]="Block",kb[kb.Wrap=2]="Wrap",kb[kb.Eol=3]="Eol";var sC=function(e,t){return e===Tu.Backwards?t.reverse():t},cC=function(e,t,n,r){for(var o,i,a,u,s,c,l=Js(n),f=r,d=[];f&&(s=l,c=f,o=t===Tu.Forwards?s.next(c):s.prev(c));){if(jo.isBr(o.getNode(!1)))return t===Tu.Forwards?{positions:sC(t,d).concat([o]),breakType:Tb.Br,breakAt:_.some(o)}:{positions:sC(t,d),breakType:Tb.Br,breakAt:_.some(o)};if(o.isVisible()){if(e(f,o)){var m=(i=t,a=f,u=o,jo.isBr(u.getNode(i===Tu.Forwards))?Tb.Br:!1===Ts(a,u)?Tb.Block:Tb.Wrap);return{positions:sC(t,d),breakType:m,breakAt:_.some(o)}}d.push(o),f=o}else f=o}return{positions:sC(t,d),breakType:Tb.Eol,breakAt:_.none()}},lC=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Tu.Backwards?t.concat(e):[e].concat(t)}).getOr([])},fC=function(e,i){return j(e,function(e,o){return e.fold(function(){return _.some(o)},function(r){return ru(Z(r.getClientRects()),Z(o.getClientRects()),function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},_.none())},dC=function(t,e){return Z(e.getClientRects()).bind(function(e){return fC(t,e.left)})},mC=d(cC,Su.isAbove,-1),gC=d(cC,Su.isBelow,1),pC=d(lC,-1,mC),hC=d(lC,1,gC),vC=jo.isContentEditableFalse,yC=Za,bC=function(e,t,n,r){var o=e===Tu.Forwards,i=o?Lf:Ff;if(!r.collapsed){var a=yC(r);if(vC(a))return sg(e,t,a,e===Tu.Backwards,!0)}var u=Sa(r.startContainer),s=Ps(e,t.getBody(),r);if(i(s))return cg(t,s.getNode(!o));var c=Vl.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return sg(e,t,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&Fs(c,l)?sg(e,t,l.getNode(!o),o,!0):u?fg(t,c.toRange(),!0):null},CC=function(e,t,n,r){var o,i,a,u,s,c,l,f,d;if(d=yC(r),o=Ps(e,t.getBody(),r),i=n(t.getBody(),sv(1),o),a=U(i,cv(1)),s=Ht.last(o.getClientRects()),(Lf(o)||zf(o))&&(d=o.getNode()),(Ff(o)||Uf(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=pv(a,c))&&vC(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),sg(e,t,u.node,l'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},wC=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Js((e=l).getBody()),o=d(Ls,r.next),i=d(Ls,r.prev),a=t?Tu.Forwards:Tu.Backwards,u=t?o:i,s=e.selection.getRng(),(n=bC(a,e,u,s))?n:(n=xC(e,a,s))||null);return!!c&&(dg(l,c),!0)}},NC=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?uv:av,i=(e=u).selection.getRng(),(n=CC(r,e,o,i))?n:(n=xC(e,r,i))||null);return!!a&&(dg(u,a),!0)}},EC=function(r,o){return function(){var t,e=o?_u.fromRangeEnd(r.selection.getRng()):_u.fromRangeStart(r.selection.getRng()),n=o?gC(r.getBody(),e):mC(r.getBody(),e);return(o?ee(n.positions):Z(n.positions)).filter((t=o,function(e){return t?Ff(e):Lf(e)})).fold(q(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},SC=function(e,t,n,r,o){var i,a,u,s,c=Qi(ar.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),l=U((i=e,G(c,function(e){var t,n,r=(t=Ka(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:i(r),cell:e},{x:r.right,y:i(r),cell:e}]})),function(e){return t(e,o)});return(a=l,u=r,s=o,j(a,function(e,r){return e.fold(function(){return _.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-u)+Math.abs(e.y-s)),n=Math.sqrt(Math.abs(r.x-u)+Math.abs(r.y-s));return _.some(nt}),_C=function(t,n){return Z(n.getClientRects()).bind(function(e){return TC(t,e.left,e.top)}).bind(function(e){return dC((t=e,sc.lastPositionIn(t).map(function(e){return mC(t,e).positions.concat(e)}).getOr([])),n);var t})},AC=function(t,n){return ee(n.getClientRects()).bind(function(e){return kC(t,e.left,e.top)}).bind(function(e){return dC((t=e,sc.firstPositionIn(t).map(function(e){return[e].concat(gC(t,e).positions)}).getOr([])),n);var t})},RC=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===Tb.Wrap&&0===a.positions.length||!jo.isBr(n.getNode())&&(i=u).breakType===Tb.Br&&1===i.positions.length?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},DC=d(RC,mC),OC=d(RC,gC),BC=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(ms()&&(o=t,i=s,a=n,u=_u.fromRangeStart(i),sc.positionIn(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=sg(c,e,n,!t,!0);return dg(e,l),!0}return!1},PC=function(e,t){var n=t.getNode(e);return jo.isElement(n)&&"TABLE"===n.nodeName?_.some(n):_.none()},IC=function(u,s,c){var e=PC(!!s,c),t=!1===s;e.fold(function(){return dg(u,c.toRange())},function(a){return sc.positionIn(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return dg(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Nl(r=u))?r.undoManager.transact(function(){var e=ar.fromTag(i);Nr(e,El(r)),Fi(e,ar.fromTag("br")),n?Ii(ar.fromDom(o),e):Pi(ar.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),dg(r,t)}):dg(r,t.toRange()));var n,r,o,t,i})})},LC=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=_u.fromRangeStart(l),d=e.getBody();if(!t&&DC(r,f)){var m=(u=d,_C(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return fC(pC(u,_u.before(s)),e.left)})}).getOr(_u.before(s)));return IC(e,t,m),!0}return!(!t||!OC(r,f))&&(o=d,m=AC(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return fC(hC(o,_u.after(i)),e.left)})}).getOr(_u.after(i)),IC(e,t,m),!0)},FC=function(t,n){return function(){return _.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return _.from(t.dom.getParent(e,"table")).map(function(e){return BC(t,n,e)})}).getOr(!1)}},MC=function(n,r){return function(){return _.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return _.from(n.dom.getParent(t,"table")).map(function(e){return LC(n,r,e,t)})}).getOr(!1)}},zC=function(e){return F(["figcaption"],lr(e))},UC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},jC=function(e,t,n){n?Fi(e,t):Li(e,t)},VC=function(e,t,n,r){return""===t?(l=e,f=r,d=ar.fromTag("br"),jC(l,d,f),UC(d)):(o=e,i=r,a=t,u=n,s=ar.fromTag(a),c=ar.fromTag("br"),Nr(s,u),Fi(s,c),jC(o,s,i),UC(c));var o,i,a,u,s,c,l,f,d},HC=function(e,t,n){return t?(o=e.dom(),gC(o,n).breakAt.isNone()):(r=e.dom(),mC(r,n).breakAt.isNone());var r,o},qC=function(t,n){var e,r,o,i=ar.fromDom(t.getBody()),a=_u.fromRangeStart(t.selection.getRng()),u=Nl(t),s=El(t);return(e=a,r=i,o=d(Mr,r),na(ar.fromDom(e.container()),Co,o).filter(zC)).exists(function(){if(HC(i,n,a)){var e=VC(i,u,s,n);return t.selection.setRng(e),!0}return!1})},$C=function(e,t){return function(){return!!e.selection.isCollapsed()&&qC(e,t)}},WC=function(e,r){return G(W(e,function(e){return Zy({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:o},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},KC=function(e){for(var t=[],n=1;n'},cx=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},lx=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)},fx=function(e,t,n){return!1===jo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===xa?0:n:n===t.data.length-1&&t.data.charAt(n)===xa?t.data.length:n},dx=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},mx=function(o,i,e){_.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(Cr(n))for(var r=0;rs.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=g&&jo.isText(s)?s.nodeValue.length:0),(u=dx(x,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,g=dx(m,r);if(!(a=m.getParent(r,m.isBlock))||!lx(m,a)){if(l=(a=a||g)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),gx(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),gx(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,E,s,i)),c=x.getParent(s,x.isBlock),l=c?x.getParent(c.parentNode,x.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||e.ctrlKey||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&x.isEmpty(c)?ux(a,S,l,c,m):m&&c===a.getBody()||(m=m||"P",Sa(c)?(r=Pa(c),x.isEmpty(c)&&sx(c),gx(a,r),QC(a,r)):T()?k():T(!0)?(r=c.parentNode.insertBefore(S(),c),QC(a,cx(c,"HR")?r:c)):((t=(b=E,C=b.cloneRange(),C.setStart(b.startContainer,fx(!0,b.startContainer,b.startOffset)),C.setEnd(b.endContainer,fx(!1,b.endContainer,b.endOffset)),C).cloneRange()).setEndAfter(c),o=t.extractContents(),y=o,z(Ji(ar.fromDom(y),mr),function(e){var t=e.dom();t.nodeValue=wa(t.nodeValue)}),function(e){for(;jo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,x.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;jo.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=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(x,N,r),p=x,(h=c).normalize(),(v=h.lastChild)&&!/^(left|right)$/gi.test(p.getStyle(v,"float",!0))||p.add(h,"br"),x.isEmpty(c)&&sx(c),r.normalize(),x.isEmpty(r)?(x.remove(r),k()):(gx(a,r),QC(a,r))),x.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},hx=function(e,t){return ex(e).filter(function(e){return 0",yl(f)!==f.documentBaseUrl&&(g+=''),g+='',d=bl(f),m=Cl(f),xl(f)&&(g+=''),g+='
    '),Cw.add(t.iframeContainer,l),p},ww=function(e,t){var n=xw(e,t);t.editorContainer&&(Cw.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Cw.isHidden(t.editorContainer)),e.getElement().style.display="none",Cw.setAttrib(e.id,"aria-hidden","true"),n||bw(e)},Nw=Si.DOM,Ew=function(t,n,e){var r=_h.get(e),o=_h.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=Xt.trim(e),r&&-1===Xt.inArray(n,e)){if(Xt.each(_h.dependencies(e),function(e){Ew(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(iE){kh.pluginInitError(t,e,iE)}}},Sw=function(e){return e.replace(/^\-/,"")},Tw=function(e){return{editorContainer:e,iframeContainer:e}},kw=function(e){var t,n,r=e.getElement();return e.inline?Tw(null):(t=r,n=Nw.create("div"),Nw.insertAfter(n,t),Tw(n))},_w=function(e){var t,n,r,o,i,a,u,s,c,l,f,d=e.settings,m=e.getElement();return e.orgDisplay=m.style.display,S(d.theme)?(l=(o=e).settings,f=o.getElement(),i=l.width||Nw.getStyle(f,"width")||"100%",a=l.height||Nw.getStyle(f,"height")||f.offsetHeight,u=l.min_height||100,(s=/^[0-9\.]+(|px)$/i).test(""+i)&&(i=Math.max(parseInt(i,10),100)),s.test(""+a)&&(a=Math.max(parseInt(a,10),u)),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]*>( | |\\s|\xa0|
    |)<\\/"+a+">[\r\n]*|
    [\r\n]*)$"),r=i.replace(u,"")}return"text"===t.format||Ao(ar.fromDom(n))?t.content=r:t.content=Xt.trim(r),t.no_events||e.fire("GetContent",t),t.content},jw=function(e,t){t(e),e.firstChild&&jw(e.firstChild,t),e.next&&jw(e.next,t)},Vw=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&jw(t.firstChild,function(t){z(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),z(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);z(r,function(t){z(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Hw=function(e){return e instanceof sb},qw=function(e,t){var r;e.dom.setHTML(e.getBody(),t),sh(r=e)&&sc.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=jo.isTable(t)?sc.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},$w=function(u,s,c){return void 0===c&&(c={}),c.format=c.format?c.format:"html",c.set=!0,c.content=Hw(s)?"":s,Hw(s)||c.no_events||(u.fire("BeforeSetContent",c),s=c.content),_.from(u.getBody()).fold(q(s),function(e){return Hw(s)?function(e,t,n,r){Vw(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=al({validate:e.validate},e.schema).serialize(n);return r.content=Ao(ar.fromDom(t))?o:Xt.trim(o),qw(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,c):(t=u,n=e,o=c,0===(r=s).length||/^\s+$/.test(r)?(a='
    ',"TABLE"===n.nodeName?r="
    "+a+"
    metadata CHANGED
    @@ -1,14 +1,14 @@
    1
    1
      --- !ruby/object:Gem::Specification
    2
    2
      name: tinymce-rails
    3
    3
      version: !ruby/object:Gem::Version
    4
    - version: 4.9.10
    4
    + version: 4.9.11
    5
    5
      platform: ruby
    6
    6
      authors:
    7
    7
      - Sam Pohlenz
    8
    8
      autorequire:
    9
    9
      bindir: bin
    10
    10
      cert_chain: []
    11
    - date: 2020-04-23 00:00:00.000000000 Z
    11
    + date: 2020-07-14 00:00:00.000000000 Z
    12
    12
      dependencies:
    13
    13
      - !ruby/object:Gem::Dependency
    14
    14
      name: railties