colonel-kurtz
Advanced tools
Comparing version 0.3.0 to 1.0.0
@@ -7,5 +7,4 @@ /** | ||
var Editor = require('./editor') | ||
var Previewer = require('./previewer') | ||
var React = require('react') | ||
var Editor = require('./editor') | ||
var React = require('react') | ||
@@ -20,8 +19,4 @@ require('./style') | ||
renderEditor() { | ||
render() { | ||
return <Editor onChange={ this.setContent } { ...this.state.content } /> | ||
}, | ||
renderPreviewer() { | ||
return <Previewer { ...this.state.content } /> | ||
} | ||
@@ -28,0 +23,0 @@ |
@@ -9,3 +9,2 @@ /** | ||
var Editor = require('./editor') | ||
var Previewer = require('./previewer') | ||
var React = require('react') | ||
@@ -21,8 +20,4 @@ | ||
renderEditor() { | ||
render() { | ||
return <Editor onBlur={ this.setContent } { ...this.state.content } /> | ||
}, | ||
renderPreviewer() { | ||
return <Previewer { ...this.state.content } /> | ||
} | ||
@@ -29,0 +24,0 @@ |
@@ -7,5 +7,4 @@ /** | ||
var Editor = require('./editor') | ||
var Previewer = require('./previewer') | ||
var React = require('react') | ||
var Editor = require('./editor') | ||
var React = require('react') | ||
@@ -20,8 +19,4 @@ require('./style') | ||
renderEditor() { | ||
render() { | ||
return <Editor onChange={ this.setContent } { ...this.state.content } /> | ||
}, | ||
renderPreviewer() { | ||
return <Previewer { ...this.state.content } /> | ||
} | ||
@@ -28,0 +23,0 @@ |
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(29),o=r(30),a=r(1);r(58);var s={defaultContent:function(){return{src:"",caption:"",attribution:""}},renderEditor:function(){return a.createElement(i,n({onChange:this.setContent},this.state.content))},renderPreviewer:function(){return a.createElement(o,this.state.content)}};e.exports=s},1:function(e){e.exports=require("react")},9:function(e,t,r){"use strict";var n=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(1),a=o.createClass({displayName:"Field",getDefaultProps:function(){return{type:"text"}},render:function(){var e=this.props,t=e.label,r=e.name,a=e.type,s=n(e,["label","name","type"]);return o.createElement("div",{className:"col-img-field"},o.createElement("label",{className:"col-img-label",htmlFor:r||this.props.id},t),o.createElement("input",i({className:"col-img-input",type:a},s,{name:r||this.props.id})))}});e.exports=a},12:function(e,t,r){"use strict";var n=r(1),i=n.createClass({displayName:"Graphic",getCaption:function(){var e=this.props.caption;return e?n.createElement("figcaption",{className:"col-img-caption"},e):null},render:function(){var e=this.props.src;return e?n.createElement("figure",{className:"col-img-figure"},n.createElement("img",{className:"col-img-graphic",src:e,alt:""}),this.getCaption()):null}});e.exports=i},29:function(e,t,r){"use strict";var n=r(9),i=r(12),o=r(1),a=o.PropTypes,s=o.createClass({displayName:"Editor",propTypes:{src:a.string,caption:a.string,attribution:a.string,onChange:a.func.isRequired},render:function(){var e=this.props,t=e.src,r=e.caption,a=e.attribution;return o.createElement("div",{className:"col-img"},o.createElement(i,this.props),o.createElement("fieldset",{className:"col-img-fieldset"},o.createElement(n,{label:"Image Source",type:"url",value:t,name:"image_src",onChange:this._onSrcChange}),o.createElement(n,{label:"Caption",type:"text",value:r,name:"image_caption",onChange:this._onCaptionChange}),o.createElement(n,{label:"Attribution",type:"text",value:a,name:"image_attribution",onChange:this._onAttributionChange})))},_onSrcChange:function(e){this.props.onChange({src:e.currentTarget.value})},_onCaptionChange:function(e){this.props.onChange({caption:e.currentTarget.value})},_onAttributionChange:function(e){this.props.onChange({attribution:e.currentTarget.value})}});e.exports=s},30:function(e,t,r){"use strict";var n=r(1),i=r(12),o=n.createClass({displayName:"Previewer",render:function(){return n.createElement(i,this.props)}});e.exports=o},58:function(){}}); | ||
module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}({0:function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(31),o=n(1);n(52);var a={defaultContent:function(){return{src:"",caption:"",attribution:""}},render:function(){return o.createElement(i,r({onChange:this.setContent},this.state.content))}};t.exports=a},1:function(t){t.exports=require("react")},6:function(t,e,n){"use strict";var r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(1),a=o.createClass({displayName:"Field",getDefaultProps:function(){return{type:"text"}},render:function(){var t=this.props,e=t.label,n=t.name,a=t.type,s=r(t,["label","name","type"]);return o.createElement("div",{className:"col-img-field"},o.createElement("label",{className:"col-img-label",htmlFor:n||this.props.id},e),o.createElement("input",i({className:"col-img-input",type:a},s,{name:n||this.props.id})))}});t.exports=a},31:function(t,e,n){"use strict";var r=n(6),i=n(32),o=n(1),a=o.PropTypes,s=o.createClass({displayName:"Editor",propTypes:{src:a.string,caption:a.string,attribution:a.string,onChange:a.func.isRequired},render:function(){var t=this.props,e=t.src,n=t.caption,a=t.attribution;return o.createElement("div",{className:"col-img"},o.createElement(i,this.props),o.createElement("fieldset",{className:"col-img-fieldset"},o.createElement(r,{label:"Image Source",type:"url",value:e,name:"image_src",onChange:this._onSrcChange}),o.createElement(r,{label:"Caption",type:"text",value:n,name:"image_caption",onChange:this._onCaptionChange}),o.createElement(r,{label:"Attribution",type:"text",value:a,name:"image_attribution",onChange:this._onAttributionChange})))},_onSrcChange:function(t){this.props.onChange({src:t.currentTarget.value})},_onCaptionChange:function(t){this.props.onChange({caption:t.currentTarget.value})},_onAttributionChange:function(t){this.props.onChange({attribution:t.currentTarget.value})}});t.exports=s},32:function(t,e,n){"use strict";var r=n(1),i=r.createClass({displayName:"Graphic",getCaption:function(){var t=this.props.caption;return t?r.createElement("figcaption",{className:"col-img-caption"},t):null},render:function(){var t=this.props.src;return t?r.createElement("figure",{className:"col-img-figure"},r.createElement("img",{className:"col-img-graphic",src:t,alt:""}),this.getCaption()):null}});t.exports=i},52:function(){}}); | ||
//# sourceMappingURL=image.js.map |
@@ -1,3 +0,3 @@ | ||
module.exports=function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}({0:function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=n(31),o=n(32),a=n(1);n(59);var s={defaultContent:function(){return{html:"",text:""}},renderEditor:function(){return a.createElement(r,i({onBlur:this.setContent},this.state.content))},renderPreviewer:function(){return a.createElement(o,this.state.content)}};t.exports=s},1:function(t){t.exports=require("react")},31:function(t,e,n){"use strict";var i=n(33),r=n(1),o=r.PropTypes,a=r.createClass({displayName:"Editor",propTypes:{html:o.string.isRequired,onBlur:o.func.isRequired},getDefaultProps:function(){return{options:{buttons:["header1","header2","bold","italic","underline","anchor","quote","unorderedlist","orderedlist"],firstHeader:"h1",secondHeader:"h2",diffLeft:0,diffTop:-10,disableDoubleReturn:!0}}},shouldComponentUpdate:function(){return!1},componentDidMount:function(){this.setState({editor:new i(this.refs.editor.getDOMNode(),this.props.options)})},componentWillUnmount:function(){this.state.editor.deactivate()},render:function(){return r.createElement("div",{className:"col-block-medium"},r.createElement("div",{className:"col-medium",onBlur:this._onBlur,role:"textarea","aria-multiline":"true",ref:"editor",dangerouslySetInnerHTML:{__html:this.props.html}}))},_onBlur:function(){var t=this.refs.editor.getDOMNode();this.props.onBlur({text:t.textContent,html:t.innerHTML})}});t.exports=a},32:function(t,e,n){"use strict";var i=n(1),r=i.createClass({displayName:"Previewer",render:function(){return i.createElement("div",{className:"col-block-content"},i.createElement("div",{className:"col-medium-preview",dangerouslySetInnerHTML:{__html:this.props.html}}))}});t.exports=r},33:function(t){"use strict";function e(t,e){return this.init(t,e)}t.exports=e,function(t,n){function i(t,e){var n;if(void 0===t)return e;for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)===!1&&(t[n]=e[n]);return t}function r(t,e){for(var n=e.parentNode;null!==n;){if(n===t)return!0;n=n.parentNode}return!1}function o(){var t,e,n,i=this.options.contentWindow.getSelection();if(i.getRangeAt&&i.rangeCount){for(n=[],t=0,e=i.rangeCount;e>t;t+=1)n.push(i.getRangeAt(t));return n}return null}function a(t){var e,n,i=this.options.contentWindow.getSelection();if(t)for(i.removeAllRanges(),e=0,n=t.length;n>e;e+=1)i.addRange(t[e])}function s(){var t=this.options.ownerDocument.getSelection().anchorNode,e=t&&3===t.nodeType?t.parentNode:t;return e}function c(){var t,e,n,i,r="";if(void 0!==this.options.contentWindow.getSelection){if(e=this.options.contentWindow.getSelection(),e.rangeCount){for(i=this.options.ownerDocument.createElement("div"),t=0,n=e.rangeCount;n>t;t+=1)i.appendChild(e.getRangeAt(t).cloneContents());r=i.innerHTML}}else void 0!==this.options.ownerDocument.selection&&"Text"===this.options.ownerDocument.selection.type&&(r=this.options.ownerDocument.selection.createRange().htmlText);return r}function l(t){return!(!t||1!==t.nodeType)}e.prototype={defaults:{allowMultiParagraphSelection:!0,anchorInputPlaceholder:"Paste or type a link",anchorPreviewHideDelay:500,buttons:["bold","italic","underline","anchor","header1","header2","quote"],buttonLabels:!1,checkLinkFormat:!1,cleanPastedHTML:!1,delay:0,diffLeft:0,diffTop:-10,disableReturn:!1,disableDoubleReturn:!1,disableToolbar:!1,disableEditing:!1,elementsContainer:!1,contentWindow:t,ownerDocument:n,firstHeader:"h3",forcePlainText:!0,placeholder:"Type your text",secondHeader:"h4",targetBlank:!1,anchorTarget:!1,anchorButton:!1,anchorButtonClass:"btn",extensions:{},activeButtonClass:"medium-editor-button-active",firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last"},isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),init:function(t,e){return this.options=i(e,this.defaults),this.setElementSelection(t),0!==this.elements.length?(this.parentElements=["p","h1","h2","h3","h4","h5","h6","blockquote","pre"],this.options.elementsContainer||(this.options.elementsContainer=n.body),this.id=this.options.elementsContainer.querySelectorAll(".medium-editor-toolbar").length+1,this.setup()):void 0},setup:function(){this.events=[],this.isActive=!0,this.initElements().bindSelect().bindPaste().setPlaceholders().bindWindowActions().passInstance()},on:function(t,e,n,i){t.addEventListener(e,n,i),this.events.push([t,e,n,i])},off:function(t,e,n,i){var r,o=this.events.indexOf([t,e,n,i]);-1!==o&&(r=this.events.splice(o,1),r[0].removeEventListener(r[1],r[2],r[3]))},removeAllEvents:function(){for(var t=this.events.pop();t;)t[0].removeEventListener(t[1],t[2],t[3]),t=this.events.pop()},initElements:function(){this.updateElementList();var t,e=!1;for(t=0;t<this.elements.length;t+=1)this.options.disableEditing||this.elements[t].getAttribute("data-disable-editing")||this.elements[t].setAttribute("contentEditable",!0),this.elements[t].getAttribute("data-placeholder")||this.elements[t].setAttribute("data-placeholder",this.options.placeholder),this.elements[t].setAttribute("data-medium-element",!0),this.bindParagraphCreation(t).bindReturn(t).bindTab(t),this.options.disableToolbar||this.elements[t].getAttribute("data-disable-toolbar")||(e=!0);return e&&this.initToolbar().bindButtons().bindAnchorForm().bindAnchorPreview(),this},setElementSelection:function(t){this.elementSelection=t,this.updateElementList()},updateElementList:function(){this.elements="string"==typeof this.elementSelection?this.options.ownerDocument.querySelectorAll(this.elementSelection):this.elementSelection,1===this.elements.nodeType&&(this.elements=[this.elements])},serialize:function(){var t,e,n={};for(t=0;t<this.elements.length;t+=1)e=""!==this.elements[t].id?this.elements[t].id:"element-"+t,n[e]={value:this.elements[t].innerHTML.trim()};return n},callExtensions:function(t){if(!(arguments.length<1)){var e,n,i=Array.prototype.slice.call(arguments,1);for(n in this.options.extensions)this.options.extensions.hasOwnProperty(n)&&(e=this.options.extensions[n],void 0!==e[t]&&e[t].apply(e,i))}},passInstance:function(){var t,e,n=this;for(e in n.options.extensions)n.options.extensions.hasOwnProperty(e)&&(t=n.options.extensions[e],t.parent&&(t.base=n));return n},bindParagraphCreation:function(t){var e=this;return this.on(this.elements[t],"keypress",function(t){var i,r=s.call(e);32===t.which&&(i=r.tagName.toLowerCase(),"a"===i&&n.execCommand("unlink",!1,null))}),this.on(this.elements[t],"keyup",function(t){var i,r,o=s.call(e);o&&o.getAttribute("data-medium-element")&&0===o.children.length&&!e.options.disableReturn&&!o.getAttribute("data-disable-return")&&n.execCommand("formatBlock",!1,"p"),13===t.which&&(o=s.call(e),i=o.tagName.toLowerCase(),r=e.getSelectionElement(),e.options.disableReturn||r.getAttribute("data-disable-return")||"li"===i||e.isListItemChild(o)||(t.shiftKey||n.execCommand("formatBlock",!1,"p"),"a"===i&&n.execCommand("unlink",!1,null)))}),this},isListItemChild:function(t){for(var e=t.parentNode,n=e.tagName.toLowerCase();-1===this.parentElements.indexOf(n)&&"div"!==n;){if("li"===n)return!0;if(e=e.parentNode,!e||!e.tagName)return!1;n=e.tagName.toLowerCase()}return!1},bindReturn:function(t){var e=this;return this.on(this.elements[t],"keypress",function(t){if(13===t.which)if(e.options.disableReturn||this.getAttribute("data-disable-return"))t.preventDefault();else if(e.options.disableDoubleReturn||this.getAttribute("data-disable-double-return")){var n=s.call(e);n&&"\n"===n.innerText&&t.preventDefault()}}),this},bindTab:function(t){var e=this;return this.on(this.elements[t],"keydown",function(t){if(9===t.which){var i=s.call(e).tagName.toLowerCase();"pre"===i&&(t.preventDefault(),n.execCommand("insertHtml",null," ")),"li"===i&&(t.preventDefault(),t.shiftKey?n.execCommand("outdent",t):n.execCommand("indent",t))}}),this},buttonTemplate:function(t){var e=this.getButtonLabels(this.options.buttonLabels),n={bold:'<button class="medium-editor-action medium-editor-action-bold" data-action="bold" data-element="b">'+e.bold+"</button>",italic:'<button class="medium-editor-action medium-editor-action-italic" data-action="italic" data-element="i">'+e.italic+"</button>",underline:'<button class="medium-editor-action medium-editor-action-underline" data-action="underline" data-element="u">'+e.underline+"</button>",strikethrough:'<button class="medium-editor-action medium-editor-action-strikethrough" data-action="strikethrough" data-element="strike">'+e.strikethrough+"</button>",superscript:'<button class="medium-editor-action medium-editor-action-superscript" data-action="superscript" data-element="sup">'+e.superscript+"</button>",subscript:'<button class="medium-editor-action medium-editor-action-subscript" data-action="subscript" data-element="sub">'+e.subscript+"</button>",anchor:'<button class="medium-editor-action medium-editor-action-anchor" data-action="anchor" data-element="a">'+e.anchor+"</button>",image:'<button class="medium-editor-action medium-editor-action-image" data-action="image" data-element="img">'+e.image+"</button>",header1:'<button class="medium-editor-action medium-editor-action-header1" data-action="append-'+this.options.firstHeader+'" data-element="'+this.options.firstHeader+'">'+e.header1+"</button>",header2:'<button class="medium-editor-action medium-editor-action-header2" data-action="append-'+this.options.secondHeader+'" data-element="'+this.options.secondHeader+'">'+e.header2+"</button>",quote:'<button class="medium-editor-action medium-editor-action-quote" data-action="append-blockquote" data-element="blockquote">'+e.quote+"</button>",orderedlist:'<button class="medium-editor-action medium-editor-action-orderedlist" data-action="insertorderedlist" data-element="ol">'+e.orderedlist+"</button>",unorderedlist:'<button class="medium-editor-action medium-editor-action-unorderedlist" data-action="insertunorderedlist" data-element="ul">'+e.unorderedlist+"</button>",pre:'<button class="medium-editor-action medium-editor-action-pre" data-action="append-pre" data-element="pre">'+e.pre+"</button>",indent:'<button class="medium-editor-action medium-editor-action-indent" data-action="indent" data-element="ul">'+e.indent+"</button>",outdent:'<button class="medium-editor-action medium-editor-action-outdent" data-action="outdent" data-element="ul">'+e.outdent+"</button>",justifyCenter:'<button class="medium-editor-action medium-editor-action-justifyCenter" data-action="justifyCenter" data-element="">'+e.justifyCenter+"</button>",justifyFull:'<button class="medium-editor-action medium-editor-action-justifyFull" data-action="justifyFull" data-element="">'+e.justifyFull+"</button>",justifyLeft:'<button class="medium-editor-action medium-editor-action-justifyLeft" data-action="justifyLeft" data-element="">'+e.justifyLeft+"</button>",justifyRight:'<button class="medium-editor-action medium-editor-action-justifyRight" data-action="justifyRight" data-element="">'+e.justifyRight+"</button>"};return n[t]||!1},getButtonLabels:function(t){var e,n,i={bold:"<b>B</b>",italic:"<b><i>I</i></b>",underline:"<b><u>U</u></b>",strikethrough:"<s>A</s>",superscript:"<b>x<sup>1</sup></b>",subscript:"<b>x<sub>1</sub></b>",anchor:"<b>#</b>",image:"<b>image</b>",header1:"<b>H1</b>",header2:"<b>H2</b>",quote:"<b>“</b>",orderedlist:"<b>1.</b>",unorderedlist:"<b>•</b>",pre:"<b>0101</b>",indent:"<b>→</b>",outdent:"<b>←</b>",justifyCenter:"<b>C</b>",justifyFull:"<b>J</b>",justifyLeft:"<b>L</b>",justifyRight:"<b>R</b>"};if("fontawesome"===t?e={bold:'<i class="fa fa-bold"></i>',italic:'<i class="fa fa-italic"></i>',underline:'<i class="fa fa-underline"></i>',strikethrough:'<i class="fa fa-strikethrough"></i>',superscript:'<i class="fa fa-superscript"></i>',subscript:'<i class="fa fa-subscript"></i>',anchor:'<i class="fa fa-link"></i>',image:'<i class="fa fa-picture-o"></i>',quote:'<i class="fa fa-quote-right"></i>',orderedlist:'<i class="fa fa-list-ol"></i>',unorderedlist:'<i class="fa fa-list-ul"></i>',pre:'<i class="fa fa-code fa-lg"></i>',indent:'<i class="fa fa-indent"></i>',outdent:'<i class="fa fa-outdent"></i>',justifyCenter:'<i class="fa fa-align-center"></i>',justifyFull:'<i class="fa fa-align-justify"></i>',justifyLeft:'<i class="fa fa-align-left"></i>',justifyRight:'<i class="fa fa-align-right"></i>'}:"object"==typeof t&&(e=t),"object"==typeof e)for(n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i},initToolbar:function(){return this.toolbar?this:(this.toolbar=this.createToolbar(),this.keepToolbarAlive=!1,this.anchorForm=this.toolbar.querySelector(".medium-editor-toolbar-form-anchor"),this.anchorInput=this.anchorForm.querySelector("input.medium-editor-toolbar-anchor-input"),this.anchorTarget=this.anchorForm.querySelector("input.medium-editor-toolbar-anchor-target"),this.anchorButton=this.anchorForm.querySelector("input.medium-editor-toolbar-anchor-button"),this.toolbarActions=this.toolbar.querySelector(".medium-editor-toolbar-actions"),this.anchorPreview=this.createAnchorPreview(),this)},createToolbar:function(){var t=n.createElement("div");return t.id="medium-editor-toolbar-"+this.id,t.className="medium-editor-toolbar",t.appendChild(this.toolbarButtons()),t.appendChild(this.toolbarFormAnchor()),this.options.elementsContainer.appendChild(t),t},toolbarButtons:function(){var t,e,i,r,o=this.options.buttons,a=n.createElement("ul");for(a.id="medium-editor-toolbar-actions",a.className="medium-editor-toolbar-actions clearfix",e=0;e<o.length;e+=1)this.options.extensions.hasOwnProperty(o[e])?(r=this.options.extensions[o[e]],i=void 0!==r.getButton?r.getButton():null):i=this.buttonTemplate(o[e]),i&&(t=n.createElement("li"),l(i)?t.appendChild(i):t.innerHTML=i,a.appendChild(t));return a},toolbarFormAnchor:function(){var t=n.createElement("div"),e=n.createElement("input"),i=n.createElement("label"),r=n.createElement("input"),o=n.createElement("label"),a=n.createElement("input"),s=n.createElement("a"),c=n.createElement("a");return s.setAttribute("href","#"),s.className="medium-editor-toobar-anchor-close",s.innerHTML="×",c.setAttribute("href","#"),c.className="medium-editor-toobar-anchor-save",c.innerHTML="✓",e.setAttribute("type","text"),e.className="medium-editor-toolbar-anchor-input",e.setAttribute("placeholder",this.options.anchorInputPlaceholder),r.setAttribute("type","checkbox"),r.className="medium-editor-toolbar-anchor-target",i.innerHTML="Open in New Window?",i.insertBefore(r,i.firstChild),a.setAttribute("type","checkbox"),a.className="medium-editor-toolbar-anchor-button",o.innerHTML="Button",o.insertBefore(a,o.firstChild),t.className="medium-editor-toolbar-form-anchor",t.id="medium-editor-toolbar-form-anchor",t.appendChild(e),t.appendChild(c),t.appendChild(s),this.options.anchorTarget&&t.appendChild(i),this.options.anchorButton&&t.appendChild(o),t},bindSelect:function(){var t,e=this,i="";for(this.checkSelectionWrapper=function(t){return t&&e.clickingIntoArchorForm(t)?!1:(clearTimeout(i),void(i=setTimeout(function(){e.checkSelection()},e.options.delay)))},this.on(n.documentElement,"mouseup",this.checkSelectionWrapper),t=0;t<this.elements.length;t+=1)this.on(this.elements[t],"keyup",this.checkSelectionWrapper),this.on(this.elements[t],"blur",this.checkSelectionWrapper);return this},checkSelection:function(){var t,e;return this.keepToolbarAlive===!0||this.options.disableToolbar||(t=this.options.contentWindow.getSelection(),""===t.toString().trim()||this.options.allowMultiParagraphSelection===!1&&this.hasMultiParagraphs()||this.selectionInContentEditableFalse()?this.hideToolbarActions():(e=this.getSelectionElement(),!e||e.getAttribute("data-disable-toolbar")?this.hideToolbarActions():this.checkSelectionElement(t,e))),this},clickingIntoArchorForm:function(t){var e=this;return t.type&&"blur"===t.type.toLowerCase()&&t.relatedTarget&&t.relatedTarget===e.anchorInput?!0:!1},hasMultiParagraphs:function(){var t=c.call(this).replace(/<[\S]+><\/[\S]+>/gim,""),e=t.match(/<(p|h[0-6]|blockquote)>([\s\S]*?)<\/(p|h[0-6]|blockquote)>/g);return e?e.length:0},checkSelectionElement:function(t,e){var n;for(this.selection=t,this.selectionRange=this.selection.getRangeAt(0),n=0;n<this.elements.length;n+=1)if(this.elements[n]===e)return void this.setToolbarButtonStates().setToolbarPosition().showToolbarActions();this.hideToolbarActions()},findMatchingSelectionParent:function(t){var e,n,i=this.options.contentWindow.getSelection();if(0===i.rangeCount)return!1;e=i.getRangeAt(0),n=e.commonAncestorContainer;do{if(1===n.nodeType){if(t(n))return n;if(n.getAttribute("data-medium-element"))return!1}n=n.parentNode}while(n);return!1},getSelectionElement:function(){return this.findMatchingSelectionParent(function(t){return t.getAttribute("data-medium-element")})},selectionInContentEditableFalse:function(){return this.findMatchingSelectionParent(function(t){return t&&"#text"!==t.nodeName&&"false"===t.getAttribute("contenteditable")})},setToolbarPosition:function(){var t=50,e=this.options.contentWindow.getSelection(),n=e.getRangeAt(0),i=n.getBoundingClientRect(),r=this.options.diffLeft-this.toolbar.offsetWidth/2,o=(i.left+i.right)/2,a=this.toolbar.offsetWidth/2;return i.top<t?(this.toolbar.classList.add("medium-toolbar-arrow-over"),this.toolbar.classList.remove("medium-toolbar-arrow-under"),this.toolbar.style.top=t+i.bottom-this.options.diffTop+this.options.contentWindow.pageYOffset-this.toolbar.offsetHeight+"px"):(this.toolbar.classList.add("medium-toolbar-arrow-under"),this.toolbar.classList.remove("medium-toolbar-arrow-over"),this.toolbar.style.top=i.top+this.options.diffTop+this.options.contentWindow.pageYOffset-this.toolbar.offsetHeight+"px"),this.toolbar.style.left=a>o?r+a+"px":this.options.contentWindow.innerWidth-o<a?this.options.contentWindow.innerWidth+r-a+"px":r+o+"px",this.hideAnchorPreview(),this},setToolbarButtonStates:function(){var t,e=this.toolbarActions.querySelectorAll("button");for(t=0;t<e.length;t+=1)e[t].classList.remove(this.options.activeButtonClass);return this.checkActiveButtons(),this},checkActiveButtons:function(){for(var t=Array.prototype.slice.call(this.elements),e=this.getSelectedParentElement();void 0!==e.tagName&&-1===this.parentElements.indexOf(e.tagName.toLowerCase)&&(this.activateButton(e.tagName.toLowerCase()),this.callExtensions("checkState",e),-1===t.indexOf(e));)e=e.parentNode},activateButton:function(t){var e=this.toolbar.querySelector('[data-element="'+t+'"]');null!==e&&-1===e.className.indexOf(this.options.activeButtonClass)&&(e.className+=" "+this.options.activeButtonClass)},bindButtons:function(){var t,e=this.toolbar.querySelectorAll("button"),n=this,i=function(t){t.preventDefault(),t.stopPropagation(),void 0===n.selection&&n.checkSelection(),this.className.indexOf(n.options.activeButtonClass)>-1?this.classList.remove(n.options.activeButtonClass):this.className+=" "+n.options.activeButtonClass,this.hasAttribute("data-action")&&n.execAction(this.getAttribute("data-action"),t)};for(t=0;t<e.length;t+=1)this.on(e[t],"click",i);return this.setFirstAndLastItems(e),this},setFirstAndLastItems:function(t){return t.length>0&&(t[0].className+=" "+this.options.firstButtonClass,t[t.length-1].className+=" "+this.options.lastButtonClass),this},execAction:function(t,e){t.indexOf("append-")>-1?(this.execFormatBlock(t.replace("append-","")),this.setToolbarPosition(),this.setToolbarButtonStates()):"anchor"===t?this.triggerAnchorAction(e):"image"===t?this.options.ownerDocument.execCommand("insertImage",!1,this.options.contentWindow.getSelection()):(this.options.ownerDocument.execCommand(t,!1,null),this.setToolbarPosition())},rangeSelectsSingleNode:function(t){var e=t.startContainer;return e===t.endContainer&&e.hasChildNodes()&&t.endOffset===t.startOffset+1},getSelectedParentElement:function(){var t=null,e=this.selectionRange;return t=this.rangeSelectsSingleNode(e)?e.startContainer.childNodes[e.startOffset]:3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer},triggerAnchorAction:function(){var t=this.getSelectedParentElement();return t.tagName&&"a"===t.tagName.toLowerCase()?this.options.ownerDocument.execCommand("unlink",!1,null):"block"===this.anchorForm.style.display?this.showToolbarActions():this.showAnchorForm(),this},execFormatBlock:function(t){var e=this.getSelectionData(this.selection.anchorNode);if("blockquote"===t&&e.el&&"blockquote"===e.el.parentNode.tagName.toLowerCase())return this.options.ownerDocument.execCommand("outdent",!1,null);if(e.tagName===t&&(t="p"),this.isIE){if("blockquote"===t)return this.options.ownerDocument.execCommand("indent",!1,t);t="<"+t+">"}return this.options.ownerDocument.execCommand("formatBlock",!1,t)},getSelectionData:function(t){var e;for(t&&t.tagName&&(e=t.tagName.toLowerCase());t&&-1===this.parentElements.indexOf(e);)t=t.parentNode,t&&t.tagName&&(e=t.tagName.toLowerCase());return{el:t,tagName:e}},getFirstChild:function(t){for(var e=t.firstChild;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},hideToolbarActions:function(){this.keepToolbarAlive=!1,void 0!==this.toolbar&&this.toolbar.classList.remove("medium-editor-toolbar-active")},showToolbarActions:function(){var t,e=this;this.anchorForm.style.display="none",this.toolbarActions.style.display="block",this.keepToolbarAlive=!1,clearTimeout(t),t=setTimeout(function(){e.toolbar&&!e.toolbar.classList.contains("medium-editor-toolbar-active")&&e.toolbar.classList.add("medium-editor-toolbar-active")},100)},saveSelection:function(){this.savedSelection=o.call(this)},restoreSelection:function(){a.call(this,this.savedSelection)},showAnchorForm:function(t){this.toolbarActions.style.display="none",this.saveSelection(),this.anchorForm.style.display="block",this.setToolbarPosition(),this.keepToolbarAlive=!0,this.anchorInput.focus(),this.anchorInput.value=t||""},bindAnchorForm:function(){var t=this.anchorForm.querySelector("a.medium-editor-toobar-anchor-close"),e=this.anchorForm.querySelector("a.medium-editor-toobar-anchor-save"),n=this;return this.on(this.anchorForm,"click",function(t){t.stopPropagation(),n.keepToolbarAlive=!0}),this.on(this.anchorInput,"keyup",function(t){var e,i=null;13===t.keyCode&&(t.preventDefault(),e=n.options.anchorTarget&&n.anchorTarget.checked?"_blank":"_self",n.options.anchorButton&&n.anchorButton.checked&&(i=n.options.anchorButtonClass),n.createLink(this,e,i))}),this.on(e,"click",function(t){var e,i=null;t.preventDefault(),e=n.options.anchorTarget&&n.anchorTarget.checked?"_blank":"_self",n.options.anchorButton&&n.anchorButton.checked&&(i=n.options.anchorButtonClass),n.createLink(n.anchorInput,e,i)},!0),this.on(this.anchorInput,"click",function(t){t.stopPropagation(),n.keepToolbarAlive=!0}),this.on(this.options.ownerDocument.body,"click",function(t){t.target===n.anchorForm||r(n.anchorForm,t.target)||r(n.toolbarActions,t.target)||(n.keepToolbarAlive=!1,n.checkSelection())},!0),this.on(this.options.ownerDocument.body,"focus",function(t){t.target===n.anchorForm||r(n.anchorForm,t.target)||r(n.toolbarActions,t.target)||(n.keepToolbarAlive=!1,n.checkSelection())},!0),this.on(t,"click",function(t){t.preventDefault(),n.showToolbarActions(),a.call(n,n.savedSelection)}),this},hideAnchorPreview:function(){this.anchorPreview.classList.remove("medium-editor-anchor-preview-active")},showAnchorPreview:function(t){if(this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||t.getAttribute("data-disable-preview"))return!0;var e,n,i,r=this,o=40,a=t.getBoundingClientRect(),s=(a.left+a.right)/2;return r.anchorPreview.querySelector("i").textContent=t.href,e=r.anchorPreview.offsetWidth/2,n=r.options.diffLeft-e,clearTimeout(i),i=setTimeout(function(){r.anchorPreview&&!r.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&r.anchorPreview.classList.add("medium-editor-anchor-preview-active")},100),r.observeAnchorPreview(t),r.anchorPreview.classList.add("medium-toolbar-arrow-over"),r.anchorPreview.classList.remove("medium-toolbar-arrow-under"),r.anchorPreview.style.top=Math.round(o+a.bottom-r.options.diffTop+this.options.contentWindow.pageYOffset-r.anchorPreview.offsetHeight)+"px",r.anchorPreview.style.left=e>s?n+e+"px":this.options.contentWindow.innerWidth-s<e?this.options.contentWindow.innerWidth+n-e+"px":n+s+"px",this},observeAnchorPreview:function(t){var e=this,n=(new Date).getTime(),i=!0,r=function(){n=(new Date).getTime(),i=!0},o=function(t){t.relatedTarget&&/anchor-preview/.test(t.relatedTarget.className)||(i=!1)},a=setInterval(function(){if(i)return!0;var s=(new Date).getTime()-n;s>e.options.anchorPreviewHideDelay&&(e.hideAnchorPreview(),clearInterval(a),e.off(e.anchorPreview,"mouseover",r),e.off(e.anchorPreview,"mouseout",o),e.off(t,"mouseover",r),e.off(t,"mouseout",o))},200);this.on(e.anchorPreview,"mouseover",r),this.on(e.anchorPreview,"mouseout",o),this.on(t,"mouseover",r),this.on(t,"mouseout",o)},createAnchorPreview:function(){var t=this,e=this.options.ownerDocument.createElement("div");return e.id="medium-editor-anchor-preview-"+this.id,e.className="medium-editor-anchor-preview",e.innerHTML=this.anchorPreviewTemplate(),this.options.elementsContainer.appendChild(e),this.on(e,"click",function(){t.anchorPreviewClickHandler()}),e},anchorPreviewTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <i class="medium-editor-toolbar-anchor-preview-inner"></i></div>'},anchorPreviewClickHandler:function(){if(this.activeAnchor){var t=this,e=this.options.ownerDocument.createRange(),n=this.options.contentWindow.getSelection();e.selectNodeContents(t.activeAnchor),n.removeAllRanges(),n.addRange(e),setTimeout(function(){t.activeAnchor&&t.showAnchorForm(t.activeAnchor.href),t.keepToolbarAlive=!1},100+t.options.delay)}this.hideAnchorPreview()},editorAnchorObserver:function(t){var e=this,n=!0,i=function(){n=!1,e.off(e.activeAnchor,"mouseout",i)};if(t.target&&"a"===t.target.tagName.toLowerCase()){if(!/href=["']\S+["']/.test(t.target.outerHTML)||/href=["']#\S+["']/.test(t.target.outerHTML))return!0;if(this.toolbar.classList.contains("medium-editor-toolbar-active"))return!0;this.activeAnchor=t.target,this.on(this.activeAnchor,"mouseout",i),setTimeout(function(){n&&e.showAnchorPreview(t.target)},e.options.delay)}},bindAnchorPreview:function(){var t,e=this;for(this.editorAnchorObserverWrapper=function(t){e.editorAnchorObserver(t)},t=0;t<this.elements.length;t+=1)this.on(this.elements[t],"mouseover",this.editorAnchorObserverWrapper);return this},checkLinkFormat:function(t){var e=/^(https?|ftps?|rtmpt?):\/\/|mailto:/;return(e.test(t)?"":"http://")+t},setTargetBlank:function(t){var e;if(t=t||s.call(this),"a"===t.tagName.toLowerCase())t.target="_blank";else for(t=t.getElementsByTagName("a"),e=0;e<t.length;e+=1)t[e].target="_blank"},setButtonClass:function(t){var e,n,i=s.call(this),r=t.split(" ");if("a"===i.tagName.toLowerCase())for(n=0;n<r.length;n+=1)i.classList.add(r[n]);else for(i=i.getElementsByTagName("a"),e=0;e<i.length;e+=1)for(n=0;n<r.length;n+=1)i[e].classList.add(r[n])},createLink:function(t,e,n){var i,r;if(0===t.value.trim().length)return void this.hideToolbarActions();if(a.call(this,this.savedSelection),this.options.checkLinkFormat&&(t.value=this.checkLinkFormat(t.value)),this.options.ownerDocument.execCommand("createLink",!1,t.value),(this.options.targetBlank||"_blank"===e)&&this.setTargetBlank(),n&&this.setButtonClass(n),this.options.targetBlank||"_blank"===e||n)for(r=this.options.ownerDocument.createEvent("HTMLEvents"),r.initEvent("input",!0,!0,this.options.contentWindow),i=0;i<this.elements.length;i+=1)this.elements[i].dispatchEvent(r);this.checkSelection(),this.showToolbarActions(),t.value=""},bindWindowActions:function(){var t,e=this;return this.windowResizeHandler=function(){clearTimeout(t),t=setTimeout(function(){e.toolbar&&e.toolbar.classList.contains("medium-editor-toolbar-active")&&e.setToolbarPosition()},100)},this.on(this.options.contentWindow,"resize",this.windowResizeHandler),this},activate:function(){this.isActive||this.setup()},deactivate:function(){var t;if(this.isActive){for(this.isActive=!1,void 0!==this.toolbar&&(this.options.elementsContainer.removeChild(this.anchorPreview),this.options.elementsContainer.removeChild(this.toolbar),delete this.toolbar,delete this.anchorPreview),t=0;t<this.elements.length;t+=1)this.elements[t].removeAttribute("contentEditable"),this.elements[t].removeAttribute("data-medium-element");this.removeAllEvents()}},htmlEntities:function(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},bindPaste:function(){var t,e=this;for(this.pasteWrapper=function(t){var n,i,r="";if(this.classList.remove("medium-editor-placeholder"),!e.options.forcePlainText&&!e.options.cleanPastedHTML)return this;if(t.clipboardData&&t.clipboardData.getData&&!t.defaultPrevented){if(t.preventDefault(),e.options.cleanPastedHTML&&t.clipboardData.getData("text/html"))return e.cleanPaste(t.clipboardData.getData("text/html"));if(e.options.disableReturn||this.getAttribute("data-disable-return"))r=e.htmlEntities(t.clipboardData.getData("text/plain")),e.options.ownerDocument.execCommand("insertHTML",!1,r);else{for(n=t.clipboardData.getData("text/plain").split(/[\r\n]/g),i=0;i<n.length;i+=1)""!==n[i]&&(r+=navigator.userAgent.match(/firefox/i)&&0===i?e.htmlEntities(n[i]):"<p>"+e.htmlEntities(n[i])+"</p>");e.options.ownerDocument.execCommand("insertHTML",!1,r)}}},t=0;t<this.elements.length;t+=1)this.on(this.elements[t],"paste",this.pasteWrapper);return this},setPlaceholders:function(){var t,e=function(t){t.querySelector("img")||t.querySelector("blockquote")||""!==t.textContent.replace(/^\s+|\s+$/g,"")||t.classList.add("medium-editor-placeholder")},n=function(t){this.classList.remove("medium-editor-placeholder"),"keypress"!==t.type&&e(this)};for(t=0;t<this.elements.length;t+=1)e(this.elements[t]),this.on(this.elements[t],"blur",n),this.on(this.elements[t],"keypress",n);return this},cleanPaste:function(t){var e,n,i,r=this.getSelectionElement(),o=/<p|<br|<div/.test(t),a=[[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:bold|font-weight:bold;font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:bold[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a\s+href=("|”|“|“|”)([^&]+)("|”|“|“|”)>/gi),'<a href="$2">']];for(e=0;e<a.length;e+=1)t=t.replace(a[e][0],a[e][1]);if(o)for(n=t.split("<br><br>"),this.pasteHTML("<p>"+n.join("</p><p>")+"</p>"),this.options.ownerDocument.execCommand("insertText",!1,"\n"),n=r.querySelectorAll("a,p,div,br"),e=0;e<n.length;e+=1)switch(i=n[e],i.tagName.toLowerCase()){case"a":this.options.targetBlank&&this.setTargetBlank(i);break;case"p":case"div":this.filterCommonBlocks(i);break;case"br":this.filterLineBreak(i)}else this.pasteHTML(t)},pasteHTML:function(t){var e,n,i,r,o=this.options.ownerDocument.createDocumentFragment();for(o.appendChild(this.options.ownerDocument.createElement("body")),r=o.querySelector("body"),r.innerHTML=t,this.cleanupSpans(r),e=r.querySelectorAll("*"),i=0;i<e.length;i+=1)n=e[i],n.removeAttribute("class"),n.removeAttribute("style"),n.removeAttribute("dir"),"meta"===n.tagName.toLowerCase()&&n.parentNode.removeChild(n);this.options.ownerDocument.execCommand("insertHTML",!1,r.innerHTML.replace(/ /g," "))},isCommonBlock:function(t){return t&&("p"===t.tagName.toLowerCase()||"div"===t.tagName.toLowerCase()) | ||
},filterCommonBlocks:function(t){/^\s*$/.test(t.innerText)&&t.parentNode.removeChild(t)},filterLineBreak:function(t){this.isCommonBlock(t.previousElementSibling)?t.parentNode.removeChild(t):!this.isCommonBlock(t.parentNode)||t.parentNode.firstChild!==t&&t.parentNode.lastChild!==t?1===t.parentNode.childElementCount&&this.removeWithParent(t):t.parentNode.removeChild(t)},removeWithParent:function(t){t&&t.parentNode&&(t.parentNode.parentNode&&1===t.parentNode.childElementCount?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t.parentNode))},cleanupSpans:function(t){var e,n,i,r=t.querySelectorAll(".replace-with");for(e=0;e<r.length;e+=1)n=r[e],i=this.options.ownerDocument.createElement(n.classList.contains("bold")?"b":"i"),i.innerHTML=n.classList.contains("bold")&&n.classList.contains("italic")?"<i>"+n.innerHTML+"</i>":n.innerHTML,n.parentNode.replaceChild(i,n);for(r=t.querySelectorAll("span"),e=0;e<r.length;e+=1)n=r[e],/^\s*$/.test()?n.parentNode.removeChild(n):n.parentNode.replaceChild(this.options.ownerDocument.createTextNode(n.innerText),n)}}}(window,document)},59:function(){}}); | ||
module.exports=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}({0:function(t,e,n){"use strict";var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(33),r=n(1);n(53);var a={defaultContent:function(){return{html:"",text:""}},render:function(){return r.createElement(o,i({onBlur:this.setContent},this.state.content))}};t.exports=a},1:function(t){t.exports=require("react")},33:function(t,e,n){"use strict";var i=n(34),o=n(1),r=o.PropTypes,a=o.createClass({displayName:"Editor",propTypes:{html:r.string.isRequired,onBlur:r.func.isRequired},getDefaultProps:function(){return{options:{buttons:["header1","header2","bold","italic","underline","anchor","quote","unorderedlist","orderedlist"],firstHeader:"h1",secondHeader:"h2",diffLeft:0,diffTop:-10,disableDoubleReturn:!0}}},shouldComponentUpdate:function(){return!1},componentDidMount:function(){this.setState({editor:new i(this.refs.editor.getDOMNode(),this.props.options)})},componentWillUnmount:function(){this.state.editor.deactivate()},render:function(){return o.createElement("div",{className:"col-block-medium"},o.createElement("div",{className:"col-medium",onBlur:this._onBlur,role:"textarea","aria-multiline":"true",ref:"editor",dangerouslySetInnerHTML:{__html:this.props.html}}))},_onBlur:function(){var t=this.refs.editor.getDOMNode();this.props.onBlur({text:t.textContent,html:t.innerHTML})}});t.exports=a},34:function(t){"use strict";function e(t,e){return this.init(t,e)}t.exports=e,function(t,n){function i(t,e){var n;if(void 0===t)return e;for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)===!1&&(t[n]=e[n]);return t}function o(t,e){for(var n=e.parentNode;null!==n;){if(n===t)return!0;n=n.parentNode}return!1}function r(){var t,e,n,i=this.options.contentWindow.getSelection();if(i.getRangeAt&&i.rangeCount){for(n=[],t=0,e=i.rangeCount;e>t;t+=1)n.push(i.getRangeAt(t));return n}return null}function a(t){var e,n,i=this.options.contentWindow.getSelection();if(t)for(i.removeAllRanges(),e=0,n=t.length;n>e;e+=1)i.addRange(t[e])}function s(){var t=this.options.ownerDocument.getSelection().anchorNode,e=t&&3===t.nodeType?t.parentNode:t;return e}function c(){var t,e,n,i,o="";if(void 0!==this.options.contentWindow.getSelection){if(e=this.options.contentWindow.getSelection(),e.rangeCount){for(i=this.options.ownerDocument.createElement("div"),t=0,n=e.rangeCount;n>t;t+=1)i.appendChild(e.getRangeAt(t).cloneContents());o=i.innerHTML}}else void 0!==this.options.ownerDocument.selection&&"Text"===this.options.ownerDocument.selection.type&&(o=this.options.ownerDocument.selection.createRange().htmlText);return o}function l(t){return!(!t||1!==t.nodeType)}e.prototype={defaults:{allowMultiParagraphSelection:!0,anchorInputPlaceholder:"Paste or type a link",anchorPreviewHideDelay:500,buttons:["bold","italic","underline","anchor","header1","header2","quote"],buttonLabels:!1,checkLinkFormat:!1,cleanPastedHTML:!1,delay:0,diffLeft:0,diffTop:-10,disableReturn:!1,disableDoubleReturn:!1,disableToolbar:!1,disableEditing:!1,elementsContainer:!1,contentWindow:t,ownerDocument:n,firstHeader:"h3",forcePlainText:!0,placeholder:"Type your text",secondHeader:"h4",targetBlank:!1,anchorTarget:!1,anchorButton:!1,anchorButtonClass:"btn",extensions:{},activeButtonClass:"medium-editor-button-active",firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last"},isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),init:function(t,e){return this.options=i(e,this.defaults),this.setElementSelection(t),0!==this.elements.length?(this.parentElements=["p","h1","h2","h3","h4","h5","h6","blockquote","pre"],this.options.elementsContainer||(this.options.elementsContainer=n.body),this.id=this.options.elementsContainer.querySelectorAll(".medium-editor-toolbar").length+1,this.setup()):void 0},setup:function(){this.events=[],this.isActive=!0,this.initElements().bindSelect().bindPaste().setPlaceholders().bindWindowActions().passInstance()},on:function(t,e,n,i){t.addEventListener(e,n,i),this.events.push([t,e,n,i])},off:function(t,e,n,i){var o,r=this.events.indexOf([t,e,n,i]);-1!==r&&(o=this.events.splice(r,1),o[0].removeEventListener(o[1],o[2],o[3]))},removeAllEvents:function(){for(var t=this.events.pop();t;)t[0].removeEventListener(t[1],t[2],t[3]),t=this.events.pop()},initElements:function(){this.updateElementList();var t,e=!1;for(t=0;t<this.elements.length;t+=1)this.options.disableEditing||this.elements[t].getAttribute("data-disable-editing")||this.elements[t].setAttribute("contentEditable",!0),this.elements[t].getAttribute("data-placeholder")||this.elements[t].setAttribute("data-placeholder",this.options.placeholder),this.elements[t].setAttribute("data-medium-element",!0),this.bindParagraphCreation(t).bindReturn(t).bindTab(t),this.options.disableToolbar||this.elements[t].getAttribute("data-disable-toolbar")||(e=!0);return e&&this.initToolbar().bindButtons().bindAnchorForm().bindAnchorPreview(),this},setElementSelection:function(t){this.elementSelection=t,this.updateElementList()},updateElementList:function(){this.elements="string"==typeof this.elementSelection?this.options.ownerDocument.querySelectorAll(this.elementSelection):this.elementSelection,1===this.elements.nodeType&&(this.elements=[this.elements])},serialize:function(){var t,e,n={};for(t=0;t<this.elements.length;t+=1)e=""!==this.elements[t].id?this.elements[t].id:"element-"+t,n[e]={value:this.elements[t].innerHTML.trim()};return n},callExtensions:function(t){if(!(arguments.length<1)){var e,n,i=Array.prototype.slice.call(arguments,1);for(n in this.options.extensions)this.options.extensions.hasOwnProperty(n)&&(e=this.options.extensions[n],void 0!==e[t]&&e[t].apply(e,i))}},passInstance:function(){var t,e,n=this;for(e in n.options.extensions)n.options.extensions.hasOwnProperty(e)&&(t=n.options.extensions[e],t.parent&&(t.base=n));return n},bindParagraphCreation:function(t){var e=this;return this.on(this.elements[t],"keypress",function(t){var i,o=s.call(e);32===t.which&&(i=o.tagName.toLowerCase(),"a"===i&&n.execCommand("unlink",!1,null))}),this.on(this.elements[t],"keyup",function(t){var i,o,r=s.call(e);r&&r.getAttribute("data-medium-element")&&0===r.children.length&&!e.options.disableReturn&&!r.getAttribute("data-disable-return")&&n.execCommand("formatBlock",!1,"p"),13===t.which&&(r=s.call(e),i=r.tagName.toLowerCase(),o=e.getSelectionElement(),e.options.disableReturn||o.getAttribute("data-disable-return")||"li"===i||e.isListItemChild(r)||(t.shiftKey||n.execCommand("formatBlock",!1,"p"),"a"===i&&n.execCommand("unlink",!1,null)))}),this},isListItemChild:function(t){for(var e=t.parentNode,n=e.tagName.toLowerCase();-1===this.parentElements.indexOf(n)&&"div"!==n;){if("li"===n)return!0;if(e=e.parentNode,!e||!e.tagName)return!1;n=e.tagName.toLowerCase()}return!1},bindReturn:function(t){var e=this;return this.on(this.elements[t],"keypress",function(t){if(13===t.which)if(e.options.disableReturn||this.getAttribute("data-disable-return"))t.preventDefault();else if(e.options.disableDoubleReturn||this.getAttribute("data-disable-double-return")){var n=s.call(e);n&&"\n"===n.innerText&&t.preventDefault()}}),this},bindTab:function(t){var e=this;return this.on(this.elements[t],"keydown",function(t){if(9===t.which){var i=s.call(e).tagName.toLowerCase();"pre"===i&&(t.preventDefault(),n.execCommand("insertHtml",null," ")),"li"===i&&(t.preventDefault(),t.shiftKey?n.execCommand("outdent",t):n.execCommand("indent",t))}}),this},buttonTemplate:function(t){var e=this.getButtonLabels(this.options.buttonLabels),n={bold:'<button class="medium-editor-action medium-editor-action-bold" data-action="bold" data-element="b">'+e.bold+"</button>",italic:'<button class="medium-editor-action medium-editor-action-italic" data-action="italic" data-element="i">'+e.italic+"</button>",underline:'<button class="medium-editor-action medium-editor-action-underline" data-action="underline" data-element="u">'+e.underline+"</button>",strikethrough:'<button class="medium-editor-action medium-editor-action-strikethrough" data-action="strikethrough" data-element="strike">'+e.strikethrough+"</button>",superscript:'<button class="medium-editor-action medium-editor-action-superscript" data-action="superscript" data-element="sup">'+e.superscript+"</button>",subscript:'<button class="medium-editor-action medium-editor-action-subscript" data-action="subscript" data-element="sub">'+e.subscript+"</button>",anchor:'<button class="medium-editor-action medium-editor-action-anchor" data-action="anchor" data-element="a">'+e.anchor+"</button>",image:'<button class="medium-editor-action medium-editor-action-image" data-action="image" data-element="img">'+e.image+"</button>",header1:'<button class="medium-editor-action medium-editor-action-header1" data-action="append-'+this.options.firstHeader+'" data-element="'+this.options.firstHeader+'">'+e.header1+"</button>",header2:'<button class="medium-editor-action medium-editor-action-header2" data-action="append-'+this.options.secondHeader+'" data-element="'+this.options.secondHeader+'">'+e.header2+"</button>",quote:'<button class="medium-editor-action medium-editor-action-quote" data-action="append-blockquote" data-element="blockquote">'+e.quote+"</button>",orderedlist:'<button class="medium-editor-action medium-editor-action-orderedlist" data-action="insertorderedlist" data-element="ol">'+e.orderedlist+"</button>",unorderedlist:'<button class="medium-editor-action medium-editor-action-unorderedlist" data-action="insertunorderedlist" data-element="ul">'+e.unorderedlist+"</button>",pre:'<button class="medium-editor-action medium-editor-action-pre" data-action="append-pre" data-element="pre">'+e.pre+"</button>",indent:'<button class="medium-editor-action medium-editor-action-indent" data-action="indent" data-element="ul">'+e.indent+"</button>",outdent:'<button class="medium-editor-action medium-editor-action-outdent" data-action="outdent" data-element="ul">'+e.outdent+"</button>",justifyCenter:'<button class="medium-editor-action medium-editor-action-justifyCenter" data-action="justifyCenter" data-element="">'+e.justifyCenter+"</button>",justifyFull:'<button class="medium-editor-action medium-editor-action-justifyFull" data-action="justifyFull" data-element="">'+e.justifyFull+"</button>",justifyLeft:'<button class="medium-editor-action medium-editor-action-justifyLeft" data-action="justifyLeft" data-element="">'+e.justifyLeft+"</button>",justifyRight:'<button class="medium-editor-action medium-editor-action-justifyRight" data-action="justifyRight" data-element="">'+e.justifyRight+"</button>"};return n[t]||!1},getButtonLabels:function(t){var e,n,i={bold:"<b>B</b>",italic:"<b><i>I</i></b>",underline:"<b><u>U</u></b>",strikethrough:"<s>A</s>",superscript:"<b>x<sup>1</sup></b>",subscript:"<b>x<sub>1</sub></b>",anchor:"<b>#</b>",image:"<b>image</b>",header1:"<b>H1</b>",header2:"<b>H2</b>",quote:"<b>“</b>",orderedlist:"<b>1.</b>",unorderedlist:"<b>•</b>",pre:"<b>0101</b>",indent:"<b>→</b>",outdent:"<b>←</b>",justifyCenter:"<b>C</b>",justifyFull:"<b>J</b>",justifyLeft:"<b>L</b>",justifyRight:"<b>R</b>"};if("fontawesome"===t?e={bold:'<i class="fa fa-bold"></i>',italic:'<i class="fa fa-italic"></i>',underline:'<i class="fa fa-underline"></i>',strikethrough:'<i class="fa fa-strikethrough"></i>',superscript:'<i class="fa fa-superscript"></i>',subscript:'<i class="fa fa-subscript"></i>',anchor:'<i class="fa fa-link"></i>',image:'<i class="fa fa-picture-o"></i>',quote:'<i class="fa fa-quote-right"></i>',orderedlist:'<i class="fa fa-list-ol"></i>',unorderedlist:'<i class="fa fa-list-ul"></i>',pre:'<i class="fa fa-code fa-lg"></i>',indent:'<i class="fa fa-indent"></i>',outdent:'<i class="fa fa-outdent"></i>',justifyCenter:'<i class="fa fa-align-center"></i>',justifyFull:'<i class="fa fa-align-justify"></i>',justifyLeft:'<i class="fa fa-align-left"></i>',justifyRight:'<i class="fa fa-align-right"></i>'}:"object"==typeof t&&(e=t),"object"==typeof e)for(n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i},initToolbar:function(){return this.toolbar?this:(this.toolbar=this.createToolbar(),this.keepToolbarAlive=!1,this.anchorForm=this.toolbar.querySelector(".medium-editor-toolbar-form-anchor"),this.anchorInput=this.anchorForm.querySelector("input.medium-editor-toolbar-anchor-input"),this.anchorTarget=this.anchorForm.querySelector("input.medium-editor-toolbar-anchor-target"),this.anchorButton=this.anchorForm.querySelector("input.medium-editor-toolbar-anchor-button"),this.toolbarActions=this.toolbar.querySelector(".medium-editor-toolbar-actions"),this.anchorPreview=this.createAnchorPreview(),this)},createToolbar:function(){var t=n.createElement("div");return t.id="medium-editor-toolbar-"+this.id,t.className="medium-editor-toolbar",t.appendChild(this.toolbarButtons()),t.appendChild(this.toolbarFormAnchor()),this.options.elementsContainer.appendChild(t),t},toolbarButtons:function(){var t,e,i,o,r=this.options.buttons,a=n.createElement("ul");for(a.id="medium-editor-toolbar-actions",a.className="medium-editor-toolbar-actions clearfix",e=0;e<r.length;e+=1)this.options.extensions.hasOwnProperty(r[e])?(o=this.options.extensions[r[e]],i=void 0!==o.getButton?o.getButton():null):i=this.buttonTemplate(r[e]),i&&(t=n.createElement("li"),l(i)?t.appendChild(i):t.innerHTML=i,a.appendChild(t));return a},toolbarFormAnchor:function(){var t=n.createElement("div"),e=n.createElement("input"),i=n.createElement("label"),o=n.createElement("input"),r=n.createElement("label"),a=n.createElement("input"),s=n.createElement("a"),c=n.createElement("a");return s.setAttribute("href","#"),s.className="medium-editor-toobar-anchor-close",s.innerHTML="×",c.setAttribute("href","#"),c.className="medium-editor-toobar-anchor-save",c.innerHTML="✓",e.setAttribute("type","text"),e.className="medium-editor-toolbar-anchor-input",e.setAttribute("placeholder",this.options.anchorInputPlaceholder),o.setAttribute("type","checkbox"),o.className="medium-editor-toolbar-anchor-target",i.innerHTML="Open in New Window?",i.insertBefore(o,i.firstChild),a.setAttribute("type","checkbox"),a.className="medium-editor-toolbar-anchor-button",r.innerHTML="Button",r.insertBefore(a,r.firstChild),t.className="medium-editor-toolbar-form-anchor",t.id="medium-editor-toolbar-form-anchor",t.appendChild(e),t.appendChild(c),t.appendChild(s),this.options.anchorTarget&&t.appendChild(i),this.options.anchorButton&&t.appendChild(r),t},bindSelect:function(){var t,e=this,i="";for(this.checkSelectionWrapper=function(t){return t&&e.clickingIntoArchorForm(t)?!1:(clearTimeout(i),void(i=setTimeout(function(){e.checkSelection()},e.options.delay)))},this.on(n.documentElement,"mouseup",this.checkSelectionWrapper),t=0;t<this.elements.length;t+=1)this.on(this.elements[t],"keyup",this.checkSelectionWrapper),this.on(this.elements[t],"blur",this.checkSelectionWrapper);return this},checkSelection:function(){var t,e;return this.keepToolbarAlive===!0||this.options.disableToolbar||(t=this.options.contentWindow.getSelection(),""===t.toString().trim()||this.options.allowMultiParagraphSelection===!1&&this.hasMultiParagraphs()||this.selectionInContentEditableFalse()?this.hideToolbarActions():(e=this.getSelectionElement(),!e||e.getAttribute("data-disable-toolbar")?this.hideToolbarActions():this.checkSelectionElement(t,e))),this},clickingIntoArchorForm:function(t){var e=this;return t.type&&"blur"===t.type.toLowerCase()&&t.relatedTarget&&t.relatedTarget===e.anchorInput?!0:!1},hasMultiParagraphs:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){var t=c.call(this).replace(/<[\S]+><\/[\S]+>/gim,""),e=t.match(/<(p|h[0-6]|blockquote)>([\s\S]*?)<\/(p|h[0-6]|blockquote)>/g);return e?e.length:0}),checkSelectionElement:function(t,e){var n;for(this.selection=t,this.selectionRange=this.selection.getRangeAt(0),n=0;n<this.elements.length;n+=1)if(this.elements[n]===e)return void this.setToolbarButtonStates().setToolbarPosition().showToolbarActions();this.hideToolbarActions()},findMatchingSelectionParent:function(t){var e,n,i=this.options.contentWindow.getSelection();if(0===i.rangeCount)return!1;e=i.getRangeAt(0),n=e.commonAncestorContainer;do{if(1===n.nodeType){if(t(n))return n;if(n.getAttribute("data-medium-element"))return!1}n=n.parentNode}while(n);return!1},getSelectionElement:function(){return this.findMatchingSelectionParent(function(t){return t.getAttribute("data-medium-element")})},selectionInContentEditableFalse:function(){return this.findMatchingSelectionParent(function(t){return t&&"#text"!==t.nodeName&&"false"===t.getAttribute("contenteditable")})},setToolbarPosition:function(){var t=50,e=this.options.contentWindow.getSelection(),n=e.getRangeAt(0),i=n.getBoundingClientRect(),o=this.options.diffLeft-this.toolbar.offsetWidth/2,r=(i.left+i.right)/2,a=this.toolbar.offsetWidth/2;return i.top<t?(this.toolbar.classList.add("medium-toolbar-arrow-over"),this.toolbar.classList.remove("medium-toolbar-arrow-under"),this.toolbar.style.top=t+i.bottom-this.options.diffTop+this.options.contentWindow.pageYOffset-this.toolbar.offsetHeight+"px"):(this.toolbar.classList.add("medium-toolbar-arrow-under"),this.toolbar.classList.remove("medium-toolbar-arrow-over"),this.toolbar.style.top=i.top+this.options.diffTop+this.options.contentWindow.pageYOffset-this.toolbar.offsetHeight+"px"),this.toolbar.style.left=a>r?o+a+"px":this.options.contentWindow.innerWidth-r<a?this.options.contentWindow.innerWidth+o-a+"px":o+r+"px",this.hideAnchorPreview(),this},setToolbarButtonStates:function(){var t,e=this.toolbarActions.querySelectorAll("button");for(t=0;t<e.length;t+=1)e[t].classList.remove(this.options.activeButtonClass);return this.checkActiveButtons(),this},checkActiveButtons:function(){for(var t=Array.prototype.slice.call(this.elements),e=this.getSelectedParentElement();void 0!==e.tagName&&-1===this.parentElements.indexOf(e.tagName.toLowerCase)&&(this.activateButton(e.tagName.toLowerCase()),this.callExtensions("checkState",e),-1===t.indexOf(e));)e=e.parentNode},activateButton:function(t){var e=this.toolbar.querySelector('[data-element="'+t+'"]');null!==e&&-1===e.className.indexOf(this.options.activeButtonClass)&&(e.className+=" "+this.options.activeButtonClass)},bindButtons:function(){var t,e=this.toolbar.querySelectorAll("button"),n=this,i=function(t){t.preventDefault(),t.stopPropagation(),void 0===n.selection&&n.checkSelection(),this.className.indexOf(n.options.activeButtonClass)>-1?this.classList.remove(n.options.activeButtonClass):this.className+=" "+n.options.activeButtonClass,this.hasAttribute("data-action")&&n.execAction(this.getAttribute("data-action"),t)};for(t=0;t<e.length;t+=1)this.on(e[t],"click",i);return this.setFirstAndLastItems(e),this},setFirstAndLastItems:function(t){return t.length>0&&(t[0].className+=" "+this.options.firstButtonClass,t[t.length-1].className+=" "+this.options.lastButtonClass),this},execAction:function(t,e){t.indexOf("append-")>-1?(this.execFormatBlock(t.replace("append-","")),this.setToolbarPosition(),this.setToolbarButtonStates()):"anchor"===t?this.triggerAnchorAction(e):"image"===t?this.options.ownerDocument.execCommand("insertImage",!1,this.options.contentWindow.getSelection()):(this.options.ownerDocument.execCommand(t,!1,null),this.setToolbarPosition())},rangeSelectsSingleNode:function(t){var e=t.startContainer;return e===t.endContainer&&e.hasChildNodes()&&t.endOffset===t.startOffset+1},getSelectedParentElement:function(){var t=null,e=this.selectionRange;return t=this.rangeSelectsSingleNode(e)?e.startContainer.childNodes[e.startOffset]:3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer},triggerAnchorAction:function(){var t=this.getSelectedParentElement();return t.tagName&&"a"===t.tagName.toLowerCase()?this.options.ownerDocument.execCommand("unlink",!1,null):"block"===this.anchorForm.style.display?this.showToolbarActions():this.showAnchorForm(),this},execFormatBlock:function(t){var e=this.getSelectionData(this.selection.anchorNode);if("blockquote"===t&&e.el&&"blockquote"===e.el.parentNode.tagName.toLowerCase())return this.options.ownerDocument.execCommand("outdent",!1,null);if(e.tagName===t&&(t="p"),this.isIE){if("blockquote"===t)return this.options.ownerDocument.execCommand("indent",!1,t);t="<"+t+">"}return this.options.ownerDocument.execCommand("formatBlock",!1,t)},getSelectionData:function(t){var e;for(t&&t.tagName&&(e=t.tagName.toLowerCase());t&&-1===this.parentElements.indexOf(e);)t=t.parentNode,t&&t.tagName&&(e=t.tagName.toLowerCase());return{el:t,tagName:e}},getFirstChild:function(t){for(var e=t.firstChild;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},hideToolbarActions:function(){this.keepToolbarAlive=!1,void 0!==this.toolbar&&this.toolbar.classList.remove("medium-editor-toolbar-active")},showToolbarActions:function(){var t,e=this;this.anchorForm.style.display="none",this.toolbarActions.style.display="block",this.keepToolbarAlive=!1,clearTimeout(t),t=setTimeout(function(){e.toolbar&&!e.toolbar.classList.contains("medium-editor-toolbar-active")&&e.toolbar.classList.add("medium-editor-toolbar-active")},100)},saveSelection:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){this.savedSelection=r.call(this)}),restoreSelection:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){a.call(this,this.savedSelection)}),showAnchorForm:function(t){this.toolbarActions.style.display="none",this.saveSelection(),this.anchorForm.style.display="block",this.setToolbarPosition(),this.keepToolbarAlive=!0,this.anchorInput.focus(),this.anchorInput.value=t||""},bindAnchorForm:function(){var t=this.anchorForm.querySelector("a.medium-editor-toobar-anchor-close"),e=this.anchorForm.querySelector("a.medium-editor-toobar-anchor-save"),n=this;return this.on(this.anchorForm,"click",function(t){t.stopPropagation(),n.keepToolbarAlive=!0}),this.on(this.anchorInput,"keyup",function(t){var e,i=null;13===t.keyCode&&(t.preventDefault(),e=n.options.anchorTarget&&n.anchorTarget.checked?"_blank":"_self",n.options.anchorButton&&n.anchorButton.checked&&(i=n.options.anchorButtonClass),n.createLink(this,e,i))}),this.on(e,"click",function(t){var e,i=null;t.preventDefault(),e=n.options.anchorTarget&&n.anchorTarget.checked?"_blank":"_self",n.options.anchorButton&&n.anchorButton.checked&&(i=n.options.anchorButtonClass),n.createLink(n.anchorInput,e,i)},!0),this.on(this.anchorInput,"click",function(t){t.stopPropagation(),n.keepToolbarAlive=!0}),this.on(this.options.ownerDocument.body,"click",function(t){t.target===n.anchorForm||o(n.anchorForm,t.target)||o(n.toolbarActions,t.target)||(n.keepToolbarAlive=!1,n.checkSelection())},!0),this.on(this.options.ownerDocument.body,"focus",function(t){t.target===n.anchorForm||o(n.anchorForm,t.target)||o(n.toolbarActions,t.target)||(n.keepToolbarAlive=!1,n.checkSelection())},!0),this.on(t,"click",function(t){t.preventDefault(),n.showToolbarActions(),a.call(n,n.savedSelection)}),this},hideAnchorPreview:function(){this.anchorPreview.classList.remove("medium-editor-anchor-preview-active")},showAnchorPreview:function(t){if(this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||t.getAttribute("data-disable-preview"))return!0;var e,n,i,o=this,r=40,a=t.getBoundingClientRect(),s=(a.left+a.right)/2;return o.anchorPreview.querySelector("i").textContent=t.href,e=o.anchorPreview.offsetWidth/2,n=o.options.diffLeft-e,clearTimeout(i),i=setTimeout(function(){o.anchorPreview&&!o.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&o.anchorPreview.classList.add("medium-editor-anchor-preview-active")},100),o.observeAnchorPreview(t),o.anchorPreview.classList.add("medium-toolbar-arrow-over"),o.anchorPreview.classList.remove("medium-toolbar-arrow-under"),o.anchorPreview.style.top=Math.round(r+a.bottom-o.options.diffTop+this.options.contentWindow.pageYOffset-o.anchorPreview.offsetHeight)+"px",o.anchorPreview.style.left=e>s?n+e+"px":this.options.contentWindow.innerWidth-s<e?this.options.contentWindow.innerWidth+n-e+"px":n+s+"px",this},observeAnchorPreview:function(t){var e=this,n=(new Date).getTime(),i=!0,o=function(){n=(new Date).getTime(),i=!0},r=function(t){t.relatedTarget&&/anchor-preview/.test(t.relatedTarget.className)||(i=!1)},a=setInterval(function(){if(i)return!0;var s=(new Date).getTime()-n;s>e.options.anchorPreviewHideDelay&&(e.hideAnchorPreview(),clearInterval(a),e.off(e.anchorPreview,"mouseover",o),e.off(e.anchorPreview,"mouseout",r),e.off(t,"mouseover",o),e.off(t,"mouseout",r))},200);this.on(e.anchorPreview,"mouseover",o),this.on(e.anchorPreview,"mouseout",r),this.on(t,"mouseover",o),this.on(t,"mouseout",r)},createAnchorPreview:function(){var t=this,e=this.options.ownerDocument.createElement("div");return e.id="medium-editor-anchor-preview-"+this.id,e.className="medium-editor-anchor-preview",e.innerHTML=this.anchorPreviewTemplate(),this.options.elementsContainer.appendChild(e),this.on(e,"click",function(){t.anchorPreviewClickHandler()}),e},anchorPreviewTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <i class="medium-editor-toolbar-anchor-preview-inner"></i></div>'},anchorPreviewClickHandler:function(){if(this.activeAnchor){var t=this,e=this.options.ownerDocument.createRange(),n=this.options.contentWindow.getSelection();e.selectNodeContents(t.activeAnchor),n.removeAllRanges(),n.addRange(e),setTimeout(function(){t.activeAnchor&&t.showAnchorForm(t.activeAnchor.href),t.keepToolbarAlive=!1},100+t.options.delay)}this.hideAnchorPreview()},editorAnchorObserver:function(t){var e=this,n=!0,i=function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){n=!1,e.off(e.activeAnchor,"mouseout",i)});if(t.target&&"a"===t.target.tagName.toLowerCase()){if(!/href=["']\S+["']/.test(t.target.outerHTML)||/href=["']#\S+["']/.test(t.target.outerHTML))return!0;if(this.toolbar.classList.contains("medium-editor-toolbar-active"))return!0;this.activeAnchor=t.target,this.on(this.activeAnchor,"mouseout",i),setTimeout(function(){n&&e.showAnchorPreview(t.target)},e.options.delay)}},bindAnchorPreview:function(){var t,e=this;for(this.editorAnchorObserverWrapper=function(t){e.editorAnchorObserver(t)},t=0;t<this.elements.length;t+=1)this.on(this.elements[t],"mouseover",this.editorAnchorObserverWrapper);return this},checkLinkFormat:function(t){var e=/^(https?|ftps?|rtmpt?):\/\/|mailto:/;return(e.test(t)?"":"http://")+t},setTargetBlank:function(t){var e;if(t=t||s.call(this),"a"===t.tagName.toLowerCase())t.target="_blank";else for(t=t.getElementsByTagName("a"),e=0;e<t.length;e+=1)t[e].target="_blank"},setButtonClass:function(t){var e,n,i=s.call(this),o=t.split(" ");if("a"===i.tagName.toLowerCase())for(n=0;n<o.length;n+=1)i.classList.add(o[n]);else for(i=i.getElementsByTagName("a"),e=0;e<i.length;e+=1)for(n=0;n<o.length;n+=1)i[e].classList.add(o[n])},createLink:function(t,e,n){var i,o;if(0===t.value.trim().length)return void this.hideToolbarActions();if(a.call(this,this.savedSelection),this.options.checkLinkFormat&&(t.value=this.checkLinkFormat(t.value)),this.options.ownerDocument.execCommand("createLink",!1,t.value),(this.options.targetBlank||"_blank"===e)&&this.setTargetBlank(),n&&this.setButtonClass(n),this.options.targetBlank||"_blank"===e||n)for(o=this.options.ownerDocument.createEvent("HTMLEvents"),o.initEvent("input",!0,!0,this.options.contentWindow),i=0;i<this.elements.length;i+=1)this.elements[i].dispatchEvent(o);this.checkSelection(),this.showToolbarActions(),t.value=""},bindWindowActions:function(){var t,e=this;return this.windowResizeHandler=function(){clearTimeout(t),t=setTimeout(function(){e.toolbar&&e.toolbar.classList.contains("medium-editor-toolbar-active")&&e.setToolbarPosition()},100)},this.on(this.options.contentWindow,"resize",this.windowResizeHandler),this},activate:function(){this.isActive||this.setup()},deactivate:function(){var t;if(this.isActive){for(this.isActive=!1,void 0!==this.toolbar&&(this.options.elementsContainer.removeChild(this.anchorPreview),this.options.elementsContainer.removeChild(this.toolbar),delete this.toolbar,delete this.anchorPreview),t=0;t<this.elements.length;t+=1)this.elements[t].removeAttribute("contentEditable"),this.elements[t].removeAttribute("data-medium-element");this.removeAllEvents()}},htmlEntities:function(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},bindPaste:function(){var t,e=this;for(this.pasteWrapper=function(t){var n,i,o="";if(this.classList.remove("medium-editor-placeholder"),!e.options.forcePlainText&&!e.options.cleanPastedHTML)return this;if(t.clipboardData&&t.clipboardData.getData&&!t.defaultPrevented){if(t.preventDefault(),e.options.cleanPastedHTML&&t.clipboardData.getData("text/html"))return e.cleanPaste(t.clipboardData.getData("text/html"));if(e.options.disableReturn||this.getAttribute("data-disable-return"))o=e.htmlEntities(t.clipboardData.getData("text/plain")),e.options.ownerDocument.execCommand("insertHTML",!1,o);else{for(n=t.clipboardData.getData("text/plain").split(/[\r\n]/g),i=0;i<n.length;i+=1)""!==n[i]&&(o+=navigator.userAgent.match(/firefox/i)&&0===i?e.htmlEntities(n[i]):"<p>"+e.htmlEntities(n[i])+"</p>");e.options.ownerDocument.execCommand("insertHTML",!1,o)}}},t=0;t<this.elements.length;t+=1)this.on(this.elements[t],"paste",this.pasteWrapper);return this},setPlaceholders:function(){var t,e=function(t){t.querySelector("img")||t.querySelector("blockquote")||""!==t.textContent.replace(/^\s+|\s+$/g,"")||t.classList.add("medium-editor-placeholder")},n=function(t){this.classList.remove("medium-editor-placeholder"),"keypress"!==t.type&&e(this)};for(t=0;t<this.elements.length;t+=1)e(this.elements[t]),this.on(this.elements[t],"blur",n),this.on(this.elements[t],"keypress",n);return this},cleanPaste:function(t){var e,n,i,o=this.getSelectionElement(),r=/<p|<br|<div/.test(t),a=[[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:bold|font-weight:bold;font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:bold[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a\s+href=("|”|“|“|”)([^&]+)("|”|“|“|”)>/gi),'<a href="$2">']];for(e=0;e<a.length;e+=1)t=t.replace(a[e][0],a[e][1]);if(r)for(n=t.split("<br><br>"),this.pasteHTML("<p>"+n.join("</p><p>")+"</p>"),this.options.ownerDocument.execCommand("insertText",!1,"\n"),n=o.querySelectorAll("a,p,div,br"),e=0;e<n.length;e+=1)switch(i=n[e],i.tagName.toLowerCase()){case"a":this.options.targetBlank&&this.setTargetBlank(i);break;case"p":case"div":this.filterCommonBlocks(i);break;case"br":this.filterLineBreak(i)}else this.pasteHTML(t)},pasteHTML:function(t){var e,n,i,o,r=this.options.ownerDocument.createDocumentFragment();for(r.appendChild(this.options.ownerDocument.createElement("body")),o=r.querySelector("body"),o.innerHTML=t,this.cleanupSpans(o),e=o.querySelectorAll("*"),i=0;i<e.length;i+=1)n=e[i],n.removeAttribute("class"),n.removeAttribute("style"),n.removeAttribute("dir"),"meta"===n.tagName.toLowerCase()&&n.parentNode.removeChild(n);this.options.ownerDocument.execCommand("insertHTML",!1,o.innerHTML.replace(/ /g," ")) | ||
},isCommonBlock:function(t){return t&&("p"===t.tagName.toLowerCase()||"div"===t.tagName.toLowerCase())},filterCommonBlocks:function(t){/^\s*$/.test(t.innerText)&&t.parentNode.removeChild(t)},filterLineBreak:function(t){this.isCommonBlock(t.previousElementSibling)?t.parentNode.removeChild(t):!this.isCommonBlock(t.parentNode)||t.parentNode.firstChild!==t&&t.parentNode.lastChild!==t?1===t.parentNode.childElementCount&&this.removeWithParent(t):t.parentNode.removeChild(t)},removeWithParent:function(t){t&&t.parentNode&&(t.parentNode.parentNode&&1===t.parentNode.childElementCount?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t.parentNode))},cleanupSpans:function(t){var e,n,i,o=t.querySelectorAll(".replace-with");for(e=0;e<o.length;e+=1)n=o[e],i=this.options.ownerDocument.createElement(n.classList.contains("bold")?"b":"i"),i.innerHTML=n.classList.contains("bold")&&n.classList.contains("italic")?"<i>"+n.innerHTML+"</i>":n.innerHTML,n.parentNode.replaceChild(i,n);for(o=t.querySelectorAll("span"),e=0;e<o.length;e+=1)n=o[e],/^\s*$/.test()?n.parentNode.removeChild(n):n.parentNode.replaceChild(this.options.ownerDocument.createTextNode(n.innerText),n)}}}(window,document)},53:function(){}}); | ||
//# sourceMappingURL=medium.js.map |
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(34),o=r(35),a=r(1);r(60);var s={defaultContent:function(){return{video_id:""}},renderEditor:function(){return a.createElement(i,n({onChange:this.setContent},this.state.content))},renderPreviewer:function(){return a.createElement(o,this.state.content)}};e.exports=s},1:function(e){e.exports=require("react")},9:function(e,t,r){"use strict";var n=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(1),a=o.createClass({displayName:"Field",getDefaultProps:function(){return{type:"text"}},render:function(){var e=this.props,t=e.label,r=e.name,a=e.type,s=n(e,["label","name","type"]);return o.createElement("div",{className:"col-img-field"},o.createElement("label",{className:"col-img-label",htmlFor:r||this.props.id},t),o.createElement("input",i({className:"col-img-input",type:a},s,{name:r||this.props.id})))}});e.exports=a},13:function(e,t,r){"use strict";var n=r(1),i="https://www.youtube.com/embed/",o=n.createClass({displayName:"Player",render:function(){var e=this.props.video_id;return e?n.createElement("div",{className:"col-youtube-player"},n.createElement("iframe",{className:"col-youtube-frame",src:i+e,frameBorder:"0",allowFullScreen:!0})):null}});e.exports=o},34:function(e,t,r){"use strict";var n=r(9),i=r(13),o=r(1),a=o.PropTypes,s=o.createClass({displayName:"Editor",propTypes:{src:a.string,onChange:a.func.isRequired},render:function(){var e=this.props.video_id;return o.createElement("div",{className:"col-youtube"},o.createElement(i,{video_id:e}),o.createElement("fieldset",{className:"col-youtube-fieldset"},o.createElement(n,{label:"YouTube Video ID",value:e,name:"youtube_video_id",onChange:this._onChange})))},_onChange:function(e){this.props.onChange({video_id:e.currentTarget.value})}});e.exports=s},35:function(e,t,r){"use strict";var n=r(1),i=r(13),o=n.createClass({displayName:"Previewer",render:function(){return n.createElement("div",{className:"col-youtube"},n.createElement(i,{src:this.props.src}))}});e.exports=o},60:function(){}}); | ||
module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}({0:function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(35),o=n(1);n(54);var a={defaultContent:function(){return{video_id:""}},render:function(){return o.createElement(i,r({onChange:this.setContent},this.state.content))}};t.exports=a},1:function(t){t.exports=require("react")},6:function(t,e,n){"use strict";var r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(1),a=o.createClass({displayName:"Field",getDefaultProps:function(){return{type:"text"}},render:function(){var t=this.props,e=t.label,n=t.name,a=t.type,s=r(t,["label","name","type"]);return o.createElement("div",{className:"col-img-field"},o.createElement("label",{className:"col-img-label",htmlFor:n||this.props.id},e),o.createElement("input",i({className:"col-img-input",type:a},s,{name:n||this.props.id})))}});t.exports=a},35:function(t,e,n){"use strict";var r=n(6),i=n(36),o=n(1),a=o.PropTypes,s=o.createClass({displayName:"Editor",propTypes:{src:a.string,onChange:a.func.isRequired},render:function(){var t=this.props.video_id;return o.createElement("div",{className:"col-youtube"},o.createElement(i,{video_id:t}),o.createElement("fieldset",{className:"col-youtube-fieldset"},o.createElement(r,{label:"YouTube Video ID",value:t,name:"youtube_video_id",onChange:this._onChange})))},_onChange:function(t){this.props.onChange({video_id:t.currentTarget.value})}});t.exports=s},36:function(t,e,n){"use strict";var r=n(1),i="https://www.youtube.com/embed/",o=r.createClass({displayName:"Player",render:function(){var t=this.props.video_id;return t?r.createElement("div",{className:"col-youtube-player"},r.createElement("iframe",{className:"col-youtube-frame",src:i+t,frameBorder:"0",allowFullScreen:!0})):null}});t.exports=o},54:function(){}}); | ||
//# sourceMappingURL=youtube.js.map |
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(37),s=r(11),c=r(19),u=r(25),l=r(1),p=r(51),f=r(27);r(61);var d=function(){function e(t){var r=this;o(this,e),this.id=f(),this.el=t.el,this._callbacks=[],c(n({id:this.id,block:p(void 0,t.seed||[])},t)),s.subscribe(function(){return r.simulateChange()}),setTimeout(this.simulateChange.bind(this),10)}return i(e,null,{render:{value:function(){return l.render(this._rootComponent(),this._getDomElement()),this},writable:!0,configurable:!0},simulateChange:{value:function(){this._runCallbacks()},writable:!0,configurable:!0},addCallback:{value:function(e){this._callbacks=this._callbacks.concat(e)},writable:!0,configurable:!0},removeCallback:{value:function(e){this._callbacks=this._callbacks.filter(function(t){return t!==e})},writable:!0,configurable:!0},toJSON:{value:function(){return u.find(this.id).block.toJSON().blocks},writable:!0,configurable:!0},toHtml:{value:function(){return l.renderToStaticMarkup(this._rootComponent())},writable:!0,configurable:!0},_rootComponent:{value:function(){return l.createElement(a,{editorId:this.id})},writable:!0,configurable:!0},_getDomElement:{value:function(){return this.el},writable:!0,configurable:!0},_runCallbacks:{value:function(){var e=this.toJSON();this._callbacks.forEach(function(t){t(e)})},writable:!0,configurable:!0}}),e}();d.createBlock=r(26),d.addBlockType=r(49),e.exports=d},function(e){e.exports=require("react")},function(e,t,r){"use strict";var n=r(52).Dispatcher;e.exports=new n},function(e,t,r){"use strict";var n=r(56);e.exports=n({EDIT_MODE:null,PREVIEW_MODE:null})},function(e){"use strict";var t=function(e,t,r,n,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){"use strict";var n=r(6),i=r(1),o=r(8);e.exports={mixins:[o],propTypes:{block:i.PropTypes.any.isRequired},getState:function(){return{blocks:n.childrenFor(this.props.block)}}}},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(11),o=r(48),a=r(2),s=r(4),c=[],u={childrenFor:function(e){return c.filter(function(t){return t.parent===e})},all:function(){return c},last:function(){return c[c.length-1]},find:function(e){var t=c.filter(function(t){return t.id===e})[0];return s(t,"Unable to find block with id of %s",e),t},_create:function(e,t){var r=e.content,n=e.type,a=e.parent,s=new o({content:r,type:n,parent:a});return t instanceof o?t=u._indexOf(t.id)+1:void 0==t&&(t=c.length),c.splice(t,0,s),i.publish(),s},_destroy:function(e){c=c.filter(function(t){for(var r=t;r;r=r.parent)if(r.id==e)return!1;return!0}),i.publish()},_update:function(e,t){var r=u.find(e);r.content=n({},r.content,t),i.publish()},_indexOf:function(e){return c.indexOf(u.find(e))},_move:function(e,t){var r=u._indexOf(e),n=u._indexOf(t);c.splice(n,0,c.splice(r,1)[0]),i.publish()},_seed:function(){for(var e,t=void 0===arguments[0]?u._create({}):arguments[0],r=void 0===arguments[1]?[]:arguments[1],n=r[Symbol.iterator]();!(e=n.next()).done;){var i=e.value,o=i.blocks,a=i.content,s=i.type;u._seed(u._create({content:a,parent:t,type:s}),o)}return t}};e.exports=u,a.register(function(e){switch(e.type){case r(14):u._create(e.params,e.position);break;case r(15):u._destroy(e.id);break;case r(17):u._update(e.id,e.content);break;case r(16):u._move(e.fromId,e.toId)}})},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(2),o=(r(1),r(4)),a=[],s={icon:null,types:null},c={keys:function(){return a.map(function(e){return e.id})},find:function(e){var t=a.filter(function(t){return t.id===e})[0];return o(t,"Unable to find block type with an id of %s"),t},_create:function(e){var t=n({},s,e);o(t.id,"BlockType must have an identifier"),a=a.concat(t)}};e.exports=c,i.register(function(e){switch(e.type){case r(18):c._create(e.params)}})},function(e){e.exports=require("diode/stateful")},,function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},i=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},o=n(r(1)),a=o.createClass({displayName:"Button",getDefaultProps:function(){return{tagName:"button",type:"button"}},render:function(){var e=this.props,t=e.children,r=e.tagName,n=i(e,["children","tagName"]);return o.createElement(r,n,[t])}});e.exports=a},function(e){e.exports=require("diode")},,,function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,params:e,position:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,id:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,fromId:e,toId:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,id:e,content:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,params:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,params:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,id:e,params:t})}},function(e,t,r){"use strict";var n=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(7),a=r(24),s=r(8),c=r(1),u=r(17),l=c.createClass({displayName:"Block",mixins:[s,a],propTypes:{block:c.PropTypes.any.isRequired},getState:function(){return o.find(this.props.block.type)},render:function(){var e=this.props,t=e.block,r=n(e,["block"]),o=this.state.component;return c.createElement(o,i({initialContent:t.content,updateContent:this._onUpdateContent},r))},_onUpdateContent:function(e){u(this.props.block.id,e)}});e.exports=l},function(e,t,r){"use strict";var n=r(36),i=r(7),o=r(1),a=r(8),s=o.createClass({displayName:"BlockMenu",mixins:[a],propTypes:{editor:o.PropTypes.any.isRequired},getDefaultProps:function(){return{position:0}},getState:function(){var e=this.props,t=e.editor,r=e.block;return{types:r.type?i.find(r.type).types:t.types}},getButton:function(e){var t=this.props,r=t.block,i=t.position;return o.createElement(n,{key:e,type:e,block:r,position:i})},getNavigation:function(){return o.createElement("nav",{className:"col-menu",role:"navigation"},this.state.types.map(this.getButton))},render:function(){return this.state.types?this.getNavigation():null}});e.exports=s},function(e){"use strict";e.exports={remove:"Remove this block",fullscreen:"Toggle fullscreen mode"}},function(e,t,r){"use strict";var n=r(57),i={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};e.exports=i},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(7),o=r(11),a=r(2),s=r(3),c=r(4),u=[],l=function(){return{mode:s.EDIT_MODE,types:i.keys(),preview:!0}},p={find:function(e,t){var r=u.filter(function(t){return t.id===e})[0];return t||c(r,"Unable to find editor with an id of %s",e),r},_create:function(e){var t=n({},l(),e);c(s[t.mode],"Unacceptable mode for editor: "+t.mode),c(!p.find(t.id,!0),"Editors must have a unique identifier"),u=u.concat(t),o.publish()},_update:function(e,t){var r=p.find(e),i=u.indexOf(r);u=u.concat(),u[i]=n({},l(),r,t),o.publish()}};e.exports=p,a.register(function(e){switch(e.type){case r(19):p._create(e.params);break;case r(20):p._update(e.id,e.params)}})},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(1),o=r(47);e.exports=function(e){var t=e.mixins||[];return t.indexOf(o)<0&&(t=t.concat(o)),i.createClass(n({},e,{React:i,mixins:t}))}},function(e){"use strict";var t=0,r=function(){return t+=1};e.exports=r},function(e){e.exports=require("react/lib/ReactCSSTransitionGroup")},,,,,,,,function(e,t,r){"use strict";var n=r(7),i=r(10),o=r(14),a=r(1),s=a.createClass({displayName:"AddBlock",getInitialState:function(){return n.find(this.props.type)},render:function(){var e=this.state,t=e.icon,r=e.id,n=e.label;return a.createElement(i,{"aria-label":n,className:"col-btn-icon",onClick:this._onClick},a.createElement("img",{src:t,alt:r,"aria-hidden":"true"}))},_onClick:function(e){var t=this.props,r=t.block,n=t.position,i=t.type;o({content:null,parent:r,type:i},n),e.preventDefault()}});e.exports=s},function(e,t,r){"use strict";var n=r(38),i=r(25),o=(r(3),r(41)),a=r(1),s=r(8),c=r(23),u=r(50),l=a.createClass({displayName:"App",mixins:[s],getState:function(){return{editor:i.find(this.props.editorId)}},fullscreen:function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(){u(this.getDOMNode())}),render:function(){var e=this.state.editor;return a.createElement("div",{className:"colonel"},a.createElement(o,{editor:e}),a.createElement(n,{editor:e}),a.createElement("button",{type:"button","aria-label":c.fullscreen,className:"col-fullscreen",onClick:this._onFullscreenClick},"Fullscreen"))},_onFullscreenClick:function(e){e.preventDefault(),this.fullscreen()}});e.exports=l},function(e,t,r){"use strict";var n=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})},i=r(1),o=r(3),a=function(){var e={};return n(e,o.EDIT_MODE,r(39)),n(e,o.PREVIEW_MODE,r(43)),e}(),s=i.createClass({displayName:"ContentSection",render:function(){var e=this.props.editor,t=e.block;return i.createElement(a[e.mode],{block:t,editor:e})}});e.exports=s},function(e,t,r){"use strict";var n=r(28),i=r(22),o=r(40),a=r(5),s=r(1),c=s.createClass({displayName:"Editor",mixins:[a],getBlock:function(e){return s.createElement(o,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return s.createElement(n,{component:"div",className:"col-content",transitionName:"col-block"},s.createElement(i,{key:"block_menu",block:t,editor:r}),this.state.blocks.map(this.getBlock))}});e.exports=c},function(e,t,r){"use strict";var n=r(28),i=r(21),o=r(22),a=r(5),s=r(42),c=r(1),u=r(46),l=c.createClass({displayName:"EditorBlock",mixins:[a],getBlock:function(e){return c.createElement(l,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return c.createElement("div",null,c.createElement(s,{block:t},c.createElement(o,{ref:"prepend",block:t,editor:r,position:t.parent}),c.createElement(i,{block:t,mode:r.mode}),c.createElement(n,{component:"div",className:"col-blocks",transitionName:"col-block"},this.state.blocks.map(this.getBlock)),c.createElement(u,{block:t})),c.createElement(o,{ref:"append",block:t.parent,editor:r,position:t}))}});e.exports=l},function(e,t,r){"use strict";var n=r(10),i=r(1),o=i.PropTypes,a=r(20),s=r(3),c=r(24),u=i.createClass({displayName:"ModeSelection",mixins:[c],propType:{editor:o.object.isRequired,modes:o.object},getDefaultProps:function(){return{modes:s}},getTab:function(e){var t=this,r=this.props,o=r.editor,a=r.modes,s={className:"col-tabs-btn",disabled:o.mode===a[e],onClick:function(r){return t._onModeClick(r,a[e])}};return i.createElement("li",{key:e,className:"col-tabs-list-item",role:"tab"},i.createElement(n,s,e.replace("_"," ")))},getTabs:function(){return Object.keys(this.props.modes).map(this.getTab)},render:function(){return this.props.editor.preview?i.createElement("nav",{role:"navigation",className:"col-tabs"},i.createElement("ul",{className:"col-tabs-list",role:"tablist"},this.getTabs())):null},_onModeClick:function(e,t){e.preventDefault(),a(this.props.editor.id,{mode:t})}});e.exports=u},function(e,t,r){"use strict";var n=r(55),i=r(16),o=r(1),a=o.createClass({displayName:"Orderable",render:function(){var e=this.props,t=e.block,r=e.children;return o.createElement(n,{className:"col-block",message:t.id,onDrop:this._onDrop},r)},_onDrop:function(e){i(e,this.props.block.id)}});e.exports=a},function(e,t,r){"use strict";var n=(r(6),r(5)),i=r(44),o=r(1),a=o.createClass({displayName:"Previewer",mixins:[n],getBlock:function(e){return o.createElement(i,{key:e.id,block:e,editor:this.props.editor})},render:function(){return o.createElement("div",{className:"col-blocks"},this.state.blocks.map(this.getBlock))}});e.exports=a},function(e,t,r){"use strict";var n=r(21),i=r(5),o=r(1),a=o.createClass({displayName:"PreviewerBlock",mixins:[i],getBlock:function(e){return o.createElement(a,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return o.createElement("div",null,o.createElement(n,{block:t,mode:r.mode}),this.state.blocks.map(this.getBlock))}});e.exports=a},function(e,t,r){"use strict";var n=r(10),i=r(15),o=r(23),a=r(1),s=a.createClass({displayName:"RemoveBlock",render:function(){return a.createElement(n,{"aria-label":o.remove,className:"col-btn-remove",onClick:this._onClick},"×")},_onClick:function(e){e.preventDefault(),i(this.props.block.id)}});e.exports=s},function(e,t,r){"use strict";var n=r(1),i=r(45),o=n.createClass({displayName:"Toolbar",render:function(){return n.createElement("div",{className:"col-toolbar"},n.createElement(i,{block:this.props.block}))}});e.exports=o},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=(r(1),r(3)),o=r(4),a={getDefaultProps:function(){return{mode:i.EDIT_MODE}},getInitialState:function(){return o(this.defaultContent,"BlockType mixin requires `defaultContent` implementation."),{content:this.props.initialContent||this.defaultContent()}},setContent:function(e){var t=n({},this.state.content,e);this.setState({content:t},function(){this.props.updateContent(this.state.content)})},editMode:function(){return this.props.mode===i.EDIT_MODE},render:function(){return o(this.renderEditor,"BlockType mixin requires `renderEditor` implementation."),o(this.renderPreviewer,"BlockType mixin requires `renderPreviewer` implementation."),this.editMode()?this.renderEditor():this.renderPreviewer()}};e.exports=a},function(e,t,r){"use strict";var n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=r(27),a=function(){function e(t){i(this,e),this.id=o(),this.content=t.content||null,this.parent=t.parent,this.type=t.type}return n(e,null,{toJSON:{value:function(){var e=r(6);return{blocks:e.childrenFor(this).map(function(e){return e.toJSON()}),content:this.content,type:this.type}},writable:!0,configurable:!0}}),e}();e.exports=a},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(18),o=r(1),a=r(26);e.exports=function(e){var t=e.component;o.isValidElement(t)===!1&&(t=a(t)),i(n({},e,{component:t}))}},function(e){"use strict";e.exports=function(e){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){return n._seed(e,t)}},function(e,t,r){e.exports.Dispatcher=r(53)},function(e,t,r){"use strict";function n(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=r(54),o=1,a="ID_";n.prototype.register=function(e){var t=a+o++;return this.$Dispatcher_callbacks[t]=e,t},n.prototype.unregister=function(e){i(this.$Dispatcher_callbacks[e],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this.$Dispatcher_callbacks[e]},n.prototype.waitFor=function(e){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var r=e[t];this.$Dispatcher_isPending[r]?i(this.$Dispatcher_isHandled[r],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",r):(i(this.$Dispatcher_callbacks[r],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",r),this.$Dispatcher_invokeCallback(r))}},n.prototype.dispatch=function(e){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(e);try{for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]||this.$Dispatcher_invokeCallback(t)}finally{this.$Dispatcher_stopDispatching()}},n.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},n.prototype.$Dispatcher_invokeCallback=function(e){this.$Dispatcher_isPending[e]=!0,this.$Dispatcher_callbacks[e](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[e]=!0},n.prototype.$Dispatcher_startDispatching=function(e){for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]=!1,this.$Dispatcher_isHandled[t]=!1;this.$Dispatcher_pendingPayload=e,this.$Dispatcher_isDispatching=!0},n.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){!function(t,n){e.exports=n(r(1))}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(t){"use strict";var n=t.interopRequire(r(1)),i=t.interopRequire(r(2)),o=t.interopRequire(r(3)),a=n.PropTypes,s=n.createClass({displayName:"Draggable",propTypes:{draggableChildren:a.bool,message:a.any.isRequired,onDrop:a.func.isRequired},getDefaultProps:function(){return{draggableChildren:!1,dropEffect:"copy",effectAllowed:"all"}},getInitialState:function(){return{draggable:!0,dragging:!1,droppable:!1}},render:function(){var e=i(this.props.className,i({dragon:!0,"dragon-dragging":this.state.dragging,"dragon-droppable":this.state.droppable}));return n.createElement("div",{className:e,draggable:this.state.draggable,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,onDragStart:this._onDragStart,onDragEnd:this._onDragEnd},n.createElement("div",{ref:"children",className:"dragon-children",onFocus:this._onFocus,onBlur:this._onBlur},this.props.children))},_isDraggableAt:function(e,t){if(this.props.draggableChildren)return!0;var r=document.elementFromPoint(e,t),n=this.refs.children.getDOMNode();return r==n||o(r,n)},_onFocus:function(){this.setState({draggable:!1})},_onBlur:function(){this.setState({draggable:!0})},_onDragStart:function(e){return this._isDraggableAt(e.pageX,e.pageY)?e.preventDefault():(e.dataTransfer.setData("text/plain",JSON.stringify(this.props.message)),e.dataTransfer.dropEffect=this.props.dropEffect,e.dataTransfer.effectAllowed=this.props.effectAllowed,void this.setState({dragging:!0}))},_onDragEnd:function(e){e.preventDefault(),this.setState({droppable:!1,dragging:!1})},_onDragOver:function(e){e.preventDefault(),this.setState({droppable:!0})},_onDragLeave:function(e){e.preventDefault(),this.setState({droppable:!1})},_onDrop:function(e){e.preventDefault();var t=JSON.parse(e.dataTransfer.getData("text/plain")),r=this.props.message;this.props.onDrop(t,r),this.setState({droppable:!1,dragging:!1})}});e.exports=s}).call(t,r(4))},function(t){t.exports=e},function(e){"use strict";function t(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}e.exports=t},function(e){"use strict";function t(e,t){for(var r=e;r;){if(r==t)return!0;r=r.parentNode}return!1}e.exports=t},function(e){var t={};!function(e){var t=e.to5Runtime={};t.inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},t.defaults=function(e,t){for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},t.prototypeProperties=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},t.applyConstructor=function(e,t){var r=Object.create(e.prototype),n=e.apply(r,t);return null==n||"object"!=typeof n&&"function"!=typeof n?r:n},t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.interopRequire=function(e){return e&&(e["default"]||e)},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.slicedToArray=function(e,t){if(Array.isArray(e))return e;for(var r,n=[],i=e[Symbol.iterator]();!(r=i.next()).done&&(n.push(r.value),!t||n.length!==t););return n},t.objectWithoutProperties=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},t.hasOwn=Object.prototype.hasOwnProperty,t.slice=Array.prototype.slice,t.bind=Function.prototype.bind,t.defineProperty=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})},t.interopRequireWildcard=function(e){return e&&e.constructor===Object?e:{"default":e}},t._extends=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e},t.get=function r(e,r,t){var n=Object.getOwnPropertyDescriptor(e,r);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:r(i,r,t)}if("value"in n&&n.writable)return n.value;var o=n.get;return void 0===o?void 0:o.call(t)}}("undefined"==typeof t?self:t),e.exports=t.to5Runtime}])})},function(e,t,r){"use strict";var n=r(4),i=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};e.exports=i},function(e){"use strict";function t(e,t){if(e===t)return!0;var r;for(r in e)if(e.hasOwnProperty(r)&&(!t.hasOwnProperty(r)||e[r]!==t[r]))return!1;for(r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;return!0}e.exports=t},,,,function(){}]); | ||
module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=n(38),s=n(9),c=n(15),u=n(19),l=n(1),p=n(51),f=n(21);n(55);var h=function(){function t(e){var n=this;o(this,t),this.id=f(),this.el=e.el,this._callbacks=[],c(r({id:this.id,block:p(void 0,e.seed||[])},e)),s.subscribe(function(){return n.simulateChange()}),setTimeout(this.simulateChange.bind(this),10)}return i(t,null,{render:{value:function(){return l.render(this._rootComponent(),this._getDomElement()),this},writable:!0,configurable:!0},simulateChange:{value:function(){this._runCallbacks()},writable:!0,configurable:!0},addCallback:{value:function(t){this._callbacks=this._callbacks.concat(t)},writable:!0,configurable:!0},removeCallback:{value:function(t){this._callbacks=this._callbacks.filter(function(e){return e!==t})},writable:!0,configurable:!0},toJSON:{value:function(){return u.find(this.id).block.toJSON().blocks},writable:!0,configurable:!0},toHtml:{value:function(){return l.renderToStaticMarkup(this._rootComponent())},writable:!0,configurable:!0},_rootComponent:{value:function(){return l.createElement(a,{editorId:this.id})},writable:!0,configurable:!0},_getDomElement:{value:function(){return this.el},writable:!0,configurable:!0},_runCallbacks:{value:function(){var t=this.toJSON();this._callbacks.forEach(function(e){e(t)})},writable:!0,configurable:!0}}),t}();h.createBlock=n(20),h.addBlockType=h.addBlockTypes=n(49),t.exports=h},function(t){t.exports=require("react")},function(t,e,n){"use strict";var r=n(23).Dispatcher;t.exports=new r},function(t){"use strict";var e=function(t,e,n,r,i,o,a,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],l=0;c=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};t.exports=e},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(2),o=(n(1),[]),a={icon:null,types:null},s={keys:function(){return o.map(function(t){return t.id})},find:function(t){var e=o.filter(function(e){return e.id===t})[0];if(!e)throw new Error("Unable to find block type with an id of "+e);return e},_create:function(t){var e=r({},a,t);if(!e.id)throw new Error("BlockTypes must have a an identifier");o=o.concat(e)},_remove:function(t){o=o.filter(function(e){return e.id!==t})}};t.exports=s,i.register(function(t){switch(t.type){case n(14):s._create(t.params)}})},function(t){t.exports=require("diode/stateful")},,function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},o=r(n(1)),a=r(n(28)),s=o.createClass({displayName:"Button",getDefaultProps:function(){return{tagName:"button",type:"button"}},render:function(){var t=this.props,e=t.children,n=t.tagName,r=i(t,["children","tagName"]);return o.createElement(n,r,[o.createElement(a,null),e])}});t.exports=s},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(9),o=n(48),a=n(2),s=n(3),c=[],u={childrenFor:function(t){return c.filter(function(e){return e.parent===t})},all:function(){return c},last:function(){return c[c.length-1]},find:function(t){var e=c.filter(function(e){return e.id===t})[0];return s(e,"Unable to find block with id of %s",t),e},_create:function(t,e){var n=t.content,r=t.type,a=t.parent,s=new o({content:n,type:r,parent:a});return e instanceof o?e=u._indexOf(e.id)+1:void 0==e&&(e=c.length),c.splice(e,0,s),i.publish(),s},_destroy:function(t){c=c.filter(function(e){for(var n=e;n;n=n.parent)if(n.id==t)return!1;return!0}),i.publish()},_update:function(t,e){var n=u.find(t);n.content=r({},n.content,e),i.publish()},_indexOf:function(t){return c.indexOf(u.find(t))},_move:function(t,e){var n=u._indexOf(t),r=u._indexOf(e);c.splice(r,0,c.splice(n,1)[0]),i.publish()},_seed:function(){var t=void 0===arguments[0]?u._create({}):arguments[0],e=void 0===arguments[1]?[]:arguments[1],n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,c=s.blocks,l=s.content,p=s.type;u._seed(u._create({content:l,parent:t,type:p}),c)}}catch(f){r=!0,i=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(r)throw i}}return t}};t.exports=u,a.register(function(t){switch(t.type){case n(10):u._create(t.params,t.position);break;case n(11):u._destroy(t.id);break;case n(13):u._update(t.id,t.content);break;case n(12):u._move(t.fromId,t.toId)}})},function(t){t.exports=require("diode")},function(t,e,n){"use strict";var r=n(2);t.exports=function i(t,e){r.dispatch({type:i,params:t,position:e})}},function(t,e,n){"use strict";var r=n(2);t.exports=function i(t){r.dispatch({type:i,id:t})}},function(t,e,n){"use strict";var r=n(2);t.exports=function i(t,e){r.dispatch({type:i,fromId:t,toId:e})}},function(t,e,n){"use strict";var r=n(2);t.exports=function i(t,e){r.dispatch({type:i,id:t,content:e})}},function(t,e,n){"use strict";var r=n(2);t.exports=function i(t){r.dispatch({type:i,params:t})}},function(t,e,n){"use strict";var r=n(2);t.exports=function i(t){r.dispatch({type:i,params:t})}},function(t,e,n){"use strict";var r=n(37),i=n(4),o=n(1),a=n(5),s=o.createClass({displayName:"BlockMenu",mixins:[a],propTypes:{editor:o.PropTypes.any.isRequired},getDefaultProps:function(){return{position:0}},getState:function(){var t=this.props,e=t.editor,n=t.block;return{types:n.type?i.find(n.type).types:e.types}},getButton:function(t){var e=this.props,n=e.block,i=e.position;return o.createElement(r,{key:t,type:t,block:n,position:i})},getNavigation:function(){return o.createElement("nav",{className:"col-menu",role:"navigation"},this.state.types.map(this.getButton))},render:function(){return this.state.types?this.getNavigation():null}});t.exports=s},function(t){"use strict";t.exports={remove:"Remove this block",fullscreen:"Toggle fullscreen mode"}},function(t,e,n){"use strict";var r=n(8),i=n(1),o=n(5);t.exports={mixins:[o],propTypes:{block:i.PropTypes.any.isRequired},getState:function(){return{blocks:r.childrenFor(this.props.block)}}}},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(4),o=n(9),a=n(2),s=n(3),c=[],u=function(){return{types:i.keys(),preview:!0}},l={find:function(t,e){var n=c.filter(function(e){return e.id===t})[0];return e||s(n,"Unable to find editor with an id of %s",t),n},_create:function(t){var e=r({},u(),t);s(!l.find(e.id,!0),"Editors must have a unique identifier"),c=c.concat(e),o.publish()},_update:function(t,e){var n=l.find(t),i=c.indexOf(n);c=c.concat(),c[i]=r({},u(),n,e),o.publish()}};t.exports=l,a.register(function(t){switch(t.type){case n(15):l._create(t.params)}})},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(1),o=n(46);t.exports=function(t){var e=t.mixins||[];return e.indexOf(o)<0&&(e=e.concat(o)),i.createClass(r({},t,{React:i,mixins:e}))}},function(t){"use strict";var e=0,n=function(){return e+=1};t.exports=n},function(t){t.exports=require("react/lib/ReactCSSTransitionGroup")},function(t,e,n){t.exports.Dispatcher=n(24)},function(t,e,n){"use strict";function r(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=n(25),o=1,a="ID_";r.prototype.register=function(t){var e=a+o++;return this.$Dispatcher_callbacks[e]=t,e},r.prototype.unregister=function(t){i(this.$Dispatcher_callbacks[t],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t),delete this.$Dispatcher_callbacks[t]},r.prototype.waitFor=function(t){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var n=t[e];this.$Dispatcher_isPending[n]?i(this.$Dispatcher_isHandled[n],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):(i(this.$Dispatcher_callbacks[n],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n),this.$Dispatcher_invokeCallback(n))}},r.prototype.dispatch=function(t){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(t);try{for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]||this.$Dispatcher_invokeCallback(e)}finally{this.$Dispatcher_stopDispatching()}},r.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},r.prototype.$Dispatcher_invokeCallback=function(t){this.$Dispatcher_isPending[t]=!0,this.$Dispatcher_callbacks[t](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[t]=!0},r.prototype.$Dispatcher_startDispatching=function(t){for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]=!1,this.$Dispatcher_isHandled[e]=!1;this.$Dispatcher_pendingPayload=t,this.$Dispatcher_isDispatching=!0},r.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},t.exports=r},function(t){"use strict";var e=function(t,e,n,r,i,o,a,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],l=0;c=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};t.exports=e},function(t){function e(t){var e="";if("object"==typeof t)for(var n in t)t.hasOwnProperty(n)&&t[n]&&(e+=n+" ");else for(var r=0;r<arguments.length;r++)null!=arguments[r]&&(e+=arguments[r]+" ");return e.trim()}t.exports=e},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},i=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=r(n(1)),s=r(n(26)),c=a.createClass({displayName:"Dragon",propTypes:{onDrop:a.PropTypes.func.isRequired},getDefaultProps:function(){return{allow:"all",className:"",effect:"copy",element:"div",message:{}}},getInitialState:function(){return{draggable:!0,dragging:!1,droppable:!1}},render:function(){var t=this.state.dragging,e=this.state.draggable,n=this.state.droppable,r=this.props.className,c=this.props.children,u=this.props.element,l=(this.props.onDrop,this.props.message,this.props.allow,this.props.effect,i(this.props,["className","children","element","onDrop","message","allow","effect"])),p=s({"dragon-dragging":t,"dragon-droppable":n});return a.createElement(u,o({className:s("dragon",s(r),p),draggable:e,onBlur:this._handle({draggable:!0}),onFocus:this._handle({draggable:!1}),onDragEnd:this._handle({droppable:!1,dragging:!1},!0),onDragLeave:this._handle({droppable:!1},!0),onDragOver:this._handle({droppable:!0},!0),onDragStart:this._onDragStart,onDrop:this._onDrop},l),c)},_handle:function(t,e){var n=this;return function(r){e&&r.preventDefault(),n.setState(t)}},_onDragStart:function(t){var e=this.props.effect,n=this.props.allow,r=this.props.message;t.dataTransfer.setData("text/plain",JSON.stringify(r)),t.dataTransfer.dropEffect=e,t.dataTransfer.effectAllowed=n,this.setState({dragging:!0})},_onDrop:function(t){t.preventDefault();var e=JSON.parse(t.dataTransfer.getData("text/plain")),n=this.props.message;this.props.onDrop(e,n),this.setState({droppable:!1,dragging:!1})}});t.exports=c},function(t,e,n){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(e){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(4),o=0,a=n(5),s=n(7),c=n(2),u=n(6),l=s.PropTypes,p=2*Math.PI,f=n(1),h=s.createClass({displayName:"Ink",shouldComponentUpdate:function(t,e){for(var n in t)if(this.props[n]!==t[n])return!0;for(var r in e)if(this.state[r]!==e[r])return!0;return!1},propTypes:{background:l.bool,duration:l.number,opacity:l.number,radius:l.number,recenter:l.bool},getDefaultProps:function(){return{background:!0,duration:1500,opacity:.2,radius:150,recenter:!0}},getInitialState:function(){return{store:u(this.tick),touchEvents:this.touchEvents()}},touchEvents:function(){return i?{onTouchStart:this._onPress,onTouchEnd:this._onRelease,onTouchCancel:this._onRelease,onTouchLeave:this._onRelease}:{onMouseDown:this._onPress,onMouseUp:this._onRelease,onMouseLeave:this._onRelease}},tick:function(){var t=this.state.ctx,e=this.state.color,n=this.state.height,r=this.state.width,i=this.state.store,o=a(t);t.save(),t.scale(o,o),t.clearRect(0,0,r,n),t.fillStyle=e,t.globalAlpha=i.getTotalOpacity(),t.fillRect(0,0,r,n),i.map(this.makeBlot,this),t.restore()},makeBlot:function(t){var e=this.state.ctx,n=this.state.height,r=this.state.width,i=t.x,o=t.y,a=t.radius;if(e.save(),e.globalAlpha=f.getBlotOpacity(t),e.beginPath(),this.props.recenter){var s=Math.max(n,r);e.translate(f.getBlotShiftX(t,s,r),f.getBlotShiftY(t,s,n))}e.arc(i,o,a*f.getBlotScale(t),0,p),e.closePath(),e.fill(),e.restore()},componentWillUnmount:function(){this.state.store.stop()},pushBlot:function(t,e,n){var r=this,i=this.getDOMNode(),o=window.getComputedStyle(i),a=i.getBoundingClientRect(),s=a.top,c=a.bottom,u=a.left,l=a.right,p=c-s,f=l-u;this.setState({color:o.color,ctx:this.state.ctx||this.refs.canvas.getDOMNode().getContext("2d"),height:p,width:f},function(){r.state.store.add({duration:r.props.duration,opacity:r.props.opacity,mouseDown:t,mouseUp:0,radius:Math.min(Math.max(f,p),r.props.radius),x:e-u,y:n-s})})},popBlot:function(t){this.state.store.release(t)},render:function(){var t=this.state.height,n=this.state.width,i=this.state.touchEvents,o=e.devicePixelRatio||1;return s.createElement("canvas",r({ref:"canvas",className:"ink",style:r({},c,this.props.style),height:t*o,width:n*o,onDragOver:this._onRelease},i))},_onPress:function(t){var e=t.button,n=t.ctrlKey,r=t.clientX,i=t.clientY,a=t.changedTouches,s=Date.now();if(a)for(var c=0;c<a.length;c++){var u=a[c].clientX,l=a[c].clientY;this.pushBlot(s,u,l)}else e!==o||n||this.pushBlot(s,r,i)},_onRelease:function(){this.popBlot(Date.now())}});t.exports=h}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){return s(t.duration,Date.now()-t.mouseDown)}function i(t){return t.mouseUp>0?Date.now()-t.mouseUp:0}function o(t){var e=.85*a(r(t),0,t.radius,t.duration),n=.15*a(i(t),0,t.radius,t.duration);return e+n}var a=n(3),s=Math.min,c=Math.sqrt(2);t.exports={getBlotOpacity:function(t){return a(i(t),t.opacity,-t.opacity,t.duration)},getBlotOuterOpacity:function(t){return s(this.getBlotOpacity(t),a(r(t),0,.3,3*t.duration))},getBlotShiftX:function(t,e,n){return s(1,o(t)/e*2/c)*(n/2-t.x)},getBlotShiftY:function(t,e,n){return s(1,o(t)/e*2/c)*(n/2-t.y)},getBlotScale:function(t){return o(t)/t.radius}}},function(t){"use strict";t.exports={borderRadius:"inherit",height:"100%",left:0,position:"absolute",top:0,width:"100%"}},function(t){"use strict";t.exports=function(t,e,n,r){return n*((t=t/r-1)*t*t*t*t+1)+e}},function(t){"use strict";var e=!1;"undefined"!=typeof window&&(e="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch),t.exports=e},function(t){"use strict";t.exports=function(t){var e=window.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return e/n}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t){var e=[],n=!1,i=void 0,o={map:function(t,n){return e.map(t,n)},play:function(){n||(n=!0,o.update())},stop:function(){n=!1,cancelAnimationFrame(i)},getTotalOpacity:function(){return e.reduce(function(t,e){return t+r.getBlotOuterOpacity(e)},0)},update:function(){o.prune(),t(i),e.length?i=requestAnimationFrame(o.update):o.stop()},shouldPrune:function(t){return r.getBlotOpacity(t)>.01},prune:function(){e=e.filter(this.shouldPrune)},add:function(t){e.push(t),o.play()},release:function(t){for(var n=e.length-1;n>=0;n--)if(!e[n].mouseUp)return e[n].mouseUp=t}};return o}},function(t){t.exports=n(1)}])},function(t,e,n){"use strict";var r=n(3),i=function(t){var e,n={};r(t instanceof Object&&!Array.isArray(t));for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=i},function(t){"use strict";function e(t,e){if(t===e)return!0;var n;for(n in t)if(t.hasOwnProperty(n)&&(!e.hasOwnProperty(n)||t[n]!==e[n]))return!1;for(n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}t.exports=e},,,,,,,function(t,e,n){"use strict";var r=n(4),i=n(7),o=n(10),a=n(1),s=a.createClass({displayName:"AddBlock",getInitialState:function(){return r.find(this.props.type)},render:function(){var t=this.state,e=t.icon,n=t.id,r=t.label;return a.createElement(i,{"aria-label":r,className:"col-btn-icon",onClick:this._onClick},a.createElement("img",{src:e,alt:n,"aria-hidden":"true"}))},_onClick:function(t){var e=this.props,n=e.block,r=e.position,i=e.type;o({content:null,parent:n,type:i},r),t.preventDefault()}});t.exports=s},function(t,e,n){"use strict";var r=n(40),i=n(19),o=n(1),a=n(5),s=n(17),c=n(50),u=n(7),l=o.createClass({displayName:"App",mixins:[a],getState:function(){return{editor:i.find(this.props.editorId)}},fullscreen:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){c(this.getDOMNode())}),render:function(){var t=this.state.editor;return o.createElement("div",{className:"colonel"},o.createElement(r,{editor:t,block:t.block}),o.createElement(u,{"aria-label":s.fullscreen,className:"col-btn-icon col-fullscreen",onClick:this._onFullscreenClick},"Fullscreen"))},_onFullscreenClick:function(t){t.preventDefault(),this.fullscreen()}});t.exports=l},function(t,e,n){"use strict";var r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(4),a=n(47),s=n(1),c=n(5),u=n(13),l=s.createClass({displayName:"Block",mixins:[c,a],propTypes:{block:s.PropTypes.any.isRequired},getState:function(){return o.find(this.props.block.type)},render:function(){var t=this.props,e=t.block,n=r(t,["block"]),o=this.state.component;return s.createElement(o,i({initialContent:e.content,updateContent:this._onUpdateContent},n))},_onUpdateContent:function(t){u(this.props.block.id,t)}});t.exports=l},function(t,e,n){"use strict";var r=n(22),i=n(16),o=n(41),a=n(18),s=n(1),c=s.createClass({displayName:"Editor",mixins:[a],getBlock:function(t){return s.createElement(o,{key:t.id,block:t,editor:this.props.editor})},render:function(){var t=this.props,e=t.block,n=t.editor;return s.createElement(r,{component:"div",className:"col-content",transitionName:"col-appear"},s.createElement(i,{key:"block_menu",block:e,editor:n}),this.state.blocks.map(this.getBlock))}});t.exports=c},function(t,e,n){"use strict";var r=n(22),i=n(39),o=n(16),a=n(18),s=n(42),c=n(1),u=n(44),l=c.createClass({displayName:"EditorBlock",mixins:[a],getBlock:function(t){return c.createElement(l,{key:t.id,block:t,editor:this.props.editor})},render:function(){var t=this.props,e=t.block,n=t.editor;return c.createElement("div",null,c.createElement(s,{block:e},c.createElement(o,{ref:"prepend",block:e,editor:n,position:e.parent}),c.createElement("div",{className:"col-block-children"},c.createElement(i,{block:e,mode:n.mode})),c.createElement(r,{component:"div",className:"col-blocks",transitionName:"col-appear"},this.state.blocks.map(this.getBlock)),c.createElement(u,{block:e})),c.createElement(o,{ref:"append",block:e.parent,editor:n,position:e}))}});t.exports=l},function(t,e,n){"use strict";var r=n(27),i=n(12),o=n(1),a=o.createClass({displayName:"Orderable",render:function(){var t=this.props,e=t.block,n=t.children;return o.createElement(r,{className:"col-block",message:e.id,onDrop:this._onDrop},n)},_onDrop:function(t){i(t,this.props.block.id)}});t.exports=a},function(t,e,n){"use strict";var r=n(7),i=n(11),o=n(17),a=n(1),s=n(56),c=a.createClass({displayName:"RemoveBlock",render:function(){return a.createElement(r,{"aria-label":o.remove,className:"col-btn-remove",onClick:this._onClick},a.createElement("span",{dangerouslySetInnerHTML:{__html:""+s}}))},_onClick:function(t){t.preventDefault(),i(this.props.block.id)}});t.exports=c},function(t,e,n){"use strict";var r=n(1),i=n(43),o=r.createClass({displayName:"Toolbar",render:function(){return r.createElement("div",{className:"col-toolbar"},r.createElement(i,{block:this.props.block}))}});t.exports=o},function(t,e,n){"use strict";var r=n(29);t.exports=r({EDIT_MODE:null,PREVIEW_MODE:null})},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=(n(1),n(45),n(3)),o={getInitialState:function(){return i(this.defaultContent,"BlockType mixin requires `defaultContent` implementation."),{content:this.props.initialContent||this.defaultContent()}},setContent:function(t){var e=r({},this.state.content,t);this.setState({content:e},function(){this.props.updateContent(this.state.content)})}};t.exports=o},function(t,e,n){"use strict";var r=n(30),i={shouldComponentUpdate:function(t,e){return!r(this.props,t)||!r(this.state,e)}};t.exports=i},function(t,e,n){"use strict";var r=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=n(21),a=function(){function t(e){i(this,t),this.id=o(),this.content=e.content||null,this.parent=e.parent,this.type=e.type}return r(t,null,{toJSON:{value:function(){var t=n(8);return{blocks:t.childrenFor(this).map(function(t){return t.toJSON()}),content:this.content,type:this.type}},writable:!0,configurable:!0}}),t}();t.exports=a},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(14),o=(n(1),n(20));t.exports=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];e.forEach(function(t){var e=t.component;"object"==typeof e&&(e=o(e)),i(r({},t,{component:e}))})}},function(t){"use strict";t.exports=function(t){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){return r._seed(t,e)}},,,,function(){},function(t){t.exports='<?xml version="1.0" encoding="utf-8"?>\r\n<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r\n width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">\r\n<path enable-background="new " d="M17,8.008L15.992,7L12,10.992L8.008,7L7,8.008L10.992,12L7,15.992L8.008,17L12,13.008\r\n L15.992,17L17,15.992L13.008,12L17,8.008z"/>\r\n</svg>\r\n'}]); | ||
//# sourceMappingURL=colonel-kurtz.js.map |
{ | ||
"name": "colonel-kurtz", | ||
"version": "0.3.0", | ||
"version": "1.0.0", | ||
"description": "A block editor", | ||
"main": "build/colonel-kurtz.js", | ||
"scripts": { | ||
"start": "NODE_ENV=development webpack-dev-server --inline --content-base ./example --config webpack.example.config.js", | ||
"start": "NODE_ENV=development webpack-dev-server --content-base ./example --config webpack.example.config.js", | ||
"prepublish": "NODE_ENV=production webpack -p --optimize-occurence-order --optimize-dedupe", | ||
@@ -36,7 +36,9 @@ "test": "karma start", | ||
"devDependencies": { | ||
"6to5": "^3.6.0", | ||
"6to5-loader": "^3.0.0", | ||
"autoprefixer-loader": "^1.0.0", | ||
"autoprefixer-core": "^5.1.7", | ||
"babel": "^4.6.6", | ||
"babel-loader": "^4.0.0", | ||
"coveralls": "^2.11.2", | ||
"css-loader": "^0.9.0", | ||
"css-mqpacker": "^3.0.1", | ||
"csswring": "^3.0.1", | ||
"diode": "^3.1.0", | ||
@@ -60,11 +62,13 @@ "envify-loader": "^0.1.0", | ||
"mocha": "^2.1.0", | ||
"object-assign": "^2.0.0", | ||
"postcss-loader": "^0.3.0", | ||
"raw-loader": "^0.5.1", | ||
"react": "^0.12.2", | ||
"react-dragon": "~0.0.5", | ||
"react-ink": "^3.0.0", | ||
"react-dragon": "~2.0.0", | ||
"react-hot-loader": "^1.1.7", | ||
"react-ink": "^4.0.0-rc4", | ||
"react-tools": "^0.12.2", | ||
"sass-loader": "^0.3.1", | ||
"source-map-loader": "^0.1.3", | ||
"style-loader": "^0.8.2", | ||
"webpack": "^1.4.14", | ||
"style-loader": "^0.8.3", | ||
"webpack": "^1.7.2", | ||
"webpack-dev-server": "^1.7.0" | ||
@@ -71,0 +75,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
130
4
1254230
37
2648
1