From b4be72a572759868aac3da1cb5390fcafbe59e51 Mon Sep 17 00:00:00 2001 From: Philip John Date: Fri, 3 Jul 2020 17:00:42 +0100 Subject: [PATCH] Fix error about _blank window target When building, NPM reports the following error: > error Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blank This change fixes that by adding the required rel attribute to the link. --- assets/0.bundle.js | 107895 +++++++++++++++++++++- assets/amp.css | 3 +- assets/amp.js | 87 +- assets/amp.js.map | 2 +- assets/app.css | 440 +- assets/app.js | 49875 +++++++++- assets/app.js.map | 10 +- src/react/containers/EntryContainer.js | 2 +- 8 files changed, 158274 insertions(+), 40 deletions(-) diff --git a/assets/0.bundle.js b/assets/0.bundle.js index 7570307b6..5ab85e68c 100644 --- a/assets/0.bundle.js +++ b/assets/0.bundle.js @@ -1,35 +1,107902 @@ -webpackJsonp([0],Array(355).concat([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t0&&l[0],h=l.length>1&&l.slice(1,l.length),p=/<(img|picture|video|audio|canvas|svg|iframe|embed) ?.*>/;if(s.getCurrentContent().getPlainText().trim()||null!==p.exec((0,j.convertToHTML)(s.getCurrentContent()))){if(o)return t({id:n.id,content:c,author:d,contributors:h}),void r(n.id);i({content:c,author:d,contributors:h});var f=b.EditorState.push(s,b.ContentState.createFromText(""));this.onChange(f),this.setState({readOnly:!1})}}},{key:"onSelectAuthorChange",value:function(e){this.setState({authors:e})}},{key:"getUsers",value:function(e,t){var n=this.props.config;(0,E.getAuthors)(e,n).timeout(1e4).map(function(e){return e.response}).subscribe(function(e){return t(null,{options:e,complete:!1})})}},{key:"getAuthors",value:function(e){var t=this,n=this.props.config;(0,E.getAuthors)(e,n).timeout(1e4).map(function(e){return e.response}).subscribe(function(e){return t.setState({suggestions:e.map(function(e){return e})})})}},{key:"getHashtags",value:function(e){var t=this,n=this.props.config;(0,E.getHashtags)(e,n).timeout(1e4).map(function(e){return e.response}).subscribe(function(e){return t.setState({suggestions:e.map(function(e){return e})})})}},{key:"filterCommandSuggestions",value:function(e,t){this.setState({suggestions:e.filter(function(e){return e.substring(0,t.length)===t})})}},{key:"filterEmojiSuggestions",value:function(e,t){this.setState({suggestions:e.filter(function(e){return e.key.toString().substring(0,t.length)===t})})}},{key:"handleOnSearch",value:function(e,t){var n=this.props.config;switch(e){case"@":this.getAuthors(t);break;case"#":this.getHashtags(t);break;case"/":this.filterCommandSuggestions(n.autocomplete[0].data,t);break;case":":this.filterEmojiSuggestions(n.autocomplete[1].data,t);break;default:this.setState({suggestions:[]})}}},{key:"handleImageUpload",value:function(e){var t=this.props.config,n=new FormData;return n.append("name",e.name),n.append("action","upload-attachment"),n.append("_wpnonce",t.image_nonce),n.append("async-upload",e),new Promise(function(e){(0,E.uploadImage)(n).timeout(6e4).map(function(e){return e.response}).subscribe(function(n){var r=(0,R.getImageSize)(n.data.sizes,t.default_image_size);e(r)})})}},{key:"render",value:function(){var e=this,t=this.state,n=t.editorState,r=t.suggestions,i=t.mode,o=t.authors,a=t.readOnly,s=this.props,u=s.isEditing,c=s.config;return d.default.createElement("div",{className:"liveblog-editor-container"},!u&&d.default.createElement("h1",{className:"liveblog-editor-title"},"Add New Entry"),d.default.createElement("div",{className:"liveblog-editor-tabs"},d.default.createElement("button",{className:"liveblog-editor-tab "+("editor"===i?"is-active":""),onClick:function(){return e.setState({mode:"editor"})}},"Visual"),d.default.createElement("button",{className:"liveblog-editor-tab "+("raw"===i?"is-active":""),onClick:function(){return e.setState({mode:"raw"})}},"Text"),d.default.createElement("button",{className:"liveblog-editor-tab "+("preview"===i?"is-active":""),onClick:function(){return e.setState({mode:"preview"})}},"Preview")),"preview"===i&&d.default.createElement(C.default,{config:c,getEntryContent:function(){return e.getContent()}}),"editor"===i&&d.default.createElement(L.default,{editorState:n,onChange:this.onChange,suggestions:r,resetSuggestions:function(){return e.setState({suggestions:[]})},onSearch:function(t,n){return e.handleOnSearch(t,n)},autocompleteConfig:c.autocomplete,handleImageUpload:this.handleImageUpload.bind(this),readOnly:a,setReadOnly:this.setReadOnly.bind(this),defaultImageSize:c.default_image_size}),"raw"===i&&d.default.createElement(F.default,{value:this.state.rawText,onChange:function(t){e.setState({rawText:t},function(){e.syncRawTextToEditorState()})},height:"275px",width:"100%"}),d.default.createElement("h2",{className:"liveblog-editor-subTitle"},"Authors:"),d.default.createElement(m.Async,{multi:!0,value:o,valueKey:"key",labelKey:"name",onChange:this.onSelectAuthorChange.bind(this),optionComponent:T.default,loadOptions:this.getUsers,clearable:!1,cache:!1}),d.default.createElement("button",{className:"liveblog-btn liveblog-publish-btn",onClick:this.publish.bind(this)},u?"Publish Update":"Publish New Entry"))}}]),t}(l.Component);D.propTypes={config:p.default.object,updateEntry:p.default.func,entry:p.default.object,entryEditClose:p.default.func,createEntry:p.default.func,isEditing:p.default.bool,authors:p.default.array,getAuthors:p.default.func};var M=function(e){return e},I=function(e){return(0,f.bindActionCreators)(u({},w,x),e)};t.default=(0,g.connect)(M,I)(D)},function(e,t,n){"use strict";function r(e){return"function"==typeof e?e:null==e?a.a:"object"==typeof e?Object(s.a)(e)?Object(o.a)(e[0],e[1]):Object(i.a)(e):Object(u.a)(e)}var i=n(852),o=n(856),a=n(368),s=n(357),u=n(489);t.a=r},function(e,t,n){"use strict";var r=Array.isArray;t.a=r},function(e,t,n){"use strict";function r(e,t){return Object(a.a)(Object(o.a)(e,t,i.a),e+"")}var i=n(368),o=n(839),a=n(535);t.a=r},function(e,t,n){"use strict";function r(e){var t=Object(i.a)(e),n=t%1;return t===t?n?t-n:t:0}var i=n(413);t.a=r},function(e,t,n){"use strict";function r(e){return null==e?"":Object(i.a)(e)}var i=n(387);t.a=r},function(e,t,n){!function(t,n){e.exports=function(){"use strict";function e(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function t(e){return o(e)?e:O(e)}function n(e){return a(e)?e:F(e)}function r(e){return s(e)?e:j(e)}function i(e){return o(e)&&!u(e)?e:L(e)}function o(e){return!(!e||!e[cn])}function a(e){return!(!e||!e[ln])}function s(e){return!(!e||!e[dn])}function u(e){return a(e)||s(e)}function c(e){return!(!e||!e[hn])}function l(e){return e.value=!1,e}function d(e){e&&(e.value=!0)}function h(){}function p(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?f(e)+t:t}function m(){return!0}function v(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function _(e,t){return y(e,t,0)}function b(e,t){return y(e,t,t)}function y(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function k(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function x(){return{value:void 0,done:!0}}function E(e){return!!A(e)}function S(e){return e&&"function"==typeof e.next}function C(e){var t=A(e);return t&&t.call(e)}function A(e){var t=e&&(kn&&e[kn]||e[xn]);if("function"==typeof t)return t}function T(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?N():o(e)?e.toSeq():$(e)}function F(e){return null===e||void 0===e?N().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():P(e)}function j(e){return null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function L(e){return(null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function R(e){this._array=e,this.size=e.length}function D(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function M(e){this._iterable=e,this.size=e.length||e.size}function I(e){this._iterator=e,this._iteratorCache=[]}function B(e){return!(!e||!e[Sn])}function N(){return Cn||(Cn=new R([]))}function P(e){var t=Array.isArray(e)?new R(e).fromEntrySeq():S(e)?new I(e).fromEntrySeq():E(e)?new M(e).fromEntrySeq():"object"==typeof e?new D(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=W(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function $(e){var t=W(e)||"object"==typeof e&&new D(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function W(e){return T(e)?new R(e):S(e)?new I(e):E(e)?new M(e):void 0}function U(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function q(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new w(function(){var e=i[n?o-a:a];return a++>o?x():k(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function H(e,t){return t?V(t,e,"",{"":e}):K(e)}function V(e,t,n,r){return Array.isArray(t)?e.call(r,n,j(t).map(function(n,r){return V(e,n,r,t)})):G(t)?e.call(r,n,F(t).map(function(n,r){return V(e,n,r,t)})):t}function K(e){return Array.isArray(e)?j(e).map(K).toList():G(e)?F(e).map(K).toMap():e}function G(e){return e&&(e.constructor===Object||void 0===e.constructor)}function Y(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function X(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&Y(i[1],e)&&(n||Y(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var d=!0,h=t.__iterate(function(t,r){if(n?!e.has(t):i?!Y(t,e.get(r,mn)):!Y(e.get(r,mn),t))return d=!1,!1});return d&&e.size===h}function J(e,t){if(!(this instanceof J))return new J(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(An)return An;An=this}}function Q(e,t){if(!e)throw new Error(t)}function Z(e,t,n){if(!(this instanceof Z))return new Z(e,t,n);if(Q(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(!1===e||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null===e||void 0===e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>In?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=Pn[e];return void 0===t&&(t=se(e),Nn===Bn&&(Nn=0,Pn={}),Nn++,Pn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Q(e!==1/0,"Cannot perform this action with an infinite size.")}function de(e){return null===e||void 0===e?ke():he(e)&&!c(e)?e:ke().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function he(e){return!(!e||!e[zn])}function pe(e,t){this.ownerID=e,this.entries=t}function fe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function ge(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function _e(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ye(e._root)}function be(e,t){return k(e,t[0],t[1])}function ye(e,t){return{node:e,index:0,__prev:t}}function we(e,t,n,r){var i=Object.create($n);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ke(){return Wn||(Wn=we(0))}function xe(e,t,n){var r,i;if(e._root){var o=l(vn),a=l(_n);if(r=Ee(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===mn?-1:1:0)}else{if(n===mn)return e;i=1,r=new pe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?we(i,r):ke()}function Ee(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===mn?e:(d(s),d(a),new ve(t,r,[i,o]))}function Se(e){return e.constructor===ve||e.constructor===me}function Ce(e,t,n,r,i){if(e.keyHash===r)return new me(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&gn,s=(0===n?r:r>>>n)&gn;return new fe(t,1<>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new ge(e,o+1,a)}function Fe(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Ie(e,t,n,r){var i=r?e:p(e);return i[t]=n,i}function Be(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,c=a-n;return c>fn&&(c=fn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=1+(a-i>>r);return l>fn&&(l=fn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-pn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Ye(e,t).set(0,n):Ye(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(_n);return t>=Je(e._capacity)?r=Ve(r,e.__ownerID,0,t,n,o):i=Ve(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ue(e._origin,e._capacity,e._level,i,r):e}function Ve(e,t,n,r,i,o){var a=r>>>n&gn,s=e&&a0){var c=e&&e.array[a],l=Ve(c,t,n-pn,r,i,o);return l===c?e:(u=Ke(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(d(o),u=Ke(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Ke(e,t){return t&&e&&t===e.ownerID?e:new $e(e?e.array.slice():[],t)}function Ge(e,t){if(t>=Je(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&gn],r-=pn;return n}}function Ye(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new h,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new $e(c&&c.array.length?[void 0,c]:[],r),u+=pn,l+=1<=1<d?new $e([],r):f;if(f&&p>d&&apn;v-=pn){var _=d>>>v&gn;m=m.array[_]=Ke(m.array[_],r)}m.array[d>>>pn&gn]=f}if(s=p)a-=p,s-=p,u=pn,c=null,g=g&&g.removeBefore(r,0,a);else if(a>i||p>>u&gn;if(b!==p>>>u&gn)break;b&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&pa&&(a=c.size),o(u)||(c=c.map(function(e){return H(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),Re(e,t,i)}function Je(e){return e>>pn<=fn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ot,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===wn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===yn?bn:yn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,mn);return o===mn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(wn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return k(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ot,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function lt(e,t,n,r){var i=Tt(e);return r&&(i.has=function(r){var i=e.get(r,mn);return i!==mn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,mn);return o!==mn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){if(t.call(n,e,o,u))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(wn,o),s=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return k(i,r?c:s++,l,o)}})},i}function dt(e,t,n){var r=de().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ht(e,t,n){var r=a(e),i=(c(e)?Qe():de()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=At(e);return i.map(function(t){return Et(e,o(t))})}function pt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),v(t,n,i))return e;var o=_(t,i),a=b(n,i);if(o!==o||a!==a)return pt(e.toSeq().cacheResult(),t,n,r);var s,u=a-o;u===u&&(s=u<0?0:u);var c=Tt(e);return c.size=0===s?s:e.size&&s||void 0,!r&&B(e)&&s>=0&&(c.get=function(t,n){return t=g(this,t),t>=0&&ts)return x();var e=i.next();return r||t===yn?e:t===bn?k(t,u-1,void 0,e):k(t,u-1,e.value[1],e)})},c}function ft(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(wn,i),s=!0;return new w(function(){if(!s)return x();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===wn?e:k(r,u,c,e):(s=!1,x())})},r}function gt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(wn,o),u=!0,c=0;return new w(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===yn?e:i===bn?k(i,c++,void 0,e):k(i,c++,e.value[1],e);var d=e.value;o=d[0],l=d[1],u&&(u=t.call(n,l,o,a))}while(u);return i===wn?e:k(i,o,l,e)})},i}function mt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?P(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new R(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function vt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||c0}function xt(e,n,r){var i=Tt(e);return i.size=new R(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(yn,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),C(i?e.reverse():e)}),a=0,s=!1;return new w(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?x():k(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function Et(e,t){return B(e)?t:e.constructor(t)}function St(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ct(e){return le(e.size),f(e)}function At(e){return a(e)?n:s(e)?r:i}function Tt(e){return Object.create((a(e)?F:s(e)?j:L).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Ft(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=c(e),n=a(e),r=t?1:0;return an(e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0}),r)}function an(e,t){return t=Fn(t,3432918353),t=Fn(t<<15|t>>>-15,461845907),t=Fn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Fn(t^t>>>16,2246822507),t=Fn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=c,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",dn="@@__IMMUTABLE_INDEXED__@@",hn="@@__IMMUTABLE_ORDERED__@@",pn=5,fn=1<r?x():k(e,i,n[t?r-i++:i++])})},e(D,F),D.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},D.prototype.has=function(e){return this._object.hasOwnProperty(e)},D.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},D.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[t?i-o:o];return o++>i?x():k(e,a,n[a])})},D.prototype[hn]=!0,e(M,j),M.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=C(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,i++,this););return i},M.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=C(n);if(!S(r))return new w(x);var i=0;return new w(function(){var t=r.next();return t.done?t:k(e,i++,t.value)})},e(I,j),I.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return k(e,i,r[i++])})};var Cn;e(J,j),J.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},J.prototype.get=function(e,t){return this.has(e)?this._value:t},J.prototype.includes=function(e){return Y(this._value,e)},J.prototype.slice=function(e,t){var n=this.size;return v(e,t,n)?this:new J(this._value,b(t,n)-_(e,n))},J.prototype.reverse=function(){return this},J.prototype.indexOf=function(e){return Y(this._value,e)?0:-1},J.prototype.lastIndexOf=function(e){return Y(this._value,e)?this.size:-1},J.prototype.__iterate=function(e,t){for(var n=0;n1?" by "+this._step:"")+" ]"},Z.prototype.get=function(e,t){return this.has(e)?this._start+g(this,e)*this._step:t},Z.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t=0&&nn?x():k(e,o++,a)})},Z.prototype.equals=function(e){return e instanceof Z?this._start===e._start&&this._end===e._end&&this._step===e._step:X(this,e)};var Tn;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var On,Fn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},jn=Object.isExtensible,Ln=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Rn="function"==typeof WeakMap;Rn&&(On=new WeakMap);var Dn=0,Mn="__immutablehash__";"function"==typeof Symbol&&(Mn=Symbol(Mn));var In=16,Bn=255,Nn=0,Pn={};e(de,te),de.prototype.toString=function(){return this.__toString("Map {","}")},de.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},de.prototype.set=function(e,t){return xe(this,e,t)},de.prototype.setIn=function(e,t){return this.updateIn(e,mn,function(){return t})},de.prototype.remove=function(e){return xe(this,e,mn)},de.prototype.deleteIn=function(e){return this.updateIn(e,function(){return mn})},de.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},de.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=De(this,jt(e),t,n);return r===mn?void 0:r},de.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ke()},de.prototype.merge=function(){return Fe(this,void 0,arguments)},de.prototype.mergeWith=function(e){return Fe(this,e,un.call(arguments,1))},de.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,ke(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},de.prototype.mergeDeep=function(){return Fe(this,je,arguments)},de.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Fe(this,Le(e),t)},de.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,ke(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},de.prototype.sort=function(e){return Qe(yt(this,e))},de.prototype.sortBy=function(e,t){return Qe(yt(this,t,e))},de.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},de.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new h)},de.prototype.asImmutable=function(){return this.__ensureOwner()},de.prototype.wasAltered=function(){return this.__altered},de.prototype.__iterator=function(e,t){return new _e(this,e,t)},de.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},de.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?we(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},de.isMap=he;var zn="@@__IMMUTABLE_MAP__@@",$n=de.prototype;$n[zn]=!0,$n.delete=$n.remove,$n.removeIn=$n.deleteIn,pe.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Un)return Ae(e,u,r,i);var f=e&&e===this.ownerID,g=f?u:p(u);return h?s?c===l-1?g.pop():g[c]=g.pop():g[c]=[r,i]:g.push([r,i]),f?(this.entries=g,this):new pe(e,g)}},fe.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&gn),o=this.bitmap;return 0==(o&i)?r:this.nodes[Me(o&i-1)].get(e+pn,t,n,r)},fe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&gn,u=1<=qn)return Oe(e,h,c,s,f);if(l&&!f&&2===h.length&&Se(h[1^d]))return h[1^d];if(l&&f&&1===h.length&&Se(f))return f;var g=e&&e===this.ownerID,m=l?f?c:c^u:c|u,v=l?f?Ie(h,d,f,g):Ne(h,d,g):Be(h,d,f,g);return g?(this.bitmap=m,this.nodes=v,this):new fe(e,m,v)},ge.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&gn,o=this.nodes[i];return o?o.get(e+pn,t,n,r):r},ge.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&gn,u=i===mn,c=this.nodes,l=c[s];if(u&&!l)return this;var d=Ee(l,e,t+pn,n,r,i,o,a);if(d===l)return this;var h=this.count;if(l){if(!d&&--h=0&&e>>t&gn;if(r>=this.array.length)return new $e([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-pn,n))===a&&o)return this}if(o&&!i)return this;var s=Ke(this,e);if(!o)for(var u=0;u>>t&gn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if((i=o&&o.removeAfter(e,t-pn,n))===o&&r===this.array.length-1)return this}var a=Ke(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Gn,Yn={};e(Qe,de),Qe.of=function(){return this(arguments)},Qe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qe.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Qe.prototype.set=function(e,t){return nt(this,e,t)},Qe.prototype.remove=function(e){return nt(this,e,mn)},Qe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qe.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Qe.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Qe.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Qe.isOrderedMap=Ze,Qe.prototype[hn]=!0,Qe.prototype.delete=Qe.prototype.remove;var Xn;e(rt,F),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ct(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(yn,t),r=t?Ct(this):0;return new w(function(){var i=n.next();return i.done?i:k(e,t?--r:r++,i.value,i)})},rt.prototype[hn]=!0,e(it,j),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(yn,t),r=0;return new w(function(){var t=n.next();return t.done?t:k(e,r++,t.value,t)})},e(ot,L),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(yn,t);return new w(function(){var t=n.next();return t.done?t:k(e,t.value,t.value,t)})},e(at,F),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){St(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(yn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){St(r);var i=o(r);return k(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Ot,e(Lt,te),Lt.prototype.toString=function(){return this.__toString(Dt(this)+" {","}")},Lt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Lt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Lt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Rt(this,ke()))},Lt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Dt(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Rt(this,n)},Lt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Rt(this,t)},Lt.prototype.wasAltered=function(){return this._map.wasAltered()},Lt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Lt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Lt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Rt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Jn=Lt.prototype;Jn.delete=Jn.remove,Jn.deleteIn=Jn.removeIn=$n.removeIn,Jn.merge=$n.merge,Jn.mergeWith=$n.mergeWith,Jn.mergeIn=$n.mergeIn,Jn.mergeDeep=$n.mergeDeep,Jn.mergeDeepWith=$n.mergeDeepWith,Jn.mergeDeepIn=$n.mergeDeepIn,Jn.setIn=$n.setIn,Jn.update=$n.update,Jn.updateIn=$n.updateIn,Jn.withMutations=$n.withMutations,Jn.asMutable=$n.asMutable,Jn.asImmutable=$n.asImmutable,e(Bt,re),Bt.of=function(){return this(arguments)},Bt.fromKeys=function(e){return this(n(e).keySeq())},Bt.prototype.toString=function(){return this.__toString("Set {","}")},Bt.prototype.has=function(e){return this._map.has(e)},Bt.prototype.add=function(e){return Pt(this,this._map.set(e,!0))},Bt.prototype.remove=function(e){return Pt(this,this._map.remove(e))},Bt.prototype.clear=function(){return Pt(this,this._map.clear())},Bt.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gt(e,t)},Vt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gt(t,n)},Vt.prototype.pop=function(){return this.slice(1)},Vt.prototype.unshift=function(){return this.push.apply(this,arguments)},Vt.prototype.unshiftAll=function(e){return this.pushAll(e)},Vt.prototype.shift=function(){return this.pop.apply(this,arguments)},Vt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yt()},Vt.prototype.slice=function(e,t){if(v(e,t,this.size))return this;var n=_(e,this.size);if(b(t,this.size)!==this.size)return ne.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Gt(r,i)},Vt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,k(e,n++,t)}return x()})},Vt.isStack=Kt;var rr="@@__IMMUTABLE_STACK__@@",ir=Vt.prototype;ir[rr]=!0,ir.withMutations=$n.withMutations,ir.asMutable=$n.asMutable,ir.asImmutable=$n.asImmutable,ir.wasAltered=$n.wasAltered;var or;t.Iterator=w,Xt(t,{toArray:function(){le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return de(this.toKeyedSeq())},toObject:function(){le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Qe(this.toKeyedSeq())},toOrderedSet:function(){return Wt(a(this)?this.valueSeq():this)},toSet:function(){return Bt(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vt(a(this)?this.valueSeq():this)},toList:function(){return Pe(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return Et(this,mt(this,un.call(arguments,0)))},includes:function(e){return this.some(function(t){return Y(t,e)})},entries:function(){return this.__iterator(wn)},every:function(e,t){le(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return Et(this,lt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1}),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return Et(this,ut(this,e,t))},reduce:function(e,t,n){le(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Et(this,ct(this,!0))},slice:function(e,t){return Et(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return Et(this,yt(this,e))},values:function(){return this.__iterator(yn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return f(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return dt(this,e,t)},equals:function(e){return X(this,e)},entrySeq:function(){var e=this;if(e._cache)return new R(e._cache);var t=e.toSeq().map(Qt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(m)},flatMap:function(e,t){return Et(this,_t(this,e,t))},flatten:function(e){return Et(this,vt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return Y(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=jt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,mn):mn)===mn)return t}return r},groupBy:function(e,t){return ht(this,e,t)},has:function(e){return this.get(e,mn)!==mn},hasIn:function(e){return this.getIn(e,mn)!==mn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keySeq:function(){return this.toSeq().map(Jt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return wt(this,e)},maxBy:function(e,t){return wt(this,t,e)},min:function(e){return wt(this,e?en(e):rn)},minBy:function(e,t){return wt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Et(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Et(this,gt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return Et(this,yt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Et(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Et(this,ft(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ar=t.prototype;ar[cn]=!0,ar[En]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=tn,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,function(){try{Object.defineProperty(ar,"length",{get:function(){if(!t.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Xt(n,{flip:function(){return Et(this,st(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey(function(t){return Y(t,e)})},lastKeyOf:function(e){return this.findLastKey(function(t){return Y(t,e)})},mapEntries:function(e,t){var n=this,r=0;return Et(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Et(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var sr=n.prototype;return sr[ln]=!0,sr[En]=ar.entries,sr.__toJS=ar.toObject,sr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Xt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return Et(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return Et(this,ct(this,!1))},slice:function(e,t){return Et(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=_(e,e<0?this.count():this.size);var r=this.slice(0,e);return Et(this,1===n?r:r.concat(p(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return Et(this,vt(this,e,!1))},get:function(e,t){return e=g(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=g(this,e))>=0&&(void 0!==this.size?this.size===1/0||e0?i.getInlineStyleAt(r-1):i.getLength()?i.getInlineStyleAt(0):d(e,n)}function l(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);return r0?i.getInlineStyleAt(r-1):d(e,n)}function d(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):b()}var h=n(94),p=h||function(e){for(var t=1;t0&&n(l)?t>1?r(l,t-1,n,a,s):Object(i.a)(s,l):a||(s[s.length]=l)}return s}var i=n(405),o=n(977);t.a=r},function(e,t,n){"use strict";function r(e){return Object(o.a)(e)&&Object(i.a)(e)}var i=n(369),o=n(149);t.a=r},function(e,t,n){"use strict";function r(e){return Object(a.a)(e)?Object(i.a)(e,!0):Object(o.a)(e)}var i=n(840),o=n(957),a=n(369);t.a=r},function(e,t,n){"use strict";function r(e,t,n){if(!Object(s.a)(n))return!1;var r=typeof t;return!!("number"==r?Object(o.a)(n)&&Object(a.a)(t,n.length):"string"==r&&t in n)&&Object(i.a)(n[t],e)}var i=n(377),o=n(369),a=n(395),s=n(364);t.a=r},function(e,t,n){"use strict";function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.a=r},function(e,t,n){"use strict";var r=n(378),i=n(1080),o=n(412),a=n(361),s=n(1081),u=n(1083),c=n(523),l=n(1086),d=n(1087),h=n(362),p=n(1088),f=n(893),g=n(1089),m=n(1090),v=a.OrderedSet,_={replaceText:function(e,t,n,i,o){var a=f(e,t),s=g(a,t),u=r.create({style:i||v(),entity:o||null});return d(s,s.getSelectionAfter(),n,u)},insertText:function(e,t,n,r,i){return t.isCollapsed()||h(!1),_.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=c(e,t),i=_.removeRange(e,t,"backward");return _.replaceWithFragment(i,n,r)},replaceWithFragment:function(e,t,n){var r=f(e,t),i=g(r,t);return l(i,i.getSelectionAfter(),n)},removeRange:function(e,t,n){var r=void 0,i=void 0,a=void 0,s=void 0;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),i=t.getFocusKey(),a=e.getBlockForKey(r),s=e.getBlockForKey(i);var c=t.getStartOffset(),l=t.getEndOffset(),d=a.getEntityAt(c),h=s.getEntityAt(l-1);if(r===i&&d&&d===h){var p=u(e.getEntityMap(),a,s,t,n);return g(e,p)}var m=t;o.draft_segmented_entities_behavior&&(m=u(e.getEntityMap(),a,s,t,n));var v=f(e,m);return g(v,m)},splitBlock:function(e,t){var n=f(e,t),r=g(n,t);return m(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return i.add(e,t,n)},removeInlineStyle:function(e,t,n){return i.remove(e,t,n)},setBlockType:function(e,t,n){return p(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return p(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return p(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,n){var r=f(e,t);return s(r,t,n)}};e.exports=_},function(e,t,n){"use strict";function r(e){return"symbol"==typeof e||Object(o.a)(e)&&Object(i.a)(e)==a}var i=n(151),o=n(149),a="[object Symbol]";t.a=r},function(e,t,n){"use strict";function r(e,t){return e===t||e!==e&&t!==t}t.a=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(361),s=a.Map,u=a.OrderedSet,c=a.Record,l=u(),d={style:l,entity:null},h=c(d),p=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.getStyle=function(){return this.get("style")},t.prototype.getEntity=function(){return this.get("entity")},t.prototype.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return f;var n={style:l,entity:null},r=s(n).merge(e),i=g.get(r);if(i)return i;var o=new t(r);return g=g.set(r,o),o},t}(h),f=new p,g=s([[s(d),f]]);p.EMPTY=f,e.exports=p},function(e,t,n){"use strict";function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.a=r},function(e,t,n){"use strict";function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0&&void 0!==arguments[0]?arguments[0]:g;return r(this,t),i(this,e.call(this,_(n)))}return o(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.getChildKeys=function(){return this.get("children")},t.prototype.getParentKey=function(){return this.get("parent")},t.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},t.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},t.prototype.findStyleRanges=function(e,t){u(this.getCharacterList(),m,e,t)},t.prototype.findEntityRanges=function(e,t){u(this.getCharacterList(),v,e,t)},t}(h(g));e.exports=b},function(e,t,n){"use strict";function r(e){if(!Object(o.a)(e))return!1;var t=Object(i.a)(e);return t==s||t==u||t==a||t==c}var i=n(151),o=n(364),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r1&&void 0!==arguments[1]?arguments[1]:[]).reduce(function(t,n){return Math.max(e.lastIndexOf(n),t)},-1)},a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"${"+e+"}";return e.split(".").reduce(function(e,t){return e[t]||n},t)};t.parseTemplate=function(e,t,n){return e.replace(/\$\{.+?}/g,function(e){var r=e.substr(2,e.length-3).trim();return a(r,t,n)})},t.hasEntityAtSelection=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t||e.getSelection();if(!n.getHasFocus())return!1;var r=e.getCurrentContent(),i=r.getBlockForKey(n.getStartKey()),o=i.getEntityAt(n.getStartOffset()-1);return!!o&&r.getEntity(o)},t.getTriggerRange=function(e){var t=window.getSelection();if(0===t.rangeCount)return null;var n=t.getRangeAt(0),r=n.startContainer.textContent.substring(0,n.startOffset);if(/\s+$/.test(r))return null;var i=o(r,e);return-1===i?null:{text:r.substring(i),start:i,end:n.startOffset}},t.getInsertRange=function(e,t){var n=t.getSelection(),r=n.getAnchorOffset(),i=n.getAnchorKey();return{start:t.getCurrentContent().getBlockForKey(i).getText().substring(0,r).lastIndexOf(e.trigger),end:r}},t.getTopPosition=function(e,t){var n=window.getSelection().getRangeAt(0).cloneRange();n.setStart(n.startContainer,e.start);var r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return i.top-r.top+i.height},t.scrollElementIfNotInView=function(e,t){var n=t.getBoundingClientRect(),r=n.bottom,i=n.top,o=e.getBoundingClientRect(),a=o.bottom,s=o.top;a>r&&(t.scrollTop+=o.height),s-1&&e%1==0&&e=r?e:Object(i.a)(e,t,n)}var i=n(384);t.a=r},function(e,t,n){"use strict";function r(e){return Object(o.a)(e)?Object(a.a)(e):Object(i.a)(e)}var i=n(978),o=n(430),a=n(979);t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n=t?e:t)),e}t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=-1,d=o.a,h=e.length,p=!0,f=[],g=f;if(n)p=!1,d=a.a;else if(h>=l){var m=t?null:Object(u.a)(e);if(m)return Object(c.a)(m);p=!1,d=s.a,g=new i.a}else g=t?[]:f;e:for(;++rr||n<=0)return"";var i=0;if(t>0){for(;t>0&&i=r)return""}else if(t<0){for(i=r;t<0&&00&&s1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&Object(o.a)(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1&&e%1==0&&e<=i}var i=9007199254740991;t.a=r},function(e,t,n){"use strict";(function(e){var r=n(155),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a&&r.a.process,u=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();t.a=u}).call(t,n(154)(e))},function(e,t,n){"use strict";function r(e,t){t=Object(i.a)(t,e);for(var n=0,r=t.length;null!=e&&n=a},t.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},t.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},t.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},t.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},t.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}(c);e.exports=l},function(e,t,n){"use strict";function r(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).map(i).join(" "):Array.prototype.map.call(arguments,i).join(" ")}function i(e){return e.replace(/\//g,"-")}e.exports=r},function(e,t,n){"use strict";function r(){}t.a=r},function(e,t,n){"use strict";function r(e){return function(){return e}}t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=e[t];s.call(e,t)&&Object(o.a)(r,n)&&(void 0!==n||t in e)||Object(i.a)(e,t,n)}var i=n(396),o=n(377),a=Object.prototype,s=a.hasOwnProperty;t.a=r},function(e,t,n){"use strict";function r(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}var i=Object.prototype;t.a=r},function(e,t,n){"use strict";function r(){return!1}t.a=r},function(e,t,n){"use strict";var r=n(389),i=n(426),o=n(372),a=Object(i.a)(function(e,t,n,i){Object(r.a)(t,Object(o.a)(t),e,i)});t.a=a},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?void 0:Object(i.a)(e,t);return void 0===r?n:r}var i=n(429);t.a=r},function(e,t,n){"use strict";function r(e){if(!Object(o.a)(e))return!1;var t=Object(i.a)(e);return t==u||t==s||"string"==typeof e.message&&"string"==typeof e.name&&!Object(a.a)(e)}var i=n(151),o=n(149),a=n(95),s="[object DOMException]",u="[object Error]";t.a=r},function(e,t,n){"use strict";var r=n(842),i=Object(r.a)("toUpperCase");t.a=i},function(e,t,n){"use strict";function r(){return[]}t.a=r},function(e,t,n){"use strict";function r(e,t){return null!=e&&Object(o.a)(e,t,i.a)}var i=n(1006),o=n(857);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){var d=-1,h=o.a,p=!0,f=e.length,g=[],m=t.length;if(!f)return g;n&&(t=Object(s.a)(t,Object(u.a)(n))),r?(h=a.a,p=!1):t.length>=l&&(h=c.a,p=!1,t=new i.a(t));e:for(;++d-1}var i=n(424);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var i=n(359),o="Expected a function";t.a=r},function(e,t,n){"use strict";var r=n(358),i=n(393),o=n(425),a=n(418),s=Object(r.a)(function(e,t,n){var r=1;if(n.length){var u=Object(a.a)(n,Object(o.a)(s));r|=32}return Object(i.a)(e,r,t,n,u)});s.placeholder={},t.a=s},function(e,t,n){"use strict";function r(e){return Object(o.a)(Object(i.a)(e).toLowerCase())}var i=n(360),o=n(448);t.a=r},function(e,t,n){"use strict";function r(e){return(e=Object(o.a)(e))&&e.replace(a,i.a).replace(s,"")}var i=n(980),o=n(360),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.a=r},function(e,t,n){"use strict";function r(e,t,n){return e=Object(a.a)(e),t=n?void 0:t,void 0===t?Object(o.a)(e)?Object(s.a)(e):Object(i.a)(e):e.match(t)||[]}var i=n(981),o=n(982),a=n(360),s=n(983);t.a=r},function(e,t,n){"use strict";function r(e){var t=Object(i.a)(e);return t.__chain__=!0,t}var i=n(415);t.a=r},function(e,t,n){"use strict";function r(e){var t=this.__data__=new i.a(e);this.size=t.size}var i=n(470),o=n(984),a=n(985),s=n(986),u=n(987),c=n(988);r.prototype.clear=o.a,r.prototype.delete=a.a,r.prototype.get=s.a,r.prototype.has=u.a,r.prototype.set=c.a,t.a=r},function(e,t,n){"use strict";var r=n(999),i=n(381),o=n(428),a=o.a&&o.a.isMap,s=a?Object(i.a)(a):r.a;t.a=s},function(e,t,n){"use strict";var r=n(1e3),i=n(381),o=n(428),a=o.a&&o.a.isSet,s=a?Object(i.a)(a):r.a;t.a=s},function(e,t,n){"use strict";function r(){return new i.a(this.value(),this.__chain__)}var i=n(416);t.a=r},function(e,t,n){"use strict";function r(e,t,n,a,s){return e===t||(null==e||null==t||!Object(o.a)(e)&&!Object(o.a)(t)?e!==e&&t!==t:Object(i.a)(e,t,n,a,r,s))}var i=n(1001),o=n(149);t.a=r},function(e,t,n){"use strict";function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i.a;++t=t||n<0||C&&r>=y}function p(){var e=Object(o.a)();if(h(e))return f(e);k=setTimeout(p,d(e))}function f(e){return k=void 0,A&&_?r(e):(_=b=void 0,w)}function g(){void 0!==k&&clearTimeout(k),E=0,_=x=b=k=void 0}function m(){return void 0===k?w:f(Object(o.a)())}function v(){var e=Object(o.a)(),n=h(e);if(_=arguments,b=this,x=e,n){if(void 0===k)return l(x);if(C)return clearTimeout(k),k=setTimeout(p,t),r(x)}return void 0===k&&(k=setTimeout(p,t)),w}var _,b,y,w,k,x,E=0,S=!1,C=!1,A=!0;if("function"!=typeof e)throw new TypeError(s);return t=Object(a.a)(t)||0,Object(i.a)(n)&&(S=!!n.leading,C="maxWait"in n,y=C?u(Object(a.a)(n.maxWait)||0,t):y,A="trailing"in n?!!n.trailing:A),v.cancel=g,v.flush=m,v}var i=n(364),o=n(492),a=n(388),s="Expected a function",u=Math.max,c=Math.min;t.a=r},function(e,t,n){"use strict";var r=n(150),i=function(){return r.a.Date.now()};t.a=i},function(e,t,n){"use strict";function r(e){return Object(i.a)(e,Object(o.a)(e))}var i=n(389),o=n(372);t.a=r},function(e,t,n){"use strict";var r=n(580),i=n(426),o=Object(i.a)(function(e,t,n,i){Object(r.a)(e,t,n,i)});t.a=o},function(e,t,n){"use strict";function r(e,t,n,r){for(var o=e.length,a=r?o:-1;(r?a--:++a"']/g,s=RegExp(a.source);t.a=r},function(e,t,n){"use strict";function r(e){return e?Object(i.a)(Object(o.a)(e),0,a):0}var i=n(419),o=n(359),a=4294967295;t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var u=null==n?0:Object(a.a)(n);return u<0&&(u=s(r+u,0)),Object(i.a)(e,Object(o.a)(t,3),u)}var i=n(466),o=n(356),a=n(359),s=Math.max;t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var c=r-1;return void 0!==n&&(c=Object(a.a)(n),c=n<0?s(r+c,0):u(c,r-1)),Object(i.a)(e,Object(o.a)(t,3),c,!0)}var i=n(466),o=n(356),a=n(359),s=Math.max,u=Math.min;t.a=r},function(e,t,n){"use strict";function r(e){return e&&e.length?e[0]:void 0}t.a=r},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(t,function(t){return Object(o.a)(e[t])})}var i=n(408),o=n(383);t.a=r},function(e,t,n){"use strict";function r(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Object(i.a)(t),n=Object(i.a)(n)),e(t,n)}}var i=n(388);t.a=r},function(e,t,n){"use strict";function r(e){return"number"==typeof e&&e==Object(i.a)(e)}var i=n(359);t.a=r},function(e,t,n){"use strict";function r(e){return"number"==typeof e||Object(o.a)(e)&&Object(i.a)(e)==a}var i=n(151),o=n(149),a="[object Number]";t.a=r},function(e,t,n){"use strict";function r(e,t,n){for(var r=-1,o=e.length;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}var i=n(512);t.a=r},function(e,t,n){"use strict";function r(e){if(!e)return[];if(Object(s.a)(e))return Object(u.a)(e)?Object(h.a)(e):Object(o.a)(e);if(m&&e[m])return Object(c.a)(e[m]());var t=Object(a.a)(e);return(t==f?l.a:t==g?d.a:p.a)(e)}var i=n(97),o=n(380),a=n(400),s=n(369),u=n(433),c=n(1027),l=n(567),d=n(488),h=n(407),p=n(411),f="[object Map]",g="[object Set]",m=i.a?i.a.iterator:void 0;t.a=r},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n=Object(i.a)(Object(s.a)(e),function(e){return[e]});return t=Object(o.a)(t),Object(a.a)(e,n,function(e,n){return t(e,n[0])})}var i=n(365),o=n(356),a=n(877),s=n(557);t.a=r},function(e,t,n){"use strict";var r=n(358),i=n(393),o=n(425),a=n(418),s=Object(r.a)(function(e,t){var n=Object(a.a)(t,Object(o.a)(s));return Object(i.a)(e,32,void 0,t,n)});s.placeholder={},t.a=s},function(e,t,n){"use strict";function r(e){for(var t,n=this;n instanceof i.a;){var r=Object(o.a)(n);r.__index__=0,r.__values__=void 0,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t}var i=n(464),o=n(833);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&e.length&&t&&t.length?Object(i.a)(e,t):e}var i=n(709);t.a=r},function(e,t,n){"use strict";function r(e){return null==e?e:o.call(e)}var i=Array.prototype,o=i.reverse;t.a=r},function(e,t,n){"use strict";function r(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n>>1,l=e[c];null!==l&&!Object(a.a)(l)&&(n?l<=t:l1,"convertToHTML: Element of type ".concat(e.type," must render children")),o()(t.length<3,"convertToHTML: Element of type ".concat(e.type," cannot use carriage return character")),{start:t[0],end:t[1]}}t.a=r;var i=n(152),o=n.n(i),a=n(8),s=n.n(a),u=n(526),c=n.n(u),l=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]},function(e,t,n){var r,i;!function(){var n=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e,t){return new i(e,t).beautify()}var i=n(1).Beautifier,o=n(5).Options;e.exports=r,e.exports.defaultOptions=function(){return new o}},function(e,t,n){"use strict";function r(e,t){return-1!==t.indexOf(e)}function i(e){return e.replace(/^\s+/g,"")}function o(e,t){return e&&e.type===w.RESERVED&&e.text===t}function a(e,t){return e&&e.type===w.RESERVED&&r(e.text,t)}function s(e,t){t.multiline_frame||t.mode===C.ForInitializer||t.mode===C.Conditional||e.remove_indent(t.start_line_index)}function u(e){e=e.replace(m.allLineBreaks,"\n");for(var t=[],n=e.indexOf("\n");-1!==n;)t.push(e.substring(0,n)),e=e.substring(n+1),n=e.indexOf("\n");return e.length&&t.push(e),t}function c(e){return e===C.ArrayLiteral}function l(e){return r(e,[C.Expression,C.ForInitializer,C.Conditional])}function d(e,t){for(var n=0;nn&&(n=e.line_indent_level)),{mode:t,parent:e,last_token:e?e.last_token:new g(w.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,alignment:0,line_indent_level:e?e.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0}},p.prototype._reset=function(e){var t=e.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,t),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(C.BlockStatement);var n=new _(e,this._options);return this._tokens=n.tokenize(),e},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&m.lineBreak.test(e||"")&&(t=e.match(m.lineBreak)[0]));for(var n=this._tokens.next();n;)this.handle_token(n),this._last_last_text=this._flags.last_token.text,this._flags.last_token=n,n=this._tokens.next();return this._output.get_code(t)},p.prototype.handle_token=function(e,t){e.type===w.START_EXPR?this.handle_start_expr(e):e.type===w.END_EXPR?this.handle_end_expr(e):e.type===w.START_BLOCK?this.handle_start_block(e):e.type===w.END_BLOCK?this.handle_end_block(e):e.type===w.WORD?this.handle_word(e):e.type===w.RESERVED?this.handle_word(e):e.type===w.SEMICOLON?this.handle_semicolon(e):e.type===w.STRING?this.handle_string(e):e.type===w.EQUALS?this.handle_equals(e):e.type===w.OPERATOR?this.handle_operator(e):e.type===w.COMMA?this.handle_comma(e):e.type===w.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===w.COMMENT?this.handle_comment(e,t):e.type===w.DOT?this.handle_dot(e):e.type===w.EOF?this.handle_eof(e):(e.type,w.UNKNOWN,this.handle_unknown(e,t))},p.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,r=this._options.keep_array_indentation&&c(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,t),this.handle_token(i,t),i=e.comments_before.next();if(r)for(var o=0;o0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var a=1;a0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},p.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},p.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===C.Statement&&s(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},p.prototype.start_of_object_property=function(){return this._flags.parent.mode===C.ObjectLiteral&&this._flags.mode===C.Statement&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||a(this._flags.last_token,["get","set"]))},p.prototype.start_of_statement=function(e){var t=!1;return t=t||a(this._flags.last_token,["var","let","const"])&&e.type===w.WORD,t=t||o(this._flags.last_token,"do"),t=t||!(this._flags.parent.mode===C.ObjectLiteral&&this._flags.mode===C.Statement)&&a(this._flags.last_token,A)&&!e.newlines,t=t||o(this._flags.last_token,"else")&&!(o(e,"if")&&!e.comments_before),t=t||this._flags.last_token.type===w.END_EXPR&&(this._previous_flags.mode===C.ForInitializer||this._previous_flags.mode===C.Conditional),t=t||this._flags.last_token.type===w.WORD&&this._flags.mode===C.BlockStatement&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==w.WORD&&e.type!==w.RESERVED,!!(t=t||this._flags.mode===C.ObjectLiteral&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||a(this._flags.last_token,["get","set"])))&&(this.set_mode(C.Statement),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,a(e,["do","for","if","while"])),!0)},p.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=C.Expression;if("["===e.text){if(this._flags.last_token.type===w.WORD||")"===this._flags.last_token.text)return a(this._flags.last_token,b)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));t=C.ArrayLiteral,c(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),r(this._flags.last_token.type,[w.START_EXPR,w.END_EXPR,w.WORD,w.OPERATOR])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===w.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,t=C.ForInitializer):r(this._flags.last_token.text,["if","while"])?(this._output.space_before_token=this._options.space_before_conditional,t=C.Conditional):r(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(r(this._flags.last_token.text,b)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===w.EQUALS||this._flags.last_token.type===w.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===w.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var i=this._tokens.peek(-4);a(n,["async","function"])||"*"===n.text&&a(i,["async","function"])?this._output.space_before_token=!0:this._flags.mode===C.ObjectLiteral&&("{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==i.text&&","!==i.text)||(this._output.space_before_token=!0))}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===w.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(r(this._last_last_text,["function","yield"])||this._flags.mode===C.ObjectLiteral&&r(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===w.START_BLOCK?this.print_newline():this._flags.last_token.type!==w.END_EXPR&&this._flags.last_token.type!==w.START_EXPR&&this._flags.last_token.type!==w.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==w.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},p.prototype.handle_end_expr=function(e){for(;this._flags.mode===C.Statement;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&c(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==w.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),s(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===C.Conditional&&(this._previous_flags.mode=C.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},p.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===w.END_EXPR?(this.set_mode(C.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(C.BlockStatement):n&&(r(n.text,[":",","])&&r(t.type,[w.STRING,w.WORD,w.RESERVED])||r(t.text,["get","set","..."])&&r(n.type,[w.WORD,w.RESERVED]))?r(this._last_last_text,["class","interface"])?this.set_mode(C.BlockStatement):this.set_mode(C.ObjectLiteral):this._flags.last_token.type===w.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(C.BlockStatement):r(this._flags.last_token.type,[w.EQUALS,w.START_EXPR,w.COMMA,w.OPERATOR])||a(this._flags.last_token,["return","throw","import","default"])?this.set_mode(C.ObjectLiteral):this.set_mode(C.BlockStatement);var i=!t.comments_before&&"}"===t.text,o=i&&"function"===this._flags.last_word&&this._flags.last_token.type===w.END_EXPR;if(this._options.brace_preserve_inline){var s=0,u=null;this._flags.inline_frame=!0;do{if(s+=1,u=this._tokens.peek(s-1),u.newlines){this._flags.inline_frame=!1;break}}while(u.type!==w.EOF&&(u.type!==w.END_BLOCK||u.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==w.OPERATOR&&(o||this._flags.last_token.type===w.EQUALS||a(this._flags.last_token,k)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!c(this._previous_flags.mode)||this._flags.last_token.type!==w.START_EXPR&&this._flags.last_token.type!==w.COMMA||((this._flags.last_token.type===w.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===w.COMMA||this._flags.last_token.type===w.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==w.OPERATOR&&this._flags.last_token.type!==w.START_EXPR&&(this._flags.last_token.type!==w.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),this.print_token(e),this.indent(),i||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},p.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===C.Statement;)this.restore_mode();var t=this._flags.last_token.type===w.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:"expand"===this._options.brace_style?t||this.print_newline():t||(c(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},p.prototype.handle_word=function(e){if(e.type===w.RESERVED)if(r(e.text,["set","get"])&&this._flags.mode!==C.ObjectLiteral)e.type=w.WORD;else if("import"===e.text&&"("===this._tokens.peek().text)e.type=w.WORD;else if(r(e.text,["as","from"])&&!this._flags.import_block)e.type=w.WORD;else if(this._flags.mode===C.ObjectLiteral){var t=this._tokens.peek();":"===t.text&&(e.type=w.WORD)}if(this.start_of_statement(e)?a(this._flags.last_token,["var","let","const"])&&e.type===w.WORD&&(this._flags.declaration_statement=!0):!e.newlines||l(this._flags.mode)||this._flags.last_token.type===w.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===w.EQUALS||!this._options.preserve_newlines&&a(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(o(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&o(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===C.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&a(e,["case","default"]))return this.print_newline(),this._flags.last_token.type!==w.END_BLOCK&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==w.COMMA&&this._flags.last_token.type!==w.START_EXPR&&this._flags.last_token.type!==w.EQUALS&&this._flags.last_token.type!==w.OPERATOR||this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e),o(e,"function"))return(r(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!r(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==w.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===w.RESERVED||this._flags.last_token.type===w.WORD?a(this._flags.last_token,["get","set","new","export"])||a(this._flags.last_token,A)?this._output.space_before_token=!0:o(this._flags.last_token,"default")&&"export"===this._last_last_text?this._output.space_before_token=!0:"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===w.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!l(this._flags.mode)&&!c(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var n="NONE";if(this._flags.last_token.type===w.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":a(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===w.SEMICOLON&&this._flags.mode===C.BlockStatement?n="NEWLINE":this._flags.last_token.type===w.SEMICOLON&&l(this._flags.mode)?n="SPACE":this._flags.last_token.type===w.STRING?n="NEWLINE":this._flags.last_token.type===w.RESERVED||this._flags.last_token.type===w.WORD||"*"===this._flags.last_token.text&&(r(this._last_last_text,["function","yield"])||this._flags.mode===C.ObjectLiteral&&r(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===w.START_BLOCK?n=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===w.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),a(e,b)&&")"!==this._flags.last_token.text&&(n=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),a(e,["else","catch","finally"]))if((this._flags.last_token.type!==w.END_BLOCK||this._previous_flags.mode!==C.BlockStatement||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var i=this._output.current_line;"}"!==i.last()&&this.print_newline(),this._output.space_before_token=!0}else"NEWLINE"===n?a(this._flags.last_token,k)?this._output.space_before_token=!0:"declare"===this._flags.last_token.text&&a(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==w.END_EXPR?this._flags.last_token.type===w.START_EXPR&&a(e,["var","let","const"])||":"===this._flags.last_token.text||(o(e,"if")&&o(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):a(e,b)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&c(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===n&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==w.WORD&&e.previous.type!==w.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===w.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&o(e,"from")&&(this._flags.import_block=!1))},p.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();!(this._flags.mode!==C.Statement||this._flags.if_block&&o(t,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},p.prototype.handle_string=function(e){this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===w.RESERVED||this._flags.last_token.type===w.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===w.COMMA||this._flags.last_token.type===w.START_EXPR||this._flags.last_token.type===w.EQUALS||this._flags.last_token.type===w.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):this.print_newline()),this.print_token(e)},p.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},p.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(l(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===C.ObjectLiteral||this._flags.mode===C.Statement&&this._flags.parent.mode===C.ObjectLiteral?(this._flags.mode===C.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},p.prototype.handle_operator=function(e){var t="*"===e.text&&(a(this._flags.last_token,["function","yield"])||r(this._flags.last_token.type,[w.START_BLOCK,w.COMMA,w.END_BLOCK,w.SEMICOLON])),n=r(e.text,["-","+"])&&(r(this._flags.last_token.type,[w.START_BLOCK,w.START_EXPR,w.EQUALS,w.OPERATOR])||r(this._flags.last_token.text,b)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var i=!t;this.handle_whitespace_and_comments(e,i)}if(a(this._flags.last_token,k))return this._output.space_before_token=!0,void this.print_token(e);if("*"===e.text&&this._flags.last_token.type===w.DOT)return void this.print_token(e);if("::"===e.text)return void this.print_token(e);if(this._flags.last_token.type===w.OPERATOR&&r(this._options.operator_position,S)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==w.START_BLOCK?(this.indent(),this.print_newline()):this._output.space_before_token=!0);var o=!0,s=!0,u=!1;if(":"===e.text?0===this._flags.ternary_depth?o=!1:(this._flags.ternary_depth-=1,u=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&r(e.text,y)){var c=":"===e.text,d=c&&u,h=c&&!u;switch(this._options.operator_position){case E.before_newline:return this._output.space_before_token=!h,this.print_token(e),c&&!d||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case E.after_newline:return this._output.space_before_token=!0,!c||d?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case E.preserve_newline:return h||this.allow_wrap_or_preserved_newline(e),o=!(this._output.just_added_newline()||h),this._output.space_before_token=o,this.print_token(e),void(this._output.space_before_token=!0)}}if(t){this.allow_wrap_or_preserved_newline(e),o=!1;var p=this._tokens.peek();s=p&&r(p.type,[w.WORD,w.RESERVED])}else"..."===e.text?(this.allow_wrap_or_preserved_newline(e),o=this._flags.last_token.type===w.START_BLOCK,s=!1):(r(e.text,["--","++","!","~"])||n)&&(this._flags.last_token.type!==w.COMMA&&this._flags.last_token.type!==w.START_EXPR||this.allow_wrap_or_preserved_newline(e),o=!1,s=!1,!e.newlines||"--"!==e.text&&"++"!==e.text||this.print_newline(!1,!0),";"===this._flags.last_token.text&&l(this._flags.mode)&&(o=!0),this._flags.last_token.type===w.RESERVED?o=!0:this._flags.last_token.type===w.END_EXPR?o=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===w.OPERATOR&&(o=r(e.text,["--","-","++","+"])&&r(this._flags.last_token.text,["--","-","++","+"]),r(e.text,["+","-"])&&r(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==C.BlockStatement||this._flags.inline_frame)&&this._flags.mode!==C.Statement||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline());this._output.space_before_token=this._output.space_before_token||o,this.print_token(e),this._output.space_before_token=s},p.prototype.handle_block_comment=function(e,t){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,t),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):m.newline.test(e.text)||e.newlines?void this.print_block_commment(e,t):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},p.prototype.print_block_commment=function(e,t){var n,r=u(e.text),o=!1,a=!1,s=e.whitespace_before,c=s.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(r[0]),this.print_newline(!1,t),r.length>1){for(r=r.slice(1),o=d(r,"*"),a=h(r,s),o&&(this._flags.alignment=1),n=0;n0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function o(e,t){this.__indent_cache=new i(e,t),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new r(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}r.prototype.clone_empty=function(){var e=new r(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},r.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},r.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},r.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},r.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},r.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},r.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},r.prototype.is_empty=function(){return 0===this.__items.length},r.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},r.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},r.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},r.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},r.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},r.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},r.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},i.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},i.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},i.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(t=Math.floor(e/this.__indent_size),e-=t*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},o.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},o.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(e,t){for(var n=this.__lines.length-2;n>=0;){var i=this.__lines[n];if(i.is_empty())break;if(0!==i.item(0).indexOf(e)&&i.item(-1)!==t){this.__lines.splice(n+1,0,new r(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},e.exports.Output=o},function(e,t,n){"use strict";function r(e,t,n,r){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=r},function(e,t,n){"use strict";var r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="(?:\\\\u[0-9a-fA-F]{4}|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+r+"])";t.identifier=new RegExp(i+"(?:\\\\u[0-9a-fA-F]{4}|[\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f])*","g"),t.identifierStart=new RegExp(i),t.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a"+r+"\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f])+"),t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g")},function(e,t,n){"use strict";function r(e){i.call(this,e,"js");var t=this.raw_options.brace_style||null;"expand-strict"===t?this.raw_options.brace_style="expand":"collapse-preserve-inline"===t?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r126&&n<=255&&0===i[0].indexOf("x"))return e;if(n>=0&&n<32){t+="\\"+i[0];continue}t+=34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return t}var o=n(8).InputScanner,a=n(9).Tokenizer,s=n(9).TOKEN,u=n(13).Directives,c=n(4),l=n(12).Pattern,d=n(14).TemplatablePattern,h={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},p=new u(/\/\*/,/\*\//),f=/0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/,g=/[0-9]/,m=/[^\d\.]/,v=">>> === !== << && >= ** != == <= >> || < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= => ^= :: /= << <= == && -= >= >> != -- += ** || ++ %= &= *= |= = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_=_.replace(/ /g,"|");var b,y=new RegExp(_),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),k=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),x=new RegExp("^(?:"+k.join("|")+")$"),E=function(e,t){a.call(this,e,t),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new l(this._input),r=new d(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(c.identifier).matching(c.identifierMatch),number:n.matching(f),punct:n.matching(y),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(//),include:n.starting_with(/#include/).until_after(c.lineBreak),shebang:n.starting_with(/#!/).until_after(c.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};E.prototype=new a,E.prototype._is_comment=function(e){return e.type===h.COMMENT||e.type===h.BLOCK_COMMENT||e.type===h.UNKNOWN},E.prototype._is_opening=function(e){return e.type===h.START_BLOCK||e.type===h.START_EXPR},E.prototype._is_closing=function(e,t){return(e.type===h.END_BLOCK||e.type===h.END_EXPR)&&t&&("]"===e.text&&"["===t.text||")"===e.text&&"("===t.text||"}"===e.text&&"{"===t.text)},E.prototype._reset=function(){b=!1},E.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(h.EOF,""):(n=n||this._read_non_javascript(r),n=n||this._read_string(r),n=n||this._read_word(e),n=n||this._read_singles(r),n=n||this._read_comment(r),n=n||this._read_regexp(r,e),n=n||this._read_xml(r,e),n=n||this._read_punctuation(),n=n||this._create_token(h.UNKNOWN,this._input.next()))},E.prototype._read_word=function(e){var t;return""!==(t=this.__patterns.identifier.read())?(t=t.replace(c.allLineBreaks,"\n"),e.type!==h.DOT&&(e.type!==h.RESERVED||"set"!==e.text&&"get"!==e.text)&&x.test(t)?"in"===t||"of"===t?this._create_token(h.OPERATOR,t):this._create_token(h.RESERVED,t):this._create_token(h.WORD,t)):(t=this.__patterns.number.read(),""!==t?this._create_token(h.WORD,t):void 0)},E.prototype._read_singles=function(e){var t=null;return"("===e||"["===e?t=this._create_token(h.START_EXPR,e):")"===e||"]"===e?t=this._create_token(h.END_EXPR,e):"{"===e?t=this._create_token(h.START_BLOCK,e):"}"===e?t=this._create_token(h.END_BLOCK,e):";"===e?t=this._create_token(h.SEMICOLON,e):"."===e&&m.test(this._input.peek(1))?t=this._create_token(h.DOT,e):","===e&&(t=this._create_token(h.COMMA,e)),t&&this._input.next(),t},E.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(h.EQUALS,e):this._create_token(h.OPERATOR,e)},E.prototype._read_non_javascript=function(e){var t="";if("#"===e){if(this._is_first_token()&&(t=this.__patterns.shebang.read()))return this._create_token(h.UNKNOWN,t.trim()+"\n");if(t=this.__patterns.include.read())return this._create_token(h.UNKNOWN,t.trim()+"\n");e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(g)){do{e=this._input.next(),n+=e}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(h.WORD,n)}this._input.back()}else if("<"===e&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(c.newline);)t+=this._input.next();return b=!0,this._create_token(h.COMMENT,t)}}else if(b&&"-"===e&&(t=this.__patterns.html_comment_end.read()))return b=!1,this._create_token(h.COMMENT,t);return null},E.prototype._read_comment=function(e){var t=null;if("/"===e){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var r=p.get_directives(n);r&&"start"===r.ignore&&(n+=p.readIgnored(this._input)),n=n.replace(c.allLineBreaks,"\n"),t=this._create_token(h.BLOCK_COMMENT,n),t.directives=r}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),t=this._create_token(h.COMMENT,n))}return t},E.prototype._read_string=function(e){if("`"===e||"'"===e||'"'===e){var t=this._input.next();return this.has_char_escapes=!1,t+="`"===e?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(e),this.has_char_escapes&&this._options.unescape_strings&&(t=i(t)),this._input.peek()===e&&(t+=this._input.next()),t=t.replace(c.allLineBreaks,"\n"),this._create_token(h.STRING,t)}return null},E.prototype._allow_regexp_or_xml=function(e){return e.type===h.RESERVED&&r(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===h.END_EXPR&&")"===e.text&&e.opened.previous.type===h.RESERVED&&r(e.opened.previous.text,["if","while","for"])||r(e.type,[h.COMMENT,h.START_EXPR,h.START_BLOCK,h.START,h.END_BLOCK,h.OPERATOR,h.EQUALS,h.EOF,h.SEMICOLON,h.COMMA])},E.prototype._read_regexp=function(e,t){if("/"===e&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),r=!1,i=!1;this._input.hasNext()&&(r||i||this._input.peek()!==e)&&!this._input.testChar(c.newline);)n+=this._input.peek(),r?r=!1:(r="\\"===this._input.peek(),"["===this._input.peek()?i=!0:"]"===this._input.peek()&&(i=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(c.identifier)),this._create_token(h.STRING,n)}return null},E.prototype._read_xml=function(e,t){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(t)){var n="",r=this.__patterns.xml.read_match();if(r){for(var i=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),o=0===i.indexOf("{"),a=0;r;){var s=!!r[1],u=r[2];if(!(r[r.length-1]||"![CDATA["===u.slice(0,8))&&(u===i||o&&u.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--a:++a),n+=r[0],a<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(c.allLineBreaks,"\n"),this._create_token(h.STRING,n)}}return null},E.prototype._read_string_recursive=function(e,t,n){var r,i;"'"===e?i=this.__patterns.single_quote:'"'===e?i=this.__patterns.double_quote:"`"===e?i=this.__patterns.template_text:"}"===e&&(i=this.__patterns.template_expression);for(var o=i.read(),a="";this._input.hasNext();){if((a=this._input.next())===e||!t&&c.newline.test(a)){this._input.back();break}"\\"===a&&this._input.hasNext()?(r=this._input.peek(),"x"===r||"u"===r?this.has_char_escapes=!0:"\r"===r&&"\n"===this._input.peek(1)&&this._input.next(),a+=this._input.next()):n&&("${"===n&&"$"===a&&"{"===this._input.peek()&&(a+=this._input.next()),n===a&&(a+="`"===e?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(a+=this._input.next()))),a+=i.read(),o+=a}return o},e.exports.Tokenizer=E,e.exports.TOKEN=h,e.exports.positionable_operators=v.slice(),e.exports.line_starters=w.slice()},function(e,t,n){"use strict";function r(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}var i=RegExp.prototype.hasOwnProperty("sticky");r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=r},function(e,t,n){"use strict";var r=n(8).InputScanner,i=n(3).Token,o=n(10).TokenStream,a=n(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(e,t){this._input=new r(e),this._options=t||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var e,t=new i(s.START,""),n=null,r=[],a=new o;t.type!==s.EOF;){for(e=this._get_next_token(t,n);this._is_comment(e);)a.add(e),e=this._get_next_token(t,n);a.isEmpty()||(e.comments_before=a,a=new o),e.parent=n,this._is_opening(e)?(r.push(n),n=e):n&&this._is_closing(e,n)&&(e.opened=n,n.closed=e,n=r.pop(),e.parent=n),e.previous=t,t.next=e,this.__tokens.add(e),t=e}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(s.RAW,n):this._create_token(s.EOF,"")},u.prototype._is_comment=function(e){return!1},u.prototype._is_opening=function(e){return!1},u.prototype._is_closing=function(e,t){return!1},u.prototype._create_token=function(e,t){return new i(e,t,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=u,e.exports.TOKEN=s},function(e,t,n){"use strict";function r(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}r.prototype.restart=function(){this.__position=0},r.prototype.isEmpty=function(){return 0===this.__tokens_length},r.prototype.hasNext=function(){return this.__position=0&&e/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/)}}var i=n(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1};r.prototype=new i,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},r.prototype.read_options=function(e){var t=this._create();for(var n in o)t._disabled[n]=-1===e.templating.indexOf(n);return t._update(),t},r.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},r.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},r.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},r.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(e=e||this.__patterns.erb.read())}else"{"===t&&(this._disabled.handlebars||this._excluded.handlebars||(e=e||this.__patterns.handlebars_comment.read(),e=e||this.__patterns.handlebars_unescaped.read(),e=e||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=e||this.__patterns.django_comment.read(),e=e||this.__patterns.django.read())));return e},e.exports.TemplatablePattern=r}]),o=n;r=[],void 0!==(i=function(){return{js_beautify:o}}.apply(t,r))&&(e.exports=i)}()},function(e,t,n){var r,i;!function(){var n=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=15)}([,,function(e,t,n){"use strict";function r(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function i(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function o(e,t){this.__indent_cache=new i(e,t),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new r(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}r.prototype.clone_empty=function(){var e=new r(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},r.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},r.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},r.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},r.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},r.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},r.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},r.prototype.is_empty=function(){return 0===this.__items.length},r.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},r.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},r.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},r.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},r.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},r.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},r.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},i.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},i.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},i.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(t=Math.floor(e/this.__indent_size),e-=t*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},o.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},o.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(e,t){for(var n=this.__lines.length-2;n>=0;){var i=this.__lines[n];if(i.is_empty())break;if(0!==i.item(0).indexOf(e)&&i.item(-1)!==t){this.__lines.splice(n+1,0,new r(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},e.exports.Output=o},,,,function(e,t,n){"use strict";function r(e,t){this.raw_options=i(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php"],["auto"])}function i(e,t){var n={};e=o(e);var r;for(r in e)r!==t&&(n[r]=e[r]);if(t&&e[t])for(r in e[t])n[r]=e[t][r];return n}function o(e){var t,n={};for(t in e)n[t.replace(/-/g,"_")]=e[t];return n}r.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},r.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},r.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},r.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},r.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},r.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},r.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},e.exports.Options=r,e.exports.normalizeOpts=o,e.exports.mergeOpts=i},,function(e,t,n){"use strict";function r(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}var i=RegExp.prototype.hasOwnProperty("sticky");r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.InputScanner=r},,,,,function(e,t,n){"use strict";function r(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}r.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},r.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=r},,function(e,t,n){"use strict";function r(e,t){return new i(e,t).beautify()}var i=n(16).Beautifier,o=n(17).Options;e.exports=r,e.exports.defaultOptions=function(){return new o}},function(e,t,n){"use strict";function r(e,t){this._source_text=e||"",this._options=new i(t),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}var i=n(17).Options,o=n(2).Output,a=n(8).InputScanner,s=n(13).Directives,u=new s(/\/\*/,/\*\//),c=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,d=/\s/,h=/(?:\s|\n)+/g,p=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,f=/\/\/(?:[^\n\r\u2028\u2029]*)/g;r.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},r.prototype.eatWhitespace=function(e){for(var t=d.test(this._input.peek()),n=!0;d.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(this._options.preserve_newlines||n)&&(n=!1,this._output.add_new_line(!0));return t},r.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},r.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},r.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},r.prototype.indent=function(){this._indentLevel++},r.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},r.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===t&&(t="\n",e&&c.test(e||"")&&(t=e.match(c)[0])),e=e.replace(l,"\n");var n=e.match(/^[\t ]*/)[0];this._output=new o(this._options,n),this._input=new a(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r,i,s,g=0,m=!1,v=!1,_=!1,b=!1,y=!1,w=this._ch;r=this._input.read(h),i=""!==r,s=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var k=this._input.read(p),x=u.get_directives(k);x&&"start"===x.ignore&&(k+=u.readIgnored(this._input)),this.print_string(k),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(f)),this.eatWhitespace(!0);else if("@"===this._ch)if(this.preserveSingleSpace(i),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var E=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);E.match(/[ :]$/)&&(E=this.eatString(": ").replace(/\s$/,""),this.print_string(E),this._output.space_before_token=!0),E=E.replace(/\s$/,""),"extend"===E?b=!0:"import"===E&&(y=!0),E in this.NESTED_AT_RULE?(this._nestedLevel+=1,E in this.CONDITIONAL_GROUP_RULE&&(_=!0)):m||0!==g||-1===E.indexOf(":")||(v=!0,this.indent())}else"#"===this._ch&&"{"===this._input.peek()?(this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString("}"))):"{"===this._ch?(v&&(v=!1,this.outdent()),this.indent(),this._output.space_before_token=!0,this.print_string(this._ch),_?(_=!1,m=this._indentLevel>this._nestedLevel):m=this._indentLevel>=this._nestedLevel,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this.eatWhitespace(!0),this._output.add_new_line()):"}"===this._ch?(this.outdent(),this._output.add_new_line(),"{"===s&&this._output.trim(!0),y=!1,b=!1,v&&(this.outdent(),v=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0)):":"===this._ch?!m&&!_||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||b||0!==g?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),v||(v=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):'"'===this._ch||"'"===this._ch?(this.preserveSingleSpace(i),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):";"===this._ch?0===g?(v&&(this.outdent(),v=!1),b=!1,y=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):"("===this._ch?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),g++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),g&&(g--,this.outdent()))):(this.preserveSingleSpace(i),this.print_string(this._ch),this.eatWhitespace(),g++,this.indent()):")"===this._ch?(g&&(g--,this.outdent()),this.print_string(this._ch)):","===this._ch?(this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||v||0!==g||y?this._output.space_before_token=!0:this._output.add_new_line()):">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||v||0!==g?"]"===this._ch?this.print_string(this._ch):"["===this._ch?(this.preserveSingleSpace(i),this.print_string(this._ch)):"="===this._ch?(this.eatWhitespace(),this.print_string("="),d.test(this._ch)&&(this._ch="")):"!"!==this._ch||this._input.lookBack("\\")?(this.preserveSingleSpace(i),this.print_string(this._ch)):(this.print_string(" "),this.print_string(this._ch)):this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&d.test(this._ch)&&(this._ch=""));return this._output.get_code(t)},e.exports.Beautifier=r},function(e,t,n){"use strict";function r(e){i.call(this,e,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||t}var i=n(6).Options;r.prototype=new i,e.exports.Options=r}]),o=n;r=[],void 0!==(i=function(){return{css_beautify:o}}.apply(t,r))&&(e.exports=i)}()},function(e,t,n){"use strict";var r=n(461),i=Object(r.a)(function(e,t){return e+t},0);t.a=i},function(e,t,n){"use strict";function r(e,t){if("function"!=typeof t)throw new TypeError(o);return e=Object(i.a)(e),function(){if(--e<1)return t.apply(this,arguments)}}var i=n(359),o="Expected a function";t.a=r},function(e,t,n){"use strict";function r(e,t,n,b,y,w,k,x,E,S){function C(){for(var p=arguments.length,f=Array(p),g=p;g--;)f[g]=arguments[g];if(F)var m=Object(c.a)(C),v=Object(a.a)(f,m);if(b&&(f=Object(i.a)(f,b,y,F)),w&&(f=Object(o.a)(f,w,k,F)),p-=v,F&&p1&&f.reverse(),A&&E2?t[2]:void 0;for(c&&Object(o.a)(t[0],t[1],c)&&(r=1);++n=0&&e.slice(n,u)==t}var i=n(419),o=n(387),a=n(359),s=n(360);t.a=r},function(e,t,n){"use strict";var r=n(498);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(499);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e){return e=Object(i.a)(e),e&&a.test(e)?e.replace(o,"\\$&"):e}var i=n(360),o=/[\\^$.*+?()[\]{}|]/g,a=RegExp(o.source);t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=Object(s.a)(e)?i.a:o.a;return n&&Object(u.a)(e,t,n)&&(t=void 0),r(e,Object(a.a)(t,3))}var i=n(867),o=n(1017),a=n(356),s=n(357),u=n(373);t.a=r},function(e,t,n){"use strict";var r=n(467);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";var r=n(445);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e,t,n,r){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&Object(o.a)(e,t,n)&&(n=0,r=a),Object(i.a)(e,t,n,r)):[]}var i=n(1018),o=n(373);t.a=r},function(e,t,n){"use strict";function r(e,t){return(Object(s.a)(e)?i.a:o.a)(e,Object(a.a)(t,3))}var i=n(408),o=n(868),a=n(356),s=n(357);t.a=r},function(e,t,n){"use strict";var r=n(869),i=n(502),o=Object(r.a)(i.a);t.a=o},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(e,Object(a.a)(t,3),o.a)}var i=n(870),o=n(410),a=n(356);t.a=r},function(e,t,n){"use strict";var r=n(869),i=n(503),o=Object(r.a)(i.a);t.a=o},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(e,Object(a.a)(t,3),o.a)}var i=n(870),o=n(594),a=n(356);t.a=r},function(e,t,n){"use strict";var r=n(504);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(Object(o.a)(e,t),1)}var i=n(370),o=n(432);t.a=r},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(Object(o.a)(e,t),a)}var i=n(370),o=n(432),a=1/0;t.a=r},function(e,t,n){"use strict";function r(e,t,n){return n=void 0===n?1:Object(a.a)(n),Object(i.a)(Object(o.a)(e,t),n)}var i=n(370),o=n(432),a=n(359);t.a=r},function(e,t,n){"use strict";function r(e){return(null==e?0:e.length)?Object(i.a)(e,o):[]}var i=n(370),o=1/0;t.a=r},function(e,t,n){"use strict";function r(e,t){return(null==e?0:e.length)?(t=void 0===t?1:Object(o.a)(t),Object(i.a)(e,t)):[]}var i=n(370),o=n(359);t.a=r},function(e,t,n){"use strict";function r(e){return Object(i.a)(e,o)}var i=n(393),o=512;t.a=r},function(e,t,n){"use strict";var r=n(552),i=Object(r.a)("floor");t.a=i},function(e,t,n){"use strict";var r=n(872),i=Object(r.a)();t.a=i},function(e,t,n){"use strict";var r=n(872),i=Object(r.a)(!0);t.a=i},function(e,t,n){"use strict";function r(e,t){return null==e?e:Object(i.a)(e,Object(o.a)(t),a.a)}var i=n(573),o=n(391),a=n(372);t.a=r},function(e,t,n){"use strict";function r(e,t){return null==e?e:Object(i.a)(e,Object(o.a)(t),a.a)}var i=n(865),o=n(391),a=n(372);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&Object(i.a)(e,Object(o.a)(t))}var i=n(410),o=n(391);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&Object(i.a)(e,Object(o.a)(t))}var i=n(594),o=n(391);t.a=r},function(e,t,n){"use strict";function r(e){for(var t=-1,n=null==e?0:e.length,r={};++tt}t.a=r},function(e,t,n){"use strict";var r=n(506),i=Object(r.a)(function(e,t){return e>=t});t.a=i},function(e,t,n){"use strict";function r(e,t){return null!=e&&Object(o.a)(e,t,i.a)}var i=n(1019),o=n(857);t.a=r},function(e,t,n){"use strict";function r(e,t,n){return t=Object(o.a)(t),void 0===n?(n=t,t=0):n=Object(o.a)(n),e=Object(a.a)(e),Object(i.a)(e,t,n)}var i=n(1020),o=n(413),a=n(388);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){e=Object(o.a)(e)?e:Object(u.a)(e),n=n&&!r?Object(s.a)(n):0;var l=e.length;return n<0&&(n=c(l+n,0)),Object(a.a)(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&Object(i.a)(e,t,n)>-1}var i=n(424),o=n(369),a=n(433),s=n(359),u=n(411),c=Math.max;t.a=r},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(t,function(t){return e[t]})}var i=n(365);t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=null==n?0:Object(o.a)(n);return s<0&&(s=a(r+s,0)),Object(i.a)(e,t,s)}var i=n(424),o=n(359),a=Math.max;t.a=r},function(e,t,n){"use strict";function r(e){return(null==e?0:e.length)?Object(i.a)(e,0,-1):[]}var i=n(384);t.a=r},function(e,t,n){"use strict";var r=n(365),i=n(636),o=n(358),a=n(637),s=Object(o.a)(function(e){var t=Object(r.a)(e,a.a);return t.length&&t[0]===e[0]?Object(i.a)(t):[]});t.a=s},function(e,t,n){"use strict";function r(e,t,n){for(var r=n?a.a:o.a,d=e[0].length,h=e.length,p=h,f=Array(h),g=1/0,m=[];p--;){var v=e[p];p&&t&&(v=Object(s.a)(v,Object(u.a)(t))),g=l(v.length,g),f[p]=!n&&(t||d>=120&&v.length>=120)?new i.a(p&&v):void 0}v=e[0];var _=-1,b=f[0];e:for(;++_=-o&&e<=o}var i=n(507),o=9007199254740991;t.a=r},function(e,t,n){"use strict";function r(e){return void 0===e}t.a=r},function(e,t,n){"use strict";function r(e){return Object(o.a)(e)&&Object(i.a)(e)==a}var i=n(400),o=n(149),a="[object WeakMap]";t.a=r},function(e,t,n){"use strict";function r(e){return Object(o.a)(e)&&Object(i.a)(e)==a}var i=n(151),o=n(149),a="[object WeakSet]";t.a=r},function(e,t,n){"use strict";function r(e){return Object(o.a)("function"==typeof e?e:Object(i.a)(e,a))}var i=n(399),o=n(356),a=1;t.a=r},function(e,t,n){"use strict";function r(e,t){return null==e?"":o.call(e,t)}var i=Array.prototype,o=i.join;t.a=r},function(e,t,n){"use strict";var r=n(431),i=Object(r.a)(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});t.a=i},function(e,t,n){"use strict";var r=n(396),i=n(490),o=Object(i.a)(function(e,t,n){Object(r.a)(e,n,t)});t.a=o},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var l=r;return void 0!==n&&(l=Object(s.a)(n),l=l<0?u(r+l,0):c(l,r-1)),t===t?Object(a.a)(e,t,l):Object(i.a)(e,o.a,l,!0)}var i=n(466),o=n(838),a=n(1026),s=n(359),u=Math.max,c=Math.min;t.a=r},function(e,t,n){"use strict";var r=n(431),i=Object(r.a)(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()});t.a=i},function(e,t,n){"use strict";var r=n(842),i=Object(r.a)("toLowerCase");t.a=i},function(e,t,n){"use strict";var r=n(670),i=n(506),o=Object(i.a)(r.a);t.a=o},function(e,t,n){"use strict";function r(e,t){return e1),t}),Object(s.a)(e,Object(l.a)(e),n),c&&(n=Object(i.a)(n,7,u.a));for(var d=t.length;d--;)Object(o.a)(n,t[d]);return n});t.a=d},function(e,t,n){"use strict";function r(e,t){return t=Object(i.a)(t,e),null==(e=Object(a.a)(e,t))||delete e[Object(s.a)(Object(o.a)(t))]}var i=n(404),o=n(374),a=n(874),s=n(390);t.a=r},function(e,t,n){"use strict";function r(e,t){return Object(a.a)(e,Object(o.a)(Object(i.a)(t)))}var i=n(356),o=n(434),a=n(513);t.a=r},function(e,t,n){"use strict";function r(e){return Object(i.a)(2,e)}var i=n(475);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){return null==e?[]:(Object(o.a)(t)||(t=null==t?[]:[t]),n=r?void 0:n,Object(o.a)(n)||(n=null==n?[]:[n]),Object(i.a)(e,t,n))}var i=n(878),o=n(357);t.a=r},function(e,t,n){"use strict";var r=n(365),i=n(695),o=Object(i.a)(r.a);t.a=o},function(e,t,n){"use strict";function r(e){return Object(c.a)(function(t){return t=Object(o.a)(t,Object(u.a)(a.a)),Object(s.a)(function(n){var r=this;return e(t,function(e){return Object(i.a)(e,r,n)})})})}var i=n(379),o=n(365),a=n(356),s=n(358),u=n(381),c=n(398);t.a=r},function(e,t,n){"use strict";var r=n(379),i=n(365),o=n(370),a=n(356),s=n(358),u=n(381),c=n(1031),l=n(357),d=Math.min,h=Object(c.a)(function(e,t){t=1==t.length&&Object(l.a)(t[0])?Object(i.a)(t[0],Object(u.a)(a.a)):Object(i.a)(Object(o.a)(t,1),Object(u.a)(a.a));var n=t.length;return Object(s.a)(function(i){for(var o=-1,a=d(i.length,n);++o=t)return e;var l=(t-r)/2;return Object(i.a)(c(l),n)+e+Object(i.a)(u(l),n)}var i=n(700),o=n(435),a=n(359),s=n(360),u=Math.ceil,c=Math.floor;t.a=r},function(e,t,n){"use strict";function r(e,t){t=void 0===t?" ":Object(o.a)(t);var n=t.length;if(n<2)return n?Object(i.a)(t,e):t;var r=Object(i.a)(t,l(e/Object(u.a)(t)));return Object(s.a)(t)?Object(a.a)(Object(c.a)(r),0,e).join(""):r.slice(0,e)}var i=n(880),o=n(387),a=n(406),s=n(430),u=n(435),c=n(407),l=Math.ceil;t.a=r},function(e,t,n){"use strict";function r(e,t,n){e=Object(s.a)(e),t=Object(a.a)(t);var r=t?Object(o.a)(e):0;return t&&r-1;)p!==e&&l.call(p,f,1),l.call(e,f,1);return e}var i=n(365),o=n(424),a=n(1035),s=n(381),u=n(380),c=Array.prototype,l=c.splice;t.a=r},function(e,t,n){"use strict";function r(e,t,n){return e&&e.length&&t&&t.length?Object(o.a)(e,t,Object(i.a)(n,2)):e}var i=n(356),o=n(709);t.a=r},function(e,t,n){"use strict";function r(e,t,n){return e&&e.length&&t&&t.length?Object(i.a)(e,t,void 0,n):e}var i=n(709);t.a=r},function(e,t,n){"use strict";var r=n(365),i=n(541),o=n(881),a=n(879),s=n(398),u=n(395),c=Object(s.a)(function(e,t){var n=null==e?0:e.length,s=Object(i.a)(e,t);return Object(o.a)(e,Object(r.a)(t,function(e){return Object(u.a)(e,n)?+e:e}).sort(a.a)),s});t.a=c},function(e,t,n){"use strict";function r(e,t,n){if(n&&"boolean"!=typeof n&&Object(o.a)(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Object(a.a)(e),void 0===t?(t=e,e=0):t=Object(a.a)(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var l=c();return u(e+l*(t-e+s("1e-"+((l+"").length-1))),t)}return Object(i.a)(e,t)}var i=n(714),o=n(373),a=n(413),s=parseFloat,u=Math.min,c=Math.random;t.a=r},function(e,t,n){"use strict";function r(e,t){return e+i(o()*(t-e+1))}var i=Math.floor,o=Math.random;t.a=r},function(e,t,n){"use strict";var r=n(882),i=Object(r.a)();t.a=i},function(e,t,n){"use strict";var r=n(882),i=Object(r.a)(!0);t.a=i},function(e,t,n){"use strict";var r=n(393),i=n(398),o=Object(i.a)(function(e,t){return Object(r.a)(e,256,void 0,void 0,void 0,t)});t.a=o},function(e,t,n){"use strict";function r(e,t,n){var r=Object(u.a)(e)?i.a:s.a,c=arguments.length<3;return r(e,Object(a.a)(t,4),n,c,o.a)}var i=n(548),o=n(409),a=n(356),s=n(883),u=n(357);t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=Object(u.a)(e)?i.a:s.a,c=arguments.length<3;return r(e,Object(a.a)(t,4),n,c,o.a)}var i=n(1037),o=n(864),a=n(356),s=n(883),u=n(357);t.a=r},function(e,t,n){"use strict";function r(e,t){return(Object(s.a)(e)?i.a:o.a)(e,Object(u.a)(Object(a.a)(t,3)))}var i=n(408),o=n(868),a=n(356),s=n(357),u=n(434);t.a=r},function(e,t,n){"use strict";function r(e,t){var n=[];if(!e||!e.length)return n;var r=-1,a=[],s=e.length;for(t=Object(i.a)(t,3);++r1&&Object(a.a)(e,t[0],t[1])?t=[]:n>2&&Object(a.a)(t[0],t[1],t[2])&&(t=[t[0]]),Object(i.a)(e,Object(r.a)(t,1),[])});t.a=s},function(e,t,n){"use strict";function r(e,t){return Object(i.a)(e,t)}var i=n(519);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){t=n(t);for(var u=0,c=null==e?0:e.length,l=t!==t,d=null===t,h=Object(i.a)(t),p=void 0===t;u>>0)?(e=Object(l.a)(e),e&&("string"==typeof t||null!=t&&!Object(u.a)(t))&&!(t=Object(i.a)(t))&&Object(a.a)(e)?Object(o.a)(Object(c.a)(e),0,n):e.split(t,n)):[]}var i=n(387),o=n(406),a=n(430),s=n(373),u=n(453),c=n(407),l=n(360),d=4294967295;t.a=r},function(e,t,n){"use strict";function r(e,t){if("function"!=typeof e)throw new TypeError(c);return t=null==t?0:l(Object(u.a)(t),0),Object(a.a)(function(n){var r=n[t],a=Object(s.a)(n,0,t);return r&&Object(o.a)(a,r),Object(i.a)(e,this,a)})}var i=n(379),o=n(405),a=n(358),s=n(406),u=n(359),c="Expected a function",l=Math.max;t.a=r},function(e,t,n){"use strict";var r=n(431),i=n(448),o=Object(r.a)(function(e,t,n){return e+(n?" ":"")+Object(i.a)(t)});t.a=o},function(e,t,n){"use strict";function r(e,t,n){return e=Object(s.a)(e),n=null==n?0:Object(i.a)(Object(a.a)(n),0,e.length),t=Object(o.a)(t),e.slice(n,n+t.length)==t}var i=n(419),o=n(387),a=n(359),s=n(360);t.a=r},function(e,t,n){"use strict";function r(){return{}}t.a=r},function(e,t,n){"use strict";function r(){return""}t.a=r},function(e,t,n){"use strict";function r(){return!0}t.a=r},function(e,t,n){"use strict";var r=n(461),i=Object(r.a)(function(e,t){return e-t},0);t.a=i},function(e,t,n){"use strict";function r(e){return e&&e.length?Object(i.a)(e,o.a):0}var i=n(679),o=n(368);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&e.length?Object(o.a)(e,Object(i.a)(t,2)):0}var i=n(356),o=n(679);t.a=r},function(e,t,n){"use strict";function r(e){var t=null==e?0:e.length;return t?Object(i.a)(e,1,t):[]}var i=n(384);t.a=r},function(e,t,n){"use strict";function r(e,t,n){return e&&e.length?(t=n||void 0===t?1:Object(o.a)(t),Object(i.a)(e,0,t<0?0:t)):[]}var i=n(384),o=n(359);t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=null==e?0:e.length;return r?(t=n||void 0===t?1:Object(o.a)(t),t=r-t,Object(i.a)(e,t<0?0:t,r)):[]}var i=n(384),o=n(359);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&e.length?Object(o.a)(e,Object(i.a)(t,3),!1,!0):[]}var i=n(356),o=n(495);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&e.length?Object(o.a)(e,Object(i.a)(t,3)):[]}var i=n(356),o=n(495);t.a=r},function(e,t,n){"use strict";function r(e,t){return t(e),e}t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=p.a.imports._.templateSettings||p.a;n&&Object(l.a)(e,t,n)&&(t=void 0),e=Object(f.a)(e),t=Object(i.a)({},t,r,s.a);var w,x,E=Object(i.a)({},t.imports,r.imports,s.a),S=Object(d.a)(E),C=Object(a.a)(E,S),A=0,T=t.interpolate||b,O="__p += '",F=RegExp((t.escape||b).source+"|"+T.source+"|"+(T===h.a?_:b).source+"|"+(t.evaluate||b).source+"|$","g"),j=k.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(F,function(t,n,r,i,o,a){return r||(r=i),O+=e.slice(A,a).replace(y,u.a),n&&(w=!0,O+="' +\n__e("+n+") +\n'"),o&&(x=!0,O+="';\n"+o+";\n__p += '"),r&&(O+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),A=a+t.length,t}),O+="';\n";var L=k.call(t,"variable")&&t.variable;L||(O="with (obj) {\n"+O+"\n}\n"),O=(x?O.replace(g,""):O).replace(m,"$1").replace(v,"$1;"),O="function("+(L||"obj")+") {\n"+(L?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(w?", __e = _.escape":"")+(x?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+O+"return __p\n}";var R=Object(o.a)(function(){return Function(S,j+"return "+O).apply(void 0,C)});if(R.source=O,Object(c.a)(R))throw R;return R}var i=n(445),o=n(474),a=n(632),s=n(1044),u=n(1045),c=n(447),l=n(373),d=n(366),h=n(886),p=n(520),f=n(360),g=/\b__p \+= '';/g,m=/\b(__p \+=) '' \+/g,v=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/($^)/,y=/['\n\r\u2028\u2029\\]/g,w=Object.prototype,k=w.hasOwnProperty;t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError(a);return Object(o.a)(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),Object(i.a)(e,t,{leading:r,maxWait:t,trailing:s})}var i=n(491),o=n(364),a="Expected a function";t.a=r},function(e,t,n){"use strict";function r(e,t){if((e=Object(a.a)(e))<1||e>s)return[];var n=u,r=c(e,u);t=Object(o.a)(t),e-=u;for(var l=Object(i.a)(r,t);++n=v)return e;var b=n-Object(c.a)(r);if(b<1)return r;var y=_?Object(o.a)(_,0,b).join(""):e.slice(0,b);if(void 0===m)return y+r;if(_&&(b+=y.length-b),Object(u.a)(m)){if(e.slice(b).search(m)){var w,k=y;for(m.global||(m=RegExp(m.source,Object(h.a)(g.exec(m))+"g")),m.lastIndex=0;w=m.exec(k);)var x=w.index;y=y.slice(0,void 0===x?b:x)}}else if(e.indexOf(Object(i.a)(m),b)!=b){var E=y.lastIndexOf(m);E>-1&&(y=y.slice(0,E))}return y+r}var i=n(387),o=n(406),a=n(430),s=n(364),u=n(453),c=n(435),l=n(407),d=n(359),h=n(360),p=30,f="...",g=/\w*$/;t.a=r},function(e,t,n){"use strict";function r(e){return Object(i.a)(e,1)}var i=n(462);t.a=r},function(e,t,n){"use strict";function r(e){return e=Object(i.a)(e),e&&s.test(e)?e.replace(a,o.a):e}var i=n(360),o=n(1048),a=/&(?:amp|lt|gt|quot|#39);/g,s=RegExp(a.source);t.a=r},function(e,t,n){"use strict";var r=n(370),i=n(358),o=n(420),a=n(371),s=Object(i.a)(function(e){return Object(o.a)(Object(r.a)(e,1,a.a,!0))});t.a=s},function(e,t,n){"use strict";var r=n(370),i=n(356),o=n(358),a=n(420),s=n(371),u=n(374),c=Object(o.a)(function(e){var t=Object(u.a)(e);return Object(s.a)(t)&&(t=void 0),Object(a.a)(Object(r.a)(e,1,s.a,!0),Object(i.a)(t,2))});t.a=c},function(e,t,n){"use strict";var r=n(370),i=n(358),o=n(420),a=n(371),s=n(374),u=Object(i.a)(function(e){var t=Object(s.a)(e);return t="function"==typeof t?t:void 0,Object(o.a)(Object(r.a)(e,1,a.a,!0),void 0,t)});t.a=u},function(e,t,n){"use strict";function r(e){return e&&e.length?Object(i.a)(e):[]}var i=n(420);t.a=r},function(e,t,n){"use strict";function r(e,t){return e&&e.length?Object(o.a)(e,Object(i.a)(t,2)):[]}var i=n(356),o=n(420);t.a=r},function(e,t,n){"use strict";function r(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Object(i.a)(e,void 0,t):[]}var i=n(420);t.a=r},function(e,t,n){"use strict";function r(e){var t=++o;return Object(i.a)(e)+t}var i=n(360),o=0;t.a=r},function(e,t,n){"use strict";function r(e,t){return null==e||Object(i.a)(e,t)}var i=n(690);t.a=r},function(e,t,n){"use strict";function r(e,t,n){return null==e?e:Object(i.a)(e,t,Object(o.a)(n))}var i=n(890),o=n(391);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Object(i.a)(e,t,Object(o.a)(n),r)}var i=n(890),o=n(391);t.a=r},function(e,t,n){"use strict";var r=n(431),i=Object(r.a)(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()});t.a=i},function(e,t,n){"use strict";var r=n(437);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e){return null==e?[]:Object(i.a)(e,Object(o.a)(e))}var i=n(632),o=n(372);t.a=r},function(e,t,n){"use strict";var r=n(451),i=n(358),o=n(371),a=Object(i.a)(function(e,t){return Object(o.a)(e)?Object(r.a)(e,t):[]});t.a=a},function(e,t,n){"use strict";function r(e,t){return Object(o.a)(Object(i.a)(t),e)}var i=n(391),o=n(514);t.a=r},function(e,t,n){"use strict";var r=n(394),i=n(416),o=n(541),a=n(398),s=n(395),u=n(436),c=Object(a.a)(function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,c=function(t){return Object(o.a)(t,e)};return!(t>1||this.__actions__.length)&&a instanceof r.a&&Object(s.a)(n)?(a=a.slice(n,+n+(t?1:0)),a.__actions__.push({func:u.a,args:[c],thisArg:void 0}),new i.a(a,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(c)});t.a=c},function(e,t,n){"use strict";function r(){return Object(i.a)(this)}var i=n(480);t.a=r},function(e,t,n){"use strict";function r(){var e=this.__wrapped__;if(e instanceof i.a){var t=e;return this.__actions__.length&&(t=new i.a(this)),t=t.reverse(),t.__actions__.push({func:s.a,args:[a.a],thisArg:void 0}),new o.a(t,this.__chain__)}return this.thru(a.a)}var i=n(394),o=n(416),a=n(517),s=n(436);t.a=r},function(e,t,n){"use strict";var r=n(408),i=n(358),o=n(796),a=n(371),s=Object(i.a)(function(e){return Object(o.a)(Object(r.a)(e,a.a))});t.a=s},function(e,t,n){"use strict";function r(e,t,n){var r=e.length;if(r<2)return r?Object(a.a)(e[0]):[];for(var s=-1,u=Array(r);++s1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Object(i.a)(e,n)});t.a=o},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(456),s=n(378),u=n(421),c=n(382),l=n(524),d=n(412),h=n(361),p=n(438),f=n(401),g=n(805),m=h.List,v=h.Record,_=h.Repeat,b=d.draft_tree_data_support,y={entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null},w=b?c:u,k=v(y),x=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.getEntityMap=function(){return l},t.prototype.getBlockMap=function(){return this.get("blockMap")},t.prototype.getSelectionBefore=function(){return this.get("selectionBefore")},t.prototype.getSelectionAfter=function(){return this.get("selectionAfter")},t.prototype.getBlockForKey=function(e){return this.getBlockMap().get(e)},t.prototype.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},t.prototype.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},t.prototype.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},t.prototype.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},t.prototype.getBlocksAsArray=function(){return this.getBlockMap().toArray()},t.prototype.getFirstBlock=function(){return this.getBlockMap().first()},t.prototype.getLastBlock=function(){return this.getBlockMap().last()},t.prototype.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},t.prototype.getLastCreatedEntityKey=function(){return l.__getLastCreatedEntityKey()},t.prototype.hasText=function(){var e=this.getBlockMap();return e.size>1||e.first().getLength()>0},t.prototype.createEntity=function(e,t,n){return l.__create(e,t,n),this},t.prototype.mergeEntityData=function(e,t){return l.__mergeData(e,t),this},t.prototype.replaceEntityData=function(e,t){return l.__replaceData(e,t),this},t.prototype.addEntity=function(e){return l.__add(e),this},t.prototype.getEntity=function(e){return l.__get(e)},t.createFromBlockArray=function(e,n){var r=Array.isArray(e)?e:e.contentBlocks,i=a.createFromArray(r),o=i.isEmpty()?new p:p.createEmpty(i.first().getKey());return new t({blockMap:i,entityMap:n||l,selectionBefore:o,selectionAfter:o})},t.createFromText=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=e.split(n),i=r.map(function(e){return e=g(e),new w({key:f(),text:e,type:"unstyled",characterList:m(_(s.EMPTY,e.length))})});return t.createFromBlockArray(i)},t}(k);e.exports=x},function(e,t,n){"use strict";function r(e){return e.replace(i,"")}var i=new RegExp("\r","g");e.exports=r},function(e,t,n){"use strict";function r(e){return e===l||e===d}function i(e){return r(e)||c(!1),e===l?"ltr":"rtl"}function o(e,t){return r(e)||c(!1),r(t)||c(!1),e===t?null:i(e)}function a(e){h=e}function s(){a(l)}function u(){return h||this.initGlobalDir(),h||c(!1),h}var c=n(362),l="LTR",d="RTL",h=null,p={NEUTRAL:"NEUTRAL",LTR:l,RTL:d,isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:o,setGlobalDir:a,initGlobalDir:s,getGlobalDir:u};e.exports=p},function(e,t,n){"use strict";var r=n(361),i=r.Map,o=n(8),a=n(439),s=o.createElement("ul",{className:a("public/DraftStyleDefault/ul")}),u=o.createElement("ol",{className:a("public/DraftStyleDefault/ol")}),c=o.createElement("pre",{className:a("public/DraftStyleDefault/pre")}),l=i({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:s},"ordered-list-item":{element:"li",wrapper:u},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:c},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=l},function(e,t,n){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){var n;if(t.isCollapsed()){var r=t.getAnchorKey(),o=t.getAnchorOffset();return o>0?(n=e.getBlockForKey(r).getEntityAt(o-1),n!==e.getBlockForKey(r).getEntityAt(o)?null:i(e.getEntityMap(),n)):null}var a=t.getStartKey(),s=t.getStartOffset(),u=e.getBlockForKey(a);return n=s===u.getLength()?null:u.getEntityAt(s),i(e.getEntityMap(),n)}function i(e,t){return t&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(1108);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=o.get(e,t);return"auto"===n||"scroll"===n}var i=n(1110),o={get:i,getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=o},function(e,t,n){"use strict";function r(e){var t=i(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=o(e),r=e===t?e.ownerDocument.documentElement:e,a=e.scrollWidth-r.clientWidth,s=e.scrollHeight-r.clientHeight;return n.x=Math.max(0,Math.min(n.x,a)),n.y=Math.max(0,Math.min(n.y,s)),n}var i=n(1115),o=n(1116);e.exports=r},function(e,t,n){"use strict";function r(e){for(var t=e;t&&t!==document.documentElement;){var n=i(t);if(null!=n)return n;t=t.parentNode}return null}var i=n(905);e.exports=r},function(e,t,n){"use strict";var r=n(392),i=r.isPlatform("Mac OS X"),o={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return i&&e.altKey},hasCommandModifier:function(e){return i?!!e.metaKey&&!e.altKey:o.isCtrlKeyCommand(e)}};e.exports=o},function(e,t,n){"use strict";function r(e,t){var n=e.getSelection(),r=e.getCurrentContent(),i=n.getStartKey(),o=n.getStartOffset(),a=i,s=0;if(t>o){var u=r.getKeyBefore(i);null==u?a=i:(a=u,s=r.getBlockForKey(u).getText().length)}else s=o-t;return n.merge({focusKey:a,focusOffset:s,isBackward:!0})}e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(){return i.default.createElement("div",{className:"liveblog-loader"},i.default.createElement("div",{className:"liveblog-loader-bounce1"}),i.default.createElement("div",{className:"liveblog-loader-bounce2"}))};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(367),i=n(459),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=function(e,t,n,i){var a=e.getSelection().getAnchorKey(),s="up"===n?e.getCurrentContent().getBlockBefore(a):e.getCurrentContent().getBlockAfter(a);if((!s||s.get("key")!==a)&&s){i.preventDefault();var u=o.default.encode(s.getKey(),0,0),c=document.querySelector('[data-offset-key="'+u+'"]'),l=window.getSelection(),d=document.createRange();d.setStart(c,0),d.setEnd(c,0),l.removeAllRanges(),l.addRange(d);var h="up"===n?s.getLength():0;t(r.EditorState.forceSelection(e,new r.SelectionState({anchorKey:s.getKey(),anchorOffset:h,focusKey:s.getKey(),focusOffset:h,isBackward:!1})))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(923),i=n(367),o=n(525),a=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=function(e){var t=e,n=t.getCurrentContent(),o=t.getSelection(),s=n.getBlockForKey(o.getFocusKey()),u=(0,a.default)(n,s.getKey()),c=[new i.ContentBlock({key:(0,i.genKey)(),type:s.getType(),text:" ",characterList:s.getCharacterList()}),new i.ContentBlock({key:(0,i.genKey)(),type:"unstyled",text:"",characterList:(0,r.List)()})],l=i.BlockMapBuilder.createFromArray(c),d=i.Modifier.replaceWithFragment(u,o,l);return i.EditorState.forceSelection(i.EditorState.push(t,d,"insert-fragment"),d.getSelectionAfter())}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),o=r(i),a=n(12),s=r(a),u=function(e){var t=e.click,n=e.onMouseDown,r=e.icon,i=e.classes,a=e.readOnly;return o.default.createElement("span",{style:{display:"inline-block"},onMouseDown:n?function(e){return e.preventDefault()}:null},o.default.createElement("button",{disabled:a,className:"liveblog-btn liveblog-editor-btn "+i,onClick:n||t},o.default.createElement("span",{className:"dashicons dashicons-"+r})))};u.propTypes={click:s.default.func,onMouseDown:s.default.func,icon:s.default.string,classes:s.default.string,readOnly:s.default.bool},t.default=u},function(e,t,n){"use strict";function r(e){return Object(i.a)(e)||Object(o.a)(e)||Object(a.a)(e)||Object(s.a)()}t.a=r;var i=n(1202),o=n(1203),a=n(1204),s=n(1205)},function(e,t,n){"use strict";var r=n(368),i=n(822),o=i.a?function(e,t){return i.a.set(e,t),e}:r.a;t.a=o},function(e,t,n){"use strict";var r=n(823),i=r.a&&new r.a;t.a=i},function(e,t,n){"use strict";var r=n(414),i=n(150),o=Object(r.a)(i.a,"WeakMap");t.a=o},function(e,t,n){"use strict";function r(e){return!(!Object(a.a)(e)||Object(o.a)(e))&&(Object(i.a)(e)?f:c).test(Object(s.a)(e))}var i=n(383),o=n(941),a=n(364),s=n(826),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,h=l.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.a=r},function(e,t,n){"use strict";var r=n(150),i=r.a["__core-js_shared__"];t.a=i},function(e,t,n){"use strict";function r(e){if(null!=e){try{return o.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var i=Function.prototype,o=i.toString;t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){for(var o=-1,a=e.length,s=n.length,u=-1,c=t.length,l=i(a-s,0),d=Array(c+l),h=!r;++u0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,o=16,a=Date.now;t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r=t+"";return Object(a.a)(e,Object(o.a)(r,Object(s.a)(Object(i.a)(r),n)))}var i=n(946),o=n(947),a=n(535),s=n(949);t.a=r},function(e,t,n){"use strict";var r=n(414),i=function(){try{var e=Object(r.a)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.a=i},function(e,t,n){"use strict";function r(e){return e!==e}t.a=r},function(e,t,n){"use strict";function r(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,s=o(r.length-t,0),u=Array(s);++ah))return!1;var f=l.get(e);if(f&&l.get(t))return f==t;var g=-1,m=!0,v=n&u?new i.a:void 0;for(l.set(e,t),l.set(t,e);++g-1?s[u?t[c]:c]:void 0}}var i=n(356),o=n(369),a=n(366);t.a=r},function(e,t,n){"use strict";function r(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}t.a=r},function(e,t,n){"use strict";function r(e,t){var n=-1,r=Object(o.a)(e)?Array(e.length):[];return Object(i.a)(e,function(e,i,o){r[++n]=t(e,i,o)}),r}var i=n(409),o=n(369);t.a=r},function(e,t,n){"use strict";function r(e){return Object(o.a)(function(t){var n=t.length,r=n,o=i.a.prototype.thru;for(e&&t.reverse();r--;){var g=t[r];if("function"!=typeof g)throw new TypeError(l);if(o&&!m&&"wrapper"==Object(s.a)(g))var m=new i.a([],!0)}for(r=m?r:n;++rt||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&ei)return n;do{t%2&&(n+=e),(t=o(t/2))&&(e+=e)}while(t);return n}var i=9007199254740991,o=Math.floor;t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var a=t[n];if(n==r||a!==u){var u=a;Object(o.a)(a)?s.call(e,a,1):Object(i.a)(e,a)}}return e}var i=n(690),o=n(395),a=Array.prototype,s=a.splice;t.a=r},function(e,t,n){"use strict";function r(e){return function(t,n,r){return r&&"number"!=typeof r&&Object(o.a)(t,n,r)&&(n=r=void 0),t=Object(a.a)(t),void 0===n?(n=t,t=0):n=Object(a.a)(n),r=void 0===r?t/g;t.a=r},function(e,t,n){"use strict";function r(e,t){var n=e;return n instanceof i.a&&(n=n.value()),Object(a.a)(t,function(e,t){return t.func.apply(t.thisArg,Object(o.a)([e],t.args))},n)}var i=n(394),o=n(405),a=n(548);t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=e.length;n--&&Object(i.a)(t,e[n],0)>-1;);return n}var i=n(424);t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=-1,r=e.length;++n-1;);return n}var i=n(424);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){return Object(o.a)(e,t,n(Object(i.a)(e,t)),r)}var i=n(429),o=n(454);t.a=r},function(e,t,n){"use strict";function r(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r=n&&(r={start:e,end:t})}),"object"!=typeof r&&u(!1),r}function o(e,t,n){var r=t.getCharacterList(),o=n>0?r.get(n-1):void 0,s=n0&&window.scrollTo(i.x,i.y+o+10)}else n instanceof HTMLElement||y(!1),(o=n.offsetHeight+n.offsetTop-(r.offsetHeight+i.y))>0&&h.setTop(r,h.getTop(r)+o+10)}},t.prototype._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),r=t.getText(),i=this.props.tree.size-1,o=k(this.props.selection,n);return this.props.tree.map(function(a,d){var h=a.get("leaves"),p=h.size-1,m=h.map(function(a,s){var h=c.encode(n,d,s),f=a.get("start"),g=a.get("end");return l.createElement(u,{key:h,offsetKey:h,block:t,start:f,selection:o?e.props.selection:null,forceSelection:e.props.forceSelection,text:r.slice(f,g),styleSet:t.getInlineStyleAt(f),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:d===i&&s===p})}).toArray(),v=a.get("decoratorKey");if(null==v)return m;if(!e.props.decorator)return m;var _=w(e.props.decorator),b=_.getComponentForKey(v);if(!b)return m;var y=_.getPropsForKey(v),k=c.encode(n,d,0),x=r.slice(h.first().get("start"),h.last().get("end")),E=g.getHTMLDirIfDifferent(f.getDirection(x),e.props.direction);return l.createElement(b,s({},y,{contentState:e.props.contentState,decoratedText:x,dir:E,key:k,entityKey:t.getEntityAt(a.get("start")),offsetKey:k}),m)}).toArray()},t.prototype.render=function(){var e=this.props,t=e.direction,n=e.offsetKey,r=m({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===t,"public/DraftStyleDefault/rtl":"RTL"===t});return l.createElement("div",{"data-offset-key":n,className:r},this._renderChildren())},t}(l.Component);e.exports=x},function(e,t,n){"use strict";function r(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){"use strict";function r(e,t){return!!t&&(e===t.documentElement||e===t.body)}var i={getTop:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}};e.exports=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if("file"==e.kind)return e.getAsFile()}var o=n(1120),a=n(1121),s=n(803),u=new RegExp("\r\n","g"),c={"text/rtf":1,"text/html":1},l=function(){function e(t){r(this,e),this.data=t,this.types=t.types?a(t.types):[]}return e.prototype.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return c[e]})},e.prototype.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(u,"\n"):null},e.prototype.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},e.prototype.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},e.prototype.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},e.prototype.isImage=function(){if(this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")}))return!0;for(var e=this.getFiles(),t=0;t0},e}();e.exports=l},function(e,t,n){"use strict";function r(e){if(e instanceof Element){var t=e.getAttribute("data-offset-key");if(t)return t;for(var n=0;n0&&(n=r.childNodes.length)),0===n){var l=null;if(null!=a)l=a;else{var p=i(r);l=h(c(p))}return{key:l,offset:0}}var f=r.childNodes[n-1],g=null,m=null;if(c(f)){var v=o(f);g=h(c(v)),m=s(v)}else g=h(a),m=s(f);return{key:g,offset:m}}function s(e){var t=e.textContent;return"\n"===t?0:t.length}var u=n(813),c=n(905),l=n(907),d=n(362),h=n(385);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=t?l.exec(e):u.exec(e);return n?n[0]:e}var i=n(1140),o=i.getPunctuation(),a="\\s|(?![_])"+o,s="^(?:"+a+")*(?:['‘’]|(?!"+a+").)*(?:(?!"+a+").)",u=new RegExp(s),c="(?:(?!"+a+").)(?:['‘’]|(?!"+a+").)*(?:"+a+")*$",l=new RegExp(c),d={getBackward:function(e){return r(e,!0)},getForward:function(e){return r(e,!1)}};e.exports=d},function(e,t,n){"use strict";function r(e,t){var n,r=e.getSelection(),i=r.getStartKey(),o=r.getStartOffset(),a=e.getCurrentContent(),s=i;return t>a.getBlockForKey(i).getText().length-o?(s=a.getKeyAfter(i),n=0):n=o+t,r.merge({focusKey:s,focusOffset:n})}e.exports=r},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i,o=a||function(e){for(var t=1;t=0?e.add("BOLD"):j.indexOf(t)>=0&&e.remove("BOLD"),"italic"===n?e.add("ITALIC"):"normal"===n&&e.remove("ITALIC"),"underline"===r&&e.add("UNDERLINE"),"line-through"===r&&e.add("STRIKETHROUGH"),"none"===r&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}).toOrderedSet()}return n},q=function(e,t,n){var r=e.text.slice(-1),i=t.text.slice(0,1);if("\r"!==r||"\r"!==i||n||(e.text=e.text.slice(0,-1),e.inlines.pop(),e.entities.pop(),e.blocks.pop()),"\r"===r){if(" "===t.text||"\n"===t.text)return e;" "!==i&&"\n"!==i||(t.text=t.text.slice(1),t.inlines.shift(),t.entities.shift())}return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},H=function(e,t){return t.some(function(t){return-1!==e.indexOf("<"+t)})},V=function(e){e instanceof HTMLAnchorElement||y(!1);var t=e.protocol;return"http:"===t||"https:"===t||"mailto:"===t},K=function(e){var t=new Array(1);return e&&(t[0]=e),o({},B,{text:" ",inlines:[E()],entities:t})},G=function(){return o({},B,{text:"\n",inlines:[E()],entities:new Array(1)})},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o({},N,e)},X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{text:"\r",inlines:[E()],entities:new Array(1),blocks:[Y({parent:n,key:_(),type:e,depth:Math.max(0,Math.min(4,t))})]}},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(R).some(function(n){e.classList.contains(n)&&(t=R[n])}),t},Q=function e(t,n,r,i,a,s,u,c,l,h){var p=I,f=n.nodeName.toLowerCase(),g=t,v="unstyled",_=!1,b=a&&W(a,i,c),y=o({},B),w=null,x=void 0;if("#text"===f){var E=n.textContent,S=E.trim();if(i&&""===S&&n.parentElement){var A=n.parentElement.nodeName.toLowerCase();if("ol"===A||"ul"===A)return{chunk:o({},B),entityMap:t}}return""===S&&"pre"!==a?{chunk:K(l),entityMap:t}:("pre"!==a&&(E=E.replace(C," ")),I=f,{chunk:{text:E,inlines:Array(E.length).fill(r),entities:Array(E.length).fill(l),blocks:[]},entityMap:t})}if(I=f,"br"===f)return"br"!==p||a&&"unstyled"!==b?{chunk:G(),entityMap:t}:{chunk:X("unstyled",u,h),entityMap:t};if("img"===f&&n instanceof HTMLImageElement&&n.attributes.getNamedItem("src")&&n.attributes.getNamedItem("src").value){var T=n,O={};M.forEach(function(e){var t=T.getAttribute(e);t&&(O[e]=t)}),n.textContent="📷",l=d.__create("IMAGE","MUTABLE",O||{})}r=U(f,n,r),"ul"!==f&&"ol"!==f||(i&&(u+=1),i=f),!k&&"li"===f&&n instanceof HTMLElement&&(u=J(n,u));var F=W(f,i,c),j=i&&"li"===a&&"li"===f,L=(!a||k)&&-1!==s.indexOf(f);(j||L)&&(y=X(F,u,h),x=y.blocks[0].key,a=f,_=!k),j&&(v="ul"===i?"unordered-list-item":"ordered-list-item");var R=n.firstChild;null!=R&&(f=R.nodeName.toLowerCase());for(var N=null;R;){R instanceof HTMLAnchorElement&&R.href&&V(R)?function(){var e=R,t={};D.forEach(function(n){var r=e.getAttribute(n);r&&(t[n]=r)}),t.url=new m(e.href).toString(),N=d.__create("LINK","MUTABLE",t||{})}():N=void 0;var P=e(g,R,r,i,a,s,u,c,N||l,k?x:null),z=P.chunk,$=P.entityMap;w=z,g=$,y=q(y,w,k);var H=R.nextSibling;!h&&H&&s.indexOf(f)>=0&&a&&(y=q(y,G())),H&&(f=H.nodeName.toLowerCase()),R=H}return _&&(y=q(y,X(v,u,h))),{chunk:y,entityMap:g}},Z=function(e,t,n,r){e=e.trim().replace(S,"").replace(A," ").replace(T,"").replace(O,"");var i=z(n),a=t(e);if(!a)return null;I=null;var s=H(e,i)?i:["div"],u=Q(r,a,E(),"ul",null,s,-1,n),c=u.chunk,l=u.entityMap;return 0===c.text.indexOf("\r")&&(c={text:c.text.slice(1),inlines:c.inlines.slice(1),entities:c.entities.slice(1),blocks:c.blocks}),"\r"===c.text.slice(-1)&&(c.text=c.text.slice(0,-1),c.inlines=c.inlines.slice(0,-1),c.entities=c.entities.slice(0,-1),c.blocks.pop()),0===c.blocks.length&&c.blocks.push(o({},B,{type:"unstyled",depth:0})),c.text.split("\r").length===c.blocks.length+1&&c.blocks.unshift({type:"unstyled",depth:0}),{chunk:c,entityMap:l}},ee=function(e){if(!e||!e.text||!Array.isArray(e.blocks))return null;var t={cacheRef:{},contentBlocks:[]},n=0,r=e.blocks,i=e.inlines,o=e.entities,a=k?c:u;return e.text.split("\r").reduce(function(e,t,u){t=w(t);var l=r[u],d=n+t.length,h=i.slice(n,d),p=o.slice(n,d),f=x(h.map(function(e,t){var n={style:e,entity:null};return p[t]&&(n.entity=p[t]),s.create(n)}));n=d+1;var g=l.depth,m=l.type,v=l.parent,b=l.key||_(),y=null;if(v){var k=e.cacheRef[v],E=e.contentBlocks[k];if(E.getChildKeys().isEmpty()&&E.getText()){var S=E.getCharacterList(),C=E.getText();y=_();var A=new c({key:y,text:C,characterList:S,parent:v,nextSibling:b});e.contentBlocks.push(A),E=E.withMutations(function(e){e.set("characterList",x()).set("text","").set("children",E.children.push(A.getKey()))})}e.contentBlocks[k]=E.set("children",E.children.push(b))}var T=new a({key:b,parent:v,type:m,depth:g,text:t,characterList:f,prevSibling:y||(0===u||r[u-1].parent!==v?null:r[u-1].key),nextSibling:u===r.length-1||r[u+1].parent!==v?null:r[u+1].key});return e.contentBlocks.push(T),e.cacheRef[T.key]=u,e},t).contentBlocks},te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,r=Z(e,t,n,d);if(null==r)return null;var i=r.chunk,o=r.entityMap;return{contentBlocks:ee(i),entityMap:o}};e.exports=te},function(e,t,n){"use strict";function r(e){var t,n=null;return!a&&document.implementation&&document.implementation.createHTMLDocument&&(t=document.implementation.createHTMLDocument("foo"),t.documentElement||o(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}var i=n(392),o=n(362),a=i.isBrowser("IE <= 9");e.exports=r},function(e,t,n){"use strict";var r=n(375),i=n(363),o=(n(438),n(1152)),a=n(385),s={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t){switch(t){case"bold":return s.toggleInlineStyle(e,"BOLD");case"italic":return s.toggleInlineStyle(e,"ITALIC");case"underline":return s.toggleInlineStyle(e,"UNDERLINE");case"code":return s.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return s.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return s.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=r.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=i.push(e,t,"insert-characters");return i.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),o=n.getBlockBefore(r);if(o&&"atomic"===o.getType()){var a=n.getBlockMap().delete(o.getKey()),u=n.merge({blockMap:a,selectionAfter:t});if(u!==n)return i.push(e,u,"remove-range")}var c=s.tryToRemoveBlockStyle(e);return c?i.push(e,c,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),o=t.getStartKey(),a=n.getBlockForKey(o),s=a.getLength();if(t.getStartOffset()0&&a!==s)return null;var u=a.getType(),c=o.getBlockBefore(i);if("code-block"===u&&c&&"code-block"===c.getType()&&0!==c.getLength())return null;if("unstyled"!==u)return r.setBlockType(o,t,"unstyled")}return null}};e.exports=s},function(e,t,n){"use strict";function r(e){return d&&e.altKey||g(e)}function i(e){return f(e)?e.shiftKey?"redo":"undo":null}function o(e){return h&&e.shiftKey?null:r(e)?"delete-word":"delete"}function a(e){return f(e)&&d?"backspace-to-start-of-line":r(e)?"backspace-word":"backspace"}function s(e){switch(e.keyCode){case 66:return f(e)?"bold":null;case 68:return g(e)?"delete":null;case 72:return g(e)?"backspace":null;case 73:return f(e)?"italic":null;case 74:return f(e)?"code":null;case 75:return!h&&g(e)?"secondary-cut":null;case 77:case 79:return g(e)?"split-block":null;case 84:return d&&g(e)?"transpose-characters":null;case 85:return f(e)?"underline":null;case 87:return d&&g(e)?"backspace-word":null;case 89:return g(e)?h?"redo":"secondary-paste":null;case 90:return i(e)||null;case c.RETURN:return"split-block";case c.DELETE:return o(e);case c.BACKSPACE:return a(e);case c.LEFT:return p&&f(e)?"move-selection-to-start-of-block":null;case c.RIGHT:return p&&f(e)?"move-selection-to-end-of-block":null;default:return null}}var u=n(814),c=n(808),l=n(392),d=l.isPlatform("Mac OS X"),h=l.isPlatform("Windows"),p=d&&l.isBrowser("Firefox < 29"),f=u.hasCommandModifier,g=u.isCtrlKeyCommand;e.exports=s},function(e,t,n){"use strict";var r={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1&&i(u,"")>-1&&(n=RegExp(this.source,o.replace.call(r(this),"g","")),o.replace.call(e.slice(u.index),n,function(){for(var e=1;eu.index&&this.lastIndex--}return u},s||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function o(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=f.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(f.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(f.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a,s,u,c,l,d=Function.prototype.call,h=Array.prototype,p=Object.prototype,f=h.slice,g=d.bind(p.toString),m=d.bind(p.hasOwnProperty);if((l=m(p,"__defineGetter__"))&&(a=d.bind(p.__defineGetter__),s=d.bind(p.__defineSetter__),u=d.bind(p.__lookupGetter__),c=d.bind(p.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+ts)for(d=c;d--;)this[u+d]=this[s+d];if(o&&e===l)this.length=l,this.push.apply(this,i);else for(this.length=l+o,d=0;d>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++i>>0,i=Array(r),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,o=[],a=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,i=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,i=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,o=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o++];break}if(++o>=r)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!r&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,o=r-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in n){i=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(i=e.call(void 0,i,n[o],o,t))}while(o--);return i}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==g(this)?this.split(""):j(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=o(arguments[1])),r=r>=0?r:Math.max(0,n+r);r>>0;if(!n)return-1;var r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:p)}),Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var n,r,i;if(n={enumerable:!0,configurable:!0},l){var o=e.__proto__;e.__proto__=p;var r=u(e,t),i=c(e,t);if(e.__proto__=o,r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var y;y=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=y();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var w=i({}),k="undefined"==typeof document||i(document.createElement("div"));if(!w||!k)var x=Object.defineProperty}Object.defineProperty&&!x||(Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(x)try{return x.call(Object,e,t,n)}catch(e){}if(m(n,"value"))if(l&&(u(e,t)||c(e,t))){var r=e.__proto__;e.__proto__=p,delete e[t],e[t]=n.value,e.__proto__=r}else e[t]=n.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");m(n,"get")&&a(e,t,n.get),m(n,"set")&&s(e,t,n.set)}return e}),Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var E=!0,S=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=S.length;for(var A in{toString:null})E=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)m(e,n)&&t.push(n);if(E)for(var r=0,i=C;r=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((i.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function r(e,t,n){var r=c(t);if(!a.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),s.altGr){if(3==(3&r))return;s.altGr=0}if(18===n||17===n){var i="location"in t?t.location:t.keyLocation;if(17===n&&1===i)1==s[n]&&(u=t.timeStamp);else if(18===n&&3===r&&2===i){var l=t.timeStamp-u;l<50&&(s.altGr=!0)}}}if(n in o.MODIFIER_KEYS&&(n=-1),8&r&&n>=91&&n<=93&&(n=-1),!r&&13===n){var i="location"in t?t.location:t.keyLocation;if(3===i&&(e(t,r,-n),t.defaultPrevented))return}if(a.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function i(){s=Object.create(null)}var o=e("./keys"),a=e("./useragent"),s=null,u=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||a.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0),i},t.addTouchMoveListener=function(e,n){var r,i;t.addListener(e,"touchstart",function(e){var t=e.touches,n=t[0];r=n.clientX,i=n.clientY}),t.addListener(e,"touchmove",function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=r-o.clientX,e.wheelY=i-o.clientY,r=o.clientX,i=o.clientY,n(e)}})},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,r,i){function o(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,a.isIE){var o=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-c)>5;l&&!o||(d=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},n[d-1]||600),1==d&&(u=e.clientX,c=e.clientY)}if(e._clicks=d,r[i]("mousedown",e),d>4)d=0;else if(d>1)return r[i](h[d],e)}function s(e){d=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},n[d-1]||600),r[i]("mousedown",e),r[i](h[d],e)}var u,c,l,d=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",o),a.isOldIE&&t.addListener(e,"dblclick",s)})};var c=!a.isMac||!a.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return o.KEY_MODS[c(e)]},t.addCommandKeyListener=function(e,n){var o=t.addListener;if(a.isOldGecko||a.isOpera&&!("KeyboardEvent"in window)){var u=null;o(e,"keydown",function(e){u=e.keyCode}),o(e,"keypress",function(e){return r(n,e,u)})}else{var c=null;o(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=r(n,e,e.keyCode);return c=e.defaultPrevented,t}),o(e,"keypress",function(e){c&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),c=null)}),o(e,"keyup",function(e){s[e.keyCode]=null}),s||(i(),o(window,"focus",i))}},"object"==typeof window&&window.postMessage&&!a.isOldIE&&(t.nextTick=function(e,n){n=n||window,t.addListener(n,"message",function r(i){"zero-timeout-message-1"==i.data&&(t.stopPropagation(i),t.removeListener(n,"message",r),e())}),n.postMessage("zero-timeout-message-1","*")}),t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;nf.length?e=e.substr(9):e.substr(0,4)==f.substr(0,4)?e=e.substr(4,e.length-f.length+1):e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e==f.charAt(0)||e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),g&&(g=!1),A&&(A=!1))},O=function(e){if(!_){var t=p.value;T(t),d()}},F=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(r&&!c){var i=l||n?"Text":"text/plain";try{return t?!1!==r.setData(i,t):r.getData(i)}catch(e){if(!n)return F(e,t,!0)}}},j=function(e,o){var a=t.getCopyText();if(!a)return r.preventDefault(e);F(e,a)?(i.isIOS&&(m=o,p.value="\n aa"+a+"a a\n",p.setSelectionRange(4,4+a.length),g={value:a}),o?t.onCut():t.onCopy(),i.isIOS||r.preventDefault(e)):(g=!0,p.value=a,p.select(),setTimeout(function(){g=!1,d(),n(),o?t.onCut():t.onCopy()}))},L=function(e){j(e,!0)},R=function(e){j(e,!1)},D=function(e){var o=F(e);"string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(n),r.preventDefault(e)):(p.value="",v=!0)};r.addCommandKeyListener(p,t.onCommandKey.bind(t)),r.addListener(p,"select",S),r.addListener(p,"input",O),r.addListener(p,"cut",L),r.addListener(p,"copy",R),r.addListener(p,"paste",D);var M=function(e){_||!t.onCompositionStart||t.$readOnly||(_={},_.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(I,0),t.on("mousedown",B),_.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},I=function(){if(_&&t.onCompositionUpdate&&!t.$readOnly){var e=p.value.replace(/\x01/g,"");if(_.lastValue!==e&&(t.onCompositionUpdate(e),_.lastValue&&t.undo(),_.canUndo&&(_.lastValue=e),_.lastValue)){var n=t.selection.getRange();t.insert(_.lastValue),t.session.markUndoGroup(),_.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},B=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=_;_=!1;var r=setTimeout(function(){r=null;var e=p.value.replace(/\x01/g,"");_||(e==n.lastValue?d():!n.lastValue&&e&&(d(),T(e)))});C=function(e){return r&&clearTimeout(r),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&r&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",B),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(!!i.isChrome&&i.isChrome>=53||!!i.isWebKit&&i.isWebKit>=603)&&O()}},N=a.delayedCall(I,50);r.addListener(p,"compositionstart",M),i.isGecko?r.addListener(p,"text",function(){N.schedule()}):(r.addListener(p,"keyup",function(){N.schedule()}),r.addListener(p,"keydown",function(){N.schedule()})),r.addListener(p,"compositionend",B),this.getElement=function(){return p},this.setReadOnly=function(e){p.readOnly=e},this.onContextMenu=function(e){A=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){b||(b=p.style.cssText),p.style.cssText=(n?"z-index:100000;":"")+"height:"+p.style.height+";"+(i.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),s=o.computedStyle(t.container),u=a.top+(parseInt(s.borderTopWidth)||0),c=a.left+(parseInt(a.borderLeftWidth)||0),l=a.bottom-u-p.clientHeight-2,d=function(e){p.style.left=e.clientX-c-2+"px",p.style.top=Math.min(e.clientY-u-2,l)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(P),i.isWin&&r.capture(t.container,d,h))},this.onContextMenuClose=h;var P,z=function(e){t.textInput.onContextMenu(e),h()};if(r.addListener(p,"mouseup",z),r.addListener(p,"mousedown",function(e){e.preventDefault(),h()}),r.addListener(t.renderer.scroller,"contextmenu",z),r.addListener(p,"contextmenu",z),i.isIOS){var $=null,W=!1;e.addEventListener("keydown",function(e){$&&clearTimeout($),W=!0}),e.addEventListener("keyup",function(e){$=setTimeout(function(){W=!1},100)});var U=function(e){if(document.activeElement===p&&!W){if(m)return setTimeout(function(){m=!1},100);var n=p.selectionStart,r=p.selectionEnd;if(p.setSelectionRange(4,5),n==r)switch(n){case 0:t.onCommandKey(null,0,s.up);break;case 1:t.onCommandKey(null,0,s.home);break;case 2:t.onCommandKey(null,u.option,s.left);break;case 4:t.onCommandKey(null,0,s.left);break;case 5:t.onCommandKey(null,0,s.right);break;case 7:t.onCommandKey(null,u.option,s.right);break;case 8:t.onCommandKey(null,0,s.end);break;case 9:t.onCommandKey(null,0,s.down)}else{switch(r){case 6:t.onCommandKey(null,u.shift,s.right);break;case 7:t.onCommandKey(null,u.shift|u.option,s.right);break;case 8:t.onCommandKey(null,u.shift,s.end);break;case 9:t.onCommandKey(null,u.shift,s.down)}switch(n){case 0:t.onCommandKey(null,u.shift,s.up);break;case 1:t.onCommandKey(null,u.shift,s.home);break;case 2:t.onCommandKey(null,u.shift|u.option,s.left);break;case 3:t.onCommandKey(null,u.shift,s.left)}}}};document.addEventListener("selectionchange",U),t.on("destroy",function(){document.removeEventListener("selectionchange",U)})}};t.TextInput=d}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),a=e("../lib/lang"),s=i.isChrome<18,u=i.isIE,c=e("./textinput_ios").TextInput,l=function(e,t){function n(e){if(!m){if(m=!0,E)var t=0,n=e?0:h.value.length-1;else var t=e?2:1,n=2;try{h.setSelectionRange(t,n)}catch(e){}m=!1}}function l(){m||(h.value=p,i.isWebKit&&w.schedule())}function d(){clearTimeout(B),B=setTimeout(function(){v&&(h.style.cssText=v,v=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}if(i.isIOS)return c.call(this,e,t);var h=o.createElement("textarea");h.className="ace_text-input",h.setAttribute("wrap","off"),h.setAttribute("autocorrect","off"),h.setAttribute("autocapitalize","off"),h.setAttribute("spellcheck",!1),h.style.opacity="0",e.insertBefore(h,e.firstChild);var p="\u2028\u2028",f=!1,g=!1,m=!1,v="",_=!0;try{var b=document.activeElement===h}catch(e){}r.addListener(h,"blur",function(e){t.onBlur(e),b=!1}),r.addListener(h,"focus",function(e){b=!0,t.onFocus(e),n()}),this.focus=function(){if(v)return h.focus();var e=h.style.top;h.style.position="fixed",h.style.top="0px",h.focus(),setTimeout(function(){h.style.position="","0px"==h.style.top&&(h.style.top=e)},0)},this.blur=function(){h.blur()},this.isFocused=function(){return b};var y=a.delayedCall(function(){b&&n(_)}),w=a.delayedCall(function(){m||(h.value=p,b&&n())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=_&&(_=!_,y.schedule())}),l(),b&&t.onFocus();var k=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length},x=function(e){f?f=!1:k(h)?(t.selectAll(),n()):E&&n(t.selection.isEmpty())},E=null;this.setInputHandler=function(e){E=e},this.getInputHandler=function(){return E};var S=!1,C=function(e){E&&(e=E(e),E=null),g?(n(),e&&t.onPaste(e),g=!1):e==p.charAt(0)?S?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==p?e=e.substr(2):e.charAt(0)==p.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),S&&(S=!1)},A=function(e){if(!m){var t=h.value;C(t),l()}},T=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(r&&!s){var i=u||n?"Text":"text/plain";try{return t?!1!==r.setData(i,t):r.getData(i)}catch(e){if(!n)return T(e,t,!0)}}},O=function(e,i){var o=t.getCopyText();if(!o)return r.preventDefault(e);T(e,o)?(i?t.onCut():t.onCopy(),r.preventDefault(e)):(f=!0,h.value=o,h.select(),setTimeout(function(){f=!1,l(),n(),i?t.onCut():t.onCopy()}))},F=function(e){O(e,!0)},j=function(e){O(e,!1)},L=function(e){var o=T(e);"string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(n),r.preventDefault(e)):(h.value="",g=!0)};r.addCommandKeyListener(h,t.onCommandKey.bind(t)),r.addListener(h,"select",x),r.addListener(h,"input",A),r.addListener(h,"cut",F),r.addListener(h,"copy",j),r.addListener(h,"paste",L),"oncut"in h&&"oncopy"in h&&"onpaste"in h||r.addListener(e,"keydown",function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:j(e);break;case 86:L(e);break;case 88:F(e)}});var R=function(e){m||!t.onCompositionStart||t.$readOnly||(m={},m.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(D,0),t.on("mousedown",M),m.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},D=function(){if(m&&t.onCompositionUpdate&&!t.$readOnly){var e=h.value.replace(/\u2028/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.canUndo&&(m.lastValue=e),m.lastValue)){var n=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},M=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=m;m=!1;var r=setTimeout(function(){r=null;var e=h.value.replace(/\u2028/g,"");m||(e==n.lastValue?l():!n.lastValue&&e&&(l(),C(e)))});E=function(e){return r&&clearTimeout(r),(e=e.replace(/\u2028/g,""))==n.lastValue?"":(n.lastValue&&r&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",M),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(!!i.isChrome&&i.isChrome>=53||!!i.isWebKit&&i.isWebKit>=603)&&A()}},I=a.delayedCall(D,50);r.addListener(h,"compositionstart",R),i.isGecko?r.addListener(h,"text",function(){I.schedule()}):(r.addListener(h,"keyup",function(){I.schedule()}),r.addListener(h,"keydown",function(){I.schedule()})),r.addListener(h,"compositionend",M),this.getElement=function(){return h},this.setReadOnly=function(e){h.readOnly=e},this.onContextMenu=function(e){S=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){v||(v=h.style.cssText),h.style.cssText=(n?"z-index:100000;":"")+"height:"+h.style.height+";"+(i.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),s=o.computedStyle(t.container),u=a.top+(parseInt(s.borderTopWidth)||0),c=a.left+(parseInt(a.borderLeftWidth)||0),l=a.bottom-u-h.clientHeight-2,p=function(e){h.style.left=e.clientX-c-2+"px",h.style.top=Math.min(e.clientY-u-2,l)+"px"};p(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(B),i.isWin&&r.capture(t.container,p,d))},this.onContextMenuClose=d;var B,N=function(e){t.textInput.onContextMenu(e),d()};r.addListener(h,"mouseup",N),r.addListener(h,"mousedown",function(e){e.preventDefault(),d()}),r.addListener(t.renderer.scroller,"contextmenu",N),r.addListener(h,"contextmenu",N)};t.TextInput=l}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)var n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var a=(e("../lib/dom"),e("../lib/event"),e("../lib/useragent"));(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(0!==i){var o=r.getSelectionRange(),s=o.isEmpty();return r.$blockScrolling++,(s||1==i)&&r.selection.moveToPosition(n),r.$blockScrolling--,void(2==i&&(r.textInput.onContextMenu(e.domEvent),a.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(n.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),s=this.$clickSelection.comparePoint(i.end);if(-1==a&&s<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==s&&a>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(-1==a&&1==s)r=i.end,t=i.start;else{var u=o(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=e.wheelX/i,a=e.wheelY/i;i<250&&(o=(o+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(o/a),u=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(u=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(u=!0),u)n.allowed=r;else if(r-n.allowed<250){var c=Math.abs(o)<=1.1*Math.abs(n.vx)&&Math.abs(a)<=1.1*Math.abs(n.vy);c?(u=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=o,n.vy=a,u?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){this.editor._emit("mousewheel",e)}}).call(r.prototype),t.DefaultHandlers=r}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var i=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";function r(e){function t(){var t=d.getDocumentPosition().row,i=u.$annotations[t];if(!i)return n();if(t==a.session.getLength()){var o=a.renderer.pixelToScreenCoordinates(0,d.y).row,s=d.$pos;if(o>a.session.documentToScreenRow(s.row,s.column))return n()}if(h!=i)if(h=i.text.join("
"),c.setHtml(h),c.show(),a._signal("showGutterTooltip",c),a.on("mousewheel",n),e.$tooltipFollowsMouse)r(d);else{var l=d.domEvent.target,p=l.getBoundingClientRect(),f=c.getElement().style;f.left=p.right+"px",f.top=p.bottom+"px"}}function n(){l&&(l=clearTimeout(l)),h&&(c.hide(),h=null,a._signal("hideGutterTooltip",c),a.removeEventListener("mousewheel",n))}function r(e){c.setPosition(e.x,e.y)}var a=e.editor,u=a.renderer.$gutterLayer,c=new i(a.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=u.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}});var l,d,h;e.editor.setDefaultHandler("guttermousemove",function(i){var a=i.domEvent.target||i.domEvent.srcElement;if(o.hasCssClass(a,"ace_fold-widget"))return n();h&&e.$tooltipFollowsMouse&&r(i),d=i,l||(l=setTimeout(function(){l=null,d&&!e.isMousePressed?t():n()},50))}),s.addListener(a.renderer.$gutter,"mouseout",function(e){d=null,h&&!l&&(l=setTimeout(function(){l=null,n()},50))}),a.on("changeSession",n)}function i(e){u.call(this,e)}var o=e("../lib/dom"),a=e("../lib/oop"),s=e("../lib/event"),u=e("../tooltip").Tooltip;a.inherits(i,u),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+o>r&&(t-=20+o),u.prototype.setPosition.call(this,e,t)}}.call(i.prototype),t.GutterHandler=r}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function r(e){function t(e,t){var n=Date.now(),r=!t||e.row!=t.row,o=!t||e.column!=t.column;!A||r||o?(m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,A=n,T={x:b,y:y}):i(T.x,T.y,b,y)>l?A=null:n-A>=c&&(m.renderer.scrollCursorIntoView(),A=null)}function n(e,t){var n=Date.now(),r=m.renderer.layerConfig.lineHeight,i=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),a={x:{left:b-o.left,right:o.right-b},y:{top:y-o.top,bottom:o.bottom-y}},s=Math.min(a.x.left,a.x.right),c=Math.min(a.y.top,a.y.bottom),l={row:e.row,column:e.column};s/i<=2&&(l.column+=a.x.left=u&&m.renderer.scrollCursorIntoView(l):C=n:C=null}function r(){var e=x;x=m.renderer.screenToTextCoordinates(b,y),t(x,e),n(x,e)}function d(){k=m.selection.toOrientedRange(),_=m.session.addMarker(k,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),r(),w=setInterval(r,20),F=0,a.addListener(document,"mousemove",p)}function h(){clearInterval(w),m.session.removeMarker(_),_=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(k),m.$blockScrolling-=1,m.isFocused()&&!S&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),k=null,x=null,F=0,C=null,A=null,a.removeListener(document,"mousemove",p)}function p(){null==j&&(j=setTimeout(function(){null!=j&&_&&h()},20))}function f(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function g(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var m=e.editor,v=o.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),m.addEventListener("mousedown",this.onMouseDown.bind(e));var _,b,y,w,k,x,E,S,C,A,T,O=m.container,F=0;this.onDragStart=function(e){if(this.cancelDrag||!O.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}k=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",s.isOpera&&(m.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),s.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(O.draggable=!1,S=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;E||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&f(e.dataTransfer))return b=e.clientX,y=e.clientY,_||d(),F++,e.dataTransfer.dropEffect=E=g(e),a.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&f(e.dataTransfer))return b=e.clientX,y=e.clientY,_||(d(),F++),null!==j&&(j=null),e.dataTransfer.dropEffect=E=g(e),a.preventDefault(e)},this.onDragLeave=function(e){if(--F<=0&&_)return h(),E=null,a.preventDefault(e)},this.onDrop=function(e){if(x){var t=e.dataTransfer;if(S)switch(E){case"move":k=k.contains(x.row,x.column)?{start:x,end:x}:m.moveText(k,x);break;case"copy":k=m.moveText(k,x,!0)}else{var n=t.getData("Text");k={start:x,end:m.session.insert(x,n)},m.focus(),E=null}return h(),a.preventDefault(e)}},a.addListener(O,"dragstart",this.onDragStart.bind(e)),a.addListener(O,"dragend",this.onDragEnd.bind(e)),a.addListener(O,"dragenter",this.onDragEnter.bind(e)),a.addListener(O,"dragover",this.onDragOver.bind(e)),a.addListener(O,"dragleave",this.onDragLeave.bind(e)),a.addListener(O,"drop",this.onDrop.bind(e));var j=null}function i(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var o=e("../lib/dom"),a=e("../lib/event"),s=e("../lib/useragent"),u=200,c=200,l=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&"dragReady"==this.state){var n=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){var n=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;"unselectable"in i&&(i.unselectable="on"),t.getDragDelay()?(s.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(r.prototype),t.DragdropHandler=r}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a1&&(i=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(e){}if(i&&!t.$loading[n])return r&&r(i);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a)}},i(!0),t.init=i}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,u=e("./dragdrop_handler").DragdropHandler,c=e("../config"),l=function(e){var t=this;this.editor=e,new o(this),new a(this),new u(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},s=e.renderer.getMouseEventTarget();r.addListener(s,"click",this.onMouseEvent.bind(this,"click")),r.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener([s,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),r.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;r.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(s,"mousedown",n),r.addListener(c,"mousedown",n),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n),r.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new s(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,a=function(e){if(e){if(i.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},u=function(e){clearInterval(l),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){u(e)});o.$onCaptureMouseMove=a,o.releaseMouse=r.capture(this.editor.container,a,u);var l=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(l.prototype),c.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var a=r.getFoldAt(n,r.getLine(n).length,1);a?r.removeFold(a):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){for(var o,a=!1,s=this.$editor.commands,u=this.$handlers.length;u--&&!((o=this.$handlers[u].handleKeyboard(this.$data,e,t,n,r))&&o.command&&(a="null"==o.command||s.exec(o.command,this.$editor,o.args,r),a&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";function r(e,t,n,r){var i=s?f:p,g=null,m=null,v=null,_=0,b=null,y=-1,x=null,S=null,C=[];if(!r)for(x=0,r=[];x0)if(16==b){for(x=y;x-1){for(x=y;x=0&&r[A]==E;A--)t[A]=s}}function i(e,t,n){if(!(u=e){for(r=l+1;r=e;)r++;for(i=l,o=r-1;i=t.length||(i=n[r-1])!=_&&i!=b||(o=t[r+1])!=_&&o!=b?y:(c&&(o=b),o==i?o:y);case C:return i=r>0?n[r-1]:w,i==_&&r+10&&n[r-1]==_)return _;if(c)return y;for(u=r+1,a=t.length;u=1425&&f<=2303||64286==f;if(i=t[u],g&&(i==v||i==x))return v}return r<1||(i=t[r-1])==w?y:n[r-1];case w:return c=!1,d=!0,s;case k:return h=!0,y;case O:case F:case L:case R:case j:c=!1;case D:return y}}function a(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?m:M[t]:5==n?/[\u0591-\u05f4]/.test(e)?v:m:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?T:/[\u0660-\u0669\u066b-\u066c]/.test(e)?b:1642==t?A:/[\u06f0-\u06f9]/.test(e)?_:x:32==n&&t<=8287?I[255&t]:254==n&&t>=65136?x:y}var s=0,u=0,c=!1,l=!1,d=!1,h=!1,p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],g=1,m=0,v=1,_=2,b=3,y=4,w=5,k=6,x=7,E=8,S=9,C=10,A=11,T=12,O=13,F=14,j=15,L=16,R=17,D=18,M=[D,D,D,D,D,D,D,D,D,k,w,k,E,w,D,D,D,D,D,D,D,D,D,D,D,D,D,D,w,w,w,k,E,y,y,A,A,A,y,y,y,y,y,C,S,C,S,S,_,_,_,_,_,_,_,_,_,_,S,y,y,y,y,y,y,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,y,y,y,y,y,y,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,y,y,y,y,D,D,D,D,D,D,w,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,S,y,A,A,A,A,y,y,y,y,m,y,y,D,y,y,A,A,_,_,y,m,y,y,y,_,m,y,y,y,y,y],I=[E,E,E,E,E,E,E,E,E,E,E,D,D,D,m,v,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,E,w,O,F,j,L,R,S,A,A,A,A,A,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,S,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,E];t.L=m,t.R=v,t.EN=_,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,n,o){if(e.length<2)return{};var a=e.split(""),u=new Array(a.length),c=new Array(a.length),l=[];s=o?g:0,r(a,l,a.length,n);for(var d=0;dx&&n[d]0&&"ل"===a[d-1]&&/\u0622|\u0623|\u0625|\u0627/.test(a[d])&&(l[d-1]=l[d]=t.R_H,d++);a[a.length-1]===t.DOT&&(l[a.length-1]=t.B);for(var d=0;d=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var n=this.session.$wrapData[e];n&&(void 0===t&&(t=this.getSplitIndex()),t>0&&n.length?(this.wrapIndent=n.indent,this.line=t0?e-1:0,this.bidiMap),n=this.bidiMap.bidiLevels,i=0;0===e&&n[t]%2!=0&&t++;for(var o=0;o=c&&in+a/2;){if(n+=a,i===o.length-1){a=0;break}a=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!=0&&o[i]%2==0?(e0&&o[i-1]%2==0&&o[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===a&&o[i-1]%2==0||!this.isRtlDir&&0===i&&o[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!=0&&0!==a&&i--,t=this.bidiMap.logicalFromVisual[i]),t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(r.row,r.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(r.row,r.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);return i?void this.moveCursorTo(i.end.row,i.end.column):(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column);var i=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&i.row===this.lead.row&&i.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[i.row]&&(i.row>0||e>0)&&i.row++,this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(e){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var r=e("./config"),i=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],u=0;u1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?l=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(d=1,l=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),o[i]=u,i+=d,r.push(l),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){i=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;il){var v=e.substring(l,m-g.length);h.type==p?h.value+=v:(h.type&&c.push(h),h={type:p,value:v})}for(var _=0;_i){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});l1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},this.reportError=r.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)t-=1,n+=e[t].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},d={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t])return r=l[t];r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},f=function(e){this.add("braces","insertion",function(t,n,i,o,a){var u=i.getCursorPosition(),c=o.doc.getLine(u.row);if("{"==a){h(i);var l=i.getSelectionRange(),d=o.doc.getTextRange(l);if(""!==d&&"{"!==d&&i.getWrapBehavioursEnabled())return p(l,d,"{","}");if(f.isSaneInsertion(i,o))return/[\]\}\)]/.test(c[u.column])||i.inMultiSelectMode||e&&e.braces?(f.recordAutoInsert(i,o,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(i,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){h(i);var g=c.substring(u.column,u.column+1);if("}"==g){var m=o.$findOpeningBracket("}",{column:u.column+1,row:u.row});if(null!==m&&f.isAutoInsertedClosing(u,c,a))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){h(i);var v="";f.isMaybeInsertedClosing(u,c)&&(v=s.stringRepeat("}",r.maybeInsertedBrackets),f.clearMaybeInsertedClosing());var g=c.substring(u.column,u.column+1);if("}"===g){var _=o.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!_)return null;var b=this.$getIndent(o.getLine(_.row))}else{if(!v)return void f.clearMaybeInsertedClosing();var b=this.$getIndent(c)}var y=b+o.getTabString();return{text:"\n"+y+"\n"+b+v,selection:[1,y.length,1,y.length]}}f.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(h(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){h(n);var o=n.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return p(o,a,"(",")");if(f.isSaneInsertion(n,r))return f.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){h(n);var s=n.getCursorPosition(),u=r.doc.getLine(s.row),c=u.substring(s.column,s.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==l&&f.isAutoInsertedClosing(s,u,i))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(h(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){h(n);var o=n.getSelectionRange(),a=r.doc.getTextRange(o);if(""!==a&&n.getWrapBehavioursEnabled())return p(o,a,"[","]");if(f.isSaneInsertion(n,r))return f.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){h(n);var s=n.getCursorPosition(),u=r.doc.getLine(s.row),c=u.substring(s.column,s.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==l&&f.isAutoInsertedClosing(s,u,i))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(h(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var o=r.$mode.$quotes||d;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;h(n);var a=i,s=n.getSelectionRange(),u=r.doc.getTextRange(s);if(!(""===u||1==u.length&&o[u])&&n.getWrapBehavioursEnabled())return p(s,u,a,a);if(!u){var c=n.getCursorPosition(),l=r.doc.getLine(c.row),f=l.substring(c.column-1,c.column),g=l.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var _,b=m&&/string|escape/.test(m.type),y=!v||/string|escape/.test(v.type);if(g==a)(_=b!==y)&&/string\.end/.test(v.type)&&(_=!1);else{if(b&&!y)return null;if(b&&y)return null;var w=r.$mode.tokenRe;w.lastIndex=0;var k=w.test(f);w.lastIndex=0;var x=w.test(f);if(k||x)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;_=!0}return{text:_?a+a:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)&&(h(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==o))return i.end.column++,i})};f.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new a(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(f,o),t.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";t.packages={},function(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),s=e("../lib/lang"),u=e("../token_iterator").TokenIterator,c=e("../range").Range,l=function(){this.HighlightRules=i};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function i(e){for(var t=n;t<=r;t++)e(o.getLine(t),t)}var o=t.doc,a=!0,u=!0,c=1/0,l=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var h=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else var h=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;h=new RegExp("^(\\s*)(?:"+h+") ?"),d=t.getUseSoftTabs();var f=function(e,t){var n=e.match(h);if(n){var r=n[1].length,i=n[0].length;_(e,r,i)||" "!=n[0][i-1]||i--,o.removeInLine(t,r,i)}},g=p+" ",m=function(e,t){a&&!/\S/.test(e)||(_(e,c,c)?o.insertInLine({row:t,column:c},g):o.insertInLine({row:t,column:c},p))},v=function(e,t){return h.test(e)},_=function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%l!=0)return!1;for(var r=0;" "==e.charAt(n++);)r++;return l>2?r%l!=l-1:r%l==0}}else{if(!this.blockComment)return!1;var p=this.blockComment.start,b=this.blockComment.end,h=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),y=new RegExp("(?:"+s.escapeRegExp(b)+")\\s*$"),m=function(e,t){v(e,t)||a&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},b),o.insertInLine({row:t,column:c},p))},f=function(e,t){var n;(n=e.match(y))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(h))&&o.removeInLine(t,n[1].length,n[0].length)},v=function(e,n){if(h.test(e))return!0;for(var r=t.getTokens(n),i=0;ie.length&&(w=e.length)}),c==1/0&&(c=w,a=!1,u=!1),d&&c%l!=0&&(c=Math.floor(c/l)*l),i(u?f:m)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,s=new u(t,r.row,r.column),l=s.getCurrentToken(),d=(t.selection,t.selection.toOrientedRange());if(l&&/comment/.test(l.type)){for(var h,p;l&&/comment/.test(l.type);){var f=l.value.indexOf(i.start);if(-1!=f){var g=s.getCurrentTokenRow(),m=s.getCurrentTokenColumn()+f;h=new c(g,m,g,m+i.start.length);break}l=s.stepBackward()}for(var s=new u(t,r.row,r.column),l=s.getCurrentToken();l&&/comment/.test(l.type);){var f=l.value.indexOf(i.end);if(-1!=f){var g=s.getCurrentTokenRow(),m=s.getCurrentTokenColumn()+f;p=new c(g,m,g,m+i.end.length);break}l=s.stepForward()}p&&t.remove(p),h&&(t.remove(h),o=h.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);d.start.row==o&&(d.start.column+=a),d.end.row==o&&(d.end.column+=a),t.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;tthis.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,u=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length,i=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var u=n.slice(a,s);if(s>r){e.lines=u,e.start.row=i+a,e.start.column=o;break}u.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:u},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,u=a;u<=s;u++){var c=this.cache[u];null==c&&(c=r.getMatchOffsets(n.getLine(u),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new i(u,e.offset,u,e.offset+e.length)}),this.cache[u]=c.length?c:"");for(var l=c.length;l--;)t.drawSingleLineMarker(e,c[l].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var i=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,i,o,a=0,s=this.folds,u=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c0)){var u=i(e,a.start);return 0===s?t&&0!==u?-o-2:o:u>0||0===u&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});for(var n,r=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.rowr)break;if(l.start.row==r&&l.start.column>=t.column&&(l.start.column==t.column&&this.$insertRight||(l.start.column+=a,l.start.row+=o)),l.end.row==r&&l.end.column>=t.column){if(l.end.column==t.column&&this.$insertRight)continue;l.end.column==t.column&&a>0&&ul.start.column&&l.end.column==s[u+1].start.column&&(l.end.column-=a),l.end.column+=a,l.end.row+=o}}}if(0!=o&&u=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0),r;r=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,r=this.$foldData,i=!1;e instanceof a?n=e:(n=new a(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,u=n.start.column,c=n.end.row,l=n.end.column;if(!(s0&&(this.removeFolds(p),p.forEach(function(e){n.addSubFold(e)}));for(var f=0;f0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,r;if(null==e?(n=new i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,r=this.getFoldsInRangeList(n),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(tl)break}while(o&&u.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength(),e=e||0;for(var i=e;i=e){i=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var u=s.range.start.row+1,c=s.range.end.row;this.foldAll(u,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var i=e("../range").Range,o=e("./fold_line").FoldLine,a=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function r(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),a=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(a||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},a=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){var s=this.$findClosingBracket(a[1],e);if(!s)return null;t=o.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(a[2],e);if(!s)return null;t=o.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var u=t.column-a.getCurrentTokenColumn()-2,c=s.value;;){for(;u>=0;){var l=c.charAt(u);if(l==r){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:u+a.getCurrentTokenColumn()}}else l==e&&(o+=1);u-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;c=s.value,u=c.length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var u=t.column-a.getCurrentTokenColumn();;){for(var c=s.value,l=c.length;u=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}r.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;ae&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,u=0;ua){if((u=o.end.row+1)>=s)break;o=this.$foldData[i++],a=o?o.start.row:1/0}null==n[u]&&(n[u]=this.$getStringScreenWidth(t[u])[0]),n[u]>r&&(r=n[u])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=e.length-1;-1!=r;r--){var i=e[r];"doc"==i.group?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,r=0;re.end.column&&(o.start.column+=s),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=s)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var u=e.start,c=o.start,a=c.row-u.row,s=c.column-u.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==u.row&&(e.start.column+=s),e.end.row==u.row&&(e.end.column+=s),e.start.row+=a,e.end.row+=a,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var o=new l(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),a.length&&this.addFolds(a),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,u=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var c=this.$foldData;u=this.getFoldsInRange(e),this.removeFolds(u);var l=this.getFoldLine(i.row),d=0;if(l){l.addRemoveChars(i.row,i.column,r.column-i.column),l.shiftRow(-s);var h=this.getFoldLine(o);h&&h!==l&&(h.merge(l),l=h),d=c.indexOf(l)+1}for(d;d=i.row&&l.shiftRow(-s)}a=o}else{var p=Array(s);p.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,p);var c=this.$foldData,l=this.getFoldLine(o),d=0;if(l){var g=l.range.compareInside(r.row,r.column);0==g?(l=l.split(r.row,r.column))&&(l.shiftRow(s),l.addRemoveChars(a,0,i.column-r.column)):-1==g&&(l.addRemoveChars(o,0,i.column-r.column),l.shiftRow(s)),d=c.indexOf(l)+1}for(d;d=o&&l.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),"remove"===n&&(u=this.getFoldsInRange(e),this.removeFolds(u),s=-s);var l=this.getFoldLine(o);l&&l.addRemoveChars(o,r.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),u},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,r){var i,o,a=this.doc.getAllLines(),s=this.getTabSize(),u=this.$wrapData,c=this.$wrapLimit,l=e;for(r=Math.min(r,a.length-1);l<=r;)o=this.getFoldLine(l,o),o?(i=[],o.walk(function(e,r,o,s){var u;if(null!=e){u=this.$getDisplayTokens(e,i.length),u[0]=t;for(var c=1;cr-v;){var _=h+r-v;if(e[_-1]>=o&&e[_]>=o)s(_);else if(e[_]!=t&&e[_]!=n){for(var b=Math.max(_-(r-(r>>2)),h-1);_>b&&e[_]b&&e[_]b&&9==e[_];)_--}else for(;_>b&&e[_]b?s(++_):(_=h+r,2==e[_]&&_--,s(_-v))}else{for(_;_!=h-1&&e[_]!=t;_--);if(_>h){s(_);continue}for(_=h+r;_39&&s<48||s>57&&s<64?i.push(9):s>=4352&&e(s)?i.push(1,2):i.push(1)}return i},this.$getStringScreenWidth=function(t,n,r){if(0==n)return[0,0];null==n&&(n=1/0),r=r||0;var i,o;for(o=0;o=4352&&e(i)?r+=2:r+=1,!(r>n));o++);return[r,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0)var s=c[l],o=this.$docRowCache[l],h=e>c[d-1];else var h=!d;for(var p=this.getLength()-1,f=this.getNextFoldLine(o),g=f?f.start.row:1/0;s<=e&&(u=this.getRowLength(o),!(s+u>e||o>=p));)s+=u,++o>g&&(o=f.end.row+1,f=this.getNextFoldLine(o,f),g=f?f.start.row:1/0),h&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(f&&f.start.row<=o)r=this.getFoldDisplayLine(f),o=f.start.row;else{if(s+u<=e||o>p)return{row:p,column:this.getLine(p).length};r=this.getLine(o),f=null}var m=0,v=Math.floor(e-s);if(this.$useWrapMode){var _=this.$wrapData[o];_&&(i=_[v],v>0&&_.length&&(m=_.indent,a=_[v-1]||_[_.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-m)[1],this.$useWrapMode&&a>=i&&(a=i-1),f?f.idxToPosition(a):{row:o,column:a}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,o=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var a,s=0,u=this.$docRowCache,c=this.$getRowCacheIndex(u,e),l=u.length;if(l&&c>=0)var s=u[c],r=this.$screenRowCache[c],d=e>u[l-1];else var d=!l;for(var h=this.getNextFoldLine(s),p=h?h.start.row:1/0;s=p){if((a=h.end.row+1)>e)break;h=this.getNextFoldLine(a,h),p=h?h.start.row:1/0}else a=s+1;r+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var f="";h&&s>=p?(f=this.getFoldDisplayLine(h,e,t),i=h.start.row):(f=this.getLine(e).substring(0,t),i=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){for(var v=0;f.length>=m[v];)r++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return{row:r,column:g+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=0,t=this.$foldData[i++],o=t?t.start.row:1/0;ro&&(r=t.end.row+1,t=this.$foldData[i++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,i=0;in));o++);return[r,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=e}.call(f.prototype),e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),a.defineOptions(f.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function r(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}var i=e("./lib/lang"),o=e("./lib/oop"),a=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new a(e,n,i,o),!(n==o&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start)&&(r=null,1))}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],s=t.re;if(t.$isMultiLine){var u,c=s.length,l=r.length-c;e:for(var d=s.offset||0;d<=l;d++){for(var h=0;hg||(o.push(u=new a(d,g,d+c-1,m)),c>2&&(d=d+c-2))}}else for(var v=0;vw&&o[h].end.row==n.end.row;)h--;for(o=o.slice(v,h+1),v=0,h=o.length;v=s;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=u,s=a.row;n>=s;n--)if(d(n,Number.MAX_VALUE,e))return}};else var c=function(e){var n=a.row;if(!d(n,a.column,e)){for(n+=1;n<=u;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=s,u=a.row;n<=u;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var l=n.length,d=function(t,i,o){var a=r?t-l+1:t;if(!(a<0)){var s=e.getLine(a),u=s.search(n[0]);if(!(!r&&ui))return!!o(a,u,a+l-1,d)||void 0}}};else if(r)var d=function(t,r,i){var o,a=e.getLine(t),s=[],u=0;for(n.lastIndex=0;o=n.exec(a);){var c=o[0].length;if(u=o.index,!c){if(u>=a.length)break;n.lastIndex=u+=1}if(o.index+c>r)break;s.push(o.index,c)}for(var l=s.length-1;l>=0;l-=2){var d=s[l-1],c=s[l];if(i(t,d,t,d+c))return!0}};else var d=function(t,r,i){var o,a=e.getLine(t),s=r;for(n.lastIndex=r;o=n.exec(a);){var u=o[0].length;if(s=o.index,i(t,s,t,s+u))return!0;if(!u&&(n.lastIndex=s+=1,s>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function r(e,t){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function i(e,t){r.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),a=e("../lib/useragent"),s=o.KEY_MODS;i.prototype=r.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(r+a,t,n)},this)},this._addCommandToBinding=function(t,n,r){var i,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(i=o[t].indexOf(n))&&o[t].splice(i,1):o[t]=[o[t]],"number"!=typeof r&&(r=e(n));var a=o[t];for(i=0;ir)break}a.splice(i,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=o[n];if(o.FUNCTION_KEYS[r])n=o.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var s=o.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=s}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=s[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(r.prototype),t.HashHandler=r,t.MultiHashHandler=i}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(a,i),function(){r.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(a.prototype),t.CommandManager=a}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function r(e,t){return{win:e,mac:t}}var i=e("../lib/lang"),o=e("../config"),a=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:r("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:r("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:r("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:r("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:r("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:r("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:r("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:r("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:r("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:r("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:r("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:r("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:r("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:r("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:r("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:r("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:r("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:r(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:r("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:r("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:r("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:r("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:r("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:r("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:r("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()),u=s.replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=r.row+1;l++){var d=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(l)));0!==d.length&&(d=" "+d),c+=d}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+u)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new _(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==i.type.indexOf("tag-open")||(i=r.stepForward())){var o=i.value,a=0,s=r.stepBackward();if("<"==s.value)do{s=i,(i=r.stepForward())&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"=0);else{do{i=s,s=r.stepBackward(),i&&i.value===o&&-1!==i.type.indexOf("tag-name")&&("<"===s.value?a++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new p(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),o=i.length,a=i.substring(Math.max(n,0),Math.min(r,o));if(!(n>=0&&/^[\w\d]/.test(a)||r<=o&&/[\w\d]$/.test(a))&&(a=i.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a)))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var i=r.length;i--;){var o=r[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[i])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){var a=new p.fromPoints(i,i);a.end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var u=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+u)}}this.clearSelection();var c=i.column,l=n.getState(i.row),s=n.getLine(i.row),d=r.checkOutdent(l,s,e);if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new p(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var h=r.getNextLineIndent(l,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},h)}d&&r.autoOutdent(l,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);tt.toLowerCase()?1:0});for(var i=new p(0,0,0,0),r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,u=parseFloat(o.value);u*=Math.pow(10,s),a!==o.end&&np+1)break;p=f.last}for(l--,s=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=l+1);d<=l;)a[d].moveBy(s,0),d++;t||(s=0),u+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new _(this.session,n.row,n.column),i=r.getCurrentToken(),o=i||r.stepForward();if(o){var a,s,u=!1,c={},l=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;l=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",function(){r=!0}),a=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;r=o.top>=0&&s+t.top<0||!(o.topwindow.innerHeight)&&null,null!=r&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(b.prototype),v.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),r=0;r0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,a),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;ta&&(g=o.end.row+1,o=t.getNextFoldLine(g,o),a=o?o.start.row:1/0),g>i){for(;this.$cells.length>f+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}(p=this.$cells[++f])||(p={element:null,textNode:null,foldWidget:null},p.element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[f]=p);var m="ace_gutter-cell ";u[g]&&(m+=u[g]),c[g]&&(m+=c[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),p.element.className!=m&&(p.element.className=m);var v=t.getRowLength(g)*e.lineHeight+"px";if(v!=p.element.style.height&&(p.element.style.height=v),s){var _=s[g];null==_&&(_=s[g]=t.getFoldWidget(g))}if(_){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+_;"start"==_&&g==a&&gn.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+(this.session.$bidiHandler.isBidiRow(i.start.row)?this.session.$bidiHandler.getPosLeft(i.start.column):i.start.column*e.characterWidth);r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.session.$bidiHandler.isBidiRow(i.start.row)?this.drawBidiSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,n,i,o,a){for(var s=this.session,u=n.start.row,c=n.end.row,l=u,d=0,h=0,p=s.getScreenLastRowColumn(l),f=null,g=new r(l,n.start.column,l,h);l<=c;l++)g.start.row=g.end.row=l,g.start.column=l==u?n.start.column:s.getRowWrapIndent(l),g.end.column=p,d=h,h=p,p=l+1p,l==c),this.session.$bidiHandler.isBidiRow(l)?this.drawBidiSingleLineMarker(t,g,f,o,l==c?0:1,a):this.drawSingleLineMarker(t,g,f,o,l==c?0:1,a)},this.drawMultiLineMarker=function(e,t,n,r,i){var o,a,s,u=this.$padding;if(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var c=t.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",r,null,i)}else o=r.lineHeight,a=this.$getTop(t.start.row,r),s=u+t.start.column*r.characterWidth,e.push("
");if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c=t.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",r,null,i)}else{var l=t.end.column*r.characterWidth;o=r.lineHeight,a=this.$getTop(t.end.row,r),e.push("
")}if(!((o=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){a=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);e.push("
")}},this.drawSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,u=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;e.push("
")},this.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=this.$getTop(t.start.row,r),u=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(t){e.push("
")})},this.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),e.push("
")},this.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){r.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n"+o.stringRepeat(this.TAB_CHAR,n)+""):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i="",a="";if(this.showInvisibles){r+=" ace_invisible",i=" ace_invisible_space",a=" ace_invisible_tab";var s=o.stringRepeat(this.SPACE_CHAR,this.tabSize),u=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else var s=o.stringRepeat(" ",this.tabSize),u=s;this.$tabStrings[" "]=""+s+"",this.$tabStrings["\t"]=""+u+""}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;sc&&(s=u.end.row+1,u=this.session.getNextFoldLine(s,u),c=u?u.start.row:1/0),!(s>i);){var l=o[a++];if(l){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==c&&u),l.style.height=e.lineHeight*this.session.getRowLength(s)+"px",l.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRowt.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){for(var r=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,a=this.session.getNextFoldLine(o,a),s=a?a.start.row:1/0),!(o>n);){var u=i.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==s&&a),u.innerHTML=c.join(""),this.$useLineGroups())u.className="ace_line_group",r.appendChild(u),u.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;u.firstChild;)r.appendChild(u.firstChild);o++}return r},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,r=e.lastRow,i=n,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;i>a&&(i=o.end.row+1,o=this.session.getNextFoldLine(i,o),a=o?o.start.row:1/0),!(i>r);)this.$useLineGroups()&&t.push("
"),this.$renderLine(t,i,!1,i==a&&o),this.$useLineGroups()&&t.push("
"),i++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,a=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=function(e,n,r,a,s){if(n)return i.showInvisibles?""+o.stringRepeat(i.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var u=i.session.getScreenTabSize(t+a);return t+=u-1,i.$tabStrings[u]}if(" "==e){var c=i.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",l=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,""+l+""}return r?""+i.SPACE_CHAR+"":(t+=1,""+e+"")},u=r.replace(a,s);if(this.$textToken[n.type])e.push(u);else{var c="ace_"+n.type.replace(/\./g," ace_"),l="";"fold"==n.type&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("",u,"")}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:" "==t[0]?(r-=r%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){for(var i=0,a=0,s=n[0],u=0,c=0;c=s;)u=this.$renderToken(e,u,l,d.substring(0,s-i)),d=d.substring(s-i),i=s,r||e.push("","
"),e.push(o.stringRepeat(" ",n.indent)),a++,u=0,s=n[a]||Number.MAX_VALUE;0!=d.length&&(i+=d.length,u=this.$renderToken(e,u,l,d))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var o=1;o"),i.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,i,o,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),n||e.push("
")},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(a=a.substring(0,n-t)),i.push({type:e[r].type,value:a}),o=t+a.length,r+=1}for(;on?i.push({type:e[r].type,value:a.substring(0,n-o)}):i.push(e[r]),o+=a.length,r+=1}}var r=this.session,i=[],o=r.getTokens(e);return t.walk(function(e,t,a,s,u){null!=e?i.push({type:"fold",value:e}):(u&&(o=r.getTokens(t)),o.length&&n(o,s,a))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(s.prototype),t.Text=s}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===r&&(r=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(r?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||r||(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);for(var n=0,i=t.length;ne.height+e.offset||o.top<0)&&n>1)){var a=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[n],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(s.prototype);var u=function(e,t){s.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(u,s),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(u.prototype);var c=function(e,t){s.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(c,s),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=c,t.VScrollBar=u,t.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,u=0,c=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),u||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",u),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){r.implement(this,s),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=i.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;u=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===u){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/u}}else var t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/u};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,u),this.$main.getBoundingClientRect().width/u},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),a=e("./lib/useragent"),s=e("./layer/gutter").Gutter,u=e("./layer/marker").Marker,c=e("./layer/text").Text,l=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter;i.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var m=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!a.isOldIE,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new u(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return r&&(e||o.height!=r)&&(o.height=r,i|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(i|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)),o.$dirty=!n||!r,i&&this._signal("resize",a),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i)return void(r.top=r.left="0");var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,i+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,r.height=i+"px",r.width=o+"px",r.left=Math.min(n,this.$size.scrollerWidth-o)+"px",r.top=Math.min(t,this.$size.height-i)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,o=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==a;s&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var u=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=this.scrollTop%this.lineHeight,l=t.scrollerHeight+this.lineHeight,d=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=d;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+h.right)));var p=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+d<0||this.scrollTop>h.top),f=u!==p;f&&(this.$vScroll=p,this.scrollBarV.setVisible(p));var g,m,v=Math.ceil(l/this.lineHeight)-1,_=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)),b=_+v,y=this.lineHeight;_=e.screenToDocumentRow(_,0);var w=e.getFoldLine(_);w&&(_=w.start.row),g=e.documentToScreenRow(_,0),m=e.getRowLength(_)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+m,c=this.scrollTop-g*y;var k=0;return this.layerConfig.width!=o&&(k=this.CHANGE_H_SCROLL),(s||f)&&(k=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:_,firstRowScreen:g,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:c,gutterOffset:y?Math.max(0,Math.ceil((c+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},k},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||to?(t&&u+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):u+this.$size.scrollerHeight-si?(i=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=e+this.scrollLeft-n.left-this.$padding,i=r/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=Math.round(i);return{row:o,column:a,side:i-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=e+this.scrollLeft-n.left-this.$padding,i=Math.round(r/this.characterWidth),o=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(i,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(r.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.importCssString(n.cssText,n.cssClass,r.container.ownerDocument),r.theme&&i.removeCssClass(r.container,r.theme.cssClass);var o="padding"in n?n.padding:"padding"in(r.theme||{})?4:r.$padding;r.$padding&&o!=r.$padding&&r.setPadding(o),r.$theme=n.cssClass,r.theme=n,i.addCssClass(r.container,n.cssClass),i.setCssClass(r.container,"ace_dark",n.isDark),r.$size&&(r.$size.width=0,r.$updateSizeAsync()),r._dispatchEvent("themeLoaded",{theme:n}),t&&t()}var r=this;if(this.$themeId=e,r._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var a=e||this.$options.theme.initialValue;o.loadModule(["theme",a],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(m.prototype),o.defineOptions(m.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";function r(e,t){var n=t.src;a.qualifyURL(e);try{return new Blob([n],{type:"application/javascript"})}catch(e){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,i=new r;return i.append(n),i.getBlob("application/javascript")}}function i(e,t){var n=r(e,t),i=window.URL||window.webkitURL,o=i.createObjectURL(n);return new Worker(o)}var o=e("../lib/oop"),a=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,u=e("../config"),c=function(t,n,r,o,a){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),u.get("packaged")||!e.toUrl)o=o||u.moduleUrl(n.id,"worker");else{var s=this.$normalizePath;o=o||s(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach(function(t){c[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=i(o,n),a&&this.send("importScripts",a),this.$worker.postMessage({init:!0,tlns:c,module:n.id,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return a.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);var l=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,o=Object.create(s),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){a.messageBuffer.push(e),r&&(i?setTimeout(c):c())},this.setEmitSync=function(e){i=e};var c=function(){var e=a.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&o._signal(e.event,e.data)};o.postMessage=function(e){a.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},u.loadModule(["worker",t],function(e){for(r=new e[n](o);a.messageBuffer.length;)c()})};l.prototype=c.prototype,t.UIWorkerClient=l,t.WorkerClient=c,t.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],u={row:s.row,column:s.column+o};this.doc.insertMergedLines(u,e.lines)}else if("remove"===e.action)for(var a=this.others.length-1;a>=0;a--){var s=this.others[a],u={row:s.row,column:s.column+o};this.doc.remove(new r(u.row,u.column,u.row,u.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=u.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),i=n.start.row,o=n.end.row;if(i==o){if(r)var a=n.end,s=n.start;else var a=n.start,s=n.end;return this.addRange(u.fromPoints(s,s)),void this.addRange(u.fromPoints(a,a))}var c=[],l=this.getLineRange(i,!0);l.start.column=n.start.column,c.push(l);for(var d=i+1;d1){var e=this.rangeList.ranges,t=e[e.length-1],n=u.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),i=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column0;)v--;if(v>0)for(var _=0;r[_].isEmpty();)_++;for(var b=v;b>=_;b--)r[b].isEmpty()&&r.splice(b,1)}return r}}.call(c.prototype);var v=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(p.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(p.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,o=1==n||n&&n.$byLines,a=this.session,s=this.selection,u=s.rangeList,l=(i?s:u).ranges;if(!l.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=s._eventRegistry;s._eventRegistry={};var h=new c(a);this.inVirtualSelectionMode=!0;for(var p=l.length;p--;){if(o)for(;p>0&&l[p].start.row==l[p-1].end.row;)p--;h.fromOrientedRange(l[p]),h.index=p,this.selection=a.selection=h;var f=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===f||(r=f),h.toOrientedRange(l[p])}h.detach(),this.selection=a.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=d,s.mergeOverlappingRanges();var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ro&&(o=n.column),ic?e.insert(r,h.stringRepeat(" ",i-c)):e.remove(new u(r.row,r.column,r.row,r.column-i+c)),t.start.column=t.end.column=o,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),l=c.start.row,d=c.end.row,p=l==d;if(p){var f,g=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d0);l<0&&(l=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(l,d);m=this.$reAlignText(m,p),this.session.insert({row:l,column:0},m.join("\n")+"\n"),p||(c.start.column=0,c.end.column=m[m.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){function n(e){return h.stringRepeat(" ",e)}function r(e){return e[2]?n(a)+e[2]+n(s-e[2].length+u)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?n(a+s-e[2].length)+e[2]+n(u," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?n(a)+e[2]+n(u)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var a,s,u,c=!0,l=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,s=t[2].length,u=t[3].length,t):(a+s+u!=t[1].length+t[2].length+t[3].length&&(l=!1),a!=t[1].length&&(c=!1),a>t[1].length&&(a=t[1].length),st[3].length&&(u=t[3].length),t):[e]}).map(t?r:c?l?i:r:o)}}).call(v.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(v.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",l)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",l))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=n||o.length,u=e.getLength(),c=t,l=t;++tc){var h=e.getLine(l).length;return new r(c,s,l,h)}}},this.openingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var u=e.foldWidgets[s.row];return null==u&&(u=e.getFoldWidget(s.row)),"start"==u&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(i.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var i=(e("./lib/oop"),e("./lib/dom"));e("./range").Range,function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var u=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(u+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=u-n.offset+"px";var c=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(c-=t.scrollLeft),s.el.style.left=c+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}.call(r.prototype),t.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}function i(e,t,n){var i=e.getAnnotations().sort(s.comparePoints);if(i.length){var o=r(i,{row:t,column:-1},s.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var a=i[o];if(a&&n){if(a.row===t){do{a=i[o+=n]}while(a&&a.row===t);if(!a)return i.slice()}var u=[];t=a.row;do{u[n<0?"unshift":"push"](a),a=i[o+=n]}while(a&&a.row==t);return u.length&&u}}}var o=e("../line_widgets").LineWidgets,a=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new o(n),n.widgetManager.attach(e));var r=e.getCursorPosition(),s=r.row,u=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0];u?u.destroy():s-=t;var c,l=i(n,s,t);if(l){var d=l[0];r.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,r.row=d.row,c=e.renderer.$gutterLayer.$annotations[r.row]}else{if(u)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);var h={row:r.row,fixedWidth:!0,coverGutter:!0,el:a.createElement("div"),type:"errorMarker"},p=h.el.appendChild(a.createElement("div")),f=h.el.appendChild(a.createElement("div"));f.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(r).left;f.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+c.className,p.innerHTML=c.text.join("
"),p.appendChild(a.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},a.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/dom"),o=e("./lib/event"),a=e("./editor").Editor,s=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.define=n(920),t.edit=function(e){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var r="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;r=s.value,e=i.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(r=i.getInnerText(e),e.innerHTML="");var u=t.createEditSession(r),l=new a(new c(e));l.setSession(u);var d={document:u,editor:l,onResize:l.resize.bind(l,null)};return s&&(d.textarea=s),o.addListener(window,"resize",d.onResize),l.on("destroy",function(){o.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),l.container.env=l.env=d,l},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new u),n},t.EditSession=s,t.UndoManager=u,t.version="1.2.9"}),function(){ace.acequire(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),e.exports=window.ace.acequire("ace/ace")},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1}function k(e,t){var n=this.__data__,r=P(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function x(e){var t=-1,n=null==e?0:e.length;for(this.clear();++tc))return!1;var d=a.get(e);if(d&&a.get(t))return d==t;var h=-1,p=!0,f=n&ye?new O:void 0;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=we}function he(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function pe(e){return null!=e&&"object"==typeof e}function fe(e){return ue(e)?N(e):K(e)}function ge(){return[]}function me(){return!1}var ve=200,_e="__lodash_hash_undefined__",be=1,ye=2,we=9007199254740991,ke="[object Arguments]",xe="[object Array]",Ee="[object AsyncFunction]",Se="[object Boolean]",Ce="[object Date]",Ae="[object Error]",Te="[object Function]",Oe="[object GeneratorFunction]",Fe="[object Map]",je="[object Number]",Le="[object Null]",Re="[object Object]",De="[object Proxy]",Me="[object RegExp]",Ie="[object Set]",Be="[object String]",Ne="[object Symbol]",Pe="[object Undefined]",ze="[object ArrayBuffer]",$e="[object DataView]",We=/[\\^$.*+?()[\]{}|]/g,Ue=/^\[object .+?Constructor\]$/,qe=/^(?:0|[1-9]\d*)$/,He={};He["[object Float32Array]"]=He["[object Float64Array]"]=He["[object Int8Array]"]=He["[object Int16Array]"]=He["[object Int32Array]"]=He["[object Uint8Array]"]=He["[object Uint8ClampedArray]"]=He["[object Uint16Array]"]=He["[object Uint32Array]"]=!0,He[ke]=He[xe]=He[ze]=He[Se]=He[$e]=He[Ce]=He[Ae]=He[Te]=He[Fe]=He[je]=He[Re]=He[Me]=He[Ie]=He[Be]=He["[object WeakMap]"]=!1;var Ve="object"==typeof e&&e&&e.Object===Object&&e,Ke="object"==typeof self&&self&&self.Object===Object&&self,Ge=Ve||Ke||Function("return this")(),Ye="object"==typeof t&&t&&!t.nodeType&&t,Xe=Ye&&"object"==typeof n&&n&&!n.nodeType&&n,Je=Xe&&Xe.exports===Ye,Qe=Je&&Ve.process,Ze=function(){try{return Qe&&Qe.binding&&Qe.binding("util")}catch(e){}}(),et=Ze&&Ze.isTypedArray,tt=Array.prototype,nt=Function.prototype,rt=Object.prototype,it=Ge["__core-js_shared__"],ot=nt.toString,at=rt.hasOwnProperty,st=function(){var e=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ut=rt.toString,ct=RegExp("^"+ot.call(at).replace(We,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lt=Je?Ge.Buffer:void 0,dt=Ge.Symbol,ht=Ge.Uint8Array,pt=rt.propertyIsEnumerable,ft=tt.splice,gt=dt?dt.toStringTag:void 0,mt=Object.getOwnPropertySymbols,vt=lt?lt.isBuffer:void 0,_t=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),bt=Z(Ge,"DataView"),yt=Z(Ge,"Map"),wt=Z(Ge,"Promise"),kt=Z(Ge,"Set"),xt=Z(Ge,"WeakMap"),Et=Z(Object,"create"),St=ae(bt),Ct=ae(yt),At=ae(wt),Tt=ae(kt),Ot=ae(xt),Ft=dt?dt.prototype:void 0,jt=Ft?Ft.valueOf:void 0;d.prototype.clear=h,d.prototype.delete=p,d.prototype.get=f,d.prototype.has=g,d.prototype.set=m,v.prototype.clear=_,v.prototype.delete=b,v.prototype.get=y,v.prototype.has=w,v.prototype.set=k,x.prototype.clear=E,x.prototype.delete=S,x.prototype.get=C,x.prototype.has=A,x.prototype.set=T,O.prototype.add=O.prototype.push=F,O.prototype.has=j,L.prototype.clear=R,L.prototype.delete=D,L.prototype.get=M,L.prototype.has=I,L.prototype.set=B;var Lt=mt?function(e){return null==e?[]:(e=Object(e),r(mt(e),function(t){return pt.call(e,t)}))}:ge,Rt=$;(bt&&Rt(new bt(new ArrayBuffer(1)))!=$e||yt&&Rt(new yt)!=Fe||wt&&"[object Promise]"!=Rt(wt.resolve())||kt&&Rt(new kt)!=Ie||xt&&"[object WeakMap]"!=Rt(new xt))&&(Rt=function(e){var t=$(e),n=t==Re?e.constructor:void 0,r=n?ae(n):"";if(r)switch(r){case St:return $e;case Ct:return Fe;case At:return"[object Promise]";case Tt:return Ie;case Ot:return"[object WeakMap]"}return t});var Dt=W(function(){return arguments}())?W:function(e){return pe(e)&&at.call(e,"callee")&&!pt.call(e,"callee")},Mt=Array.isArray,It=vt||me,Bt=et?function(e){return function(t){return e(t)}}(et):V;n.exports=ce}).call(t,n(59),n(157)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],i=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.editorOptions=r,t.editorEvents=i},function(e,t,n){!function(t,n){e.exports=function(){"use strict";function e(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function t(e){return o(e)?e:O(e)}function n(e){return a(e)?e:F(e)}function r(e){return s(e)?e:j(e)}function i(e){return o(e)&&!u(e)?e:L(e)}function o(e){return!(!e||!e[cn])}function a(e){return!(!e||!e[ln])}function s(e){return!(!e||!e[dn])}function u(e){return a(e)||s(e)}function c(e){return!(!e||!e[hn])}function l(e){return e.value=!1,e}function d(e){e&&(e.value=!0)}function h(){}function p(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?f(e)+t:t}function m(){return!0}function v(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function _(e,t){return y(e,t,0)}function b(e,t){return y(e,t,t)}function y(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function k(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function x(){return{value:void 0,done:!0}}function E(e){return!!A(e)}function S(e){return e&&"function"==typeof e.next}function C(e){var t=A(e);return t&&t.call(e)}function A(e){var t=e&&(kn&&e[kn]||e[xn]);if("function"==typeof t)return t}function T(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?N():o(e)?e.toSeq():$(e)}function F(e){return null===e||void 0===e?N().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():P(e)}function j(e){return null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function L(e){return(null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function R(e){this._array=e,this.size=e.length}function D(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function M(e){this._iterable=e,this.size=e.length||e.size}function I(e){this._iterator=e,this._iteratorCache=[]}function B(e){return!(!e||!e[Sn])}function N(){return Cn||(Cn=new R([]))}function P(e){var t=Array.isArray(e)?new R(e).fromEntrySeq():S(e)?new I(e).fromEntrySeq():E(e)?new M(e).fromEntrySeq():"object"==typeof e?new D(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=W(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function $(e){var t=W(e)||"object"==typeof e&&new D(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function W(e){return T(e)?new R(e):S(e)?new I(e):E(e)?new M(e):void 0}function U(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function q(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new w(function(){var e=i[n?o-a:a];return a++>o?x():k(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function H(e,t){return t?V(t,e,"",{"":e}):K(e)}function V(e,t,n,r){return Array.isArray(t)?e.call(r,n,j(t).map(function(n,r){return V(e,n,r,t)})):G(t)?e.call(r,n,F(t).map(function(n,r){return V(e,n,r,t)})):t}function K(e){return Array.isArray(e)?j(e).map(K).toList():G(e)?F(e).map(K).toMap():e}function G(e){return e&&(e.constructor===Object||void 0===e.constructor)}function Y(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function X(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&Y(i[1],e)&&(n||Y(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var d=!0,h=t.__iterate(function(t,r){if(n?!e.has(t):i?!Y(t,e.get(r,mn)):!Y(e.get(r,mn),t))return d=!1,!1});return d&&e.size===h}function J(e,t){if(!(this instanceof J))return new J(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(An)return An;An=this}}function Q(e,t){if(!e)throw new Error(t)}function Z(e,t,n){if(!(this instanceof Z))return new Z(e,t,n);if(Q(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(!1===e||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null===e||void 0===e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>In?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=Pn[e];return void 0===t&&(t=se(e),Nn===Bn&&(Nn=0,Pn={}),Nn++,Pn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Q(e!==1/0,"Cannot perform this action with an infinite size.")}function de(e){return null===e||void 0===e?ke():he(e)&&!c(e)?e:ke().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function he(e){return!(!e||!e[zn])}function pe(e,t){this.ownerID=e,this.entries=t}function fe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function ge(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function _e(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&ye(e._root)}function be(e,t){return k(e,t[0],t[1])}function ye(e,t){return{node:e,index:0,__prev:t}}function we(e,t,n,r){var i=Object.create($n);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ke(){return Wn||(Wn=we(0))}function xe(e,t,n){var r,i;if(e._root){var o=l(vn),a=l(_n);if(r=Ee(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===mn?-1:1:0)}else{if(n===mn)return e;i=1,r=new pe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?we(i,r):ke()}function Ee(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===mn?e:(d(s),d(a),new ve(t,r,[i,o]))}function Se(e){return e.constructor===ve||e.constructor===me}function Ce(e,t,n,r,i){if(e.keyHash===r)return new me(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&gn,s=(0===n?r:r>>>n)&gn;return new fe(t,1<>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new ge(e,o+1,a)}function Fe(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Ie(e,t,n,r){var i=r?e:p(e);return i[t]=n,i}function Be(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,c=a-n;return c>fn&&(c=fn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=1+(a-i>>r);return l>fn&&(l=fn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-pn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Ye(e,t).set(0,n):Ye(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(_n);return t>=Je(e._capacity)?r=Ve(r,e.__ownerID,0,t,n,o):i=Ve(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ue(e._origin,e._capacity,e._level,i,r):e}function Ve(e,t,n,r,i,o){var a=r>>>n&gn,s=e&&a0){var c=e&&e.array[a],l=Ve(c,t,n-pn,r,i,o);return l===c?e:(u=Ke(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(d(o),u=Ke(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Ke(e,t){return t&&e&&t===e.ownerID?e:new $e(e?e.array.slice():[],t)}function Ge(e,t){if(t>=Je(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&gn],r-=pn;return n}}function Ye(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new h,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new $e(c&&c.array.length?[void 0,c]:[],r),u+=pn,l+=1<=1<d?new $e([],r):f;if(f&&p>d&&apn;v-=pn){var _=d>>>v&gn;m=m.array[_]=Ke(m.array[_],r)}m.array[d>>>pn&gn]=f}if(s=p)a-=p,s-=p,u=pn,c=null,g=g&&g.removeBefore(r,0,a);else if(a>i||p>>u&gn;if(b!==p>>>u&gn)break;b&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&pa&&(a=c.size),o(u)||(c=c.map(function(e){return H(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),Re(e,t,i)}function Je(e){return e>>pn<=fn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ot,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===wn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===yn?bn:yn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,mn);return o===mn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(wn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return k(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ot,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function lt(e,t,n,r){var i=Tt(e);return r&&(i.has=function(r){var i=e.get(r,mn);return i!==mn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,mn);return o!==mn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){if(t.call(n,e,o,u))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(wn,o),s=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return k(i,r?c:s++,l,o)}})},i}function dt(e,t,n){var r=de().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ht(e,t,n){var r=a(e),i=(c(e)?Qe():de()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=At(e);return i.map(function(t){return Et(e,o(t))})}function pt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),v(t,n,i))return e;var o=_(t,i),a=b(n,i);if(o!==o||a!==a)return pt(e.toSeq().cacheResult(),t,n,r);var s,u=a-o;u===u&&(s=u<0?0:u);var c=Tt(e);return c.size=0===s?s:e.size&&s||void 0,!r&&B(e)&&s>=0&&(c.get=function(t,n){return t=g(this,t),t>=0&&ts)return x();var e=i.next();return r||t===yn?e:t===bn?k(t,u-1,void 0,e):k(t,u-1,e.value[1],e)})},c}function ft(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(wn,i),s=!0;return new w(function(){if(!s)return x();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===wn?e:k(r,u,c,e):(s=!1,x())})},r}function gt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(wn,o),u=!0,c=0;return new w(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===yn?e:i===bn?k(i,c++,void 0,e):k(i,c++,e.value[1],e);var d=e.value;o=d[0],l=d[1],u&&(u=t.call(n,l,o,a))}while(u);return i===wn?e:k(i,o,l,e)})},i}function mt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?P(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new R(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function vt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||c0}function xt(e,n,r){var i=Tt(e);return i.size=new R(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(yn,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),C(i?e.reverse():e)}),a=0,s=!1;return new w(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?x():k(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function Et(e,t){return B(e)?t:e.constructor(t)}function St(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ct(e){return le(e.size),f(e)}function At(e){return a(e)?n:s(e)?r:i}function Tt(e){return Object.create((a(e)?F:s(e)?j:L).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Ft(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=c(e),n=a(e),r=t?1:0;return an(e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0}),r)}function an(e,t){return t=Fn(t,3432918353),t=Fn(t<<15|t>>>-15,461845907),t=Fn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Fn(t^t>>>16,2246822507),t=Fn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=c,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",dn="@@__IMMUTABLE_INDEXED__@@",hn="@@__IMMUTABLE_ORDERED__@@",pn=5,fn=1<r?x():k(e,i,n[t?r-i++:i++])})},e(D,F),D.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},D.prototype.has=function(e){return this._object.hasOwnProperty(e)},D.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},D.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[t?i-o:o];return o++>i?x():k(e,a,n[a])})},D.prototype[hn]=!0,e(M,j),M.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=C(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,i++,this););return i},M.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=C(n);if(!S(r))return new w(x);var i=0;return new w(function(){var t=r.next();return t.done?t:k(e,i++,t.value)})},e(I,j),I.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return k(e,i,r[i++])})};var Cn;e(J,j),J.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},J.prototype.get=function(e,t){return this.has(e)?this._value:t},J.prototype.includes=function(e){return Y(this._value,e)},J.prototype.slice=function(e,t){var n=this.size;return v(e,t,n)?this:new J(this._value,b(t,n)-_(e,n))},J.prototype.reverse=function(){return this},J.prototype.indexOf=function(e){return Y(this._value,e)?0:-1},J.prototype.lastIndexOf=function(e){return Y(this._value,e)?this.size:-1},J.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?x():k(e,o++,a)})},Z.prototype.equals=function(e){return e instanceof Z?this._start===e._start&&this._end===e._end&&this._step===e._step:X(this,e)};var Tn;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var On,Fn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},jn=Object.isExtensible,Ln=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Rn="function"==typeof WeakMap;Rn&&(On=new WeakMap);var Dn=0,Mn="__immutablehash__";"function"==typeof Symbol&&(Mn=Symbol(Mn));var In=16,Bn=255,Nn=0,Pn={};e(de,te),de.of=function(){var e=un.call(arguments,0);return ke().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},de.prototype.toString=function(){return this.__toString("Map {","}")},de.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},de.prototype.set=function(e,t){return xe(this,e,t)},de.prototype.setIn=function(e,t){return this.updateIn(e,mn,function(){return t})},de.prototype.remove=function(e){return xe(this,e,mn)},de.prototype.deleteIn=function(e){return this.updateIn(e,function(){return mn})},de.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},de.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=De(this,jt(e),t,n);return r===mn?void 0:r},de.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ke()},de.prototype.merge=function(){return Fe(this,void 0,arguments)},de.prototype.mergeWith=function(e){return Fe(this,e,un.call(arguments,1))},de.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,ke(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},de.prototype.mergeDeep=function(){return Fe(this,je,arguments)},de.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Fe(this,Le(e),t)},de.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,ke(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},de.prototype.sort=function(e){return Qe(yt(this,e))},de.prototype.sortBy=function(e,t){return Qe(yt(this,t,e))},de.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},de.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new h)},de.prototype.asImmutable=function(){return this.__ensureOwner()},de.prototype.wasAltered=function(){return this.__altered},de.prototype.__iterator=function(e,t){return new _e(this,e,t)},de.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},de.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?we(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},de.isMap=he;var zn="@@__IMMUTABLE_MAP__@@",$n=de.prototype;$n[zn]=!0,$n.delete=$n.remove,$n.removeIn=$n.deleteIn,pe.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Un)return Ae(e,u,r,i);var f=e&&e===this.ownerID,g=f?u:p(u);return h?s?c===l-1?g.pop():g[c]=g.pop():g[c]=[r,i]:g.push([r,i]),f?(this.entries=g,this):new pe(e,g)}},fe.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&gn),o=this.bitmap;return 0==(o&i)?r:this.nodes[Me(o&i-1)].get(e+pn,t,n,r)},fe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&gn,u=1<=qn)return Oe(e,h,c,s,f);if(l&&!f&&2===h.length&&Se(h[1^d]))return h[1^d];if(l&&f&&1===h.length&&Se(f))return f;var g=e&&e===this.ownerID,m=l?f?c:c^u:c|u,v=l?f?Ie(h,d,f,g):Ne(h,d,g):Be(h,d,f,g);return g?(this.bitmap=m,this.nodes=v,this):new fe(e,m,v)},ge.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&gn,o=this.nodes[i];return o?o.get(e+pn,t,n,r):r},ge.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&gn,u=i===mn,c=this.nodes,l=c[s];if(u&&!l)return this;var d=Ee(l,e,t+pn,n,r,i,o,a);if(d===l)return this;var h=this.count;if(l){if(!d&&--h=0&&e>>t&gn;if(r>=this.array.length)return new $e([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-pn,n))===a&&o)return this}if(o&&!i)return this;var s=Ke(this,e);if(!o)for(var u=0;u>>t&gn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if((i=o&&o.removeAfter(e,t-pn,n))===o&&r===this.array.length-1)return this}var a=Ke(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Gn,Yn={};e(Qe,de),Qe.of=function(){return this(arguments)},Qe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qe.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Qe.prototype.set=function(e,t){return nt(this,e,t)},Qe.prototype.remove=function(e){return nt(this,e,mn)},Qe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qe.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Qe.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Qe.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Qe.isOrderedMap=Ze,Qe.prototype[hn]=!0,Qe.prototype.delete=Qe.prototype.remove;var Xn;e(rt,F),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ct(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(yn,t),r=t?Ct(this):0;return new w(function(){var i=n.next();return i.done?i:k(e,t?--r:r++,i.value,i)})},rt.prototype[hn]=!0,e(it,j),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(yn,t),r=0;return new w(function(){var t=n.next();return t.done?t:k(e,r++,t.value,t)})},e(ot,L),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(yn,t);return new w(function(){var t=n.next();return t.done?t:k(e,t.value,t.value,t)})},e(at,F),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){St(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(yn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){St(r);var i=o(r);return k(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Ot,e(Lt,te),Lt.prototype.toString=function(){return this.__toString(Dt(this)+" {","}")},Lt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Lt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Lt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Rt(this,ke()))},Lt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Dt(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Rt(this,n)},Lt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Rt(this,t)},Lt.prototype.wasAltered=function(){return this._map.wasAltered()},Lt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Lt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Lt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Rt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Jn=Lt.prototype;Jn.delete=Jn.remove,Jn.deleteIn=Jn.removeIn=$n.removeIn,Jn.merge=$n.merge,Jn.mergeWith=$n.mergeWith,Jn.mergeIn=$n.mergeIn,Jn.mergeDeep=$n.mergeDeep,Jn.mergeDeepWith=$n.mergeDeepWith,Jn.mergeDeepIn=$n.mergeDeepIn,Jn.setIn=$n.setIn,Jn.update=$n.update,Jn.updateIn=$n.updateIn,Jn.withMutations=$n.withMutations,Jn.asMutable=$n.asMutable,Jn.asImmutable=$n.asImmutable,e(Bt,re),Bt.of=function(){return this(arguments)},Bt.fromKeys=function(e){return this(n(e).keySeq())},Bt.prototype.toString=function(){return this.__toString("Set {","}")},Bt.prototype.has=function(e){return this._map.has(e)},Bt.prototype.add=function(e){return Pt(this,this._map.set(e,!0))},Bt.prototype.remove=function(e){return Pt(this,this._map.remove(e))},Bt.prototype.clear=function(){return Pt(this,this._map.clear())},Bt.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gt(e,t)},Vt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gt(t,n)},Vt.prototype.pop=function(){return this.slice(1)},Vt.prototype.unshift=function(){return this.push.apply(this,arguments)},Vt.prototype.unshiftAll=function(e){return this.pushAll(e)},Vt.prototype.shift=function(){return this.pop.apply(this,arguments)},Vt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yt()},Vt.prototype.slice=function(e,t){if(v(e,t,this.size))return this;var n=_(e,this.size);if(b(t,this.size)!==this.size)return ne.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Gt(r,i)},Vt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,k(e,n++,t)}return x()})},Vt.isStack=Kt;var rr="@@__IMMUTABLE_STACK__@@",ir=Vt.prototype;ir[rr]=!0,ir.withMutations=$n.withMutations,ir.asMutable=$n.asMutable,ir.asImmutable=$n.asImmutable,ir.wasAltered=$n.wasAltered;var or;t.Iterator=w,Xt(t,{toArray:function(){le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return de(this.toKeyedSeq())},toObject:function(){le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Qe(this.toKeyedSeq())},toOrderedSet:function(){return Wt(a(this)?this.valueSeq():this)},toSet:function(){return Bt(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vt(a(this)?this.valueSeq():this)},toList:function(){return Pe(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return Et(this,mt(this,un.call(arguments,0)))},includes:function(e){return this.some(function(t){return Y(t,e)})},entries:function(){return this.__iterator(wn)},every:function(e,t){le(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return Et(this,lt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return Et(this,ut(this,e,t))},reduce:function(e,t,n){le(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Et(this,ct(this,!0))},slice:function(e,t){return Et(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return Et(this,yt(this,e))},values:function(){return this.__iterator(yn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return f(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return dt(this,e,t)},equals:function(e){return X(this,e)},entrySeq:function(){var e=this;if(e._cache)return new R(e._cache);var t=e.toSeq().map(Qt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(m)},flatMap:function(e,t){return Et(this,_t(this,e,t))},flatten:function(e){return Et(this,vt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return Y(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=jt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,mn):mn)===mn)return t}return r},groupBy:function(e,t){return ht(this,e,t)},has:function(e){return this.get(e,mn)!==mn},hasIn:function(e){return this.getIn(e,mn)!==mn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return Y(t,e)})},keySeq:function(){return this.toSeq().map(Jt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return wt(this,e)},maxBy:function(e,t){return wt(this,t,e)},min:function(e){return wt(this,e?en(e):rn)},minBy:function(e,t){return wt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Et(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Et(this,gt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return Et(this,yt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Et(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Et(this,ft(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ar=t.prototype;ar[cn]=!0,ar[En]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=tn,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,Xt(n,{flip:function(){return Et(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return Et(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Et(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var sr=n.prototype;return sr[ln]=!0,sr[En]=ar.entries,sr.__toJS=ar.toObject,sr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Xt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return Et(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Et(this,ct(this,!1))},slice:function(e,t){return Et(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=_(e,e<0?this.count():this.size);var r=this.slice(0,e);return Et(this,1===n?r:r.concat(p(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Et(this,vt(this,e,!1))},get:function(e,t){return e=g(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=g(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],o=e;(0,c.focusableBlockIsSelected)(e)&&(o=(0,u.default)(e));var s=o.getCurrentContent(),l=s.createEntity(r,"IMMUTABLE",n),d=l.getLastCreatedEntityKey();if(o=i.AtomicBlockUtils.insertAtomicBlock(o,d," "),!t)return i.EditorState.forceSelection(o,o.getCurrentContent().getSelectionAfter());var h=o.getCurrentContent().getBlockMap().find(function(e){return e.getEntityAt(0)===d});return(0,a.default)(o,h.getKey(),t)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(367),o=n(525),a=r(o),s=n(1187),u=r(s);t.default=function(e,t,n){var r=e.getCurrentContent(),o=r.getBlockForKey(t),s=r.getEntity(o.getEntityAt(0)),c=(0,u.default)(e,n,o.getType(),s.data,s.type),l=(0,a.default)(c,t),d=i.EditorState.push(e,l,"move-block");return i.EditorState.forceSelection(d,l.getSelectionAfter())}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1199),i=n(1215),o=n(932);n.d(t,"convertToHTML",function(){return r.a}),n.d(t,"convertFromHTML",function(){return i.a}),n.d(t,"parseHTML",function(){return o.a})},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.offset&&t+n<=e.offset+e.length?Object.assign({},e,{length:e.length+a}):e.offset>=t&&e.offset+e.length<=t+n&&i>0?Object.assign({},e,{offset:e.offset+i}):e.offsett&&i>0?[Object.assign({},e,{length:t-e.offset}),Object.assign({},e,{offset:t+i,length:e.offset-t+e.length})]:e.offset>=t&&e.offset+e.length>t+n&&t+n>e.offset&&o>0?[Object.assign({},e,{offset:e.offset+i,length:t+n-e.offset}),Object.assign({},e,{offset:t+n+i+o,length:e.offset+e.length-(t+n)})]:e}t.a=r},function(e,t,n){"use strict";function r(e){return c.a.isValidElement(e)&&c.a.Children.count(e.props.children)>0}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(void 0===e||null===e)return e;if("string"==typeof e)return e;if(c.a.isValidElement(e)){if(r(e))return d.a.renderToStaticMarkup(e);var n=Object(h.a)(e);return null!==t&&"object"===Object(o.a)(n)?n.start+t+n.end:n}return s()(Object.prototype.hasOwnProperty.call(e,"start")&&Object.prototype.hasOwnProperty.call(e,"end"),"convertToHTML: received conversion data without either an HTML string, ReactElement or an object with start/end tags"),null!==t?e.start+t+e.end:e}t.a=i;var o=n(930),a=n(152),s=n.n(a),u=n(8),c=n.n(u),l=n(526),d=n.n(l),h=n(528)},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";t.a=function(e,t){return function(){var n=e.apply(void 0,arguments);return void 0!==n&&null!==n?n:t.apply(void 0,arguments)}}},function(e,t,n){"use strict";function r(e){var t;return"undefined"!=typeof DOMParser?null!==(t=(new DOMParser).parseFromString(e,"text/html"))&&null!==t.body||(t=i(e)):t=i(e),t.body}t.a=r;var i=function(e){var t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"Async",function(){return q}),n.d(t,"AsyncCreatable",function(){return Q}),n.d(t,"Creatable",function(){return H}),n.d(t,"Value",function(){return F}),n.d(t,"Option",function(){return O}),n.d(t,"defaultMenuRenderer",function(){return b}),n.d(t,"defaultArrowRenderer",function(){return h}),n.d(t,"defaultClearRenderer",function(){return p}),n.d(t,"defaultFilterOptions",function(){return _});var r=n(934),i=n.n(r),o=n(935),a=n.n(o),s=n(12),u=n.n(s),c=n(8),l=n.n(c),d=n(96),h=(n.n(d),function(e){var t=e.onMouseDown;return l.a.createElement("span",{className:"Select-arrow",onMouseDown:t})});h.propTypes={onMouseDown:u.a.func};var p=function(){return l.a.createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})},f=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],g=function(e){for(var t=0;t-1)return!1;if(r.filterOption)return r.filterOption.call(void 0,e,t);if(!t)return!0;var i=e[r.valueKey],o=e[r.labelKey],a=v(i),s=v(o);if(!a&&!s)return!1;var u=a?String(i):null,c=s?String(o):null;return r.ignoreAccents&&(u&&"label"!==r.matchProp&&(u=g(u)),c&&"value"!==r.matchProp&&(c=g(c))),r.ignoreCase&&(u&&"label"!==r.matchProp&&(u=u.toLowerCase()),c&&"value"!==r.matchProp&&(c=c.toLowerCase())),"start"===r.matchPos?u&&"label"!==r.matchProp&&u.substr(0,t.length)===t||c&&"value"!==r.matchProp&&c.substr(0,t.length)===t:u&&"label"!==r.matchProp&&u.indexOf(t)>=0||c&&"value"!==r.matchProp&&c.indexOf(t)>=0})},b=function(e){var t=e.focusedOption,n=e.focusOption,r=e.inputValue,i=e.instancePrefix,o=e.onFocus,s=e.onOptionRef,u=e.onSelect,c=e.optionClassName,d=e.optionComponent,h=e.optionRenderer,p=e.options,f=e.removeValue,g=e.selectValue,m=e.valueArray,v=e.valueKey,_=d;return p.map(function(e,d){var p=m&&m.some(function(t){return t[v]===e[v]}),b=e===t,y=a()(c,{"Select-option":!0,"is-selected":p,"is-focused":b,"is-disabled":e.disabled});return l.a.createElement(_,{className:y,focusOption:n,inputValue:r,instancePrefix:i,isDisabled:e.disabled,isFocused:b,isSelected:p,key:"option-"+d+"-"+e[v],onFocus:o,onSelect:u,option:e,optionIndex:d,ref:function(e){s(e,b)},removeValue:f,selectValue:g},h(e,d,r))})};b.propTypes={focusOption:u.a.func,focusedOption:u.a.object,inputValue:u.a.string,instancePrefix:u.a.string,onFocus:u.a.func,onOptionRef:u.a.func,onSelect:u.a.func,optionClassName:u.a.string,optionComponent:u.a.func,optionRenderer:u.a.func,options:u.a.array,removeValue:u.a.func,selectValue:u.a.func,valueArray:u.a.array,valueKey:u.a.string};var y=function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)},w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k=(function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,i){var s={key:e,arg:t,resolve:n,reject:i,next:null};a?a=a.next=s:(o=a=s,r(e,t))})}function r(n,o){try{var a=t[n](o),s=a.value;s instanceof e?Promise.resolve(s.value).then(function(e){r("next",e)},function(e){r("throw",e)}):i(a.done?"return":"normal",a.value)}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":o.resolve({value:t,done:!0});break;case"throw":o.reject(t);break;default:o.resolve({value:t,done:!1})}o=o.next,o?r(o.key,o.arg):a=null}var o,a;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),x=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},T=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},O=function(e){function t(e){k(this,t);var n=T(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return C(t,e),x(t,[{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,r=e.optionIndex,i=a()(this.props.className,t.className);return t.disabled?l.a.createElement("div",{className:i,onMouseDown:y,onClick:y},this.props.children):l.a.createElement("div",{className:i,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+r,title:t.title},this.props.children)}}]),t}(l.a.Component);O.propTypes={children:u.a.node,className:u.a.string,instancePrefix:u.a.string.isRequired,isDisabled:u.a.bool,isFocused:u.a.bool,isSelected:u.a.bool,onFocus:u.a.func,onSelect:u.a.func,onUnfocus:u.a.func,option:u.a.object.isRequired,optionIndex:u.a.number};var F=function(e){function t(e){k(this,t);var n=T(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return C(t,e),x(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return l.a.createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){return this.props.onClick||this.props.value.href?l.a.createElement("a",{className:"Select-value-label",href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):l.a.createElement("span",{className:"Select-value-label",role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return l.a.createElement("div",{className:a()("Select-value",this.props.value.disabled?"Select-value-disabled":"",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(l.a.Component);F.propTypes={children:u.a.node,disabled:u.a.bool,id:u.a.string,onClick:u.a.func,onRemove:u.a.func,value:u.a.object.isRequired};/*! +webpackJsonp([0],Array(358).concat([ +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(8); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(12); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _redux = __webpack_require__(25); + +var _reactRedux = __webpack_require__(35); + +var _reactSelect = __webpack_require__(936); + +__webpack_require__(939); + +var _jsBeautify = __webpack_require__(940); + +var _lodashEs = __webpack_require__(942); + +var _draftJs = __webpack_require__(370); + +var _apiActions = __webpack_require__(26); + +var apiActions = _interopRequireWildcard(_apiActions); + +var _userActions = __webpack_require__(36); + +var userActions = _interopRequireWildcard(_userActions); + +var _api = __webpack_require__(62); + +var _PreviewContainer = __webpack_require__(1170); + +var _PreviewContainer2 = _interopRequireDefault(_PreviewContainer); + +var _AuthorSelectOption = __webpack_require__(1171); + +var _AuthorSelectOption2 = _interopRequireDefault(_AuthorSelectOption); + +var _HTMLInput = __webpack_require__(921); + +var _HTMLInput2 = _interopRequireDefault(_HTMLInput); + +var _index = __webpack_require__(1182); + +var _index2 = _interopRequireDefault(_index); + +var _utils = __webpack_require__(389); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable no-return-assign */ +/* eslint-disable react/prop-types */ + +var EditorContainer = function (_Component) { + _inherits(EditorContainer, _Component); + + function EditorContainer(props) { + _classCallCheck(this, EditorContainer); + + var _this = _possibleConstructorReturn(this, (EditorContainer.__proto__ || Object.getPrototypeOf(EditorContainer)).call(this, props)); + + var initialEditorState = void 0; + var initialAuthors = void 0; + + if (props.entry) { + initialEditorState = _draftJs.EditorState.createWithContent((0, _index.convertFromHTML)(props.entry.content, { + setReadOnly: _this.setReadOnly.bind(_this), + handleImageUpload: _this.handleImageUpload.bind(_this), + defaultImageSize: props.config.default_image_size + }), _index.decorators); + initialAuthors = props.entry.authors; + } else { + initialEditorState = _draftJs.EditorState.createEmpty(_index.decorators); + initialAuthors = [props.config.current_user]; + } + + _this.state = { + editorState: initialEditorState, + suggestions: [], + authors: initialAuthors, + mode: 'editor', + readOnly: false, + rawText: props.entry ? props.entry.content : '' + }; + + _this.onChange = function (editorState) { + return _this.setState({ + editorState: editorState, + rawText: (0, _jsBeautify.html)((0, _index.convertToHTML)(editorState.getCurrentContent())) + }); + }; + + _this.getUsers = (0, _lodashEs.debounce)(_this.getUsers.bind(_this), props.config.author_list_debounce_time); + return _this; + } + + _createClass(EditorContainer, [{ + key: 'setReadOnly', + value: function setReadOnly(state) { + this.setState({ + readOnly: state + }); + } + }, { + key: 'getContent', + value: function getContent() { + var editorState = this.state.editorState; + + return (0, _index.convertToHTML)(editorState.getCurrentContent()); + } + }, { + key: 'syncRawTextToEditorState', + value: function syncRawTextToEditorState() { + this.setState({ + editorState: _draftJs.EditorState.createWithContent((0, _index.convertFromHTML)(this.state.rawText, { + setReadOnly: this.setReadOnly.bind(this), + handleImageUpload: this.handleImageUpload.bind(this), + defaultImageSize: this.props.config.default_image_size + }), _index.decorators) + }); + } + }, { + key: 'publish', + value: function publish() { + var _props = this.props, + updateEntry = _props.updateEntry, + entry = _props.entry, + entryEditClose = _props.entryEditClose, + createEntry = _props.createEntry, + isEditing = _props.isEditing; + var _state = this.state, + editorState = _state.editorState, + authors = _state.authors; + + var content = this.getContent(); + var authorIds = authors.map(function (author) { + return author.id; + }); + var author = authorIds.length > 0 ? authorIds[0] : false; + var contributors = authorIds.length > 1 ? authorIds.slice(1, authorIds.length) : false; + var htmlregex = /<(img|picture|video|audio|canvas|svg|iframe|embed) ?.*>/; + + // We don't want an editor publishing empty entries + // So we must check if there is any text within the editor + // If we fail to find text then we should check for a valid + // list of html elements, mainly visual for example images. + if (!editorState.getCurrentContent().getPlainText().trim()) { + if (htmlregex.exec((0, _index.convertToHTML)(editorState.getCurrentContent())) === null) { + return; + } + } + + if (isEditing) { + updateEntry({ + id: entry.id, + content: content, + author: author, + contributors: contributors + }); + entryEditClose(entry.id); + return; + } + + createEntry({ + content: content, + author: author, + contributors: contributors + }); + + var newEditorState = _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromText('')); + + this.onChange(newEditorState); + this.setState({ readOnly: false }); + } + }, { + key: 'onSelectAuthorChange', + value: function onSelectAuthorChange(value) { + this.setState({ + authors: value + }); + } + }, { + key: 'getUsers', + value: function getUsers(text, callback) { + var config = this.props.config; + + (0, _api.getAuthors)(text, config).timeout(10000).map(function (res) { + return res.response; + }).subscribe(function (res) { + return callback(null, { + options: res, + complete: false + }); + }); + } + }, { + key: 'getAuthors', + value: function getAuthors(text) { + var _this2 = this; + + var config = this.props.config; + + (0, _api.getAuthors)(text, config).timeout(10000).map(function (res) { + return res.response; + }).subscribe(function (res) { + return _this2.setState({ + suggestions: res.map(function (author) { + return author; + }) + }); + }); + } + }, { + key: 'getHashtags', + value: function getHashtags(text) { + var _this3 = this; + + var config = this.props.config; + + (0, _api.getHashtags)(text, config).timeout(10000).map(function (res) { + return res.response; + }).subscribe(function (res) { + return _this3.setState({ + suggestions: res.map(function (hashtag) { + return hashtag; + }) + }); + }); + } + }, { + key: 'filterCommandSuggestions', + value: function filterCommandSuggestions(suggestions, filter) { + this.setState({ + suggestions: suggestions.filter(function (item) { + return item.substring(0, filter.length) === filter; + }) + }); + } + }, { + key: 'filterEmojiSuggestions', + value: function filterEmojiSuggestions(suggestions, filter) { + this.setState({ + suggestions: suggestions.filter(function (item) { + return item.key.toString().substring(0, filter.length) === filter; + }) + }); + } + }, { + key: 'handleOnSearch', + value: function handleOnSearch(trigger, text) { + var config = this.props.config; + + + switch (trigger) { + case '@': + this.getAuthors(text); + break; + case '#': + this.getHashtags(text); + break; + case '/': + this.filterCommandSuggestions(config.autocomplete[0].data, text); + break; + case ':': + this.filterEmojiSuggestions(config.autocomplete[1].data, text); + break; + default: + this.setState({ suggestions: [] }); + break; + } + } + }, { + key: 'handleImageUpload', + value: function handleImageUpload(file) { + var config = this.props.config; + + + var formData = new FormData(); + formData.append('name', file.name); + formData.append('action', 'upload-attachment'); + formData.append('_wpnonce', config.image_nonce); + formData.append('async-upload', file); + + return new Promise(function (resolve) { + (0, _api.uploadImage)(formData).timeout(60000).map(function (res) { + return res.response; + }).subscribe(function (res) { + var src = (0, _utils.getImageSize)(res.data.sizes, config.default_image_size); + resolve(src); + }); + }); + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _state2 = this.state, + editorState = _state2.editorState, + suggestions = _state2.suggestions, + mode = _state2.mode, + authors = _state2.authors, + readOnly = _state2.readOnly; + var _props2 = this.props, + isEditing = _props2.isEditing, + config = _props2.config; + + + return _react2.default.createElement( + 'div', + { className: 'liveblog-editor-container' }, + !isEditing && _react2.default.createElement( + 'h1', + { className: 'liveblog-editor-title' }, + 'Add New Entry' + ), + _react2.default.createElement( + 'div', + { className: 'liveblog-editor-tabs' }, + _react2.default.createElement( + 'button', + { + className: 'liveblog-editor-tab ' + (mode === 'editor' ? 'is-active' : ''), + onClick: function onClick() { + return _this4.setState({ mode: 'editor' }); + } + }, + 'Visual' + ), + _react2.default.createElement( + 'button', + { + className: 'liveblog-editor-tab ' + (mode === 'raw' ? 'is-active' : ''), + onClick: function onClick() { + return _this4.setState({ mode: 'raw' }); + } + }, + 'Text' + ), + _react2.default.createElement( + 'button', + { + className: 'liveblog-editor-tab ' + (mode === 'preview' ? 'is-active' : ''), + onClick: function onClick() { + return _this4.setState({ mode: 'preview' }); + } + }, + 'Preview' + ) + ), + mode === 'preview' && _react2.default.createElement(_PreviewContainer2.default, { + config: config, + getEntryContent: function getEntryContent() { + return _this4.getContent(); + } + }), + mode === 'editor' && _react2.default.createElement(_index2.default, { + editorState: editorState, + onChange: this.onChange, + suggestions: suggestions, + resetSuggestions: function resetSuggestions() { + return _this4.setState({ suggestions: [] }); + }, + onSearch: function onSearch(trigger, text) { + return _this4.handleOnSearch(trigger, text); + }, + autocompleteConfig: config.autocomplete, + handleImageUpload: this.handleImageUpload.bind(this), + readOnly: readOnly, + setReadOnly: this.setReadOnly.bind(this), + defaultImageSize: config.default_image_size + }), + mode === 'raw' && _react2.default.createElement(_HTMLInput2.default, { + value: this.state.rawText, + onChange: function onChange(text) { + _this4.setState({ rawText: text }, function () { + _this4.syncRawTextToEditorState(); + }); + }, + height: '275px', + width: '100%' + }), + _react2.default.createElement( + 'h2', + { className: 'liveblog-editor-subTitle' }, + 'Authors:' + ), + _react2.default.createElement(_reactSelect.Async, { + multi: true, + value: authors, + valueKey: 'key', + labelKey: 'name', + onChange: this.onSelectAuthorChange.bind(this), + optionComponent: _AuthorSelectOption2.default, + loadOptions: this.getUsers, + clearable: false, + cache: false + }), + _react2.default.createElement( + 'button', + { className: 'liveblog-btn liveblog-publish-btn', onClick: this.publish.bind(this) }, + isEditing ? 'Publish Update' : 'Publish New Entry' + ) + ); + } + }]); + + return EditorContainer; +}(_react.Component); + +EditorContainer.propTypes = { + config: _propTypes2.default.object, + updateEntry: _propTypes2.default.func, + entry: _propTypes2.default.object, + entryEditClose: _propTypes2.default.func, + createEntry: _propTypes2.default.func, + isEditing: _propTypes2.default.bool, + authors: _propTypes2.default.array, + getAuthors: _propTypes2.default.func +}; + +var mapStateToProps = function mapStateToProps(state) { + return state; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return (0, _redux.bindActionCreators)(_extends({}, apiActions, userActions), dispatch); +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(EditorContainer); + +/***/ }), +/* 359 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(855); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(859); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(371); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(492); + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; + } + if (typeof value == 'object') { + return Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */])(value[0], value[1]) + : Object(__WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */])(value); + } + return Object(__WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); + + +/***/ }), +/* 360 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/* harmony default export */ __webpack_exports__["a"] = (isArray); + + +/***/ }), +/* 361 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(371); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(842); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(538); + + + + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return Object(__WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */])(func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseRest); + + +/***/ }), +/* 362 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toFinite_js__ = __webpack_require__(416); + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = Object(__WEBPACK_IMPORTED_MODULE_0__toFinite_js__["a" /* default */])(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (toInteger); + + +/***/ }), +/* 363 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(390); + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : Object(__WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (toString); + + +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +(function (global, factory) { + true ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.Immutable = factory(); +}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice; + + function createClass(ctor, superClass) { + if (superClass) { + ctor.prototype = Object.create(superClass.prototype); + } + ctor.prototype.constructor = ctor; + } + + function Iterable(value) { + return isIterable(value) ? value : Seq(value); + } + + + createClass(KeyedIterable, Iterable); + function KeyedIterable(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + + + createClass(IndexedIterable, Iterable); + function IndexedIterable(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + + + createClass(SetIterable, Iterable); + function SetIterable(value) { + return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); + } + + + + function isIterable(maybeIterable) { + return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]); + } + + function isKeyed(maybeKeyed) { + return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]); + } + + function isIndexed(maybeIndexed) { + return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]); + } + + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + + function isOrdered(maybeOrdered) { + return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]); + } + + Iterable.isIterable = isIterable; + Iterable.isKeyed = isKeyed; + Iterable.isIndexed = isIndexed; + Iterable.isAssociative = isAssociative; + Iterable.isOrdered = isOrdered; + + Iterable.Keyed = KeyedIterable; + Iterable.Indexed = IndexedIterable; + Iterable.Set = SetIterable; + + + var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + // Used for setting prototype methods that IE8 chokes on. + var DELETE = 'delete'; + + // Constants describing the size of trie nodes. + var SHIFT = 5; // Resulted in best performance after ______? + var SIZE = 1 << SHIFT; + var MASK = SIZE - 1; + + // A consistent shared value representing "not set" which equals nothing other + // than itself, and nothing that could be provided externally. + var NOT_SET = {}; + + // Boolean references, Rough equivalent of `bool &`. + var CHANGE_LENGTH = { value: false }; + var DID_ALTER = { value: false }; + + function MakeRef(ref) { + ref.value = false; + return ref; + } + + function SetRef(ref) { + ref && (ref.value = true); + } + + // A function which returns a value representing an "owner" for transient writes + // to tries. The return value will only ever equal itself, and will not equal + // the return of any subsequent call of this function. + function OwnerID() {} + + // http://jsperf.com/copy-array-inline + function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; + } + + function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; + } + + function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + + function returnTrue() { + return true; + } + + function wholeSlice(begin, end, size) { + return (begin === 0 || (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)); + } + + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + + function resolveIndex(index, size, defaultIndex) { + return index === undefined ? + defaultIndex : + index < 0 ? + Math.max(0, size + index) : + size === undefined ? + index : + Math.min(size, index); + } + + /* global Symbol */ + + var ITERATE_KEYS = 0; + var ITERATE_VALUES = 1; + var ITERATE_ENTRIES = 2; + + var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + + + function Iterator(next) { + this.next = next; + } + + Iterator.prototype.toString = function() { + return '[Iterator]'; + }; + + + Iterator.KEYS = ITERATE_KEYS; + Iterator.VALUES = ITERATE_VALUES; + Iterator.ENTRIES = ITERATE_ENTRIES; + + Iterator.prototype.inspect = + Iterator.prototype.toSource = function () { return this.toString(); } + Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; + }; + + + function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult ? (iteratorResult.value = value) : (iteratorResult = { + value: value, done: false + }); + return iteratorResult; + } + + function iteratorDone() { + return { value: undefined, done: true }; + } + + function hasIterator(maybeIterable) { + return !!getIteratorFn(maybeIterable); + } + + function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; + } + + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + + function getIteratorFn(iterable) { + var iteratorFn = iterable && ( + (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || + iterable[FAUX_ITERATOR_SYMBOL] + ); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + function isArrayLike(value) { + return value && typeof value.length === 'number'; + } + + createClass(Seq, Iterable); + function Seq(value) { + return value === null || value === undefined ? emptySequence() : + isIterable(value) ? value.toSeq() : seqFromValue(value); + } + + Seq.of = function(/*...values*/) { + return Seq(arguments); + }; + + Seq.prototype.toSeq = function() { + return this; + }; + + Seq.prototype.toString = function() { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function() { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function(fn, reverse) { + return seqIterate(this, fn, reverse, true); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function(type, reverse) { + return seqIterator(this, type, reverse, true); + }; + + + + createClass(KeyedSeq, Seq); + function KeyedSeq(value) { + return value === null || value === undefined ? + emptySequence().toKeyedSeq() : + isIterable(value) ? + (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : + keyedSeqFromValue(value); + } + + KeyedSeq.prototype.toKeyedSeq = function() { + return this; + }; + + + + createClass(IndexedSeq, Seq); + function IndexedSeq(value) { + return value === null || value === undefined ? emptySequence() : + !isIterable(value) ? indexedSeqFromValue(value) : + isKeyed(value) ? value.entrySeq() : value.toIndexedSeq(); + } + + IndexedSeq.of = function(/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function() { + return this; + }; + + IndexedSeq.prototype.toString = function() { + return this.__toString('Seq [', ']'); + }; + + IndexedSeq.prototype.__iterate = function(fn, reverse) { + return seqIterate(this, fn, reverse, false); + }; + + IndexedSeq.prototype.__iterator = function(type, reverse) { + return seqIterator(this, type, reverse, false); + }; + + + + createClass(SetSeq, Seq); + function SetSeq(value) { + return ( + value === null || value === undefined ? emptySequence() : + !isIterable(value) ? indexedSeqFromValue(value) : + isKeyed(value) ? value.entrySeq() : value + ).toSetSeq(); + } + + SetSeq.of = function(/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function() { + return this; + }; + + + + Seq.isSeq = isSeq; + Seq.Keyed = KeyedSeq; + Seq.Set = SetSeq; + Seq.Indexed = IndexedSeq; + + var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; + + Seq.prototype[IS_SEQ_SENTINEL] = true; + + + + createClass(ArraySeq, IndexedSeq); + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + ArraySeq.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function(fn, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ArraySeq.prototype.__iterator = function(type, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + var ii = 0; + return new Iterator(function() + {return ii > maxIndex ? + iteratorDone() : + iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])} + ); + }; + + + + createClass(ObjectSeq, KeyedSeq); + function ObjectSeq(object) { + var keys = Object.keys(object); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + ObjectSeq.prototype.get = function(key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function(key) { + return this._object.hasOwnProperty(key); + }; + + ObjectSeq.prototype.__iterate = function(fn, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var key = keys[reverse ? maxIndex - ii : ii]; + if (fn(object[key], key, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ObjectSeq.prototype.__iterator = function(type, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + var ii = 0; + return new Iterator(function() { + var key = keys[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? + iteratorDone() : + iteratorValue(type, key, object[key]); + }); + }; + + ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true; + + + createClass(IterableSeq, IndexedSeq); + function IterableSeq(iterable) { + this._iterable = iterable; + this.size = iterable.length || iterable.size; + } + + IterableSeq.prototype.__iterateUncached = function(fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + IterableSeq.prototype.__iteratorUncached = function(type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + + + createClass(IteratorSeq, IndexedSeq); + function IteratorSeq(iterator) { + this._iterator = iterator; + this._iteratorCache = []; + } + + IteratorSeq.prototype.__iterateUncached = function(fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + while (iterations < cache.length) { + if (fn(cache[iterations], iterations++, this) === false) { + return iterations; + } + } + var step; + while (!(step = iterator.next()).done) { + var val = step.value; + cache[iterations] = val; + if (fn(val, iterations++, this) === false) { + break; + } + } + return iterations; + }; + + IteratorSeq.prototype.__iteratorUncached = function(type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + return new Iterator(function() { + if (iterations >= cache.length) { + var step = iterator.next(); + if (step.done) { + return step; + } + cache[iterations] = step.value; + } + return iteratorValue(type, iterations, cache[iterations++]); + }); + }; + + + + + // # pragma Helper functions + + function isSeq(maybeSeq) { + return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]); + } + + var EMPTY_SEQ; + + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + + function keyedSeqFromValue(value) { + var seq = + Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : + isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : + hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : + typeof value === 'object' ? new ObjectSeq(value) : + undefined; + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of [k, v] entries, '+ + 'or keyed object: ' + value + ); + } + return seq; + } + + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of values: ' + value + ); + } + return seq; + } + + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value) || + (typeof value === 'object' && new ObjectSeq(value)); + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of values, or keyed object: ' + value + ); + } + return seq; + } + + function maybeIndexedSeqFromValue(value) { + return ( + isArrayLike(value) ? new ArraySeq(value) : + isIterator(value) ? new IteratorSeq(value) : + hasIterator(value) ? new IterableSeq(value) : + undefined + ); + } + + function seqIterate(seq, fn, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var entry = cache[reverse ? maxIndex - ii : ii]; + if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) { + return ii + 1; + } + } + return ii; + } + return seq.__iterateUncached(fn, reverse); + } + + function seqIterator(seq, type, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + var ii = 0; + return new Iterator(function() { + var entry = cache[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? + iteratorDone() : + iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); + }); + } + return seq.__iteratorUncached(type, reverse); + } + + function fromJS(json, converter) { + return converter ? + fromJSWith(converter, json, '', {'': json}) : + fromJSDefault(json); + } + + function fromJSWith(converter, json, key, parentJSON) { + if (Array.isArray(json)) { + return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); + } + if (isPlainObj(json)) { + return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); + } + return json; + } + + function fromJSDefault(json) { + if (Array.isArray(json)) { + return IndexedSeq(json).map(fromJSDefault).toList(); + } + if (isPlainObj(json)) { + return KeyedSeq(json).map(fromJSDefault).toMap(); + } + return json; + } + + function isPlainObj(value) { + return value && (value.constructor === Object || value.constructor === undefined); + } + + /** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if the it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections implement `equals` and `hashCode`. + * + */ + function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if (typeof valueA.valueOf === 'function' && + typeof valueB.valueOf === 'function') { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + if (typeof valueA.equals === 'function' && + typeof valueB.equals === 'function' && + valueA.equals(valueB)) { + return true; + } + return false; + } + + function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isIterable(b) || + a.size !== undefined && b.size !== undefined && a.size !== b.size || + a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return b.every(function(v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done; + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function(v, k) { + if (notAssociative ? !a.has(v) : + flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; + } + + createClass(Repeat, IndexedSeq); + + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + Repeat.prototype.toString = function() { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function(searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function(begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) ? this : + new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); + }; + + Repeat.prototype.reverse = function() { + return this; + }; + + Repeat.prototype.indexOf = function(searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function(searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function(fn, reverse) { + for (var ii = 0; ii < this.size; ii++) { + if (fn(this._value, ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this; + var ii = 0; + return new Iterator(function() + {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()} + ); + }; + + Repeat.prototype.equals = function(other) { + return other instanceof Repeat ? + is(this._value, other._value) : + deepEqual(other); + }; + + + var EMPTY_REPEAT; + + function invariant(condition, error) { + if (!condition) throw new Error(error); + } + + createClass(Range, IndexedSeq); + + function Range(start, end, step) { + if (!(this instanceof Range)) { + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + Range.prototype.toString = function() { + if (this.size === 0) { + return 'Range []'; + } + return 'Range [ ' + + this._start + '...' + this._end + + (this._step > 1 ? ' by ' + this._step : '') + + ' ]'; + }; + + Range.prototype.get = function(index, notSetValue) { + return this.has(index) ? + this._start + wrapIndex(this, index) * this._step : + notSetValue; + }; + + Range.prototype.includes = function(searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return possibleIndex >= 0 && + possibleIndex < this.size && + possibleIndex === Math.floor(possibleIndex); + }; + + Range.prototype.slice = function(begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range(this.get(begin, this._end), this.get(end, this._end), this._step); + }; + + Range.prototype.indexOf = function(searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function(searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function(fn, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(value, ii, this) === false) { + return ii + 1; + } + value += reverse ? -step : step; + } + return ii; + }; + + Range.prototype.__iterator = function(type, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + var ii = 0; + return new Iterator(function() { + var v = value; + value += reverse ? -step : step; + return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); + }); + }; + + Range.prototype.equals = function(other) { + return other instanceof Range ? + this._start === other._start && + this._end === other._end && + this._step === other._step : + deepEqual(this, other); + }; + + + var EMPTY_RANGE; + + createClass(Collection, Iterable); + function Collection() { + throw TypeError('Abstract'); + } + + + createClass(KeyedCollection, Collection);function KeyedCollection() {} + + createClass(IndexedCollection, Collection);function IndexedCollection() {} + + createClass(SetCollection, Collection);function SetCollection() {} + + + Collection.Keyed = KeyedCollection; + Collection.Indexed = IndexedCollection; + Collection.Set = SetCollection; + + var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? + Math.imul : + function imul(a, b) { + a = a | 0; // int + b = b | 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int + }; + + // v8 has an optimization for storing 31-bit signed numbers. + // Values which have either 00 or 11 as the high order bits qualify. + // This function drops the highest order bit in a signed number, maintaining + // the sign bit. + function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF); + } + + function hash(o) { + if (o === false || o === null || o === undefined) { + return 0; + } + if (typeof o.valueOf === 'function') { + o = o.valueOf(); + if (o === false || o === null || o === undefined) { + return 0; + } + } + if (o === true) { + return 1; + } + var type = typeof o; + if (type === 'number') { + var h = o | 0; + if (h !== o) { + h ^= o * 0xFFFFFFFF; + } + while (o > 0xFFFFFFFF) { + o /= 0xFFFFFFFF; + h ^= o; + } + return smi(h); + } + if (type === 'string') { + return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); + } + if (typeof o.hashCode === 'function') { + return o.hashCode(); + } + if (type === 'object') { + return hashJSObj(o); + } + if (typeof o.toString === 'function') { + return hashString(o.toString()); + } + throw new Error('Value type ' + type + ' cannot be hashed.'); + } + + function cachedHashString(string) { + var hash = stringHashCache[string]; + if (hash === undefined) { + hash = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hash; + } + return hash; + } + + // http://jsperf.com/hashing-strings + function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hash = 0; + for (var ii = 0; ii < string.length; ii++) { + hash = 31 * hash + string.charCodeAt(ii) | 0; + } + return smi(hash); + } + + function hashJSObj(obj) { + var hash; + if (usingWeakMap) { + hash = weakMap.get(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = obj[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + if (!canDefineProperty) { + hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + hash = getIENodeHash(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = ++objHashUID; + if (objHashUID & 0x40000000) { + objHashUID = 0; + } + + if (usingWeakMap) { + weakMap.set(obj, hash); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + 'enumerable': false, + 'configurable': false, + 'writable': false, + 'value': hash + }); + } else if (obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function() { + return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hash; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hash; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hash; + } + + // Get references to ES5 object methods. + var isExtensible = Object.isExtensible; + + // True if Object.defineProperty works as expected. IE8 fails this test. + var canDefineProperty = (function() { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } + }()); + + // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it + // and avoid memory leaks from the IE cloneNode bug. + function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } + } + + // If possible, use a WeakMap. + var usingWeakMap = typeof WeakMap === 'function'; + var weakMap; + if (usingWeakMap) { + weakMap = new WeakMap(); + } + + var objHashUID = 0; + + var UID_HASH_KEY = '__immutablehash__'; + if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); + } + + var STRING_HASH_CACHE_MIN_STRLEN = 16; + var STRING_HASH_CACHE_MAX_SIZE = 255; + var STRING_HASH_CACHE_SIZE = 0; + var stringHashCache = {}; + + function assertNotInfinite(size) { + invariant( + size !== Infinity, + 'Cannot perform this action with an infinite size.' + ); + } + + createClass(Map, KeyedCollection); + + // @pragma Construction + + function Map(value) { + return value === null || value === undefined ? emptyMap() : + isMap(value) && !isOrdered(value) ? value : + emptyMap().withMutations(function(map ) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v, k) {return map.set(k, v)}); + }); + } + + Map.prototype.toString = function() { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function(k, notSetValue) { + return this._root ? + this._root.get(0, undefined, k, notSetValue) : + notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function(k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.setIn = function(keyPath, v) { + return this.updateIn(keyPath, NOT_SET, function() {return v}); + }; + + Map.prototype.remove = function(k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteIn = function(keyPath) { + return this.updateIn(keyPath, function() {return NOT_SET}); + }; + + Map.prototype.update = function(k, notSetValue, updater) { + return arguments.length === 1 ? + k(this) : + this.updateIn([k], notSetValue, updater); + }; + + Map.prototype.updateIn = function(keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeepMap( + this, + forceIterator(keyPath), + notSetValue, + updater + ); + return updatedValue === NOT_SET ? undefined : updatedValue; + }; + + Map.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.merge = function(/*...iters*/) { + return mergeIntoMapWith(this, undefined, arguments); + }; + + Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, merger, iters); + }; + + Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); + return this.updateIn( + keyPath, + emptyMap(), + function(m ) {return typeof m.merge === 'function' ? + m.merge.apply(m, iters) : + iters[iters.length - 1]} + ); + }; + + Map.prototype.mergeDeep = function(/*...iters*/) { + return mergeIntoMapWith(this, deepMerger, arguments); + }; + + Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, deepMergerWith(merger), iters); + }; + + Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); + return this.updateIn( + keyPath, + emptyMap(), + function(m ) {return typeof m.mergeDeep === 'function' ? + m.mergeDeep.apply(m, iters) : + iters[iters.length - 1]} + ); + }; + + Map.prototype.sort = function(comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function(mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + // @pragma Mutability + + Map.prototype.withMutations = function(fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + }; + + Map.prototype.asMutable = function() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + }; + + Map.prototype.asImmutable = function() { + return this.__ensureOwner(); + }; + + Map.prototype.wasAltered = function() { + return this.__altered; + }; + + Map.prototype.__iterator = function(type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function(fn, reverse) {var this$0 = this; + var iterations = 0; + this._root && this._root.iterate(function(entry ) { + iterations++; + return fn(entry[1], entry[0], this$0); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + + function isMap(maybeMap) { + return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]); + } + + Map.isMap = isMap; + + var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'; + + var MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SENTINEL] = true; + MapPrototype[DELETE] = MapPrototype.remove; + MapPrototype.removeIn = MapPrototype.deleteIn; + + + // #pragma Trie Nodes + + + + function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; + } + + ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); + }; + + + + + function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; + } + + BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK)); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 ? notSetValue : + this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue); + }; + + BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit; + var newNodes = exists ? newNode ? + setIn(nodes, idx, newNode, isEditable) : + spliceOut(nodes, idx, isEditable) : + spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }; + + + + + function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; + } + + HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; + }; + + HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); + }; + + + + + function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; + } + + HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); + }; + + + + + function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; + } + + ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }; + + ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); + }; + + + + // #pragma Iterators + + ArrayMapNode.prototype.iterate = + HashCollisionNode.prototype.iterate = function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + } + + BitmapIndexedNode.prototype.iterate = + HashArrayMapNode.prototype.iterate = function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + } + + ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); + } + + createClass(MapIterator, Iterator); + + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + MapIterator.prototype.next = function() { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex; + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev + }; + } + + function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_MAP; + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + + function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(CHANGE_LENGTH); + var didAlter = MakeRef(DID_ALTER); + newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + + function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter); + } + + function isLeafNode(node) { + return node.constructor === ValueNode || node.constructor === HashCollisionNode; + } + + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = idx1 === idx2 ? + [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : + ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); + } + + function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; + } + + function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + + function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + + function mergeIntoMapWith(map, merger, iterables) { + var iters = []; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = KeyedIterable(value); + if (!isIterable(value)) { + iter = iter.map(function(v ) {return fromJS(v)}); + } + iters.push(iter); + } + return mergeIntoCollectionWith(map, merger, iters); + } + + function deepMerger(existing, value, key) { + return existing && existing.mergeDeep && isIterable(value) ? + existing.mergeDeep(value) : + is(existing, value) ? existing : value; + } + + function deepMergerWith(merger) { + return function(existing, value, key) { + if (existing && existing.mergeDeepWith && isIterable(value)) { + return existing.mergeDeepWith(merger, value); + } + var nextValue = merger(existing, value, key); + return is(existing, nextValue) ? existing : nextValue; + }; + } + + function mergeIntoCollectionWith(collection, merger, iters) { + iters = iters.filter(function(x ) {return x.size !== 0}); + if (iters.length === 0) { + return collection; + } + if (collection.size === 0 && !collection.__ownerID && iters.length === 1) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function(collection ) { + var mergeIntoMap = merger ? + function(value, key) { + collection.update(key, NOT_SET, function(existing ) + {return existing === NOT_SET ? value : merger(existing, value, key)} + ); + } : + function(value, key) { + collection.set(key, value); + } + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoMap); + } + }); + } + + function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { + var isNotSet = existing === NOT_SET; + var step = keyPathIter.next(); + if (step.done) { + var existingValue = isNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + invariant( + isNotSet || (existing && existing.set), + 'invalid keyPath' + ); + var key = step.value; + var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET); + var nextUpdated = updateInDeepMap( + nextExisting, + keyPathIter, + notSetValue, + updater + ); + return nextUpdated === nextExisting ? existing : + nextUpdated === NOT_SET ? existing.remove(key) : + (isNotSet ? emptyMap() : existing).set(key, nextUpdated); + } + + function popCount(x) { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x = x + (x >> 8); + x = x + (x >> 16); + return x & 0x7f; + } + + function setIn(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; + } + + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; + } + + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; + } + + var MAX_ARRAY_MAP_SIZE = SIZE / 4; + var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; + var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + + createClass(List, IndexedCollection); + + // @pragma Construction + + function List(value) { + var empty = emptyList(); + if (value === null || value === undefined) { + return empty; + } + if (isList(value)) { + return value; + } + var iter = IndexedIterable(value); + var size = iter.size; + if (size === 0) { + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + return empty.withMutations(function(list ) { + list.setSize(size); + iter.forEach(function(v, i) {return list.set(i, v)}); + }); + } + + List.of = function(/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function() { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function(index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function(index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function(index) { + return !this.has(index) ? this : + index === 0 ? this.shift() : + index === this.size - 1 ? this.pop() : + this.splice(index, 1); + }; + + List.prototype.insert = function(index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function(/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function(list ) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function() { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function(/*...values*/) { + var values = arguments; + return this.withMutations(function(list ) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function() { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.merge = function(/*...iters*/) { + return mergeIntoListWith(this, undefined, arguments); + }; + + List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, merger, iters); + }; + + List.prototype.mergeDeep = function(/*...iters*/) { + return mergeIntoListWith(this, deepMerger, arguments); + }; + + List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, deepMergerWith(merger), iters); + }; + + List.prototype.setSize = function(size) { + return setListBounds(this, 0, size); + }; + + // @pragma Iteration + + List.prototype.slice = function(begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds( + this, + resolveBegin(begin, size), + resolveEnd(end, size) + ); + }; + + List.prototype.__iterator = function(type, reverse) { + var index = 0; + var values = iterateList(this, reverse); + return new Iterator(function() { + var value = values(); + return value === DONE ? + iteratorDone() : + iteratorValue(type, index++, value); + }); + }; + + List.prototype.__iterate = function(fn, reverse) { + var index = 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + return this; + } + return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash); + }; + + + function isList(maybeList) { + return !!(maybeList && maybeList[IS_LIST_SENTINEL]); + } + + List.isList = isList; + + var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'; + + var ListPrototype = List.prototype; + ListPrototype[IS_LIST_SENTINEL] = true; + ListPrototype[DELETE] = ListPrototype.remove; + ListPrototype.setIn = MapPrototype.setIn; + ListPrototype.deleteIn = + ListPrototype.removeIn = MapPrototype.removeIn; + ListPrototype.update = MapPrototype.update; + ListPrototype.updateIn = MapPrototype.updateIn; + ListPrototype.mergeIn = MapPrototype.mergeIn; + ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + ListPrototype.withMutations = MapPrototype.withMutations; + ListPrototype.asMutable = MapPrototype.asMutable; + ListPrototype.asImmutable = MapPrototype.asImmutable; + ListPrototype.wasAltered = MapPrototype.wasAltered; + + + + function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; + } + + // TODO: seems like these methods are very similar + + VNode.prototype.removeBefore = function(ownerID, level, index) { + if (index === level ? 1 << level : 0 || this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; + }; + + VNode.prototype.removeAfter = function(ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; + }; + + + + var DONE = {}; + + function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 ? + iterateLeaf(node, offset) : + iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function() { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function() { + do { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf( + array && array[idx], level - SHIFT, offset + (idx << level) + ); + } while (true); + }; + } + } + + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; + } + + var EMPTY_LIST; + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + + function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function(list ) { + index < 0 ? + setListBounds(list, index).set(0, value) : + setListBounds(list, 0, index + 1).set(index, value) + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(DID_ALTER); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); + } + + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + SetRef(didAlter); + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; + } + + function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); + } + + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } + } + + function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + end = end | 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = newTailOffset < oldTailOffset ? + listNodeFor(list, newCapacity - 1) : + newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail; + + // Merge Tail into tree. + if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if (beginIndex !== (newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + + function mergeIntoListWith(list, merger, iterables) { + var iters = []; + var maxSize = 0; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = IndexedIterable(value); + if (iter.size > maxSize) { + maxSize = iter.size; + } + if (!isIterable(value)) { + iter = iter.map(function(v ) {return fromJS(v)}); + } + iters.push(iter); + } + if (maxSize > list.size) { + list = list.setSize(maxSize); + } + return mergeIntoCollectionWith(list, merger, iters); + } + + function getTailOffset(size) { + return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT); + } + + createClass(OrderedMap, Map); + + // @pragma Construction + + function OrderedMap(value) { + return value === null || value === undefined ? emptyOrderedMap() : + isOrderedMap(value) ? value : + emptyOrderedMap().withMutations(function(map ) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v, k) {return map.set(k, v)}); + }); + } + + OrderedMap.of = function(/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function() { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function(k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function(k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function(k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.wasAltered = function() { + return this._map.wasAltered() || this._list.wasAltered(); + }; + + OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._list.__iterate( + function(entry ) {return entry && fn(entry[1], entry[0], this$0)}, + reverse + ); + }; + + OrderedMap.prototype.__iterator = function(type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + + OrderedMap.isOrderedMap = isOrderedMap; + + OrderedMap.prototype[IS_ORDERED_SENTINEL] = true; + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + + + + function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + return omap; + } + + var EMPTY_ORDERED_MAP; + function emptyOrderedMap() { + return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); + } + + function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx}); + newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else { + if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + return omap; + } + return makeOrderedMap(newMap, newList); + } + + createClass(ToKeyedSequence, KeyedSeq); + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + ToKeyedSequence.prototype.get = function(key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function(key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function() { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function() {var this$0 = this; + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()}; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this; + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)}; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + var ii; + return this._iter.__iterate( + this._useKeys ? + function(v, k) {return fn(v, k, this$0)} : + ((ii = reverse ? resolveSize(this) : 0), + function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}), + reverse + ); + }; + + ToKeyedSequence.prototype.__iterator = function(type, reverse) { + if (this._useKeys) { + return this._iter.__iterator(type, reverse); + } + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var ii = reverse ? resolveSize(this) : 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : + iteratorValue(type, reverse ? --ii : ii++, step.value, step); + }); + }; + + ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true; + + + createClass(ToIndexedSequence, IndexedSeq); + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToIndexedSequence.prototype.includes = function(value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + var iterations = 0; + return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse); + }; + + ToIndexedSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : + iteratorValue(type, iterations++, step.value, step) + }); + }; + + + + createClass(ToSetSequence, SetSeq); + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToSetSequence.prototype.has = function(key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse); + }; + + ToSetSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : + iteratorValue(type, step.value, step.value, step); + }); + }; + + + + createClass(FromEntriesSequence, KeyedSeq); + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + FromEntriesSequence.prototype.entrySeq = function() { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._iter.__iterate(function(entry ) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return fn( + indexedIterable ? entry.get(1) : entry[1], + indexedIterable ? entry.get(0) : entry[0], + this$0 + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function() { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return iteratorValue( + type, + indexedIterable ? entry.get(0) : entry[0], + indexedIterable ? entry.get(1) : entry[1], + step + ); + } + } + }); + }; + + + ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + + + function flipFactory(iterable) { + var flipSequence = makeSequence(iterable); + flipSequence._iter = iterable; + flipSequence.size = iterable.size; + flipSequence.flip = function() {return iterable}; + flipSequence.reverse = function () { + var reversedSequence = iterable.reverse.apply(this); // super.reverse() + reversedSequence.flip = function() {return iterable.reverse()}; + return reversedSequence; + }; + flipSequence.has = function(key ) {return iterable.includes(key)}; + flipSequence.includes = function(key ) {return iterable.has(key)}; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse); + } + flipSequence.__iteratorUncached = function(type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = iterable.__iterator(type, reverse); + return new Iterator(function() { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return iterable.__iterator( + type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, + reverse + ); + } + return flipSequence; + } + + + function mapFactory(iterable, mapper, context) { + var mappedSequence = makeSequence(iterable); + mappedSequence.size = iterable.size; + mappedSequence.has = function(key ) {return iterable.has(key)}; + mappedSequence.get = function(key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v === NOT_SET ? + notSetValue : + mapper.call(context, v, key, iterable); + }; + mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + return iterable.__iterate( + function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false}, + reverse + ); + } + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function() { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue( + type, + key, + mapper.call(context, entry[1], key, iterable), + step + ); + }); + } + return mappedSequence; + } + + + function reverseFactory(iterable, useKeys) { + var reversedSequence = makeSequence(iterable); + reversedSequence._iter = iterable; + reversedSequence.size = iterable.size; + reversedSequence.reverse = function() {return iterable}; + if (iterable.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(iterable); + flipSequence.reverse = function() {return iterable.flip()}; + return flipSequence; + }; + } + reversedSequence.get = function(key, notSetValue) + {return iterable.get(useKeys ? key : -1 - key, notSetValue)}; + reversedSequence.has = function(key ) + {return iterable.has(useKeys ? key : -1 - key)}; + reversedSequence.includes = function(value ) {return iterable.includes(value)}; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) {var this$0 = this; + return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse); + }; + reversedSequence.__iterator = + function(type, reverse) {return iterable.__iterator(type, !reverse)}; + return reversedSequence; + } + + + function filterFactory(iterable, predicate, context, useKeys) { + var filterSequence = makeSequence(iterable); + if (useKeys) { + filterSequence.has = function(key ) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, iterable); + }; + filterSequence.get = function(key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, iterable) ? + v : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + var iterations = 0; + iterable.__iterate(function(v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function() { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, iterable)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + } + return filterSequence; + } + + + function countByFactory(iterable, grouper, context) { + var groups = Map().asMutable(); + iterable.__iterate(function(v, k) { + groups.update( + grouper.call(context, v, k, iterable), + 0, + function(a ) {return a + 1} + ); + }); + return groups.asImmutable(); + } + + + function groupByFactory(iterable, grouper, context) { + var isKeyedIter = isKeyed(iterable); + var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); + iterable.__iterate(function(v, k) { + groups.update( + grouper.call(context, v, k, iterable), + function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)} + ); + }); + var coerce = iterableClass(iterable); + return groups.map(function(arr ) {return reify(iterable, coerce(arr))}); + } + + + function sliceFactory(iterable, begin, end, useKeys) { + var originalSize = iterable.size; + + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + end = end | 0; + } + + if (wholeSlice(begin, end, originalSize)) { + return iterable; + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // begin or end will be NaN if they were provided as negative numbers and + // this iterable's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { + return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); + } + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(iterable); + + // If iterable.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined; + + if (!useKeys && isSeq(iterable) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize ? + iterable.get(index + resolvedBegin, notSetValue) : + notSetValue; + } + } + + sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this; + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function(v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0) !== false && + iterations !== sliceSize; + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function(type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function() { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } else { + return iteratorValue(type, iterations - 1, step.value[1], step); + } + }); + } + + return sliceSeq; + } + + + function takeWhileFactory(iterable, predicate, context) { + var takeSequence = makeSequence(iterable); + takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + iterable.__iterate(function(v, k, c) + {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)} + ); + return iterations; + }; + takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function() { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$0)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : + iteratorValue(type, k, v, step); + }); + }; + return takeSequence; + } + + + function skipWhileFactory(iterable, predicate, context, useKeys) { + var skipSequence = makeSequence(iterable); + skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function(v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function() { + var step, k, v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } else { + return iteratorValue(type, iterations++, step.value[1], step); + } + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$0)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : + iteratorValue(type, k, v, step); + }); + }; + return skipSequence; + } + + + function concatFactory(iterable, values) { + var isKeyedIterable = isKeyed(iterable); + var iters = [iterable].concat(values).map(function(v ) { + if (!isIterable(v)) { + v = isKeyedIterable ? + keyedSeqFromValue(v) : + indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedIterable) { + v = KeyedIterable(v); + } + return v; + }).filter(function(v ) {return v.size !== 0}); + + if (iters.length === 0) { + return iterable; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if (singleton === iterable || + isKeyedIterable && isKeyed(singleton) || + isIndexed(iterable) && isIndexed(singleton)) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedIterable) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(iterable)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce( + function(sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, + 0 + ); + return concatSeq; + } + + + function flattenFactory(iterable, depth, useKeys) { + var flatSequence = makeSequence(iterable); + flatSequence.__iterateUncached = function(fn, reverse) { + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) {var this$0 = this; + iter.__iterate(function(v, k) { + if ((!depth || currentDepth < depth) && isIterable(v)) { + flatDeep(v, currentDepth + 1); + } else if (fn(v, useKeys ? k : iterations++, this$0) === false) { + stopped = true; + } + return !stopped; + }, reverse); + } + flatDeep(iterable, 0); + return iterations; + } + flatSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function() { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isIterable(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + } + return flatSequence; + } + + + function flatMapFactory(iterable, mapper, context) { + var coerce = iterableClass(iterable); + return iterable.toSeq().map( + function(v, k) {return coerce(mapper.call(context, v, k, iterable))} + ).flatten(true); + } + + + function interposeFactory(iterable, separator) { + var interposedSequence = makeSequence(iterable); + interposedSequence.size = iterable.size && iterable.size * 2 -1; + interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; + var iterations = 0; + iterable.__iterate(function(v, k) + {return (!iterations || fn(separator, iterations++, this$0) !== false) && + fn(v, iterations++, this$0) !== false}, + reverse + ); + return iterations; + }; + interposedSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function() { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 ? + iteratorValue(type, iterations++, separator) : + iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; + } + + + function sortFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedIterable = isKeyed(iterable); + var index = 0; + var entries = iterable.toSeq().map( + function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]} + ).toArray(); + entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach( + isKeyedIterable ? + function(v, i) { entries[i].length = 2; } : + function(v, i) { entries[i] = v[1]; } + ); + return isKeyedIterable ? KeyedSeq(entries) : + isIndexed(iterable) ? IndexedSeq(entries) : + SetSeq(entries); + } + + + function maxFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = iterable.toSeq() + .map(function(v, k) {return [v, mapper(v, k, iterable)]}) + .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a}); + return entry && entry[0]; + } else { + return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a}); + } + } + + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0; + } + + + function zipWithFactory(keyIter, zipper, iters) { + var zipSequence = makeSequence(keyIter); + zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function(fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function(type, reverse) { + var iterators = iters.map(function(i ) + {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))} + ); + var iterations = 0; + var isDone = false; + return new Iterator(function() { + var steps; + if (!isDone) { + steps = iterators.map(function(i ) {return i.next()}); + isDone = steps.some(function(s ) {return s.done}); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply(null, steps.map(function(s ) {return s.value})) + ); + }); + }; + return zipSequence + } + + + // #pragma Helper Functions + + function reify(iter, seq) { + return isSeq(iter) ? seq : iter.constructor(seq); + } + + function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } + } + + function resolveSize(iter) { + assertNotInfinite(iter.size); + return ensureSize(iter); + } + + function iterableClass(iterable) { + return isKeyed(iterable) ? KeyedIterable : + isIndexed(iterable) ? IndexedIterable : + SetIterable; + } + + function makeSequence(iterable) { + return Object.create( + ( + isKeyed(iterable) ? KeyedSeq : + isIndexed(iterable) ? IndexedSeq : + SetSeq + ).prototype + ); + } + + function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } else { + return Seq.prototype.cacheResult.call(this); + } + } + + function defaultComparator(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + } + + function forceIterator(keyPath) { + var iter = getIterator(keyPath); + if (!iter) { + // Array might not be iterable in this environment, so we need a fallback + // to our wrapped type. + if (!isArrayLike(keyPath)) { + throw new TypeError('Expected iterable or array-like: ' + keyPath); + } + iter = getIterator(Iterable(keyPath)); + } + return iter; + } + + createClass(Record, KeyedCollection); + + function Record(defaultValues, name) { + var hasInitialized; + + var RecordType = function Record(values) { + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + setProps(RecordTypePrototype, keys); + RecordTypePrototype.size = keys.length; + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + } + this._map = Map(values); + }; + + var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype); + RecordTypePrototype.constructor = RecordType; + + return RecordType; + } + + Record.prototype.toString = function() { + return this.__toString(recordName(this) + ' {', '}'); + }; + + // @pragma Access + + Record.prototype.has = function(k) { + return this._defaultValues.hasOwnProperty(k); + }; + + Record.prototype.get = function(k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var defaultVal = this._defaultValues[k]; + return this._map ? this._map.get(k, defaultVal) : defaultVal; + }; + + // @pragma Modification + + Record.prototype.clear = function() { + if (this.__ownerID) { + this._map && this._map.clear(); + return this; + } + var RecordType = this.constructor; + return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); + }; + + Record.prototype.set = function(k, v) { + if (!this.has(k)) { + throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); + } + var newMap = this._map && this._map.set(k, v); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.remove = function(k) { + if (!this.has(k)) { + return this; + } + var newMap = this._map && this._map.remove(k); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.wasAltered = function() { + return this._map.wasAltered(); + }; + + Record.prototype.__iterator = function(type, reverse) {var this$0 = this; + return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse); + }; + + Record.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse); + }; + + Record.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map && this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return makeRecord(this, newMap, ownerID); + }; + + + var RecordPrototype = Record.prototype; + RecordPrototype[DELETE] = RecordPrototype.remove; + RecordPrototype.deleteIn = + RecordPrototype.removeIn = MapPrototype.removeIn; + RecordPrototype.merge = MapPrototype.merge; + RecordPrototype.mergeWith = MapPrototype.mergeWith; + RecordPrototype.mergeIn = MapPrototype.mergeIn; + RecordPrototype.mergeDeep = MapPrototype.mergeDeep; + RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith; + RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + RecordPrototype.setIn = MapPrototype.setIn; + RecordPrototype.update = MapPrototype.update; + RecordPrototype.updateIn = MapPrototype.updateIn; + RecordPrototype.withMutations = MapPrototype.withMutations; + RecordPrototype.asMutable = MapPrototype.asMutable; + RecordPrototype.asImmutable = MapPrototype.asImmutable; + + + function makeRecord(likeRecord, map, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + record._map = map; + record.__ownerID = ownerID; + return record; + } + + function recordName(record) { + return record._name || record.constructor.name || 'Record'; + } + + function setProps(prototype, names) { + try { + names.forEach(setProp.bind(undefined, prototype)); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } + } + + function setProp(prototype, name) { + Object.defineProperty(prototype, name, { + get: function() { + return this.get(name); + }, + set: function(value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + } + }); + } + + createClass(Set, SetCollection); + + // @pragma Construction + + function Set(value) { + return value === null || value === undefined ? emptySet() : + isSet(value) && !isOrdered(value) ? value : + emptySet().withMutations(function(set ) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v ) {return set.add(v)}); + }); + } + + Set.of = function(/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function(value) { + return this(KeyedIterable(value).keySeq()); + }; + + Set.prototype.toString = function() { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function(value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function(value) { + return updateSet(this, this._map.set(value, true)); + }; + + Set.prototype.remove = function(value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function() { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0); + iters = iters.filter(function(x ) {return x.size !== 0}); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function(set ) { + for (var ii = 0; ii < iters.length; ii++) { + SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)}); + } + }); + }; + + Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function(iter ) {return SetIterable(iter)}); + var originalSet = this; + return this.withMutations(function(set ) { + originalSet.forEach(function(value ) { + if (!iters.every(function(iter ) {return iter.includes(value)})) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function(iter ) {return SetIterable(iter)}); + var originalSet = this; + return this.withMutations(function(set ) { + originalSet.forEach(function(value ) { + if (iters.some(function(iter ) {return iter.includes(value)})) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.merge = function() { + return this.union.apply(this, arguments); + }; + + Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return this.union.apply(this, iters); + }; + + Set.prototype.sort = function(comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function(mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function() { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse); + }; + + Set.prototype.__iterator = function(type, reverse) { + return this._map.map(function(_, k) {return k}).__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + + function isSet(maybeSet) { + return !!(maybeSet && maybeSet[IS_SET_SENTINEL]); + } + + Set.isSet = isSet; + + var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; + + var SetPrototype = Set.prototype; + SetPrototype[IS_SET_SENTINEL] = true; + SetPrototype[DELETE] = SetPrototype.remove; + SetPrototype.mergeDeep = SetPrototype.merge; + SetPrototype.mergeDeepWith = SetPrototype.mergeWith; + SetPrototype.withMutations = MapPrototype.withMutations; + SetPrototype.asMutable = MapPrototype.asMutable; + SetPrototype.asImmutable = MapPrototype.asImmutable; + + SetPrototype.__empty = emptySet; + SetPrototype.__make = makeSet; + + function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map ? set : + newMap.size === 0 ? set.__empty() : + set.__make(newMap); + } + + function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_SET; + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + + createClass(OrderedSet, Set); + + // @pragma Construction + + function OrderedSet(value) { + return value === null || value === undefined ? emptyOrderedSet() : + isOrderedSet(value) ? value : + emptyOrderedSet().withMutations(function(set ) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v ) {return set.add(v)}); + }); + } + + OrderedSet.of = function(/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function(value) { + return this(KeyedIterable(value).keySeq()); + }; + + OrderedSet.prototype.toString = function() { + return this.__toString('OrderedSet {', '}'); + }; + + + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + + OrderedSet.isOrderedSet = isOrderedSet; + + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SENTINEL] = true; + + OrderedSetPrototype.__empty = emptyOrderedSet; + OrderedSetPrototype.__make = makeOrderedSet; + + function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_ORDERED_SET; + function emptyOrderedSet() { + return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); + } + + createClass(Stack, IndexedCollection); + + // @pragma Construction + + function Stack(value) { + return value === null || value === undefined ? emptyStack() : + isStack(value) ? value : + emptyStack().unshiftAll(value); + } + + Stack.of = function(/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function() { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function(index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function() { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function(/*...values*/) { + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments[ii], + next: head + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function(iter) { + iter = IndexedIterable(iter); + if (iter.size === 0) { + return this; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.reverse().forEach(function(value ) { + newSize++; + head = { + value: value, + next: head + }; + }); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function() { + return this.slice(1); + }; + + Stack.prototype.unshift = function(/*...values*/) { + return this.push.apply(this, arguments); + }; + + Stack.prototype.unshiftAll = function(iter) { + return this.pushAll(iter); + }; + + Stack.prototype.shift = function() { + return this.pop.apply(this, arguments); + }; + + Stack.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function(begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function(fn, reverse) { + if (reverse) { + return this.reverse().__iterate(fn); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function(type, reverse) { + if (reverse) { + return this.reverse().__iterator(type); + } + var iterations = 0; + var node = this._head; + return new Iterator(function() { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + + function isStack(maybeStack) { + return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]); + } + + Stack.isStack = isStack; + + var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; + + var StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SENTINEL] = true; + StackPrototype.withMutations = MapPrototype.withMutations; + StackPrototype.asMutable = MapPrototype.asMutable; + StackPrototype.asImmutable = MapPrototype.asImmutable; + StackPrototype.wasAltered = MapPrototype.wasAltered; + + + function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_STACK; + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + + /** + * Contributes additional methods to a constructor + */ + function mixin(ctor, methods) { + var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && + Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; + } + + Iterable.Iterator = Iterator; + + mixin(Iterable, { + + // ### Conversion to other types + + toArray: function() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + this.valueSeq().__iterate(function(v, i) { array[i] = v; }); + return array; + }, + + toIndexedSeq: function() { + return new ToIndexedSequence(this); + }, + + toJS: function() { + return this.toSeq().map( + function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value} + ).__toJS(); + }, + + toJSON: function() { + return this.toSeq().map( + function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value} + ).__toJS(); + }, + + toKeyedSeq: function() { + return new ToKeyedSequence(this, true); + }, + + toMap: function() { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: function() { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function(v, k) { object[k] = v; }); + return object; + }, + + toOrderedMap: function() { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function() { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function() { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function() { + return new ToSetSequence(this); + }, + + toSeq: function() { + return isIndexed(this) ? this.toIndexedSeq() : + isKeyed(this) ? this.toKeyedSeq() : + this.toSetSeq(); + }, + + toStack: function() { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function() { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + + // ### Common JavaScript methods and properties + + toString: function() { + return '[Iterable]'; + }, + + __toString: function(head, tail) { + if (this.size === 0) { + return head + tail; + } + return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail; + }, + + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function() {var values = SLICE$0.call(arguments, 0); + return reify(this, concatFactory(this, values)); + }, + + includes: function(searchValue) { + return this.some(function(value ) {return is(value, searchValue)}); + }, + + entries: function() { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function(predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function(v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function(predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + find: function(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + findEntry: function(predicate, context) { + var found; + this.__iterate(function(v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findLastEntry: function(predicate, context) { + return this.toSeq().reverse().findEntry(predicate, context); + }, + + forEach: function(sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function(separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function(v ) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function() { + return this.__iterator(ITERATE_KEYS); + }, + + map: function(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function(reducer, initialReduction, context) { + assertNotInfinite(this.size); + var reduction; + var useFirst; + if (arguments.length < 2) { + useFirst = true; + } else { + reduction = initialReduction; + } + this.__iterate(function(v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }); + return reduction; + }, + + reduceRight: function(reducer, initialReduction, context) { + var reversed = this.toKeyedSeq().reverse(); + return reversed.reduce.apply(reversed, arguments); + }, + + reverse: function() { + return reify(this, reverseFactory(this, true)); + }, + + slice: function(begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function(predicate, context) { + return !this.every(not(predicate), context); + }, + + sort: function(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function() { + return this.__iterator(ITERATE_VALUES); + }, + + + // ### More sequential methods + + butLast: function() { + return this.slice(0, -1); + }, + + isEmpty: function() { + return this.size !== undefined ? this.size === 0 : !this.some(function() {return true}); + }, + + count: function(predicate, context) { + return ensureSize( + predicate ? this.toSeq().filter(predicate, context) : this + ); + }, + + countBy: function(grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function(other) { + return deepEqual(this, other); + }, + + entrySeq: function() { + var iterable = this; + if (iterable._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(iterable._cache); + } + var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function() {return iterable.toSeq()}; + return entriesSequence; + }, + + filterNot: function(predicate, context) { + return this.filter(not(predicate), context); + }, + + findLast: function(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + first: function() { + return this.find(returnTrue); + }, + + flatMap: function(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function(depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function() { + return new FromEntriesSequence(this); + }, + + get: function(searchKey, notSetValue) { + return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue); + }, + + getIn: function(searchKeyPath, notSetValue) { + var nested = this; + // Note: in an ES6 environment, we would prefer: + // for (var key of searchKeyPath) { + var iter = forceIterator(searchKeyPath); + var step; + while (!(step = iter.next()).done) { + var key = step.value; + nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET; + if (nested === NOT_SET) { + return notSetValue; + } + } + return nested; + }, + + groupBy: function(grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: function(searchKeyPath) { + return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; + }, + + isSubset: function(iter) { + iter = typeof iter.includes === 'function' ? iter : Iterable(iter); + return this.every(function(value ) {return iter.includes(value)}); + }, + + isSuperset: function(iter) { + iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter); + return iter.isSubset(this); + }, + + keySeq: function() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function() { + return this.toSeq().reverse().first(); + }, + + max: function(comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function(comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); + }, + + minBy: function(mapper, comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); + }, + + rest: function() { + return this.slice(1); + }, + + skip: function(amount) { + return this.slice(Math.max(0, amount)); + }, + + skipLast: function(amount) { + return reify(this, this.toSeq().reverse().skip(amount).reverse()); + }, + + skipWhile: function(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function(amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function(amount) { + return reify(this, this.toSeq().reverse().take(amount).reverse()); + }, + + takeWhile: function(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + valueSeq: function() { + return this.toIndexedSeq(); + }, + + + // ### Hashable Object + + hashCode: function() { + return this.__hash || (this.__hash = hashIterable(this)); + } + + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) + }); + + // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + var IterablePrototype = Iterable.prototype; + IterablePrototype[IS_ITERABLE_SENTINEL] = true; + IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values; + IterablePrototype.__toJS = IterablePrototype.toArray; + IterablePrototype.__toStringMapper = quoteString; + IterablePrototype.inspect = + IterablePrototype.toSource = function() { return this.toString(); }; + IterablePrototype.chain = IterablePrototype.flatMap; + IterablePrototype.contains = IterablePrototype.includes; + + // Temporary warning about using length + (function () { + try { + Object.defineProperty(IterablePrototype, 'length', { + get: function () { + if (!Iterable.noLengthWarning) { + var stack; + try { + throw new Error(); + } catch (error) { + stack = error.stack; + } + if (stack.indexOf('_wrapObject') === -1) { + console && console.warn && console.warn( + 'iterable.length has been deprecated, '+ + 'use iterable.size or iterable.count(). '+ + 'This warning will become a silent error in a future version. ' + + stack + ); + return this.size; + } + } + } + }); + } catch (e) {} + })(); + + + + mixin(KeyedIterable, { + + // ### More sequential methods + + flip: function() { + return reify(this, flipFactory(this)); + }, + + findKey: function(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLastKey: function(predicate, context) { + return this.toSeq().reverse().findKey(predicate, context); + }, + + keyOf: function(searchValue) { + return this.findKey(function(value ) {return is(value, searchValue)}); + }, + + lastKeyOf: function(searchValue) { + return this.findLastKey(function(value ) {return is(value, searchValue)}); + }, + + mapEntries: function(mapper, context) {var this$0 = this; + var iterations = 0; + return reify(this, + this.toSeq().map( + function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)} + ).fromEntrySeq() + ); + }, + + mapKeys: function(mapper, context) {var this$0 = this; + return reify(this, + this.toSeq().flip().map( + function(k, v) {return mapper.call(context, k, v, this$0)} + ).flip() + ); + } + + }); + + var KeyedIterablePrototype = KeyedIterable.prototype; + KeyedIterablePrototype[IS_KEYED_SENTINEL] = true; + KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries; + KeyedIterablePrototype.__toJS = IterablePrototype.toObject; + KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)}; + + + + mixin(IndexedIterable, { + + // ### Conversion to other types + + toKeyedSeq: function() { + return new ToKeyedSequence(this, false); + }, + + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function(predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function(searchValue) { + var key = this.toKeyedSeq().keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function(searchValue) { + var key = this.toKeyedSeq().reverse().keyOf(searchValue); + return key === undefined ? -1 : key; + + // var index = + // return this.toSeq().reverse().indexOf(searchValue); + }, + + reverse: function() { + return reify(this, reverseFactory(this, false)); + }, + + slice: function(begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function(index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum | 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 ? + spliced : + spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) + ); + }, + + + // ### More collection methods + + findLastIndex: function(predicate, context) { + var key = this.toKeyedSeq().findLastKey(predicate, context); + return key === undefined ? -1 : key; + }, + + first: function() { + return this.get(0); + }, + + flatten: function(depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function(index, notSetValue) { + index = wrapIndex(this, index); + return (index < 0 || (this.size === Infinity || + (this.size !== undefined && index > this.size))) ? + notSetValue : + this.find(function(_, key) {return key === index}, undefined, notSetValue); + }, + + has: function(index) { + index = wrapIndex(this, index); + return index >= 0 && (this.size !== undefined ? + this.size === Infinity || index < this.size : + this.indexOf(index) !== -1 + ); + }, + + interpose: function(separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function(/*...iterables*/) { + var iterables = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * iterables.length; + } + return reify(this, interleaved); + }, + + last: function() { + return this.get(-1); + }, + + skipWhile: function(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function(/*, ...iterables */) { + var iterables = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, iterables)); + }, + + zipWith: function(zipper/*, ...iterables */) { + var iterables = arrCopy(arguments); + iterables[0] = this; + return reify(this, zipWithFactory(this, zipper, iterables)); + } + + }); + + IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true; + IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true; + + + + mixin(SetIterable, { + + // ### ES6 Collection methods (ES6 Array and Map) + + get: function(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function(value) { + return this.has(value); + }, + + + // ### More sequential methods + + keySeq: function() { + return this.valueSeq(); + } + + }); + + SetIterable.prototype.has = IterablePrototype.includes; + + + // Mixin subclasses + + mixin(KeyedSeq, KeyedIterable.prototype); + mixin(IndexedSeq, IndexedIterable.prototype); + mixin(SetSeq, SetIterable.prototype); + + mixin(KeyedCollection, KeyedIterable.prototype); + mixin(IndexedCollection, IndexedIterable.prototype); + mixin(SetCollection, SetIterable.prototype); + + + // #pragma Helper functions + + function keyMapper(v, k) { + return k; + } + + function entryMapper(v, k) { + return [k, v]; + } + + function not(predicate) { + return function() { + return !predicate.apply(this, arguments); + } + } + + function neg(predicate) { + return function() { + return -predicate.apply(this, arguments); + } + } + + function quoteString(value) { + return typeof value === 'string' ? JSON.stringify(value) : value; + } + + function defaultZipper() { + return arrCopy(arguments); + } + + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + + function hashIterable(iterable) { + if (iterable.size === Infinity) { + return 0; + } + var ordered = isOrdered(iterable); + var keyed = isKeyed(iterable); + var h = ordered ? 1 : 0; + var size = iterable.__iterate( + keyed ? + ordered ? + function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } : + function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } : + ordered ? + function(v ) { h = 31 * h + hash(v) | 0; } : + function(v ) { h = h + hash(v) | 0; } + ); + return murmurHashOfSize(size, h); + } + + function murmurHashOfSize(size, h) { + h = imul(h, 0xCC9E2D51); + h = imul(h << 15 | h >>> -15, 0x1B873593); + h = imul(h << 13 | h >>> -13, 5); + h = (h + 0xE6546B64 | 0) ^ size; + h = imul(h ^ h >>> 16, 0x85EBCA6B); + h = imul(h ^ h >>> 13, 0xC2B2AE35); + h = smi(h ^ h >>> 16); + return h; + } + + function hashMerge(a, b) { + return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int + } + + var Immutable = { + + Iterable: Iterable, + + Seq: Seq, + Collection: Collection, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS + + }; + + return Immutable; + +})); + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (true) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; + +/***/ }), +/* 366 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EditorState + * @format + * + */ + + + +var _assign = __webpack_require__(60); + +var _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var BlockTree = __webpack_require__(899); +var ContentState = __webpack_require__(807); +var EditorBidiService = __webpack_require__(1094); +var Immutable = __webpack_require__(364); +var SelectionState = __webpack_require__(441); + +var OrderedSet = Immutable.OrderedSet, + Record = Immutable.Record, + Stack = Immutable.Stack; + + +var defaultRecord = { + allowUndo: true, + currentContent: null, + decorator: null, + directionMap: null, + forceSelection: false, + inCompositionMode: false, + inlineStyleOverride: null, + lastChangeType: null, + nativelyRenderedContent: null, + redoStack: Stack(), + selection: null, + treeMap: null, + undoStack: Stack() +}; + +var EditorStateRecord = Record(defaultRecord); + +var EditorState = function () { + EditorState.createEmpty = function createEmpty(decorator) { + return EditorState.createWithContent(ContentState.createFromText(''), decorator); + }; + + EditorState.createWithContent = function createWithContent(contentState, decorator) { + var firstKey = contentState.getBlockMap().first().getKey(); + return EditorState.create({ + currentContent: contentState, + undoStack: Stack(), + redoStack: Stack(), + decorator: decorator || null, + selection: SelectionState.createEmpty(firstKey) + }); + }; + + EditorState.create = function create(config) { + var currentContent = config.currentContent, + decorator = config.decorator; + + var recordConfig = _extends({}, config, { + treeMap: generateNewTreeMap(currentContent, decorator), + directionMap: EditorBidiService.getDirectionMap(currentContent) + }); + return new EditorState(new EditorStateRecord(recordConfig)); + }; + + EditorState.set = function set(editorState, put) { + var map = editorState.getImmutable().withMutations(function (state) { + var existingDecorator = state.get('decorator'); + var decorator = existingDecorator; + if (put.decorator === null) { + decorator = null; + } else if (put.decorator) { + decorator = put.decorator; + } + + var newContent = put.currentContent || editorState.getCurrentContent(); + + if (decorator !== existingDecorator) { + var treeMap = state.get('treeMap'); + var newTreeMap; + if (decorator && existingDecorator) { + newTreeMap = regenerateTreeForNewDecorator(newContent, newContent.getBlockMap(), treeMap, decorator, existingDecorator); + } else { + newTreeMap = generateNewTreeMap(newContent, decorator); + } + + state.merge({ + decorator: decorator, + treeMap: newTreeMap, + nativelyRenderedContent: null + }); + return; + } + + var existingContent = editorState.getCurrentContent(); + if (newContent !== existingContent) { + state.set('treeMap', regenerateTreeForNewBlocks(editorState, newContent.getBlockMap(), newContent.getEntityMap(), decorator)); + } + + state.merge(put); + }); + + return new EditorState(map); + }; + + EditorState.prototype.toJS = function toJS() { + return this.getImmutable().toJS(); + }; + + EditorState.prototype.getAllowUndo = function getAllowUndo() { + return this.getImmutable().get('allowUndo'); + }; + + EditorState.prototype.getCurrentContent = function getCurrentContent() { + return this.getImmutable().get('currentContent'); + }; + + EditorState.prototype.getUndoStack = function getUndoStack() { + return this.getImmutable().get('undoStack'); + }; + + EditorState.prototype.getRedoStack = function getRedoStack() { + return this.getImmutable().get('redoStack'); + }; + + EditorState.prototype.getSelection = function getSelection() { + return this.getImmutable().get('selection'); + }; + + EditorState.prototype.getDecorator = function getDecorator() { + return this.getImmutable().get('decorator'); + }; + + EditorState.prototype.isInCompositionMode = function isInCompositionMode() { + return this.getImmutable().get('inCompositionMode'); + }; + + EditorState.prototype.mustForceSelection = function mustForceSelection() { + return this.getImmutable().get('forceSelection'); + }; + + EditorState.prototype.getNativelyRenderedContent = function getNativelyRenderedContent() { + return this.getImmutable().get('nativelyRenderedContent'); + }; + + EditorState.prototype.getLastChangeType = function getLastChangeType() { + return this.getImmutable().get('lastChangeType'); + }; + + /** + * While editing, the user may apply inline style commands with a collapsed + * cursor, intending to type text that adopts the specified style. In this + * case, we track the specified style as an "override" that takes precedence + * over the inline style of the text adjacent to the cursor. + * + * If null, there is no override in place. + */ + + + EditorState.prototype.getInlineStyleOverride = function getInlineStyleOverride() { + return this.getImmutable().get('inlineStyleOverride'); + }; + + EditorState.setInlineStyleOverride = function setInlineStyleOverride(editorState, inlineStyleOverride) { + return EditorState.set(editorState, { inlineStyleOverride: inlineStyleOverride }); + }; + + /** + * Get the appropriate inline style for the editor state. If an + * override is in place, use it. Otherwise, the current style is + * based on the location of the selection state. + */ + + + EditorState.prototype.getCurrentInlineStyle = function getCurrentInlineStyle() { + var override = this.getInlineStyleOverride(); + if (override != null) { + return override; + } + + var content = this.getCurrentContent(); + var selection = this.getSelection(); + + if (selection.isCollapsed()) { + return getInlineStyleForCollapsedSelection(content, selection); + } + + return getInlineStyleForNonCollapsedSelection(content, selection); + }; + + EditorState.prototype.getBlockTree = function getBlockTree(blockKey) { + return this.getImmutable().getIn(['treeMap', blockKey]); + }; + + EditorState.prototype.isSelectionAtStartOfContent = function isSelectionAtStartOfContent() { + var firstKey = this.getCurrentContent().getBlockMap().first().getKey(); + return this.getSelection().hasEdgeWithin(firstKey, 0, 0); + }; + + EditorState.prototype.isSelectionAtEndOfContent = function isSelectionAtEndOfContent() { + var content = this.getCurrentContent(); + var blockMap = content.getBlockMap(); + var last = blockMap.last(); + var end = last.getLength(); + return this.getSelection().hasEdgeWithin(last.getKey(), end, end); + }; + + EditorState.prototype.getDirectionMap = function getDirectionMap() { + return this.getImmutable().get('directionMap'); + }; + + /** + * Incorporate native DOM selection changes into the EditorState. This + * method can be used when we simply want to accept whatever the DOM + * has given us to represent selection, and we do not need to re-render + * the editor. + * + * To forcibly move the DOM selection, see `EditorState.forceSelection`. + */ + + + EditorState.acceptSelection = function acceptSelection(editorState, selection) { + return updateSelection(editorState, selection, false); + }; + + /** + * At times, we need to force the DOM selection to be where we + * need it to be. This can occur when the anchor or focus nodes + * are non-text nodes, for instance. In this case, we want to trigger + * a re-render of the editor, which in turn forces selection into + * the correct place in the DOM. The `forceSelection` method + * accomplishes this. + * + * This method should be used in cases where you need to explicitly + * move the DOM selection from one place to another without a change + * in ContentState. + */ + + + EditorState.forceSelection = function forceSelection(editorState, selection) { + if (!selection.getHasFocus()) { + selection = selection.set('hasFocus', true); + } + return updateSelection(editorState, selection, true); + }; + + /** + * Move selection to the end of the editor without forcing focus. + */ + + + EditorState.moveSelectionToEnd = function moveSelectionToEnd(editorState) { + var content = editorState.getCurrentContent(); + var lastBlock = content.getLastBlock(); + var lastKey = lastBlock.getKey(); + var length = lastBlock.getLength(); + + return EditorState.acceptSelection(editorState, new SelectionState({ + anchorKey: lastKey, + anchorOffset: length, + focusKey: lastKey, + focusOffset: length, + isBackward: false + })); + }; + + /** + * Force focus to the end of the editor. This is useful in scenarios + * where we want to programmatically focus the input and it makes sense + * to allow the user to continue working seamlessly. + */ + + + EditorState.moveFocusToEnd = function moveFocusToEnd(editorState) { + var afterSelectionMove = EditorState.moveSelectionToEnd(editorState); + return EditorState.forceSelection(afterSelectionMove, afterSelectionMove.getSelection()); + }; + + /** + * Push the current ContentState onto the undo stack if it should be + * considered a boundary state, and set the provided ContentState as the + * new current content. + */ + + + EditorState.push = function push(editorState, contentState, changeType) { + if (editorState.getCurrentContent() === contentState) { + return editorState; + } + + var forceSelection = changeType !== 'insert-characters'; + var directionMap = EditorBidiService.getDirectionMap(contentState, editorState.getDirectionMap()); + + if (!editorState.getAllowUndo()) { + return EditorState.set(editorState, { + currentContent: contentState, + directionMap: directionMap, + lastChangeType: changeType, + selection: contentState.getSelectionAfter(), + forceSelection: forceSelection, + inlineStyleOverride: null + }); + } + + var selection = editorState.getSelection(); + var currentContent = editorState.getCurrentContent(); + var undoStack = editorState.getUndoStack(); + var newContent = contentState; + + if (selection !== currentContent.getSelectionAfter() || mustBecomeBoundary(editorState, changeType)) { + undoStack = undoStack.push(currentContent); + newContent = newContent.set('selectionBefore', selection); + } else if (changeType === 'insert-characters' || changeType === 'backspace-character' || changeType === 'delete-character') { + // Preserve the previous selection. + newContent = newContent.set('selectionBefore', currentContent.getSelectionBefore()); + } + + var inlineStyleOverride = editorState.getInlineStyleOverride(); + + // Don't discard inline style overrides for the following change types: + var overrideChangeTypes = ['adjust-depth', 'change-block-type', 'split-block']; + + if (overrideChangeTypes.indexOf(changeType) === -1) { + inlineStyleOverride = null; + } + + var editorStateChanges = { + currentContent: newContent, + directionMap: directionMap, + undoStack: undoStack, + redoStack: Stack(), + lastChangeType: changeType, + selection: contentState.getSelectionAfter(), + forceSelection: forceSelection, + inlineStyleOverride: inlineStyleOverride + }; + + return EditorState.set(editorState, editorStateChanges); + }; + + /** + * Make the top ContentState in the undo stack the new current content and + * push the current content onto the redo stack. + */ + + + EditorState.undo = function undo(editorState) { + if (!editorState.getAllowUndo()) { + return editorState; + } + + var undoStack = editorState.getUndoStack(); + var newCurrentContent = undoStack.peek(); + if (!newCurrentContent) { + return editorState; + } + + var currentContent = editorState.getCurrentContent(); + var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap()); + + return EditorState.set(editorState, { + currentContent: newCurrentContent, + directionMap: directionMap, + undoStack: undoStack.shift(), + redoStack: editorState.getRedoStack().push(currentContent), + forceSelection: true, + inlineStyleOverride: null, + lastChangeType: 'undo', + nativelyRenderedContent: null, + selection: currentContent.getSelectionBefore() + }); + }; + + /** + * Make the top ContentState in the redo stack the new current content and + * push the current content onto the undo stack. + */ + + + EditorState.redo = function redo(editorState) { + if (!editorState.getAllowUndo()) { + return editorState; + } + + var redoStack = editorState.getRedoStack(); + var newCurrentContent = redoStack.peek(); + if (!newCurrentContent) { + return editorState; + } + + var currentContent = editorState.getCurrentContent(); + var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap()); + + return EditorState.set(editorState, { + currentContent: newCurrentContent, + directionMap: directionMap, + undoStack: editorState.getUndoStack().push(currentContent), + redoStack: redoStack.shift(), + forceSelection: true, + inlineStyleOverride: null, + lastChangeType: 'redo', + nativelyRenderedContent: null, + selection: newCurrentContent.getSelectionAfter() + }); + }; + + /** + * Not for public consumption. + */ + + + function EditorState(immutable) { + _classCallCheck(this, EditorState); + + this._immutable = immutable; + } + + /** + * Not for public consumption. + */ + + + EditorState.prototype.getImmutable = function getImmutable() { + return this._immutable; + }; + + return EditorState; +}(); + +/** + * Set the supplied SelectionState as the new current selection, and set + * the `force` flag to trigger manual selection placement by the view. + */ + + +function updateSelection(editorState, selection, forceSelection) { + return EditorState.set(editorState, { + selection: selection, + forceSelection: forceSelection, + nativelyRenderedContent: null, + inlineStyleOverride: null + }); +} + +/** + * Regenerate the entire tree map for a given ContentState and decorator. + * Returns an OrderedMap that maps all available ContentBlock objects. + */ +function generateNewTreeMap(contentState, decorator) { + return contentState.getBlockMap().map(function (block) { + return BlockTree.generate(contentState, block, decorator); + }).toOrderedMap(); +} + +/** + * Regenerate tree map objects for all ContentBlocks that have changed + * between the current editorState and newContent. Returns an OrderedMap + * with only changed regenerated tree map objects. + */ +function regenerateTreeForNewBlocks(editorState, newBlockMap, newEntityMap, decorator) { + var contentState = editorState.getCurrentContent().set('entityMap', newEntityMap); + var prevBlockMap = contentState.getBlockMap(); + var prevTreeMap = editorState.getImmutable().get('treeMap'); + return prevTreeMap.merge(newBlockMap.toSeq().filter(function (block, key) { + return block !== prevBlockMap.get(key); + }).map(function (block) { + return BlockTree.generate(contentState, block, decorator); + })); +} + +/** + * Generate tree map objects for a new decorator object, preserving any + * decorations that are unchanged from the previous decorator. + * + * Note that in order for this to perform optimally, decoration Lists for + * decorators should be preserved when possible to allow for direct immutable + * List comparison. + */ +function regenerateTreeForNewDecorator(content, blockMap, previousTreeMap, decorator, existingDecorator) { + return previousTreeMap.merge(blockMap.toSeq().filter(function (block) { + return decorator.getDecorations(block, content) !== existingDecorator.getDecorations(block, content); + }).map(function (block) { + return BlockTree.generate(content, block, decorator); + })); +} + +/** + * Return whether a change should be considered a boundary state, given + * the previous change type. Allows us to discard potential boundary states + * during standard typing or deletion behavior. + */ +function mustBecomeBoundary(editorState, changeType) { + var lastChangeType = editorState.getLastChangeType(); + return changeType !== lastChangeType || changeType !== 'insert-characters' && changeType !== 'backspace-character' && changeType !== 'delete-character'; +} + +function getInlineStyleForCollapsedSelection(content, selection) { + var startKey = selection.getStartKey(); + var startOffset = selection.getStartOffset(); + var startBlock = content.getBlockForKey(startKey); + + // If the cursor is not at the start of the block, look backward to + // preserve the style of the preceding character. + if (startOffset > 0) { + return startBlock.getInlineStyleAt(startOffset - 1); + } + + // The caret is at position zero in this block. If the block has any + // text at all, use the style of the first character. + if (startBlock.getLength()) { + return startBlock.getInlineStyleAt(0); + } + + // Otherwise, look upward in the document to find the closest character. + return lookUpwardForInlineStyle(content, startKey); +} + +function getInlineStyleForNonCollapsedSelection(content, selection) { + var startKey = selection.getStartKey(); + var startOffset = selection.getStartOffset(); + var startBlock = content.getBlockForKey(startKey); + + // If there is a character just inside the selection, use its style. + if (startOffset < startBlock.getLength()) { + return startBlock.getInlineStyleAt(startOffset); + } + + // Check if the selection at the end of a non-empty block. Use the last + // style in the block. + if (startOffset > 0) { + return startBlock.getInlineStyleAt(startOffset - 1); + } + + // Otherwise, look upward in the document to find the closest character. + return lookUpwardForInlineStyle(content, startKey); +} + +function lookUpwardForInlineStyle(content, fromKey) { + var lastNonEmpty = content.getBlockMap().reverse().skipUntil(function (_, k) { + return k === fromKey; + }).skip(1).skipUntil(function (block, _) { + return block.getLength(); + }).first(); + + if (lastNonEmpty) return lastNonEmpty.getInlineStyleAt(lastNonEmpty.getLength() - 1); + return OrderedSet(); +} + +module.exports = EditorState; + +/***/ }), +/* 367 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/* harmony default export */ __webpack_exports__["a"] = (isObject); + + +/***/ }), +/* 368 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayMap); + + +/***/ }), +/* 369 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(843); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(541); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(372); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */])(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keys); + + +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Draft + * @format + * + */ + + + +var AtomicBlockUtils = __webpack_require__(1081); +var BlockMapBuilder = __webpack_require__(459); +var CharacterMetadata = __webpack_require__(381); +var CompositeDraftDecorator = __webpack_require__(1097); +var ContentBlock = __webpack_require__(424); +var ContentState = __webpack_require__(807); +var DefaultDraftBlockRenderMap = __webpack_require__(810); +var DefaultDraftInlineStyle = __webpack_require__(902); +var DraftEditor = __webpack_require__(1098); +var DraftEditorBlock = __webpack_require__(904); +var DraftEntity = __webpack_require__(527); +var DraftModifier = __webpack_require__(378); +var DraftEntityInstance = __webpack_require__(900); +var EditorState = __webpack_require__(366); +var KeyBindingUtil = __webpack_require__(817); +var RichTextEditorUtil = __webpack_require__(918); +var SelectionState = __webpack_require__(441); + +var convertFromDraftStateToRaw = __webpack_require__(1160); +var convertFromHTMLToContentBlocks = __webpack_require__(916); +var convertFromRawToDraftState = __webpack_require__(1163); +var generateRandomKey = __webpack_require__(404); +var getDefaultKeyBinding = __webpack_require__(919); +var getVisibleSelectionRect = __webpack_require__(1168); + +var DraftPublic = { + Editor: DraftEditor, + EditorBlock: DraftEditorBlock, + EditorState: EditorState, + + CompositeDecorator: CompositeDraftDecorator, + Entity: DraftEntity, + EntityInstance: DraftEntityInstance, + + BlockMapBuilder: BlockMapBuilder, + CharacterMetadata: CharacterMetadata, + ContentBlock: ContentBlock, + ContentState: ContentState, + SelectionState: SelectionState, + + AtomicBlockUtils: AtomicBlockUtils, + KeyBindingUtil: KeyBindingUtil, + Modifier: DraftModifier, + RichUtils: RichTextEditorUtil, + + DefaultDraftBlockRenderMap: DefaultDraftBlockRenderMap, + DefaultDraftInlineStyle: DefaultDraftInlineStyle, + + convertFromHTML: convertFromHTMLToContentBlocks, + convertFromRaw: convertFromRawToDraftState, + convertToRaw: convertFromDraftStateToRaw, + genKey: generateRandomKey, + getDefaultKeyBinding: getDefaultKeyBinding, + getVisibleSelectionRect: getVisibleSelectionRect +}; + +module.exports = DraftPublic; + +/***/ }), +/* 371 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/* harmony default export */ __webpack_exports__["a"] = (identity); + + +/***/ }), +/* 372 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(386); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(430); + + + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLike); + + +/***/ }), +/* 373 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(408); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFlattenable_js__ = __webpack_require__(980); + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = __WEBPACK_IMPORTED_MODULE_1__isFlattenable_js__["a" /* default */]); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + Object(__WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */])(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseFlatten); + + +/***/ }), +/* 374 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); + + +/***/ }), +/* 375 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(843); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(960); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(372); + + + + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object, true) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */])(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keysIn); + + +/***/ }), +/* 376 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(380); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(398); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(367); + + + + + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(object) && Object(__WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */])(index, object.length)) + : (type == 'string' && index in object) + ) { + return Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(object[index], value); + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); + + +/***/ }), +/* 377 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (last); + + +/***/ }), +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftModifier + * @format + * + */ + + + +var CharacterMetadata = __webpack_require__(381); +var ContentStateInlineStyle = __webpack_require__(1083); +var DraftFeatureFlags = __webpack_require__(415); +var Immutable = __webpack_require__(364); + +var applyEntityToContentState = __webpack_require__(1084); +var getCharacterRemovalRange = __webpack_require__(1086); +var getContentStateFragment = __webpack_require__(526); +var insertFragmentIntoContentState = __webpack_require__(1089); +var insertTextIntoContentState = __webpack_require__(1090); +var invariant = __webpack_require__(365); +var modifyBlockForContentState = __webpack_require__(1091); +var removeEntitiesAtEdges = __webpack_require__(896); +var removeRangeFromContentState = __webpack_require__(1092); +var splitBlockInContentState = __webpack_require__(1093); + +var OrderedSet = Immutable.OrderedSet; + +/** + * `DraftModifier` provides a set of convenience methods that apply + * modifications to a `ContentState` object based on a target `SelectionState`. + * + * Any change to a `ContentState` should be decomposable into a series of + * transaction functions that apply the required changes and return output + * `ContentState` objects. + * + * These functions encapsulate some of the most common transaction sequences. + */ + +var DraftModifier = { + replaceText: function replaceText(contentState, rangeToReplace, text, inlineStyle, entityKey) { + var withoutEntities = removeEntitiesAtEdges(contentState, rangeToReplace); + var withoutText = removeRangeFromContentState(withoutEntities, rangeToReplace); + + var character = CharacterMetadata.create({ + style: inlineStyle || OrderedSet(), + entity: entityKey || null + }); + + return insertTextIntoContentState(withoutText, withoutText.getSelectionAfter(), text, character); + }, + + insertText: function insertText(contentState, targetRange, text, inlineStyle, entityKey) { + !targetRange.isCollapsed() ? true ? invariant(false, 'Target range must be collapsed for `insertText`.') : invariant(false) : void 0; + return DraftModifier.replaceText(contentState, targetRange, text, inlineStyle, entityKey); + }, + + moveText: function moveText(contentState, removalRange, targetRange) { + var movedFragment = getContentStateFragment(contentState, removalRange); + + var afterRemoval = DraftModifier.removeRange(contentState, removalRange, 'backward'); + + return DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment); + }, + + replaceWithFragment: function replaceWithFragment(contentState, targetRange, fragment) { + var withoutEntities = removeEntitiesAtEdges(contentState, targetRange); + var withoutText = removeRangeFromContentState(withoutEntities, targetRange); + + return insertFragmentIntoContentState(withoutText, withoutText.getSelectionAfter(), fragment); + }, + + removeRange: function removeRange(contentState, rangeToRemove, removalDirection) { + var startKey = void 0, + endKey = void 0, + startBlock = void 0, + endBlock = void 0; + if (rangeToRemove.getIsBackward()) { + rangeToRemove = rangeToRemove.merge({ + anchorKey: rangeToRemove.getFocusKey(), + anchorOffset: rangeToRemove.getFocusOffset(), + focusKey: rangeToRemove.getAnchorKey(), + focusOffset: rangeToRemove.getAnchorOffset(), + isBackward: false + }); + } + startKey = rangeToRemove.getAnchorKey(); + endKey = rangeToRemove.getFocusKey(); + startBlock = contentState.getBlockForKey(startKey); + endBlock = contentState.getBlockForKey(endKey); + var startOffset = rangeToRemove.getStartOffset(); + var endOffset = rangeToRemove.getEndOffset(); + + var startEntityKey = startBlock.getEntityAt(startOffset); + var endEntityKey = endBlock.getEntityAt(endOffset - 1); + + // Check whether the selection state overlaps with a single entity. + // If so, try to remove the appropriate substring of the entity text. + if (startKey === endKey) { + if (startEntityKey && startEntityKey === endEntityKey) { + var _adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection); + return removeRangeFromContentState(contentState, _adjustedRemovalRange); + } + } + var adjustedRemovalRange = rangeToRemove; + if (DraftFeatureFlags.draft_segmented_entities_behavior) { + // Adjust the selection to properly delete segemented and immutable + // entities + adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection); + } + + var withoutEntities = removeEntitiesAtEdges(contentState, adjustedRemovalRange); + return removeRangeFromContentState(withoutEntities, adjustedRemovalRange); + }, + + splitBlock: function splitBlock(contentState, selectionState) { + var withoutEntities = removeEntitiesAtEdges(contentState, selectionState); + var withoutText = removeRangeFromContentState(withoutEntities, selectionState); + + return splitBlockInContentState(withoutText, withoutText.getSelectionAfter()); + }, + + applyInlineStyle: function applyInlineStyle(contentState, selectionState, inlineStyle) { + return ContentStateInlineStyle.add(contentState, selectionState, inlineStyle); + }, + + removeInlineStyle: function removeInlineStyle(contentState, selectionState, inlineStyle) { + return ContentStateInlineStyle.remove(contentState, selectionState, inlineStyle); + }, + + setBlockType: function setBlockType(contentState, selectionState, blockType) { + return modifyBlockForContentState(contentState, selectionState, function (block) { + return block.merge({ type: blockType, depth: 0 }); + }); + }, + + setBlockData: function setBlockData(contentState, selectionState, blockData) { + return modifyBlockForContentState(contentState, selectionState, function (block) { + return block.merge({ data: blockData }); + }); + }, + + mergeBlockData: function mergeBlockData(contentState, selectionState, blockData) { + return modifyBlockForContentState(contentState, selectionState, function (block) { + return block.merge({ data: block.getData().merge(blockData) }); + }); + }, + + applyEntity: function applyEntity(contentState, selectionState, entityKey) { + var withoutEntities = removeEntitiesAtEdges(contentState, selectionState); + return applyEntityToContentState(withoutEntities, selectionState, entityKey); + } +}; + +module.exports = DraftModifier; + +/***/ }), +/* 379 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == symbolTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isSymbol); + + +/***/ }), +/* 380 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/* harmony default export */ __webpack_exports__["a"] = (eq); + + +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CharacterMetadata + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _require = __webpack_require__(364), + Map = _require.Map, + OrderedSet = _require.OrderedSet, + Record = _require.Record; + +// Immutable.map is typed such that the value for every key in the map +// must be the same type + + +var EMPTY_SET = OrderedSet(); + +var defaultRecord = { + style: EMPTY_SET, + entity: null +}; + +var CharacterMetadataRecord = Record(defaultRecord); + +var CharacterMetadata = function (_CharacterMetadataRec) { + _inherits(CharacterMetadata, _CharacterMetadataRec); + + function CharacterMetadata() { + _classCallCheck(this, CharacterMetadata); + + return _possibleConstructorReturn(this, _CharacterMetadataRec.apply(this, arguments)); + } + + CharacterMetadata.prototype.getStyle = function getStyle() { + return this.get('style'); + }; + + CharacterMetadata.prototype.getEntity = function getEntity() { + return this.get('entity'); + }; + + CharacterMetadata.prototype.hasStyle = function hasStyle(style) { + return this.getStyle().includes(style); + }; + + CharacterMetadata.applyStyle = function applyStyle(record, style) { + var withStyle = record.set('style', record.getStyle().add(style)); + return CharacterMetadata.create(withStyle); + }; + + CharacterMetadata.removeStyle = function removeStyle(record, style) { + var withoutStyle = record.set('style', record.getStyle().remove(style)); + return CharacterMetadata.create(withoutStyle); + }; + + CharacterMetadata.applyEntity = function applyEntity(record, entityKey) { + var withEntity = record.getEntity() === entityKey ? record : record.set('entity', entityKey); + return CharacterMetadata.create(withEntity); + }; + + /** + * Use this function instead of the `CharacterMetadata` constructor. + * Since most content generally uses only a very small number of + * style/entity permutations, we can reuse these objects as often as + * possible. + */ + + + CharacterMetadata.create = function create(config) { + if (!config) { + return EMPTY; + } + + var defaultConfig = { + style: EMPTY_SET, + entity: null + }; + + // Fill in unspecified properties, if necessary. + var configMap = Map(defaultConfig).merge(config); + + var existing = pool.get(configMap); + if (existing) { + return existing; + } + + var newCharacter = new CharacterMetadata(configMap); + pool = pool.set(configMap, newCharacter); + return newCharacter; + }; + + return CharacterMetadata; +}(CharacterMetadataRecord); + +var EMPTY = new CharacterMetadata(); +var pool = Map([[Map(defaultRecord), EMPTY]]); + +CharacterMetadata.EMPTY = EMPTY; + +module.exports = CharacterMetadata; + +/***/ }), +/* 382 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/* harmony default export */ __webpack_exports__["a"] = (apply); + + +/***/ }), +/* 383 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyArray); + + +/***/ }), +/* 384 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUnary); + + +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ContentBlockNode + * @format + * + * + * This file is a fork of ContentBlock adding support for nesting references by + * providing links to children, parent, prevSibling, and nextSibling. + * + * This is unstable and not part of the public API and should not be used by + * production systems. This file may be update/removed without notice. + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var CharacterMetadata = __webpack_require__(381); +var Immutable = __webpack_require__(364); + +var findRangesImmutable = __webpack_require__(460); + +var List = Immutable.List, + Map = Immutable.Map, + OrderedSet = Immutable.OrderedSet, + Record = Immutable.Record, + Repeat = Immutable.Repeat; + + +var EMPTY_SET = OrderedSet(); + +var defaultRecord = { + parent: null, + characterList: List(), + data: Map(), + depth: 0, + key: '', + text: '', + type: 'unstyled', + children: List(), + prevSibling: null, + nextSibling: null +}; + +var haveEqualStyle = function haveEqualStyle(charA, charB) { + return charA.getStyle() === charB.getStyle(); +}; + +var haveEqualEntity = function haveEqualEntity(charA, charB) { + return charA.getEntity() === charB.getEntity(); +}; + +var decorateCharacterList = function decorateCharacterList(config) { + if (!config) { + return config; + } + + var characterList = config.characterList, + text = config.text; + + + if (text && !characterList) { + config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length)); + } + + return config; +}; + +var ContentBlockNode = function (_Record) { + _inherits(ContentBlockNode, _Record); + + function ContentBlockNode() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultRecord; + + _classCallCheck(this, ContentBlockNode); + + return _possibleConstructorReturn(this, _Record.call(this, decorateCharacterList(props))); + } + + ContentBlockNode.prototype.getKey = function getKey() { + return this.get('key'); + }; + + ContentBlockNode.prototype.getType = function getType() { + return this.get('type'); + }; + + ContentBlockNode.prototype.getText = function getText() { + return this.get('text'); + }; + + ContentBlockNode.prototype.getCharacterList = function getCharacterList() { + return this.get('characterList'); + }; + + ContentBlockNode.prototype.getLength = function getLength() { + return this.getText().length; + }; + + ContentBlockNode.prototype.getDepth = function getDepth() { + return this.get('depth'); + }; + + ContentBlockNode.prototype.getData = function getData() { + return this.get('data'); + }; + + ContentBlockNode.prototype.getInlineStyleAt = function getInlineStyleAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getStyle() : EMPTY_SET; + }; + + ContentBlockNode.prototype.getEntityAt = function getEntityAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getEntity() : null; + }; + + ContentBlockNode.prototype.getChildKeys = function getChildKeys() { + return this.get('children'); + }; + + ContentBlockNode.prototype.getParentKey = function getParentKey() { + return this.get('parent'); + }; + + ContentBlockNode.prototype.getPrevSiblingKey = function getPrevSiblingKey() { + return this.get('prevSibling'); + }; + + ContentBlockNode.prototype.getNextSiblingKey = function getNextSiblingKey() { + return this.get('nextSibling'); + }; + + ContentBlockNode.prototype.findStyleRanges = function findStyleRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback); + }; + + ContentBlockNode.prototype.findEntityRanges = function findEntityRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback); + }; + + return ContentBlockNode; +}(Record(defaultRecord)); + +module.exports = ContentBlockNode; + +/***/ }), +/* 386 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(367); + + + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (isFunction); + + +/***/ }), +/* 387 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseSlice); + + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + */ + +var nullthrows = function nullthrows(x) { + if (x != null) { + return x; + } + throw new Error("Got unexpected null or undefined"); +}; + +module.exports = nullthrows; + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/* eslint-disable no-param-reassign */ + +/** + * Returns the highest last index of an array of characters. + */ +var getLastIndexOf = exports.getLastIndexOf = function getLastIndexOf(string) { + var characters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + return characters.reduce(function (accumulator, character) { + return Math.max(string.lastIndexOf(character), accumulator); + }, -1); +}; + +/** + * Simple templating function that replaces ${data} with a key value. + */ +var get = function get(path, obj) { + var fb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '${' + path + '}'; + return path.split('.').reduce(function (res, key) { + return res[key] || fb; + }, obj); +}; + +var parseTemplate = exports.parseTemplate = function parseTemplate(template, map, fallback) { + return template.replace(/\$\{.+?}/g, function (match) { + var path = match.substr(2, match.length - 3).trim(); + return get(path, map, fallback); + }); +}; + +/** + * Returns boolean if selection contains entity + */ +var hasEntityAtSelection = exports.hasEntityAtSelection = function hasEntityAtSelection(editorState) { + var selectionState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var selection = selectionState || editorState.getSelection(); + if (!selection.getHasFocus()) return false; + var contentState = editorState.getCurrentContent(); + var block = contentState.getBlockForKey(selection.getStartKey()); + var entityKey = block.getEntityAt(selection.getStartOffset() - 1); + if (!entityKey) return false; + return contentState.getEntity(entityKey); +}; + +/** + * Gets the range of an autocomplete trigger from the trigger character to where + * the user is typing. + */ +var getTriggerRange = exports.getTriggerRange = function getTriggerRange(triggers) { + var selection = window.getSelection(); + if (selection.rangeCount === 0) return null; + var range = selection.getRangeAt(0); + var text = range.startContainer.textContent.substring(0, range.startOffset); + + // If the last character is a space bail. + if (/\s+$/.test(text)) return null; + + var index = getLastIndexOf(text, triggers); + if (index === -1) return null; + + return { + text: text.substring(index), + start: index, + end: range.startOffset + }; +}; + +/** + * Gets the autocomplete insert range to replace the trigger range with an enitity. + */ +var getInsertRange = exports.getInsertRange = function getInsertRange(autocompleteState, editorState) { + var currentSelectionState = editorState.getSelection(); + var end = currentSelectionState.getAnchorOffset(); + var anchorKey = currentSelectionState.getAnchorKey(); + var currentContent = editorState.getCurrentContent(); + var currentBlock = currentContent.getBlockForKey(anchorKey); + var blockText = currentBlock.getText(); + var start = blockText.substring(0, end).lastIndexOf(autocompleteState.trigger); + + return { + start: start, + end: end + }; +}; + +/** + * Returns a number of the top position of trigger range to poistion the suggestion popover. + */ +var getTopPosition = exports.getTopPosition = function getTopPosition(range, parent) { + var tempRange = window.getSelection().getRangeAt(0).cloneRange(); + tempRange.setStart(tempRange.startContainer, range.start); + var parentRect = parent.getBoundingClientRect(); + var rect = tempRange.getBoundingClientRect(); + return rect.top - parentRect.top + rect.height; +}; + +/** + * If an element is hidden in a scrollable box then make it visible. + */ +var scrollElementIfNotInView = exports.scrollElementIfNotInView = function scrollElementIfNotInView(childElement, parentElement) { + var parentClientRect = parentElement.getBoundingClientRect(); + var parentBottom = parentClientRect.bottom; + var parentTop = parentClientRect.top; + + var childRect = childElement.getBoundingClientRect(); + var childBottom = childRect.bottom; + var childTop = childRect.top; + if (childBottom > parentBottom) parentElement.scrollTop += childRect.height; + if (childTop < parentTop) parentElement.scrollTop -= childRect.height; +}; + +/** + * Returns an array of all the blocks at a selection given a start and end key. + */ +var getSelectedBlocks = exports.getSelectedBlocks = function getSelectedBlocks(contentState, anchorKey, focusKey) { + var isSameBlock = anchorKey === focusKey; + var startingBlock = contentState.getBlockForKey(anchorKey); + var selectedBlocks = [startingBlock]; + + if (!isSameBlock) { + var blockKey = anchorKey; + + while (blockKey !== focusKey) { + var nextBlock = contentState.getBlockAfter(blockKey); + selectedBlocks.push(nextBlock); + blockKey = nextBlock.getKey(); + } + } + + return selectedBlocks; +}; + +/** + * Check if a focusable block is focused/selected + */ +var focusableBlockIsSelected = exports.focusableBlockIsSelected = function focusableBlockIsSelected(editorState) { + var selection = editorState.getSelection(); + if (selection.getAnchorKey() !== selection.getFocusKey()) { + return false; + } + var content = editorState.getCurrentContent(); + var block = content.getBlockForKey(selection.getAnchorKey()); + if (block.getType() === 'atomic') return block; + return false; +}; + +/** + * Get the most suitable image size. + * @param {object} image + * @param {string} selectedSize + */ +var getImageSize = exports.getImageSize = function getImageSize(sizes, defaultSize) { + if (!sizes) return ''; + if (sizes[defaultSize]) { + return sizes[defaultSize].source_url || sizes[defaultSize].url; + } + if (sizes.full) { + return sizes.full.source_url || sizes.full.url; + } + return ''; +}; + +/** + * Map a NamedNodeMap to an object and map the class attribute to className + * for React. + * @param {namedNodeMap} attributes + */ +var namedNodeMapToObject = exports.namedNodeMapToObject = function namedNodeMapToObject(namedNodeMap) { + return Array.from(namedNodeMap).reduce(function (object, item) { + return _extends({}, object, _defineProperty({}, item.name === 'class' ? 'className' : item.name, item.value)); + }, {}); +}; + +/***/ }), +/* 390 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(99); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(379); + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { + // Recursively convert values (susceptible to call stack limits). + return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(value, baseToString) + ''; + } + if (Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseToString); + + +/***/ }), +/* 391 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(367); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(379); + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(value)) { + return NAN; + } + if (Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ __webpack_exports__["a"] = (toNumber); + + +/***/ }), +/* 392 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(445); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(399); + + + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + Object(__WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */])(object, key, newValue); + } else { + Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(object, key, newValue); + } + } + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyObject); + + +/***/ }), +/* 393 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(379); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (toKey); + + +/***/ }), +/* 394 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(371); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]; +} + +/* harmony default export */ __webpack_exports__["a"] = (castFunction); + + +/***/ }), +/* 395 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + + + +var UserAgentData = __webpack_require__(1104); +var VersionRange = __webpack_require__(1106); + +var mapObject = __webpack_require__(1107); +var memoizeStringOnly = __webpack_require__(1108); + +/** + * Checks to see whether `name` and `version` satisfy `query`. + * + * @param {string} name Name of the browser, device, engine or platform + * @param {?string} version Version of the browser, engine or platform + * @param {string} query Query of form "Name [range expression]" + * @param {?function} normalizer Optional pre-processor for range expression + * @return {boolean} + */ +function compare(name, version, query, normalizer) { + // check for exact match with no version + if (name === query) { + return true; + } + + // check for non-matching names + if (!query.startsWith(name)) { + return false; + } + + // full comparison with version + var range = query.slice(name.length); + if (version) { + range = normalizer ? normalizer(range) : range; + return VersionRange.contains(range, version); + } + + return false; +} + +/** + * Normalizes `version` by stripping any "NT" prefix, but only on the Windows + * platform. + * + * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class. + * + * @param {string} version + * @return {string} + */ +function normalizePlatformVersion(version) { + if (UserAgentData.platformName === 'Windows') { + return version.replace(/^\s*NT/, ''); + } + + return version; +} + +/** + * Provides client-side access to the authoritative PHP-generated User Agent + * information supplied by the server. + */ +var UserAgent = { + /** + * Check if the User Agent browser matches `query`. + * + * `query` should be a string like "Chrome" or "Chrome > 33". + * + * Valid browser names include: + * + * - ACCESS NetFront + * - AOL + * - Amazon Silk + * - Android + * - BlackBerry + * - BlackBerry PlayBook + * - Chrome + * - Chrome for iOS + * - Chrome frame + * - Facebook PHP SDK + * - Facebook for iOS + * - Firefox + * - IE + * - IE Mobile + * - Mobile Safari + * - Motorola Internet Browser + * - Nokia + * - Openwave Mobile Browser + * - Opera + * - Opera Mini + * - Opera Mobile + * - Safari + * - UIWebView + * - Unknown + * - webOS + * - etc... + * + * An authoritative list can be found in the PHP `BrowserDetector` class and + * related classes in the same file (see calls to `new UserAgentBrowser` here: + * https://fburl.com/50728104). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isBrowser: function isBrowser(query) { + return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query); + }, + + + /** + * Check if the User Agent browser uses a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isBrowserArchitecture: function isBrowserArchitecture(query) { + return compare(UserAgentData.browserArchitecture, null, query); + }, + + + /** + * Check if the User Agent device matches `query`. + * + * `query` should be a string like "iPhone" or "iPad". + * + * Valid device names include: + * + * - Kindle + * - Kindle Fire + * - Unknown + * - iPad + * - iPhone + * - iPod + * - etc... + * + * An authoritative list can be found in the PHP `DeviceDetector` class and + * related classes in the same file (see calls to `new UserAgentDevice` here: + * https://fburl.com/50728332). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name" + * @return {boolean} + */ + isDevice: function isDevice(query) { + return compare(UserAgentData.deviceName, null, query); + }, + + + /** + * Check if the User Agent rendering engine matches `query`. + * + * `query` should be a string like "WebKit" or "WebKit >= 537". + * + * Valid engine names include: + * + * - Gecko + * - Presto + * - Trident + * - WebKit + * - etc... + * + * An authoritative list can be found in the PHP `RenderingEngineDetector` + * class related classes in the same file (see calls to `new + * UserAgentRenderingEngine` here: https://fburl.com/50728617). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isEngine: function isEngine(query) { + return compare(UserAgentData.engineName, UserAgentData.engineVersion, query); + }, + + + /** + * Check if the User Agent platform matches `query`. + * + * `query` should be a string like "Windows" or "iOS 5 - 6". + * + * Valid platform names include: + * + * - Android + * - BlackBerry OS + * - Java ME + * - Linux + * - Mac OS X + * - Mac OS X Calendar + * - Mac OS X Internet Account + * - Symbian + * - SymbianOS + * - Windows + * - Windows Mobile + * - Windows Phone + * - iOS + * - iOS Facebook Integration Account + * - iOS Facebook Social Sharing UI + * - webOS + * - Chrome OS + * - etc... + * + * An authoritative list can be found in the PHP `PlatformDetector` class and + * related classes in the same file (see calls to `new UserAgentPlatform` + * here: https://fburl.com/50729226). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isPlatform: function isPlatform(query) { + return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion); + }, + + + /** + * Check if the User Agent platform is a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isPlatformArchitecture: function isPlatformArchitecture(query) { + return compare(UserAgentData.platformArchitecture, null, query); + } +}; + +module.exports = mapObject(UserAgent, memoizeStringOnly); + +/***/ }), +/* 396 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetData_js__ = __webpack_require__(824); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createBind_js__ = __webpack_require__(946); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createCurry_js__ = __webpack_require__(947); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createHybrid_js__ = __webpack_require__(536); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createPartial_js__ = __webpack_require__(955); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__getData_js__ = __webpack_require__(537); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mergeData_js__ = __webpack_require__(956); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__setData_js__ = __webpack_require__(837); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__setWrapToString_js__ = __webpack_require__(839); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__toInteger_js__ = __webpack_require__(362); + + + + + + + + + + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(Object(__WEBPACK_IMPORTED_MODULE_9__toInteger_js__["a" /* default */])(ary), 0); + arity = arity === undefined ? arity : Object(__WEBPACK_IMPORTED_MODULE_9__toInteger_js__["a" /* default */])(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : Object(__WEBPACK_IMPORTED_MODULE_5__getData_js__["a" /* default */])(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + Object(__WEBPACK_IMPORTED_MODULE_6__mergeData_js__["a" /* default */])(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = Object(__WEBPACK_IMPORTED_MODULE_1__createBind_js__["a" /* default */])(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = Object(__WEBPACK_IMPORTED_MODULE_2__createCurry_js__["a" /* default */])(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = Object(__WEBPACK_IMPORTED_MODULE_4__createPartial_js__["a" /* default */])(func, bitmask, thisArg, partials); + } else { + result = __WEBPACK_IMPORTED_MODULE_3__createHybrid_js__["a" /* default */].apply(undefined, newData); + } + var setter = data ? __WEBPACK_IMPORTED_MODULE_0__baseSetData_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_7__setData_js__["a" /* default */]; + return Object(__WEBPACK_IMPORTED_MODULE_8__setWrapToString_js__["a" /* default */])(setter(result, newData), func, bitmask); +} + +/* harmony default export */ __webpack_exports__["a"] = (createWrap); + + +/***/ }), +/* 397 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(426); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseLodash_js__ = __webpack_require__(467); + + + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__baseLodash_js__["a" /* default */].prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +/* harmony default export */ __webpack_exports__["a"] = (LazyWrapper); + + +/***/ }), +/* 398 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +/* harmony default export */ __webpack_exports__["a"] = (isIndex); + + +/***/ }), +/* 399 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(840); + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { + Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + + +/***/ }), +/* 400 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(447); + + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(156)(module))) + +/***/ }), +/* 401 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__flatten_js__ = __webpack_require__(476); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(842); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(538); + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return Object(__WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */])(func, undefined, __WEBPACK_IMPORTED_MODULE_0__flatten_js__["a" /* default */]), func + ''); +} + +/* harmony default export */ __webpack_exports__["a"] = (flatRest); + + +/***/ }), +/* 402 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(484); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayEach_js__ = __webpack_require__(420); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__assignValue_js__ = __webpack_require__(445); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseAssign_js__ = __webpack_require__(846); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseAssignIn_js__ = __webpack_require__(992); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__cloneBuffer_js__ = __webpack_require__(847); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__copyArray_js__ = __webpack_require__(383); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__copySymbols_js__ = __webpack_require__(993); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__copySymbolsIn_js__ = __webpack_require__(994); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__getAllKeys_js__ = __webpack_require__(849); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__getAllKeysIn_js__ = __webpack_require__(560); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__getTag_js__ = __webpack_require__(403); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__initCloneArray_js__ = __webpack_require__(997); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__initCloneByTag_js__ = __webpack_require__(998); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__initCloneObject_js__ = __webpack_require__(854); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__isBuffer_js__ = __webpack_require__(400); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__isMap_js__ = __webpack_require__(485); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__isObject_js__ = __webpack_require__(367); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__isSet_js__ = __webpack_require__(486); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__keys_js__ = __webpack_require__(369); + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!Object(__WEBPACK_IMPORTED_MODULE_18__isObject_js__["a" /* default */])(value)) { + return value; + } + var isArr = Object(__WEBPACK_IMPORTED_MODULE_15__isArray_js__["a" /* default */])(value); + if (isArr) { + result = Object(__WEBPACK_IMPORTED_MODULE_12__initCloneArray_js__["a" /* default */])(value); + if (!isDeep) { + return Object(__WEBPACK_IMPORTED_MODULE_6__copyArray_js__["a" /* default */])(value, result); + } + } else { + var tag = Object(__WEBPACK_IMPORTED_MODULE_11__getTag_js__["a" /* default */])(value), + isFunc = tag == funcTag || tag == genTag; + + if (Object(__WEBPACK_IMPORTED_MODULE_16__isBuffer_js__["a" /* default */])(value)) { + return Object(__WEBPACK_IMPORTED_MODULE_5__cloneBuffer_js__["a" /* default */])(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : Object(__WEBPACK_IMPORTED_MODULE_14__initCloneObject_js__["a" /* default */])(value); + if (!isDeep) { + return isFlat + ? Object(__WEBPACK_IMPORTED_MODULE_8__copySymbolsIn_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_4__baseAssignIn_js__["a" /* default */])(result, value)) + : Object(__WEBPACK_IMPORTED_MODULE_7__copySymbols_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_3__baseAssign_js__["a" /* default */])(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = Object(__WEBPACK_IMPORTED_MODULE_13__initCloneByTag_js__["a" /* default */])(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (Object(__WEBPACK_IMPORTED_MODULE_19__isSet_js__["a" /* default */])(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (Object(__WEBPACK_IMPORTED_MODULE_17__isMap_js__["a" /* default */])(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? __WEBPACK_IMPORTED_MODULE_10__getAllKeysIn_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_9__getAllKeys_js__["a" /* default */]) + : (isFlat ? keysIn : __WEBPACK_IMPORTED_MODULE_20__keys_js__["a" /* default */]); + + var props = isArr ? undefined : keysFunc(value); + Object(__WEBPACK_IMPORTED_MODULE_1__arrayEach_js__["a" /* default */])(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + Object(__WEBPACK_IMPORTED_MODULE_2__assignValue_js__["a" /* default */])(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseClone); + + +/***/ }), +/* 403 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(995); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(547); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(996); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(851); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(826); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(829); + + + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), + mapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), + promiseCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), + setCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), + weakMapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || + (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || + (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || + (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || + (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { + getTag = function(value) { + var result = Object(__WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */])(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (getTag); + + +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule generateRandomKey + * @format + * + */ + + + +var seenKeys = {}; +var MULTIPLIER = Math.pow(2, 24); + +function generateRandomKey() { + var key = void 0; + while (key === undefined || seenKeys.hasOwnProperty(key) || !isNaN(+key)) { + key = Math.floor(Math.random() * MULTIPLIER).toString(32); + } + seenKeys[key] = true; + return key; +} + +module.exports = generateRandomKey; + +/***/ }), +/* 405 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(957); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */])(function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isArguments); + + +/***/ }), +/* 406 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(958); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(431); + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); + + +/***/ }), +/* 407 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(545); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(844); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + return value; + } + return Object(__WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */])(value, object) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (castPath); + + +/***/ }), +/* 408 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayPush); + + +/***/ }), +/* 409 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); + + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, start, end); +} + +/* harmony default export */ __webpack_exports__["a"] = (castSlice); + + +/***/ }), +/* 410 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__asciiToArray_js__ = __webpack_require__(981); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasUnicode_js__ = __webpack_require__(433); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__unicodeToArray_js__ = __webpack_require__(982); + + + + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return Object(__WEBPACK_IMPORTED_MODULE_1__hasUnicode_js__["a" /* default */])(string) + ? Object(__WEBPACK_IMPORTED_MODULE_2__unicodeToArray_js__["a" /* default */])(string) + : Object(__WEBPACK_IMPORTED_MODULE_0__asciiToArray_js__["a" /* default */])(string); +} + +/* harmony default export */ __webpack_exports__["a"] = (stringToArray); + + +/***/ }), +/* 411 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); + + +/***/ }), +/* 412 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseForOwn_js__ = __webpack_require__(413); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createBaseEach_js__ = __webpack_require__(863); + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = Object(__WEBPACK_IMPORTED_MODULE_1__createBaseEach_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseForOwn_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (baseEach); + + +/***/ }), +/* 413 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */])(object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); + + +/***/ }), +/* 414 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseValues_js__ = __webpack_require__(635); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : Object(__WEBPACK_IMPORTED_MODULE_0__baseValues_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (values); + + +/***/ }), +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftFeatureFlags + * @format + * + */ + + + +var DraftFeatureFlags = __webpack_require__(1082); + +module.exports = DraftFeatureFlags; + +/***/ }), +/* 416 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toNumber_js__ = __webpack_require__(391); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = Object(__WEBPACK_IMPORTED_MODULE_0__toNumber_js__["a" /* default */])(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (toFinite); + + +/***/ }), +/* 417 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(827); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(945); + + + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = Object(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (getNative); + + +/***/ }), +/* 418 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LazyWrapper_js__ = __webpack_require__(397); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__LodashWrapper_js__ = __webpack_require__(419); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseLodash_js__ = __webpack_require__(467); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObjectLike_js__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wrapperClone_js__ = __webpack_require__(836); + + + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (Object(__WEBPACK_IMPORTED_MODULE_4__isObjectLike_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value) && !(value instanceof __WEBPACK_IMPORTED_MODULE_0__LazyWrapper_js__["a" /* default */])) { + if (value instanceof __WEBPACK_IMPORTED_MODULE_1__LodashWrapper_js__["a" /* default */]) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return Object(__WEBPACK_IMPORTED_MODULE_5__wrapperClone_js__["a" /* default */])(value); + } + } + return new __WEBPACK_IMPORTED_MODULE_1__LodashWrapper_js__["a" /* default */](value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = __WEBPACK_IMPORTED_MODULE_2__baseLodash_js__["a" /* default */].prototype; +lodash.prototype.constructor = lodash; + +/* harmony default export */ __webpack_exports__["a"] = (lodash); + + +/***/ }), +/* 419 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(426); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseLodash_js__ = __webpack_require__(467); + + + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__baseLodash_js__["a" /* default */].prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +/* harmony default export */ __webpack_exports__["a"] = (LodashWrapper); + + +/***/ }), +/* 420 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayEach); + + +/***/ }), +/* 421 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (replaceHolders); + + +/***/ }), +/* 422 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseClamp); + + +/***/ }), +/* 423 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(489); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayIncludes_js__ = __webpack_require__(468); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__arrayIncludesWith_js__ = __webpack_require__(587); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__cacheHas_js__ = __webpack_require__(490); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createSet_js__ = __webpack_require__(1052); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(491); + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = __WEBPACK_IMPORTED_MODULE_1__arrayIncludes_js__["a" /* default */], + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = __WEBPACK_IMPORTED_MODULE_2__arrayIncludesWith_js__["a" /* default */]; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : Object(__WEBPACK_IMPORTED_MODULE_4__createSet_js__["a" /* default */])(array); + if (set) { + return Object(__WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */])(set); + } + isCommon = false; + includes = __WEBPACK_IMPORTED_MODULE_3__cacheHas_js__["a" /* default */]; + seen = new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */]; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUniq); + + +/***/ }), +/* 424 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ContentBlock + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var CharacterMetadata = __webpack_require__(381); +var Immutable = __webpack_require__(364); + +var findRangesImmutable = __webpack_require__(460); + +var List = Immutable.List, + Map = Immutable.Map, + OrderedSet = Immutable.OrderedSet, + Record = Immutable.Record, + Repeat = Immutable.Repeat; + + +var EMPTY_SET = OrderedSet(); + +var defaultRecord = { + key: '', + type: 'unstyled', + text: '', + characterList: List(), + depth: 0, + data: Map() +}; + +var ContentBlockRecord = Record(defaultRecord); + +var decorateCharacterList = function decorateCharacterList(config) { + if (!config) { + return config; + } + + var characterList = config.characterList, + text = config.text; + + + if (text && !characterList) { + config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length)); + } + + return config; +}; + +var ContentBlock = function (_ContentBlockRecord) { + _inherits(ContentBlock, _ContentBlockRecord); + + function ContentBlock(config) { + _classCallCheck(this, ContentBlock); + + return _possibleConstructorReturn(this, _ContentBlockRecord.call(this, decorateCharacterList(config))); + } + + ContentBlock.prototype.getKey = function getKey() { + return this.get('key'); + }; + + ContentBlock.prototype.getType = function getType() { + return this.get('type'); + }; + + ContentBlock.prototype.getText = function getText() { + return this.get('text'); + }; + + ContentBlock.prototype.getCharacterList = function getCharacterList() { + return this.get('characterList'); + }; + + ContentBlock.prototype.getLength = function getLength() { + return this.getText().length; + }; + + ContentBlock.prototype.getDepth = function getDepth() { + return this.get('depth'); + }; + + ContentBlock.prototype.getData = function getData() { + return this.get('data'); + }; + + ContentBlock.prototype.getInlineStyleAt = function getInlineStyleAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getStyle() : EMPTY_SET; + }; + + ContentBlock.prototype.getEntityAt = function getEntityAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getEntity() : null; + }; + + /** + * Execute a callback for every contiguous range of styles within the block. + */ + + + ContentBlock.prototype.findStyleRanges = function findStyleRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback); + }; + + /** + * Execute a callback for every contiguous range of entities within the block. + */ + + + ContentBlock.prototype.findEntityRanges = function findEntityRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback); + }; + + return ContentBlock; +}(ContentBlockRecord); + +function haveEqualStyle(charA, charB) { + return charA.getStyle() === charB.getStyle(); +} + +function haveEqualEntity(charA, charB) { + return charA.getEntity() === charB.getEntity(); +} + +module.exports = ContentBlock; + +/***/ }), +/* 425 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @typechecks + */ + +/** + * Unicode-enabled replacesments for basic String functions. + * + * All the functions in this module assume that the input string is a valid + * UTF-16 encoding of a Unicode sequence. If it's not the case, the behavior + * will be undefined. + * + * WARNING: Since this module is typechecks-enforced, you may find new bugs + * when replacing normal String functions with ones provided here. + */ + + + +var invariant = __webpack_require__(365); + +// These two ranges are consecutive so anything in [HIGH_START, LOW_END] is a +// surrogate code unit. +var SURROGATE_HIGH_START = 0xD800; +var SURROGATE_HIGH_END = 0xDBFF; +var SURROGATE_LOW_START = 0xDC00; +var SURROGATE_LOW_END = 0xDFFF; +var SURROGATE_UNITS_REGEX = /[\uD800-\uDFFF]/; + +/** + * @param {number} codeUnit A Unicode code-unit, in range [0, 0x10FFFF] + * @return {boolean} Whether code-unit is in a surrogate (hi/low) range + */ +function isCodeUnitInSurrogateRange(codeUnit) { + return SURROGATE_HIGH_START <= codeUnit && codeUnit <= SURROGATE_LOW_END; +} + +/** + * Returns whether the two characters starting at `index` form a surrogate pair. + * For example, given the string s = "\uD83D\uDE0A", (s, 0) returns true and + * (s, 1) returns false. + * + * @param {string} str + * @param {number} index + * @return {boolean} + */ +function isSurrogatePair(str, index) { + !(0 <= index && index < str.length) ? true ? invariant(false, 'isSurrogatePair: Invalid index %s for string length %s.', index, str.length) : invariant(false) : void 0; + if (index + 1 === str.length) { + return false; + } + var first = str.charCodeAt(index); + var second = str.charCodeAt(index + 1); + return SURROGATE_HIGH_START <= first && first <= SURROGATE_HIGH_END && SURROGATE_LOW_START <= second && second <= SURROGATE_LOW_END; +} + +/** + * @param {string} str Non-empty string + * @return {boolean} True if the input includes any surrogate code units + */ +function hasSurrogateUnit(str) { + return SURROGATE_UNITS_REGEX.test(str); +} + +/** + * Return the length of the original Unicode character at given position in the + * String by looking into the UTF-16 code unit; that is equal to 1 for any + * non-surrogate characters in BMP ([U+0000..U+D7FF] and [U+E000, U+FFFF]); and + * returns 2 for the hi/low surrogates ([U+D800..U+DFFF]), which are in fact + * representing non-BMP characters ([U+10000..U+10FFFF]). + * + * Examples: + * - '\u0020' => 1 + * - '\u3020' => 1 + * - '\uD835' => 2 + * - '\uD835\uDDEF' => 2 + * - '\uDDEF' => 2 + * + * @param {string} str Non-empty string + * @param {number} pos Position in the string to look for one code unit + * @return {number} Number 1 or 2 + */ +function getUTF16Length(str, pos) { + return 1 + isCodeUnitInSurrogateRange(str.charCodeAt(pos)); +} + +/** + * Fully Unicode-enabled replacement for String#length + * + * @param {string} str Valid Unicode string + * @return {number} The number of Unicode characters in the string + */ +function strlen(str) { + // Call the native functions if there's no surrogate char + if (!hasSurrogateUnit(str)) { + return str.length; + } + + var len = 0; + for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) { + len++; + } + return len; +} + +/** + * Fully Unicode-enabled replacement for String#substr() + * + * @param {string} str Valid Unicode string + * @param {number} start Location in Unicode sequence to begin extracting + * @param {?number} length The number of Unicode characters to extract + * (default: to the end of the string) + * @return {string} Extracted sub-string + */ +function substr(str, start, length) { + start = start || 0; + length = length === undefined ? Infinity : length || 0; + + // Call the native functions if there's no surrogate char + if (!hasSurrogateUnit(str)) { + return str.substr(start, length); + } + + // Obvious cases + var size = str.length; + if (size <= 0 || start > size || length <= 0) { + return ''; + } + + // Find the actual starting position + var posA = 0; + if (start > 0) { + for (; start > 0 && posA < size; start--) { + posA += getUTF16Length(str, posA); + } + if (posA >= size) { + return ''; + } + } else if (start < 0) { + for (posA = size; start < 0 && 0 < posA; start++) { + posA -= getUTF16Length(str, posA - 1); + } + if (posA < 0) { + posA = 0; + } + } + + // Find the actual ending position + var posB = size; + if (length < size) { + for (posB = posA; length > 0 && posB < size; length--) { + posB += getUTF16Length(str, posB); + } + } + + return str.substring(posA, posB); +} + +/** + * Fully Unicode-enabled replacement for String#substring() + * + * @param {string} str Valid Unicode string + * @param {number} start Location in Unicode sequence to begin extracting + * @param {?number} end Location in Unicode sequence to end extracting + * (default: end of the string) + * @return {string} Extracted sub-string + */ +function substring(str, start, end) { + start = start || 0; + end = end === undefined ? Infinity : end || 0; + + if (start < 0) { + start = 0; + } + if (end < 0) { + end = 0; + } + + var length = Math.abs(end - start); + start = start < end ? start : end; + return substr(str, start, length); +} + +/** + * Get a list of Unicode code-points from a String + * + * @param {string} str Valid Unicode string + * @return {array} A list of code-points in [0..0x10FFFF] + */ +function getCodePoints(str) { + var codePoints = []; + for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) { + codePoints.push(str.codePointAt(pos)); + } + return codePoints; +} + +var UnicodeUtils = { + getCodePoints: getCodePoints, + getUTF16Length: getUTF16Length, + hasSurrogateUnit: hasSurrogateUnit, + isCodeUnitInSurrogateRange: isCodeUnitInSurrogateRange, + isSurrogatePair: isSurrogatePair, + strlen: strlen, + substring: substring, + substr: substr +}; + +module.exports = UnicodeUtils; + +/***/ }), +/* 426 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(367); + + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + + +/***/ }), +/* 427 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__ = __webpack_require__(469); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsNaN_js__ = __webpack_require__(841); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__strictIndexOf_js__ = __webpack_require__(953); + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? Object(__WEBPACK_IMPORTED_MODULE_2__strictIndexOf_js__["a" /* default */])(array, value, fromIndex) + : Object(__WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_1__baseIsNaN_js__["a" /* default */], fromIndex); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIndexOf); + + +/***/ }), +/* 428 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +/* harmony default export */ __webpack_exports__["a"] = (getHolder); + + +/***/ }), +/* 429 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(376); + + + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (createAssigner); + + +/***/ }), +/* 430 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isLength); + + +/***/ }), +/* 431 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(157); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(156)(module))) + +/***/ }), +/* 432 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(393); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[Object(__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */])(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGet); + + +/***/ }), +/* 433 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasUnicode); + + +/***/ }), +/* 434 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayReduce_js__ = __webpack_require__(551); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deburr_js__ = __webpack_require__(481); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__words_js__ = __webpack_require__(482); + + + + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayReduce_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__words_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__deburr_js__["a" /* default */])(string).replace(reApos, '')), callback, ''); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createCompounder); + + +/***/ }), +/* 435 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseMap_js__ = __webpack_require__(874); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_2__baseMap_js__["a" /* default */]; + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(iteratee, 3)); +} + +/* harmony default export */ __webpack_exports__["a"] = (map); + + +/***/ }), +/* 436 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(151); + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == stringTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isString); + + +/***/ }), +/* 437 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ +function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (negate); + + +/***/ }), +/* 438 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__asciiSize_js__ = __webpack_require__(1035); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasUnicode_js__ = __webpack_require__(433); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__unicodeSize_js__ = __webpack_require__(1036); + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return Object(__WEBPACK_IMPORTED_MODULE_1__hasUnicode_js__["a" /* default */])(string) + ? Object(__WEBPACK_IMPORTED_MODULE_2__unicodeSize_js__["a" /* default */])(string) + : Object(__WEBPACK_IMPORTED_MODULE_0__asciiSize_js__["a" /* default */])(string); +} + +/* harmony default export */ __webpack_exports__["a"] = (stringSize); + + +/***/ }), +/* 439 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ +function thru(value, interceptor) { + return interceptor(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (thru); + + +/***/ }), +/* 440 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseWrapperValue_js__ = __webpack_require__(890); + + +/** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ +function wrapperValue() { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseWrapperValue_js__["a" /* default */])(this.__wrapped__, this.__actions__); +} + +/* harmony default export */ __webpack_exports__["a"] = (wrapperValue); + + +/***/ }), +/* 441 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SelectionState + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Immutable = __webpack_require__(364); + +var Record = Immutable.Record; + + +var defaultRecord = { + anchorKey: '', + anchorOffset: 0, + focusKey: '', + focusOffset: 0, + isBackward: false, + hasFocus: false +}; + +var SelectionStateRecord = Record(defaultRecord); + +var SelectionState = function (_SelectionStateRecord) { + _inherits(SelectionState, _SelectionStateRecord); + + function SelectionState() { + _classCallCheck(this, SelectionState); + + return _possibleConstructorReturn(this, _SelectionStateRecord.apply(this, arguments)); + } + + SelectionState.prototype.serialize = function serialize() { + return 'Anchor: ' + this.getAnchorKey() + ':' + this.getAnchorOffset() + ', ' + 'Focus: ' + this.getFocusKey() + ':' + this.getFocusOffset() + ', ' + 'Is Backward: ' + String(this.getIsBackward()) + ', ' + 'Has Focus: ' + String(this.getHasFocus()); + }; + + SelectionState.prototype.getAnchorKey = function getAnchorKey() { + return this.get('anchorKey'); + }; + + SelectionState.prototype.getAnchorOffset = function getAnchorOffset() { + return this.get('anchorOffset'); + }; + + SelectionState.prototype.getFocusKey = function getFocusKey() { + return this.get('focusKey'); + }; + + SelectionState.prototype.getFocusOffset = function getFocusOffset() { + return this.get('focusOffset'); + }; + + SelectionState.prototype.getIsBackward = function getIsBackward() { + return this.get('isBackward'); + }; + + SelectionState.prototype.getHasFocus = function getHasFocus() { + return this.get('hasFocus'); + }; + + /** + * Return whether the specified range overlaps with an edge of the + * SelectionState. + */ + + + SelectionState.prototype.hasEdgeWithin = function hasEdgeWithin(blockKey, start, end) { + var anchorKey = this.getAnchorKey(); + var focusKey = this.getFocusKey(); + + if (anchorKey === focusKey && anchorKey === blockKey) { + var selectionStart = this.getStartOffset(); + var selectionEnd = this.getEndOffset(); + return start <= selectionEnd && selectionStart <= end; + } + + if (blockKey !== anchorKey && blockKey !== focusKey) { + return false; + } + + var offsetToCheck = blockKey === anchorKey ? this.getAnchorOffset() : this.getFocusOffset(); + + return start <= offsetToCheck && end >= offsetToCheck; + }; + + SelectionState.prototype.isCollapsed = function isCollapsed() { + return this.getAnchorKey() === this.getFocusKey() && this.getAnchorOffset() === this.getFocusOffset(); + }; + + SelectionState.prototype.getStartKey = function getStartKey() { + return this.getIsBackward() ? this.getFocusKey() : this.getAnchorKey(); + }; + + SelectionState.prototype.getStartOffset = function getStartOffset() { + return this.getIsBackward() ? this.getFocusOffset() : this.getAnchorOffset(); + }; + + SelectionState.prototype.getEndKey = function getEndKey() { + return this.getIsBackward() ? this.getAnchorKey() : this.getFocusKey(); + }; + + SelectionState.prototype.getEndOffset = function getEndOffset() { + return this.getIsBackward() ? this.getAnchorOffset() : this.getFocusOffset(); + }; + + SelectionState.createEmpty = function createEmpty(key) { + return new SelectionState({ + anchorKey: key, + anchorOffset: 0, + focusKey: key, + focusOffset: 0, + isBackward: false, + hasFocus: false + }); + }; + + return SelectionState; +}(SelectionStateRecord); + +module.exports = SelectionState; + +/***/ }), +/* 442 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +/** + * This function is used to mark string literals representing CSS class names + * so that they can be transformed statically. This allows for modularization + * and minification of CSS class names. + * + * In static_upstream, this function is actually implemented, but it should + * eventually be replaced with something more descriptive, and the transform + * that is used in the main stack should be ported for use elsewhere. + * + * @param string|object className to modularize, or an object of key/values. + * In the object case, the values are conditions that + * determine if the className keys should be included. + * @param [string ...] Variable list of classNames in the string case. + * @return string Renderable space-separated CSS className. + */ +function cx(classNames) { + if (typeof classNames == 'object') { + return Object.keys(classNames).filter(function (className) { + return classNames[className]; + }).map(replace).join(' '); + } + return Array.prototype.map.call(arguments, replace).join(' '); +} + +function replace(str) { + return str.replace(/\//g, '-'); +} + +module.exports = cx; + +/***/ }), +/* 443 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ __webpack_exports__["a"] = (noop); + + +/***/ }), +/* 444 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (constant); + + +/***/ }), +/* 445 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(380); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(objValue, value)) || + (value === undefined && !(key in object))) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignValue); + + +/***/ }), +/* 446 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPrototype); + + +/***/ }), +/* 447 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); + + +/***/ }), +/* 448 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(392); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(429); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keysIn_js__ = __webpack_require__(375); + + + + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex, customizer) { + Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(source, Object(__WEBPACK_IMPORTED_MODULE_2__keysIn_js__["a" /* default */])(source), object, customizer); +}); + +/* harmony default export */ __webpack_exports__["a"] = (assignInWith); + + +/***/ }), +/* 449 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(432); + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (get); + + +/***/ }), +/* 450 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPlainObject_js__ = __webpack_require__(97); + + + + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value)) { + return false; + } + var tag = Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !Object(__WEBPACK_IMPORTED_MODULE_2__isPlainObject_js__["a" /* default */])(value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (isError); + + +/***/ }), +/* 451 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createCaseFirst_js__ = __webpack_require__(845); + + +/** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ +var upperFirst = Object(__WEBPACK_IMPORTED_MODULE_0__createCaseFirst_js__["a" /* default */])('toUpperCase'); + +/* harmony default export */ __webpack_exports__["a"] = (upperFirst); + + +/***/ }), +/* 452 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubArray); + + +/***/ }), +/* 453 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(1009); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(860); + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && Object(__WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */])(object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasIn); + + +/***/ }), +/* 454 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(489); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayIncludes_js__ = __webpack_require__(468); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__arrayIncludesWith_js__ = __webpack_require__(587); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__cacheHas_js__ = __webpack_require__(490); + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = __WEBPACK_IMPORTED_MODULE_1__arrayIncludes_js__["a" /* default */], + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = Object(__WEBPACK_IMPORTED_MODULE_3__arrayMap_js__["a" /* default */])(values, Object(__WEBPACK_IMPORTED_MODULE_4__baseUnary_js__["a" /* default */])(iteratee)); + } + if (comparator) { + includes = __WEBPACK_IMPORTED_MODULE_2__arrayIncludesWith_js__["a" /* default */]; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = __WEBPACK_IMPORTED_MODULE_5__cacheHas_js__["a" /* default */]; + isCommon = false; + values = new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */](values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseDifference); + + +/***/ }), +/* 455 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castPath_js__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__last_js__ = __webpack_require__(377); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__parent_js__ = __webpack_require__(877); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__toKey_js__ = __webpack_require__(393); + + + + + + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = Object(__WEBPACK_IMPORTED_MODULE_1__castPath_js__["a" /* default */])(path, object); + object = Object(__WEBPACK_IMPORTED_MODULE_3__parent_js__["a" /* default */])(object, path); + var func = object == null ? object : object[Object(__WEBPACK_IMPORTED_MODULE_4__toKey_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__last_js__["a" /* default */])(path))]; + return func == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, object, args); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseInvoke); + + +/***/ }), +/* 456 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsRegExp_js__ = __webpack_require__(1028); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(431); + + + + +/* Node.js helper references. */ +var nodeIsRegExp = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsRegExp) : __WEBPACK_IMPORTED_MODULE_0__baseIsRegExp_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isRegExp); + + +/***/ }), +/* 457 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(445); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castPath_js__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(398); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(367); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__toKey_js__ = __webpack_require__(393); + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(object)) { + return object; + } + path = Object(__WEBPACK_IMPORTED_MODULE_1__castPath_js__["a" /* default */])(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = Object(__WEBPACK_IMPORTED_MODULE_4__toKey_js__["a" /* default */])(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(objValue) + ? objValue + : (Object(__WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */])(path[index + 1]) ? [] : {}); + } + } + Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseSet); + + +/***/ }), +/* 458 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(411); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseProperty_js__ = __webpack_require__(572); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseTimes_js__ = __webpack_require__(540); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isArrayLikeObject_js__ = __webpack_require__(374); + + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ +function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(array, function(group) { + if (Object(__WEBPACK_IMPORTED_MODULE_4__isArrayLikeObject_js__["a" /* default */])(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return Object(__WEBPACK_IMPORTED_MODULE_3__baseTimes_js__["a" /* default */])(length, function(index) { + return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_2__baseProperty_js__["a" /* default */])(index)); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (unzip); + + +/***/ }), +/* 459 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule BlockMapBuilder + * @format + * + */ + + + +var Immutable = __webpack_require__(364); + +var OrderedMap = Immutable.OrderedMap; + + +var BlockMapBuilder = { + createFromArray: function createFromArray(blocks) { + return OrderedMap(blocks.map(function (block) { + return [block.getKey(), block]; + })); + } +}; + +module.exports = BlockMapBuilder; + +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule findRangesImmutable + * @format + * + */ + + + +/** + * Search through an array to find contiguous stretches of elements that + * match a specified filter function. + * + * When ranges are found, execute a specified `found` function to supply + * the values to the caller. + */ +function findRangesImmutable(haystack, areEqualFn, filterFn, foundFn) { + if (!haystack.size) { + return; + } + + var cursor = 0; + + haystack.reduce(function (value, nextValue, nextIndex) { + if (!areEqualFn(value, nextValue)) { + if (filterFn(value)) { + foundFn(cursor, nextIndex); + } + cursor = nextIndex; + } + return nextValue; + }); + + filterFn(haystack.last()) && foundFn(cursor, haystack.count()); +} + +module.exports = findRangesImmutable; + +/***/ }), +/* 461 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isEventHandled + * @format + * + */ + + + +/** + * Utility method for determining whether or not the value returned + * from a handler indicates that it was handled. + */ +function isEventHandled(value) { + return value === 'handled' || value === true; +} + +module.exports = isEventHandled; + +/***/ }), +/* 462 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftOffsetKey + * @format + * + */ + + + +var KEY_DELIMITER = '-'; + +var DraftOffsetKey = { + encode: function encode(blockKey, decoratorKey, leafKey) { + return blockKey + KEY_DELIMITER + decoratorKey + KEY_DELIMITER + leafKey; + }, + + decode: function decode(offsetKey) { + var _offsetKey$split = offsetKey.split(KEY_DELIMITER), + blockKey = _offsetKey$split[0], + decoratorKey = _offsetKey$split[1], + leafKey = _offsetKey$split[2]; + + return { + blockKey: blockKey, + decoratorKey: parseInt(decoratorKey, 10), + leafKey: parseInt(leafKey, 10) + }; + } +}; + +module.exports = DraftOffsetKey; + +/***/ }), +/* 463 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule removeTextWithStrategy + * @format + * + */ + + + +var DraftModifier = __webpack_require__(378); + +/** + * For a collapsed selection state, remove text based on the specified strategy. + * If the selection state is not collapsed, remove the entire selected range. + */ +function removeTextWithStrategy(editorState, strategy, direction) { + var selection = editorState.getSelection(); + var content = editorState.getCurrentContent(); + var target = selection; + if (selection.isCollapsed()) { + if (direction === 'forward') { + if (editorState.isSelectionAtEndOfContent()) { + return content; + } + } else if (editorState.isSelectionAtStartOfContent()) { + return content; + } + + target = strategy(editorState); + if (target === selection) { + return content; + } + } + return DraftModifier.removeRange(content, target, direction); +} + +module.exports = removeTextWithStrategy; + +/***/ }), +/* 464 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToNumber_js__ = __webpack_require__(943); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseToString_js__ = __webpack_require__(390); + + + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = Object(__WEBPACK_IMPORTED_MODULE_1__baseToString_js__["a" /* default */])(value); + other = Object(__WEBPACK_IMPORTED_MODULE_1__baseToString_js__["a" /* default */])(other); + } else { + value = Object(__WEBPACK_IMPORTED_MODULE_0__baseToNumber_js__["a" /* default */])(value); + other = Object(__WEBPACK_IMPORTED_MODULE_0__baseToNumber_js__["a" /* default */])(other); + } + result = operator(value, other); + } + return result; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createMathOperation); + + +/***/ }), +/* 465 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createWrap_js__ = __webpack_require__(396); + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return Object(__WEBPACK_IMPORTED_MODULE_0__createWrap_js__["a" /* default */])(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +/* harmony default export */ __webpack_exports__["a"] = (ary); + + +/***/ }), +/* 466 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(426); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(367); + + + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(result) ? result : thisBinding; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createCtor); + + +/***/ }), +/* 467 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +/* harmony default export */ __webpack_exports__["a"] = (baseLodash); + + +/***/ }), +/* 468 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIndexOf_js__ = __webpack_require__(427); + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && Object(__WEBPACK_IMPORTED_MODULE_0__baseIndexOf_js__["a" /* default */])(array, value, 0) > -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayIncludes); + + +/***/ }), +/* 469 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseFindIndex); + + +/***/ }), +/* 470 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(392); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(429); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keysIn_js__ = __webpack_require__(375); + + + + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source) { + Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(source, Object(__WEBPACK_IMPORTED_MODULE_2__keysIn_js__["a" /* default */])(source), object); +}); + +/* harmony default export */ __webpack_exports__["a"] = (assignIn); + + +/***/ }), +/* 471 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(546); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (memoize); + + +/***/ }), +/* 472 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(417); + + +/* Built-in method references that are verified to be native. */ +var nativeCreate = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'create'); + +/* harmony default export */ __webpack_exports__["a"] = (nativeCreate); + + +/***/ }), +/* 473 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(970); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(971); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(972); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(973); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(974); + + + + + + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__["a" /* default */]; +ListCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__["a" /* default */]; +ListCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__["a" /* default */]; +ListCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__["a" /* default */]; +ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (ListCache); + + +/***/ }), +/* 474 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(380); + + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(array[length][0], key)) { + return length; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (assocIndexOf); + + +/***/ }), +/* 475 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(976); + + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return Object(__WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */])(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMapData); + + +/***/ }), +/* 476 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(array, 1) : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (flatten); + + +/***/ }), +/* 477 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isError_js__ = __webpack_require__(450); + + + + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(func, args) { + try { + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, undefined, args); + } catch (e) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isError_js__["a" /* default */])(e) ? e : new Error(e); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (attempt); + + +/***/ }), +/* 478 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toInteger_js__ = __webpack_require__(362); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = Object(__WEBPACK_IMPORTED_MODULE_0__toInteger_js__["a" /* default */])(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (before); + + +/***/ }), +/* 479 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createWrap_js__ = __webpack_require__(396); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getHolder_js__ = __webpack_require__(428); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__ = __webpack_require__(421); + + + + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = Object(__WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__["a" /* default */])(partials, Object(__WEBPACK_IMPORTED_MODULE_2__getHolder_js__["a" /* default */])(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return Object(__WEBPACK_IMPORTED_MODULE_1__createWrap_js__["a" /* default */])(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +/* harmony default export */ __webpack_exports__["a"] = (bind); + + +/***/ }), +/* 480 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toString_js__ = __webpack_require__(363); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__upperFirst_js__ = __webpack_require__(451); + + + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return Object(__WEBPACK_IMPORTED_MODULE_1__upperFirst_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__toString_js__["a" /* default */])(string).toLowerCase()); +} + +/* harmony default export */ __webpack_exports__["a"] = (capitalize); + + +/***/ }), +/* 481 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__deburrLetter_js__ = __webpack_require__(983); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toString_js__ = __webpack_require__(363); + + + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = Object(__WEBPACK_IMPORTED_MODULE_1__toString_js__["a" /* default */])(string); + return string && string.replace(reLatin, __WEBPACK_IMPORTED_MODULE_0__deburrLetter_js__["a" /* default */]).replace(reComboMark, ''); +} + +/* harmony default export */ __webpack_exports__["a"] = (deburr); + + +/***/ }), +/* 482 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__asciiWords_js__ = __webpack_require__(984); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasUnicodeWord_js__ = __webpack_require__(985); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toString_js__ = __webpack_require__(363); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__unicodeWords_js__ = __webpack_require__(986); + + + + + +/** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ +function words(string, pattern, guard) { + string = Object(__WEBPACK_IMPORTED_MODULE_2__toString_js__["a" /* default */])(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return Object(__WEBPACK_IMPORTED_MODULE_1__hasUnicodeWord_js__["a" /* default */])(string) ? Object(__WEBPACK_IMPORTED_MODULE_3__unicodeWords_js__["a" /* default */])(string) : Object(__WEBPACK_IMPORTED_MODULE_0__asciiWords_js__["a" /* default */])(string); + } + return string.match(pattern) || []; +} + +/* harmony default export */ __webpack_exports__["a"] = (words); + + +/***/ }), +/* 483 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wrapperLodash_js__ = __webpack_require__(418); + + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = Object(__WEBPACK_IMPORTED_MODULE_0__wrapperLodash_js__["a" /* default */])(value); + result.__chain__ = true; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (chain); + + +/***/ }), +/* 484 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(473); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(987); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(988); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(989); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(990); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(991); + + + + + + + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */](entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = __WEBPACK_IMPORTED_MODULE_1__stackClear_js__["a" /* default */]; +Stack.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__["a" /* default */]; +Stack.prototype.get = __WEBPACK_IMPORTED_MODULE_3__stackGet_js__["a" /* default */]; +Stack.prototype.has = __WEBPACK_IMPORTED_MODULE_4__stackHas_js__["a" /* default */]; +Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Stack); + + +/***/ }), +/* 485 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMap_js__ = __webpack_require__(1002); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(431); + + + + +/* Node.js helper references. */ +var nodeIsMap = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsMap) : __WEBPACK_IMPORTED_MODULE_0__baseIsMap_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isMap); + + +/***/ }), +/* 486 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsSet_js__ = __webpack_require__(1003); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(431); + + + + +/* Node.js helper references. */ +var nodeIsSet = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsSet) : __WEBPACK_IMPORTED_MODULE_0__baseIsSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isSet); + + +/***/ }), +/* 487 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LodashWrapper_js__ = __webpack_require__(419); + + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new __WEBPACK_IMPORTED_MODULE_0__LodashWrapper_js__["a" /* default */](this.value(), this.__chain__); +} + +/* harmony default export */ __webpack_exports__["a"] = (wrapperCommit); + + +/***/ }), +/* 488 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(1004); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(other))) { + return value !== value && other !== other; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */])(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); + + +/***/ }), +/* 489 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(546); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(1005); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(1006); + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; +SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (SetCache); + + +/***/ }), +/* 490 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (cacheHas); + + +/***/ }), +/* 491 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (setToArray); + + +/***/ }), +/* 492 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(572); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(1010); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(545); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(393); + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */])(path) ? Object(__WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */])(path)) : Object(__WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */])(path); +} + +/* harmony default export */ __webpack_exports__["a"] = (property); + + +/***/ }), +/* 493 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayAggregator_js__ = __webpack_require__(1012); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAggregator_js__ = __webpack_require__(1013); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); + + + + + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayAggregator_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseAggregator_js__["a" /* default */], + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 2), accumulator); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createAggregator); + + +/***/ }), +/* 494 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(367); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__now_js__ = __webpack_require__(495); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toNumber_js__ = __webpack_require__(391); + + + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = Object(__WEBPACK_IMPORTED_MODULE_2__toNumber_js__["a" /* default */])(wait) || 0; + if (Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(Object(__WEBPACK_IMPORTED_MODULE_2__toNumber_js__["a" /* default */])(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" /* default */])(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" /* default */])()); + } + + function debounced() { + var time = Object(__WEBPACK_IMPORTED_MODULE_1__now_js__["a" /* default */])(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/* harmony default export */ __webpack_exports__["a"] = (debounce); + + +/***/ }), +/* 495 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(152); + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Date.now(); +}; + +/* harmony default export */ __webpack_exports__["a"] = (now); + + +/***/ }), +/* 496 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(392); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(375); + + + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */])(value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); + + +/***/ }), +/* 497 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(429); + + + +/** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ +var mergeWith = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex, customizer) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */])(object, source, srcIndex, customizer); +}); + +/* harmony default export */ __webpack_exports__["a"] = (mergeWith); + + +/***/ }), +/* 498 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); + + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseWhile); + + +/***/ }), +/* 499 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayEach_js__ = __webpack_require__(420); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseEach_js__ = __webpack_require__(412); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__castFunction_js__ = __webpack_require__(394); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayEach_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseEach_js__["a" /* default */]; + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_2__castFunction_js__["a" /* default */])(iteratee)); +} + +/* harmony default export */ __webpack_exports__["a"] = (forEach); + + +/***/ }), +/* 500 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayEachRight_js__ = __webpack_require__(1016); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseEachRight_js__ = __webpack_require__(867); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__castFunction_js__ = __webpack_require__(394); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); + + + + + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayEachRight_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseEachRight_js__["a" /* default */]; + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_2__castFunction_js__["a" /* default */])(iteratee)); +} + +/* harmony default export */ __webpack_exports__["a"] = (forEachRight); + + +/***/ }), +/* 501 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createToPairs_js__ = __webpack_require__(869); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ +var toPairs = Object(__WEBPACK_IMPORTED_MODULE_0__createToPairs_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (toPairs); + + +/***/ }), +/* 502 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createToPairs_js__ = __webpack_require__(869); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(375); + + + +/** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ +var toPairsIn = Object(__WEBPACK_IMPORTED_MODULE_0__createToPairs_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (toPairsIn); + + +/***/ }), +/* 503 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__escapeHtmlChar_js__ = __webpack_require__(1019); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toString_js__ = __webpack_require__(363); + + + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = Object(__WEBPACK_IMPORTED_MODULE_1__toString_js__["a" /* default */])(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, __WEBPACK_IMPORTED_MODULE_0__escapeHtmlChar_js__["a" /* default */]) + : string; +} + +/* harmony default export */ __webpack_exports__["a"] = (escape); + + +/***/ }), +/* 504 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClamp_js__ = __webpack_require__(422); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ +function toLength(value) { + return value ? Object(__WEBPACK_IMPORTED_MODULE_0__baseClamp_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(value), 0, MAX_ARRAY_LENGTH) : 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (toLength); + + +/***/ }), +/* 505 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__ = __webpack_require__(469); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(predicate, 3), index); +} + +/* harmony default export */ __webpack_exports__["a"] = (findIndex); + + +/***/ }), +/* 506 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__ = __webpack_require__(469); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(predicate, 3), index, true); +} + +/* harmony default export */ __webpack_exports__["a"] = (findLastIndex); + + +/***/ }), +/* 507 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (head); + + +/***/ }), +/* 508 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(411); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(386); + + + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(props, function(key) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(object[key]); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseFunctions); + + +/***/ }), +/* 509 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toNumber_js__ = __webpack_require__(391); + + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = Object(__WEBPACK_IMPORTED_MODULE_0__toNumber_js__["a" /* default */])(value); + other = Object(__WEBPACK_IMPORTED_MODULE_0__toNumber_js__["a" /* default */])(other); + } + return operator(value, other); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createRelationalOperation); + + +/***/ }), +/* 510 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toInteger_js__ = __webpack_require__(362); + + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == Object(__WEBPACK_IMPORTED_MODULE_0__toInteger_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isInteger); + + +/***/ }), +/* 511 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == numberTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isNumber); + + +/***/ }), +/* 512 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(379); + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseExtremum); + + +/***/ }), +/* 513 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayEach_js__ = __webpack_require__(420); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayPush_js__ = __webpack_require__(408); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFunctions_js__ = __webpack_require__(508); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(383); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isFunction_js__ = __webpack_require__(386); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isObject_js__ = __webpack_require__(367); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__keys_js__ = __webpack_require__(369); + + + + + + + + +/** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ +function mixin(object, source, options) { + var props = Object(__WEBPACK_IMPORTED_MODULE_6__keys_js__["a" /* default */])(source), + methodNames = Object(__WEBPACK_IMPORTED_MODULE_2__baseFunctions_js__["a" /* default */])(source, props); + + var chain = !(Object(__WEBPACK_IMPORTED_MODULE_5__isObject_js__["a" /* default */])(options) && 'chain' in options) || !!options.chain, + isFunc = Object(__WEBPACK_IMPORTED_MODULE_4__isFunction_js__["a" /* default */])(object); + + Object(__WEBPACK_IMPORTED_MODULE_0__arrayEach_js__["a" /* default */])(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = Object(__WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */])(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, Object(__WEBPACK_IMPORTED_MODULE_1__arrayPush_js__["a" /* default */])([this.value()], arguments)); + }; + } + }); + + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (mixin); + + +/***/ }), +/* 514 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toArray_js__ = __webpack_require__(515); + + +/** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ +function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = Object(__WEBPACK_IMPORTED_MODULE_0__toArray_js__["a" /* default */])(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; +} + +/* harmony default export */ __webpack_exports__["a"] = (wrapperNext); + + +/***/ }), +/* 515 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(99); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(383); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getTag_js__ = __webpack_require__(403); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isString_js__ = __webpack_require__(436); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__iteratorToArray_js__ = __webpack_require__(1030); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__mapToArray_js__ = __webpack_require__(570); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__setToArray_js__ = __webpack_require__(491); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__stringToArray_js__ = __webpack_require__(410); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__values_js__ = __webpack_require__(414); + + + + + + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Built-in value references. */ +var symIterator = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].iterator : undefined; + +/** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ +function toArray(value) { + if (!value) { + return []; + } + if (Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__["a" /* default */])(value)) { + return Object(__WEBPACK_IMPORTED_MODULE_4__isString_js__["a" /* default */])(value) ? Object(__WEBPACK_IMPORTED_MODULE_8__stringToArray_js__["a" /* default */])(value) : Object(__WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */])(value); + } + if (symIterator && value[symIterator]) { + return Object(__WEBPACK_IMPORTED_MODULE_5__iteratorToArray_js__["a" /* default */])(value[symIterator]()); + } + var tag = Object(__WEBPACK_IMPORTED_MODULE_2__getTag_js__["a" /* default */])(value), + func = tag == mapTag ? __WEBPACK_IMPORTED_MODULE_6__mapToArray_js__["a" /* default */] : (tag == setTag ? __WEBPACK_IMPORTED_MODULE_7__setToArray_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_9__values_js__["a" /* default */]); + + return func(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (toArray); + + +/***/ }), +/* 516 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__basePickBy_js__ = __webpack_require__(880); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getAllKeysIn_js__ = __webpack_require__(560); + + + + + +/** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ +function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__getAllKeysIn_js__["a" /* default */])(object), function(prop) { + return [prop]; + }); + predicate = Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(predicate); + return Object(__WEBPACK_IMPORTED_MODULE_2__basePickBy_js__["a" /* default */])(object, props, function(value, path) { + return predicate(value, path[0]); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (pickBy); + + +/***/ }), +/* 517 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createWrap_js__ = __webpack_require__(396); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getHolder_js__ = __webpack_require__(428); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__ = __webpack_require__(421); + + + + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ +var partial = Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(func, partials) { + var holders = Object(__WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__["a" /* default */])(partials, Object(__WEBPACK_IMPORTED_MODULE_2__getHolder_js__["a" /* default */])(partial)); + return Object(__WEBPACK_IMPORTED_MODULE_1__createWrap_js__["a" /* default */])(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); +}); + +// Assign default placeholders. +partial.placeholder = {}; + +/* harmony default export */ __webpack_exports__["a"] = (partial); + + +/***/ }), +/* 518 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseLodash_js__ = __webpack_require__(467); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wrapperClone_js__ = __webpack_require__(836); + + + +/** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ +function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof __WEBPACK_IMPORTED_MODULE_0__baseLodash_js__["a" /* default */]) { + var clone = Object(__WEBPACK_IMPORTED_MODULE_1__wrapperClone_js__["a" /* default */])(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (wrapperPlant); + + +/***/ }), +/* 519 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basePullAll_js__ = __webpack_require__(712); + + +/** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ +function pullAll(array, values) { + return (array && array.length && values && values.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__basePullAll_js__["a" /* default */])(array, values) + : array; +} + +/* harmony default export */ __webpack_exports__["a"] = (pullAll); + + +/***/ }), +/* 520 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeReverse = arrayProto.reverse; + +/** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ +function reverse(array) { + return array == null ? array : nativeReverse.call(array); +} + +/* harmony default export */ __webpack_exports__["a"] = (reverse); + + +/***/ }), +/* 521 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRandom_js__ = __webpack_require__(717); + + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = Object(__WEBPACK_IMPORTED_MODULE_0__baseRandom_js__["a" /* default */])(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (shuffleSelf); + + +/***/ }), +/* 522 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSortedIndexBy_js__ = __webpack_require__(741); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identity_js__ = __webpack_require__(371); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isSymbol_js__ = __webpack_require__(379); + + + + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !Object(__WEBPACK_IMPORTED_MODULE_2__isSymbol_js__["a" /* default */])(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSortedIndexBy_js__["a" /* default */])(array, value, __WEBPACK_IMPORTED_MODULE_1__identity_js__["a" /* default */], retHighest); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseSortedIndex); + + +/***/ }), +/* 523 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__escape_js__ = __webpack_require__(503); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reEscape_js__ = __webpack_require__(1049); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__reEvaluate_js__ = __webpack_require__(1050); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__reInterpolate_js__ = __webpack_require__(889); + + + + + +/** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ +var templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': __WEBPACK_IMPORTED_MODULE_1__reEscape_js__["a" /* default */], + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': __WEBPACK_IMPORTED_MODULE_2__reEvaluate_js__["a" /* default */], + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': __WEBPACK_IMPORTED_MODULE_3__reInterpolate_js__["a" /* default */], + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': { 'escape': __WEBPACK_IMPORTED_MODULE_0__escape_js__["a" /* default */] } + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (templateSettings); + + +/***/ }), +/* 524 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ +function wrapperToIterator() { + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (wrapperToIterator); + + +/***/ }), +/* 525 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__unzip_js__ = __webpack_require__(458); + + + + +/** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ +function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = Object(__WEBPACK_IMPORTED_MODULE_2__unzip_js__["a" /* default */])(array); + if (iteratee == null) { + return result; + } + return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(result, function(group) { + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(iteratee, undefined, group); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (unzipWith); + + +/***/ }), +/* 526 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getContentStateFragment + * @format + * + */ + + + +var randomizeBlockMapKeys = __webpack_require__(895); +var removeEntitiesAtEdges = __webpack_require__(896); + +var getContentStateFragment = function getContentStateFragment(contentState, selectionState) { + var startKey = selectionState.getStartKey(); + var startOffset = selectionState.getStartOffset(); + var endKey = selectionState.getEndKey(); + var endOffset = selectionState.getEndOffset(); + + // Edge entities should be stripped to ensure that we don't preserve + // invalid partial entities when the fragment is reused. We do, however, + // preserve entities that are entirely within the selection range. + var contentWithoutEdgeEntities = removeEntitiesAtEdges(contentState, selectionState); + + var blockMap = contentWithoutEdgeEntities.getBlockMap(); + var blockKeys = blockMap.keySeq(); + var startIndex = blockKeys.indexOf(startKey); + var endIndex = blockKeys.indexOf(endKey) + 1; + + return randomizeBlockMapKeys(blockMap.slice(startIndex, endIndex).map(function (block, blockKey) { + var text = block.getText(); + var chars = block.getCharacterList(); + + if (startKey === endKey) { + return block.merge({ + text: text.slice(startOffset, endOffset), + characterList: chars.slice(startOffset, endOffset) + }); + } + + if (blockKey === startKey) { + return block.merge({ + text: text.slice(startOffset), + characterList: chars.slice(startOffset) + }); + } + + if (blockKey === endKey) { + return block.merge({ + text: text.slice(0, endOffset), + characterList: chars.slice(0, endOffset) + }); + } + + return block; + })); +}; + +module.exports = getContentStateFragment; + +/***/ }), +/* 527 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(60); + +var _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEntity + * @format + * + */ + +var DraftEntityInstance = __webpack_require__(900); +var Immutable = __webpack_require__(364); + +var invariant = __webpack_require__(365); + +var Map = Immutable.Map; + + +var instances = Map(); +var instanceKey = 0; + +/** + * Temporary utility for generating the warnings + */ +function logWarning(oldMethodCall, newMethodCall) { + console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon!\nPlease use "' + newMethodCall + '" instead.'); +} + +/** + * A "document entity" is an object containing metadata associated with a + * piece of text in a ContentBlock. + * + * For example, a `link` entity might include a `uri` property. When a + * ContentBlock is rendered in the browser, text that refers to that link + * entity may be rendered as an anchor, with the `uri` as the href value. + * + * In a ContentBlock, every position in the text may correspond to zero + * or one entities. This correspondence is tracked using a key string, + * generated via DraftEntity.create() and used to obtain entity metadata + * via DraftEntity.get(). + */ +var DraftEntity = { + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.getLastCreatedEntityKey' instead. + * --- + * Get the random key string from whatever entity was last created. + * We need this to support the new API, as part of transitioning to put Entity + * storage in contentState. + */ + getLastCreatedEntityKey: function getLastCreatedEntityKey() { + logWarning('DraftEntity.getLastCreatedEntityKey', 'contentState.getLastCreatedEntityKey'); + return DraftEntity.__getLastCreatedEntityKey(); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.createEntity' instead. + * --- + * Create a DraftEntityInstance and store it for later retrieval. + * + * A random key string will be generated and returned. This key may + * be used to track the entity's usage in a ContentBlock, and for + * retrieving data about the entity at render time. + */ + create: function create(type, mutability, data) { + logWarning('DraftEntity.create', 'contentState.createEntity'); + return DraftEntity.__create(type, mutability, data); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.addEntity' instead. + * --- + * Add an existing DraftEntityInstance to the DraftEntity map. This is + * useful when restoring instances from the server. + */ + add: function add(instance) { + logWarning('DraftEntity.add', 'contentState.addEntity'); + return DraftEntity.__add(instance); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.getEntity' instead. + * --- + * Retrieve the entity corresponding to the supplied key string. + */ + get: function get(key) { + logWarning('DraftEntity.get', 'contentState.getEntity'); + return DraftEntity.__get(key); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.mergeEntityData' instead. + * --- + * Entity instances are immutable. If you need to update the data for an + * instance, this method will merge your data updates and return a new + * instance. + */ + mergeData: function mergeData(key, toMerge) { + logWarning('DraftEntity.mergeData', 'contentState.mergeEntityData'); + return DraftEntity.__mergeData(key, toMerge); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.replaceEntityData' instead. + * --- + * Completely replace the data for a given instance. + */ + replaceData: function replaceData(key, newData) { + logWarning('DraftEntity.replaceData', 'contentState.replaceEntityData'); + return DraftEntity.__replaceData(key, newData); + }, + + // ***********************************WARNING****************************** + // --- the above public API will be deprecated in the next version of Draft! + // The methods below this line are private - don't call them directly. + + /** + * Get the random key string from whatever entity was last created. + * We need this to support the new API, as part of transitioning to put Entity + * storage in contentState. + */ + __getLastCreatedEntityKey: function __getLastCreatedEntityKey() { + return '' + instanceKey; + }, + + /** + * Create a DraftEntityInstance and store it for later retrieval. + * + * A random key string will be generated and returned. This key may + * be used to track the entity's usage in a ContentBlock, and for + * retrieving data about the entity at render time. + */ + __create: function __create(type, mutability, data) { + return DraftEntity.__add(new DraftEntityInstance({ type: type, mutability: mutability, data: data || {} })); + }, + + /** + * Add an existing DraftEntityInstance to the DraftEntity map. This is + * useful when restoring instances from the server. + */ + __add: function __add(instance) { + var key = '' + ++instanceKey; + instances = instances.set(key, instance); + return key; + }, + + /** + * Retrieve the entity corresponding to the supplied key string. + */ + __get: function __get(key) { + var instance = instances.get(key); + !!!instance ? true ? invariant(false, 'Unknown DraftEntity key: %s.', key) : invariant(false) : void 0; + return instance; + }, + + /** + * Entity instances are immutable. If you need to update the data for an + * instance, this method will merge your data updates and return a new + * instance. + */ + __mergeData: function __mergeData(key, toMerge) { + var instance = DraftEntity.__get(key); + var newData = _extends({}, instance.getData(), toMerge); + var newInstance = instance.set('data', newData); + instances = instances.set(key, newInstance); + return newInstance; + }, + + /** + * Completely replace the data for a given instance. + */ + __replaceData: function __replaceData(key, newData) { + var instance = DraftEntity.__get(key); + var newInstance = instance.set('data', newData); + instances = instances.set(key, newInstance); + return newInstance; + } +}; + +module.exports = DraftEntity; + +/***/ }), +/* 528 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _draftJs = __webpack_require__(370); + +exports.default = function (contentState, blockKey) { + var afterKey = contentState.getKeyAfter(blockKey); + var afterBlock = contentState.getBlockForKey(afterKey); + var targetRange = void 0; + + if (afterBlock && afterBlock.getType() === 'unstyled' && afterBlock.getLength() === 0 && afterBlock === contentState.getBlockMap().last()) { + targetRange = new _draftJs.SelectionState({ + anchorKey: blockKey, + anchorOffset: 0, + focusKey: afterKey, + focusOffset: 0 + }); + } else { + targetRange = new _draftJs.SelectionState({ + anchorKey: blockKey, + anchorOffset: 0, + focusKey: blockKey, + focusOffset: 1 + }); + } + + var newContentState = _draftJs.Modifier.setBlockType(contentState, targetRange, 'unstyled'); + + return _draftJs.Modifier.removeRange(newContentState, targetRange, 'backward'); +}; + +/***/ }), +/* 529 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (false) { + module.exports = require('./cjs/react-dom-server.browser.production.min.js'); +} else { + module.exports = __webpack_require__(1203); +} + + +/***/ }), +/* 530 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony default export */ __webpack_exports__["a"] = (function (r1, r2) { + if (r1.offset === r2.offset) { + return r2.length - r1.length; + } + + return r1.offset - r2.offset; +}); + +/***/ }), +/* 531 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = splitReactElement; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(8); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom_server__ = __webpack_require__(529); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom_server___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom_server__); + + + // see http://w3c.github.io/html/syntax.html#writing-html-documents-elements + +var VOID_TAGS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr']; +function splitReactElement(element) { + if (VOID_TAGS.indexOf(element.type) !== -1) { + return __WEBPACK_IMPORTED_MODULE_2_react_dom_server___default.a.renderToStaticMarkup(element); + } + + var tags = __WEBPACK_IMPORTED_MODULE_2_react_dom_server___default.a.renderToStaticMarkup(__WEBPACK_IMPORTED_MODULE_1_react___default.a.cloneElement(element, {}, '\r')).split('\r'); + __WEBPACK_IMPORTED_MODULE_0_invariant___default()(tags.length > 1, "convertToHTML: Element of type ".concat(element.type, " must render children")); + __WEBPACK_IMPORTED_MODULE_0_invariant___default()(tags.length < 3, "convertToHTML: Element of type ".concat(element.type, " cannot use carriage return character")); + return { + start: tags[0], + end: tags[1] + }; +} + +/***/ }), +/* 532 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* AUTO-GENERATED. DO NOT MODIFY. */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + JS Beautifier +--------------- + + + Written by Einar Lielmanis, + https://beautifier.io/ + + Originally converted to javascript by Vital, + "End braces on own line" added by Chris J. Shull, + Parsing improvements for brace-less statements by Liam Newman + + + Usage: + js_beautify(js_source_text); + js_beautify(js_source_text, options); + + The options are: + indent_size (default 4) - indentation size, + indent_char (default space) - character to indent with, + preserve_newlines (default true) - whether existing line breaks should be preserved, + max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk, + + jslint_happy (default false) - if true, then jslint-stricter mode is enforced. + + jslint_happy !jslint_happy + --------------------------------- + function () function() + + switch () { switch() { + case 1: case 1: + break; break; + } } + + space_after_anon_function (default false) - should the space before an anonymous function's parens be added, "function()" vs "function ()", + NOTE: This option is overriden by jslint_happy (i.e. if jslint_happy is true, space_after_anon_function is true by design) + + brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none" | any of the former + ",preserve-inline" + put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are. + preserve-inline will try to preserve inline blocks of curly braces + + space_before_conditional (default true) - should the space before conditional statement be added, "if(true)" vs "if (true)", + + unescape_strings (default false) - should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65" + + wrap_line_length (default unlimited) - lines should wrap at next opportunity after this number of characters. + NOTE: This is not a hard limit. Lines will continue until a point where a newline would + be preserved if it were present. + + end_with_newline (default false) - end output with a newline + + + e.g + + js_beautify(js_source_text, { + 'indent_size': 1, + 'indent_char': '\t' + }); + +*/ + +(function() { + +/* GENERATED_BUILD_OUTPUT */ +var legacy_beautify_js = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var Beautifier = __webpack_require__(1).Beautifier, + Options = __webpack_require__(5).Options; + +function js_beautify(js_source_text, options) { + var beautifier = new Beautifier(js_source_text, options); + return beautifier.beautify(); +} + +module.exports = js_beautify; +module.exports.defaultOptions = function() { + return new Options(); +}; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var Output = __webpack_require__(2).Output; +var Token = __webpack_require__(3).Token; +var acorn = __webpack_require__(4); +var Options = __webpack_require__(5).Options; +var Tokenizer = __webpack_require__(7).Tokenizer; +var line_starters = __webpack_require__(7).line_starters; +var positionable_operators = __webpack_require__(7).positionable_operators; +var TOKEN = __webpack_require__(7).TOKEN; + + +function in_array(what, arr) { + return arr.indexOf(what) !== -1; +} + +function ltrim(s) { + return s.replace(/^\s+/g, ''); +} + +function generateMapFromStrings(list) { + var result = {}; + for (var x = 0; x < list.length; x++) { + // make the mapped names underscored instead of dash + result[list[x].replace(/-/g, '_')] = list[x]; + } + return result; +} + +function reserved_word(token, word) { + return token && token.type === TOKEN.RESERVED && token.text === word; +} + +function reserved_array(token, words) { + return token && token.type === TOKEN.RESERVED && in_array(token.text, words); +} +// Unsure of what they mean, but they work. Worth cleaning up in future. +var special_words = ['case', 'return', 'do', 'if', 'throw', 'else', 'await', 'break', 'continue', 'async']; + +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline']; + +// Generate map from array +var OPERATOR_POSITION = generateMapFromStrings(validPositionValues); + +var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline]; + +var MODE = { + BlockStatement: 'BlockStatement', // 'BLOCK' + Statement: 'Statement', // 'STATEMENT' + ObjectLiteral: 'ObjectLiteral', // 'OBJECT', + ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]', + ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)', + Conditional: 'Conditional', //'(COND-EXPRESSION)', + Expression: 'Expression' //'(EXPRESSION)' +}; + +function remove_redundant_indentation(output, frame) { + // This implementation is effective but has some issues: + // - can cause line wrap to happen too soon due to indent removal + // after wrap points are calculated + // These issues are minor compared to ugly indentation. + + if (frame.multiline_frame || + frame.mode === MODE.ForInitializer || + frame.mode === MODE.Conditional) { + return; + } + + // remove one indent from each line inside this section + output.remove_indent(frame.start_line_index); +} + +// we could use just string.split, but +// IE doesn't like returning empty strings +function split_linebreaks(s) { + //return s.split(/\x0d\x0a|\x0a/); + + s = s.replace(acorn.allLineBreaks, '\n'); + var out = [], + idx = s.indexOf("\n"); + while (idx !== -1) { + out.push(s.substring(0, idx)); + s = s.substring(idx + 1); + idx = s.indexOf("\n"); + } + if (s.length) { + out.push(s); + } + return out; +} + +function is_array(mode) { + return mode === MODE.ArrayLiteral; +} + +function is_expression(mode) { + return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]); +} + +function all_lines_start_with(lines, c) { + for (var i = 0; i < lines.length; i++) { + var line = lines[i].trim(); + if (line.charAt(0) !== c) { + return false; + } + } + return true; +} + +function each_line_matches_indent(lines, indent) { + var i = 0, + len = lines.length, + line; + for (; i < len; i++) { + line = lines[i]; + // allow empty lines to pass through + if (line && line.indexOf(indent) !== 0) { + return false; + } + } + return true; +} + + +function Beautifier(source_text, options) { + options = options || {}; + this._source_text = source_text || ''; + + this._output = null; + this._tokens = null; + this._last_last_text = null; + this._flags = null; + this._previous_flags = null; + + this._flag_store = null; + this._options = new Options(options); +} + +Beautifier.prototype.create_flags = function(flags_base, mode) { + var next_indent_level = 0; + if (flags_base) { + next_indent_level = flags_base.indentation_level; + if (!this._output.just_added_newline() && + flags_base.line_indent_level > next_indent_level) { + next_indent_level = flags_base.line_indent_level; + } + } + + var next_flags = { + mode: mode, + parent: flags_base, + last_token: flags_base ? flags_base.last_token : new Token(TOKEN.START_BLOCK, ''), // last token text + last_word: flags_base ? flags_base.last_word : '', // last TOKEN.WORD passed + declaration_statement: false, + declaration_assignment: false, + multiline_frame: false, + inline_frame: false, + if_block: false, + else_block: false, + do_block: false, + do_while: false, + import_block: false, + in_case_statement: false, // switch(..){ INSIDE HERE } + in_case: false, // we're on the exact line with "case 0:" + case_body: false, // the indented case-action block + indentation_level: next_indent_level, + alignment: 0, + line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level, + start_line_index: this._output.get_line_number(), + ternary_depth: 0 + }; + return next_flags; +}; + +Beautifier.prototype._reset = function(source_text) { + var baseIndentString = source_text.match(/^[\t ]*/)[0]; + + this._last_last_text = ''; // pre-last token text + this._output = new Output(this._options, baseIndentString); + + // If testing the ignore directive, start with output disable set to true + this._output.raw = this._options.test_output_raw; + + + // Stack of parsing/formatting states, including MODE. + // We tokenize, parse, and output in an almost purely a forward-only stream of token input + // and formatted output. This makes the beautifier less accurate than full parsers + // but also far more tolerant of syntax errors. + // + // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type + // MODE.BlockStatement on the the stack, even though it could be object literal. If we later + // encounter a ":", we'll switch to to MODE.ObjectLiteral. If we then see a ";", + // most full parsers would die, but the beautifier gracefully falls back to + // MODE.BlockStatement and continues on. + this._flag_store = []; + this.set_mode(MODE.BlockStatement); + var tokenizer = new Tokenizer(source_text, this._options); + this._tokens = tokenizer.tokenize(); + return source_text; +}; + +Beautifier.prototype.beautify = function() { + // if disabled, return the input unchanged. + if (this._options.disabled) { + return this._source_text; + } + + var sweet_code; + var source_text = this._reset(this._source_text); + + var eol = this._options.eol; + if (this._options.eol === 'auto') { + eol = '\n'; + if (source_text && acorn.lineBreak.test(source_text || '')) { + eol = source_text.match(acorn.lineBreak)[0]; + } + } + + var current_token = this._tokens.next(); + while (current_token) { + this.handle_token(current_token); + + this._last_last_text = this._flags.last_token.text; + this._flags.last_token = current_token; + + current_token = this._tokens.next(); + } + + sweet_code = this._output.get_code(eol); + + return sweet_code; +}; + +Beautifier.prototype.handle_token = function(current_token, preserve_statement_flags) { + if (current_token.type === TOKEN.START_EXPR) { + this.handle_start_expr(current_token); + } else if (current_token.type === TOKEN.END_EXPR) { + this.handle_end_expr(current_token); + } else if (current_token.type === TOKEN.START_BLOCK) { + this.handle_start_block(current_token); + } else if (current_token.type === TOKEN.END_BLOCK) { + this.handle_end_block(current_token); + } else if (current_token.type === TOKEN.WORD) { + this.handle_word(current_token); + } else if (current_token.type === TOKEN.RESERVED) { + this.handle_word(current_token); + } else if (current_token.type === TOKEN.SEMICOLON) { + this.handle_semicolon(current_token); + } else if (current_token.type === TOKEN.STRING) { + this.handle_string(current_token); + } else if (current_token.type === TOKEN.EQUALS) { + this.handle_equals(current_token); + } else if (current_token.type === TOKEN.OPERATOR) { + this.handle_operator(current_token); + } else if (current_token.type === TOKEN.COMMA) { + this.handle_comma(current_token); + } else if (current_token.type === TOKEN.BLOCK_COMMENT) { + this.handle_block_comment(current_token, preserve_statement_flags); + } else if (current_token.type === TOKEN.COMMENT) { + this.handle_comment(current_token, preserve_statement_flags); + } else if (current_token.type === TOKEN.DOT) { + this.handle_dot(current_token); + } else if (current_token.type === TOKEN.EOF) { + this.handle_eof(current_token); + } else if (current_token.type === TOKEN.UNKNOWN) { + this.handle_unknown(current_token, preserve_statement_flags); + } else { + this.handle_unknown(current_token, preserve_statement_flags); + } +}; + +Beautifier.prototype.handle_whitespace_and_comments = function(current_token, preserve_statement_flags) { + var newlines = current_token.newlines; + var keep_whitespace = this._options.keep_array_indentation && is_array(this._flags.mode); + + if (current_token.comments_before) { + var comment_token = current_token.comments_before.next(); + while (comment_token) { + // The cleanest handling of inline comments is to treat them as though they aren't there. + // Just continue formatting and the behavior should be logical. + // Also ignore unknown tokens. Again, this should result in better behavior. + this.handle_whitespace_and_comments(comment_token, preserve_statement_flags); + this.handle_token(comment_token, preserve_statement_flags); + comment_token = current_token.comments_before.next(); + } + } + + if (keep_whitespace) { + for (var i = 0; i < newlines; i += 1) { + this.print_newline(i > 0, preserve_statement_flags); + } + } else { + if (this._options.max_preserve_newlines && newlines > this._options.max_preserve_newlines) { + newlines = this._options.max_preserve_newlines; + } + + if (this._options.preserve_newlines) { + if (newlines > 1) { + this.print_newline(false, preserve_statement_flags); + for (var j = 1; j < newlines; j += 1) { + this.print_newline(true, preserve_statement_flags); + } + } + } + } + +}; + +var newline_restricted_tokens = ['async', 'break', 'continue', 'return', 'throw', 'yield']; + +Beautifier.prototype.allow_wrap_or_preserved_newline = function(current_token, force_linewrap) { + force_linewrap = (force_linewrap === undefined) ? false : force_linewrap; + + // Never wrap the first token on a line + if (this._output.just_added_newline()) { + return; + } + + var shouldPreserveOrForce = (this._options.preserve_newlines && current_token.newlines) || force_linewrap; + var operatorLogicApplies = in_array(this._flags.last_token.text, positionable_operators) || + in_array(current_token.text, positionable_operators); + + if (operatorLogicApplies) { + var shouldPrintOperatorNewline = ( + in_array(this._flags.last_token.text, positionable_operators) && + in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE) + ) || + in_array(current_token.text, positionable_operators); + shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline; + } + + if (shouldPreserveOrForce) { + this.print_newline(false, true); + } else if (this._options.wrap_line_length) { + if (reserved_array(this._flags.last_token, newline_restricted_tokens)) { + // These tokens should never have a newline inserted + // between them and the following expression. + return; + } + this._output.set_wrap_point(); + } +}; + +Beautifier.prototype.print_newline = function(force_newline, preserve_statement_flags) { + if (!preserve_statement_flags) { + if (this._flags.last_token.text !== ';' && this._flags.last_token.text !== ',' && this._flags.last_token.text !== '=' && (this._flags.last_token.type !== TOKEN.OPERATOR || this._flags.last_token.text === '--' || this._flags.last_token.text === '++')) { + var next_token = this._tokens.peek(); + while (this._flags.mode === MODE.Statement && + !(this._flags.if_block && reserved_word(next_token, 'else')) && + !this._flags.do_block) { + this.restore_mode(); + } + } + } + + if (this._output.add_new_line(force_newline)) { + this._flags.multiline_frame = true; + } +}; + +Beautifier.prototype.print_token_line_indentation = function(current_token) { + if (this._output.just_added_newline()) { + if (this._options.keep_array_indentation && + current_token.newlines && + (current_token.text === '[' || is_array(this._flags.mode))) { + this._output.current_line.set_indent(-1); + this._output.current_line.push(current_token.whitespace_before); + this._output.space_before_token = false; + } else if (this._output.set_indent(this._flags.indentation_level, this._flags.alignment)) { + this._flags.line_indent_level = this._flags.indentation_level; + } + } +}; + +Beautifier.prototype.print_token = function(current_token) { + if (this._output.raw) { + this._output.add_raw_token(current_token); + return; + } + + if (this._options.comma_first && current_token.previous && current_token.previous.type === TOKEN.COMMA && + this._output.just_added_newline()) { + if (this._output.previous_line.last() === ',') { + var popped = this._output.previous_line.pop(); + // if the comma was already at the start of the line, + // pull back onto that line and reprint the indentation + if (this._output.previous_line.is_empty()) { + this._output.previous_line.push(popped); + this._output.trim(true); + this._output.current_line.pop(); + this._output.trim(); + } + + // add the comma in front of the next token + this.print_token_line_indentation(current_token); + this._output.add_token(','); + this._output.space_before_token = true; + } + } + + this.print_token_line_indentation(current_token); + this._output.non_breaking_space = true; + this._output.add_token(current_token.text); + if (this._output.previous_token_wrapped) { + this._flags.multiline_frame = true; + } +}; + +Beautifier.prototype.indent = function() { + this._flags.indentation_level += 1; + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); +}; + +Beautifier.prototype.deindent = function() { + if (this._flags.indentation_level > 0 && + ((!this._flags.parent) || this._flags.indentation_level > this._flags.parent.indentation_level)) { + this._flags.indentation_level -= 1; + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); + } +}; + +Beautifier.prototype.set_mode = function(mode) { + if (this._flags) { + this._flag_store.push(this._flags); + this._previous_flags = this._flags; + } else { + this._previous_flags = this.create_flags(null, mode); + } + + this._flags = this.create_flags(this._previous_flags, mode); + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); +}; + + +Beautifier.prototype.restore_mode = function() { + if (this._flag_store.length > 0) { + this._previous_flags = this._flags; + this._flags = this._flag_store.pop(); + if (this._previous_flags.mode === MODE.Statement) { + remove_redundant_indentation(this._output, this._previous_flags); + } + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); + } +}; + +Beautifier.prototype.start_of_object_property = function() { + return this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement && ( + (this._flags.last_token.text === ':' && this._flags.ternary_depth === 0) || (reserved_array(this._flags.last_token, ['get', 'set']))); +}; + +Beautifier.prototype.start_of_statement = function(current_token) { + var start = false; + start = start || reserved_array(this._flags.last_token, ['var', 'let', 'const']) && current_token.type === TOKEN.WORD; + start = start || reserved_word(this._flags.last_token, 'do'); + start = start || (!(this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement)) && reserved_array(this._flags.last_token, newline_restricted_tokens) && !current_token.newlines; + start = start || reserved_word(this._flags.last_token, 'else') && + !(reserved_word(current_token, 'if') && !current_token.comments_before); + start = start || (this._flags.last_token.type === TOKEN.END_EXPR && (this._previous_flags.mode === MODE.ForInitializer || this._previous_flags.mode === MODE.Conditional)); + start = start || (this._flags.last_token.type === TOKEN.WORD && this._flags.mode === MODE.BlockStatement && + !this._flags.in_case && + !(current_token.text === '--' || current_token.text === '++') && + this._last_last_text !== 'function' && + current_token.type !== TOKEN.WORD && current_token.type !== TOKEN.RESERVED); + start = start || (this._flags.mode === MODE.ObjectLiteral && ( + (this._flags.last_token.text === ':' && this._flags.ternary_depth === 0) || reserved_array(this._flags.last_token, ['get', 'set']))); + + if (start) { + this.set_mode(MODE.Statement); + this.indent(); + + this.handle_whitespace_and_comments(current_token, true); + + // Issue #276: + // If starting a new statement with [if, for, while, do], push to a new line. + // if (a) if (b) if(c) d(); else e(); else f(); + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token, + reserved_array(current_token, ['do', 'for', 'if', 'while'])); + } + return true; + } + return false; +}; + +Beautifier.prototype.handle_start_expr = function(current_token) { + // The conditional starts the statement if appropriate. + if (!this.start_of_statement(current_token)) { + this.handle_whitespace_and_comments(current_token); + } + + var next_mode = MODE.Expression; + if (current_token.text === '[') { + + if (this._flags.last_token.type === TOKEN.WORD || this._flags.last_token.text === ')') { + // this is array index specifier, break immediately + // a[x], fn()[x] + if (reserved_array(this._flags.last_token, line_starters)) { + this._output.space_before_token = true; + } + this.print_token(current_token); + this.set_mode(next_mode); + this.indent(); + if (this._options.space_in_paren) { + this._output.space_before_token = true; + } + return; + } + + next_mode = MODE.ArrayLiteral; + if (is_array(this._flags.mode)) { + if (this._flags.last_token.text === '[' || + (this._flags.last_token.text === ',' && (this._last_last_text === ']' || this._last_last_text === '}'))) { + // ], [ goes to new line + // }, [ goes to new line + if (!this._options.keep_array_indentation) { + this.print_newline(); + } + } + } + + if (!in_array(this._flags.last_token.type, [TOKEN.START_EXPR, TOKEN.END_EXPR, TOKEN.WORD, TOKEN.OPERATOR])) { + this._output.space_before_token = true; + } + } else { + if (this._flags.last_token.type === TOKEN.RESERVED) { + if (this._flags.last_token.text === 'for') { + this._output.space_before_token = this._options.space_before_conditional; + next_mode = MODE.ForInitializer; + } else if (in_array(this._flags.last_token.text, ['if', 'while'])) { + this._output.space_before_token = this._options.space_before_conditional; + next_mode = MODE.Conditional; + } else if (in_array(this._flags.last_word, ['await', 'async'])) { + // Should be a space between await and an IIFE, or async and an arrow function + this._output.space_before_token = true; + } else if (this._flags.last_token.text === 'import' && current_token.whitespace_before === '') { + this._output.space_before_token = false; + } else if (in_array(this._flags.last_token.text, line_starters) || this._flags.last_token.text === 'catch') { + this._output.space_before_token = true; + } + } else if (this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) { + // Support of this kind of newline preservation. + // a = (b && + // (c || d)); + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token); + } + } else if (this._flags.last_token.type === TOKEN.WORD) { + this._output.space_before_token = false; + + // function name() vs function name () + // function* name() vs function* name () + // async name() vs async name () + // In ES6, you can also define the method properties of an object + // var obj = {a: function() {}} + // It can be abbreviated + // var obj = {a() {}} + // var obj = { a() {}} vs var obj = { a () {}} + // var obj = { * a() {}} vs var obj = { * a () {}} + var peek_back_two = this._tokens.peek(-3); + if (this._options.space_after_named_function && peek_back_two) { + // peek starts at next character so -1 is current token + var peek_back_three = this._tokens.peek(-4); + if (reserved_array(peek_back_two, ['async', 'function']) || + (peek_back_two.text === '*' && reserved_array(peek_back_three, ['async', 'function']))) { + this._output.space_before_token = true; + } else if (this._flags.mode === MODE.ObjectLiteral) { + if ((peek_back_two.text === '{' || peek_back_two.text === ',') || + (peek_back_two.text === '*' && (peek_back_three.text === '{' || peek_back_three.text === ','))) { + this._output.space_before_token = true; + } + } + } + } else { + // Support preserving wrapped arrow function expressions + // a.b('c', + // () => d.e + // ) + this.allow_wrap_or_preserved_newline(current_token); + } + + // function() vs function () + // yield*() vs yield* () + // function*() vs function* () + if ((this._flags.last_token.type === TOKEN.RESERVED && (this._flags.last_word === 'function' || this._flags.last_word === 'typeof')) || + (this._flags.last_token.text === '*' && + (in_array(this._last_last_text, ['function', 'yield']) || + (this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ['{', ',']))))) { + this._output.space_before_token = this._options.space_after_anon_function; + } + } + + if (this._flags.last_token.text === ';' || this._flags.last_token.type === TOKEN.START_BLOCK) { + this.print_newline(); + } else if (this._flags.last_token.type === TOKEN.END_EXPR || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.END_BLOCK || this._flags.last_token.text === '.' || this._flags.last_token.type === TOKEN.COMMA) { + // do nothing on (( and )( and ][ and ]( and .( + // TODO: Consider whether forcing this is required. Review failing tests when removed. + this.allow_wrap_or_preserved_newline(current_token, current_token.newlines); + } + + this.print_token(current_token); + this.set_mode(next_mode); + if (this._options.space_in_paren) { + this._output.space_before_token = true; + } + + // In all cases, if we newline while inside an expression it should be indented. + this.indent(); +}; + +Beautifier.prototype.handle_end_expr = function(current_token) { + // statements inside expressions are not valid syntax, but... + // statements must all be closed when their container closes + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + + this.handle_whitespace_and_comments(current_token); + + if (this._flags.multiline_frame) { + this.allow_wrap_or_preserved_newline(current_token, + current_token.text === ']' && is_array(this._flags.mode) && !this._options.keep_array_indentation); + } + + if (this._options.space_in_paren) { + if (this._flags.last_token.type === TOKEN.START_EXPR && !this._options.space_in_empty_paren) { + // () [] no inner space in empty parens like these, ever, ref #320 + this._output.trim(); + this._output.space_before_token = false; + } else { + this._output.space_before_token = true; + } + } + this.deindent(); + this.print_token(current_token); + this.restore_mode(); + + remove_redundant_indentation(this._output, this._previous_flags); + + // do {} while () // no statement required after + if (this._flags.do_while && this._previous_flags.mode === MODE.Conditional) { + this._previous_flags.mode = MODE.Expression; + this._flags.do_block = false; + this._flags.do_while = false; + + } +}; + +Beautifier.prototype.handle_start_block = function(current_token) { + this.handle_whitespace_and_comments(current_token); + + // Check if this is should be treated as a ObjectLiteral + var next_token = this._tokens.peek(); + var second_token = this._tokens.peek(1); + if (this._flags.last_word === 'switch' && this._flags.last_token.type === TOKEN.END_EXPR) { + this.set_mode(MODE.BlockStatement); + this._flags.in_case_statement = true; + } else if (this._flags.case_body) { + this.set_mode(MODE.BlockStatement); + } else if (second_token && ( + (in_array(second_token.text, [':', ',']) && in_array(next_token.type, [TOKEN.STRING, TOKEN.WORD, TOKEN.RESERVED])) || + (in_array(next_token.text, ['get', 'set', '...']) && in_array(second_token.type, [TOKEN.WORD, TOKEN.RESERVED])) + )) { + // We don't support TypeScript,but we didn't break it for a very long time. + // We'll try to keep not breaking it. + if (!in_array(this._last_last_text, ['class', 'interface'])) { + this.set_mode(MODE.ObjectLiteral); + } else { + this.set_mode(MODE.BlockStatement); + } + } else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === '=>') { + // arrow function: (param1, paramN) => { statements } + this.set_mode(MODE.BlockStatement); + } else if (in_array(this._flags.last_token.type, [TOKEN.EQUALS, TOKEN.START_EXPR, TOKEN.COMMA, TOKEN.OPERATOR]) || + reserved_array(this._flags.last_token, ['return', 'throw', 'import', 'default']) + ) { + // Detecting shorthand function syntax is difficult by scanning forward, + // so check the surrounding context. + // If the block is being returned, imported, export default, passed as arg, + // assigned with = or assigned in a nested object, treat as an ObjectLiteral. + this.set_mode(MODE.ObjectLiteral); + } else { + this.set_mode(MODE.BlockStatement); + } + + var empty_braces = !next_token.comments_before && next_token.text === '}'; + var empty_anonymous_function = empty_braces && this._flags.last_word === 'function' && + this._flags.last_token.type === TOKEN.END_EXPR; + + if (this._options.brace_preserve_inline) // check for inline, set inline_frame if so + { + // search forward for a newline wanted inside this block + var index = 0; + var check_token = null; + this._flags.inline_frame = true; + do { + index += 1; + check_token = this._tokens.peek(index - 1); + if (check_token.newlines) { + this._flags.inline_frame = false; + break; + } + } while (check_token.type !== TOKEN.EOF && + !(check_token.type === TOKEN.END_BLOCK && check_token.opened === current_token)); + } + + if ((this._options.brace_style === "expand" || + (this._options.brace_style === "none" && current_token.newlines)) && + !this._flags.inline_frame) { + if (this._flags.last_token.type !== TOKEN.OPERATOR && + (empty_anonymous_function || + this._flags.last_token.type === TOKEN.EQUALS || + (reserved_array(this._flags.last_token, special_words) && this._flags.last_token.text !== 'else'))) { + this._output.space_before_token = true; + } else { + this.print_newline(false, true); + } + } else { // collapse || inline_frame + if (is_array(this._previous_flags.mode) && (this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.COMMA)) { + if (this._flags.last_token.type === TOKEN.COMMA || this._options.space_in_paren) { + this._output.space_before_token = true; + } + + if (this._flags.last_token.type === TOKEN.COMMA || (this._flags.last_token.type === TOKEN.START_EXPR && this._flags.inline_frame)) { + this.allow_wrap_or_preserved_newline(current_token); + this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame; + this._flags.multiline_frame = false; + } + } + if (this._flags.last_token.type !== TOKEN.OPERATOR && this._flags.last_token.type !== TOKEN.START_EXPR) { + if (this._flags.last_token.type === TOKEN.START_BLOCK && !this._flags.inline_frame) { + this.print_newline(); + } else { + this._output.space_before_token = true; + } + } + } + this.print_token(current_token); + this.indent(); + + // Except for specific cases, open braces are followed by a new line. + if (!empty_braces && !(this._options.brace_preserve_inline && this._flags.inline_frame)) { + this.print_newline(); + } +}; + +Beautifier.prototype.handle_end_block = function(current_token) { + // statements must all be closed when their container closes + this.handle_whitespace_and_comments(current_token); + + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + + var empty_braces = this._flags.last_token.type === TOKEN.START_BLOCK; + + if (this._flags.inline_frame && !empty_braces) { // try inline_frame (only set if this._options.braces-preserve-inline) first + this._output.space_before_token = true; + } else if (this._options.brace_style === "expand") { + if (!empty_braces) { + this.print_newline(); + } + } else { + // skip {} + if (!empty_braces) { + if (is_array(this._flags.mode) && this._options.keep_array_indentation) { + // we REALLY need a newline here, but newliner would skip that + this._options.keep_array_indentation = false; + this.print_newline(); + this._options.keep_array_indentation = true; + + } else { + this.print_newline(); + } + } + } + this.restore_mode(); + this.print_token(current_token); +}; + +Beautifier.prototype.handle_word = function(current_token) { + if (current_token.type === TOKEN.RESERVED) { + if (in_array(current_token.text, ['set', 'get']) && this._flags.mode !== MODE.ObjectLiteral) { + current_token.type = TOKEN.WORD; + } else if (current_token.text === 'import' && this._tokens.peek().text === '(') { + current_token.type = TOKEN.WORD; + } else if (in_array(current_token.text, ['as', 'from']) && !this._flags.import_block) { + current_token.type = TOKEN.WORD; + } else if (this._flags.mode === MODE.ObjectLiteral) { + var next_token = this._tokens.peek(); + if (next_token.text === ':') { + current_token.type = TOKEN.WORD; + } + } + } + + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + if (reserved_array(this._flags.last_token, ['var', 'let', 'const']) && current_token.type === TOKEN.WORD) { + this._flags.declaration_statement = true; + } + } else if (current_token.newlines && !is_expression(this._flags.mode) && + (this._flags.last_token.type !== TOKEN.OPERATOR || (this._flags.last_token.text === '--' || this._flags.last_token.text === '++')) && + this._flags.last_token.type !== TOKEN.EQUALS && + (this._options.preserve_newlines || !reserved_array(this._flags.last_token, ['var', 'let', 'const', 'set', 'get']))) { + this.handle_whitespace_and_comments(current_token); + this.print_newline(); + } else { + this.handle_whitespace_and_comments(current_token); + } + + if (this._flags.do_block && !this._flags.do_while) { + if (reserved_word(current_token, 'while')) { + // do {} ## while () + this._output.space_before_token = true; + this.print_token(current_token); + this._output.space_before_token = true; + this._flags.do_while = true; + return; + } else { + // do {} should always have while as the next word. + // if we don't see the expected while, recover + this.print_newline(); + this._flags.do_block = false; + } + } + + // if may be followed by else, or not + // Bare/inline ifs are tricky + // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e(); + if (this._flags.if_block) { + if (!this._flags.else_block && reserved_word(current_token, 'else')) { + this._flags.else_block = true; + } else { + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + this._flags.if_block = false; + this._flags.else_block = false; + } + } + + if (this._flags.in_case_statement && reserved_array(current_token, ['case', 'default'])) { + this.print_newline(); + if (this._flags.last_token.type !== TOKEN.END_BLOCK && (this._flags.case_body || this._options.jslint_happy)) { + // switch cases following one another + this.deindent(); + } + this._flags.case_body = false; + + this.print_token(current_token); + this._flags.in_case = true; + return; + } + + if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) { + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token); + } + } + + if (reserved_word(current_token, 'function')) { + if (in_array(this._flags.last_token.text, ['}', ';']) || + (this._output.just_added_newline() && !(in_array(this._flags.last_token.text, ['(', '[', '{', ':', '=', ',']) || this._flags.last_token.type === TOKEN.OPERATOR))) { + // make sure there is a nice clean space of at least one blank line + // before a new function definition + if (!this._output.just_added_blankline() && !current_token.comments_before) { + this.print_newline(); + this.print_newline(true); + } + } + if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD) { + if (reserved_array(this._flags.last_token, ['get', 'set', 'new', 'export']) || + reserved_array(this._flags.last_token, newline_restricted_tokens)) { + this._output.space_before_token = true; + } else if (reserved_word(this._flags.last_token, 'default') && this._last_last_text === 'export') { + this._output.space_before_token = true; + } else if (this._flags.last_token.text === 'declare') { + // accomodates Typescript declare function formatting + this._output.space_before_token = true; + } else { + this.print_newline(); + } + } else if (this._flags.last_token.type === TOKEN.OPERATOR || this._flags.last_token.text === '=') { + // foo = function + this._output.space_before_token = true; + } else if (!this._flags.multiline_frame && (is_expression(this._flags.mode) || is_array(this._flags.mode))) { + // (function + } else { + this.print_newline(); + } + + this.print_token(current_token); + this._flags.last_word = current_token.text; + return; + } + + var prefix = 'NONE'; + + if (this._flags.last_token.type === TOKEN.END_BLOCK) { + + if (this._previous_flags.inline_frame) { + prefix = 'SPACE'; + } else if (!reserved_array(current_token, ['else', 'catch', 'finally', 'from'])) { + prefix = 'NEWLINE'; + } else { + if (this._options.brace_style === "expand" || + this._options.brace_style === "end-expand" || + (this._options.brace_style === "none" && current_token.newlines)) { + prefix = 'NEWLINE'; + } else { + prefix = 'SPACE'; + this._output.space_before_token = true; + } + } + } else if (this._flags.last_token.type === TOKEN.SEMICOLON && this._flags.mode === MODE.BlockStatement) { + // TODO: Should this be for STATEMENT as well? + prefix = 'NEWLINE'; + } else if (this._flags.last_token.type === TOKEN.SEMICOLON && is_expression(this._flags.mode)) { + prefix = 'SPACE'; + } else if (this._flags.last_token.type === TOKEN.STRING) { + prefix = 'NEWLINE'; + } else if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || + (this._flags.last_token.text === '*' && + (in_array(this._last_last_text, ['function', 'yield']) || + (this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ['{', ',']))))) { + prefix = 'SPACE'; + } else if (this._flags.last_token.type === TOKEN.START_BLOCK) { + if (this._flags.inline_frame) { + prefix = 'SPACE'; + } else { + prefix = 'NEWLINE'; + } + } else if (this._flags.last_token.type === TOKEN.END_EXPR) { + this._output.space_before_token = true; + prefix = 'NEWLINE'; + } + + if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ')') { + if (this._flags.inline_frame || this._flags.last_token.text === 'else' || this._flags.last_token.text === 'export') { + prefix = 'SPACE'; + } else { + prefix = 'NEWLINE'; + } + + } + + if (reserved_array(current_token, ['else', 'catch', 'finally'])) { + if ((!(this._flags.last_token.type === TOKEN.END_BLOCK && this._previous_flags.mode === MODE.BlockStatement) || + this._options.brace_style === "expand" || + this._options.brace_style === "end-expand" || + (this._options.brace_style === "none" && current_token.newlines)) && + !this._flags.inline_frame) { + this.print_newline(); + } else { + this._output.trim(true); + var line = this._output.current_line; + // If we trimmed and there's something other than a close block before us + // put a newline back in. Handles '} // comment' scenario. + if (line.last() !== '}') { + this.print_newline(); + } + this._output.space_before_token = true; + } + } else if (prefix === 'NEWLINE') { + if (reserved_array(this._flags.last_token, special_words)) { + // no newline between 'return nnn' + this._output.space_before_token = true; + } else if (this._flags.last_token.text === 'declare' && reserved_array(current_token, ['var', 'let', 'const'])) { + // accomodates Typescript declare formatting + this._output.space_before_token = true; + } else if (this._flags.last_token.type !== TOKEN.END_EXPR) { + if ((this._flags.last_token.type !== TOKEN.START_EXPR || !reserved_array(current_token, ['var', 'let', 'const'])) && this._flags.last_token.text !== ':') { + // no need to force newline on 'var': for (var x = 0...) + if (reserved_word(current_token, 'if') && reserved_word(current_token.previous, 'else')) { + // no newline for } else if { + this._output.space_before_token = true; + } else { + this.print_newline(); + } + } + } else if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ')') { + this.print_newline(); + } + } else if (this._flags.multiline_frame && is_array(this._flags.mode) && this._flags.last_token.text === ',' && this._last_last_text === '}') { + this.print_newline(); // }, in lists get a newline treatment + } else if (prefix === 'SPACE') { + this._output.space_before_token = true; + } + if (current_token.previous && (current_token.previous.type === TOKEN.WORD || current_token.previous.type === TOKEN.RESERVED)) { + this._output.space_before_token = true; + } + this.print_token(current_token); + this._flags.last_word = current_token.text; + + if (current_token.type === TOKEN.RESERVED) { + if (current_token.text === 'do') { + this._flags.do_block = true; + } else if (current_token.text === 'if') { + this._flags.if_block = true; + } else if (current_token.text === 'import') { + this._flags.import_block = true; + } else if (this._flags.import_block && reserved_word(current_token, 'from')) { + this._flags.import_block = false; + } + } +}; + +Beautifier.prototype.handle_semicolon = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + // Semicolon can be the start (and end) of a statement + this._output.space_before_token = false; + } else { + this.handle_whitespace_and_comments(current_token); + } + + var next_token = this._tokens.peek(); + while (this._flags.mode === MODE.Statement && + !(this._flags.if_block && reserved_word(next_token, 'else')) && + !this._flags.do_block) { + this.restore_mode(); + } + + // hacky but effective for the moment + if (this._flags.import_block) { + this._flags.import_block = false; + } + this.print_token(current_token); +}; + +Beautifier.prototype.handle_string = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + // One difference - strings want at least a space before + this._output.space_before_token = true; + } else { + this.handle_whitespace_and_comments(current_token); + if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || this._flags.inline_frame) { + this._output.space_before_token = true; + } else if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) { + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token); + } + } else { + this.print_newline(); + } + } + this.print_token(current_token); +}; + +Beautifier.prototype.handle_equals = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + } else { + this.handle_whitespace_and_comments(current_token); + } + + if (this._flags.declaration_statement) { + // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done + this._flags.declaration_assignment = true; + } + this._output.space_before_token = true; + this.print_token(current_token); + this._output.space_before_token = true; +}; + +Beautifier.prototype.handle_comma = function(current_token) { + this.handle_whitespace_and_comments(current_token, true); + + this.print_token(current_token); + this._output.space_before_token = true; + if (this._flags.declaration_statement) { + if (is_expression(this._flags.parent.mode)) { + // do not break on comma, for(var a = 1, b = 2) + this._flags.declaration_assignment = false; + } + + if (this._flags.declaration_assignment) { + this._flags.declaration_assignment = false; + this.print_newline(false, true); + } else if (this._options.comma_first) { + // for comma-first, we want to allow a newline before the comma + // to turn into a newline after the comma, which we will fixup later + this.allow_wrap_or_preserved_newline(current_token); + } + } else if (this._flags.mode === MODE.ObjectLiteral || + (this._flags.mode === MODE.Statement && this._flags.parent.mode === MODE.ObjectLiteral)) { + if (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + + if (!this._flags.inline_frame) { + this.print_newline(); + } + } else if (this._options.comma_first) { + // EXPR or DO_BLOCK + // for comma-first, we want to allow a newline before the comma + // to turn into a newline after the comma, which we will fixup later + this.allow_wrap_or_preserved_newline(current_token); + } +}; + +Beautifier.prototype.handle_operator = function(current_token) { + var isGeneratorAsterisk = current_token.text === '*' && + (reserved_array(this._flags.last_token, ['function', 'yield']) || + (in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.COMMA, TOKEN.END_BLOCK, TOKEN.SEMICOLON])) + ); + var isUnary = in_array(current_token.text, ['-', '+']) && ( + in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.START_EXPR, TOKEN.EQUALS, TOKEN.OPERATOR]) || + in_array(this._flags.last_token.text, line_starters) || + this._flags.last_token.text === ',' + ); + + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + } else { + var preserve_statement_flags = !isGeneratorAsterisk; + this.handle_whitespace_and_comments(current_token, preserve_statement_flags); + } + + if (reserved_array(this._flags.last_token, special_words)) { + // "return" had a special handling in TK_WORD. Now we need to return the favor + this._output.space_before_token = true; + this.print_token(current_token); + return; + } + + // hack for actionscript's import .*; + if (current_token.text === '*' && this._flags.last_token.type === TOKEN.DOT) { + this.print_token(current_token); + return; + } + + if (current_token.text === '::') { + // no spaces around exotic namespacing syntax operator + this.print_token(current_token); + return; + } + + // Allow line wrapping between operators when operator_position is + // set to before or preserve + if (this._flags.last_token.type === TOKEN.OPERATOR && in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) { + this.allow_wrap_or_preserved_newline(current_token); + } + + if (current_token.text === ':' && this._flags.in_case) { + this.print_token(current_token); + + this._flags.in_case = false; + this._flags.case_body = true; + if (this._tokens.peek().type !== TOKEN.START_BLOCK) { + this.indent(); + this.print_newline(); + } else { + this._output.space_before_token = true; + } + return; + } + + var space_before = true; + var space_after = true; + var in_ternary = false; + if (current_token.text === ':') { + if (this._flags.ternary_depth === 0) { + // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant. + space_before = false; + } else { + this._flags.ternary_depth -= 1; + in_ternary = true; + } + } else if (current_token.text === '?') { + this._flags.ternary_depth += 1; + } + + // let's handle the operator_position option prior to any conflicting logic + if (!isUnary && !isGeneratorAsterisk && this._options.preserve_newlines && in_array(current_token.text, positionable_operators)) { + var isColon = current_token.text === ':'; + var isTernaryColon = (isColon && in_ternary); + var isOtherColon = (isColon && !in_ternary); + + switch (this._options.operator_position) { + case OPERATOR_POSITION.before_newline: + // if the current token is : and it's not a ternary statement then we set space_before to false + this._output.space_before_token = !isOtherColon; + + this.print_token(current_token); + + if (!isColon || isTernaryColon) { + this.allow_wrap_or_preserved_newline(current_token); + } + + this._output.space_before_token = true; + return; + + case OPERATOR_POSITION.after_newline: + // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement, + // then print a newline. + + this._output.space_before_token = true; + + if (!isColon || isTernaryColon) { + if (this._tokens.peek().newlines) { + this.print_newline(false, true); + } else { + this.allow_wrap_or_preserved_newline(current_token); + } + } else { + this._output.space_before_token = false; + } + + this.print_token(current_token); + + this._output.space_before_token = true; + return; + + case OPERATOR_POSITION.preserve_newline: + if (!isOtherColon) { + this.allow_wrap_or_preserved_newline(current_token); + } + + // if we just added a newline, or the current token is : and it's not a ternary statement, + // then we set space_before to false + space_before = !(this._output.just_added_newline() || isOtherColon); + + this._output.space_before_token = space_before; + this.print_token(current_token); + this._output.space_before_token = true; + return; + } + } + + if (isGeneratorAsterisk) { + this.allow_wrap_or_preserved_newline(current_token); + space_before = false; + var next_token = this._tokens.peek(); + space_after = next_token && in_array(next_token.type, [TOKEN.WORD, TOKEN.RESERVED]); + } else if (current_token.text === '...') { + this.allow_wrap_or_preserved_newline(current_token); + space_before = this._flags.last_token.type === TOKEN.START_BLOCK; + space_after = false; + } else if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) { + // unary operators (and binary +/- pretending to be unary) special cases + if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR) { + this.allow_wrap_or_preserved_newline(current_token); + } + + space_before = false; + space_after = false; + + // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1 + // if there is a newline between -- or ++ and anything else we should preserve it. + if (current_token.newlines && (current_token.text === '--' || current_token.text === '++')) { + this.print_newline(false, true); + } + + if (this._flags.last_token.text === ';' && is_expression(this._flags.mode)) { + // for (;; ++i) + // ^^^ + space_before = true; + } + + if (this._flags.last_token.type === TOKEN.RESERVED) { + space_before = true; + } else if (this._flags.last_token.type === TOKEN.END_EXPR) { + space_before = !(this._flags.last_token.text === ']' && (current_token.text === '--' || current_token.text === '++')); + } else if (this._flags.last_token.type === TOKEN.OPERATOR) { + // a++ + ++b; + // a - -b + space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(this._flags.last_token.text, ['--', '-', '++', '+']); + // + and - are not unary when preceeded by -- or ++ operator + // a-- + b + // a * +b + // a - -b + if (in_array(current_token.text, ['+', '-']) && in_array(this._flags.last_token.text, ['--', '++'])) { + space_after = true; + } + } + + + if (((this._flags.mode === MODE.BlockStatement && !this._flags.inline_frame) || this._flags.mode === MODE.Statement) && + (this._flags.last_token.text === '{' || this._flags.last_token.text === ';')) { + // { foo; --i } + // foo(); --bar; + this.print_newline(); + } + } + + this._output.space_before_token = this._output.space_before_token || space_before; + this.print_token(current_token); + this._output.space_before_token = space_after; +}; + +Beautifier.prototype.handle_block_comment = function(current_token, preserve_statement_flags) { + if (this._output.raw) { + this._output.add_raw_token(current_token); + if (current_token.directives && current_token.directives.preserve === 'end') { + // If we're testing the raw output behavior, do not allow a directive to turn it off. + this._output.raw = this._options.test_output_raw; + } + return; + } + + if (current_token.directives) { + this.print_newline(false, preserve_statement_flags); + this.print_token(current_token); + if (current_token.directives.preserve === 'start') { + this._output.raw = true; + } + this.print_newline(false, true); + return; + } + + // inline block + if (!acorn.newline.test(current_token.text) && !current_token.newlines) { + this._output.space_before_token = true; + this.print_token(current_token); + this._output.space_before_token = true; + return; + } else { + this.print_block_commment(current_token, preserve_statement_flags); + } +}; + +Beautifier.prototype.print_block_commment = function(current_token, preserve_statement_flags) { + var lines = split_linebreaks(current_token.text); + var j; // iterator for this case + var javadoc = false; + var starless = false; + var lastIndent = current_token.whitespace_before; + var lastIndentLength = lastIndent.length; + + // block comment starts with a new line + this.print_newline(false, preserve_statement_flags); + + // first line always indented + this.print_token_line_indentation(current_token); + this._output.add_token(lines[0]); + this.print_newline(false, preserve_statement_flags); + + + if (lines.length > 1) { + lines = lines.slice(1); + javadoc = all_lines_start_with(lines, '*'); + starless = each_line_matches_indent(lines, lastIndent); + + if (javadoc) { + this._flags.alignment = 1; + } + + for (j = 0; j < lines.length; j++) { + if (javadoc) { + // javadoc: reformat and re-indent + this.print_token_line_indentation(current_token); + this._output.add_token(ltrim(lines[j])); + } else if (starless && lines[j]) { + // starless: re-indent non-empty content, avoiding trim + this.print_token_line_indentation(current_token); + this._output.add_token(lines[j].substring(lastIndentLength)); + } else { + // normal comments output raw + this._output.current_line.set_indent(-1); + this._output.add_token(lines[j]); + } + + // for comments on their own line or more than one line, make sure there's a new line after + this.print_newline(false, preserve_statement_flags); + } + + this._flags.alignment = 0; + } +}; + + +Beautifier.prototype.handle_comment = function(current_token, preserve_statement_flags) { + if (current_token.newlines) { + this.print_newline(false, preserve_statement_flags); + } else { + this._output.trim(true); + } + + this._output.space_before_token = true; + this.print_token(current_token); + this.print_newline(false, preserve_statement_flags); +}; + +Beautifier.prototype.handle_dot = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + } else { + this.handle_whitespace_and_comments(current_token, true); + } + + if (reserved_array(this._flags.last_token, special_words)) { + this._output.space_before_token = false; + } else { + // allow preserved newlines before dots in general + // force newlines on dots after close paren when break_chained - for bar().baz() + this.allow_wrap_or_preserved_newline(current_token, + this._flags.last_token.text === ')' && this._options.break_chained_methods); + } + + // Only unindent chained method dot if this dot starts a new line. + // Otherwise the automatic extra indentation removal will handle the over indent + if (this._options.unindent_chained_methods && this._output.just_added_newline()) { + this.deindent(); + } + + this.print_token(current_token); +}; + +Beautifier.prototype.handle_unknown = function(current_token, preserve_statement_flags) { + this.print_token(current_token); + + if (current_token.text[current_token.text.length - 1] === '\n') { + this.print_newline(false, preserve_statement_flags); + } +}; + +Beautifier.prototype.handle_eof = function(current_token) { + // Unwind any open statements + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + this.handle_whitespace_and_comments(current_token); +}; + +module.exports.Beautifier = Beautifier; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function OutputLine(parent) { + this.__parent = parent; + this.__character_count = 0; + // use indent_count as a marker for this.__lines that have preserved indentation + this.__indent_count = -1; + this.__alignment_count = 0; + this.__wrap_point_index = 0; + this.__wrap_point_character_count = 0; + this.__wrap_point_indent_count = -1; + this.__wrap_point_alignment_count = 0; + + this.__items = []; +} + +OutputLine.prototype.clone_empty = function() { + var line = new OutputLine(this.__parent); + line.set_indent(this.__indent_count, this.__alignment_count); + return line; +}; + +OutputLine.prototype.item = function(index) { + if (index < 0) { + return this.__items[this.__items.length + index]; + } else { + return this.__items[index]; + } +}; + +OutputLine.prototype.has_match = function(pattern) { + for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) { + if (this.__items[lastCheckedOutput].match(pattern)) { + return true; + } + } + return false; +}; + +OutputLine.prototype.set_indent = function(indent, alignment) { + if (this.is_empty()) { + this.__indent_count = indent || 0; + this.__alignment_count = alignment || 0; + this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count); + } +}; + +OutputLine.prototype._set_wrap_point = function() { + if (this.__parent.wrap_line_length) { + this.__wrap_point_index = this.__items.length; + this.__wrap_point_character_count = this.__character_count; + this.__wrap_point_indent_count = this.__parent.next_line.__indent_count; + this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count; + } +}; + +OutputLine.prototype._should_wrap = function() { + return this.__wrap_point_index && + this.__character_count > this.__parent.wrap_line_length && + this.__wrap_point_character_count > this.__parent.next_line.__character_count; +}; + +OutputLine.prototype._allow_wrap = function() { + if (this._should_wrap()) { + this.__parent.add_new_line(); + var next = this.__parent.current_line; + next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count); + next.__items = this.__items.slice(this.__wrap_point_index); + this.__items = this.__items.slice(0, this.__wrap_point_index); + + next.__character_count += this.__character_count - this.__wrap_point_character_count; + this.__character_count = this.__wrap_point_character_count; + + if (next.__items[0] === " ") { + next.__items.splice(0, 1); + next.__character_count -= 1; + } + return true; + } + return false; +}; + +OutputLine.prototype.is_empty = function() { + return this.__items.length === 0; +}; + +OutputLine.prototype.last = function() { + if (!this.is_empty()) { + return this.__items[this.__items.length - 1]; + } else { + return null; + } +}; + +OutputLine.prototype.push = function(item) { + this.__items.push(item); + var last_newline_index = item.lastIndexOf('\n'); + if (last_newline_index !== -1) { + this.__character_count = item.length - last_newline_index; + } else { + this.__character_count += item.length; + } +}; + +OutputLine.prototype.pop = function() { + var item = null; + if (!this.is_empty()) { + item = this.__items.pop(); + this.__character_count -= item.length; + } + return item; +}; + + +OutputLine.prototype._remove_indent = function() { + if (this.__indent_count > 0) { + this.__indent_count -= 1; + this.__character_count -= this.__parent.indent_size; + } +}; + +OutputLine.prototype._remove_wrap_indent = function() { + if (this.__wrap_point_indent_count > 0) { + this.__wrap_point_indent_count -= 1; + } +}; +OutputLine.prototype.trim = function() { + while (this.last() === ' ') { + this.__items.pop(); + this.__character_count -= 1; + } +}; + +OutputLine.prototype.toString = function() { + var result = ''; + if (this.is_empty()) { + if (this.__parent.indent_empty_lines) { + result = this.__parent.get_indent_string(this.__indent_count); + } + } else { + result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count); + result += this.__items.join(''); + } + return result; +}; + +function IndentStringCache(options, baseIndentString) { + this.__cache = ['']; + this.__indent_size = options.indent_size; + this.__indent_string = options.indent_char; + if (!options.indent_with_tabs) { + this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char); + } + + // Set to null to continue support for auto detection of base indent + baseIndentString = baseIndentString || ''; + if (options.indent_level > 0) { + baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string); + } + + this.__base_string = baseIndentString; + this.__base_string_length = baseIndentString.length; +} + +IndentStringCache.prototype.get_indent_size = function(indent, column) { + var result = this.__base_string_length; + column = column || 0; + if (indent < 0) { + result = 0; + } + result += indent * this.__indent_size; + result += column; + return result; +}; + +IndentStringCache.prototype.get_indent_string = function(indent_level, column) { + var result = this.__base_string; + column = column || 0; + if (indent_level < 0) { + indent_level = 0; + result = ''; + } + column += indent_level * this.__indent_size; + this.__ensure_cache(column); + result += this.__cache[column]; + return result; +}; + +IndentStringCache.prototype.__ensure_cache = function(column) { + while (column >= this.__cache.length) { + this.__add_column(); + } +}; + +IndentStringCache.prototype.__add_column = function() { + var column = this.__cache.length; + var indent = 0; + var result = ''; + if (this.__indent_size && column >= this.__indent_size) { + indent = Math.floor(column / this.__indent_size); + column -= indent * this.__indent_size; + result = new Array(indent + 1).join(this.__indent_string); + } + if (column) { + result += new Array(column + 1).join(' '); + } + + this.__cache.push(result); +}; + +function Output(options, baseIndentString) { + this.__indent_cache = new IndentStringCache(options, baseIndentString); + this.raw = false; + this._end_with_newline = options.end_with_newline; + this.indent_size = options.indent_size; + this.wrap_line_length = options.wrap_line_length; + this.indent_empty_lines = options.indent_empty_lines; + this.__lines = []; + this.previous_line = null; + this.current_line = null; + this.next_line = new OutputLine(this); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = false; + // initialize + this.__add_outputline(); +} + +Output.prototype.__add_outputline = function() { + this.previous_line = this.current_line; + this.current_line = this.next_line.clone_empty(); + this.__lines.push(this.current_line); +}; + +Output.prototype.get_line_number = function() { + return this.__lines.length; +}; + +Output.prototype.get_indent_string = function(indent, column) { + return this.__indent_cache.get_indent_string(indent, column); +}; + +Output.prototype.get_indent_size = function(indent, column) { + return this.__indent_cache.get_indent_size(indent, column); +}; + +Output.prototype.is_empty = function() { + return !this.previous_line && this.current_line.is_empty(); +}; + +Output.prototype.add_new_line = function(force_newline) { + // never newline at the start of file + // otherwise, newline only if we didn't just add one or we're forced + if (this.is_empty() || + (!force_newline && this.just_added_newline())) { + return false; + } + + // if raw output is enabled, don't print additional newlines, + // but still return True as though you had + if (!this.raw) { + this.__add_outputline(); + } + return true; +}; + +Output.prototype.get_code = function(eol) { + this.trim(true); + + // handle some edge cases where the last tokens + // has text that ends with newline(s) + var last_item = this.current_line.pop(); + if (last_item) { + if (last_item[last_item.length - 1] === '\n') { + last_item = last_item.replace(/\n+$/g, ''); + } + this.current_line.push(last_item); + } + + if (this._end_with_newline) { + this.__add_outputline(); + } + + var sweet_code = this.__lines.join('\n'); + + if (eol !== '\n') { + sweet_code = sweet_code.replace(/[\n]/g, eol); + } + return sweet_code; +}; + +Output.prototype.set_wrap_point = function() { + this.current_line._set_wrap_point(); +}; + +Output.prototype.set_indent = function(indent, alignment) { + indent = indent || 0; + alignment = alignment || 0; + + // Next line stores alignment values + this.next_line.set_indent(indent, alignment); + + // Never indent your first output indent at the start of the file + if (this.__lines.length > 1) { + this.current_line.set_indent(indent, alignment); + return true; + } + + this.current_line.set_indent(); + return false; +}; + +Output.prototype.add_raw_token = function(token) { + for (var x = 0; x < token.newlines; x++) { + this.__add_outputline(); + } + this.current_line.set_indent(-1); + this.current_line.push(token.whitespace_before); + this.current_line.push(token.text); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = false; +}; + +Output.prototype.add_token = function(printable_token) { + this.__add_space_before_token(); + this.current_line.push(printable_token); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = this.current_line._allow_wrap(); +}; + +Output.prototype.__add_space_before_token = function() { + if (this.space_before_token && !this.just_added_newline()) { + if (!this.non_breaking_space) { + this.set_wrap_point(); + } + this.current_line.push(' '); + } +}; + +Output.prototype.remove_indent = function(index) { + var output_length = this.__lines.length; + while (index < output_length) { + this.__lines[index]._remove_indent(); + index++; + } + this.current_line._remove_wrap_indent(); +}; + +Output.prototype.trim = function(eat_newlines) { + eat_newlines = (eat_newlines === undefined) ? false : eat_newlines; + + this.current_line.trim(); + + while (eat_newlines && this.__lines.length > 1 && + this.current_line.is_empty()) { + this.__lines.pop(); + this.current_line = this.__lines[this.__lines.length - 1]; + this.current_line.trim(); + } + + this.previous_line = this.__lines.length > 1 ? + this.__lines[this.__lines.length - 2] : null; +}; + +Output.prototype.just_added_newline = function() { + return this.current_line.is_empty(); +}; + +Output.prototype.just_added_blankline = function() { + return this.is_empty() || + (this.current_line.is_empty() && this.previous_line.is_empty()); +}; + +Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) { + var index = this.__lines.length - 2; + while (index >= 0) { + var potentialEmptyLine = this.__lines[index]; + if (potentialEmptyLine.is_empty()) { + break; + } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 && + potentialEmptyLine.item(-1) !== ends_with) { + this.__lines.splice(index + 1, 0, new OutputLine(this)); + this.previous_line = this.__lines[this.__lines.length - 2]; + break; + } + index--; + } +}; + +module.exports.Output = Output; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function Token(type, text, newlines, whitespace_before) { + this.type = type; + this.text = text; + + // comments_before are + // comments that have a new line before them + // and may or may not have a newline after + // this is a set of comments before + this.comments_before = null; /* inline comment*/ + + + // this.comments_after = new TokenStream(); // no new line before and newline after + this.newlines = newlines || 0; + this.whitespace_before = whitespace_before || ''; + this.parent = null; + this.next = null; + this.previous = null; + this.opened = null; + this.closed = null; + this.directives = null; +} + + +module.exports.Token = Token; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* jshint node: true, curly: false */ +// Parts of this section of code is taken from acorn. +// +// Acorn was written by Marijn Haverbeke and released under an MIT +// license. The Unicode regexps (for identifiers and whitespace) were +// taken from [Esprima](http://esprima.org) by Ariya Hidayat. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git + +// ## Character categories + + + + +// acorn used char codes to squeeze the last bit of performance out +// Beautifier is okay without that, so we're using regex +// permit # (23), $ (36), and @ (64). @ is used in ES7 decorators. +// 65 through 91 are uppercase letters. +// permit _ (95). +// 97 through 123 are lowercase letters. +var baseASCIIidentifierStartChars = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"; + +// inside an identifier @ is not allowed but 0-9 are. +var baseASCIIidentifierChars = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a"; + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +var nonASCIIidentifierStartChars = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc"; +var nonASCIIidentifierChars = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f"; +//var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +//var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +var identifierStart = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierStartChars + nonASCIIidentifierStartChars + "])"; +var identifierChars = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])*"; + +exports.identifier = new RegExp(identifierStart + identifierChars, 'g'); +exports.identifierStart = new RegExp(identifierStart); +exports.identifierMatch = new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])+"); + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line + +// Whether a single character denotes a newline. + +exports.newline = /[\n\r\u2028\u2029]/; + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +// in javascript, these two differ +// in python they are the same, different methods are called on them +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source); +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g'); + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var BaseOptions = __webpack_require__(6).Options; + +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline']; + +function Options(options) { + BaseOptions.call(this, options, 'js'); + + // compatibility, re + var raw_brace_style = this.raw_options.brace_style || null; + if (raw_brace_style === "expand-strict") { //graceful handling of deprecated option + this.raw_options.brace_style = "expand"; + } else if (raw_brace_style === "collapse-preserve-inline") { //graceful handling of deprecated option + this.raw_options.brace_style = "collapse,preserve-inline"; + } else if (this.raw_options.braces_on_own_line !== undefined) { //graceful handling of deprecated option + this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse"; + // } else if (!raw_brace_style) { //Nothing exists to set it + // raw_brace_style = "collapse"; + } + + //preserve-inline in delimited string will trigger brace_preserve_inline, everything + //else is considered a brace_style and the last one only will have an effect + + var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']); + + this.brace_preserve_inline = false; //Defaults in case one or other was not specified in meta-option + this.brace_style = "collapse"; + + for (var bs = 0; bs < brace_style_split.length; bs++) { + if (brace_style_split[bs] === "preserve-inline") { + this.brace_preserve_inline = true; + } else { + this.brace_style = brace_style_split[bs]; + } + } + + this.unindent_chained_methods = this._get_boolean('unindent_chained_methods'); + this.break_chained_methods = this._get_boolean('break_chained_methods'); + this.space_in_paren = this._get_boolean('space_in_paren'); + this.space_in_empty_paren = this._get_boolean('space_in_empty_paren'); + this.jslint_happy = this._get_boolean('jslint_happy'); + this.space_after_anon_function = this._get_boolean('space_after_anon_function'); + this.space_after_named_function = this._get_boolean('space_after_named_function'); + this.keep_array_indentation = this._get_boolean('keep_array_indentation'); + this.space_before_conditional = this._get_boolean('space_before_conditional', true); + this.unescape_strings = this._get_boolean('unescape_strings'); + this.e4x = this._get_boolean('e4x'); + this.comma_first = this._get_boolean('comma_first'); + this.operator_position = this._get_selection('operator_position', validPositionValues); + + // For testing of beautify preserve:start directive + this.test_output_raw = this._get_boolean('test_output_raw'); + + // force this._options.space_after_anon_function to true if this._options.jslint_happy + if (this.jslint_happy) { + this.space_after_anon_function = true; + } + +} +Options.prototype = new BaseOptions(); + + + +module.exports.Options = Options; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function Options(options, merge_child_field) { + this.raw_options = _mergeOpts(options, merge_child_field); + + // Support passing the source text back with no change + this.disabled = this._get_boolean('disabled'); + + this.eol = this._get_characters('eol', 'auto'); + this.end_with_newline = this._get_boolean('end_with_newline'); + this.indent_size = this._get_number('indent_size', 4); + this.indent_char = this._get_characters('indent_char', ' '); + this.indent_level = this._get_number('indent_level'); + + this.preserve_newlines = this._get_boolean('preserve_newlines', true); + this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786); + if (!this.preserve_newlines) { + this.max_preserve_newlines = 0; + } + + this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t'); + if (this.indent_with_tabs) { + this.indent_char = '\t'; + + // indent_size behavior changed after 1.8.6 + // It used to be that indent_size would be + // set to 1 for indent_with_tabs. That is no longer needed and + // actually doesn't make sense - why not use spaces? Further, + // that might produce unexpected behavior - tabs being used + // for single-column alignment. So, when indent_with_tabs is true + // and indent_size is 1, reset indent_size to 4. + if (this.indent_size === 1) { + this.indent_size = 4; + } + } + + // Backwards compat with 1.3.x + this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char')); + + this.indent_empty_lines = this._get_boolean('indent_empty_lines'); + + // valid templating languages ['django', 'erb', 'handlebars', 'php'] + // For now, 'auto' = all off for javascript, all on for html (and inline javascript). + // other values ignored + this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']); +} + +Options.prototype._get_array = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = default_value || []; + if (typeof option_value === 'object') { + if (option_value !== null && typeof option_value.concat === 'function') { + result = option_value.concat(); + } + } else if (typeof option_value === 'string') { + result = option_value.split(/[^a-zA-Z0-9_\/\-]+/); + } + return result; +}; + +Options.prototype._get_boolean = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = option_value === undefined ? !!default_value : !!option_value; + return result; +}; + +Options.prototype._get_characters = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = default_value || ''; + if (typeof option_value === 'string') { + result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t'); + } + return result; +}; + +Options.prototype._get_number = function(name, default_value) { + var option_value = this.raw_options[name]; + default_value = parseInt(default_value, 10); + if (isNaN(default_value)) { + default_value = 0; + } + var result = parseInt(option_value, 10); + if (isNaN(result)) { + result = default_value; + } + return result; +}; + +Options.prototype._get_selection = function(name, selection_list, default_value) { + var result = this._get_selection_list(name, selection_list, default_value); + if (result.length !== 1) { + throw new Error( + "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" + + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"); + } + + return result[0]; +}; + + +Options.prototype._get_selection_list = function(name, selection_list, default_value) { + if (!selection_list || selection_list.length === 0) { + throw new Error("Selection list cannot be empty."); + } + + default_value = default_value || [selection_list[0]]; + if (!this._is_valid_selection(default_value, selection_list)) { + throw new Error("Invalid Default Value!"); + } + + var result = this._get_array(name, default_value); + if (!this._is_valid_selection(result, selection_list)) { + throw new Error( + "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" + + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"); + } + + return result; +}; + +Options.prototype._is_valid_selection = function(result, selection_list) { + return result.length && selection_list.length && + !result.some(function(item) { return selection_list.indexOf(item) === -1; }); +}; + + +// merges child options up with the parent options object +// Example: obj = {a: 1, b: {a: 2}} +// mergeOpts(obj, 'b') +// +// Returns: {a: 2} +function _mergeOpts(allOptions, childFieldName) { + var finalOpts = {}; + allOptions = _normalizeOpts(allOptions); + var name; + + for (name in allOptions) { + if (name !== childFieldName) { + finalOpts[name] = allOptions[name]; + } + } + + //merge in the per type settings for the childFieldName + if (childFieldName && allOptions[childFieldName]) { + for (name in allOptions[childFieldName]) { + finalOpts[name] = allOptions[childFieldName][name]; + } + } + return finalOpts; +} + +function _normalizeOpts(options) { + var convertedOpts = {}; + var key; + + for (key in options) { + var newKey = key.replace(/-/g, "_"); + convertedOpts[newKey] = options[key]; + } + return convertedOpts; +} + +module.exports.Options = Options; +module.exports.normalizeOpts = _normalizeOpts; +module.exports.mergeOpts = _mergeOpts; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var InputScanner = __webpack_require__(8).InputScanner; +var BaseTokenizer = __webpack_require__(9).Tokenizer; +var BASETOKEN = __webpack_require__(9).TOKEN; +var Directives = __webpack_require__(13).Directives; +var acorn = __webpack_require__(4); +var Pattern = __webpack_require__(12).Pattern; +var TemplatablePattern = __webpack_require__(14).TemplatablePattern; + + +function in_array(what, arr) { + return arr.indexOf(what) !== -1; +} + + +var TOKEN = { + START_EXPR: 'TK_START_EXPR', + END_EXPR: 'TK_END_EXPR', + START_BLOCK: 'TK_START_BLOCK', + END_BLOCK: 'TK_END_BLOCK', + WORD: 'TK_WORD', + RESERVED: 'TK_RESERVED', + SEMICOLON: 'TK_SEMICOLON', + STRING: 'TK_STRING', + EQUALS: 'TK_EQUALS', + OPERATOR: 'TK_OPERATOR', + COMMA: 'TK_COMMA', + BLOCK_COMMENT: 'TK_BLOCK_COMMENT', + COMMENT: 'TK_COMMENT', + DOT: 'TK_DOT', + UNKNOWN: 'TK_UNKNOWN', + START: BASETOKEN.START, + RAW: BASETOKEN.RAW, + EOF: BASETOKEN.EOF +}; + + +var directives_core = new Directives(/\/\*/, /\*\//); + +var number_pattern = /0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/; + +var digit = /[0-9]/; + +// Dot "." must be distinguished from "..." and decimal +var dot_pattern = /[^\d\.]/; + +var positionable_operators = ( + ">>> === !== " + + "<< && >= ** != == <= >> || " + + "< / - + > : & % ? ^ | *").split(' '); + +// IMPORTANT: this must be sorted longest to shortest or tokenizing many not work. +// Also, you must update possitionable operators separately from punct +var punct = + ">>>= " + + "... >>= <<= === >>> !== **= " + + "=> ^= :: /= << <= == && -= >= >> != -- += ** || ++ %= &= *= |= " + + "= ! ? > < : / ^ - + * & % ~ |"; + +punct = punct.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); +punct = punct.replace(/ /g, '|'); + +var punct_pattern = new RegExp(punct); + +// words which should always start on new line. +var line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(','); +var reserved_words = line_starters.concat(['do', 'in', 'of', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as']); +var reserved_word_pattern = new RegExp('^(?:' + reserved_words.join('|') + ')$'); + +// var template_pattern = /(?:(?:<\?php|<\?=)[\s\S]*?\?>)|(?:<%[\s\S]*?%>)/g; + +var in_html_comment; + +var Tokenizer = function(input_string, options) { + BaseTokenizer.call(this, input_string, options); + + this._patterns.whitespace = this._patterns.whitespace.matching( + /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source, + /\u2028\u2029/.source); + + var pattern_reader = new Pattern(this._input); + var templatable = new TemplatablePattern(this._input) + .read_options(this._options); + + this.__patterns = { + template: templatable, + identifier: templatable.starting_with(acorn.identifier).matching(acorn.identifierMatch), + number: pattern_reader.matching(number_pattern), + punct: pattern_reader.matching(punct_pattern), + // comment ends just before nearest linefeed or end of file + comment: pattern_reader.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/), + // /* ... */ comment ends with nearest */ or end of file + block_comment: pattern_reader.starting_with(/\/\*/).until_after(/\*\//), + html_comment_start: pattern_reader.matching(//), + include: pattern_reader.starting_with(/#include/).until_after(acorn.lineBreak), + shebang: pattern_reader.starting_with(/#!/).until_after(acorn.lineBreak), + xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/), + single_quote: templatable.until(/['\\\n\r\u2028\u2029]/), + double_quote: templatable.until(/["\\\n\r\u2028\u2029]/), + template_text: templatable.until(/[`\\$]/), + template_expression: templatable.until(/[`}\\]/) + }; + +}; +Tokenizer.prototype = new BaseTokenizer(); + +Tokenizer.prototype._is_comment = function(current_token) { + return current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.BLOCK_COMMENT || current_token.type === TOKEN.UNKNOWN; +}; + +Tokenizer.prototype._is_opening = function(current_token) { + return current_token.type === TOKEN.START_BLOCK || current_token.type === TOKEN.START_EXPR; +}; + +Tokenizer.prototype._is_closing = function(current_token, open_token) { + return (current_token.type === TOKEN.END_BLOCK || current_token.type === TOKEN.END_EXPR) && + (open_token && ( + (current_token.text === ']' && open_token.text === '[') || + (current_token.text === ')' && open_token.text === '(') || + (current_token.text === '}' && open_token.text === '{'))); +}; + +Tokenizer.prototype._reset = function() { + in_html_comment = false; +}; + +Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false + var token = null; + this._readWhitespace(); + var c = this._input.peek(); + + if (c === null) { + return this._create_token(TOKEN.EOF, ''); + } + + token = token || this._read_non_javascript(c); + token = token || this._read_string(c); + token = token || this._read_word(previous_token); + token = token || this._read_singles(c); + token = token || this._read_comment(c); + token = token || this._read_regexp(c, previous_token); + token = token || this._read_xml(c, previous_token); + token = token || this._read_punctuation(); + token = token || this._create_token(TOKEN.UNKNOWN, this._input.next()); + + return token; +}; + +Tokenizer.prototype._read_word = function(previous_token) { + var resulting_string; + resulting_string = this.__patterns.identifier.read(); + if (resulting_string !== '') { + resulting_string = resulting_string.replace(acorn.allLineBreaks, '\n'); + if (!(previous_token.type === TOKEN.DOT || + (previous_token.type === TOKEN.RESERVED && (previous_token.text === 'set' || previous_token.text === 'get'))) && + reserved_word_pattern.test(resulting_string)) { + if (resulting_string === 'in' || resulting_string === 'of') { // hack for 'in' and 'of' operators + return this._create_token(TOKEN.OPERATOR, resulting_string); + } + return this._create_token(TOKEN.RESERVED, resulting_string); + } + return this._create_token(TOKEN.WORD, resulting_string); + } + + resulting_string = this.__patterns.number.read(); + if (resulting_string !== '') { + return this._create_token(TOKEN.WORD, resulting_string); + } +}; + +Tokenizer.prototype._read_singles = function(c) { + var token = null; + if (c === '(' || c === '[') { + token = this._create_token(TOKEN.START_EXPR, c); + } else if (c === ')' || c === ']') { + token = this._create_token(TOKEN.END_EXPR, c); + } else if (c === '{') { + token = this._create_token(TOKEN.START_BLOCK, c); + } else if (c === '}') { + token = this._create_token(TOKEN.END_BLOCK, c); + } else if (c === ';') { + token = this._create_token(TOKEN.SEMICOLON, c); + } else if (c === '.' && dot_pattern.test(this._input.peek(1))) { + token = this._create_token(TOKEN.DOT, c); + } else if (c === ',') { + token = this._create_token(TOKEN.COMMA, c); + } + + if (token) { + this._input.next(); + } + return token; +}; + +Tokenizer.prototype._read_punctuation = function() { + var resulting_string = this.__patterns.punct.read(); + + if (resulting_string !== '') { + if (resulting_string === '=') { + return this._create_token(TOKEN.EQUALS, resulting_string); + } else { + return this._create_token(TOKEN.OPERATOR, resulting_string); + } + } +}; + +Tokenizer.prototype._read_non_javascript = function(c) { + var resulting_string = ''; + + if (c === '#') { + if (this._is_first_token()) { + resulting_string = this.__patterns.shebang.read(); + + if (resulting_string) { + return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + '\n'); + } + } + + // handles extendscript #includes + resulting_string = this.__patterns.include.read(); + + if (resulting_string) { + return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + '\n'); + } + + c = this._input.next(); + + // Spidermonkey-specific sharp variables for circular references. Considered obsolete. + var sharp = '#'; + if (this._input.hasNext() && this._input.testChar(digit)) { + do { + c = this._input.next(); + sharp += c; + } while (this._input.hasNext() && c !== '#' && c !== '='); + if (c === '#') { + // + } else if (this._input.peek() === '[' && this._input.peek(1) === ']') { + sharp += '[]'; + this._input.next(); + this._input.next(); + } else if (this._input.peek() === '{' && this._input.peek(1) === '}') { + sharp += '{}'; + this._input.next(); + this._input.next(); + } + return this._create_token(TOKEN.WORD, sharp); + } + + this._input.back(); + + } else if (c === '<' && this._is_first_token()) { + resulting_string = this.__patterns.html_comment_start.read(); + if (resulting_string) { + while (this._input.hasNext() && !this._input.testChar(acorn.newline)) { + resulting_string += this._input.next(); + } + in_html_comment = true; + return this._create_token(TOKEN.COMMENT, resulting_string); + } + } else if (in_html_comment && c === '-') { + resulting_string = this.__patterns.html_comment_end.read(); + if (resulting_string) { + in_html_comment = false; + return this._create_token(TOKEN.COMMENT, resulting_string); + } + } + + return null; +}; + +Tokenizer.prototype._read_comment = function(c) { + var token = null; + if (c === '/') { + var comment = ''; + if (this._input.peek(1) === '*') { + // peek for comment /* ... */ + comment = this.__patterns.block_comment.read(); + var directives = directives_core.get_directives(comment); + if (directives && directives.ignore === 'start') { + comment += directives_core.readIgnored(this._input); + } + comment = comment.replace(acorn.allLineBreaks, '\n'); + token = this._create_token(TOKEN.BLOCK_COMMENT, comment); + token.directives = directives; + } else if (this._input.peek(1) === '/') { + // peek for comment // ... + comment = this.__patterns.comment.read(); + token = this._create_token(TOKEN.COMMENT, comment); + } + } + return token; +}; + +Tokenizer.prototype._read_string = function(c) { + if (c === '`' || c === "'" || c === '"') { + var resulting_string = this._input.next(); + this.has_char_escapes = false; + + if (c === '`') { + resulting_string += this._read_string_recursive('`', true, '${'); + } else { + resulting_string += this._read_string_recursive(c); + } + + if (this.has_char_escapes && this._options.unescape_strings) { + resulting_string = unescape_string(resulting_string); + } + + if (this._input.peek() === c) { + resulting_string += this._input.next(); + } + + resulting_string = resulting_string.replace(acorn.allLineBreaks, '\n'); + + return this._create_token(TOKEN.STRING, resulting_string); + } + + return null; +}; + +Tokenizer.prototype._allow_regexp_or_xml = function(previous_token) { + // regex and xml can only appear in specific locations during parsing + return (previous_token.type === TOKEN.RESERVED && in_array(previous_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) || + (previous_token.type === TOKEN.END_EXPR && previous_token.text === ')' && + previous_token.opened.previous.type === TOKEN.RESERVED && in_array(previous_token.opened.previous.text, ['if', 'while', 'for'])) || + (in_array(previous_token.type, [TOKEN.COMMENT, TOKEN.START_EXPR, TOKEN.START_BLOCK, TOKEN.START, + TOKEN.END_BLOCK, TOKEN.OPERATOR, TOKEN.EQUALS, TOKEN.EOF, TOKEN.SEMICOLON, TOKEN.COMMA + ])); +}; + +Tokenizer.prototype._read_regexp = function(c, previous_token) { + + if (c === '/' && this._allow_regexp_or_xml(previous_token)) { + // handle regexp + // + var resulting_string = this._input.next(); + var esc = false; + + var in_char_class = false; + while (this._input.hasNext() && + ((esc || in_char_class || this._input.peek() !== c) && + !this._input.testChar(acorn.newline))) { + resulting_string += this._input.peek(); + if (!esc) { + esc = this._input.peek() === '\\'; + if (this._input.peek() === '[') { + in_char_class = true; + } else if (this._input.peek() === ']') { + in_char_class = false; + } + } else { + esc = false; + } + this._input.next(); + } + + if (this._input.peek() === c) { + resulting_string += this._input.next(); + + // regexps may have modifiers /regexp/MOD , so fetch those, too + // Only [gim] are valid, but if the user puts in garbage, do what we can to take it. + resulting_string += this._input.read(acorn.identifier); + } + return this._create_token(TOKEN.STRING, resulting_string); + } + return null; +}; + +Tokenizer.prototype._read_xml = function(c, previous_token) { + + if (this._options.e4x && c === "<" && this._allow_regexp_or_xml(previous_token)) { + var xmlStr = ''; + var match = this.__patterns.xml.read_match(); + // handle e4x xml literals + // + if (match) { + // Trim root tag to attempt to + var rootTag = match[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}'); + var isCurlyRoot = rootTag.indexOf('{') === 0; + var depth = 0; + while (match) { + var isEndTag = !!match[1]; + var tagName = match[2]; + var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === "![CDATA["); + if (!isSingletonTag && + (tagName === rootTag || (isCurlyRoot && tagName.replace(/^{\s+/, '{').replace(/\s+}$/, '}')))) { + if (isEndTag) { + --depth; + } else { + ++depth; + } + } + xmlStr += match[0]; + if (depth <= 0) { + break; + } + match = this.__patterns.xml.read_match(); + } + // if we didn't close correctly, keep unformatted. + if (!match) { + xmlStr += this._input.match(/[\s\S]*/g)[0]; + } + xmlStr = xmlStr.replace(acorn.allLineBreaks, '\n'); + return this._create_token(TOKEN.STRING, xmlStr); + } + } + + return null; +}; + +function unescape_string(s) { + // You think that a regex would work for this + // return s.replace(/\\x([0-9a-f]{2})/gi, function(match, val) { + // return String.fromCharCode(parseInt(val, 16)); + // }) + // However, dealing with '\xff', '\\xff', '\\\xff' makes this more fun. + var out = '', + escaped = 0; + + var input_scan = new InputScanner(s); + var matched = null; + + while (input_scan.hasNext()) { + // Keep any whitespace, non-slash characters + // also keep slash pairs. + matched = input_scan.match(/([\s]|[^\\]|\\\\)+/g); + + if (matched) { + out += matched[0]; + } + + if (input_scan.peek() === '\\') { + input_scan.next(); + if (input_scan.peek() === 'x') { + matched = input_scan.match(/x([0-9A-Fa-f]{2})/g); + } else if (input_scan.peek() === 'u') { + matched = input_scan.match(/u([0-9A-Fa-f]{4})/g); + } else { + out += '\\'; + if (input_scan.hasNext()) { + out += input_scan.next(); + } + continue; + } + + // If there's some error decoding, return the original string + if (!matched) { + return s; + } + + escaped = parseInt(matched[1], 16); + + if (escaped > 0x7e && escaped <= 0xff && matched[0].indexOf('x') === 0) { + // we bail out on \x7f..\xff, + // leaving whole string escaped, + // as it's probably completely binary + return s; + } else if (escaped >= 0x00 && escaped < 0x20) { + // leave 0x00...0x1f escaped + out += '\\' + matched[0]; + continue; + } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) { + // single-quote, apostrophe, backslash - escape these + out += '\\' + String.fromCharCode(escaped); + } else { + out += String.fromCharCode(escaped); + } + } + } + + return out; +} + +// handle string +// +Tokenizer.prototype._read_string_recursive = function(delimiter, allow_unescaped_newlines, start_sub) { + var current_char; + var pattern; + if (delimiter === '\'') { + pattern = this.__patterns.single_quote; + } else if (delimiter === '"') { + pattern = this.__patterns.double_quote; + } else if (delimiter === '`') { + pattern = this.__patterns.template_text; + } else if (delimiter === '}') { + pattern = this.__patterns.template_expression; + } + + var resulting_string = pattern.read(); + var next = ''; + while (this._input.hasNext()) { + next = this._input.next(); + if (next === delimiter || + (!allow_unescaped_newlines && acorn.newline.test(next))) { + this._input.back(); + break; + } else if (next === '\\' && this._input.hasNext()) { + current_char = this._input.peek(); + + if (current_char === 'x' || current_char === 'u') { + this.has_char_escapes = true; + } else if (current_char === '\r' && this._input.peek(1) === '\n') { + this._input.next(); + } + next += this._input.next(); + } else if (start_sub) { + if (start_sub === '${' && next === '$' && this._input.peek() === '{') { + next += this._input.next(); + } + + if (start_sub === next) { + if (delimiter === '`') { + next += this._read_string_recursive('}', allow_unescaped_newlines, '`'); + } else { + next += this._read_string_recursive('`', allow_unescaped_newlines, '${'); + } + if (this._input.hasNext()) { + next += this._input.next(); + } + } + } + next += pattern.read(); + resulting_string += next; + } + + return resulting_string; +}; + +module.exports.Tokenizer = Tokenizer; +module.exports.TOKEN = TOKEN; +module.exports.positionable_operators = positionable_operators.slice(); +module.exports.line_starters = line_starters.slice(); + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky'); + +function InputScanner(input_string) { + this.__input = input_string || ''; + this.__input_length = this.__input.length; + this.__position = 0; +} + +InputScanner.prototype.restart = function() { + this.__position = 0; +}; + +InputScanner.prototype.back = function() { + if (this.__position > 0) { + this.__position -= 1; + } +}; + +InputScanner.prototype.hasNext = function() { + return this.__position < this.__input_length; +}; + +InputScanner.prototype.next = function() { + var val = null; + if (this.hasNext()) { + val = this.__input.charAt(this.__position); + this.__position += 1; + } + return val; +}; + +InputScanner.prototype.peek = function(index) { + var val = null; + index = index || 0; + index += this.__position; + if (index >= 0 && index < this.__input_length) { + val = this.__input.charAt(index); + } + return val; +}; + +// This is a JavaScript only helper function (not in python) +// Javascript doesn't have a match method +// and not all implementation support "sticky" flag. +// If they do not support sticky then both this.match() and this.test() method +// must get the match and check the index of the match. +// If sticky is supported and set, this method will use it. +// Otherwise it will check that global is set, and fall back to the slower method. +InputScanner.prototype.__match = function(pattern, index) { + pattern.lastIndex = index; + var pattern_match = pattern.exec(this.__input); + + if (pattern_match && !(regexp_has_sticky && pattern.sticky)) { + if (pattern_match.index !== index) { + pattern_match = null; + } + } + + return pattern_match; +}; + +InputScanner.prototype.test = function(pattern, index) { + index = index || 0; + index += this.__position; + + if (index >= 0 && index < this.__input_length) { + return !!this.__match(pattern, index); + } else { + return false; + } +}; + +InputScanner.prototype.testChar = function(pattern, index) { + // test one character regex match + var val = this.peek(index); + pattern.lastIndex = 0; + return val !== null && pattern.test(val); +}; + +InputScanner.prototype.match = function(pattern) { + var pattern_match = this.__match(pattern, this.__position); + if (pattern_match) { + this.__position += pattern_match[0].length; + } else { + pattern_match = null; + } + return pattern_match; +}; + +InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) { + var val = ''; + var match; + if (starting_pattern) { + match = this.match(starting_pattern); + if (match) { + val += match[0]; + } + } + if (until_pattern && (match || !starting_pattern)) { + val += this.readUntil(until_pattern, until_after); + } + return val; +}; + +InputScanner.prototype.readUntil = function(pattern, until_after) { + var val = ''; + var match_index = this.__position; + pattern.lastIndex = this.__position; + var pattern_match = pattern.exec(this.__input); + if (pattern_match) { + match_index = pattern_match.index; + if (until_after) { + match_index += pattern_match[0].length; + } + } else { + match_index = this.__input_length; + } + + val = this.__input.substring(this.__position, match_index); + this.__position = match_index; + return val; +}; + +InputScanner.prototype.readUntilAfter = function(pattern) { + return this.readUntil(pattern, true); +}; + +InputScanner.prototype.get_regexp = function(pattern, match_from) { + var result = null; + var flags = 'g'; + if (match_from && regexp_has_sticky) { + flags = 'y'; + } + // strings are converted to regexp + if (typeof pattern === "string" && pattern !== '') { + // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags); + result = new RegExp(pattern, flags); + } else if (pattern) { + result = new RegExp(pattern.source, flags); + } + return result; +}; + +InputScanner.prototype.get_literal_regexp = function(literal_string) { + return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')); +}; + +/* css beautifier legacy helpers */ +InputScanner.prototype.peekUntilAfter = function(pattern) { + var start = this.__position; + var val = this.readUntilAfter(pattern); + this.__position = start; + return val; +}; + +InputScanner.prototype.lookBack = function(testVal) { + var start = this.__position - 1; + return start >= testVal.length && this.__input.substring(start - testVal.length, start) + .toLowerCase() === testVal; +}; + +module.exports.InputScanner = InputScanner; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var InputScanner = __webpack_require__(8).InputScanner; +var Token = __webpack_require__(3).Token; +var TokenStream = __webpack_require__(10).TokenStream; +var WhitespacePattern = __webpack_require__(11).WhitespacePattern; + +var TOKEN = { + START: 'TK_START', + RAW: 'TK_RAW', + EOF: 'TK_EOF' +}; + +var Tokenizer = function(input_string, options) { + this._input = new InputScanner(input_string); + this._options = options || {}; + this.__tokens = null; + + this._patterns = {}; + this._patterns.whitespace = new WhitespacePattern(this._input); +}; + +Tokenizer.prototype.tokenize = function() { + this._input.restart(); + this.__tokens = new TokenStream(); + + this._reset(); + + var current; + var previous = new Token(TOKEN.START, ''); + var open_token = null; + var open_stack = []; + var comments = new TokenStream(); + + while (previous.type !== TOKEN.EOF) { + current = this._get_next_token(previous, open_token); + while (this._is_comment(current)) { + comments.add(current); + current = this._get_next_token(previous, open_token); + } + + if (!comments.isEmpty()) { + current.comments_before = comments; + comments = new TokenStream(); + } + + current.parent = open_token; + + if (this._is_opening(current)) { + open_stack.push(open_token); + open_token = current; + } else if (open_token && this._is_closing(current, open_token)) { + current.opened = open_token; + open_token.closed = current; + open_token = open_stack.pop(); + current.parent = open_token; + } + + current.previous = previous; + previous.next = current; + + this.__tokens.add(current); + previous = current; + } + + return this.__tokens; +}; + + +Tokenizer.prototype._is_first_token = function() { + return this.__tokens.isEmpty(); +}; + +Tokenizer.prototype._reset = function() {}; + +Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false + this._readWhitespace(); + var resulting_string = this._input.read(/.+/g); + if (resulting_string) { + return this._create_token(TOKEN.RAW, resulting_string); + } else { + return this._create_token(TOKEN.EOF, ''); + } +}; + +Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false + return false; +}; + +Tokenizer.prototype._is_opening = function(current_token) { // jshint unused:false + return false; +}; + +Tokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false + return false; +}; + +Tokenizer.prototype._create_token = function(type, text) { + var token = new Token(type, text, + this._patterns.whitespace.newline_count, + this._patterns.whitespace.whitespace_before_token); + return token; +}; + +Tokenizer.prototype._readWhitespace = function() { + return this._patterns.whitespace.read(); +}; + + + +module.exports.Tokenizer = Tokenizer; +module.exports.TOKEN = TOKEN; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function TokenStream(parent_token) { + // private + this.__tokens = []; + this.__tokens_length = this.__tokens.length; + this.__position = 0; + this.__parent_token = parent_token; +} + +TokenStream.prototype.restart = function() { + this.__position = 0; +}; + +TokenStream.prototype.isEmpty = function() { + return this.__tokens_length === 0; +}; + +TokenStream.prototype.hasNext = function() { + return this.__position < this.__tokens_length; +}; + +TokenStream.prototype.next = function() { + var val = null; + if (this.hasNext()) { + val = this.__tokens[this.__position]; + this.__position += 1; + } + return val; +}; + +TokenStream.prototype.peek = function(index) { + var val = null; + index = index || 0; + index += this.__position; + if (index >= 0 && index < this.__tokens_length) { + val = this.__tokens[index]; + } + return val; +}; + +TokenStream.prototype.add = function(token) { + if (this.__parent_token) { + token.parent = this.__parent_token; + } + this.__tokens.push(token); + this.__tokens_length += 1; +}; + +module.exports.TokenStream = TokenStream; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var Pattern = __webpack_require__(12).Pattern; + +function WhitespacePattern(input_scanner, parent) { + Pattern.call(this, input_scanner, parent); + if (parent) { + this._line_regexp = this._input.get_regexp(parent._line_regexp); + } else { + this.__set_whitespace_patterns('', ''); + } + + this.newline_count = 0; + this.whitespace_before_token = ''; +} +WhitespacePattern.prototype = new Pattern(); + +WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) { + whitespace_chars += '\\t '; + newline_chars += '\\n\\r'; + + this._match_pattern = this._input.get_regexp( + '[' + whitespace_chars + newline_chars + ']+', true); + this._newline_regexp = this._input.get_regexp( + '\\r\\n|[' + newline_chars + ']'); +}; + +WhitespacePattern.prototype.read = function() { + this.newline_count = 0; + this.whitespace_before_token = ''; + + var resulting_string = this._input.read(this._match_pattern); + if (resulting_string === ' ') { + this.whitespace_before_token = ' '; + } else if (resulting_string) { + var matches = this.__split(this._newline_regexp, resulting_string); + this.newline_count = matches.length - 1; + this.whitespace_before_token = matches[this.newline_count]; + } + + return resulting_string; +}; + +WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) { + var result = this._create(); + result.__set_whitespace_patterns(whitespace_chars, newline_chars); + result._update(); + return result; +}; + +WhitespacePattern.prototype._create = function() { + return new WhitespacePattern(this._input, this); +}; + +WhitespacePattern.prototype.__split = function(regexp, input_string) { + regexp.lastIndex = 0; + var start_index = 0; + var result = []; + var next_match = regexp.exec(input_string); + while (next_match) { + result.push(input_string.substring(start_index, next_match.index)); + start_index = next_match.index + next_match[0].length; + next_match = regexp.exec(input_string); + } + + if (start_index < input_string.length) { + result.push(input_string.substring(start_index, input_string.length)); + } else { + result.push(''); + } + + return result; +}; + + + +module.exports.WhitespacePattern = WhitespacePattern; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function Pattern(input_scanner, parent) { + this._input = input_scanner; + this._starting_pattern = null; + this._match_pattern = null; + this._until_pattern = null; + this._until_after = false; + + if (parent) { + this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true); + this._match_pattern = this._input.get_regexp(parent._match_pattern, true); + this._until_pattern = this._input.get_regexp(parent._until_pattern); + this._until_after = parent._until_after; + } +} + +Pattern.prototype.read = function() { + var result = this._input.read(this._starting_pattern); + if (!this._starting_pattern || result) { + result += this._input.read(this._match_pattern, this._until_pattern, this._until_after); + } + return result; +}; + +Pattern.prototype.read_match = function() { + return this._input.match(this._match_pattern); +}; + +Pattern.prototype.until_after = function(pattern) { + var result = this._create(); + result._until_after = true; + result._until_pattern = this._input.get_regexp(pattern); + result._update(); + return result; +}; + +Pattern.prototype.until = function(pattern) { + var result = this._create(); + result._until_after = false; + result._until_pattern = this._input.get_regexp(pattern); + result._update(); + return result; +}; + +Pattern.prototype.starting_with = function(pattern) { + var result = this._create(); + result._starting_pattern = this._input.get_regexp(pattern, true); + result._update(); + return result; +}; + +Pattern.prototype.matching = function(pattern) { + var result = this._create(); + result._match_pattern = this._input.get_regexp(pattern, true); + result._update(); + return result; +}; + +Pattern.prototype._create = function() { + return new Pattern(this._input, this); +}; + +Pattern.prototype._update = function() {}; + +module.exports.Pattern = Pattern; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function Directives(start_block_pattern, end_block_pattern) { + start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source; + end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source; + this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g'); + this.__directive_pattern = / (\w+)[:](\w+)/g; + + this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g'); +} + +Directives.prototype.get_directives = function(text) { + if (!text.match(this.__directives_block_pattern)) { + return null; + } + + var directives = {}; + this.__directive_pattern.lastIndex = 0; + var directive_match = this.__directive_pattern.exec(text); + + while (directive_match) { + directives[directive_match[1]] = directive_match[2]; + directive_match = this.__directive_pattern.exec(text); + } + + return directives; +}; + +Directives.prototype.readIgnored = function(input) { + return input.readUntilAfter(this.__directives_end_ignore_pattern); +}; + + +module.exports.Directives = Directives; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var Pattern = __webpack_require__(12).Pattern; + + +var template_names = { + django: false, + erb: false, + handlebars: false, + php: false +}; + +// This lets templates appear anywhere we would do a readUntil +// The cost is higher but it is pay to play. +function TemplatablePattern(input_scanner, parent) { + Pattern.call(this, input_scanner, parent); + this.__template_pattern = null; + this._disabled = Object.assign({}, template_names); + this._excluded = Object.assign({}, template_names); + + if (parent) { + this.__template_pattern = this._input.get_regexp(parent.__template_pattern); + this._excluded = Object.assign(this._excluded, parent._excluded); + this._disabled = Object.assign(this._disabled, parent._disabled); + } + var pattern = new Pattern(input_scanner); + this.__patterns = { + handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/), + handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/), + handlebars: pattern.starting_with(/{{/).until_after(/}}/), + php: pattern.starting_with(/<\?(?:[=]|php)/).until_after(/\?>/), + erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/), + // django coflicts with handlebars a bit. + django: pattern.starting_with(/{%/).until_after(/%}/), + django_value: pattern.starting_with(/{{/).until_after(/}}/), + django_comment: pattern.starting_with(/{#/).until_after(/#}/) + }; +} +TemplatablePattern.prototype = new Pattern(); + +TemplatablePattern.prototype._create = function() { + return new TemplatablePattern(this._input, this); +}; + +TemplatablePattern.prototype._update = function() { + this.__set_templated_pattern(); +}; + +TemplatablePattern.prototype.disable = function(language) { + var result = this._create(); + result._disabled[language] = true; + result._update(); + return result; +}; + +TemplatablePattern.prototype.read_options = function(options) { + var result = this._create(); + for (var language in template_names) { + result._disabled[language] = options.templating.indexOf(language) === -1; + } + result._update(); + return result; +}; + +TemplatablePattern.prototype.exclude = function(language) { + var result = this._create(); + result._excluded[language] = true; + result._update(); + return result; +}; + +TemplatablePattern.prototype.read = function() { + var result = ''; + if (this._match_pattern) { + result = this._input.read(this._starting_pattern); + } else { + result = this._input.read(this._starting_pattern, this.__template_pattern); + } + var next = this._read_template(); + while (next) { + if (this._match_pattern) { + next += this._input.read(this._match_pattern); + } else { + next += this._input.readUntil(this.__template_pattern); + } + result += next; + next = this._read_template(); + } + + if (this._until_after) { + result += this._input.readUntilAfter(this._until_pattern); + } + return result; +}; + +TemplatablePattern.prototype.__set_templated_pattern = function() { + var items = []; + + if (!this._disabled.php) { + items.push(this.__patterns.php._starting_pattern.source); + } + if (!this._disabled.handlebars) { + items.push(this.__patterns.handlebars._starting_pattern.source); + } + if (!this._disabled.erb) { + items.push(this.__patterns.erb._starting_pattern.source); + } + if (!this._disabled.django) { + items.push(this.__patterns.django._starting_pattern.source); + items.push(this.__patterns.django_value._starting_pattern.source); + items.push(this.__patterns.django_comment._starting_pattern.source); + } + + if (this._until_pattern) { + items.push(this._until_pattern.source); + } + this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')'); +}; + +TemplatablePattern.prototype._read_template = function() { + var resulting_string = ''; + var c = this._input.peek(); + if (c === '<') { + var peek1 = this._input.peek(1); + //if we're in a comment, do something special + // We treat all comments as literals, even more than preformatted tags + // we just look for the appropriate close tag + if (!this._disabled.php && !this._excluded.php && peek1 === '?') { + resulting_string = resulting_string || + this.__patterns.php.read(); + } + if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') { + resulting_string = resulting_string || + this.__patterns.erb.read(); + } + } else if (c === '{') { + if (!this._disabled.handlebars && !this._excluded.handlebars) { + resulting_string = resulting_string || + this.__patterns.handlebars_comment.read(); + resulting_string = resulting_string || + this.__patterns.handlebars_unescaped.read(); + resulting_string = resulting_string || + this.__patterns.handlebars.read(); + } + if (!this._disabled.django) { + // django coflicts with handlebars a bit. + if (!this._excluded.django && !this._excluded.handlebars) { + resulting_string = resulting_string || + this.__patterns.django_value.read(); + } + if (!this._excluded.django) { + resulting_string = resulting_string || + this.__patterns.django_comment.read(); + resulting_string = resulting_string || + this.__patterns.django.read(); + } + } + } + return resulting_string; +}; + + +module.exports.TemplatablePattern = TemplatablePattern; + + +/***/ }) +/******/ ]); +var js_beautify = legacy_beautify_js; +/* Footer */ +if (true) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return { js_beautify: js_beautify }; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else if (typeof exports !== "undefined") { + // Add support for CommonJS. Just put this file somewhere on your require.paths + // and you will be able to `var js_beautify = require("beautify").js_beautify`. + exports.js_beautify = js_beautify; +} else if (typeof window !== "undefined") { + // If we're running a web page and don't have either of the above, add our one global + window.js_beautify = js_beautify; +} else if (typeof global !== "undefined") { + // If we don't even have window, try global. + global.js_beautify = js_beautify; +} + +}()); + + + +/***/ }), +/* 533 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* AUTO-GENERATED. DO NOT MODIFY. */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + CSS Beautifier +--------------- + + Written by Harutyun Amirjanyan, (amirjanyan@gmail.com) + + Based on code initially developed by: Einar Lielmanis, + https://beautifier.io/ + + Usage: + css_beautify(source_text); + css_beautify(source_text, options); + + The options are (default in brackets): + indent_size (4) — indentation size, + indent_char (space) — character to indent with, + selector_separator_newline (true) - separate selectors with newline or + not (e.g. "a,\nbr" or "a, br") + end_with_newline (false) - end with a newline + newline_between_rules (true) - add a new line after every css rule + space_around_selector_separator (false) - ensure space around selector separators: + '>', '+', '~' (e.g. "a>b" -> "a > b") + e.g + + css_beautify(css_source_text, { + 'indent_size': 1, + 'indent_char': '\t', + 'selector_separator': ' ', + 'end_with_newline': false, + 'newline_between_rules': true, + 'space_around_selector_separator': true + }); +*/ + +// http://www.w3.org/TR/CSS21/syndata.html#tokenization +// http://www.w3.org/TR/css3-syntax/ + +(function() { + +/* GENERATED_BUILD_OUTPUT */ +var legacy_beautify_css = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 15); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */, +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function OutputLine(parent) { + this.__parent = parent; + this.__character_count = 0; + // use indent_count as a marker for this.__lines that have preserved indentation + this.__indent_count = -1; + this.__alignment_count = 0; + this.__wrap_point_index = 0; + this.__wrap_point_character_count = 0; + this.__wrap_point_indent_count = -1; + this.__wrap_point_alignment_count = 0; + + this.__items = []; +} + +OutputLine.prototype.clone_empty = function() { + var line = new OutputLine(this.__parent); + line.set_indent(this.__indent_count, this.__alignment_count); + return line; +}; + +OutputLine.prototype.item = function(index) { + if (index < 0) { + return this.__items[this.__items.length + index]; + } else { + return this.__items[index]; + } +}; + +OutputLine.prototype.has_match = function(pattern) { + for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) { + if (this.__items[lastCheckedOutput].match(pattern)) { + return true; + } + } + return false; +}; + +OutputLine.prototype.set_indent = function(indent, alignment) { + if (this.is_empty()) { + this.__indent_count = indent || 0; + this.__alignment_count = alignment || 0; + this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count); + } +}; + +OutputLine.prototype._set_wrap_point = function() { + if (this.__parent.wrap_line_length) { + this.__wrap_point_index = this.__items.length; + this.__wrap_point_character_count = this.__character_count; + this.__wrap_point_indent_count = this.__parent.next_line.__indent_count; + this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count; + } +}; + +OutputLine.prototype._should_wrap = function() { + return this.__wrap_point_index && + this.__character_count > this.__parent.wrap_line_length && + this.__wrap_point_character_count > this.__parent.next_line.__character_count; +}; + +OutputLine.prototype._allow_wrap = function() { + if (this._should_wrap()) { + this.__parent.add_new_line(); + var next = this.__parent.current_line; + next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count); + next.__items = this.__items.slice(this.__wrap_point_index); + this.__items = this.__items.slice(0, this.__wrap_point_index); + + next.__character_count += this.__character_count - this.__wrap_point_character_count; + this.__character_count = this.__wrap_point_character_count; + + if (next.__items[0] === " ") { + next.__items.splice(0, 1); + next.__character_count -= 1; + } + return true; + } + return false; +}; + +OutputLine.prototype.is_empty = function() { + return this.__items.length === 0; +}; + +OutputLine.prototype.last = function() { + if (!this.is_empty()) { + return this.__items[this.__items.length - 1]; + } else { + return null; + } +}; + +OutputLine.prototype.push = function(item) { + this.__items.push(item); + var last_newline_index = item.lastIndexOf('\n'); + if (last_newline_index !== -1) { + this.__character_count = item.length - last_newline_index; + } else { + this.__character_count += item.length; + } +}; + +OutputLine.prototype.pop = function() { + var item = null; + if (!this.is_empty()) { + item = this.__items.pop(); + this.__character_count -= item.length; + } + return item; +}; + + +OutputLine.prototype._remove_indent = function() { + if (this.__indent_count > 0) { + this.__indent_count -= 1; + this.__character_count -= this.__parent.indent_size; + } +}; + +OutputLine.prototype._remove_wrap_indent = function() { + if (this.__wrap_point_indent_count > 0) { + this.__wrap_point_indent_count -= 1; + } +}; +OutputLine.prototype.trim = function() { + while (this.last() === ' ') { + this.__items.pop(); + this.__character_count -= 1; + } +}; + +OutputLine.prototype.toString = function() { + var result = ''; + if (this.is_empty()) { + if (this.__parent.indent_empty_lines) { + result = this.__parent.get_indent_string(this.__indent_count); + } + } else { + result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count); + result += this.__items.join(''); + } + return result; +}; + +function IndentStringCache(options, baseIndentString) { + this.__cache = ['']; + this.__indent_size = options.indent_size; + this.__indent_string = options.indent_char; + if (!options.indent_with_tabs) { + this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char); + } + + // Set to null to continue support for auto detection of base indent + baseIndentString = baseIndentString || ''; + if (options.indent_level > 0) { + baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string); + } + + this.__base_string = baseIndentString; + this.__base_string_length = baseIndentString.length; +} + +IndentStringCache.prototype.get_indent_size = function(indent, column) { + var result = this.__base_string_length; + column = column || 0; + if (indent < 0) { + result = 0; + } + result += indent * this.__indent_size; + result += column; + return result; +}; + +IndentStringCache.prototype.get_indent_string = function(indent_level, column) { + var result = this.__base_string; + column = column || 0; + if (indent_level < 0) { + indent_level = 0; + result = ''; + } + column += indent_level * this.__indent_size; + this.__ensure_cache(column); + result += this.__cache[column]; + return result; +}; + +IndentStringCache.prototype.__ensure_cache = function(column) { + while (column >= this.__cache.length) { + this.__add_column(); + } +}; + +IndentStringCache.prototype.__add_column = function() { + var column = this.__cache.length; + var indent = 0; + var result = ''; + if (this.__indent_size && column >= this.__indent_size) { + indent = Math.floor(column / this.__indent_size); + column -= indent * this.__indent_size; + result = new Array(indent + 1).join(this.__indent_string); + } + if (column) { + result += new Array(column + 1).join(' '); + } + + this.__cache.push(result); +}; + +function Output(options, baseIndentString) { + this.__indent_cache = new IndentStringCache(options, baseIndentString); + this.raw = false; + this._end_with_newline = options.end_with_newline; + this.indent_size = options.indent_size; + this.wrap_line_length = options.wrap_line_length; + this.indent_empty_lines = options.indent_empty_lines; + this.__lines = []; + this.previous_line = null; + this.current_line = null; + this.next_line = new OutputLine(this); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = false; + // initialize + this.__add_outputline(); +} + +Output.prototype.__add_outputline = function() { + this.previous_line = this.current_line; + this.current_line = this.next_line.clone_empty(); + this.__lines.push(this.current_line); +}; + +Output.prototype.get_line_number = function() { + return this.__lines.length; +}; + +Output.prototype.get_indent_string = function(indent, column) { + return this.__indent_cache.get_indent_string(indent, column); +}; + +Output.prototype.get_indent_size = function(indent, column) { + return this.__indent_cache.get_indent_size(indent, column); +}; + +Output.prototype.is_empty = function() { + return !this.previous_line && this.current_line.is_empty(); +}; + +Output.prototype.add_new_line = function(force_newline) { + // never newline at the start of file + // otherwise, newline only if we didn't just add one or we're forced + if (this.is_empty() || + (!force_newline && this.just_added_newline())) { + return false; + } + + // if raw output is enabled, don't print additional newlines, + // but still return True as though you had + if (!this.raw) { + this.__add_outputline(); + } + return true; +}; + +Output.prototype.get_code = function(eol) { + this.trim(true); + + // handle some edge cases where the last tokens + // has text that ends with newline(s) + var last_item = this.current_line.pop(); + if (last_item) { + if (last_item[last_item.length - 1] === '\n') { + last_item = last_item.replace(/\n+$/g, ''); + } + this.current_line.push(last_item); + } + + if (this._end_with_newline) { + this.__add_outputline(); + } + + var sweet_code = this.__lines.join('\n'); + + if (eol !== '\n') { + sweet_code = sweet_code.replace(/[\n]/g, eol); + } + return sweet_code; +}; + +Output.prototype.set_wrap_point = function() { + this.current_line._set_wrap_point(); +}; + +Output.prototype.set_indent = function(indent, alignment) { + indent = indent || 0; + alignment = alignment || 0; + + // Next line stores alignment values + this.next_line.set_indent(indent, alignment); + + // Never indent your first output indent at the start of the file + if (this.__lines.length > 1) { + this.current_line.set_indent(indent, alignment); + return true; + } + + this.current_line.set_indent(); + return false; +}; + +Output.prototype.add_raw_token = function(token) { + for (var x = 0; x < token.newlines; x++) { + this.__add_outputline(); + } + this.current_line.set_indent(-1); + this.current_line.push(token.whitespace_before); + this.current_line.push(token.text); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = false; +}; + +Output.prototype.add_token = function(printable_token) { + this.__add_space_before_token(); + this.current_line.push(printable_token); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = this.current_line._allow_wrap(); +}; + +Output.prototype.__add_space_before_token = function() { + if (this.space_before_token && !this.just_added_newline()) { + if (!this.non_breaking_space) { + this.set_wrap_point(); + } + this.current_line.push(' '); + } +}; + +Output.prototype.remove_indent = function(index) { + var output_length = this.__lines.length; + while (index < output_length) { + this.__lines[index]._remove_indent(); + index++; + } + this.current_line._remove_wrap_indent(); +}; + +Output.prototype.trim = function(eat_newlines) { + eat_newlines = (eat_newlines === undefined) ? false : eat_newlines; + + this.current_line.trim(); + + while (eat_newlines && this.__lines.length > 1 && + this.current_line.is_empty()) { + this.__lines.pop(); + this.current_line = this.__lines[this.__lines.length - 1]; + this.current_line.trim(); + } + + this.previous_line = this.__lines.length > 1 ? + this.__lines[this.__lines.length - 2] : null; +}; + +Output.prototype.just_added_newline = function() { + return this.current_line.is_empty(); +}; + +Output.prototype.just_added_blankline = function() { + return this.is_empty() || + (this.current_line.is_empty() && this.previous_line.is_empty()); +}; + +Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) { + var index = this.__lines.length - 2; + while (index >= 0) { + var potentialEmptyLine = this.__lines[index]; + if (potentialEmptyLine.is_empty()) { + break; + } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 && + potentialEmptyLine.item(-1) !== ends_with) { + this.__lines.splice(index + 1, 0, new OutputLine(this)); + this.previous_line = this.__lines[this.__lines.length - 2]; + break; + } + index--; + } +}; + +module.exports.Output = Output; + + +/***/ }), +/* 3 */, +/* 4 */, +/* 5 */, +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function Options(options, merge_child_field) { + this.raw_options = _mergeOpts(options, merge_child_field); + + // Support passing the source text back with no change + this.disabled = this._get_boolean('disabled'); + + this.eol = this._get_characters('eol', 'auto'); + this.end_with_newline = this._get_boolean('end_with_newline'); + this.indent_size = this._get_number('indent_size', 4); + this.indent_char = this._get_characters('indent_char', ' '); + this.indent_level = this._get_number('indent_level'); + + this.preserve_newlines = this._get_boolean('preserve_newlines', true); + this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786); + if (!this.preserve_newlines) { + this.max_preserve_newlines = 0; + } + + this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t'); + if (this.indent_with_tabs) { + this.indent_char = '\t'; + + // indent_size behavior changed after 1.8.6 + // It used to be that indent_size would be + // set to 1 for indent_with_tabs. That is no longer needed and + // actually doesn't make sense - why not use spaces? Further, + // that might produce unexpected behavior - tabs being used + // for single-column alignment. So, when indent_with_tabs is true + // and indent_size is 1, reset indent_size to 4. + if (this.indent_size === 1) { + this.indent_size = 4; + } + } + + // Backwards compat with 1.3.x + this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char')); + + this.indent_empty_lines = this._get_boolean('indent_empty_lines'); + + // valid templating languages ['django', 'erb', 'handlebars', 'php'] + // For now, 'auto' = all off for javascript, all on for html (and inline javascript). + // other values ignored + this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']); +} + +Options.prototype._get_array = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = default_value || []; + if (typeof option_value === 'object') { + if (option_value !== null && typeof option_value.concat === 'function') { + result = option_value.concat(); + } + } else if (typeof option_value === 'string') { + result = option_value.split(/[^a-zA-Z0-9_\/\-]+/); + } + return result; +}; + +Options.prototype._get_boolean = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = option_value === undefined ? !!default_value : !!option_value; + return result; +}; + +Options.prototype._get_characters = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = default_value || ''; + if (typeof option_value === 'string') { + result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t'); + } + return result; +}; + +Options.prototype._get_number = function(name, default_value) { + var option_value = this.raw_options[name]; + default_value = parseInt(default_value, 10); + if (isNaN(default_value)) { + default_value = 0; + } + var result = parseInt(option_value, 10); + if (isNaN(result)) { + result = default_value; + } + return result; +}; + +Options.prototype._get_selection = function(name, selection_list, default_value) { + var result = this._get_selection_list(name, selection_list, default_value); + if (result.length !== 1) { + throw new Error( + "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" + + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"); + } + + return result[0]; +}; + + +Options.prototype._get_selection_list = function(name, selection_list, default_value) { + if (!selection_list || selection_list.length === 0) { + throw new Error("Selection list cannot be empty."); + } + + default_value = default_value || [selection_list[0]]; + if (!this._is_valid_selection(default_value, selection_list)) { + throw new Error("Invalid Default Value!"); + } + + var result = this._get_array(name, default_value); + if (!this._is_valid_selection(result, selection_list)) { + throw new Error( + "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" + + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"); + } + + return result; +}; + +Options.prototype._is_valid_selection = function(result, selection_list) { + return result.length && selection_list.length && + !result.some(function(item) { return selection_list.indexOf(item) === -1; }); +}; + + +// merges child options up with the parent options object +// Example: obj = {a: 1, b: {a: 2}} +// mergeOpts(obj, 'b') +// +// Returns: {a: 2} +function _mergeOpts(allOptions, childFieldName) { + var finalOpts = {}; + allOptions = _normalizeOpts(allOptions); + var name; + + for (name in allOptions) { + if (name !== childFieldName) { + finalOpts[name] = allOptions[name]; + } + } + + //merge in the per type settings for the childFieldName + if (childFieldName && allOptions[childFieldName]) { + for (name in allOptions[childFieldName]) { + finalOpts[name] = allOptions[childFieldName][name]; + } + } + return finalOpts; +} + +function _normalizeOpts(options) { + var convertedOpts = {}; + var key; + + for (key in options) { + var newKey = key.replace(/-/g, "_"); + convertedOpts[newKey] = options[key]; + } + return convertedOpts; +} + +module.exports.Options = Options; +module.exports.normalizeOpts = _normalizeOpts; +module.exports.mergeOpts = _mergeOpts; + + +/***/ }), +/* 7 */, +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky'); + +function InputScanner(input_string) { + this.__input = input_string || ''; + this.__input_length = this.__input.length; + this.__position = 0; +} + +InputScanner.prototype.restart = function() { + this.__position = 0; +}; + +InputScanner.prototype.back = function() { + if (this.__position > 0) { + this.__position -= 1; + } +}; + +InputScanner.prototype.hasNext = function() { + return this.__position < this.__input_length; +}; + +InputScanner.prototype.next = function() { + var val = null; + if (this.hasNext()) { + val = this.__input.charAt(this.__position); + this.__position += 1; + } + return val; +}; + +InputScanner.prototype.peek = function(index) { + var val = null; + index = index || 0; + index += this.__position; + if (index >= 0 && index < this.__input_length) { + val = this.__input.charAt(index); + } + return val; +}; + +// This is a JavaScript only helper function (not in python) +// Javascript doesn't have a match method +// and not all implementation support "sticky" flag. +// If they do not support sticky then both this.match() and this.test() method +// must get the match and check the index of the match. +// If sticky is supported and set, this method will use it. +// Otherwise it will check that global is set, and fall back to the slower method. +InputScanner.prototype.__match = function(pattern, index) { + pattern.lastIndex = index; + var pattern_match = pattern.exec(this.__input); + + if (pattern_match && !(regexp_has_sticky && pattern.sticky)) { + if (pattern_match.index !== index) { + pattern_match = null; + } + } + + return pattern_match; +}; + +InputScanner.prototype.test = function(pattern, index) { + index = index || 0; + index += this.__position; + + if (index >= 0 && index < this.__input_length) { + return !!this.__match(pattern, index); + } else { + return false; + } +}; + +InputScanner.prototype.testChar = function(pattern, index) { + // test one character regex match + var val = this.peek(index); + pattern.lastIndex = 0; + return val !== null && pattern.test(val); +}; + +InputScanner.prototype.match = function(pattern) { + var pattern_match = this.__match(pattern, this.__position); + if (pattern_match) { + this.__position += pattern_match[0].length; + } else { + pattern_match = null; + } + return pattern_match; +}; + +InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) { + var val = ''; + var match; + if (starting_pattern) { + match = this.match(starting_pattern); + if (match) { + val += match[0]; + } + } + if (until_pattern && (match || !starting_pattern)) { + val += this.readUntil(until_pattern, until_after); + } + return val; +}; + +InputScanner.prototype.readUntil = function(pattern, until_after) { + var val = ''; + var match_index = this.__position; + pattern.lastIndex = this.__position; + var pattern_match = pattern.exec(this.__input); + if (pattern_match) { + match_index = pattern_match.index; + if (until_after) { + match_index += pattern_match[0].length; + } + } else { + match_index = this.__input_length; + } + + val = this.__input.substring(this.__position, match_index); + this.__position = match_index; + return val; +}; + +InputScanner.prototype.readUntilAfter = function(pattern) { + return this.readUntil(pattern, true); +}; + +InputScanner.prototype.get_regexp = function(pattern, match_from) { + var result = null; + var flags = 'g'; + if (match_from && regexp_has_sticky) { + flags = 'y'; + } + // strings are converted to regexp + if (typeof pattern === "string" && pattern !== '') { + // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags); + result = new RegExp(pattern, flags); + } else if (pattern) { + result = new RegExp(pattern.source, flags); + } + return result; +}; + +InputScanner.prototype.get_literal_regexp = function(literal_string) { + return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')); +}; + +/* css beautifier legacy helpers */ +InputScanner.prototype.peekUntilAfter = function(pattern) { + var start = this.__position; + var val = this.readUntilAfter(pattern); + this.__position = start; + return val; +}; + +InputScanner.prototype.lookBack = function(testVal) { + var start = this.__position - 1; + return start >= testVal.length && this.__input.substring(start - testVal.length, start) + .toLowerCase() === testVal; +}; + +module.exports.InputScanner = InputScanner; + + +/***/ }), +/* 9 */, +/* 10 */, +/* 11 */, +/* 12 */, +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +function Directives(start_block_pattern, end_block_pattern) { + start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source; + end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source; + this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g'); + this.__directive_pattern = / (\w+)[:](\w+)/g; + + this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g'); +} + +Directives.prototype.get_directives = function(text) { + if (!text.match(this.__directives_block_pattern)) { + return null; + } + + var directives = {}; + this.__directive_pattern.lastIndex = 0; + var directive_match = this.__directive_pattern.exec(text); + + while (directive_match) { + directives[directive_match[1]] = directive_match[2]; + directive_match = this.__directive_pattern.exec(text); + } + + return directives; +}; + +Directives.prototype.readIgnored = function(input) { + return input.readUntilAfter(this.__directives_end_ignore_pattern); +}; + + +module.exports.Directives = Directives; + + +/***/ }), +/* 14 */, +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var Beautifier = __webpack_require__(16).Beautifier, + Options = __webpack_require__(17).Options; + +function css_beautify(source_text, options) { + var beautifier = new Beautifier(source_text, options); + return beautifier.beautify(); +} + +module.exports = css_beautify; +module.exports.defaultOptions = function() { + return new Options(); +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var Options = __webpack_require__(17).Options; +var Output = __webpack_require__(2).Output; +var InputScanner = __webpack_require__(8).InputScanner; +var Directives = __webpack_require__(13).Directives; + +var directives_core = new Directives(/\/\*/, /\*\//); + +var lineBreak = /\r\n|[\r\n]/; +var allLineBreaks = /\r\n|[\r\n]/g; + +// tokenizer +var whitespaceChar = /\s/; +var whitespacePattern = /(?:\s|\n)+/g; +var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g; +var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g; + +function Beautifier(source_text, options) { + this._source_text = source_text || ''; + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + this._options = new Options(options); + this._ch = null; + this._input = null; + + // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule + this.NESTED_AT_RULE = { + "@page": true, + "@font-face": true, + "@keyframes": true, + // also in CONDITIONAL_GROUP_RULE below + "@media": true, + "@supports": true, + "@document": true + }; + this.CONDITIONAL_GROUP_RULE = { + "@media": true, + "@supports": true, + "@document": true + }; + +} + +Beautifier.prototype.eatString = function(endChars) { + var result = ''; + this._ch = this._input.next(); + while (this._ch) { + result += this._ch; + if (this._ch === "\\") { + result += this._input.next(); + } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") { + break; + } + this._ch = this._input.next(); + } + return result; +}; + +// Skips any white space in the source text from the current position. +// When allowAtLeastOneNewLine is true, will output new lines for each +// newline character found; if the user has preserve_newlines off, only +// the first newline will be output +Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) { + var result = whitespaceChar.test(this._input.peek()); + var isFirstNewLine = true; + + while (whitespaceChar.test(this._input.peek())) { + this._ch = this._input.next(); + if (allowAtLeastOneNewLine && this._ch === '\n') { + if (this._options.preserve_newlines || isFirstNewLine) { + isFirstNewLine = false; + this._output.add_new_line(true); + } + } + } + return result; +}; + +// Nested pseudo-class if we are insideRule +// and the next special character found opens +// a new block +Beautifier.prototype.foundNestedPseudoClass = function() { + var openParen = 0; + var i = 1; + var ch = this._input.peek(i); + while (ch) { + if (ch === "{") { + return true; + } else if (ch === '(') { + // pseudoclasses can contain () + openParen += 1; + } else if (ch === ')') { + if (openParen === 0) { + return false; + } + openParen -= 1; + } else if (ch === ";" || ch === "}") { + return false; + } + i++; + ch = this._input.peek(i); + } + return false; +}; + +Beautifier.prototype.print_string = function(output_string) { + this._output.set_indent(this._indentLevel); + this._output.non_breaking_space = true; + this._output.add_token(output_string); +}; + +Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) { + if (isAfterSpace) { + this._output.space_before_token = true; + } +}; + +Beautifier.prototype.indent = function() { + this._indentLevel++; +}; + +Beautifier.prototype.outdent = function() { + if (this._indentLevel > 0) { + this._indentLevel--; + } +}; + +/*_____________________--------------------_____________________*/ + +Beautifier.prototype.beautify = function() { + if (this._options.disabled) { + return this._source_text; + } + + var source_text = this._source_text; + var eol = this._options.eol; + if (eol === 'auto') { + eol = '\n'; + if (source_text && lineBreak.test(source_text || '')) { + eol = source_text.match(lineBreak)[0]; + } + } + + + // HACK: newline parsing inconsistent. This brute force normalizes the this._input. + source_text = source_text.replace(allLineBreaks, '\n'); + + // reset + var baseIndentString = source_text.match(/^[\t ]*/)[0]; + + this._output = new Output(this._options, baseIndentString); + this._input = new InputScanner(source_text); + this._indentLevel = 0; + this._nestedLevel = 0; + + this._ch = null; + var parenLevel = 0; + + var insideRule = false; + // This is the value side of a property value pair (blue in the following ex) + // label { content: blue } + var insidePropertyValue = false; + var enteringConditionalGroup = false; + var insideAtExtend = false; + var insideAtImport = false; + var topCharacter = this._ch; + var whitespace; + var isAfterSpace; + var previous_ch; + + while (true) { + whitespace = this._input.read(whitespacePattern); + isAfterSpace = whitespace !== ''; + previous_ch = topCharacter; + this._ch = this._input.next(); + if (this._ch === '\\' && this._input.hasNext()) { + this._ch += this._input.next(); + } + topCharacter = this._ch; + + if (!this._ch) { + break; + } else if (this._ch === '/' && this._input.peek() === '*') { + // /* css comment */ + // Always start block comments on a new line. + // This handles scenarios where a block comment immediately + // follows a property definition on the same line or where + // minified code is being beautified. + this._output.add_new_line(); + this._input.back(); + + var comment = this._input.read(block_comment_pattern); + + // Handle ignore directive + var directives = directives_core.get_directives(comment); + if (directives && directives.ignore === 'start') { + comment += directives_core.readIgnored(this._input); + } + + this.print_string(comment); + + // Ensures any new lines following the comment are preserved + this.eatWhitespace(true); + + // Block comments are followed by a new line so they don't + // share a line with other properties + this._output.add_new_line(); + } else if (this._ch === '/' && this._input.peek() === '/') { + // // single line comment + // Preserves the space before a comment + // on the same line as a rule + this._output.space_before_token = true; + this._input.back(); + this.print_string(this._input.read(comment_pattern)); + + // Ensures any new lines following the comment are preserved + this.eatWhitespace(true); + } else if (this._ch === '@') { + this.preserveSingleSpace(isAfterSpace); + + // deal with less propery mixins @{...} + if (this._input.peek() === '{') { + this.print_string(this._ch + this.eatString('}')); + } else { + this.print_string(this._ch); + + // strip trailing space, if present, for hash property checks + var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g); + + if (variableOrRule.match(/[ :]$/)) { + // we have a variable or pseudo-class, add it and insert one space before continuing + variableOrRule = this.eatString(": ").replace(/\s$/, ''); + this.print_string(variableOrRule); + this._output.space_before_token = true; + } + + variableOrRule = variableOrRule.replace(/\s$/, ''); + + if (variableOrRule === 'extend') { + insideAtExtend = true; + } else if (variableOrRule === 'import') { + insideAtImport = true; + } + + // might be a nesting at-rule + if (variableOrRule in this.NESTED_AT_RULE) { + this._nestedLevel += 1; + if (variableOrRule in this.CONDITIONAL_GROUP_RULE) { + enteringConditionalGroup = true; + } + // might be less variable + } else if (!insideRule && parenLevel === 0 && variableOrRule.indexOf(':') !== -1) { + insidePropertyValue = true; + this.indent(); + } + } + } else if (this._ch === '#' && this._input.peek() === '{') { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch + this.eatString('}')); + } else if (this._ch === '{') { + if (insidePropertyValue) { + insidePropertyValue = false; + this.outdent(); + } + this.indent(); + this._output.space_before_token = true; + this.print_string(this._ch); + + // when entering conditional groups, only rulesets are allowed + if (enteringConditionalGroup) { + enteringConditionalGroup = false; + insideRule = (this._indentLevel > this._nestedLevel); + } else { + // otherwise, declarations are also allowed + insideRule = (this._indentLevel >= this._nestedLevel); + } + if (this._options.newline_between_rules && insideRule) { + if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') { + this._output.ensure_empty_line_above('/', ','); + } + } + this.eatWhitespace(true); + this._output.add_new_line(); + } else if (this._ch === '}') { + this.outdent(); + this._output.add_new_line(); + if (previous_ch === '{') { + this._output.trim(true); + } + insideAtImport = false; + insideAtExtend = false; + if (insidePropertyValue) { + this.outdent(); + insidePropertyValue = false; + } + this.print_string(this._ch); + insideRule = false; + if (this._nestedLevel) { + this._nestedLevel--; + } + + this.eatWhitespace(true); + this._output.add_new_line(); + + if (this._options.newline_between_rules && !this._output.just_added_blankline()) { + if (this._input.peek() !== '}') { + this._output.add_new_line(true); + } + } + } else if (this._ch === ":") { + if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) { + // 'property: value' delimiter + // which could be in a conditional group query + this.print_string(':'); + if (!insidePropertyValue) { + insidePropertyValue = true; + this._output.space_before_token = true; + this.eatWhitespace(true); + this.indent(); + } + } else { + // sass/less parent reference don't use a space + // sass nested pseudo-class don't use a space + + // preserve space before pseudoclasses/pseudoelements, as it means "in any child" + if (this._input.lookBack(" ")) { + this._output.space_before_token = true; + } + if (this._input.peek() === ":") { + // pseudo-element + this._ch = this._input.next(); + this.print_string("::"); + } else { + // pseudo-class + this.print_string(':'); + } + } + } else if (this._ch === '"' || this._ch === '\'') { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch + this.eatString(this._ch)); + this.eatWhitespace(true); + } else if (this._ch === ';') { + if (parenLevel === 0) { + if (insidePropertyValue) { + this.outdent(); + insidePropertyValue = false; + } + insideAtExtend = false; + insideAtImport = false; + this.print_string(this._ch); + this.eatWhitespace(true); + + // This maintains single line comments on the same + // line. Block comments are also affected, but + // a new line is always output before one inside + // that section + if (this._input.peek() !== '/') { + this._output.add_new_line(); + } + } else { + this.print_string(this._ch); + this.eatWhitespace(true); + this._output.space_before_token = true; + } + } else if (this._ch === '(') { // may be a url + if (this._input.lookBack("url")) { + this.print_string(this._ch); + this.eatWhitespace(); + parenLevel++; + this.indent(); + this._ch = this._input.next(); + if (this._ch === ')' || this._ch === '"' || this._ch === '\'') { + this._input.back(); + } else if (this._ch) { + this.print_string(this._ch + this.eatString(')')); + if (parenLevel) { + parenLevel--; + this.outdent(); + } + } + } else { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch); + this.eatWhitespace(); + parenLevel++; + this.indent(); + } + } else if (this._ch === ')') { + if (parenLevel) { + parenLevel--; + this.outdent(); + } + this.print_string(this._ch); + } else if (this._ch === ',') { + this.print_string(this._ch); + this.eatWhitespace(true); + if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) { + this._output.add_new_line(); + } else { + this._output.space_before_token = true; + } + } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) { + //handle combinator spacing + if (this._options.space_around_combinator) { + this._output.space_before_token = true; + this.print_string(this._ch); + this._output.space_before_token = true; + } else { + this.print_string(this._ch); + this.eatWhitespace(); + // squash extra whitespace + if (this._ch && whitespaceChar.test(this._ch)) { + this._ch = ''; + } + } + } else if (this._ch === ']') { + this.print_string(this._ch); + } else if (this._ch === '[') { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch); + } else if (this._ch === '=') { // no whitespace before or after + this.eatWhitespace(); + this.print_string('='); + if (whitespaceChar.test(this._ch)) { + this._ch = ''; + } + } else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important + this.print_string(' '); + this.print_string(this._ch); + } else { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch); + } + } + + var sweetCode = this._output.get_code(eol); + + return sweetCode; +}; + +module.exports.Beautifier = Beautifier; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + + + +var BaseOptions = __webpack_require__(6).Options; + +function Options(options) { + BaseOptions.call(this, options, 'css'); + + this.selector_separator_newline = this._get_boolean('selector_separator_newline', true); + this.newline_between_rules = this._get_boolean('newline_between_rules', true); + var space_around_selector_separator = this._get_boolean('space_around_selector_separator'); + this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator; + +} +Options.prototype = new BaseOptions(); + + + +module.exports.Options = Options; + + +/***/ }) +/******/ ]); +var css_beautify = legacy_beautify_css; +/* Footer */ +if (true) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return { + css_beautify: css_beautify + }; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else if (typeof exports !== "undefined") { + // Add support for CommonJS. Just put this file somewhere on your require.paths + // and you will be able to `var html_beautify = require("beautify").html_beautify`. + exports.css_beautify = css_beautify; +} else if (typeof window !== "undefined") { + // If we're running a web page and don't have either of the above, add our one global + window.css_beautify = css_beautify; +} else if (typeof global !== "undefined") { + // If we don't even have window, try global. + global.css_beautify = css_beautify; +} + +}()); + + +/***/ }), +/* 534 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__ = __webpack_require__(464); + + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = Object(__WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__["a" /* default */])(function(augend, addend) { + return augend + addend; +}, 0); + +/* harmony default export */ __webpack_exports__["a"] = (add); + + +/***/ }), +/* 535 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toInteger_js__ = __webpack_require__(362); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = Object(__WEBPACK_IMPORTED_MODULE_0__toInteger_js__["a" /* default */])(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (after); + + +/***/ }), +/* 536 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__composeArgs_js__ = __webpack_require__(830); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__composeArgsRight_js__ = __webpack_require__(831); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__countHolders_js__ = __webpack_require__(948); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createCtor_js__ = __webpack_require__(466); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createRecurry_js__ = __webpack_require__(832); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__getHolder_js__ = __webpack_require__(428); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__reorder_js__ = __webpack_require__(954); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__replaceHolders_js__ = __webpack_require__(421); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__root_js__ = __webpack_require__(152); + + + + + + + + + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : Object(__WEBPACK_IMPORTED_MODULE_3__createCtor_js__["a" /* default */])(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = Object(__WEBPACK_IMPORTED_MODULE_5__getHolder_js__["a" /* default */])(wrapper), + holdersCount = Object(__WEBPACK_IMPORTED_MODULE_2__countHolders_js__["a" /* default */])(args, placeholder); + } + if (partials) { + args = Object(__WEBPACK_IMPORTED_MODULE_0__composeArgs_js__["a" /* default */])(args, partials, holders, isCurried); + } + if (partialsRight) { + args = Object(__WEBPACK_IMPORTED_MODULE_1__composeArgsRight_js__["a" /* default */])(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = Object(__WEBPACK_IMPORTED_MODULE_7__replaceHolders_js__["a" /* default */])(args, placeholder); + return Object(__WEBPACK_IMPORTED_MODULE_4__createRecurry_js__["a" /* default */])( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = Object(__WEBPACK_IMPORTED_MODULE_6__reorder_js__["a" /* default */])(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== __WEBPACK_IMPORTED_MODULE_8__root_js__["a" /* default */] && this instanceof wrapper) { + fn = Ctor || Object(__WEBPACK_IMPORTED_MODULE_3__createCtor_js__["a" /* default */])(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +/* harmony default export */ __webpack_exports__["a"] = (createHybrid); + + +/***/ }), +/* 537 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__metaMap_js__ = __webpack_require__(825); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__noop_js__ = __webpack_require__(443); + + + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !__WEBPACK_IMPORTED_MODULE_0__metaMap_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_1__noop_js__["a" /* default */] : function(func) { + return __WEBPACK_IMPORTED_MODULE_0__metaMap_js__["a" /* default */].get(func); +}; + +/* harmony default export */ __webpack_exports__["a"] = (getData); + + +/***/ }), +/* 538 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(951); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(838); + + + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = Object(__WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (setToString); + + +/***/ }), +/* 539 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(445); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyObject_js__ = __webpack_require__(392); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createAssigner_js__ = __webpack_require__(429); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isPrototype_js__ = __webpack_require__(446); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys_js__ = __webpack_require__(369); + + + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = Object(__WEBPACK_IMPORTED_MODULE_2__createAssigner_js__["a" /* default */])(function(object, source) { + if (Object(__WEBPACK_IMPORTED_MODULE_4__isPrototype_js__["a" /* default */])(source) || Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLike_js__["a" /* default */])(source)) { + Object(__WEBPACK_IMPORTED_MODULE_1__copyObject_js__["a" /* default */])(source, Object(__WEBPACK_IMPORTED_MODULE_5__keys_js__["a" /* default */])(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(object, key, source[key]); + } + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (assign); + + +/***/ }), +/* 540 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseTimes); + + +/***/ }), +/* 541 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(446); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(959); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */])(object)) { + return Object(__WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */])(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeys); + + +/***/ }), +/* 542 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(392); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(429); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(369); + + + + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex, customizer) { + Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(source, Object(__WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */])(source), object, customizer); +}); + +/* harmony default export */ __webpack_exports__["a"] = (assignWith); + + +/***/ }), +/* 543 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAt_js__ = __webpack_require__(544); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flatRest_js__ = __webpack_require__(401); + + + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = Object(__WEBPACK_IMPORTED_MODULE_1__flatRest_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseAt_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (at); + + +/***/ }), +/* 544 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__get_js__ = __webpack_require__(449); + + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__get_js__["a" /* default */])(object, paths[index]); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAt); + + +/***/ }), +/* 545 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(379); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKey); + + +/***/ }), +/* 546 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(963); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(975); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(977); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(978); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(979); + + + + + + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__["a" /* default */]; +MapCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__["a" /* default */]; +MapCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__["a" /* default */]; +MapCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__["a" /* default */]; +MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (MapCache); + + +/***/ }), +/* 547 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(417); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(152); + + + +/* Built-in method references that are verified to be native. */ +var Map = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); + +/* harmony default export */ __webpack_exports__["a"] = (Map); + + +/***/ }), +/* 548 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayEach_js__ = __webpack_require__(420); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bind_js__ = __webpack_require__(479); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__flatRest_js__ = __webpack_require__(401); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__toKey_js__ = __webpack_require__(393); + + + + + + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = Object(__WEBPACK_IMPORTED_MODULE_3__flatRest_js__["a" /* default */])(function(object, methodNames) { + Object(__WEBPACK_IMPORTED_MODULE_0__arrayEach_js__["a" /* default */])(methodNames, function(key) { + key = Object(__WEBPACK_IMPORTED_MODULE_4__toKey_js__["a" /* default */])(key); + Object(__WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */])(object, key, Object(__WEBPACK_IMPORTED_MODULE_2__bind_js__["a" /* default */])(object[key], object)); + }); + return object; +}); + +/* harmony default export */ __webpack_exports__["a"] = (bindAll); + + +/***/ }), +/* 549 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createWrap_js__ = __webpack_require__(396); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getHolder_js__ = __webpack_require__(428); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__ = __webpack_require__(421); + + + + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = Object(__WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__["a" /* default */])(partials, Object(__WEBPACK_IMPORTED_MODULE_2__getHolder_js__["a" /* default */])(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return Object(__WEBPACK_IMPORTED_MODULE_1__createWrap_js__["a" /* default */])(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +/* harmony default export */ __webpack_exports__["a"] = (bindKey); + + +/***/ }), +/* 550 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__capitalize_js__ = __webpack_require__(480); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createCompounder_js__ = __webpack_require__(434); + + + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = Object(__WEBPACK_IMPORTED_MODULE_1__createCompounder_js__["a" /* default */])(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? Object(__WEBPACK_IMPORTED_MODULE_0__capitalize_js__["a" /* default */])(word) : word); +}); + +/* harmony default export */ __webpack_exports__["a"] = (camelCase); + + +/***/ }), +/* 551 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayReduce); + + +/***/ }), +/* 552 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (basePropertyOf); + + +/***/ }), +/* 553 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(360); + + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value) ? value : [value]; +} + +/* harmony default export */ __webpack_exports__["a"] = (castArray); + + +/***/ }), +/* 554 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRound_js__ = __webpack_require__(555); + + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = Object(__WEBPACK_IMPORTED_MODULE_0__createRound_js__["a" /* default */])('ceil'); + +/* harmony default export */ __webpack_exports__["a"] = (ceil); + + +/***/ }), +/* 555 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toNumber_js__ = __webpack_require__(391); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].isFinite, + nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = Object(__WEBPACK_IMPORTED_MODULE_2__toNumber_js__["a" /* default */])(number); + precision = precision == null ? 0 : nativeMin(Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createRound); + + +/***/ }), +/* 556 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, index, (index += size)); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (chunk); + + +/***/ }), +/* 557 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClamp_js__ = __webpack_require__(422); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toNumber_js__ = __webpack_require__(391); + + + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = Object(__WEBPACK_IMPORTED_MODULE_1__toNumber_js__["a" /* default */])(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = Object(__WEBPACK_IMPORTED_MODULE_1__toNumber_js__["a" /* default */])(lower); + lower = lower === lower ? lower : 0; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseClamp_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__toNumber_js__["a" /* default */])(number), lower, upper); +} + +/* harmony default export */ __webpack_exports__["a"] = (clamp); + + +/***/ }), +/* 558 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(value, CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ __webpack_exports__["a"] = (clone); + + +/***/ }), +/* 559 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(411); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(452); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + + +/***/ }), +/* 560 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(850); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbolsIn_js__ = __webpack_require__(848); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keysIn_js__ = __webpack_require__(375); + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */])(object, __WEBPACK_IMPORTED_MODULE_2__keysIn_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbolsIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (getAllKeysIn); + + +/***/ }), +/* 561 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(852); + + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); + + +/***/ }), +/* 562 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneDeep); + + +/***/ }), +/* 563 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneDeepWith); + + +/***/ }), +/* 564 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(value, CLONE_SYMBOLS_FLAG, customizer); +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneWith); + + +/***/ }), +/* 565 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (compact); + + +/***/ }), +/* 566 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(408); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__copyArray_js__ = __webpack_require__(383); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); + + + + + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(array) ? Object(__WEBPACK_IMPORTED_MODULE_2__copyArray_js__["a" /* default */])(array) : [array], Object(__WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__["a" /* default */])(args, 1)); +} + +/* harmony default export */ __webpack_exports__["a"] = (concat); + + +/***/ }), +/* 567 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseRest_js__ = __webpack_require__(361); + + + + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */]; + + pairs = !length ? [] : Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return Object(__WEBPACK_IMPORTED_MODULE_3__baseRest_js__["a" /* default */])(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(pair[0], this, args)) { + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(pair[1], this, args); + } + } + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (cond); + + +/***/ }), +/* 568 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(484); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(488); + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); + + +/***/ }), +/* 569 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (arraySome); + + +/***/ }), +/* 570 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapToArray); + + +/***/ }), +/* 571 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(857); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, Object(__WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */])(value)]; + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMatchData); + + +/***/ }), +/* 572 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseProperty); + + +/***/ }), +/* 573 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseConforms_js__ = __webpack_require__(1011); + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseConforms_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(source, CLONE_DEEP_FLAG)); +} + +/* harmony default export */ __webpack_exports__["a"] = (conforms); + + +/***/ }), +/* 574 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseConformsTo_js__ = __webpack_require__(861); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || Object(__WEBPACK_IMPORTED_MODULE_0__baseConformsTo_js__["a" /* default */])(object, source, Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(source)); +} + +/* harmony default export */ __webpack_exports__["a"] = (conformsTo); + + +/***/ }), +/* 575 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAggregator_js__ = __webpack_require__(493); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = Object(__WEBPACK_IMPORTED_MODULE_1__createAggregator_js__["a" /* default */])(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, 1); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (countBy); + + +/***/ }), +/* 576 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(862); + + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = Object(__WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */])(); + +/* harmony default export */ __webpack_exports__["a"] = (baseFor); + + +/***/ }), +/* 577 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssign_js__ = __webpack_require__(846); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseCreate_js__ = __webpack_require__(426); + + + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = Object(__WEBPACK_IMPORTED_MODULE_1__baseCreate_js__["a" /* default */])(prototype); + return properties == null ? result : Object(__WEBPACK_IMPORTED_MODULE_0__baseAssign_js__["a" /* default */])(result, properties); +} + +/* harmony default export */ __webpack_exports__["a"] = (create); + + +/***/ }), +/* 578 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createWrap_js__ = __webpack_require__(396); + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = Object(__WEBPACK_IMPORTED_MODULE_0__createWrap_js__["a" /* default */])(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +/* harmony default export */ __webpack_exports__["a"] = (curry); + + +/***/ }), +/* 579 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createWrap_js__ = __webpack_require__(396); + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = Object(__WEBPACK_IMPORTED_MODULE_0__createWrap_js__["a" /* default */])(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +/* harmony default export */ __webpack_exports__["a"] = (curryRight); + + +/***/ }), +/* 580 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +/* harmony default export */ __webpack_exports__["a"] = (defaultTo); + + +/***/ }), +/* 581 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(380); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__keysIn_js__ = __webpack_require__(375); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && Object(__WEBPACK_IMPORTED_MODULE_2__isIterateeCall_js__["a" /* default */])(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = Object(__WEBPACK_IMPORTED_MODULE_3__keysIn_js__["a" /* default */])(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ __webpack_exports__["a"] = (defaults); + + +/***/ }), +/* 582 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__customDefaultsMerge_js__ = __webpack_require__(1014); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mergeWith_js__ = __webpack_require__(497); + + + + + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(args) { + args.push(undefined, __WEBPACK_IMPORTED_MODULE_2__customDefaultsMerge_js__["a" /* default */]); + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__mergeWith_js__["a" /* default */], undefined, args); +}); + +/* harmony default export */ __webpack_exports__["a"] = (defaultsDeep); + + +/***/ }), +/* 583 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(484); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(864); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(1015); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(367); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(375); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__safeGet_js__ = __webpack_require__(865); + + + + + + + + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + Object(__WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */])(source, function(srcValue, key) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + if (Object(__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */])(srcValue)) { + Object(__WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */])(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(Object(__WEBPACK_IMPORTED_MODULE_6__safeGet_js__["a" /* default */])(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + Object(__WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */])(object, key, newValue); + } + }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMerge); + + +/***/ }), +/* 584 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseDelay_js__ = __webpack_require__(866); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); + + + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(func, args) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseDelay_js__["a" /* default */])(func, 1, args); +}); + +/* harmony default export */ __webpack_exports__["a"] = (defer); + + +/***/ }), +/* 585 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseDelay_js__ = __webpack_require__(866); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toNumber_js__ = __webpack_require__(391); + + + + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(func, wait, args) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseDelay_js__["a" /* default */])(func, Object(__WEBPACK_IMPORTED_MODULE_2__toNumber_js__["a" /* default */])(wait) || 0, args); +}); + +/* harmony default export */ __webpack_exports__["a"] = (delay); + + +/***/ }), +/* 586 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseDifference_js__ = __webpack_require__(454); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__ = __webpack_require__(374); + + + + + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = Object(__WEBPACK_IMPORTED_MODULE_2__baseRest_js__["a" /* default */])(function(array, values) { + return Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__["a" /* default */])(array) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseDifference_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__["a" /* default */])(values, 1, __WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__["a" /* default */], true)) + : []; +}); + +/* harmony default export */ __webpack_exports__["a"] = (difference); + + +/***/ }), +/* 587 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayIncludesWith); + + +/***/ }), +/* 588 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseDifference_js__ = __webpack_require__(454); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isArrayLikeObject_js__ = __webpack_require__(374); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__last_js__ = __webpack_require__(377); + + + + + + + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = Object(__WEBPACK_IMPORTED_MODULE_3__baseRest_js__["a" /* default */])(function(array, values) { + var iteratee = Object(__WEBPACK_IMPORTED_MODULE_5__last_js__["a" /* default */])(values); + if (Object(__WEBPACK_IMPORTED_MODULE_4__isArrayLikeObject_js__["a" /* default */])(iteratee)) { + iteratee = undefined; + } + return Object(__WEBPACK_IMPORTED_MODULE_4__isArrayLikeObject_js__["a" /* default */])(array) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseDifference_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__["a" /* default */])(values, 1, __WEBPACK_IMPORTED_MODULE_4__isArrayLikeObject_js__["a" /* default */], true), Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 2)) + : []; +}); + +/* harmony default export */ __webpack_exports__["a"] = (differenceBy); + + +/***/ }), +/* 589 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseDifference_js__ = __webpack_require__(454); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__ = __webpack_require__(374); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__last_js__ = __webpack_require__(377); + + + + + + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = Object(__WEBPACK_IMPORTED_MODULE_2__baseRest_js__["a" /* default */])(function(array, values) { + var comparator = Object(__WEBPACK_IMPORTED_MODULE_4__last_js__["a" /* default */])(values); + if (Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__["a" /* default */])(comparator)) { + comparator = undefined; + } + return Object(__WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__["a" /* default */])(array) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseDifference_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__baseFlatten_js__["a" /* default */])(values, 1, __WEBPACK_IMPORTED_MODULE_3__isArrayLikeObject_js__["a" /* default */], true), undefined, comparator) + : []; +}); + +/* harmony default export */ __webpack_exports__["a"] = (differenceWith); + + +/***/ }), +/* 590 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__ = __webpack_require__(464); + + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = Object(__WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__["a" /* default */])(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +/* harmony default export */ __webpack_exports__["a"] = (divide); + + +/***/ }), +/* 591 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(n); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, n < 0 ? 0 : n, length); +} + +/* harmony default export */ __webpack_exports__["a"] = (drop); + + +/***/ }), +/* 592 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(n); + n = length - n; + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, 0, n < 0 ? 0 : n); +} + +/* harmony default export */ __webpack_exports__["a"] = (dropRight); + + +/***/ }), +/* 593 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseWhile_js__ = __webpack_require__(498); + + + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseWhile_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(predicate, 3), true, true) + : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (dropRightWhile); + + +/***/ }), +/* 594 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseWhile_js__ = __webpack_require__(498); + + + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseWhile_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(predicate, 3), true) + : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (dropWhile); + + +/***/ }), +/* 595 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__forEach_js__ = __webpack_require__(499); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__forEach_js__["a"]; }); + + + +/***/ }), +/* 596 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__forEachRight_js__ = __webpack_require__(500); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__forEachRight_js__["a"]; }); + + + +/***/ }), +/* 597 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseForRight_js__ = __webpack_require__(868); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseForRight_js__["a" /* default */])(object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseForOwnRight); + + +/***/ }), +/* 598 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClamp_js__ = __webpack_require__(422); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseToString_js__ = __webpack_require__(390); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(string); + target = Object(__WEBPACK_IMPORTED_MODULE_1__baseToString_js__["a" /* default */])(target); + + var length = string.length; + position = position === undefined + ? length + : Object(__WEBPACK_IMPORTED_MODULE_0__baseClamp_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +/* harmony default export */ __webpack_exports__["a"] = (endsWith); + + +/***/ }), +/* 599 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toPairs_js__ = __webpack_require__(501); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__toPairs_js__["a"]; }); + + + +/***/ }), +/* 600 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toPairsIn_js__ = __webpack_require__(502); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__toPairsIn_js__["a"]; }); + + + +/***/ }), +/* 601 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toString_js__ = __webpack_require__(363); + + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = Object(__WEBPACK_IMPORTED_MODULE_0__toString_js__["a" /* default */])(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +/* harmony default export */ __webpack_exports__["a"] = (escapeRegExp); + + +/***/ }), +/* 602 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayEvery_js__ = __webpack_require__(870); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseEvery_js__ = __webpack_require__(1020); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIterateeCall_js__ = __webpack_require__(376); + + + + + + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayEvery_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseEvery_js__["a" /* default */]; + if (guard && Object(__WEBPACK_IMPORTED_MODULE_4__isIterateeCall_js__["a" /* default */])(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(predicate, 3)); +} + +/* harmony default export */ __webpack_exports__["a"] = (every); + + +/***/ }), +/* 603 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignIn_js__ = __webpack_require__(470); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__assignIn_js__["a"]; }); + + + +/***/ }), +/* 604 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignInWith_js__ = __webpack_require__(448); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__assignInWith_js__["a"]; }); + + + +/***/ }), +/* 605 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFill_js__ = __webpack_require__(1021); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(376); + + + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(array, value, start)) { + start = 0; + end = length; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFill_js__["a" /* default */])(array, value, start, end); +} + +/* harmony default export */ __webpack_exports__["a"] = (fill); + + +/***/ }), +/* 606 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(411); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseFilter_js__ = __webpack_require__(871); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseFilter_js__["a" /* default */]; + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(predicate, 3)); +} + +/* harmony default export */ __webpack_exports__["a"] = (filter); + + +/***/ }), +/* 607 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFind_js__ = __webpack_require__(872); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__findIndex_js__ = __webpack_require__(505); + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = Object(__WEBPACK_IMPORTED_MODULE_0__createFind_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__findIndex_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (find); + + +/***/ }), +/* 608 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFindKey_js__ = __webpack_require__(873); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(413); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); + + + + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFindKey_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(predicate, 3), __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (findKey); + + +/***/ }), +/* 609 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFind_js__ = __webpack_require__(872); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__findLastIndex_js__ = __webpack_require__(506); + + + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = Object(__WEBPACK_IMPORTED_MODULE_0__createFind_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__findLastIndex_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (findLast); + + +/***/ }), +/* 610 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFindKey_js__ = __webpack_require__(873); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwnRight_js__ = __webpack_require__(597); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); + + + + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFindKey_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(predicate, 3), __WEBPACK_IMPORTED_MODULE_1__baseForOwnRight_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (findLastKey); + + +/***/ }), +/* 611 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__head_js__ = __webpack_require__(507); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__head_js__["a"]; }); + + + +/***/ }), +/* 612 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__map_js__ = __webpack_require__(435); + + + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__map_js__["a" /* default */])(collection, iteratee), 1); +} + +/* harmony default export */ __webpack_exports__["a"] = (flatMap); + + +/***/ }), +/* 613 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__map_js__ = __webpack_require__(435); + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__map_js__["a" /* default */])(collection, iteratee), INFINITY); +} + +/* harmony default export */ __webpack_exports__["a"] = (flatMapDeep); + + +/***/ }), +/* 614 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__map_js__ = __webpack_require__(435); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); + + + + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(depth); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__map_js__["a" /* default */])(collection, iteratee), depth); +} + +/* harmony default export */ __webpack_exports__["a"] = (flatMapDepth); + + +/***/ }), +/* 615 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(array, INFINITY) : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (flattenDeep); + + +/***/ }), +/* 616 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(depth); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(array, depth); +} + +/* harmony default export */ __webpack_exports__["a"] = (flattenDepth); + + +/***/ }), +/* 617 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createWrap_js__ = __webpack_require__(396); + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return Object(__WEBPACK_IMPORTED_MODULE_0__createWrap_js__["a" /* default */])(func, WRAP_FLIP_FLAG); +} + +/* harmony default export */ __webpack_exports__["a"] = (flip); + + +/***/ }), +/* 618 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRound_js__ = __webpack_require__(555); + + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = Object(__WEBPACK_IMPORTED_MODULE_0__createRound_js__["a" /* default */])('floor'); + +/* harmony default export */ __webpack_exports__["a"] = (floor); + + +/***/ }), +/* 619 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFlow_js__ = __webpack_require__(875); + + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = Object(__WEBPACK_IMPORTED_MODULE_0__createFlow_js__["a" /* default */])(); + +/* harmony default export */ __webpack_exports__["a"] = (flow); + + +/***/ }), +/* 620 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFlow_js__ = __webpack_require__(875); + + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = Object(__WEBPACK_IMPORTED_MODULE_0__createFlow_js__["a" /* default */])(true); + +/* harmony default export */ __webpack_exports__["a"] = (flowRight); + + +/***/ }), +/* 621 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castFunction_js__ = __webpack_require__(394); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keysIn_js__ = __webpack_require__(375); + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : Object(__WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__castFunction_js__["a" /* default */])(iteratee), __WEBPACK_IMPORTED_MODULE_2__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (forIn); + + +/***/ }), +/* 622 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseForRight_js__ = __webpack_require__(868); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castFunction_js__ = __webpack_require__(394); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keysIn_js__ = __webpack_require__(375); + + + + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : Object(__WEBPACK_IMPORTED_MODULE_0__baseForRight_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__castFunction_js__["a" /* default */])(iteratee), __WEBPACK_IMPORTED_MODULE_2__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (forInRight); + + +/***/ }), +/* 623 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseForOwn_js__ = __webpack_require__(413); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castFunction_js__ = __webpack_require__(394); + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseForOwn_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__castFunction_js__["a" /* default */])(iteratee)); +} + +/* harmony default export */ __webpack_exports__["a"] = (forOwn); + + +/***/ }), +/* 624 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseForOwnRight_js__ = __webpack_require__(597); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castFunction_js__ = __webpack_require__(394); + + + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseForOwnRight_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__castFunction_js__["a" /* default */])(iteratee)); +} + +/* harmony default export */ __webpack_exports__["a"] = (forOwnRight); + + +/***/ }), +/* 625 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (fromPairs); + + +/***/ }), +/* 626 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFunctions_js__ = __webpack_require__(508); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(369); + + + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : Object(__WEBPACK_IMPORTED_MODULE_0__baseFunctions_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (functions); + + +/***/ }), +/* 627 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFunctions_js__ = __webpack_require__(508); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(375); + + + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : Object(__WEBPACK_IMPORTED_MODULE_0__baseFunctions_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */])(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (functionsIn); + + +/***/ }), +/* 628 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAggregator_js__ = __webpack_require__(493); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = Object(__WEBPACK_IMPORTED_MODULE_1__createAggregator_js__["a" /* default */])(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, [value]); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (groupBy); + + +/***/ }), +/* 629 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGt_js__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRelationalOperation_js__ = __webpack_require__(509); + + + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = Object(__WEBPACK_IMPORTED_MODULE_1__createRelationalOperation_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseGt_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (gt); + + +/***/ }), +/* 630 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGt); + + +/***/ }), +/* 631 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRelationalOperation_js__ = __webpack_require__(509); + + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = Object(__WEBPACK_IMPORTED_MODULE_0__createRelationalOperation_js__["a" /* default */])(function(value, other) { + return value >= other; +}); + +/* harmony default export */ __webpack_exports__["a"] = (gte); + + +/***/ }), +/* 632 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHas_js__ = __webpack_require__(1022); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(860); + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && Object(__WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */])(object, path, __WEBPACK_IMPORTED_MODULE_0__baseHas_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (has); + + +/***/ }), +/* 633 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseInRange_js__ = __webpack_require__(1023); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toFinite_js__ = __webpack_require__(416); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toNumber_js__ = __webpack_require__(391); + + + + +/** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = Object(__WEBPACK_IMPORTED_MODULE_1__toFinite_js__["a" /* default */])(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = Object(__WEBPACK_IMPORTED_MODULE_1__toFinite_js__["a" /* default */])(end); + } + number = Object(__WEBPACK_IMPORTED_MODULE_2__toNumber_js__["a" /* default */])(number); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseInRange_js__["a" /* default */])(number, start, end); +} + +/* harmony default export */ __webpack_exports__["a"] = (inRange); + + +/***/ }), +/* 634 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIndexOf_js__ = __webpack_require__(427); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isString_js__ = __webpack_require__(436); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__values_js__ = __webpack_require__(414); + + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(collection) ? collection : Object(__WEBPACK_IMPORTED_MODULE_4__values_js__["a" /* default */])(collection); + fromIndex = (fromIndex && !guard) ? Object(__WEBPACK_IMPORTED_MODULE_3__toInteger_js__["a" /* default */])(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return Object(__WEBPACK_IMPORTED_MODULE_2__isString_js__["a" /* default */])(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && Object(__WEBPACK_IMPORTED_MODULE_0__baseIndexOf_js__["a" /* default */])(collection, value, fromIndex) > -1); +} + +/* harmony default export */ __webpack_exports__["a"] = (includes); + + +/***/ }), +/* 635 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseValues); + + +/***/ }), +/* 636 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIndexOf_js__ = __webpack_require__(427); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIndexOf_js__["a" /* default */])(array, value, index); +} + +/* harmony default export */ __webpack_exports__["a"] = (indexOf); + + +/***/ }), +/* 637 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); + + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, 0, -1) : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (initial); + + +/***/ }), +/* 638 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIntersection_js__ = __webpack_require__(639); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__castArrayLikeObject_js__ = __webpack_require__(640); + + + + + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = Object(__WEBPACK_IMPORTED_MODULE_2__baseRest_js__["a" /* default */])(function(arrays) { + var mapped = Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(arrays, __WEBPACK_IMPORTED_MODULE_3__castArrayLikeObject_js__["a" /* default */]); + return (mapped.length && mapped[0] === arrays[0]) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIntersection_js__["a" /* default */])(mapped) + : []; +}); + +/* harmony default export */ __webpack_exports__["a"] = (intersection); + + +/***/ }), +/* 639 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(489); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayIncludes_js__ = __webpack_require__(468); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__arrayIncludesWith_js__ = __webpack_require__(587); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__cacheHas_js__ = __webpack_require__(490); + + + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? __WEBPACK_IMPORTED_MODULE_2__arrayIncludesWith_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__arrayIncludes_js__["a" /* default */], + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = Object(__WEBPACK_IMPORTED_MODULE_3__arrayMap_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_4__baseUnary_js__["a" /* default */])(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */](othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? Object(__WEBPACK_IMPORTED_MODULE_5__cacheHas_js__["a" /* default */])(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? Object(__WEBPACK_IMPORTED_MODULE_5__cacheHas_js__["a" /* default */])(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIntersection); + + +/***/ }), +/* 640 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLikeObject_js__ = __webpack_require__(374); + + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLikeObject_js__["a" /* default */])(value) ? value : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (castArrayLikeObject); + + +/***/ }), +/* 641 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIntersection_js__ = __webpack_require__(639); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__castArrayLikeObject_js__ = __webpack_require__(640); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__last_js__ = __webpack_require__(377); + + + + + + + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = Object(__WEBPACK_IMPORTED_MODULE_3__baseRest_js__["a" /* default */])(function(arrays) { + var iteratee = Object(__WEBPACK_IMPORTED_MODULE_5__last_js__["a" /* default */])(arrays), + mapped = Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(arrays, __WEBPACK_IMPORTED_MODULE_4__castArrayLikeObject_js__["a" /* default */]); + + if (iteratee === Object(__WEBPACK_IMPORTED_MODULE_5__last_js__["a" /* default */])(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIntersection_js__["a" /* default */])(mapped, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 2)) + : []; +}); + +/* harmony default export */ __webpack_exports__["a"] = (intersectionBy); + + +/***/ }), +/* 642 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIntersection_js__ = __webpack_require__(639); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__castArrayLikeObject_js__ = __webpack_require__(640); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__last_js__ = __webpack_require__(377); + + + + + + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = Object(__WEBPACK_IMPORTED_MODULE_2__baseRest_js__["a" /* default */])(function(arrays) { + var comparator = Object(__WEBPACK_IMPORTED_MODULE_4__last_js__["a" /* default */])(arrays), + mapped = Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(arrays, __WEBPACK_IMPORTED_MODULE_3__castArrayLikeObject_js__["a" /* default */]); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIntersection_js__["a" /* default */])(mapped, undefined, comparator) + : []; +}); + +/* harmony default export */ __webpack_exports__["a"] = (intersectionWith); + + +/***/ }), +/* 643 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(444); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createInverter_js__ = __webpack_require__(876); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(371); + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = Object(__WEBPACK_IMPORTED_MODULE_1__createInverter_js__["a" /* default */])(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; +}, Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */])); + +/* harmony default export */ __webpack_exports__["a"] = (invert); + + +/***/ }), +/* 644 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createInverter_js__ = __webpack_require__(876); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = Object(__WEBPACK_IMPORTED_MODULE_1__createInverter_js__["a" /* default */])(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (invertBy); + + +/***/ }), +/* 645 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseInvoke_js__ = __webpack_require__(455); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); + + + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseInvoke_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (invoke); + + +/***/ }), +/* 646 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseEach_js__ = __webpack_require__(412); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseInvoke_js__ = __webpack_require__(455); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isArrayLike_js__ = __webpack_require__(372); + + + + + + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = Object(__WEBPACK_IMPORTED_MODULE_3__baseRest_js__["a" /* default */])(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = Object(__WEBPACK_IMPORTED_MODULE_4__isArrayLike_js__["a" /* default */])(collection) ? Array(collection.length) : []; + + Object(__WEBPACK_IMPORTED_MODULE_1__baseEach_js__["a" /* default */])(collection, function(value) { + result[++index] = isFunc ? Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(path, value, args) : Object(__WEBPACK_IMPORTED_MODULE_2__baseInvoke_js__["a" /* default */])(value, path, args); + }); + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (invokeMap); + + +/***/ }), +/* 647 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArrayBuffer_js__ = __webpack_require__(1025); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(431); + + + + +/* Node.js helper references. */ +var nodeIsArrayBuffer = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsArrayBuffer) : __WEBPACK_IMPORTED_MODULE_0__baseIsArrayBuffer_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isArrayBuffer); + + +/***/ }), +/* 648 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == boolTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isBoolean); + + +/***/ }), +/* 649 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsDate_js__ = __webpack_require__(1026); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(431); + + + + +/* Node.js helper references. */ +var nodeIsDate = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsDate) : __WEBPACK_IMPORTED_MODULE_0__baseIsDate_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isDate); + + +/***/ }), +/* 650 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObjectLike_js__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPlainObject_js__ = __webpack_require__(97); + + + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__isObjectLike_js__["a" /* default */])(value) && value.nodeType === 1 && !Object(__WEBPACK_IMPORTED_MODULE_1__isPlainObject_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isElement); + + +/***/ }), +/* 651 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseKeys_js__ = __webpack_require__(541); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getTag_js__ = __webpack_require__(403); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArguments_js__ = __webpack_require__(405); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isBuffer_js__ = __webpack_require__(400); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isPrototype_js__ = __webpack_require__(446); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(406); + + + + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (Object(__WEBPACK_IMPORTED_MODULE_4__isArrayLike_js__["a" /* default */])(value) && + (Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value) || typeof value == 'string' || typeof value.splice == 'function' || + Object(__WEBPACK_IMPORTED_MODULE_5__isBuffer_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_2__isArguments_js__["a" /* default */])(value))) { + return !value.length; + } + var tag = Object(__WEBPACK_IMPORTED_MODULE_1__getTag_js__["a" /* default */])(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (Object(__WEBPACK_IMPORTED_MODULE_6__isPrototype_js__["a" /* default */])(value)) { + return !Object(__WEBPACK_IMPORTED_MODULE_0__baseKeys_js__["a" /* default */])(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (isEmpty); + + +/***/ }), +/* 652 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(488); + + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(value, other); +} + +/* harmony default export */ __webpack_exports__["a"] = (isEqual); + + +/***/ }), +/* 653 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(488); + + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(value, other, undefined, customizer) : !!result; +} + +/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); + + +/***/ }), +/* 654 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(152); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isFinite); + + +/***/ }), +/* 655 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(568); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(571); + + + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || Object(__WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */])(object, source, Object(__WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */])(source)); +} + +/* harmony default export */ __webpack_exports__["a"] = (isMatch); + + +/***/ }), +/* 656 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(568); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(571); + + + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */])(object, source, Object(__WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */])(source), customizer); +} + +/* harmony default export */ __webpack_exports__["a"] = (isMatchWith); + + +/***/ }), +/* 657 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isNumber_js__ = __webpack_require__(511); + + +/** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return Object(__WEBPACK_IMPORTED_MODULE_0__isNumber_js__["a" /* default */])(value) && value != +value; +} + +/* harmony default export */ __webpack_exports__["a"] = (isNaN); + + +/***/ }), +/* 658 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(827); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMaskable_js__ = __webpack_require__(1027); + + + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (Object(__WEBPACK_IMPORTED_MODULE_1__isMaskable_js__["a" /* default */])(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isNative); + + +/***/ }), +/* 659 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +/* harmony default export */ __webpack_exports__["a"] = (isNil); + + +/***/ }), +/* 660 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +/* harmony default export */ __webpack_exports__["a"] = (isNull); + + +/***/ }), +/* 661 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isInteger_js__ = __webpack_require__(510); + + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__isInteger_js__["a" /* default */])(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isSafeInteger); + + +/***/ }), +/* 662 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (isUndefined); + + +/***/ }), +/* 663 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getTag_js__ = __webpack_require__(403); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__getTag_js__["a" /* default */])(value) == weakMapTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (isWeakMap); + + +/***/ }), +/* 664 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(151); + + + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == weakSetTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (isWeakSet); + + +/***/ }), +/* 665 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(typeof func == 'function' ? func : Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(func, CLONE_DEEP_FLAG)); +} + +/* harmony default export */ __webpack_exports__["a"] = (iteratee); + + +/***/ }), +/* 666 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +/* harmony default export */ __webpack_exports__["a"] = (join); + + +/***/ }), +/* 667 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createCompounder_js__ = __webpack_require__(434); + + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = Object(__WEBPACK_IMPORTED_MODULE_0__createCompounder_js__["a" /* default */])(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +/* harmony default export */ __webpack_exports__["a"] = (kebabCase); + + +/***/ }), +/* 668 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAggregator_js__ = __webpack_require__(493); + + + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = Object(__WEBPACK_IMPORTED_MODULE_1__createAggregator_js__["a" /* default */])(function(result, value, key) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, value); +}); + +/* harmony default export */ __webpack_exports__["a"] = (keyBy); + + +/***/ }), +/* 669 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__ = __webpack_require__(469); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsNaN_js__ = __webpack_require__(841); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__strictLastIndexOf_js__ = __webpack_require__(1029); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toInteger_js__ = __webpack_require__(362); + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = Object(__WEBPACK_IMPORTED_MODULE_3__toInteger_js__["a" /* default */])(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? Object(__WEBPACK_IMPORTED_MODULE_2__strictLastIndexOf_js__["a" /* default */])(array, value, index) + : Object(__WEBPACK_IMPORTED_MODULE_0__baseFindIndex_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_1__baseIsNaN_js__["a" /* default */], index, true); +} + +/* harmony default export */ __webpack_exports__["a"] = (lastIndexOf); + + +/***/ }), +/* 670 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createCompounder_js__ = __webpack_require__(434); + + +/** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ +var lowerCase = Object(__WEBPACK_IMPORTED_MODULE_0__createCompounder_js__["a" /* default */])(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); +}); + +/* harmony default export */ __webpack_exports__["a"] = (lowerCase); + + +/***/ }), +/* 671 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createCaseFirst_js__ = __webpack_require__(845); + + +/** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ +var lowerFirst = Object(__WEBPACK_IMPORTED_MODULE_0__createCaseFirst_js__["a" /* default */])('toLowerCase'); + +/* harmony default export */ __webpack_exports__["a"] = (lowerFirst); + + +/***/ }), +/* 672 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseLt_js__ = __webpack_require__(673); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRelationalOperation_js__ = __webpack_require__(509); + + + +/** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ +var lt = Object(__WEBPACK_IMPORTED_MODULE_1__createRelationalOperation_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseLt_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (lt); + + +/***/ }), +/* 673 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseLt); + + +/***/ }), +/* 674 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRelationalOperation_js__ = __webpack_require__(509); + + +/** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ +var lte = Object(__WEBPACK_IMPORTED_MODULE_0__createRelationalOperation_js__["a" /* default */])(function(value, other) { + return value <= other; +}); + +/* harmony default export */ __webpack_exports__["a"] = (lte); + + +/***/ }), +/* 675 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(413); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); + + + + +/** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ +function mapKeys(object, iteratee) { + var result = {}; + iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 3); + + Object(__WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */])(object, function(value, key, object) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, iteratee(value, key, object), value); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapKeys); + + +/***/ }), +/* 676 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(413); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 3); + + Object(__WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */])(object, function(value, key, object) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapValues); + + +/***/ }), +/* 677 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatches_js__ = __webpack_require__(855); + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ +function matches(source) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseMatches_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(source, CLONE_DEEP_FLAG)); +} + +/* harmony default export */ __webpack_exports__["a"] = (matches); + + +/***/ }), +/* 678 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClone_js__ = __webpack_require__(402); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(859); + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + */ +function matchesProperty(path, srcValue) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */])(path, Object(__WEBPACK_IMPORTED_MODULE_0__baseClone_js__["a" /* default */])(srcValue, CLONE_DEEP_FLAG)); +} + +/* harmony default export */ __webpack_exports__["a"] = (matchesProperty); + + +/***/ }), +/* 679 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseGt_js__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(371); + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__baseGt_js__["a" /* default */]) + : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (max); + + +/***/ }), +/* 680 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseGt_js__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); + + + + +/** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ +function maxBy(array, iteratee) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 2), __WEBPACK_IMPORTED_MODULE_1__baseGt_js__["a" /* default */]) + : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (maxBy); + + +/***/ }), +/* 681 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMean_js__ = __webpack_require__(878); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identity_js__ = __webpack_require__(371); + + + +/** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ +function mean(array) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseMean_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_1__identity_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (mean); + + +/***/ }), +/* 682 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseSum); + + +/***/ }), +/* 683 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMean_js__ = __webpack_require__(878); + + + +/** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ +function meanBy(array, iteratee) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseMean_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(iteratee, 2)); +} + +/* harmony default export */ __webpack_exports__["a"] = (meanBy); + + +/***/ }), +/* 684 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(429); + + + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */])(object, source, srcIndex); +}); + +/* harmony default export */ __webpack_exports__["a"] = (merge); + + +/***/ }), +/* 685 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseInvoke_js__ = __webpack_require__(455); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); + + + +/** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ +var method = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(path, args) { + return function(object) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseInvoke_js__["a" /* default */])(object, path, args); + }; +}); + +/* harmony default export */ __webpack_exports__["a"] = (method); + + +/***/ }), +/* 686 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseInvoke_js__ = __webpack_require__(455); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); + + + +/** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ +var methodOf = Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(object, args) { + return function(path) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseInvoke_js__["a" /* default */])(object, path, args); + }; +}); + +/* harmony default export */ __webpack_exports__["a"] = (methodOf); + + +/***/ }), +/* 687 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseLt_js__ = __webpack_require__(673); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(371); + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__baseLt_js__["a" /* default */]) + : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (min); + + +/***/ }), +/* 688 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseLt_js__ = __webpack_require__(673); + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseExtremum_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(iteratee, 2), __WEBPACK_IMPORTED_MODULE_2__baseLt_js__["a" /* default */]) + : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (minBy); + + +/***/ }), +/* 689 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__ = __webpack_require__(464); + + +/** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ +var multiply = Object(__WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__["a" /* default */])(function(multiplier, multiplicand) { + return multiplier * multiplicand; +}, 1); + +/* harmony default export */ __webpack_exports__["a"] = (multiply); + + +/***/ }), +/* 690 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseNth_js__ = __webpack_require__(879); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ +function nth(array, n) { + return (array && array.length) ? Object(__WEBPACK_IMPORTED_MODULE_0__baseNth_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(n)) : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (nth); + + +/***/ }), +/* 691 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseNth_js__ = __webpack_require__(879); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); + + + + +/** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ +function nthArg(n) { + n = Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(n); + return Object(__WEBPACK_IMPORTED_MODULE_1__baseRest_js__["a" /* default */])(function(args) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseNth_js__["a" /* default */])(args, n); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (nthArg); + + +/***/ }), +/* 692 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseClone_js__ = __webpack_require__(402); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseUnset_js__ = __webpack_require__(693); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__castPath_js__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__copyObject_js__ = __webpack_require__(392); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__customOmitClone_js__ = __webpack_require__(1031); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__flatRest_js__ = __webpack_require__(401); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__getAllKeysIn_js__ = __webpack_require__(560); + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ +var omit = Object(__WEBPACK_IMPORTED_MODULE_6__flatRest_js__["a" /* default */])(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(paths, function(path) { + path = Object(__WEBPACK_IMPORTED_MODULE_3__castPath_js__["a" /* default */])(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + Object(__WEBPACK_IMPORTED_MODULE_4__copyObject_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_7__getAllKeysIn_js__["a" /* default */])(object), result); + if (isDeep) { + result = Object(__WEBPACK_IMPORTED_MODULE_1__baseClone_js__["a" /* default */])(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, __WEBPACK_IMPORTED_MODULE_5__customOmitClone_js__["a" /* default */]); + } + var length = paths.length; + while (length--) { + Object(__WEBPACK_IMPORTED_MODULE_2__baseUnset_js__["a" /* default */])(result, paths[length]); + } + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (omit); + + +/***/ }), +/* 693 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__last_js__ = __webpack_require__(377); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__parent_js__ = __webpack_require__(877); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(393); + + + + + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); + object = Object(__WEBPACK_IMPORTED_MODULE_2__parent_js__["a" /* default */])(object, path); + return object == null || delete object[Object(__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__last_js__["a" /* default */])(path))]; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUnset); + + +/***/ }), +/* 694 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__negate_js__ = __webpack_require__(437); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__pickBy_js__ = __webpack_require__(516); + + + + +/** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ +function omitBy(object, predicate) { + return Object(__WEBPACK_IMPORTED_MODULE_2__pickBy_js__["a" /* default */])(object, Object(__WEBPACK_IMPORTED_MODULE_1__negate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(predicate))); +} + +/* harmony default export */ __webpack_exports__["a"] = (omitBy); + + +/***/ }), +/* 695 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__before_js__ = __webpack_require__(478); + + +/** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ +function once(func) { + return Object(__WEBPACK_IMPORTED_MODULE_0__before_js__["a" /* default */])(2, func); +} + +/* harmony default export */ __webpack_exports__["a"] = (once); + + +/***/ }), +/* 696 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseOrderBy_js__ = __webpack_require__(881); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(360); + + + +/** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ +function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(orders)) { + orders = orders == null ? [] : [orders]; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseOrderBy_js__["a" /* default */])(collection, iteratees, orders); +} + +/* harmony default export */ __webpack_exports__["a"] = (orderBy); + + +/***/ }), +/* 697 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createOver_js__ = __webpack_require__(698); + + + +/** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ +var over = Object(__WEBPACK_IMPORTED_MODULE_1__createOver_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (over); + + +/***/ }), +/* 698 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__flatRest_js__ = __webpack_require__(401); + + + + + + + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return Object(__WEBPACK_IMPORTED_MODULE_5__flatRest_js__["a" /* default */])(function(iteratees) { + iteratees = Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(iteratees, Object(__WEBPACK_IMPORTED_MODULE_4__baseUnary_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])); + return Object(__WEBPACK_IMPORTED_MODULE_3__baseRest_js__["a" /* default */])(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(iteratee, thisArg, args); + }); + }); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (createOver); + + +/***/ }), +/* 699 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__castRest_js__ = __webpack_require__(1034); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArray_js__ = __webpack_require__(360); + + + + + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ +var overArgs = Object(__WEBPACK_IMPORTED_MODULE_6__castRest_js__["a" /* default */])(function(func, transforms) { + transforms = (transforms.length == 1 && Object(__WEBPACK_IMPORTED_MODULE_7__isArray_js__["a" /* default */])(transforms[0])) + ? Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(transforms[0], Object(__WEBPACK_IMPORTED_MODULE_5__baseUnary_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__baseIteratee_js__["a" /* default */])) + : Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__baseFlatten_js__["a" /* default */])(transforms, 1), Object(__WEBPACK_IMPORTED_MODULE_5__baseUnary_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__baseIteratee_js__["a" /* default */])); + + var funcsLength = transforms.length; + return Object(__WEBPACK_IMPORTED_MODULE_4__baseRest_js__["a" /* default */])(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, this, args); + }); +}); + +/* harmony default export */ __webpack_exports__["a"] = (overArgs); + + +/***/ }), +/* 700 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayEvery_js__ = __webpack_require__(870); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createOver_js__ = __webpack_require__(698); + + + +/** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ +var overEvery = Object(__WEBPACK_IMPORTED_MODULE_1__createOver_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__arrayEvery_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (overEvery); + + +/***/ }), +/* 701 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arraySome_js__ = __webpack_require__(569); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createOver_js__ = __webpack_require__(698); + + + +/** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + */ +var overSome = Object(__WEBPACK_IMPORTED_MODULE_1__createOver_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__arraySome_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (overSome); + + +/***/ }), +/* 702 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createPadding_js__ = __webpack_require__(703); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stringSize_js__ = __webpack_require__(438); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeFloor = Math.floor; + +/** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ +function pad(string, length, chars) { + string = Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(string); + length = Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(length); + + var strLength = length ? Object(__WEBPACK_IMPORTED_MODULE_1__stringSize_js__["a" /* default */])(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + Object(__WEBPACK_IMPORTED_MODULE_0__createPadding_js__["a" /* default */])(nativeFloor(mid), chars) + + string + + Object(__WEBPACK_IMPORTED_MODULE_0__createPadding_js__["a" /* default */])(nativeCeil(mid), chars) + ); +} + +/* harmony default export */ __webpack_exports__["a"] = (pad); + + +/***/ }), +/* 703 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRepeat_js__ = __webpack_require__(883); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseToString_js__ = __webpack_require__(390); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__castSlice_js__ = __webpack_require__(409); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hasUnicode_js__ = __webpack_require__(433); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringSize_js__ = __webpack_require__(438); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stringToArray_js__ = __webpack_require__(410); + + + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : Object(__WEBPACK_IMPORTED_MODULE_1__baseToString_js__["a" /* default */])(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? Object(__WEBPACK_IMPORTED_MODULE_0__baseRepeat_js__["a" /* default */])(chars, length) : chars; + } + var result = Object(__WEBPACK_IMPORTED_MODULE_0__baseRepeat_js__["a" /* default */])(chars, nativeCeil(length / Object(__WEBPACK_IMPORTED_MODULE_4__stringSize_js__["a" /* default */])(chars))); + return Object(__WEBPACK_IMPORTED_MODULE_3__hasUnicode_js__["a" /* default */])(chars) + ? Object(__WEBPACK_IMPORTED_MODULE_2__castSlice_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__stringToArray_js__["a" /* default */])(result), 0, length).join('') + : result.slice(0, length); +} + +/* harmony default export */ __webpack_exports__["a"] = (createPadding); + + +/***/ }), +/* 704 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createPadding_js__ = __webpack_require__(703); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stringSize_js__ = __webpack_require__(438); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ +function padEnd(string, length, chars) { + string = Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(string); + length = Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(length); + + var strLength = length ? Object(__WEBPACK_IMPORTED_MODULE_1__stringSize_js__["a" /* default */])(string) : 0; + return (length && strLength < length) + ? (string + Object(__WEBPACK_IMPORTED_MODULE_0__createPadding_js__["a" /* default */])(length - strLength, chars)) + : string; +} + +/* harmony default export */ __webpack_exports__["a"] = (padEnd); + + +/***/ }), +/* 705 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createPadding_js__ = __webpack_require__(703); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stringSize_js__ = __webpack_require__(438); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ +function padStart(string, length, chars) { + string = Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(string); + length = Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(length); + + var strLength = length ? Object(__WEBPACK_IMPORTED_MODULE_1__stringSize_js__["a" /* default */])(string) : 0; + return (length && strLength < length) + ? (Object(__WEBPACK_IMPORTED_MODULE_0__createPadding_js__["a" /* default */])(length - strLength, chars) + string) + : string; +} + +/* harmony default export */ __webpack_exports__["a"] = (padStart); + + +/***/ }), +/* 706 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toString_js__ = __webpack_require__(363); + + + +/** Used to match leading and trailing whitespace. */ +var reTrimStart = /^\s+/; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeParseInt = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].parseInt; + +/** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ +function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(Object(__WEBPACK_IMPORTED_MODULE_1__toString_js__["a" /* default */])(string).replace(reTrimStart, ''), radix || 0); +} + +/* harmony default export */ __webpack_exports__["a"] = (parseInt); + + +/***/ }), +/* 707 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createWrap_js__ = __webpack_require__(396); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getHolder_js__ = __webpack_require__(428); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__ = __webpack_require__(421); + + + + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ +var partialRight = Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(func, partials) { + var holders = Object(__WEBPACK_IMPORTED_MODULE_3__replaceHolders_js__["a" /* default */])(partials, Object(__WEBPACK_IMPORTED_MODULE_2__getHolder_js__["a" /* default */])(partialRight)); + return Object(__WEBPACK_IMPORTED_MODULE_1__createWrap_js__["a" /* default */])(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); +}); + +// Assign default placeholders. +partialRight.placeholder = {}; + +/* harmony default export */ __webpack_exports__["a"] = (partialRight); + + +/***/ }), +/* 708 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAggregator_js__ = __webpack_require__(493); + + +/** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ +var partition = Object(__WEBPACK_IMPORTED_MODULE_0__createAggregator_js__["a" /* default */])(function(result, value, key) { + result[key ? 0 : 1].push(value); +}, function() { return [[], []]; }); + +/* harmony default export */ __webpack_exports__["a"] = (partition); + + +/***/ }), +/* 709 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basePick_js__ = __webpack_require__(1037); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flatRest_js__ = __webpack_require__(401); + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = Object(__WEBPACK_IMPORTED_MODULE_1__flatRest_js__["a" /* default */])(function(object, paths) { + return object == null ? {} : Object(__WEBPACK_IMPORTED_MODULE_0__basePick_js__["a" /* default */])(object, paths); +}); + +/* harmony default export */ __webpack_exports__["a"] = (pick); + + +/***/ }), +/* 710 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(432); + + +/** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ +function propertyOf(object) { + return function(path) { + return object == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (propertyOf); + + +/***/ }), +/* 711 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pullAll_js__ = __webpack_require__(519); + + + +/** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ +var pull = Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__pullAll_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (pull); + + +/***/ }), +/* 712 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIndexOf_js__ = __webpack_require__(427); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIndexOfWith_js__ = __webpack_require__(1038); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseUnary_js__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__copyArray_js__ = __webpack_require__(383); + + + + + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? __WEBPACK_IMPORTED_MODULE_2__baseIndexOfWith_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseIndexOf_js__["a" /* default */], + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = Object(__WEBPACK_IMPORTED_MODULE_4__copyArray_js__["a" /* default */])(values); + } + if (iteratee) { + seen = Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_3__baseUnary_js__["a" /* default */])(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (basePullAll); + + +/***/ }), +/* 713 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePullAll_js__ = __webpack_require__(712); + + + +/** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ +function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__basePullAll_js__["a" /* default */])(array, values, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(iteratee, 2)) + : array; +} + +/* harmony default export */ __webpack_exports__["a"] = (pullAllBy); + + +/***/ }), +/* 714 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__basePullAll_js__ = __webpack_require__(712); + + +/** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ +function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__basePullAll_js__["a" /* default */])(array, values, undefined, comparator) + : array; +} + +/* harmony default export */ __webpack_exports__["a"] = (pullAllWith); + + +/***/ }), +/* 715 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(368); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAt_js__ = __webpack_require__(544); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__basePullAt_js__ = __webpack_require__(884); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__compareAscending_js__ = __webpack_require__(882); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__flatRest_js__ = __webpack_require__(401); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isIndex_js__ = __webpack_require__(398); + + + + + + + +/** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ +var pullAt = Object(__WEBPACK_IMPORTED_MODULE_4__flatRest_js__["a" /* default */])(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = Object(__WEBPACK_IMPORTED_MODULE_1__baseAt_js__["a" /* default */])(array, indexes); + + Object(__WEBPACK_IMPORTED_MODULE_2__basePullAt_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(indexes, function(index) { + return Object(__WEBPACK_IMPORTED_MODULE_5__isIndex_js__["a" /* default */])(index, length) ? +index : index; + }).sort(__WEBPACK_IMPORTED_MODULE_3__compareAscending_js__["a" /* default */])); + + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (pullAt); + + +/***/ }), +/* 716 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRandom_js__ = __webpack_require__(717); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toFinite_js__ = __webpack_require__(416); + + + + +/** Built-in method references without a dependency on `root`. */ +var freeParseFloat = parseFloat; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min, + nativeRandom = Math.random; + +/** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ +function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = Object(__WEBPACK_IMPORTED_MODULE_2__toFinite_js__["a" /* default */])(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = Object(__WEBPACK_IMPORTED_MODULE_2__toFinite_js__["a" /* default */])(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseRandom_js__["a" /* default */])(lower, upper); +} + +/* harmony default export */ __webpack_exports__["a"] = (random); + + +/***/ }), +/* 717 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseRandom); + + +/***/ }), +/* 718 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRange_js__ = __webpack_require__(885); + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = Object(__WEBPACK_IMPORTED_MODULE_0__createRange_js__["a" /* default */])(); + +/* harmony default export */ __webpack_exports__["a"] = (range); + + +/***/ }), +/* 719 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRange_js__ = __webpack_require__(885); + + +/** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ +var rangeRight = Object(__WEBPACK_IMPORTED_MODULE_0__createRange_js__["a" /* default */])(true); + +/* harmony default export */ __webpack_exports__["a"] = (rangeRight); + + +/***/ }), +/* 720 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createWrap_js__ = __webpack_require__(396); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flatRest_js__ = __webpack_require__(401); + + + +/** Used to compose bitmasks for function metadata. */ +var WRAP_REARG_FLAG = 256; + +/** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ +var rearg = Object(__WEBPACK_IMPORTED_MODULE_1__flatRest_js__["a" /* default */])(function(func, indexes) { + return Object(__WEBPACK_IMPORTED_MODULE_0__createWrap_js__["a" /* default */])(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); +}); + +/* harmony default export */ __webpack_exports__["a"] = (rearg); + + +/***/ }), +/* 721 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayReduce_js__ = __webpack_require__(551); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseEach_js__ = __webpack_require__(412); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseReduce_js__ = __webpack_require__(886); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isArray_js__ = __webpack_require__(360); + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = Object(__WEBPACK_IMPORTED_MODULE_4__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayReduce_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_3__baseReduce_js__["a" /* default */], + initAccum = arguments.length < 3; + + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 4), accumulator, initAccum, __WEBPACK_IMPORTED_MODULE_1__baseEach_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (reduce); + + +/***/ }), +/* 722 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayReduceRight_js__ = __webpack_require__(1040); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseEachRight_js__ = __webpack_require__(867); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseReduce_js__ = __webpack_require__(886); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isArray_js__ = __webpack_require__(360); + + + + + + +/** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ +function reduceRight(collection, iteratee, accumulator) { + var func = Object(__WEBPACK_IMPORTED_MODULE_4__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayReduceRight_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_3__baseReduce_js__["a" /* default */], + initAccum = arguments.length < 3; + + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 4), accumulator, initAccum, __WEBPACK_IMPORTED_MODULE_1__baseEachRight_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (reduceRight); + + +/***/ }), +/* 723 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(411); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseFilter_js__ = __webpack_require__(871); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__negate_js__ = __webpack_require__(437); + + + + + + +/** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ +function reject(collection, predicate) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseFilter_js__["a" /* default */]; + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_4__negate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(predicate, 3))); +} + +/* harmony default export */ __webpack_exports__["a"] = (reject); + + +/***/ }), +/* 724 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePullAt_js__ = __webpack_require__(884); + + + +/** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ +function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + Object(__WEBPACK_IMPORTED_MODULE_1__basePullAt_js__["a" /* default */])(array, indexes); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (remove); + + +/***/ }), +/* 725 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRepeat_js__ = __webpack_require__(883); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ +function repeat(string, n, guard) { + if ((guard ? Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(n); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseRepeat_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(string), n); +} + +/* harmony default export */ __webpack_exports__["a"] = (repeat); + + +/***/ }), +/* 726 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__toString_js__ = __webpack_require__(363); + + +/** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ +function replace() { + var args = arguments, + string = Object(__WEBPACK_IMPORTED_MODULE_0__toString_js__["a" /* default */])(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); +} + +/* harmony default export */ __webpack_exports__["a"] = (replace); + + +/***/ }), +/* 727 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(start); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(func, start); +} + +/* harmony default export */ __webpack_exports__["a"] = (rest); + + +/***/ }), +/* 728 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isFunction_js__ = __webpack_require__(386); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toKey_js__ = __webpack_require__(393); + + + + +/** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ +function result(object, path, defaultValue) { + path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[Object(__WEBPACK_IMPORTED_MODULE_2__toKey_js__["a" /* default */])(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = Object(__WEBPACK_IMPORTED_MODULE_1__isFunction_js__["a" /* default */])(value) ? value.call(object) : value; + } + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (result); + + +/***/ }), +/* 729 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createRound_js__ = __webpack_require__(555); + + +/** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ +var round = Object(__WEBPACK_IMPORTED_MODULE_0__createRound_js__["a" /* default */])('round'); + +/* harmony default export */ __webpack_exports__["a"] = (round); + + +/***/ }), +/* 730 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arraySample_js__ = __webpack_require__(887); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseSample_js__ = __webpack_require__(1041); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(360); + + + + +/** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ +function sample(collection) { + var func = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arraySample_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseSample_js__["a" /* default */]; + return func(collection); +} + +/* harmony default export */ __webpack_exports__["a"] = (sample); + + +/***/ }), +/* 731 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arraySampleSize_js__ = __webpack_require__(1042); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseSampleSize_js__ = __webpack_require__(1043); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__toInteger_js__ = __webpack_require__(362); + + + + + + +/** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ +function sampleSize(collection, n, guard) { + if ((guard ? Object(__WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__["a" /* default */])(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = Object(__WEBPACK_IMPORTED_MODULE_4__toInteger_js__["a" /* default */])(n); + } + var func = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arraySampleSize_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseSampleSize_js__["a" /* default */]; + return func(collection, n); +} + +/* harmony default export */ __webpack_exports__["a"] = (sampleSize); + + +/***/ }), +/* 732 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSet_js__ = __webpack_require__(457); + + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : Object(__WEBPACK_IMPORTED_MODULE_0__baseSet_js__["a" /* default */])(object, path, value); +} + +/* harmony default export */ __webpack_exports__["a"] = (set); + + +/***/ }), +/* 733 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSet_js__ = __webpack_require__(457); + + +/** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ +function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : Object(__WEBPACK_IMPORTED_MODULE_0__baseSet_js__["a" /* default */])(object, path, value, customizer); +} + +/* harmony default export */ __webpack_exports__["a"] = (setWith); + + +/***/ }), +/* 734 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayShuffle_js__ = __webpack_require__(1044); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseShuffle_js__ = __webpack_require__(1045); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(360); + + + + +/** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ +function shuffle(collection) { + var func = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arrayShuffle_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_1__baseShuffle_js__["a" /* default */]; + return func(collection); +} + +/* harmony default export */ __webpack_exports__["a"] = (shuffle); + + +/***/ }), +/* 735 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseKeys_js__ = __webpack_require__(541); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getTag_js__ = __webpack_require__(403); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(372); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isString_js__ = __webpack_require__(436); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringSize_js__ = __webpack_require__(438); + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if (Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(collection)) { + return Object(__WEBPACK_IMPORTED_MODULE_3__isString_js__["a" /* default */])(collection) ? Object(__WEBPACK_IMPORTED_MODULE_4__stringSize_js__["a" /* default */])(collection) : collection.length; + } + var tag = Object(__WEBPACK_IMPORTED_MODULE_1__getTag_js__["a" /* default */])(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseKeys_js__["a" /* default */])(collection).length; +} + +/* harmony default export */ __webpack_exports__["a"] = (size); + + +/***/ }), +/* 736 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); + + + + +/** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(start); + end = end === undefined ? length : Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(end); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, start, end); +} + +/* harmony default export */ __webpack_exports__["a"] = (slice); + + +/***/ }), +/* 737 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createCompounder_js__ = __webpack_require__(434); + + +/** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ +var snakeCase = Object(__WEBPACK_IMPORTED_MODULE_0__createCompounder_js__["a" /* default */])(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); +}); + +/* harmony default export */ __webpack_exports__["a"] = (snakeCase); + + +/***/ }), +/* 738 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arraySome_js__ = __webpack_require__(569); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseSome_js__ = __webpack_require__(1046); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(360); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIterateeCall_js__ = __webpack_require__(376); + + + + + + +/** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ +function some(collection, predicate, guard) { + var func = Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(collection) ? __WEBPACK_IMPORTED_MODULE_0__arraySome_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_2__baseSome_js__["a" /* default */]; + if (guard && Object(__WEBPACK_IMPORTED_MODULE_4__isIterateeCall_js__["a" /* default */])(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, Object(__WEBPACK_IMPORTED_MODULE_1__baseIteratee_js__["a" /* default */])(predicate, 3)); +} + +/* harmony default export */ __webpack_exports__["a"] = (some); + + +/***/ }), +/* 739 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__ = __webpack_require__(373); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseOrderBy_js__ = __webpack_require__(881); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__ = __webpack_require__(376); + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ +var sortBy = Object(__WEBPACK_IMPORTED_MODULE_2__baseRest_js__["a" /* default */])(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && Object(__WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__["a" /* default */])(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && Object(__WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__["a" /* default */])(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return Object(__WEBPACK_IMPORTED_MODULE_1__baseOrderBy_js__["a" /* default */])(collection, Object(__WEBPACK_IMPORTED_MODULE_0__baseFlatten_js__["a" /* default */])(iteratees, 1), []); +}); + +/* harmony default export */ __webpack_exports__["a"] = (sortBy); + + +/***/ }), +/* 740 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__ = __webpack_require__(522); + + +/** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ +function sortedIndex(array, value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__["a" /* default */])(array, value); +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedIndex); + + +/***/ }), +/* 741 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(379); + + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseSortedIndexBy); + + +/***/ }), +/* 742 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseSortedIndexBy_js__ = __webpack_require__(741); + + + +/** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ +function sortedIndexBy(array, value, iteratee) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseSortedIndexBy_js__["a" /* default */])(array, value, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(iteratee, 2)); +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedIndexBy); + + +/***/ }), +/* 743 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(380); + + + +/** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ +function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = Object(__WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__["a" /* default */])(array, value); + if (index < length && Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(array[index], value)) { + return index; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedIndexOf); + + +/***/ }), +/* 744 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__ = __webpack_require__(522); + + +/** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ +function sortedLastIndex(array, value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__["a" /* default */])(array, value, true); +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedLastIndex); + + +/***/ }), +/* 745 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseSortedIndexBy_js__ = __webpack_require__(741); + + + +/** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ +function sortedLastIndexBy(array, value, iteratee) { + return Object(__WEBPACK_IMPORTED_MODULE_1__baseSortedIndexBy_js__["a" /* default */])(array, value, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(iteratee, 2), true); +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedLastIndexBy); + + +/***/ }), +/* 746 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(380); + + + +/** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ +function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = Object(__WEBPACK_IMPORTED_MODULE_0__baseSortedIndex_js__["a" /* default */])(array, value, true) - 1; + if (Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(array[index], value)) { + return index; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedLastIndexOf); + + +/***/ }), +/* 747 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSortedUniq_js__ = __webpack_require__(888); + + +/** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ +function sortedUniq(array) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseSortedUniq_js__["a" /* default */])(array) + : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedUniq); + + +/***/ }), +/* 748 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseSortedUniq_js__ = __webpack_require__(888); + + + +/** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ +function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseSortedUniq_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(iteratee, 2)) + : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (sortedUniqBy); + + +/***/ }), +/* 749 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(390); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__castSlice_js__ = __webpack_require__(409); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasUnicode_js__ = __webpack_require__(433); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isRegExp_js__ = __webpack_require__(456); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stringToArray_js__ = __webpack_require__(410); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(363); + + + + + + + + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ +function split(string, separator, limit) { + if (limit && typeof limit != 'number' && Object(__WEBPACK_IMPORTED_MODULE_3__isIterateeCall_js__["a" /* default */])(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = Object(__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */])(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !Object(__WEBPACK_IMPORTED_MODULE_4__isRegExp_js__["a" /* default */])(separator)) + )) { + separator = Object(__WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */])(separator); + if (!separator && Object(__WEBPACK_IMPORTED_MODULE_2__hasUnicode_js__["a" /* default */])(string)) { + return Object(__WEBPACK_IMPORTED_MODULE_1__castSlice_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__stringToArray_js__["a" /* default */])(string), 0, limit); + } + } + return string.split(separator, limit); +} + +/* harmony default export */ __webpack_exports__["a"] = (split); + + +/***/ }), +/* 750 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(382); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayPush_js__ = __webpack_require__(408); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseRest_js__ = __webpack_require__(361); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__castSlice_js__ = __webpack_require__(409); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__toInteger_js__ = __webpack_require__(362); + + + + + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ +function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(Object(__WEBPACK_IMPORTED_MODULE_4__toInteger_js__["a" /* default */])(start), 0); + return Object(__WEBPACK_IMPORTED_MODULE_2__baseRest_js__["a" /* default */])(function(args) { + var array = args[start], + otherArgs = Object(__WEBPACK_IMPORTED_MODULE_3__castSlice_js__["a" /* default */])(args, 0, start); + + if (array) { + Object(__WEBPACK_IMPORTED_MODULE_1__arrayPush_js__["a" /* default */])(otherArgs, array); + } + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, this, otherArgs); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (spread); + + +/***/ }), +/* 751 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createCompounder_js__ = __webpack_require__(434); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__upperFirst_js__ = __webpack_require__(451); + + + +/** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ +var startCase = Object(__WEBPACK_IMPORTED_MODULE_0__createCompounder_js__["a" /* default */])(function(result, word, index) { + return result + (index ? ' ' : '') + Object(__WEBPACK_IMPORTED_MODULE_1__upperFirst_js__["a" /* default */])(word); +}); + +/* harmony default export */ __webpack_exports__["a"] = (startCase); + + +/***/ }), +/* 752 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseClamp_js__ = __webpack_require__(422); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseToString_js__ = __webpack_require__(390); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__toInteger_js__ = __webpack_require__(362); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(363); + + + + + +/** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ +function startsWith(string, target, position) { + string = Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(string); + position = position == null + ? 0 + : Object(__WEBPACK_IMPORTED_MODULE_0__baseClamp_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__toInteger_js__["a" /* default */])(position), 0, string.length); + + target = Object(__WEBPACK_IMPORTED_MODULE_1__baseToString_js__["a" /* default */])(target); + return string.slice(position, position + target.length) == target; +} + +/* harmony default export */ __webpack_exports__["a"] = (startsWith); + + +/***/ }), +/* 753 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ +function stubObject() { + return {}; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubObject); + + +/***/ }), +/* 754 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ +function stubString() { + return ''; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubString); + + +/***/ }), +/* 755 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ +function stubTrue() { + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubTrue); + + +/***/ }), +/* 756 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__ = __webpack_require__(464); + + +/** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ +var subtract = Object(__WEBPACK_IMPORTED_MODULE_0__createMathOperation_js__["a" /* default */])(function(minuend, subtrahend) { + return minuend - subtrahend; +}, 0); + +/* harmony default export */ __webpack_exports__["a"] = (subtract); + + +/***/ }), +/* 757 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSum_js__ = __webpack_require__(682); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identity_js__ = __webpack_require__(371); + + + +/** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ +function sum(array) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseSum_js__["a" /* default */])(array, __WEBPACK_IMPORTED_MODULE_1__identity_js__["a" /* default */]) + : 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (sum); + + +/***/ }), +/* 758 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseSum_js__ = __webpack_require__(682); + + + +/** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ +function sumBy(array, iteratee) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseSum_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(iteratee, 2)) + : 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (sumBy); + + +/***/ }), +/* 759 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); + + +/** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ +function tail(array) { + var length = array == null ? 0 : array.length; + return length ? Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, 1, length) : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (tail); + + +/***/ }), +/* 760 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ +function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(n); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, 0, n < 0 ? 0 : n); +} + +/* harmony default export */ __webpack_exports__["a"] = (take); + + +/***/ }), +/* 761 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSlice_js__ = __webpack_require__(387); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toInteger_js__ = __webpack_require__(362); + + + +/** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ +function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : Object(__WEBPACK_IMPORTED_MODULE_1__toInteger_js__["a" /* default */])(n); + n = length - n; + return Object(__WEBPACK_IMPORTED_MODULE_0__baseSlice_js__["a" /* default */])(array, n < 0 ? 0 : n, length); +} + +/* harmony default export */ __webpack_exports__["a"] = (takeRight); + + +/***/ }), +/* 762 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseWhile_js__ = __webpack_require__(498); + + + +/** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ +function takeRightWhile(array, predicate) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseWhile_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(predicate, 3), false, true) + : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (takeRightWhile); + + +/***/ }), +/* 763 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__ = __webpack_require__(359); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseWhile_js__ = __webpack_require__(498); + + + +/** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ +function takeWhile(array, predicate) { + return (array && array.length) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseWhile_js__["a" /* default */])(array, Object(__WEBPACK_IMPORTED_MODULE_0__baseIteratee_js__["a" /* default */])(predicate, 3)) + : []; +} + +/* harmony default export */ __webpack_exports__["a"] = (takeWhile); + + +/***/ }), +/* 764 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ +function tap(value, interceptor) { + interceptor(value); + return value; +} + +/* harmony default export */ __webpack_exports__["a"] = (tap); + + +/***/ }), +/* 765 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignInWith_js__ = __webpack_require__(448); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__attempt_js__ = __webpack_require__(477); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseValues_js__ = __webpack_require__(635); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__customDefaultsAssignIn_js__ = __webpack_require__(1047); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__escapeStringChar_js__ = __webpack_require__(1048); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isError_js__ = __webpack_require__(450); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isIterateeCall_js__ = __webpack_require__(376); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__keys_js__ = __webpack_require__(369); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__reInterpolate_js__ = __webpack_require__(889); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__templateSettings_js__ = __webpack_require__(523); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__toString_js__ = __webpack_require__(363); + + + + + + + + + + + + +/** Used to match empty string literals in compiled template source. */ +var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + +/** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ +var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + +/** Used to ensure capturing order of template delimiters. */ +var reNoMatch = /($^)/; + +/** Used to match unescaped characters in compiled string literals. */ +var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '