2019-09-29 09:27:15 +02:00
|
|
|
/*! grapesjs - 0.15.8 */
|
|
|
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.grapesjs=e():t.grapesjs=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=85)}([function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,a=Array.prototype,s=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,c=a.push,u=a.slice,h=s.toString,d=s.hasOwnProperty,f=Array.isArray,p=Object.keys,g=Object.create,v=function(){},m=function(t){return t instanceof m?t:this instanceof m?void(this._wrapped=t):new m(t)};e.nodeType?i._=m:(!n.nodeType&&n.exports&&(e=n.exports=m),e._=m),m.VERSION="1.9.1";var y,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},w=function(t,e,n){return m.iteratee!==y?m.iteratee(t,e):null==t?m.identity:m.isFunction(t)?b(t,e,n):m.isObject(t)&&!m.isArray(t)?m.matcher(t):m.property(t)};m.iteratee=y=function(t,e){return w(t,e,1/0)};var x=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}},C=function(t){if(!m.isObject(t))return{};if(g)return g(t);v.prototype=t;var e=new v;return v.prototype=null,e},O=function(t){return function(e){return null==e?void 0:e[t]}},S=function(t,e){return null!=t&&d.call(t,e)},k=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},T=Math.pow(2,53)-1,P=O("length"),j=function(t){var e=P(t);return"number"==typeof e&&e>=0&&e<=T};m.each=m.forEach=function(t,e,n){var r,i;if(e=b(e,n),j(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=m.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},m.map=m.collect=function(t,e,n){e=w(e,n);for(var r=!j(t)&&m.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o};var E=function(t){var e=function(e,n,r,i){var o=!j(e)&&m.keys(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s<a;s+=t){var l=o?o[s]:s;r=n(r,e[l],l,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,b(n,i,4),r,o)}};m.reduce=m.foldl=m.inject=E(1),m.reduceRight=m.foldr=E(-1),m.find=m.detect=function(t,e,n){var r=(j(t)?m.findIndex:m.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},m.filter=m.select=function(t,e,n){var r=[];return e=w(e,n),m.each(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r},m.reject=function(t,e,n){return m.filter(t,m.negate(w(e)),n)},m.every=m.all=function(t,e,n){e=w(e,n);for(var r=!j(t)&&m.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},m.some=m.any=function(t,e,n){e=w(e,n);for(var r=!j(t)&&m.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e
|
|
|
|
/*! cash-dom 1.3.7, https://github.com/kenwheeler/cash @license MIT */void 0===(i="function"==typeof(r=function(){var t,e=document,n=window,r=Array.prototype,i=r.slice,o=r.filter,a=r.push,s=function(){},l=function(t){return"function"==typeof t&&t.call},c=function(t){return"string"==typeof t},u=/^#[\w-]*$/,h=/^\.[\w-]*$/,d=/<.+>/,f=/^\w+$/;function p(t,n){return n=n||e,h.test(t)?n.getElementsByClassName(t.slice(1)):f.test(t)?n.getElementsByTagName(t):n.querySelectorAll(t)}function g(n){if(!t){var r=(t=e.implementation.createHTMLDocument(null)).createElement("base");r.href=e.location.href,t.head.appendChild(r)}return t.body.innerHTML=n,t.body.childNodes}function v(t){"loading"!==e.readyState?setTimeout(t):e.addEventListener("DOMContentLoaded",t)}function m(t,r){if(!t)return this;if(t.cash&&t!==n)return t;var i,o=t,a=0;if(c(t))o=u.test(t)?e.getElementById(t.slice(1)):d.test(t)?g(t):p(t,r);else if(l(t))return v(t),this;if(!o)return this;if(o.nodeType||o===n)this[0]=o,this.length=1;else for(i=this.length=o.length;a<i;a++)this[a]=o[a];return this}function y(t,e){return new m(t,e)}var b=y.fn=y.prototype=m.prototype={cash:!0,length:0,push:a,splice:r.splice,map:r.map,init:m};function w(t,e){for(var n=t.length,r=0;r<n&&!1!==e.call(t[r],t[r],r,t);r++);}function x(t,e){var n=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!n&&n.call(t,e)}function C(t){return c(t)?x:t.cash?function(e){return t.is(e)}:function(t,e){return t===e}}function O(t){return y(i.call(t).filter((function(t,e,n){return n.indexOf(t)===e})))}Object.defineProperty(b,"constructor",{value:y}),y.parseHTML=g,y.noop=s,y.isFunction=l,y.isString=c,y.extend=b.extend=function(t){t=t||{};var e=i.call(arguments),n=e.length,r=1;for(1===e.length&&(t=this,r=0);r<n;r++)if(e[r])for(var o in e[r])e[r].hasOwnProperty(o)&&(t[o]=e[r][o]);return t},y.extend({merge:function(t,e){for(var n=+e.length,r=t.length,i=0;i<n;r++,i++)t[r]=e[i];return t.length=r,t},each:w,matches:x,unique:O,isArray:Array.isArray,isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)}});var S=y.uid="_cash"+Date.now();function k(t){return t[S]=t[S]||{}}function T(t,e,n){return k(t)[e]=n}function P(t,e){var n=k(t);return void 0===n[e]&&(n[e]=t.dataset?t.dataset[e]:y(t).attr("data-"+e)),n[e]}b.extend({data:function(t,e){if(c(t))return void 0===e?P(this[0],t):this.each((function(n){return T(n,t,e)}));for(var n in t)this.data(n,t[n]);return this},removeData:function(t){return this.each((function(e){return function(t,e){var n=k(t);n?delete n[e]:t.dataset?delete t.dataset[e]:y(t).removeAttr("data-"+name)}(e,t)}))}});var j=/\S+/g;function E(t){return c(t)&&t.match(j)}function M(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)}function D(t,e){t.classList?t.classList.add(e):M(t,e)||(t.className+=" "+e)}function A(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"")}b.extend({addClass:function(t){var e=E(t);return e?this.each((function(t){w(e,(function(e){D(t,e)}))})):this},attr:function(t,e){if(t){if(c(t))return void 0===e?this[0]?this[0].getAttribute?this[0].getAttribute(t):this[0][t]:void 0:this.each((function(n){n.setAttribute?n.setAttribute(t,e):n[t]=e}));for(var n in t)this.attr(n,t[n]);return this}},hasClass:function(t){var e=!1,n=E(t);return n&&n.length&&this.each((function(t){return!(e=M(t,n[0]))})),e},prop:function(t,e){if(c(t))return void 0===e?this[0][t]:this.each((function(n){n[t]=e}));for(var n in t)this.prop(n,t[n]);return this},removeAttr:function(t){return this.each((function(e){e.removeAttribute?e.removeAttribute(t):delete e[t]}))},removeClass:function(t){if(!arguments.length)return this.attr("class","");var e=E(t);return e?this.each((function(t){w(e,(function(e){A(t,e)}))})):this},removeProp:function(t){return this.each((function(e){delete e[t]}))},toggleClass:function(t,e){if(void 0!==e)return this[e?"addClass":"removeClass"](t);var n=E(t);return n?this.each((function(t){w(n,(function(e){M(t,e)?A(t,e):D(t,e)}))})):this}}),b.extend({add:function(t,e){return O(y.
|
|
|
|
/*!
|
2018-01-30 19:58:55 +01:00
|
|
|
* Backbone.Undo.js v0.2
|
|
|
|
*
|
|
|
|
* Copyright (c)2013 Oliver Sartun
|
|
|
|
* Released under the MIT License
|
|
|
|
*
|
|
|
|
* Documentation and full license available at
|
|
|
|
* https://github.com/osartun/Backbone.Undo.js
|
2019-09-29 09:27:15 +02:00
|
|
|
*/i=[n(0),n(1)],void 0===(o="function"==typeof(r=function(t,e){var n=Array.prototype.slice;function r(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function i(t,e){return n.call(t,e)}function o(e,n){return null!=e&&(t.isArray(n)||(n=i(arguments,1)),t.all(n,(function(t){return t in e})))}var a,s,l=(a=!1,s=-1,function(){return a||(s++,a=!0,t.defer((function(){a=!1}))),s});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(e,n,r,i){for(var o,a=0,s=n.length;a<s;a++)if(o=n[a]){if("on"===e){if(!i.objectRegistry.register(o))continue}else if(!i.objectRegistry.unregister(o))continue;t.isFunction(o[e])&&o[e]("all",r,i)}}function h(e,n){var r=n.type,i=n.undoTypes,o=!i[r]||i[r][e];t.isFunction(o)&&o(n.object,n.before,n.after,n.options)}function d(e,r,i,o,a){if(!(i.isCurrentlyUndoRedoing||"undo"===e&&-1===i.pointer||"redo"===e&&i.pointer===i.length-1)){i.isCurrentlyUndoRedoing=!0;var s,l,c="undo"===e;for(a?l=c&&i.pointer===i.length-1||!c&&-1===i.pointer?t.clone(i.models):n.apply(i.models,c?[0,i.pointer]:[i.pointer,i.length-1]):(s=i.at(c?i.pointer:i.pointer+1),l=o?i.where({magicFusionIndex:s.get("magicFusionIndex")}):[s]),i.pointer+=(c?-1:1)*l.length;s=c?l.pop():l.shift();)s[e]();i.isCurrentlyUndoRedoing=!1,r.trigger(e,r)}}function f(t,e,n,i){if(t.track&&!t.isCurrentlyUndoRedoing&&e in i&&function(t,e){var n=t.condition,i=typeof n;return"function"===i?!!r(n,t,e):"boolean"!==i||n}(i[e],n)){var a=r(i[e].on,i[e],n);if(o(a,"object","before","after")){if(a.type=e,a.magicFusionIndex=l(),a.undoTypes=i,t.pointer<t.length-1)for(var s=t.length-t.pointer-1;s--;)t.pop();t.pointer=t.length,t.add(a),t.length>t.maximumStackLength&&(t.shift(),t.pointer--)}}}c.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var p={add:{undo:function(t,e,n,r){t.remove(n,r)},redo:function(t,e,n,r){r.index&&(r.at=r.index),t.add(n,r)},on:function(e,n,r){return{object:n,before:void 0,after:e,options:t.clone(r)}}},remove:{undo:function(t,e,n,r){"index"in r&&(r.at=r.index),t.add(e,r)},redo:function(t,e,n,r){t.remove(e,r)},on:function(e,n,r){return{object:n,before:e,after:void 0,options:t.clone(r)}}},change:{undo:function(e,n,r,i){t.isEmpty(n)?t.each(t.keys(r),e.unset,e):(e.set(n),i&&i.unsetData&&i.unsetData.before&&i.unsetData.before.length&&t.each(i.unsetData.before,e.unset,e))},redo:function(e,n,r,i){t.isEmpty(r)?t.each(t.keys(n),e.unset,e):(e.set(r),i&&i.unsetData&&i.unsetData.after&&i.unsetData.after.length&&t.each(i.unsetData.after,e.unset,e))},on:function(e,n){var r=e.changedAttributes(),i=t.keys(r),o=t.pick(e.previousAttributes(),i),a=t.keys(o),s=(n||(n={})).unsetData={after:[],before:[]};return i.length!=a.length&&(i.length>a.length?t.each(i,(function(t){t in o||s.before.push(t)}),this):t.each(a,(function(t){t in r||s.after.push(t)}))),{object:e,before:o,after:r,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function g(){}function v(e,n,r,i){if("object"==typeof n)return t.each(n,(function(t,n){2===e?v(e,t,r,i):v(e,n,t,r)}));switch(e){case 0:o(r,"undo","redo","on")&&t.all(t.pick(r,"undo","redo","on"),t.isFunction)&&(i[n]=r);break;case 1:i[n]&&t.isObject(r)&&(i[n]=t.extend({},i[n],r));break;case 2:delete i[n]}return this}g.prototype=p;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){h("undo",this.attributes)},redo:function(
|
|
|
|
//# sourceMappingURL=grapes.min.js.map
|