vue-grapesjs-composables
Version:
This package makes it easy to implement a GrapesJS editor in Vue, and implement Vue components to control the editor. It does this by providing composables for Vue 3 that return reactive objects for the different API modules of GrapesJS.
2 lines • 905 kB
JavaScript
import{reactive as t,onMounted as e,nextTick as n,onBeforeUnmount as r,isReactive as i,shallowRef as o,shallowReactive as a,markRaw as s,computed as c,triggerRef as l,toRaw as u,readonly as f}from"vue";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h={exports:{}};
/*! grapesjs - 0.18.3 */"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window;var p=d(h.exports=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=100)}([function(t,e,n){n.r(e),n.d(e,"default",(function(){return kn})),n.d(e,"VERSION",(function(){return i.e})),n.d(e,"restArguments",(function(){return o})),n.d(e,"isObject",(function(){return a})),n.d(e,"isNull",(function(){return s})),n.d(e,"isUndefined",(function(){return c})),n.d(e,"isBoolean",(function(){return l})),n.d(e,"isElement",(function(){return u})),n.d(e,"isString",(function(){return d})),n.d(e,"isNumber",(function(){return h})),n.d(e,"isDate",(function(){return p})),n.d(e,"isRegExp",(function(){return g})),n.d(e,"isError",(function(){return v})),n.d(e,"isSymbol",(function(){return m})),n.d(e,"isArrayBuffer",(function(){return y})),n.d(e,"isDataView",(function(){return j})),n.d(e,"isArray",(function(){return P})),n.d(e,"isFunction",(function(){return O})),n.d(e,"isArguments",(function(){return E})),n.d(e,"isFinite",(function(){return M})),n.d(e,"isNaN",(function(){return D})),n.d(e,"isTypedArray",(function(){return V})),n.d(e,"isEmpty",(function(){return U})),n.d(e,"isMatch",(function(){return W})),n.d(e,"isEqual",(function(){return Y})),n.d(e,"isMap",(function(){return ot})),n.d(e,"isWeakMap",(function(){return at})),n.d(e,"isSet",(function(){return st})),n.d(e,"isWeakSet",(function(){return ct})),n.d(e,"keys",(function(){return z})),n.d(e,"allKeys",(function(){return J})),n.d(e,"values",(function(){return lt})),n.d(e,"pairs",(function(){return ut})),n.d(e,"invert",(function(){return ft})),n.d(e,"functions",(function(){return dt})),n.d(e,"methods",(function(){return dt})),n.d(e,"extend",(function(){return pt})),n.d(e,"extendOwn",(function(){return gt})),n.d(e,"assign",(function(){return gt})),n.d(e,"defaults",(function(){return vt})),n.d(e,"create",(function(){return yt})),n.d(e,"clone",(function(){return bt})),n.d(e,"tap",(function(){return wt})),n.d(e,"get",(function(){return kt})),n.d(e,"has",(function(){return St})),n.d(e,"mapObject",(function(){return At})),n.d(e,"identity",(function(){return jt})),n.d(e,"constant",(function(){return A})),n.d(e,"noop",(function(){return Lt})),n.d(e,"toPath",(function(){return Ot})),n.d(e,"property",(function(){return _t})),n.d(e,"propertyOf",(function(){return Rt})),n.d(e,"matcher",(function(){return Pt})),n.d(e,"matches",(function(){return Pt})),n.d(e,"times",(function(){return Nt})),n.d(e,"random",(function(){return It})),n.d(e,"now",(function(){return Ft})),n.d(e,"escape",(function(){return Ht})),n.d(e,"unescape",(function(){return zt})),n.d(e,"templateSettings",(function(){return Ut})),n.d(e,"template",(function(){return Yt})),n.d(e,"result",(function(){return Jt})),n.d(e,"uniqueId",(function(){return Zt})),n.d(e,"chain",(function(){return Qt})),n.d(e,"iteratee",(function(){return Mt})),n.d(e,"partial",(function(){return ne})),n.d(e,"bind",(function(){return re})),n.d(e,"bindAll",(function(){return ae})),n.d(e,"memoize",(function(){return se})),n.d(e,"delay",(function(){return ce})),n.d(e,"defer",(function(){return le})),n.d(e,"throttle",(function(){return ue})),n.d(e,"debounce",(function(){return fe})),n.d(e,"wrap",(function(){return de})),n.d(e,"negate",(function(){return he})),n.d(e,"compose",(function(){return pe})),n.d(e,"after",(function(){return ge})),n.d(e,"before",(function(){return ve})),n.d(e,"once",(function(){return me})),n.d(e,"findKey",(function(){return ye})),n.d(e,"findIndex",(function(){return we})),n.d(e,"findLastIndex",(function(){return Oe})),n.d(e,"sortedIndex",(function(){return xe})),n.d(e,"indexOf",(function(){return ke})),n.d(e,"lastIndexOf",(function(){return Se})),n.d(e,"find",(function(){return je})),n.d(e,"detect",(function(){return je})),n.d(e,"findWhere",(function(){return Pe})),n.d(e,"each",(function(){return _e})),n.d(e,"forEach",(function(){return _e})),n.d(e,"map",(function(){return Te})),n.d(e,"collect",(function(){return Te})),n.d(e,"reduce",(function(){return Me})),n.d(e,"foldl",(function(){return Me})),n.d(e,"inject",(function(){return Me})),n.d(e,"reduceRight",(function(){return De})),n.d(e,"foldr",(function(){return De})),n.d(e,"filter",(function(){return Ae})),n.d(e,"select",(function(){return Ae})),n.d(e,"reject",(function(){return Le})),n.d(e,"every",(function(){return Re})),n.d(e,"all",(function(){return Re})),n.d(e,"some",(function(){return Ne})),n.d(e,"any",(function(){return Ne})),n.d(e,"contains",(function(){return Ie})),n.d(e,"includes",(function(){return Ie})),n.d(e,"include",(function(){return Ie})),n.d(e,"invoke",(function(){return Fe})),n.d(e,"pluck",(function(){return Ve})),n.d(e,"where",(function(){return Be})),n.d(e,"max",(function(){return He})),n.d(e,"min",(function(){return ze})),n.d(e,"shuffle",(function(){return We})),n.d(e,"sample",(function(){return Ue})),n.d(e,"sortBy",(function(){return $e})),n.d(e,"groupBy",(function(){return Ge})),n.d(e,"indexBy",(function(){return Ke})),n.d(e,"countBy",(function(){return Ye})),n.d(e,"partition",(function(){return Je})),n.d(e,"toArray",(function(){return Ze})),n.d(e,"size",(function(){return Qe})),n.d(e,"pick",(function(){return en})),n.d(e,"omit",(function(){return nn})),n.d(e,"first",(function(){return on})),n.d(e,"head",(function(){return on})),n.d(e,"take",(function(){return on})),n.d(e,"initial",(function(){return rn})),n.d(e,"last",(function(){return sn})),n.d(e,"rest",(function(){return an})),n.d(e,"tail",(function(){return an})),n.d(e,"drop",(function(){return an})),n.d(e,"compact",(function(){return cn})),n.d(e,"flatten",(function(){return ln})),n.d(e,"without",(function(){return fn})),n.d(e,"uniq",(function(){return dn})),n.d(e,"unique",(function(){return dn})),n.d(e,"union",(function(){return hn})),n.d(e,"intersection",(function(){return pn})),n.d(e,"difference",(function(){return un})),n.d(e,"unzip",(function(){return gn})),n.d(e,"transpose",(function(){return gn})),n.d(e,"zip",(function(){return vn})),n.d(e,"object",(function(){return mn})),n.d(e,"range",(function(){return yn})),n.d(e,"chunk",(function(){return bn})),n.d(e,"mixin",(function(){return On}));var r={};n.r(r),n.d(r,"VERSION",(function(){return i.e})),n.d(r,"restArguments",(function(){return o})),n.d(r,"isObject",(function(){return a})),n.d(r,"isNull",(function(){return s})),n.d(r,"isUndefined",(function(){return c})),n.d(r,"isBoolean",(function(){return l})),n.d(r,"isElement",(function(){return u})),n.d(r,"isString",(function(){return d})),n.d(r,"isNumber",(function(){return h})),n.d(r,"isDate",(function(){return p})),n.d(r,"isRegExp",(function(){return g})),n.d(r,"isError",(function(){return v})),n.d(r,"isSymbol",(function(){return m})),n.d(r,"isArrayBuffer",(function(){return y})),n.d(r,"isDataView",(function(){return j})),n.d(r,"isArray",(function(){return P})),n.d(r,"isFunction",(function(){return O})),n.d(r,"isArguments",(function(){return E})),n.d(r,"isFinite",(function(){return M})),n.d(r,"isNaN",(function(){return D})),n.d(r,"isTypedArray",(function(){return V})),n.d(r,"isEmpty",(function(){return U})),n.d(r,"isMatch",(function(){return W})),n.d(r,"isEqual",(function(){return Y})),n.d(r,"isMap",(function(){return ot})),n.d(r,"isWeakMap",(function(){return at})),n.d(r,"isSet",(function(){return st})),n.d(r,"isWeakSet",(function(){return ct})),n.d(r,"keys",(function(){return z})),n.d(r,"allKeys",(function(){return J})),n.d(r,"values",(function(){return lt})),n.d(r,"pairs",(function(){return ut})),n.d(r,"invert",(function(){return ft})),n.d(r,"functions",(function(){return dt})),n.d(r,"methods",(function(){return dt})),n.d(r,"extend",(function(){return pt})),n.d(r,"extendOwn",(function(){return gt})),n.d(r,"assign",(function(){return gt})),n.d(r,"defaults",(function(){return vt})),n.d(r,"create",(function(){return yt})),n.d(r,"clone",(function(){return bt})),n.d(r,"tap",(function(){return wt})),n.d(r,"get",(function(){return kt})),n.d(r,"has",(function(){return St})),n.d(r,"mapObject",(function(){return At})),n.d(r,"identity",(function(){return jt})),n.d(r,"constant",(function(){return A})),n.d(r,"noop",(function(){return Lt})),n.d(r,"toPath",(function(){return Ot})),n.d(r,"property",(function(){return _t})),n.d(r,"propertyOf",(function(){return Rt})),n.d(r,"matcher",(function(){return Pt})),n.d(r,"matches",(function(){return Pt})),n.d(r,"times",(function(){return Nt})),n.d(r,"random",(function(){return It})),n.d(r,"now",(function(){return Ft})),n.d(r,"escape",(function(){return Ht})),n.d(r,"unescape",(function(){return zt})),n.d(r,"templateSettings",(function(){return Ut})),n.d(r,"template",(function(){return Yt})),n.d(r,"result",(function(){return Jt})),n.d(r,"uniqueId",(function(){return Zt})),n.d(r,"chain",(function(){return Qt})),n.d(r,"iteratee",(function(){return Mt})),n.d(r,"partial",(function(){return ne})),n.d(r,"bind",(function(){return re})),n.d(r,"bindAll",(function(){return ae})),n.d(r,"memoize",(function(){return se})),n.d(r,"delay",(function(){return ce})),n.d(r,"defer",(function(){return le})),n.d(r,"throttle",(function(){return ue})),n.d(r,"debounce",(function(){return fe})),n.d(r,"wrap",(function(){return de})),n.d(r,"negate",(function(){return he})),n.d(r,"compose",(function(){return pe})),n.d(r,"after",(function(){return ge})),n.d(r,"before",(function(){return ve})),n.d(r,"once",(function(){return me})),n.d(r,"findKey",(function(){return ye})),n.d(r,"findIndex",(function(){return we})),n.d(r,"findLastIndex",(function(){return Oe})),n.d(r,"sortedIndex",(function(){return xe})),n.d(r,"indexOf",(function(){return ke})),n.d(r,"lastIndexOf",(function(){return Se})),n.d(r,"find",(function(){return je})),n.d(r,"detect",(function(){return je})),n.d(r,"findWhere",(function(){return Pe})),n.d(r,"each",(function(){return _e})),n.d(r,"forEach",(function(){return _e})),n.d(r,"map",(function(){return Te})),n.d(r,"collect",(function(){return Te})),n.d(r,"reduce",(function(){return Me})),n.d(r,"foldl",(function(){return Me})),n.d(r,"inject",(function(){return Me})),n.d(r,"reduceRight",(function(){return De})),n.d(r,"foldr",(function(){return De})),n.d(r,"filter",(function(){return Ae})),n.d(r,"select",(function(){return Ae})),n.d(r,"reject",(function(){return Le})),n.d(r,"every",(function(){return Re})),n.d(r,"all",(function(){return Re})),n.d(r,"some",(function(){return Ne})),n.d(r,"any",(function(){return Ne})),n.d(r,"contains",(function(){return Ie})),n.d(r,"includes",(function(){return Ie})),n.d(r,"include",(function(){return Ie})),n.d(r,"invoke",(function(){return Fe})),n.d(r,"pluck",(function(){return Ve})),n.d(r,"where",(function(){return Be})),n.d(r,"max",(function(){return He})),n.d(r,"min",(function(){return ze})),n.d(r,"shuffle",(function(){return We})),n.d(r,"sample",(function(){return Ue})),n.d(r,"sortBy",(function(){return $e})),n.d(r,"groupBy",(function(){return Ge})),n.d(r,"indexBy",(function(){return Ke})),n.d(r,"countBy",(function(){return Ye})),n.d(r,"partition",(function(){return Je})),n.d(r,"toArray",(function(){return Ze})),n.d(r,"size",(function(){return Qe})),n.d(r,"pick",(function(){return en})),n.d(r,"omit",(function(){return nn})),n.d(r,"first",(function(){return on})),n.d(r,"head",(function(){return on})),n.d(r,"take",(function(){return on})),n.d(r,"initial",(function(){return rn})),n.d(r,"last",(function(){return sn})),n.d(r,"rest",(function(){return an})),n.d(r,"tail",(function(){return an})),n.d(r,"drop",(function(){return an})),n.d(r,"compact",(function(){return cn})),n.d(r,"flatten",(function(){return ln})),n.d(r,"without",(function(){return fn})),n.d(r,"uniq",(function(){return dn})),n.d(r,"unique",(function(){return dn})),n.d(r,"union",(function(){return hn})),n.d(r,"intersection",(function(){return pn})),n.d(r,"difference",(function(){return un})),n.d(r,"unzip",(function(){return gn})),n.d(r,"transpose",(function(){return gn})),n.d(r,"zip",(function(){return vn})),n.d(r,"object",(function(){return mn})),n.d(r,"range",(function(){return yn})),n.d(r,"chunk",(function(){return bn})),n.d(r,"mixin",(function(){return On})),n.d(r,"default",(function(){return xn}));var i=n(9);function o(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)}}function a(t){var e=typeof t;return"function"===e||"object"===e&&!!t}function s(t){return null===t}function c(t){return void 0===t}function l(t){return!0===t||!1===t||"[object Boolean]"===i.t.call(t)}function u(t){return!(!t||1!==t.nodeType)}function f(t){var e="[object "+t+"]";return function(t){return i.t.call(t)===e}}var d=f("String"),h=f("Number"),p=f("Date"),g=f("RegExp"),v=f("Error"),m=f("Symbol"),y=f("ArrayBuffer"),b=f("Function"),w=i.p.document&&i.p.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof w&&(b=function(t){return"function"==typeof t||!1});var O=b,x=f("Object"),C=i.s&&x(new DataView(new ArrayBuffer(8))),k="undefined"!=typeof Map&&x(new Map),S=f("DataView"),j=C?function(t){return null!=t&&O(t.getInt8)&&y(t.buffer)}:S,P=i.k||f("Array");function _(t,e){return null!=t&&i.i.call(t,e)}var T=f("Arguments");!function(){T(arguments)||(T=function(t){return _(t,"callee")})}();var E=T;function M(t){return!m(t)&&Object(i.f)(t)&&!isNaN(parseFloat(t))}function D(t){return h(t)&&Object(i.g)(t)}function A(t){return function(){return t}}function L(t){return function(e){var n=t(e);return"number"==typeof n&&n>=0&&n<=i.b}}function R(t){return function(e){return null==e?void 0:e[t]}}var N=R("byteLength"),I=L(N),F=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,V=i.r?function(t){return i.l?Object(i.l)(t)&&!j(t):I(t)&&F.test(i.t.call(t))}:A(!1),B=R("length");function H(t,e){e=function(t){for(var e={},n=t.length,r=0;r<n;++r)e[t[r]]=!0;return{contains:function(t){return e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=i.n.length,r=t.constructor,o=O(r)&&r.prototype||i.c,a="constructor";for(_(t,a)&&!e.contains(a)&&e.push(a);n--;)(a=i.n[n])in t&&t[a]!==o[a]&&!e.contains(a)&&e.push(a)}function z(t){if(!a(t))return[];if(i.m)return Object(i.m)(t);var e=[];for(var n in t)_(t,n)&&e.push(n);return i.h&&H(t,e),e}function U(t){if(null==t)return!0;var e=B(t);return"number"==typeof e&&(P(t)||d(t)||E(t))?0===e:0===B(z(t))}function W(t,e){var n=z(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0}function $(t){return t instanceof $?t:this instanceof $?void(this._wrapped=t):new $(t)}function q(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,N(t))}$.VERSION=i.e,$.prototype.value=function(){return this._wrapped},$.prototype.valueOf=$.prototype.toJSON=$.prototype.value,$.prototype.toString=function(){return String(this._wrapped)};var G="[object DataView]";function K(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var o=typeof t;return("function"===o||"object"===o||"object"==typeof e)&&function t(e,n,r,o){e instanceof $&&(e=e._wrapped),n instanceof $&&(n=n._wrapped);var a=i.t.call(e);if(a!==i.t.call(n))return!1;if(C&&"[object Object]"==a&&j(e)){if(!j(n))return!1;a=G}switch(a){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return i.d.valueOf.call(e)===i.d.valueOf.call(n);case"[object ArrayBuffer]":case G:return t(q(e),q(n),r,o)}var s="[object Array]"===a;if(!s&&V(e)){if(N(e)!==N(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;s=!0}if(!s){if("object"!=typeof e||"object"!=typeof n)return!1;var c=e.constructor,l=n.constructor;if(c!==l&&!(O(c)&&c instanceof c&&O(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}o=o||[];for(var u=(r=r||[]).length;u--;)if(r[u]===e)return o[u]===n;if(r.push(e),o.push(n),s){if((u=e.length)!==n.length)return!1;for(;u--;)if(!K(e[u],n[u],r,o))return!1}else{var f,d=z(e);if(u=d.length,z(n).length!==u)return!1;for(;u--;)if(!_(n,f=d[u])||!K(e[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(t,e,n,r)}function Y(t,e){return K(t,e)}function J(t){if(!a(t))return[];var e=[];for(var n in t)e.push(n);return i.h&&H(t,e),e}function X(t){var e=B(t);return function(n){if(null==n)return!1;var r=J(n);if(B(r))return!1;for(var i=0;i<e;i++)if(!O(n[t[i]]))return!1;return t!==rt||!O(n[Z])}}var Z="forEach",Q="has",tt=["clear","delete"],et=["get",Q,"set"],nt=tt.concat(Z,et),rt=tt.concat(et),it=["add"].concat(tt,Z,Q),ot=k?X(nt):f("Map"),at=k?X(rt):f("WeakMap"),st=k?X(it):f("Set"),ct=f("WeakSet");function lt(t){for(var e=z(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r}function ut(t){for(var e=z(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r}function ft(t){for(var e={},n=z(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e}function dt(t){var e=[];for(var n in t)O(t[n])&&e.push(n);return e.sort()}function ht(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,c=0;c<s;c++){var l=a[c];e&&void 0!==n[l]||(n[l]=o[l])}return n}}var pt=ht(J),gt=ht(z),vt=ht(J,!0);function mt(t){if(!a(t))return{};if(i.j)return Object(i.j)(t);var e=function(){};e.prototype=t;var n=new e;return e.prototype=null,n}function yt(t,e){var n=mt(t);return e&>(n,e),n}function bt(t){return a(t)?P(t)?t.slice():pt({},t):t}function wt(t,e){return e(t),t}function Ot(t){return P(t)?t:[t]}function xt(t){return $.toPath(t)}function Ct(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}function kt(t,e,n){var r=Ct(t,xt(e));return c(r)?n:r}function St(t,e){for(var n=(e=xt(e)).length,r=0;r<n;r++){var i=e[r];if(!_(t,i))return!1;t=t[i]}return!!n}function jt(t){return t}function Pt(t){return t=gt({},t),function(e){return W(e,t)}}function _t(t){return t=xt(t),function(e){return Ct(e,t)}}function Tt(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)}}function Et(t,e,n){return null==t?jt:O(t)?Tt(t,e,n):a(t)&&!P(t)?Pt(t):_t(t)}function Mt(t,e){return Et(t,e,1/0)}function Dt(t,e,n){return $.iteratee!==Mt?$.iteratee(t,e):Et(t,e,n)}function At(t,e,n){e=Dt(e,n);for(var r=z(t),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=e(t[s],s,t)}return o}function Lt(){}function Rt(t){return null==t?Lt:function(e){return kt(t,e)}}function Nt(t,e,n){var r=Array(Math.max(0,t));e=Tt(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r}function It(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}$.toPath=Ot,$.iteratee=Mt;var Ft=Date.now||function(){return(new Date).getTime()};function Vt(t){var e=function(e){return t[e]},n="(?:"+z(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}}var Bt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ht=Vt(Bt),zt=Vt(ft(Bt)),Ut=$.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wt=/(.)^/,$t={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},qt=/\\|'|\r|\n|\u2028|\u2029/g;function Gt(t){return"\\"+$t[t]}var Kt=/^\s*(\w|\$)+\s*$/;function Yt(t,e,n){!e&&n&&(e=n),e=vt({},e,$.templateSettings);var r=RegExp([(e.escape||Wt).source,(e.interpolate||Wt).source,(e.evaluate||Wt).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,(function(e,n,r,a,s){return o+=t.slice(i,s).replace(qt,Gt),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e})),o+="';\n";var a,s=e.variable;if(s){if(!Kt.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(t){throw t.source=o,t}var c=function(t){return a.call(this,t,$)};return c.source="function("+s+"){\n"+o+"}",c}function Jt(t,e,n){var r=(e=xt(e)).length;if(!r)return O(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=O(o)?o.call(t):o}return t}var Xt=0;function Zt(t){var e=++Xt+"";return t?t+e:e}function Qt(t){var e=$(t);return e._chain=!0,e}function te(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=mt(t.prototype),s=t.apply(o,i);return a(s)?s:o}var ee=o((function(t,e){var n=ee.placeholder,r=function(){for(var i=0,o=e.length,a=Array(o),s=0;s<o;s++)a[s]=e[s]===n?arguments[i++]:e[s];for(;i<arguments.length;)a.push(arguments[i++]);return te(t,r,this,this,a)};return r}));ee.placeholder=$;var ne=ee,re=o((function(t,e,n){if(!O(t))throw new TypeError("Bind must be called on a function");var r=o((function(i){return te(t,r,e,this,n.concat(i))}));return r})),ie=L(B);function oe(t,e,n,r){if(r=r||[],e||0===e){if(e<=0)return r.concat(t)}else e=1/0;for(var i=r.length,o=0,a=B(t);o<a;o++){var s=t[o];if(ie(s)&&(P(s)||E(s)))if(e>1)oe(s,e-1,n,r),i=r.length;else for(var c=0,l=s.length;c<l;)r[i++]=s[c++];else n||(r[i++]=s)}return r}var ae=o((function(t,e){var n=(e=oe(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=re(t[r],t)}return t}));function se(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return _(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n}var ce=o((function(t,e,n){return setTimeout((function(){return t.apply(null,n)}),e)})),le=ne(ce,$,1);function ue(t,e,n){var r,i,o,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:Ft(),r=null,a=t.apply(i,o),r||(i=o=null)},l=function(){var l=Ft();s||!1!==n.leading||(s=l);var u=e-(l-s);return i=this,o=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,u)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l}function fe(t,e,n){var r,i,a,s,c,l=function(){var o=Ft()-i;e>o?r=setTimeout(l,e-o):(r=null,n||(s=t.apply(c,a)),r||(a=c=null))},u=o((function(o){return c=this,a=o,i=Ft(),r||(r=setTimeout(l,e),n&&(s=t.apply(c,a))),s}));return u.cancel=function(){clearTimeout(r),r=a=c=null},u}function de(t,e){return ne(e,t)}function he(t){return function(){return!t.apply(this,arguments)}}function pe(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function ge(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function ve(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var me=ne(ve,2);function ye(t,e,n){e=Dt(e,n);for(var r,i=z(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r}function be(t){return function(e,n,r){n=Dt(n,r);for(var i=B(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}var we=be(1),Oe=be(-1);function xe(t,e,n,r){for(var i=(n=Dt(n,r,1))(e),o=0,a=B(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o}function Ce(t,e,n){return function(r,o,a){var s=0,c=B(r);if("number"==typeof a)t>0?s=a>=0?a:Math.max(a+c,s):c=a>=0?Math.min(a+1,c):a+c+1;else if(n&&a&&c)return r[a=n(r,o)]===o?a:-1;if(o!=o)return(a=e(i.q.call(r,s,c),D))>=0?a+s:-1;for(a=t>0?s:c-1;a>=0&&a<c;a+=t)if(r[a]===o)return a;return-1}}var ke=Ce(1,we,xe),Se=Ce(-1,Oe);function je(t,e,n){var r=(ie(t)?we:ye)(t,e,n);if(void 0!==r&&-1!==r)return t[r]}function Pe(t,e){return je(t,Pt(e))}function _e(t,e,n){var r,i;if(e=Tt(e,n),ie(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=z(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t}function Te(t,e,n){e=Dt(e,n);for(var r=!ie(t)&&z(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}function Ee(t){var e=function(e,n,r,i){var o=!ie(e)&&z(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 c=o?o[s]:s;r=n(r,e[c],c,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,Tt(n,i,4),r,o)}}var Me=Ee(1),De=Ee(-1);function Ae(t,e,n){var r=[];return e=Dt(e,n),_e(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function Le(t,e,n){return Ae(t,he(Dt(e)),n)}function Re(t,e,n){e=Dt(e,n);for(var r=!ie(t)&&z(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}function Ne(t,e,n){e=Dt(e,n);for(var r=!ie(t)&&z(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1}function Ie(t,e,n,r){return ie(t)||(t=lt(t)),("number"!=typeof n||r)&&(n=0),ke(t,e,n)>=0}var Fe=o((function(t,e,n){var r,i;return O(e)?i=e:(e=xt(e),r=e.slice(0,-1),e=e[e.length-1]),Te(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Ct(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function Ve(t,e){return Te(t,_t(e))}function Be(t,e){return Ae(t,Pt(e))}function He(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=ie(t)?t:lt(t)).length;s<c;s++)null!=(r=t[s])&&r>o&&(o=r);else e=Dt(e,n),_e(t,(function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)}));return o}function ze(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,c=(t=ie(t)?t:lt(t)).length;s<c;s++)null!=(r=t[s])&&r<o&&(o=r);else e=Dt(e,n),_e(t,(function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)}));return o}function Ue(t,e,n){if(null==e||n)return ie(t)||(t=lt(t)),t[It(t.length-1)];var r=ie(t)?bt(t):lt(t),i=B(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var s=It(a,o),c=r[a];r[a]=r[s],r[s]=c}return r.slice(0,e)}function We(t){return Ue(t,1/0)}function $e(t,e,n){var r=0;return e=Dt(e,n),Ve(Te(t,(function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}})).sort((function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index})),"value")}function qe(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=Dt(r,i),_e(n,(function(e,i){var a=r(e,i,n);t(o,e,a)})),o}}var Ge=qe((function(t,e,n){_(t,n)?t[n].push(e):t[n]=[e]})),Ke=qe((function(t,e,n){t[n]=e})),Ye=qe((function(t,e,n){_(t,n)?t[n]++:t[n]=1})),Je=qe((function(t,e,n){t[n?0:1].push(e)}),!0),Xe=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Ze(t){return t?P(t)?i.q.call(t):d(t)?t.match(Xe):ie(t)?Te(t,jt):lt(t):[]}function Qe(t){return null==t?0:ie(t)?t.length:z(t).length}function tn(t,e,n){return e in n}var en=o((function(t,e){var n={},r=e[0];if(null==t)return n;O(r)?(e.length>1&&(r=Tt(r,e[1])),e=J(t)):(r=tn,e=oe(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],s=t[a];r(s,a,t)&&(n[a]=s)}return n})),nn=o((function(t,e){var n,r=e[0];return O(r)?(r=he(r),e.length>1&&(n=e[1])):(e=Te(oe(e,!1,!1),String),r=function(t,n){return!Ie(e,n)}),en(t,r,n)}));function rn(t,e,n){return i.q.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function on(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:rn(t,t.length-e)}function an(t,e,n){return i.q.call(t,null==e||n?1:e)}function sn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:an(t,Math.max(0,t.length-e))}function cn(t){return Ae(t,Boolean)}function ln(t,e){return oe(t,e,!1)}var un=o((function(t,e){return e=oe(e,!0,!0),Ae(t,(function(t){return!Ie(e,t)}))})),fn=o((function(t,e){return un(t,e)}));function dn(t,e,n,r){l(e)||(r=n,n=e,e=!1),null!=n&&(n=Dt(n,r));for(var i=[],o=[],a=0,s=B(t);a<s;a++){var c=t[a],u=n?n(c,a,t):c;e&&!n?(a&&o===u||i.push(c),o=u):n?Ie(o,u)||(o.push(u),i.push(c)):Ie(i,c)||i.push(c)}return i}var hn=o((function(t){return dn(oe(t,!0,!0))}));function pn(t){for(var e=[],n=arguments.length,r=0,i=B(t);r<i;r++){var o=t[r];if(!Ie(e,o)){var a;for(a=1;a<n&&Ie(arguments[a],o);a++);a===n&&e.push(o)}}return e}function gn(t){for(var e=t&&He(t,B).length||0,n=Array(e),r=0;r<e;r++)n[r]=Ve(t,r);return n}var vn=o(gn);function mn(t,e){for(var n={},r=0,i=B(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n}function yn(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i}function bn(t,e){if(null==e||e<1)return[];for(var n=[],r=0,o=t.length;r<o;)n.push(i.q.call(t,r,r+=e));return n}function wn(t,e){return t._chain?$(e).chain():e}function On(t){return _e(dt(t),(function(e){var n=$[e]=t[e];$.prototype[e]=function(){var t=[this._wrapped];return i.o.apply(t,arguments),wn(this,n.apply($,t))}})),$}_e(["pop","push","reverse","shift","sort","splice","unshift"],(function(t){var e=i.a[t];$.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),wn(this,n)}})),_e(["concat","join","slice"],(function(t){var e=i.a[t];$.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),wn(this,t)}}));var xn=$,Cn=On(r);Cn._=Cn;var kn=Cn},function(t,e,n){n.r(e),function(t){n.d(e,"isDef",(function(){return c})),n.d(e,"hasWin",(function(){return l})),n.d(e,"getGlobal",(function(){return u})),n.d(e,"toLowerCase",(function(){return f})),n.d(e,"getUiClass",(function(){return p})),n.d(e,"isCommentNode",(function(){return j})),n.d(e,"isTaggableNode",(function(){return P})),n.d(e,"find",(function(){return _})),n.d(e,"escape",(function(){return T})),n.d(e,"on",(function(){return m})),n.d(e,"off",(function(){return y})),n.d(e,"hasDnd",(function(){return C})),n.d(e,"upFirst",(function(){return w})),n.d(e,"matches",(function(){return h})),n.d(e,"getModel",(function(){return E})),n.d(e,"getElRect",(function(){return M})),n.d(e,"camelCase",(function(){return O})),n.d(e,"isTextNode",(function(){return S})),n.d(e,"getKeyCode",(function(){return A})),n.d(e,"getKeyChar",(function(){return L})),n.d(e,"isEscKey",(function(){return R})),n.d(e,"isEnterKey",(function(){return N})),n.d(e,"getElement",(function(){return k})),n.d(e,"shallowDiff",(function(){return v})),n.d(e,"normalizeFloat",(function(){return x})),n.d(e,"getPointerEvent",(function(){return D})),n.d(e,"getUnitFromValue",(function(){return b})),n.d(e,"capitalize",(function(){return V})),n.d(e,"getViewEl",(function(){return z})),n.d(e,"setViewEl",(function(){return U})),n.d(e,"appendStyles",(function(){return g})),n.d(e,"isObject",(function(){return I})),n.d(e,"isEmptyObj",(function(){return F})),n.d(e,"isComponent",(function(){return B})),n.d(e,"createId",(function(){return W})),n.d(e,"isRule",(function(){return H}));var r=n(14),i=n.n(r),o=n(11),a=n.n(o),s=n(0),c=function(t){return void 0!==t},l=function(){return"undefined"!=typeof window},u=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:t},f=function(t){return(t||"").toLowerCase()},d=l()?window.Element.prototype:{},h=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.msMatchesSelector,p=function(t,e){var n=t.getConfig(),r=n.stylePrefix;return[n.customUI&&"".concat(r,"cui"),e].filter((function(t){return t})).join(" ")},g=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s.isArray)(e)?a()(e):[e];if(r.length){var i=r.shift();if(i&&(!n.unique||!document.querySelector('link[href="'.concat(i,'"]')))){var o=document.head,c=document.createElement("link");c.href=i,c.rel="stylesheet",n.prepand?o.insertBefore(c,o.firstChild):o.appendChild(c)}t(r)}},v=function(t,e){var n={},r=Object(s.keys)(e);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];r.indexOf(i)>=0?o!==a&&(n[i]=a):n[i]=null}for(var c in e)e.hasOwnProperty(c)&&Object(s.isUndefined)(t[c])&&(n[c]=e[c]);return n},m=function(t,e,n,r){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=function(i){t.forEach((function(t){return t&&t.addEventListener(e[i],n,r)}))},o=0;o<e.length;++o)i(o)},y=function(t,e,n,r){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=function(i){t.forEach((function(t){return t&&t.removeEventListener(e[i],n,r)}))},o=0;o<e.length;++o)i(o)},b=function(t){return t.replace(parseFloat(t),"")},w=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)},O=function(t){return t.replace(/-./g,(function(t){return t[1].toUpperCase()}))},x=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var i=e.toString().split(".")[1];r=i?i.length:0}return r?parseFloat(t.toFixed(r)):t},C=function(t){return"draggable"in document.createElement("i")&&(t?t.get("Config").nativeDnD:1)},k=function(t){return Object(s.isElement)(t)||S(t)?t:t&&t.getEl?t.getEl():void 0},S=function(t){return t&&3===t.nodeType},j=function(t){return t&&8===t.nodeType},P=function(t){return t&&!S(t)&&!j(t)},_=function(t,e){var n=null;return t.some((function(r,i){return e(r,i,t)?(n=r,1):0})),n},T=function(){return"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")},E=function(t,e){var n=t;return!e&&t&&t.__cashData?n=t.__cashData.model:Object(s.isElement)(t)&&(n=e(t).data("model")),n},M=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(S(t)){var r=document.createRange();r.selectNode(t),e=r.getBoundingClientRect(),r.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},D=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},A=function(t){return t.which||t.keyCode},L=function(t){return String.fromCharCode(A(t))},R=function(t){return 27===A(t)},N=function(t){return 13===A(t)},I=function(t){return null!==t&&!Array.isArray(t)&&"object"===i()(t)},F=function(t){return Object.keys(t).length<=0},V=function(t){return t&&t.charAt(0).toUpperCase()+t.substring(1)},B=function(t){return t&&t.toHTML},H=function(t){return t&&t.toCSS},z=function(t){return t.__gjsv},U=function(t,e){t.__gjsv=e},W=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}}.call(this,n(33))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){(function(r){var i,o,a;a="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r,i=[n(0),n(21),e],void 0===(o=function(t,e,n){a.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,r){n.each(e,(function(e,i){n[i]&&(t.prototype[i]=function(t,e,r){switch(t){case 1:return function(){return n[e](this[r])};case 2:return function(t){return n[e](this[r],t)};case 3:return function(t,i){return n[e](this[r],s(t,this),i)};case 4:return function(t,i,o){return n[e](this[r],s(t,this),i,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[r]),n[e].apply(n,t)}}}(e,i,r))}))},s=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},l=e.Events={},u=/\s+/,f=function(t,e,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)e=f(t,e,a[s],r[a[s]],o)}else if(r&&u.test(r))for(a=r.split(u);s<a.length;s++)e=t(e,a[s],i,o);else e=t(e,r,i,o);return e};l.on=function(t,e,n){return d(this,t,e,n)};var d=function(t,e,n,r,i){return t._events=f(h,t._events||{},e,n,{context:r,ctx:t,listening:i}),i&&((t._listeners||(t._listeners={}))[i.id]=i),t};l.listenTo=function(t,e,r){if(!t)return this;var i=t._listenId||(t._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId("l"));a=o[i]={obj:t,objId:i,id:s,listeningTo:o,count:0}}return d(t,e,r,this,a),this};var h=function(t,e,n,r){if(n){var i=t[e]||(t[e]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return t};l.off=function(t,e,n){return this._events?(this._events=f(p,this._events,t,e,{context:n,listeners:this._listeners}),this):this},l.stopListening=function(t,e,r){var i=this._listeningTo;if(!i)return this;for(var o=t?[t._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(e,r,this)}return this};var p=function(t,e,r,i){if(t){var o,a=0,s=i.context,c=i.listeners;if(e||r||s){for(var l=e?[e]:n.keys(t);a<l.length;a++){var u=t[e=l[a]];if(!u)break;for(var f=[],d=0;d<u.length;d++){var h=u[d];r&&r!==h.callback&&r!==h.callback._callback||s&&s!==h.context?f.push(h):(o=h.listening)&&0==--o.count&&(delete c[o.id],delete o.listeningTo[o.objId])}f.length?t[e]=f:delete t[e]}return t}for(var p=n.keys(c);a<p.length;a++)delete c[(o=c[p[a]]).id],delete o.listeningTo[o.objId]}};l.once=function(t,e,r){var i=f(g,{},t,e,n.bind(this.off,this));return"string"==typeof t&&null==r&&(e=void 0),this.on(i,e,r)},l.listenToOnce=function(t,e,r){var i=f(g,{},e,r,n.bind(this.stopListening,this,t));return this.listenTo(t,i)};var g=function(t,e,r,i){if(r){var o=t[e]=n.once((function(){i(e,o),r.apply(this,arguments)}));o._callback=r}return t};l.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;r<e;r++)n[r]=arguments[r+1];return f(v,this._events,t,void 0,n),this};var v=function(t,e,n,r){if(t){var i=t[e],o=t.all;i&&o&&(o=o.slice()),i&&m(i,r),o&&m(o,[e].concat(r))}return t},m=function(t,e){var n,r=-1,i=t.length,o=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e);return}};l.bind=l.on,l.unbind=l.off,n.extend(e,l);var y=e.Model=function(t,e){var r=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,l,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(null==t)return this;var i;if("object"==typeof t?(i=t,r=e):(i={})[t]=e,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],c=this._changing;this._changing=!0,c||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,u=this.changed,f=this._previousAttributes;for(var d in i)e=i[d],n.isEqual(l[d],e)||s.push(d),n.isEqual(f[d],e)?delete u[d]:u[d]=e,o?delete l[d]:l[d]=e;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var h=0;h<s.length;h++)this.trigger("change:"+s[h],this,l[s[h]],r)}if(c)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,r={};for(var i in t){var o=t[i];n.isEqual(e[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,r=t.success;return t.success=function(n){var i=t.parse?e.parse(n,t):n;if(!e.set(i,t))return!1;r&&r.call(t.context,e,n,t),e.trigger("sync",e,n,t)},I(this,t),this.sync("read",this,t)},save:function(t,e,r){var i;null==t||"object"==typeof t?(i=t,r=e):(i={})[t]=e;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,c=this.attributes;r.success=function(t){a.attributes=c;var e=r.parse?a.parse(t,r):t;if(o&&(e=n.extend({},i,e)),e&&!a.set(e,r))return!1;s&&s.call(r.context,a,t,r),a.trigger("sync",a,t,r)},I(this,r),i&&o&&(this.attributes=n.extend({},c,i));var l=this.isNew()?"create":r.patch?"patch":"update";"patch"!==l||r.attrs||(r.attrs=i);var u=this.sync(l,this,r);return this.attributes=c,u},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,i=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){i&&o(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):(I(this,t),a=this.sync("delete",this,t)),i||o(),a},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||N();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return!r||(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1)}}),a(y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var b=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},O={add:!0,remove:!1},x=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var r,i=Array(t.length-n),o=e.length;for(r=0;r<i.length;r++)i[r]=t[r+n];for(r=0;r<o;r++)t[r+n]=e[r];for(r=0;r<i.length;r++)t[r+o+n]=i[r]};n.extend(b.prototype,l,{model:y,initialize:function(){},toJSON:function(t){return this.map((function(e){return e.toJSON(t)}))},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,O))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:t.slice();var i=this._removeModels(t,e);return!e.silent&&i.length&&(e.changes={added:[],merged:[],removed:i},this.trigger("update",this,e)),r?i[0]:i},set:function(t,e){if(null!=t){(e=n.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var r=!n.isArray(t);t=r?[t]:t.slice();var i=e.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],c=[],l=[],u=[],f={},d=e.add,h=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var y=this.get(o);if(y){if(h&&o!==y){var b=this._isModel(o)?o.attributes:o;e.parse&&(b=y.parse(b,e)),y.set(b,e),l.push(y),v&&!g&&(g=y.hasChanged(m))}f[y.cid]||(f[y.cid]=!0,s.push(y)),t[a]=y}else d&&(o=t[a]=this._prepareModel(o,e))&&(c.push(o),this._addReference(o,e),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||u.push(o);u.length&&this._removeModels(u,e)}var O=!1,C=!v&&d&&p;if(s.length&&C?(O=this.length!==s.length||n.some(this.models,(function(t,e){return t!==s[e]})),this.models.length=0,x(this.models,s,0),this.length=this.models.length):c.length&&(v&&(g=!0),x(this.models,c,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<c.length;a++)null!=i&&(e.index=i+a),(o=c[a]).trigger("add",o,this,e);(g||O)&&this.trigger("sort",this,e),(c.length||u.length||l.length)&&(e.changes={added:c,removed:u,merged:l},this.trigger("update",this,e))}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;return n.isFunction(e)&&(e=n.bind(e,this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,r=this;return t.success=function(n){var i=t.reset?"reset":"set";r[i](n,t),e&&e.call(t.context,r,n,t),r.trigger("sync",r,n,t)},I(this,t),this.sync("read",this,t)},create:function(t,e){var r=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;r||this.add(t,e);var i=this,o=e.success;return e.success=function(t,e,n){r&&i.add(t,n),o&&o.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;(e=e?n.clone(e):{}).collection=this;var r=new this.model(t,e);return r.validationError?(this.trigger("invalid",this,r.validationError,e),!1):r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var i=this.get(t[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],e.silent||(e.index=o,i.trigger("remove",i,this,e)),n.push(i),this._removeReference(i,e)}}return n},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,r),"change"===t){var i=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e))}}this.trigger.apply(this,arguments)}}),a(b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var C=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,S)),this._ensureElement(),this.initialize.apply(this,arguments)},k=/^(\S+)\s*(.*)$/,S=["model","collection","el","id","attributes","className","tagName","events"];n.extend(C.prototype,l,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElem