Difference between revisions of "Template:IONIS Paris/JS"
Line 31: | Line 31: | ||
}); | }); | ||
+ | |||
+ | //NB | ||
+ | |||
+ | /*! jQuery UI - v1.11.3 - 2015-03-05 | ||
+ | * http://jqueryui.com | ||
+ | * Includes: core.js, widget.js, mouse.js, draggable.js, droppable.js, resizable.js, sortable.js | ||
+ | * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ | ||
+ | !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(t,r){var i,o,s,a=t.nodeName.toLowerCase();return"area"===a?(i=t.parentNode,o=i.name,t.href&&o&&"map"===i.nodeName.toLowerCase()?(s=e("img[usemap='#"+o+"']")[0],!!s&&n(s)):!1):(/^(input|select|textarea|button|object)$/.test(a)?!t.disabled:"a"===a?t.href||r:r)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}/*! | ||
+ | * jQuery UI Core 1.11.3 | ||
+ | * http://jqueryui.com | ||
+ | * | ||
+ | * Copyright jQuery Foundation and other contributors | ||
+ | * Released under the MIT license. | ||
+ | * http://jquery.org/license | ||
+ | * | ||
+ | * http://api.jqueryui.com/category/ui-core/ | ||
+ | */ | ||
+ | e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var n=this.css("position"),r="absolute"===n,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=e(this);return r&&"static"===t.css("position")?!1:i.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(n){return t(n,!isNaN(e.attr(n,"tabindex")))},tabbable:function(n){var r=e.attr(n,"tabindex"),i=isNaN(r);return(i||r>=0)&&t(n,!i)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){function r(t,n,r,o){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var i="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?s["inner"+n].call(this):this.each(function(){e(this).css(o,r(this,t)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?s["outer"+n].call(this,t):this.each(function(){e(this).css(o,r(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(n,r){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),r&&r.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,r,i=e(this[0]);i.length&&i[0]!==document;){if(n=i.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(r=parseInt(i.css("zIndex"),10),!isNaN(r)&&0!==r))return r;i=i.parent()}return 0}}),e.ui.plugin={add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r)o.plugins[i]=o.plugins[i]||[],o.plugins[i].push([n,r[i]])},call:function(e,t,n,r){var i,o=e.plugins[t];if(o&&(r||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(i=0;i<o.length;i++)e.options[o[i][0]]&&o[i][1].apply(e.element,n)}};/*! | ||
+ | * jQuery UI Widget 1.11.3 | ||
+ | * http://jqueryui.com | ||
+ | * | ||
+ | * Copyright jQuery Foundation and other contributors | ||
+ | * Released under the MIT license. | ||
+ | * http://jquery.org/license | ||
+ | * | ||
+ | * http://api.jqueryui.com/jQuery.widget/ | ||
+ | */ | ||
+ | var r=0,i=Array.prototype.slice;e.cleanData=function(t){return function(n){var r,i,o;for(o=0;null!=(i=n[o]);o++)try{r=e._data(i,"events"),r&&r.remove&&e(i).triggerHandler("remove")}catch(s){}t(n)}}(e.cleanData),e.widget=function(t,n,r){var i,o,s,a,l={},c=t.split(".")[0];return t=t.split(".")[1],i=c+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[c]=e[c]||{},o=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(r,function(t,r){return e.isFunction(r)?void(l[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=i,t=r.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(l[t]=r)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:s,namespace:c,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var n,r,o=i.call(arguments,1),s=0,a=o.length;a>s;s++)for(n in o[s])r=o[s][n],o[s].hasOwnProperty(n)&&void 0!==r&&(t[n]=e.isPlainObject(r)?e.isPlainObject(t[n])?e.widget.extend({},t[n],r):e.widget.extend({},r):r);return t},e.widget.bridge=function(t,n){var r=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=i.call(arguments,1),l=this;return s?this.each(function(){var n,i=e.data(this,r);return"instance"===o?(l=i,!1):i?e.isFunction(i[o])&&"_"!==o.charAt(0)?(n=i[o].apply(i,a),n!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=e.widget.extend.apply(null,[o].concat(a))),this.each(function(){var t=e.data(this,r);t?(t.option(o||{}),t._init&&t._init()):e.data(this,r,new n(o,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=r++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var r,i,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},r=t.split("."),t=r.shift(),r.length){for(i=s[t]=e.widget.extend({},this.options[t]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(t=r.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,n,r){var i,o=this;"boolean"!=typeof t&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,s){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=r.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?i.delegate(u,c,a):n.bind(c,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(n).undelegate(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,s=this.options[t];if(r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(e.isFunction(s)&&s.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var s,a=i?i===!0||"number"==typeof i?n:i.effect||n:t;i=i||{},"number"==typeof i&&(i={duration:i}),s=!e.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),s&&e.effects&&e.effects.effect[a]?r[t](i):a!==t&&r[a]?r[a](i.duration,i.easing,o):r.queue(function(n){e(this)[t](),o&&o.call(r[0]),n()})}});var o=(e.widget,!1);e(document).mouseup(function(){o=!1});e.widget("ui.mouse",{version:"1.11.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!o){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,r=1===t.which,i="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return r&&!i&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),o=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});/*! | ||
+ | * jQuery UI Draggable 1.11.3 | ||
+ | * http://jqueryui.com | ||
+ | * | ||
+ | * Copyright jQuery Foundation and other contributors | ||
+ | * Released under the MIT license. | ||
+ | * http://jquery.org/license | ||
+ | * | ||
+ | * http://api.jqueryui.com/draggable/ | ||
+ | */ | ||
+ | e.widget("ui.draggable",e.ui.mouse,{version:"1.11.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return this._blurActiveElement(t),this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(n.iframeFix===!0?"iframe":n.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=this.document[0];if(this.handleElement.is(t.target))try{n.activeElement&&"body"!==n.activeElement.nodeName.toLowerCase()&&e(n.activeElement).blur()}catch(r){}},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,r=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(r=e.ui.ddmanager.drop(this,t)),this.dropped&&(r=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!r||"valid"===this.options.revert&&r||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,r)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",t)!==!1&&n._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper),i=r?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),r&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options,o=this.document[0];return this.relativeContainer=null,i.containment?"window"===i.containment?void(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===i.containment?void(this.containment=[0,0,e(o).width()-this.helperProportions.width-this.margins.left,(e(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):i.containment.constructor===Array?void(this.containment=i.containment):("parent"===i.containment&&(i.containment=this.helper[0].parentNode),n=e(i.containment),r=n[0],void(r&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n))):void(this.containment=null)},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,r,i,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(r=this.relativeContainer.offset(),n=[this.containment[0]+r.left,this.containment[1]+r.top,this.containment[2]+r.left,this.containment[3]+r.top]):n=this.containment,e.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),s.grid&&(i=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-s.grid[1]:i+s.grid[1]:i,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),r.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,r){var i=e.extend({},n,{item:r.element});r.sortables=[],e(r.options.connectToSortable).each(function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(r.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,i))})},stop:function(t,n,r){var i=e.extend({},n,{item:r.element});r.cancelHelperRemoval=!1,e.each(r.sortables,function(){var e=this;e.isOver?(e.isOver=0,r.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,i))})},drag:function(t,n,r){e.each(r.sortables,function(){var i=!1,o=this;o.positionAbs=r.positionAbs,o.helperProportions=r.helperProportions,o.offset.click=r.offset.click,o._intersectsWith(o.containerCache)&&(i=!0,e.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&e.contains(o.element[0],this.element[0])&&(i=!1),i})),i?(o.isOver||(o.isOver=1,o.currentItem=n.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return n.helper[0]},t.target=o.currentItem[0],o._mouseCapture(t,!0),o._mouseStart(t,!0,!0),o.offset.click.top=r.offset.click.top,o.offset.click.left=r.offset.click.left,o.offset.parent.left-=r.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=r.offset.parent.top-o.offset.parent.top,r._trigger("toSortable",t),r.dropped=o.element,e.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,o.fromOutside=r),o.currentItem&&(o._mouseDrag(t),n.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",t,o._uiHash(o)),o._mouseStop(t,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),r._refreshOffsets(t),n.position=r._generatePosition(t,!0),r._trigger("fromSortable",t),r.dropped=!1,e.each(r.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,r){var i=e("body"),o=r.options;i.css("cursor")&&(o._cursor=i.css("cursor")),i.css("cursor",o.cursor)},stop:function(t,n,r){var i=r.options;i._cursor&&e("body").css("cursor",i._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,r){var i=e(n.helper),o=r.options;i.css("opacity")&&(o._opacity=i.css("opacity")),i.css("opacity",o.opacity)},stop:function(t,n,r){var i=r.options;i._opacity&&e(n.helper).css("opacity",i._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,r){var i=r.options,o=!1,s=r.scrollParentNotHidden[0],a=r.document[0];s!==a&&"HTML"!==s.tagName?(i.axis&&"x"===i.axis||(r.overflowOffset.top+s.offsetHeight-t.pageY<i.scrollSensitivity?s.scrollTop=o=s.scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(s.scrollTop=o=s.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(r.overflowOffset.left+s.offsetWidth-t.pageX<i.scrollSensitivity?s.scrollLeft=o=s.scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(s.scrollLeft=o=s.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-e(a).scrollTop()<i.scrollSensitivity?o=e(a).scrollTop(e(a).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(a).scrollTop())<i.scrollSensitivity&&(o=e(a).scrollTop(e(a).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-e(a).scrollLeft()<i.scrollSensitivity?o=e(a).scrollLeft(e(a).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(a).scrollLeft())<i.scrollSensitivity&&(o=e(a).scrollLeft(e(a).scrollLeft()+i.scrollSpeed)))),o!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(r,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n,r){var i=r.options;r.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var t=e(this),n=t.offset();this!==r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})})},drag:function(t,n,r){var i,o,s,a,l,c,u,f,p,h,d=r.options,m=d.snapTolerance,g=n.offset.left,v=g+r.helperProportions.width,b=n.offset.top,y=b+r.helperProportions.height;for(p=r.snapElements.length-1;p>=0;p--)l=r.snapElements[p].left-r.margins.left,c=l+r.snapElements[p].width,u=r.snapElements[p].top-r.margins.top,f=u+r.snapElements[p].height,l-m>v||g>c+m||u-m>y||b>f+m||!e.contains(r.snapElements[p].item.ownerDocument,r.snapElements[p].item)?(r.snapElements[p].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[p].item})),r.snapElements[p].snapping=!1):("inner"!==d.snapMode&&(i=Math.abs(u-y)<=m,o=Math.abs(f-b)<=m,s=Math.abs(l-v)<=m,a=Math.abs(c-g)<=m,i&&(n.position.top=r._convertPositionTo("relative",{top:u-r.helperProportions.height,left:0}).top),o&&(n.position.top=r._convertPositionTo("relative",{top:f,left:0}).top),s&&(n.position.left=r._convertPositionTo("relative",{top:0,left:l-r.helperProportions.width}).left),a&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left)),h=i||o||s||a,"outer"!==d.snapMode&&(i=Math.abs(u-b)<=m,o=Math.abs(f-y)<=m,s=Math.abs(l-g)<=m,a=Math.abs(c-v)<=m,i&&(n.position.top=r._convertPositionTo("relative",{top:u,left:0}).top),o&&(n.position.top=r._convertPositionTo("relative",{top:f-r.helperProportions.height,left:0}).top),s&&(n.position.left=r._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left)),!r.snapElements[p].snapping&&(i||o||s||a||h)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[p].item})),r.snapElements[p].snapping=i||o||s||a||h)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,r){var i,o=r.options,s=e.makeArray(e(o.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});s.length&&(i=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(t){e(this).css("zIndex",i+t)}),this.css("zIndex",i+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,r){var i=e(n.helper),o=r.options;i.css("zIndex")&&(o._zIndex=i.css("zIndex")),i.css("zIndex",o.zIndex)},stop:function(t,n,r){var i=r.options;i._zIndex&&e(n.helper).css("zIndex",i._zIndex)}});e.ui.draggable;/*! | ||
+ | * jQuery UI Droppable 1.11.3 | ||
+ | * http://jqueryui.com | ||
+ | * | ||
+ | * Copyright jQuery Foundation and other contributors | ||
+ | * Released under the MIT license. | ||
+ | * http://jquery.org/license | ||
+ | * | ||
+ | * http://api.jqueryui.com/droppable/ | ||
+ | */ | ||
+ | e.widget("ui.droppable",{version:"1.11.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,n=this.options,r=n.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(r)?r:function(e){return e.is(r)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(n.scope),n.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){if("accept"===t)this.accept=e.isFunction(n)?n:function(e){return e.is(n)};else if("scope"===t){var r=e.ui.ddmanager.droppables[this.options.scope];this._splice(r),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current,i=!1;return r&&(r.currentItem||r.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var n=e(this).droppable("instance");return n.options.greedy&&!n.options.disabled&&n.options.scope===r.options.scope&&n.accept.call(n.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t)?(i=!0,!1):void 0}),i?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,n){return e>=t&&t+n>e}return function(t,n,r,i){if(!n.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,a=o+t.helperProportions.width,l=s+t.helperProportions.height,c=n.offset.left,u=n.offset.top,f=c+n.proportions().width,p=u+n.proportions().height;switch(r){case"fit":return o>=c&&f>=a&&s>=u&&p>=l;case"intersect":return c<o+t.helperProportions.width/2&&a-t.helperProportions.width/2<f&&u<s+t.helperProportions.height/2&&l-t.helperProportions.height/2<p;case"pointer":return e(i.pageY,u,n.proportions().height)&&e(i.pageX,c,n.proportions().width);case"touch":return(s>=u&&p>=s||l>=u&&p>=l||u>s&&l>p)&&(o>=c&&f>=o||a>=c&&f>=a||c>o&&a>f);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r,i,o=e.ui.ddmanager.droppables[t.options.scope]||[],s=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(r=0;r<o.length;r++)if(!(o[r].options.disabled||t&&!o[r].accept.call(o[r].element[0],t.currentItem||t.element))){for(i=0;i<a.length;i++)if(a[i]===o[r].element[0]){o[r].proportions().height=0;continue e}o[r].visible="none"!==o[r].element.css("display"),o[r].visible&&("mousedown"===s&&o[r]._activate.call(o[r],n),o[r].offset=o[r].element.offset(),o[r].proportions({width:o[r].element[0].offsetWidth,height:o[r].element[0].offsetHeight}))}},drop:function(t,n){var r=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,n)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),r},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,i,o,s=e.ui.intersect(t,this,this.options.tolerance,n),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(i=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===i}),o.length&&(r=e(o[0]).droppable("instance"),r.greedyChild="isover"===a)),r&&"isover"===a&&(r.isover=!1,r.isout=!0,r._out.call(r,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),r&&"isout"===a&&(r.isout=!1,r.isover=!0,r._over.call(r,n)))}})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}};e.ui.droppable;/*! | ||
+ | * jQuery UI Resizable 1.11.3 | ||
+ | * http://jqueryui.com | ||
+ | * | ||
+ | * Copyright jQuery Foundation and other contributors | ||
+ | * Released under the MIT license. | ||
+ | * http://jquery.org/license | ||
+ | * | ||
+ | * http://api.jqueryui.com/resizable/ | ||
+ | */ | ||
+ | e.widget("ui.resizable",e.ui.mouse,{version:"1.11.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},_create:function(){var t,n,r,i,o,s=this,a=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},n=0;n<t.length;n++)r=e.trim(t[n]),o="ui-resizable-"+r,i=e("<div class='ui-resizable-handle "+o+"'></div>"),i.css({zIndex:a.zIndex}),"se"===r&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[r]=".ui-resizable-"+r,this.element.append(i);this._renderAxis=function(t){var n,r,i,o;t=t||this.element;for(n in this.handles)this.handles[n].constructor===String&&(this.handles[n]=this.element.children(this.handles[n]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(r=e(this.handles[n],this.element),o=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth(),i=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(i,o),this._proportionallyResize()),e(this.handles[n]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){s.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=i&&i[1]?i[1]:"se")}),a.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(e(this).removeClass("ui-resizable-autohide"),s._handles.show())}).mouseleave(function(){a.disabled||s.resizing||(e(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_mouseCapture:function(t){var n,r,i=!1;for(n in this.handles)r=e(this.handles[n])[0],(r===t.target||e.contains(r,t.target))&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(t){var n,r,i,o=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),r=this._num(this.helper.css("top")),o.containment&&(n+=e(o.containment).scrollLeft()||0,r+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:r},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:n,top:r},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,i=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===i?this.axis+"-resize":i),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,r,i=this.originalMousePosition,o=this.axis,s=t.pageX-i.left||0,a=t.pageY-i.top||0,l=this._change[o];return this._updatePrevProperties(),l?(n=l.apply(this,[t,s,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),r=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(r)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var n,r,i,o,s,a,l,c=this.options,u=this;return this._helper&&(n=this._proportionallyResizeElements,r=n.length&&/textarea/i.test(n[0].nodeName),i=r&&this._hasScroll(n[0],"left")?0:u.sizeDiff.height,o=r?0:u.sizeDiff.width,s={width:u.helper.width()-o,height:u.helper.height()-i},a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,l=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(e.extend(s,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,r,i,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,r=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,i=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),r>o.minHeight&&(o.minHeight=r),n<o.maxWidth&&(o.maxWidth=n),i<o.maxHeight&&(o.maxHeight=i)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,r=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===r&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===r&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,r=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,i=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,s=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return o&&(e.width=t.minWidth),s&&(e.height=t.minHeight),r&&(e.width=t.maxWidth),i&&(e.height=t.maxHeight),o&&c&&(e.left=a-t.minWidth),r&&c&&(e.left=a-t.maxWidth),s&&u&&(e.top=l-t.minHeight),i&&u&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],r=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],i=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)n[t]=parseInt(r[t],10)||0,n[t]+=parseInt(i[t],10)||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize,r=this.originalPosition;return{left:r.left+t,width:n.width-t}},n:function(e,t,n){var r=this.originalSize,i=this.originalPosition;return{top:i.top+n,height:r.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).resizable("instance"),r=n.options,i=n._proportionallyResizeElements,o=i.length&&/textarea/i.test(i[0].nodeName),s=o&&n._hasScroll(i[0],"left")?0:n.sizeDiff.height,a=o?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-s},c=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,u=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,u&&c?{top:u,left:c}:{}),{duration:r.animateDuration,easing:r.animateEasing,step:function(){var r={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};i&&i.length&&e(i[0]).css({width:r.width,height:r.height}),n._updateCache(r),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,r,i,o,s,a,l=e(this).resizable("instance"),c=l.options,u=l.element,f=c.containment,p=f instanceof e?f.get(0):/parent/.test(f)?u.parent().get(0):f;p&&(l.containerElement=e(p),/document/.test(f)||f===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(p),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,r){n[e]=l._num(t.css("padding"+r))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.innerWidth()-n[1]},r=l.containerOffset,i=l.containerSize.height,o=l.containerSize.width,s=l._hasScroll(p,"left")?p.scrollWidth:o,a=l._hasScroll(p)?p.scrollHeight:i,l.parentData={element:p,left:r.left,top:r.top,width:s,height:a}))},resize:function(t){var n,r,i,o,s=e(this).resizable("instance"),a=s.options,l=s.containerOffset,c=s.position,u=s._aspectRatio||t.shiftKey,f={top:0,left:0},p=s.containerElement,h=!0;p[0]!==document&&/static/.test(p.css("position"))&&(f=l),c.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-f.left),u&&(s.size.height=s.size.width/s.aspectRatio,h=!1),s.position.left=a.helper?l.left:0),c.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),u&&(s.size.width=s.size.height*s.aspectRatio,h=!1),s.position.top=s._helper?l.top:0),i=s.containerElement.get(0)===s.element.parent().get(0),o=/relative|absolute/.test(s.containerElement.css("position")),i&&o?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),n=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-f.left:s.offset.left-l.left)),r=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-f.top:s.offset.top-l.top)),n+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-n,u&&(s.size.height=s.size.width/s.aspectRatio,h=!1)),r+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-r,u&&(s.size.width=s.size.height*s.aspectRatio,h=!1)),h||(s.position.left=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),n=t.options,r=t.containerOffset,i=t.containerPosition,o=t.containerElement,s=e(t.helper),a=s.offset(),l=s.outerWidth()-t.sizeDiff.width,c=s.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-i.left-r.left,width:l,height:c}),t._helper&&!n.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-i.left-r.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),n=t.options,r=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof n.alsoResize||n.alsoResize.parentNode?r(n.alsoResize):n.alsoResize.length?(n.alsoResize=n.alsoResize[0],r(n.alsoResize)):e.each(n.alsoResize,function(e){r(e)})},resize:function(t,n){var r=e(this).resizable("instance"),i=r.options,o=r.originalSize,s=r.originalPosition,a={height:r.size.height-o.height||0,width:r.size.width-o.width||0,top:r.position.top-s.top||0,left:r.position.left-s.left||0},l=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),o={},s=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(s,function(e,t){var n=(i[t]||0)+(a[t]||0);n&&n>=0&&(o[t]=n||null)}),t.css(o)})};"object"!=typeof i.alsoResize||i.alsoResize.nodeType?l(i.alsoResize):e.each(i.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.options,r=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:r.height,width:r.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(this).resizable("instance"),r=n.options,i=n.size,o=n.originalSize,s=n.originalPosition,a=n.axis,l="number"==typeof r.grid?[r.grid,r.grid]:r.grid,c=l[0]||1,u=l[1]||1,f=Math.round((i.width-o.width)/c)*c,p=Math.round((i.height-o.height)/u)*u,h=o.width+f,d=o.height+p,m=r.maxWidth&&r.maxWidth<h,g=r.maxHeight&&r.maxHeight<d,v=r.minWidth&&r.minWidth>h,b=r.minHeight&&r.minHeight>d;r.grid=l,v&&(h+=c),b&&(d+=u),m&&(h-=c),g&&(d-=u),/^(se|s|e)$/.test(a)?(n.size.width=h,n.size.height=d):/^(ne)$/.test(a)?(n.size.width=h,n.size.height=d,n.position.top=s.top-p):/^(sw)$/.test(a)?(n.size.width=h,n.size.height=d,n.position.left=s.left-f):((0>=d-u||0>=h-c)&&(t=n._getPaddingPlusBorderDimensions(this)),d-u>0?(n.size.height=d,n.position.top=s.top-p):(d=u-t.height,n.size.height=d,n.position.top=s.top+o.height-d),h-c>0?(n.size.width=h,n.position.left=s.left-f):(h=c-t.width,n.size.width=h,n.position.left=s.left+o.width-h))}});e.ui.resizable,e.widget("ui.sortable",e.ui.mouse,{version:"1.11.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&t+n>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var r=null,i=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,o.widgetName+"-item")===o?(r=e(this),!1):void 0}),e.data(t.target,o.widgetName+"-item")===o&&(r=e(t.target)),r&&(!this.options.handle||n||(e(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(i=!0)}),i))?(this.currentItem=r,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(t,n,r){var i,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,r,i,o,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),t.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(r=this.items[n],i=r.item[0],o=this._intersectsWithPointer(r),o&&r.instance===this.currentContainer&&i!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==i&&!e.contains(this.placeholder[0],i)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],i):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(t,r),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var r=this,i=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,f="x"===this.options.axis||r+c>a&&l>r+c,p="y"===this.options.axis||t+u>o&&s>t+u,h=f&&p;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?h:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),r=t&&n,i=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return r?this.floating?o&&"right"===o||"down"===i?2:1:i&&("down"===i?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),r=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?"right"===i&&n||"left"===i&&!n:r&&("down"===r&&t||"up"===r&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var r,i,o,s,a=[],l=[],c=this._connectWith();if(c&&t)for(r=c.length-1;r>=0;r--)for(o=e(c[r],this.document[0]),i=o.length-1;i>=0;i--)s=e.data(o[i],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),r=l.length-1;r>=0;r--)l[r][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,r,i,o,s,a,l,c,u=this.items,f=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(n=p.length-1;n>=0;n--)for(i=e(p[n],this.document[0]),r=i.length-1;r>=0;r--)o=e.data(i[r],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(f.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=f.length-1;n>=0;n--)for(s=f[n][1],a=f[n][0],r=0,c=a.length;c>r;r++)l=e(a[r]),l.data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,r,i,o;for(n=this.items.length-1;n>=0;n--)r=this.items[n],r.instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item,t||(r.width=i.outerWidth(),r.height=i.outerHeight()),o=i.offset(),r.left=o.left,r.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var n,r=t.options;r.placeholder&&r.placeholder.constructor!==String||(n=r.placeholder,r.placeholder={element:function(){var r=t.currentItem[0].nodeName.toLowerCase(),i=e("<"+r+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===r?t.currentItem.children().each(function(){e("<td> </td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}):"img"===r&&i.attr("src",t.currentItem.attr("src")),n||i.css("visibility","hidden"),i},update:function(e,i){(!n||r.forcePlaceholderSize)&&(i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(r.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),r.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var n,r,i,o,s,a,l,c,u,f,p=null,h=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(p&&e.contains(this.containers[n].element[0],p.element[0]))continue;p=this.containers[n],h=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(p)if(1===this.containers.length)this.containers[h].containerCache.over||(this.containers[h]._trigger("over",t,this._uiHash(this)),this.containers[h].containerCache.over=1); | ||
+ | else{for(i=1e4,o=null,u=p.floating||this._isFloating(this.currentItem),s=u?"left":"top",a=u?"width":"height",f=u?"clientX":"clientY",r=this.items.length-1;r>=0;r--)e.contains(this.containers[h].element[0],this.items[r].item[0])&&this.items[r].item[0]!==this.currentItem[0]&&(l=this.items[r].item.offset()[s],c=!1,t[f]-l>this.items[r][a]/2&&(c=!0),Math.abs(t[f]-l)<i&&(i=Math.abs(t[f]-l),o=this.items[r],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[h])return void(this.currentContainer.containerCache.over||(this.containers[h]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[h].element,!0),this._trigger("change",t,this._uiHash()),this.containers[h]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[h],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[h]._trigger("over",t,this._uiHash(this)),this.containers[h].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return r.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!r[0].style.width||n.forceHelperSize)&&r.width(this.currentItem.width()),(!r[0].style.height||n.forceHelperSize)&&r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),("document"===i.containment||"window"===i.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=e(i.containment)[0],n=e(i.containment).offset(),r="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())*r}},_generatePosition:function(t){var n,r,i=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),i.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/i.grid[1])*i.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-i.grid[1]:n+i.grid[1]:n,r=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0],o=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-i.grid[0]:r+i.grid[0]:r)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i===this.counter&&this.refreshPositions(!r)})},_clear:function(e,t){function n(e,t,n){return function(r){n._trigger(e,r,t._uiHash(t))}}this.reverting=!1;var r,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(r in this._storedCSS)("auto"===this._storedCSS[r]||"static"===this._storedCSS[r])&&(this._storedCSS[r]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(i.push(function(e){this._trigger("remove",e,this._uiHash())}),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),r=this.containers.length-1;r>=0;r--)t||i.push(n("deactivate",this,this.containers[r])),this.containers[r].containerCache.over&&(i.push(n("out",this,this.containers[r])),this.containers[r].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);this.CodeMirror=e()}}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Ro(r):{},Ro(Xs,r,!1),h(r);var i=r.value;"string"==typeof i&&(i=new xa(i,r.mode,null,r.lineSeparator)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),s=this.display=new t(n,i,o);s.wrapper.CodeMirror=this,c(this),a(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!Es&&s.input.focus(),v(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Io,keySeq:null,specialChars:null};var l=this;gs&&11>vs&&setTimeout(function(){l.display.input.reset(!0)},20),Hn(this),Yo(),xn(this),this.curOp.forceUpdate=!0,Yi(this,i),r.autofocus&&!Es||l.hasFocus()?setTimeout(jo(gr,this),20):vr(this);for(var u in Qs)Qs.hasOwnProperty(u)&&Qs[u](this,r[u],Js);S(this),r.finishInit&&r.finishInit(this);for(var f=0;f<na.length;++f)na[f](this);Sn(this),bs&&r.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function t(e,t,n){var r=this;this.input=n,r.scrollbarFiller=Ho("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=Ho("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=Ho("div",null,"CodeMirror-code"),r.selectionDiv=Ho("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=Ho("div",null,"CodeMirror-cursors"),r.measure=Ho("div",null,"CodeMirror-measure"),r.lineMeasure=Ho("div",null,"CodeMirror-measure"),r.lineSpace=Ho("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=Ho("div",[Ho("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=Ho("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=Ho("div",null,null,"position: absolute; height: "+Pa+"px; width: 1px;"),r.gutters=Ho("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=Ho("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=Ho("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),gs&&8>vs&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),bs||hs&&Es||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,jt(e,100),e.state.modeGen++,e.curOp&&Nn(e)}function i(e){e.options.lineWrapping?(Va(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ua(e.display.wrapper,"CodeMirror-wrap"),p(e)),s(e),Nn(e),an(e),setTimeout(function(){b(e)},100)}function o(e){var t=bn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/yn(e.display)-3);return function(i){if(wi(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function s(e){var t=e.doc,n=o(e);t.iter(function(e){var t=n(e);t!=e.height&&Zi(e,t)})}function a(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),an(e)}function l(e){c(e),Nn(e),setTimeout(function(){w(e)},20)}function c(e){var t=e.display.gutters,n=e.options.gutters;Bo(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(Ho("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",u(e)}function u(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function f(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=di(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=mi(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,r=i.to.line,n+=r.text.length-i.to.ch}return n}function p(e){var t=e.display,n=e.doc;t.maxLine=Xi(n,n.first),t.maxLineLength=f(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=f(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function h(e){var t=Oo(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function d(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Bt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ut(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Ho("div",[Ho("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Ho("div",[Ho("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ea(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ea(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,gs&&8>vs&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function g(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ua(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ea(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?ir(t,e):rr(t,e)},t),t.display.scrollbars.addClass&&Va(t.display.wrapper,t.display.scrollbars.addClass)}function b(e,t){t||(t=d(e));var n=e.display.barWidth,r=e.display.barHeight;y(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&T(e),y(e,d(e)),n=e.display.barWidth,r=e.display.barHeight}function y(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ht(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=to(t,r),s=to(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;o>a?(o=a,s=to(t,no(Xi(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=to(t,no(Xi(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function w(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&n[s].gutter&&(n[s].gutter.style.left=o);var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function S(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=C(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(Ho("div",[Ho("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",u(e),!0}return!1}function C(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function k(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function _(e,t,n){var r=e.display;this.viewport=t,this.visible=x(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Vt(e),this.force=n,this.dims=O(e),this.events=[]}function E(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ut(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ut(e)+"px",t.scrollbarsClipped=!0)}function A(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Rn(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==$n(e))return!1;S(e)&&(Rn(e),t.dims=O(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Os&&(o=yi(e.doc,o),s=xi(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Wn(e,o,s),n.viewOffset=no(Xi(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=$n(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Uo();return l>4&&(n.lineDiv.style.display="none"),z(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Uo()!=c&&c.offsetHeight&&c.focus(),Bo(n.cursorDiv),Bo(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,jt(e,400)),n.updateLineNumbers=null,!0}function L(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Vt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Bt(e.display)-Gt(e),n.top)}),t.visible=x(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&A(e,t);r=!1){T(e);var i=d(e);Ot(e),P(e,i),b(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function I(e,t){var n=new _(e,t);if(A(e,n)){T(e),L(e,n);var r=d(e);Ot(e),P(e,r),b(e,r),n.finish()}}function P(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+Ut(e),t.clientHeight)+"px"}function T(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i,o=t.view[r];if(!o.hidden){if(gs&&8>vs){var s=o.node.offsetTop+o.node.offsetHeight;i=s-n,n=s}else{var a=o.node.getBoundingClientRect();i=a.bottom-a.top}var l=o.line.height-i;if(2>i&&(i=bn(t)),(l>.001||-.001>l)&&(Zi(o.line,i),M(o.line),o.rest))for(var c=0;c<o.rest.length;c++)M(o.rest[c])}}}function M(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function O(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[e.options.gutters[s]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[s]]=o.clientWidth;return{fixedPos:k(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function z(e,t,n){function r(t){var n=t.nextSibling;return bs&&As&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,o=e.options.lineNumbers,s=i.lineDiv,a=s.firstChild,l=i.view,c=i.viewFrom,u=0;u<l.length;u++){var f=l[u];if(f.hidden);else if(f.node&&f.node.parentNode==s){for(;a!=f.node;)a=r(a);var p=o&&null!=t&&c>=t&&f.lineNumber;f.changes&&(Oo(f.changes,"gutter")>-1&&(p=!1),N(e,f,c,n)),p&&(Bo(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(C(e.options,c)))),a=f.node.nextSibling}else{var h=B(e,f,c,n);s.insertBefore(h,a)}c+=f.size}for(;a;)a=r(a)}function N(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?F(e,t):"gutter"==o?$(e,t,n,r):"class"==o?W(t):"widget"==o&&H(e,t,r)}t.changes=null}function D(e){return e.node==e.text&&(e.node=Ho("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),gs&&8>vs&&(e.node.style.zIndex=2)),e.node}function R(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=D(e);e.background=n.insertBefore(Ho("div",null,t),n.firstChild)}}function j(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Ri(e,t)}function F(e,t){var n=t.text.className,r=j(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,W(t)):n&&(t.text.className=n)}function W(e){R(e),e.line.wrapClass?D(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function $(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=D(t);t.gutterBackground=Ho("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=D(t),s=t.gutter=Ho("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),i.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(Ho("div",C(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var l=e.options.gutters[a],c=o.hasOwnProperty(l)&&o[l];c&&s.appendChild(Ho("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function H(e,t,n){t.alignable&&(t.alignable=null);for(var r,i=t.node.firstChild;i;i=r){var r=i.nextSibling;"CodeMirror-linewidget"==i.className&&t.node.removeChild(i)}q(e,t,n)}function B(e,t,n,r){var i=j(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),W(t),$(e,t,n,r),q(e,t,r),t.node}function q(e,t,n){if(U(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)U(e,t.rest[r],t,n,!1)}function U(e,t,n,r,i){if(t.widgets)for(var o=D(n),s=0,a=t.widgets;s<a.length;++s){var l=a[s],c=Ho("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),V(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Co(l,"redraw")}}function V(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function G(e){return zs(e.line,e.ch)}function K(e,t){return Ns(e,t)<0?t:e}function Y(e,t){return Ns(e,t)<0?e:t}function X(e){e.state.focused||(e.display.input.focus(),gr(e))}function Q(e){return e.options.readOnly||e.doc.cantEdit}function J(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var s=e.state.pasteIncoming||"paste"==i,a=o.splitLines(t),l=null;if(s&&r.ranges.length>1)if(Ds&&Ds.join("\n")==t){if(r.ranges.length%Ds.length==0){l=[];for(var c=0;c<Ds.length;c++)l.push(o.splitLines(Ds[c]))}}else a.length==r.ranges.length&&(l=zo(a,function(e){return[e]}));for(var c=r.ranges.length-1;c>=0;c--){var u=r.ranges[c],f=u.from(),p=u.to();u.empty()&&(n&&n>0?f=zs(f.line,f.ch-n):e.state.overwrite&&!s&&(p=zs(p.line,Math.min(Xi(o,p.line).text.length,p.ch+Mo(a).length))));var h=e.curOp.updateInput,d={from:f,to:p,text:l?l[c%l.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};_r(e.doc,d),Co(e,"inputRead",e,d)}t&&!s&&et(e,t),Rr(e),e.curOp.updateInput=h,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),Q(t)||t.options.disableInput||In(t,function(){J(t,n,0,null,"paste")}),!0):void 0}function et(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=Fr(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xi(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Fr(e,i.head.line,"smart"));s&&Co(e,"electricInput",e,i.head.line)}}}function tt(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:zs(i,0),head:zs(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function nt(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function rt(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Io,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function it(){var e=Ho("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),t=Ho("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return bs?e.style.width="1000px":e.setAttribute("wrap","off"),_s&&(e.style.border="1px solid black"),nt(e),t}function ot(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Io,this.gracePeriod=!1}function st(e,t){var n=Jt(e,t.line);if(!n||n.hidden)return null;var r=Xi(e.doc,t.line),i=Yt(n,r,t.line),o=ro(r),s="left";if(o){var a=cs(o,t.ch);s=a%2?"right":"left"}var l=tn(i.map,t.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function at(e,t){return t&&(e.bad=!0),e}function lt(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return at(e.clipPos(zs(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return ct(o,t,n)}}function ct(e,t,n){function r(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=0>i?c.map:u[i],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==n){var l=eo(0>i?e.line:e.rest[i]),f=o[s]+r;return(0>r||a!=t)&&(f=o[s+(r?1:0)]),zs(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Ha(i,t))return at(zs(eo(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var s=e.rest?Mo(e.rest):e.line;return at(zs(eo(s),s.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var c=e.measure,u=c.maps,f=r(a,l,n);if(f)return at(f,o);for(var p=l.nextSibling,h=a?a.nodeValue.length-n:0;p;p=p.nextSibling){if(f=r(p,p.firstChild,0))return at(zs(f.line,f.ch-h),o);h+=p.textContent.length}for(var d=l.previousSibling,h=n;d;d=d.previousSibling){if(f=r(d,d.firstChild,-1))return at(zs(f.line,f.ch+h),o);h+=p.textContent.length}}function ut(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function s(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(a+=n);var u,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(zs(r,0),zs(i+1,0),o(+f));return void(p.length&&(u=p[0].find())&&(a+=Qi(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var h=0;h<t.childNodes.length;h++)s(t.childNodes[h]);/^(pre|div|p)$/i.test(t.nodeName)&&(l=!0)}else if(3==t.nodeType){var d=t.nodeValue;if(!d)return;l&&(a+=c,l=!1),a+=d}}for(var a="",l=!1,c=e.doc.lineSeparator();s(t),t!=n;)t=t.nextSibling;return a}function ft(e,t){this.ranges=e,this.primIndex=t}function pt(e,t){this.anchor=e,this.head=t}function ht(e,t){var n=e[t];e.sort(function(e,t){return Ns(e.from(),t.from())}),t=Oo(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(Ns(o.to(),i.from())>=0){var s=Y(o.from(),i.from()),a=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new pt(l?a:s,l?s:a))}}return new ft(e,t)}function dt(e,t){return new ft([new pt(e,t||e)],0)}function mt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function gt(e,t){if(t.line<e.first)return zs(e.first,0);var n=e.first+e.size-1;return t.line>n?zs(n,Xi(e,n).text.length):vt(t,Xi(e,t.line).text.length)}function vt(e,t){var n=e.ch;return null==n||n>t?zs(e.line,t):0>n?zs(e.line,0):e}function bt(e,t){return t>=e.first&&t<e.first+e.size}function yt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=gt(e,t[r]);return n}function xt(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=Ns(n,i)<0;o!=Ns(r,i)<0?(i=n,n=r):o!=Ns(n,r)<0&&(n=r)}return new pt(i,n)}return new pt(r||n,n)}function wt(e,t,n,r){At(e,new ft([xt(e,e.sel.primary(),t,n)],0),r)}function St(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=xt(e,e.sel.ranges[i],t[i],null);var o=ht(r,e.sel.primIndex);At(e,o,n)}function Ct(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,At(e,ht(i,e.sel.primIndex),r)}function kt(e,t,n,r){At(e,dt(t,n),r)}function _t(e,t){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new pt(gt(e,t[n].anchor),gt(e,t[n].head))}};return La(e,"beforeSelectionChange",e,n),e.cm&&La(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ht(n.ranges,n.ranges.length-1):t}function Et(e,t,n){var r=e.history.done,i=Mo(r);i&&i.ranges?(r[r.length-1]=t,Lt(e,t,n)):At(e,t,n)}function At(e,t,n){Lt(e,t,n),uo(e,e.sel,e.cm?e.cm.curOp.id:0/0,n)}function Lt(e,t,n){(Ao(e,"beforeSelectionChange")||e.cm&&Ao(e.cm,"beforeSelectionChange"))&&(t=_t(e,t));var r=n&&n.bias||(Ns(t.primary().head,e.sel.primary().head)<0?-1:1);It(e,Tt(e,t,r,!0)),n&&n.scroll===!1||!e.cm||Rr(e.cm)}function It(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Eo(e.cm)),Co(e,"cursorActivity",e))}function Pt(e){It(e,Tt(e,e.sel,null,!1),Ma)}function Tt(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=Mt(e,s.anchor,n,r),l=Mt(e,s.head,n,r);(i||a!=s.anchor||l!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new pt(a,l))}return i?ht(i,t.primIndex):t}function Mt(e,t,n,r){var i=!1,o=t,s=n||1;e.cantEdit=!1;e:for(;;){var a=Xi(e,o.line);if(a.markedSpans)for(var l=0;l<a.markedSpans.length;++l){var c=a.markedSpans[l],u=c.marker;if((null==c.from||(u.inclusiveLeft?c.from<=o.ch:c.from<o.ch))&&(null==c.to||(u.inclusiveRight?c.to>=o.ch:c.to>o.ch))){if(r&&(La(u,"beforeCursorEnter"),u.explicitlyCleared)){if(a.markedSpans){--l;continue}break}if(!u.atomic)continue;var f=u.find(0>s?-1:1);if(0==Ns(f,o)&&(f.ch+=s,f.ch<0?f=f.line>e.first?gt(e,zs(f.line-1)):null:f.ch>a.text.length&&(f=f.line<e.first+e.size-1?zs(f.line+1,0):null),!f)){if(i)return r?(e.cantEdit=!0,zs(e.first,0)):Mt(e,t,n,!0);i=!0,f=t,s=-s}o=f;continue e}}return o}}function Ot(e){e.display.input.showSelection(e.display.input.prepareSelection())}function zt(e,t){for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++)if(t!==!1||s!=n.sel.primIndex){var a=n.sel.ranges[s],l=a.empty();(l||e.options.showCursorWhenSelecting)&&Nt(e,a.head,i),l||Dt(e,a,o)}return r}function Nt(e,t,n){var r=hn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(Ho("div","\xa0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(Ho("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Dt(e,t,n){function r(e,t,n,r){0>t&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(Ho("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?u-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return pn(e,zs(t,n),"div",f,r)}var a,l,f=Xi(s,t),p=f.text.length;return es(ro(f),n||0,null==i?p:i,function(e,t,s){var f,h,d,m=o(e,"left");if(e==t)f=m,h=d=m.left;else{if(f=o(t-1,"right"),"rtl"==s){var g=m;m=f,f=g}h=m.left,d=f.right}null==n&&0==e&&(h=c),f.top-m.top>3&&(r(h,m.top,null,m.bottom),h=c,m.bottom<f.top&&r(h,m.bottom,null,f.top)),null==i&&t==p&&(d=u),(!a||m.top<a.top||m.top==a.top&&m.left<a.left)&&(a=m),(!l||f.bottom>l.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),c+1>h&&(h=c),r(h,f.top,d-h,f.bottom)}),{start:a,end:l}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),l=qt(e.display),c=l.left,u=Math.max(o.sizerWidth,Vt(e)-o.sizer.offsetLeft)-l.right,f=t.from(),p=t.to();if(f.line==p.line)i(f.line,f.ch,p.ch);else{var h=Xi(s,f.line),d=Xi(s,p.line),m=vi(h)==vi(d),g=i(f.line,f.ch,m?h.text.length+1:null).end,v=i(p.line,m?0:null,p.ch).start;m&&(g.top<v.top-2?(r(g.right,g.top,null,g.bottom),r(c,v.top,v.left,v.bottom)):r(g.right,g.top,v.left-g.right,g.bottom)),g.bottom<v.top&&r(c,g.bottom,null,v.top)}n.appendChild(a)}function Rt(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function jt(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,jo(Ft,e))}function Ft(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ia(t.mode,$t(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,l=Oi(e,o,a?ia(t.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var f=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!f&&p<s.length;++p)f=s[p]!=o.styles[p];f&&i.push(t.frontier),o.stateAfter=a?r:ia(t.mode,r)}else o.text.length<=e.options.maxHighlightLength&&Ni(e,o.text,r),o.stateAfter=t.frontier%5==0?ia(t.mode,r):null;return++t.frontier,+new Date>n?(jt(e,e.options.workDelay),!0):void 0}),i.length&&In(e,function(){for(var t=0;t<i.length;t++)Dn(e,i[t],"text")})}}function Wt(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=Xi(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var c=Na(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function $t(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Wt(e,t,n),s=o>r.first&&Xi(r,o-1).stateAfter;return s=s?ia(r.mode,s):oa(r.mode),r.iter(o,t,function(n){Ni(e,n.text,s);var a=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=a?ia(r.mode,s):null,++o}),n&&(r.frontier=o),s}function Ht(e){return e.lineSpace.offsetTop}function Bt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=qo(e.measure,Ho("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Ut(e){return Pa-e.display.nativeBarWidth}function Vt(e){return e.display.scroller.clientWidth-Ut(e)-e.display.barWidth}function Gt(e){return e.display.scroller.clientHeight-Ut(e)-e.display.barHeight}function Kt(e,t,n){var r=e.options.lineWrapping,i=r&&Vt(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Yt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var r=0;r<e.rest.length;r++)if(eo(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Xt(e,t){t=vi(t);var n=eo(t),r=e.display.externalMeasured=new On(e.doc,t,n);r.lineN=n;var i=r.built=Ri(e,r);return r.text=i.pre,qo(e.display.lineMeasure,i.pre),r}function Qt(e,t,n,r){return en(e,Zt(e,t),n,r)}function Jt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[jn(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Zt(e,t){var n=eo(t),r=Jt(e,n);r&&!r.text?r=null:r&&r.changes&&(N(e,r,n,O(e)),e.curOp.forceUpdate=!0),r||(r=Xt(e,t));var i=Yt(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function en(e,t,n,r,i){t.before&&(n=-1);var o,s=n+(r||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Kt(e,t.view,t.rect),t.hasHeights=!0),o=nn(e,t,n,r),o.bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function tn(e,t,n){for(var r,i,o,s,a=0;a<e.length;a+=3){var l=e[a],c=e[a+1];if(l>t?(i=0,o=1,s="left"):c>t?(i=t-l,o=i+1):(a==e.length-3||t==c&&e[a+3]>t)&&(o=c-l,i=o-1,t>=c&&(s="right")),null!=i){if(r=e[a+2],l==c&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)r=e[(a-=3)+2],s="left";if("right"==n&&i==c-l)for(;a<e.length-3&&e[a+3]==e[a+4]&&!e[a+5].insertLeft;)r=e[(a+=3)+2],s="right";break}}return{node:r,start:i,end:o,collapse:s,coverStart:l,coverEnd:c}}function nn(e,t,n,r){var i,o=tn(t.map,n,r),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;4>u;u++){for(;a&&$o(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l<o.coverEnd&&$o(t.line.text.charAt(o.coverStart+l));)++l;if(gs&&9>vs&&0==a&&l==o.coverEnd-o.coverStart)i=s.parentNode.getBoundingClientRect();else if(gs&&e.options.lineWrapping){var f=ja(s,a,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Ws}else i=ja(s,a,l).getBoundingClientRect()||Ws;if(i.left||i.right||0==a)break;l=a,a-=1,c="right"}gs&&11>vs&&(i=rn(e.display.measure,i))}else{a>0&&(c=r="right");var f;i=e.options.lineWrapping&&(f=s.getClientRects()).length>1?f["right"==r?f.length-1:0]:s.getBoundingClientRect()}if(gs&&9>vs&&!a&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+yn(e.display),top:p.top,bottom:p.bottom}:Ws}for(var h=i.top-t.rect.top,d=i.bottom-t.rect.top,m=(h+d)/2,g=t.view.measure.heights,u=0;u<g.length-1&&!(m<g[u]);u++);var v=u?g[u-1]:0,b=g[u],y={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:v,bottom:b}; | ||
+ | return i.left||i.right||(y.bogus=!0),e.options.singleCursorHeightPerLine||(y.rtop=h,y.rbottom=d),y}function rn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Zo(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function on(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function sn(e){e.display.externalMeasure=null,Bo(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)on(e.display.view[t])}function an(e){sn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ln(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cn(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function un(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=ki(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=no(t);if("local"==r?s+=Ht(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:cn());var l=a.left+("window"==r?0:ln());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function fn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=ln(),i-=cn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function pn(e,t,n,r,i){return r||(r=Xi(e.doc,t.line)),un(e,r,Qt(e,r,t.ch,i),n)}function hn(e,t,n,r,i,o){function s(t,s){var a=en(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,un(e,r,a,n)}function a(e,t){var n=l[t],r=n.level%2;return e==ts(n)&&t&&n.level<l[t-1].level?(n=l[--t],e=ns(n)-(n.level%2?0:1),r=!0):e==ns(n)&&t<l.length-1&&n.level<l[t+1].level&&(n=l[++t],e=ts(n)-n.level%2,r=!1),r&&e==n.to&&e>n.from?s(e-1):s(e,r)}r=r||Xi(e.doc,t.line),i||(i=Zt(e,r));var l=ro(r),c=t.ch;if(!l)return s(c);var u=cs(l,c),f=a(c,u);return null!=el&&(f.other=a(c,el)),f}function dn(e,t){var n=0,t=gt(e.doc,t);e.options.lineWrapping||(n=yn(e.display)*t.ch);var r=Xi(e.doc,t.line),i=no(r)+Ht(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function mn(e,t,n,r){var i=zs(e,t);return i.xRel=r,n&&(i.outside=!0),i}function gn(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return mn(r.first,0,!0,-1);var i=to(r,n),o=r.first+r.size-1;if(i>o)return mn(r.first+r.size-1,Xi(r,o).text.length,!0,1);0>t&&(t=0);for(var s=Xi(r,i);;){var a=vn(e,s,i,t,n),l=mi(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;i=eo(s=c.to.line)}}function vn(e,t,n,r,i){function o(r){var i=hn(e,zs(n,r),"line",t,c);return a=!0,s>i.bottom?i.left-l:s<i.top?i.left+l:(a=!1,i.left)}var s=i-no(t),a=!1,l=2*e.display.wrapper.clientWidth,c=Zt(e,t),u=ro(t),f=t.text.length,p=rs(t),h=is(t),d=o(p),m=a,g=o(h),v=a;if(r>g)return mn(n,h,v,1);for(;;){if(u?h==p||h==fs(t,p,1):1>=h-p){for(var b=d>r||g-r>=r-d?p:h,y=r-(b==p?d:g);$o(t.text.charAt(b));)++b;var x=mn(n,b,b==p?m:v,-1>y?-1:y>1?1:0);return x}var w=Math.ceil(f/2),S=p+w;if(u){S=p;for(var C=0;w>C;++C)S=fs(t,S,1)}var k=o(S);k>r?(h=S,g=k,(v=a)&&(g+=1e3),f=w):(p=S,d=k,m=a,f-=w)}}function bn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rs){Rs=Ho("pre");for(var t=0;49>t;++t)Rs.appendChild(document.createTextNode("x")),Rs.appendChild(Ho("br"));Rs.appendChild(document.createTextNode("x"))}qo(e.measure,Rs);var n=Rs.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Bo(e.measure),n||1}function yn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Ho("span","xxxxxxxxxx"),n=Ho("pre",[t]);qo(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function xn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Hs},$s?$s.ops.push(e.curOp):e.curOp.ownsGroup=$s={ops:[e.curOp],delayedCallbacks:[]}}function wn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Sn(e){var t=e.curOp,n=t.ownsGroup;if(n)try{wn(n)}finally{$s=null;for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;Cn(n)}}function Cn(e){for(var t=e.ops,n=0;n<t.length;n++)kn(t[n]);for(var n=0;n<t.length;n++)_n(t[n]);for(var n=0;n<t.length;n++)En(t[n]);for(var n=0;n<t.length;n++)An(t[n]);for(var n=0;n<t.length;n++)Ln(t[n])}function kn(e){var t=e.cm,n=t.display;E(t),e.updateMaxLine&&p(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new _(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function _n(e){e.updatedDisplay=e.mustUpdate&&A(e.cm,e.update)}function En(e){var t=e.cm,n=t.display;e.updatedDisplay&&T(t),e.barMeasure=d(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ut(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Vt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function An(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.preparedSelection&&t.display.input.showSelection(e.preparedSelection),e.updatedDisplay&&P(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&b(t,e.barMeasure),e.selectionChanged&&Rt(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),e.focus&&e.focus==Uo()&&X(e.cm)}function Ln(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&L(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-Vt(t),e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,w(t)),e.scrollToPos){var i=Or(t,gt(r,e.scrollToPos.from),gt(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Mr(t,i)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||La(o[a],"hide");if(s)for(var a=0;a<s.length;++a)s[a].lines.length&&La(s[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&La(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function In(e,t){if(e.curOp)return t();xn(e);try{return t()}finally{Sn(e)}}function Pn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);xn(e);try{return t.apply(e,arguments)}finally{Sn(e)}}}function Tn(e){return function(){if(this.curOp)return e.apply(this,arguments);xn(this);try{return e.apply(this,arguments)}finally{Sn(this)}}}function Mn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);xn(t);try{return e.apply(this,arguments)}finally{Sn(t)}}}function On(e,t,n){this.line=t,this.rest=bi(t),this.size=this.rest?eo(Mo(this.rest))-n+1:1,this.node=this.text=null,this.hidden=wi(e,t)}function zn(e,t,n){for(var r,i=[],o=t;n>o;o=r){var s=new On(e.doc,Xi(e.doc,o),o);r=o+s.size,i.push(s)}return i}function Nn(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Os&&yi(e.doc,t)<i.viewTo&&Rn(e);else if(n<=i.viewFrom)Os&&xi(e.doc,n+r)>i.viewFrom?Rn(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Rn(e);else if(t<=i.viewFrom){var o=Fn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Rn(e)}else if(n>=i.viewTo){var o=Fn(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Rn(e)}else{var s=Fn(e,t,t,-1),a=Fn(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(zn(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):Rn(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Dn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[jn(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Oo(s,n)&&s.push(n)}}}function Rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function jn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,0>t)return r}function Fn(e,t,n,r){var i,o=jn(e,t),s=e.display.view;if(!Os||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;o>a;a++)l+=s[a].size;if(l!=t){if(r>0){if(o==s.length-1)return null;i=l+s[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;yi(e.doc,n)!=n;){if(o==(0>r?0:s.length-1))return null;n+=r*s[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Wn(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=zn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=zn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(jn(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(zn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,jn(e,n)))),r.viewTo=n}function $n(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Hn(e){function t(){i.activeTouch&&(o=setTimeout(function(){i.activeTouch=null},1e3),s=i.activeTouch,s.end=+new Date)}function n(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}var i=e.display;Ea(i.scroller,"mousedown",Pn(e,Gn)),gs&&11>vs?Ea(i.scroller,"dblclick",Pn(e,function(t){if(!_o(e,t)){var n=Vn(e,t);if(n&&!Jn(e,t)&&!Un(e.display,t)){Ca(t);var r=e.findWordAt(n);wt(e.doc,r.anchor,r.head)}}})):Ea(i.scroller,"dblclick",function(t){_o(e,t)||Ca(t)}),Ts||Ea(i.scroller,"contextmenu",function(t){br(e,t)});var o,s={end:0};Ea(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-s.end<=300?s:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Ea(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ea(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Un(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(i.activeTouch,"page");s=!o.prev||r(o,o.prev)?new pt(a,a):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(a):new pt(zs(a.line,0),gt(e.doc,zs(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),Ca(n)}t()}),Ea(i.scroller,"touchcancel",t),Ea(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rr(e,i.scroller.scrollTop),ir(e,i.scroller.scrollLeft,!0),La(e,"scroll",e))}),Ea(i.scroller,"mousewheel",function(t){or(e,t)}),Ea(i.scroller,"DOMMouseScroll",function(t){or(e,t)}),Ea(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){_o(e,t)||_a(t)},over:function(t){_o(e,t)||(tr(e,t),_a(t))},start:function(t){er(e,t)},drop:Pn(e,Zn),leave:function(){nr(e)}};var a=i.input.getField();Ea(a,"keyup",function(t){hr.call(e,t)}),Ea(a,"keydown",Pn(e,fr)),Ea(a,"keypress",Pn(e,dr)),Ea(a,"focus",jo(gr,e)),Ea(a,"blur",jo(vr,e))}function Bn(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,s=n?Ea:Aa;s(t.display.scroller,"dragstart",o.start),s(t.display.scroller,"dragenter",o.enter),s(t.display.scroller,"dragover",o.over),s(t.display.scroller,"dragleave",o.leave),s(t.display.scroller,"drop",o.drop)}}function qn(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Un(e,t){for(var n=wo(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Vn(e,t,n,r){var i=e.display;if(!n&&"true"==wo(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(t){return null}var l,c=gn(e,o,s);if(r&&1==c.xRel&&(l=Xi(e.doc,c.line).text).length==c.ch){var u=Na(l,l.length,e.options.tabSize)-l.length;c=zs(c.line,Math.max(0,Math.round((o-qt(e.display).left)/yn(e.display))-u))}return c}function Gn(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||_o(t,e))){if(n.shift=e.shiftKey,Un(n,e))return void(bs||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Jn(t,e)){var r=Vn(t,e);switch(window.focus(),So(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Kn(t,e,r):wo(e)==n.scroller&&Ca(e);break;case 2:bs&&(t.state.lastMiddleDown=+new Date),r&&wt(t.doc,r),setTimeout(function(){n.input.focus()},20),Ca(e);break;case 3:Ts?br(t,e):mr(t)}}}}function Kn(e,t,n){gs?setTimeout(jo(X,e),0):e.curOp.focus=Uo();var r,i=+new Date;Fs&&Fs.time>i-400&&0==Ns(Fs.pos,n)?r="triple":js&&js.time>i-400&&0==Ns(js.pos,n)?(r="double",Fs={time:i,pos:n}):(r="single",js={time:i,pos:n});var o,s=e.doc.sel,a=As?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ka&&!Q(e)&&"single"==r&&(o=s.contains(n))>-1&&(Ns((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(Ns(o.to(),n)>0||n.xRel<0)?Yn(e,t,n,a):Xn(e,t,n,r,a)}function Yn(e,t,n,r){var i=e.display,o=+new Date,s=Pn(e,function(a){bs&&(i.scroller.draggable=!1),e.state.draggingText=!1,Aa(document,"mouseup",s),Aa(i.scroller,"drop",s),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(Ca(a),!r&&+new Date-200<o&&wt(e.doc,n),bs||gs&&9==vs?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});bs&&(i.scroller.draggable=!0),e.state.draggingText=s,i.scroller.dragDrop&&i.scroller.dragDrop(),Ea(document,"mouseup",s),Ea(i.scroller,"drop",s)}function Xn(e,t,n,r,i){function o(t){if(0!=Ns(g,t))if(g=t,"rect"==r){for(var i=[],o=e.options.tabSize,s=Na(Xi(c,n.line).text,n.ch,o),a=Na(Xi(c,t.line).text,t.ch,o),l=Math.min(s,a),h=Math.max(s,a),d=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));m>=d;d++){var v=Xi(c,d).text,b=Po(v,l,o);l==h?i.push(new pt(zs(d,b),zs(d,b))):v.length>b&&i.push(new pt(zs(d,b),zs(d,Po(v,h,o))))}i.length||i.push(new pt(n,n)),At(c,ht(p.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y=u,x=y.anchor,w=t;if("single"!=r){if("double"==r)var S=e.findWordAt(t);else var S=new pt(zs(t.line,0),gt(c,zs(t.line+1,0)));Ns(S.anchor,x)>0?(w=S.head,x=Y(y.from(),S.anchor)):(w=S.anchor,x=K(y.to(),S.head))}var i=p.ranges.slice(0);i[f]=new pt(gt(c,x),w),At(c,ht(i,f),Oa)}}function s(t){var n=++b,i=Vn(e,t,!0,"rect"==r);if(i)if(0!=Ns(i,g)){e.curOp.focus=Uo(),o(i);var a=x(l,c);(i.line>=a.to||i.line<a.from)&&setTimeout(Pn(e,function(){b==n&&s(t)}),150)}else{var u=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;u&&setTimeout(Pn(e,function(){b==n&&(l.scroller.scrollTop+=u,s(t))}),50)}}function a(t){e.state.selectingText=!1,b=1/0,Ca(t),l.input.focus(),Aa(document,"mousemove",y),Aa(document,"mouseup",w),c.history.lastSelOrigin=null}var l=e.display,c=e.doc;Ca(t);var u,f,p=c.sel,h=p.ranges;if(i&&!t.shiftKey?(f=c.sel.contains(n),u=f>-1?h[f]:new pt(n,n)):(u=c.sel.primary(),f=c.sel.primIndex),t.altKey)r="rect",i||(u=new pt(n,n)),n=Vn(e,t,!0,!0),f=-1;else if("double"==r){var d=e.findWordAt(n);u=e.display.shift||c.extend?xt(c,u,d.anchor,d.head):d}else if("triple"==r){var m=new pt(zs(n.line,0),gt(c,zs(n.line+1,0)));u=e.display.shift||c.extend?xt(c,u,m.anchor,m.head):m}else u=xt(c,u,n);i?-1==f?(f=h.length,At(c,ht(h.concat([u]),f),{scroll:!1,origin:"*mouse"})):h.length>1&&h[f].empty()&&"single"==r&&!t.shiftKey?(At(c,ht(h.slice(0,f).concat(h.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):Ct(c,f,u,Oa):(f=0,At(c,new ft([u],0),Oa),p=c.sel);var g=n,v=l.wrapper.getBoundingClientRect(),b=0,y=Pn(e,function(e){So(e)?s(e):a(e)}),w=Pn(e,a);e.state.selectingText=w,Ea(document,"mousemove",y),Ea(document,"mouseup",w)}function Qn(e,t,n,r,i){try{var o=t.clientX,s=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ca(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(s>l.bottom||!Ao(e,n))return xo(t);s-=l.top-a.viewOffset;for(var c=0;c<e.options.gutters.length;++c){var u=a.gutters.childNodes[c];if(u&&u.getBoundingClientRect().right>=o){var f=to(e.doc,s),p=e.options.gutters[c];return i(e,n,e,f,p,t),xo(t)}}}function Jn(e,t){return Qn(e,t,"gutterClick",!0,Co)}function Zn(e){var t=this;if(nr(t),!_o(t,e)&&!Un(t.display,e)){Ca(e),gs&&(Bs=+new Date);var n=Vn(t,e,!0),r=e.dataTransfer.files;if(n&&!Q(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,a=function(e,r){var a=new FileReader;a.onload=Pn(t,function(){if(o[r]=a.result,++s==i){n=gt(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};_r(t.doc,e),Et(t.doc,dt(n,Ys(e)))}}),a.readAsText(e)},l=0;i>l;++l)a(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(As?e.altKey:e.ctrlKey))var c=t.listSelections();if(Lt(t.doc,dt(n,n)),c)for(var l=0;l<c.length;++l)Tr(t.doc,"",c[l].anchor,c[l].head,"drag");t.replaceSelection(o,"around","paste"),t.display.input.focus()}}catch(e){}}}}function er(e,t){if(gs&&(!e.state.draggingText||+new Date-Bs<100))return void _a(t);if(!_o(e,t)&&!Un(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!Ss)){var n=Ho("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ws&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),ws&&n.parentNode.removeChild(n)}}function tr(e,t){var n=Vn(e,t);if(n){var r=document.createDocumentFragment();Nt(e,n,r),e.display.dragCursor||(e.display.dragCursor=Ho("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),qo(e.display.dragCursor,r)}}function nr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function rr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,hs||I(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),hs&&I(e),jt(e,100))}function ir(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,w(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function or(e,t){var n=Vs(t),r=n.x,i=n.y,o=e.display,s=o.scroller;if(r&&s.scrollWidth>s.clientWidth||i&&s.scrollHeight>s.clientHeight){if(i&&As&&bs)e:for(var a=t.target,l=o.view;a!=s;a=a.parentNode)for(var c=0;c<l.length;c++)if(l[c].node==a){e.display.currentWheelTarget=a;break e}if(r&&!hs&&!ws&&null!=Us)return i&&rr(e,Math.max(0,Math.min(s.scrollTop+i*Us,s.scrollHeight-s.clientHeight))),ir(e,Math.max(0,Math.min(s.scrollLeft+r*Us,s.scrollWidth-s.clientWidth))),Ca(t),void(o.wheelStartX=null);if(i&&null!=Us){var u=i*Us,f=e.doc.scrollTop,p=f+o.wrapper.clientHeight;0>u?f=Math.max(0,f+u-50):p=Math.min(e.doc.height,p+u+50),I(e,{top:f,bottom:p})}20>qs&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Us=(Us*qs+n)/(qs+1),++qs)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function sr(e,t,n){if("string"==typeof t&&(t=sa[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{Q(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ta}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ar(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=la(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&la(t,e.options.extraKeys,n,e)||la(t,e.options.keyMap,n,e)}function lr(e,t,n,r){var i=e.state.keySeq;if(i){if(ca(t))return"handled";Gs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=ar(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Co(e,"keyHandled",e,t,n),("handled"==o||"multi"==o)&&(Ca(n),Rt(e)),i&&!o&&/\'$/.test(t)?(Ca(n),!0):!!o}function cr(e,t){var n=ua(t,!0);return n?t.shiftKey&&!e.state.keySeq?lr(e,"Shift-"+n,t,function(t){return sr(e,t,!0)})||lr(e,n,t,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?sr(e,t):void 0}):lr(e,n,t,function(t){return sr(e,t)}):!1}function ur(e,t,n){return lr(e,"'"+n+"'",t,function(t){return sr(e,t,!0)})}function fr(e){var t=this;if(t.curOp.focus=Uo(),!_o(t,e)){gs&&11>vs&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=cr(t,e);ws&&(Ks=r?n:null,!r&&88==n&&!Qa&&(As?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||pr(t)}}function pr(e){function t(e){18!=e.keyCode&&e.altKey||(Ua(n,"CodeMirror-crosshair"),Aa(document,"keyup",t),Aa(document,"mouseover",t))}var n=e.display.lineDiv;Va(n,"CodeMirror-crosshair"),Ea(document,"keyup",t),Ea(document,"mouseover",t)}function hr(e){16==e.keyCode&&(this.doc.sel.shift=!1),_o(this,e)}function dr(e){var t=this;if(!(Un(t.display,e)||_o(t,e)||e.ctrlKey&&!e.altKey||As&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ws&&n==Ks)return Ks=null,void Ca(e);if(!ws||e.which&&!(e.which<10)||!cr(t,e)){var i=String.fromCharCode(null==r?n:r);ur(t,e,i)||t.display.input.onKeyPress(e)}}}function mr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vr(e))},100)}function gr(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(La(e,"focus",e),e.state.focused=!0,Va(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),bs&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Rt(e))}function vr(e){e.state.delayingBlurEvent||(e.state.focused&&(La(e,"blur",e),e.state.focused=!1,Ua(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function br(e,t){Un(e.display,t)||yr(e,t)||e.display.input.onContextMenu(t)}function yr(e,t){return Ao(e,"gutterContextMenu")?Qn(e,t,"gutterContextMenu",!1,La):!1}function xr(e,t){if(Ns(e,t.from)<0)return e;if(Ns(e,t.to)<=0)return Ys(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ys(t).ch-t.to.ch),zs(n,r)}function wr(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new pt(xr(i.anchor,t),xr(i.head,t)))}return ht(n,e.sel.primIndex)}function Sr(e,t,n){return e.line==t.line?zs(n.line,e.ch-t.ch+n.ch):zs(n.line+(e.line-t.line),e.ch)}function Cr(e,t,n){for(var r=[],i=zs(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=Sr(a.from,i,o),c=Sr(Ys(a),i,o);if(i=a.to,o=c,"around"==n){var u=e.sel.ranges[s],f=Ns(u.head,u.anchor)<0;r[s]=new pt(f?c:l,f?l:c)}else r[s]=new pt(l,l)}return new ft(r,e.sel.primIndex)}function kr(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=gt(e,t)),n&&(this.to=gt(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),La(e,"beforeChange",e,r),e.cm&&La(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function _r(e,t,n){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,_r)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ao(e,"beforeChange")||e.cm&&Ao(e.cm,"beforeChange"))||(t=kr(e,t,!0))){var r=Ms&&!n&&ai(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Er(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Er(e,t)}}function Er(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Ns(t.from,t.to)){var n=wr(e,t);lo(e,t,n,e.cm?e.cm.curOp.id:0/0),Ir(e,t,n,ii(e,t));var r=[];Ki(e,function(e,n){n||-1!=Oo(r,e.history)||(yo(e.history,t),r.push(e.history)),Ir(e,t,null,ii(e,t))})}}function Ar(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,s="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,l=0;l<s.length&&(r=s[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;r=s.pop(),r.ranges;){if(fo(r,a),n&&!r.equals(e.sel))return void At(e,r,{clearRedo:!1});o=r}var c=[];fo(o,a),a.push({changes:c,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var u=Ao(e,"beforeChange")||e.cm&&Ao(e.cm,"beforeChange"),l=r.changes.length-1;l>=0;--l){var f=r.changes[l];if(f.origin=t,u&&!kr(e,f,!1))return void(s.length=0);c.push(oo(e,f));var p=l?wr(e,f):Mo(s);Ir(e,f,p,si(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:Ys(f)});var h=[];Ki(e,function(e,t){t||-1!=Oo(h,e.history)||(yo(e.history,f),h.push(e.history)),Ir(e,f,null,si(e,f))})}}}}function Lr(e,t){if(0!=t&&(e.first+=t,e.sel=new ft(zo(e.sel.ranges,function(e){return new pt(zs(e.anchor.line+t,e.anchor.ch),zs(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Nn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Dn(e.cm,r,"gutter")}}function Ir(e,t,n,r){if(e.cm&&!e.cm.curOp)return Pn(e.cm,Ir)(e,t,n,r);if(t.to.line<e.first)return void Lr(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Lr(e,i),t={from:zs(e.first,0),to:zs(t.to.line+i,t.to.ch),text:[Mo(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:zs(o,Xi(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qi(e,t.from,t.to),n||(n=wr(e,t)),e.cm?Pr(e.cm,t,r):Ui(e,t,r),Lt(e,n,Ma)}}function Pr(e,t,n){var r=e.doc,i=e.display,s=t.from,a=t.to,l=!1,c=s.line;e.options.lineWrapping||(c=eo(vi(Xi(r,s.line))),r.iter(c,a.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&Eo(e),Ui(r,t,n,o(e)),e.options.lineWrapping||(r.iter(c,s.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,s.line),jt(e,400);var u=t.text.length-(a.line-s.line)-1;t.full?Nn(e):s.line!=a.line||1!=t.text.length||qi(e.doc,t)?Nn(e,s.line,a.line+1,u):Dn(e,s.line,"text");var p=Ao(e,"changes"),h=Ao(e,"change");if(h||p){var d={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};h&&Co(e,"change",e,d),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function Tr(e,t,n,r,i){if(r||(r=n),Ns(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),_r(e,{from:n,to:r,text:t,origin:i})}function Mr(e,t){if(!_o(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!ks){var o=Ho("div","\u200b",null,"position: absolute; top: "+(t.top-n.viewOffset-Ht(e.display))+"px; height: "+(t.bottom-t.top+Ut(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Or(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,s=hn(e,t),a=n&&n!=t?hn(e,n):s,l=Nr(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-r,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+r),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(rr(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=l.scrollLeft&&(ir(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return s}function zr(e,t,n,r,i){var o=Nr(e,t,n,r,i);null!=o.scrollTop&&rr(e,o.scrollTop),null!=o.scrollLeft&&ir(e,o.scrollLeft)}function Nr(e,t,n,r,i){var o=e.display,s=bn(e.display);0>n&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Gt(e),c={};i-n>l&&(i=n+l);var u=e.doc.height+Bt(o),f=s>n,p=i>u-s;if(a>n)c.scrollTop=f?0:n;else if(i>a+l){var h=Math.min(n,(p?u:i)-l);h!=a&&(c.scrollTop=h)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=Vt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),g=r-t>m;return g&&(r=t+m),10>t?c.scrollLeft=0:d>t?c.scrollLeft=Math.max(0,t-(g?0:10)):r>m+d-3&&(c.scrollLeft=r+(g?0:10)-m),c}function Dr(e,t,n){(null!=t||null!=n)&&jr(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Rr(e){jr(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?zs(t.line,t.ch-1):t,r=zs(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function jr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dn(e,t.from),r=dn(e,t.to),i=Nr(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Fr(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=$t(e,t):n="prev");var s=e.options.tabSize,a=Xi(o,t),l=Na(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(c=o.mode.indent(i,a.text.slice(u.length),a.text),c==Ta||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?Na(Xi(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var f="",p=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/s);h;--h)p+=s,f+=" ";if(c>p&&(f+=To(c-p)),f!=u)return Tr(o,f,zs(t,0),zs(t,u.length),"+input"),a.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var d=o.sel.ranges[h];if(d.head.line==t&&d.head.ch<u.length){var p=zs(t,u.length);Ct(o,h,new pt(p,p));break}}}function Wr(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Xi(e,mt(e,t)):i=eo(t),null==i?null:(r(o,i)&&e.cm&&Dn(e.cm,i,n),o)}function $r(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&Ns(o.from,Mo(r).to)<=0;){var s=r.pop();if(Ns(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}In(e,function(){for(var t=r.length-1;t>=0;t--)Tr(e.doc,"",r[t].from,r[t].to,"+delete");Rr(e)})}function Hr(e,t,n,r,i){function o(){var t=a+n;return t<e.first||t>=e.first+e.size?f=!1:(a=t,u=Xi(e,t))}function s(e){var t=(i?fs:ps)(u,l,n,!0);if(null==t){if(e||!o())return f=!1;l=i?(0>n?is:rs)(u):0>n?u.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,c=n,u=Xi(e,a),f=!0;if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var p=null,h="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;!(0>n)||s(!m);m=!1){var g=u.text.charAt(l)||"\n",v=Fo(g,d)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||m||v||(v="s"),p&&p!=v){0>n&&(n=1,s());break}if(v&&(p=v),n>0&&!s(!m))break}var b=Mt(e,zs(a,l),c,!0);return f||(b.hitSide=!0),b}function Br(e,t,n,r){var i,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(0>n?1.5:.5)*bn(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3); | ||
+ | for(;;){var l=gn(e,s,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function qr(t,n,r,i){e.defaults[t]=n,r&&(Qs[t]=i?function(e,t,n){n!=Js&&r(e,t,n)}:r)}function Ur(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Vr(e){return"string"==typeof e?aa[e]:e}function Gr(e,t,n,r,i){if(r&&r.shared)return Kr(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Pn(e.cm,Gr)(e,t,n,r,i);var o=new ha(e,i),s=Ns(t,n);if(r&&Ro(r,o,!1),s>0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ho("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(gi(e,t.line,t,n,o)||t.line!=n.line&&gi(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Os=!0}o.addToHistory&&lo(e,{from:t,to:n,origin:"markText"},e.sel,0/0);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&vi(e)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&Zi(e,0),ti(e,new Jr(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){wi(e,t)&&Zi(t,0)}),o.clearOnEnter&&Ea(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Ms=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++pa,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Nn(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)Dn(c,u,"text");o.atomic&&Pt(c.doc),Co(c,"markerAdded",c,o)}return o}function Kr(e,t,n,r,i){r=Ro(r),r.shared=!1;var o=[Gr(e,t,n,r,i)],s=o[0],a=r.widgetNode;return Ki(e,function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Gr(e,gt(e,t),gt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=Mo(o)}),new da(o,s)}function Yr(e){return e.findMarks(zs(e.first,0),e.clipPos(zs(e.lastLine())),function(e){return e.parent})}function Xr(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(Ns(o,s)){var a=Gr(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}function Qr(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];Ki(n.primary.doc,function(e){r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==Oo(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function Jr(e,t,n){this.marker=e,this.from=t,this.to=n}function Zr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function ei(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function ti(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ni(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker,a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Jr(s,o.from,l?null:o.to))}}return r}function ri(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker,a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Jr(s,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function ii(e,t){if(t.full)return null;var n=bt(e,t.from.line)&&Xi(e,t.from.line).markedSpans,r=bt(e,t.to.line)&&Xi(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==Ns(t.from,t.to),a=ni(n,i,s),l=ri(r,o,s),c=1==t.text.length,u=Mo(t.text).length+(c?i:0);if(a)for(var f=0;f<a.length;++f){var p=a[f];if(null==p.to){var h=Zr(l,p.marker);h?c&&(p.to=null==h.to?null:h.to+u):p.to=i}}if(l)for(var f=0;f<l.length;++f){var p=l[f];if(null!=p.to&&(p.to+=u),null==p.from){var h=Zr(a,p.marker);h||(p.from=u,c&&(a||(a=[])).push(p))}else p.from+=u,c&&(a||(a=[])).push(p)}a&&(a=oi(a)),l&&l!=a&&(l=oi(l));var d=[a];if(!c){var m,g=t.text.length-2;if(g>0&&a)for(var f=0;f<a.length;++f)null==a[f].to&&(m||(m=[])).push(new Jr(a[f].marker,null,null));for(var f=0;g>f;++f)d.push(m);d.push(l)}return d}function oi(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function si(e,t){var n=mo(e,t),r=ii(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function ai(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=Oo(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var c=i[l];if(!(Ns(c.to,a.from)<0||Ns(c.from,a.to)>0)){var u=[l,1],f=Ns(c.from,a.from),p=Ns(c.to,a.to);(0>f||!s.inclusiveLeft&&!f)&&u.push({from:c.from,to:a.from}),(p>0||!s.inclusiveRight&&!p)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-1}}return i}function li(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ci(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function ui(e){return e.inclusiveLeft?-1:0}function fi(e){return e.inclusiveRight?1:0}function pi(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=Ns(r.from,i.from)||ui(e)-ui(t);if(o)return-o;var s=Ns(r.to,i.to)||fi(e)-fi(t);return s?s:t.id-e.id}function hi(e,t){var n,r=Os&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||pi(n,i.marker)<0)&&(n=i.marker);return n}function di(e){return hi(e,!0)}function mi(e){return hi(e,!1)}function gi(e,t,n,r,i){var o=Xi(e,t),s=Os&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),u=Ns(c.from,n)||ui(l.marker)-ui(i),f=Ns(c.to,r)||fi(l.marker)-fi(i);if(!(u>=0&&0>=f||0>=u&&f>=0)&&(0>=u&&(Ns(c.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||u>=0&&(Ns(c.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function vi(e){for(var t;t=di(e);)e=t.find(-1,!0).line;return e}function bi(e){for(var t,n;t=mi(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function yi(e,t){var n=Xi(e,t),r=vi(n);return n==r?t:eo(r)}function xi(e,t){if(t>e.lastLine())return t;var n,r=Xi(e,t);if(!wi(e,r))return t;for(;n=mi(r);)r=n.find(1,!0).line;return eo(r)+1}function wi(e,t){var n=Os&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Si(e,t,r))return!0}}function Si(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Si(e,r.line,Zr(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Si(e,t,i))return!0}function Ci(e,t,n){no(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Dr(e,null,n)}function ki(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Ha(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),qo(t.display.measure,Ho("div",[e.node],null,n))}return e.height=e.node.offsetHeight}function _i(e,t,n,r){var i=new ma(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Wr(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!wi(e,t)){var r=no(t)<e.scrollTop;Zi(t,t.height+ki(i)),r&&Dr(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Ei(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),li(e),ci(e,n);var i=r?r(e):1;i!=e.height&&Zi(e,i)}function Ai(e){e.parent=null,li(e)}function Li(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Ii(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var r=e.innerMode(t,n);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Pi(t,n,r,i){for(var o=0;10>o;o++){i&&(i[0]=e.innerMode(t,r).mode);var s=t.token(n,r);if(n.pos>n.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ti(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?ia(s.mode,u):u}}var o,s=e.doc,a=s.mode;t=gt(s,t);var l,c=Xi(s,t.line),u=$t(e,t.line,n),f=new fa(c.text,e.options.tabSize);for(r&&(l=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=Pi(a,f,u),r&&l.push(i(!0));return r?l:i()}function Mi(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,c=0,u=null,f=new fa(t,e.options.tabSize),p=e.options.addModeClass&&[null];for(""==t&&Li(Ii(n,r),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(a=!1,s&&Ni(e,t,r,f.pos),f.pos=t.length,l=null):l=Li(Pi(n,f,r,p),o),p){var h=p[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!a||u!=l){for(;c<f.start;)c=Math.min(f.start,c+5e4),i(c,u);u=l}f.start=f.pos}for(;c<f.pos;){var d=Math.min(f.pos,c+5e4);i(d,u),c=d}}function Oi(e,t,n,r){var i=[e.state.modeGen],o={};Mi(e,t.text,e.doc.mode,n,function(e,t){i.push(e,t)},o,r);for(var s=0;s<e.state.overlays.length;++s){var a=e.state.overlays[s],l=1,c=0;Mi(e,t.text,a.mode,!0,function(e,t){for(var n=l;e>c;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zi(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=$t(e,eo(t)),i=Oi(e,t,t.text.length>e.options.maxHighlightLength?ia(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ni(e,t,n,r){var i=e.doc.mode,o=new fa(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Ii(i,n);!o.eol();)Pi(i,o,n),o.start=o.pos}function Di(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ba:va;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ri(e,t){var n=Ho("span",null,null,bs?"padding-right: .1px":null),r={pre:Ho("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(gs||bs)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,s=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Fi,Jo(e.display.measure)&&(o=ro(s))&&(r.addToken=$i(r.addToken,o)),r.map=[];var a=t!=e.display.externalMeasured&&eo(s);Bi(s,r,zi(e,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=Go(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=Go(s.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Qo(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return bs&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),La(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Go(r.pre.className,r.textClass||"")),r}function ji(e){var t=Ho("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fi(e,t,n,r,i,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,Wi):t,l=e.cm.state.specialChars,c=!1;if(l.test(t))for(var u=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var p=l.exec(t),h=p?p.index-f:t.length-f;if(h){var d=document.createTextNode(a.slice(f,f+h));u.appendChild(gs&&9>vs?Ho("span",[d]):d),e.map.push(e.pos,e.pos+h,d),e.col+=h,e.pos+=h}if(!p)break;if(f+=h+1," "==p[0]){var m=e.cm.options.tabSize,g=m-e.col%m,d=u.appendChild(Ho("span",To(g),"cm-tab"));d.setAttribute("role","presentation"),d.setAttribute("cm-text"," "),e.col+=g}else if("\r"==p[0]||"\n"==p[0]){var d=u.appendChild(Ho("span","\r"==p[0]?"\u240d":"\u2424","cm-invalidchar"));d.setAttribute("cm-text",p[0]),e.col+=1}else{var d=e.cm.options.specialCharPlaceholder(p[0]);d.setAttribute("cm-text",p[0]),u.appendChild(gs&&9>vs?Ho("span",[d]):d),e.col+=1}e.map.push(e.pos,e.pos+1,d),e.pos++}else{e.col+=t.length;var u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),gs&&9>vs&&(c=!0),e.pos+=t.length}if(n||r||i||c||s){var v=n||"";r&&(v+=r),i&&(v+=i);var b=Ho("span",[u],v,s);return o&&(b.title=o),e.content.appendChild(b)}e.content.appendChild(u)}}function Wi(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":"\xa0";return t+=" "}function $i(e,t){return function(n,r,i,o,s,a,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=0;f<t.length;f++){var p=t[f];if(p.to>c&&p.from<=c)break}if(p.to>=u)return e(n,r,i,o,s,a,l);e(n,r.slice(0,p.to-c),i,o,null,a,l),o=null,r=r.slice(p.to-c),c=p.to}}}function Hi(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Bi(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,c,u,f,p,h=i.length,d=0,m=1,g="",v=0;;){if(v==d){l=c=u=f=a="",p=null,v=1/0;for(var b=[],y=0;y<r.length;++y){var x=r[y],w=x.marker;"bookmark"==w.type&&x.from==d&&w.widgetNode?b.push(w):x.from<=d&&(null==x.to||x.to>d||w.collapsed&&x.to==d&&x.from==d)?(null!=x.to&&x.to!=d&&v>x.to&&(v=x.to,c=""),w.className&&(l+=" "+w.className),w.css&&(a=w.css),w.startStyle&&x.from==d&&(u+=" "+w.startStyle),w.endStyle&&x.to==v&&(c+=" "+w.endStyle),w.title&&!f&&(f=w.title),w.collapsed&&(!p||pi(p.marker,w)<0)&&(p=x)):x.from>d&&v>x.from&&(v=x.from)}if(p&&(p.from||0)==d){if(Hi(t,(null==p.to?h+1:p.to)-d,p.marker,null==p.from),null==p.to)return;p.to==d&&(p=!1)}if(!p&&b.length)for(var y=0;y<b.length;++y)Hi(t,0,b[y])}if(d>=h)break;for(var S=Math.min(h,v);;){if(g){var C=d+g.length;if(!p){var k=C>S?g.slice(0,S-d):g;t.addToken(t,k,s?s+l:l,u,d+k.length==v?c:"",f,a)}if(C>=S){g=g.slice(S-d),d=S;break}d=C,u=""}g=i.slice(o,o=n[m++]),s=Di(n[m++],t.cm.options)}}else for(var m=1;m<n.length;m+=2)t.addToken(t,i.slice(o,o=n[m]),Di(n[m+1],t.cm.options))}function qi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Mo(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ui(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){Ei(e,n,i,r),Co(e,"change",e,t)}function s(e,t){for(var n=e,o=[];t>n;++n)o.push(new ga(c[n],i(n),r));return o}var a=t.from,l=t.to,c=t.text,u=Xi(e,a.line),f=Xi(e,l.line),p=Mo(c),h=i(c.length-1),d=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(qi(e,t)){var m=s(0,c.length-1);o(f,f.text,h),d&&e.remove(a.line,d),m.length&&e.insert(a.line,m)}else if(u==f)if(1==c.length)o(u,u.text.slice(0,a.ch)+p+u.text.slice(l.ch),h);else{var m=s(1,c.length-1);m.push(new ga(p+u.text.slice(l.ch),h,r)),o(u,u.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+f.text.slice(l.ch),i(0)),e.remove(a.line+1,d);else{o(u,u.text.slice(0,a.ch)+c[0],i(0)),o(f,p+f.text.slice(l.ch),h);var m=s(1,c.length-1);d>1&&e.remove(a.line+1,d-1),e.insert(a.line+1,m)}Co(e,"change",e,t)}function Vi(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function Gi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}function Ki(e,t,n){function r(e,i,o){if(e.linked)for(var s=0;s<e.linked.length;++s){var a=e.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;(!n||l)&&(t(a.doc,l),r(a.doc,e,l))}}}r(e,null,!0)}function Yi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,s(e),n(e),e.options.lineWrapping||p(e),e.options.mode=t.modeOption,Nn(e)}function Xi(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Qi(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Ji(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Zi(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function eo(e){if(null==e.parent)return null;for(var t=e.parent,n=Oo(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function to(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(o>t){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;r<e.lines.length;++r){var s=e.lines[r],a=s.height;if(a>t)break;t-=a}return n+r}function no(e){e=vi(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var r=0;r<o.children.length;++r){var s=o.children[r];if(s==n)break;t+=s.height}return t}function ro(e){var t=e.order;return null==t&&(t=e.order=tl(e.text)),t}function io(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function oo(e,t){var n={from:G(t.from),to:Ys(t),text:Qi(e,t.from,t.to)};return po(e,n,t.from.line,t.to.line+1),Ki(e,function(e){po(e,n,t.from.line,t.to.line+1)},!0),n}function so(e){for(;e.length;){var t=Mo(e);if(!t.ranges)break;e.pop()}}function ao(e,t){return t?(so(e.done),Mo(e.done)):e.done.length&&!Mo(e.done).ranges?Mo(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Mo(e.done)):void 0}function lo(e,t,n,r){var i=e.history;i.undone.length=0;var o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ao(i,i.lastOp==r))){var a=Mo(o.changes);0==Ns(t.from,t.to)&&0==Ns(t.from,a.to)?a.to=Ys(t):o.changes.push(oo(e,t))}else{var l=Mo(i.done);for(l&&l.ranges||fo(e.sel,i.done),o={changes:[oo(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||La(e,"historyAdded")}function co(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function uo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||co(e,o,Mo(i.done),t))?i.done[i.done.length-1]=t:fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&so(i.undone)}function fo(e,t){var n=Mo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function po(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ho(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function mo(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(ho(n[r]));return i}function go(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?ft.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var c,u=s[l];if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&Oo(t,Number(c[1]))>-1&&(Mo(a)[f]=u[f],delete u[f])}}}return i}function vo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function bo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)vo(o.ranges[a].anchor,t,n,r),vo(o.ranges[a].head,t,n,r)}else{for(var a=0;a<o.changes.length;++a){var l=o.changes[a];if(n<l.from.line)l.from=zs(l.from.line+r,l.from.ch),l.to=zs(l.to.line+r,l.to.ch);else if(t<=l.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function yo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;bo(e.done,n,r,i),bo(e.undone,n,r,i)}function xo(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function wo(e){return e.target||e.srcElement}function So(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),As&&e.ctrlKey&&1==t&&(t=3),t}function Co(e,t){function n(e){return function(){e.apply(null,o)}}var r=e._handlers&&e._handlers[t];if(r){var i,o=Array.prototype.slice.call(arguments,2);$s?i=$s.delayedCallbacks:Ia?i=Ia:(i=Ia=[],setTimeout(ko,0));for(var s=0;s<r.length;++s)i.push(n(r[s]))}}function ko(){var e=Ia;Ia=null;for(var t=0;t<e.length;++t)e[t]()}function _o(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),La(e,n||t.type,e,t),xo(t)||t.codemirrorIgnore}function Eo(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==Oo(n,t[r])&&n.push(t[r])}function Ao(e,t){var n=e._handlers&&e._handlers[t];return n&&n.length>0}function Lo(e){e.prototype.on=function(e,t){Ea(this,e,t)},e.prototype.off=function(e,t){Aa(this,e,t)}}function Io(){this.id=null}function Po(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function To(e){for(;Da.length<=e;)Da.push(Mo(Da)+" ");return Da[e]}function Mo(e){return e[e.length-1]}function Oo(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function zo(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function No(){}function Do(e,t){var n;return Object.create?n=Object.create(e):(No.prototype=e,n=new No),t&&Ro(t,n),n}function Ro(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||n===!1&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function jo(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Fo(e,t){return t?t.source.indexOf("\\w")>-1&&Wa(e)?!0:t.test(e):Wa(e)}function Wo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function $o(e){return e.charCodeAt(0)>=768&&$a.test(e)}function Ho(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Bo(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function qo(e,t){return Bo(e).appendChild(t)}function Uo(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Vo(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Go(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Vo(n[r]).test(t)&&(t+=" "+n[r]);return t}function Ko(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function Yo(){Ga||(Xo(),Ga=!0)}function Xo(){var e;Ea(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ko(qn)},100))}),Ea(window,"blur",function(){Ko(vr)})}function Qo(e){if(null==Ba){var t=Ho("span","\u200b");qo(e,Ho("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ba=t.offsetWidth<=1&&t.offsetHeight>2&&!(gs&&8>vs))}var n=Ba?Ho("span","\u200b"):Ho("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Jo(e){if(null!=qa)return qa;var t=qo(e,document.createTextNode("A\u062eA")),n=ja(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=ja(t,1,2).getBoundingClientRect();return qa=r.right-n.right<3}function Zo(e){if(null!=Ja)return Ja;var t=qo(e,Ho("span","x")),n=t.getBoundingClientRect(),r=ja(t,0,1).getBoundingClientRect();return Ja=Math.abs(n.left-r.left)>1}function es(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function ts(e){return e.level%2?e.to:e.from}function ns(e){return e.level%2?e.from:e.to}function rs(e){var t=ro(e);return t?ts(t[0]):0}function is(e){var t=ro(e);return t?ns(Mo(t)):e.text.length}function os(e,t){var n=Xi(e.doc,t),r=vi(n);r!=n&&(t=eo(r));var i=ro(r),o=i?i[0].level%2?is(r):rs(r):0;return zs(t,o)}function ss(e,t){for(var n,r=Xi(e.doc,t);n=mi(r);)r=n.find(1,!0).line,t=null;var i=ro(r),o=i?i[0].level%2?rs(r):is(r):r.text.length;return zs(null==t?eo(r):t,o)}function as(e,t){var n=os(e,t.line),r=Xi(e.doc,n.line),i=ro(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return zs(n.line,s?0:o)}return n}function ls(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function cs(e,t){el=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return ls(e,i.level,e[n].level)?(i.from!=i.to&&(el=n),r):(i.from!=i.to&&(el=r),n);n=r}}return n}function us(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&$o(e.text.charAt(t)));return t}function fs(e,t,n,r){var i=ro(e);if(!i)return ps(e,t,n,r);for(var o=cs(i,t),s=i[o],a=us(e,t,s.level%2?-n:n,r);;){if(a>s.from&&a<s.to)return a;if(a==s.from||a==s.to)return cs(i,a)==o?a:(s=i[o+=n],n>0==s.level%2?s.to:s.from);if(s=i[o+=n],!s)return null;a=n>0==s.level%2?us(e,s.to,-1,r):us(e,s.from,1,r)}}function ps(e,t,n,r){var i=t+n;if(r)for(;i>0&&$o(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var hs=/gecko\/\d/i.test(navigator.userAgent),ds=/MSIE \d/.test(navigator.userAgent),ms=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),gs=ds||ms,vs=gs&&(ds?document.documentMode||6:ms[1]),bs=/WebKit\//.test(navigator.userAgent),ys=bs&&/Qt\/\d+\.\d+/.test(navigator.userAgent),xs=/Chrome\//.test(navigator.userAgent),ws=/Opera\//.test(navigator.userAgent),Ss=/Apple Computer/.test(navigator.vendor),Cs=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),ks=/PhantomJS/.test(navigator.userAgent),_s=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Es=_s||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),As=_s||/Mac/.test(navigator.platform),Ls=/win/i.test(navigator.platform),Is=ws&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Is&&(Is=Number(Is[1])),Is&&Is>=15&&(ws=!1,bs=!0);var Ps=As&&(ys||ws&&(null==Is||12.11>Is)),Ts=hs||gs&&vs>=9,Ms=!1,Os=!1;m.prototype=Ro({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=As&&!Cs?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){wo(e)!=t.vert&&wo(e)!=t.horiz&&Pn(t.cm,Gn)(e)};Ea(this.vert,"mousedown",n),Ea(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),g.prototype=Ro({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},g.prototype),e.scrollbarModel={"native":m,"null":g},_.prototype.signal=function(e,t){Ao(e,t)&&this.events.push(arguments)},_.prototype.finish=function(){for(var e=0;e<this.events.length;e++)La.apply(null,this.events[e])};var zs=e.Pos=function(e,t){return this instanceof zs?(this.line=e,void(this.ch=t)):new zs(e,t)},Ns=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},Ds=null;rt.prototype=Ro({init:function(e){function t(e){if(r.somethingSelected())Ds=r.getSelections(),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=Ds.join("\n"),Ra(o));else{if(!r.options.lineWiseCopyCut)return;var t=tt(r);Ds=t.text,"cut"==e.type?r.setSelections(t.ranges,null,Ma):(n.prevInput="",o.value=t.text.join("\n"),Ra(o))}"cut"==e.type&&(r.state.cutIncoming=!0)}var n=this,r=this.cm,i=this.wrapper=it(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),_s&&(o.style.width="0px"),Ea(o,"input",function(){gs&&vs>=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ea(o,"paste",function(e){return Z(e,r)?!0:(r.state.pasteIncoming=!0,void n.fastPoll())}),Ea(o,"cut",t),Ea(o,"copy",t),Ea(e.scroller,"paste",function(t){Un(e,t)||(r.state.pasteIncoming=!0,n.focus())}),Ea(e.lineSpace,"selectstart",function(t){Un(e,t)||Ca(t)}),Ea(o,"compositionstart",function(){var e=r.getCursor("from");n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ea(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=zt(e);if(e.options.moveInputWithCursor){var i=hn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qo(n.cursorDiv,e.cursors),qo(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Qa&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var s=t?"-":n||r.getSelection();this.textarea.value=s,r.state.focused&&Ra(this.textarea),gs&&vs>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",gs&&vs>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Es||Uo()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||Xa(t)&&!n&&!this.composing||Q(e)||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(gs&&vs>=9&&this.hasSelection===r||As&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1; | ||
+ | if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,r.length);s>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var a=this;return In(e,function(){J(e,r.slice(o),n.length-o,null,a.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=r,a.composing&&(a.composing.range.clear(),a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){gs&&vs>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=i.somethingSelected(),t="\u200b"+(e?s.value:"");s.value="\u21da",s.value=t,r.prevInput=e?"":"\u200b",s.selectionStart=1,s.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",s.style.cssText=u,gs&&9>vs&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!gs||gs&&9>vs)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"\u200b"==r.prevInput?Pn(i,sa.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,s=r.textarea,a=Vn(i,e),l=o.scroller.scrollTop;if(a&&!ws){var c=i.options.resetSelectionOnContextMenu;c&&-1==i.doc.sel.contains(a)&&Pn(i,At)(i.doc,dt(a),Ma);var u=s.style.cssText;if(r.wrapper.style.position="absolute",s.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(gs?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",bs)var f=window.scrollY;if(o.input.focus(),bs&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(s.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),gs&&vs>=9&&t(),Ts){_a(e);var p=function(){Aa(window,"mouseup",p),setTimeout(n,20)};Ea(window,"mouseup",p)}else setTimeout(n,50)}},setUneditable:No,needsContentAttribute:!1},rt.prototype),ot.prototype=Ro({init:function(e){function t(e){if(r.somethingSelected())Ds=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=tt(r);Ds=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ma),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!_s)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Ds.join("\n"));else{var n=it(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Ds.join("\n");var o=document.activeElement;Ra(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable="true",nt(i),Ea(i,"paste",function(e){Z(e,r)}),Ea(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),s=o.indexOf(t,Math.max(0,i.head.ch-t.length));s>-1&&s<=i.head.ch&&(n.composing.sel=dt(zs(i.head.line,s),zs(i.head.line,s+t.length)))}}),Ea(i,"compositionupdate",function(e){n.composing.data=e.data}),Ea(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ea(i,"touchstart",function(){n.forceCompositionEnd()}),Ea(i,"input",function(){n.composing||n.pollContent()||In(n.cm,function(){Nn(r)})}),Ea(i,"copy",t),Ea(i,"cut",t)},prepareSelection:function(){var e=zt(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=lt(this.cm,e.anchorNode,e.anchorOffset),r=lt(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Ns(Y(n,r),t.from())||0!=Ns(K(n,r),t.to())){var i=st(this.cm,t.from()),o=st(this.cm,t.to());if(i||o){var s=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=s[s.length-1].measure,c=l.maps?l.maps[l.maps.length-1]:l.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:s[0].measure.map[2],offset:0};try{var u=ja(i.node,i.offset,o.offset,o.node)}catch(f){}u&&(e.removeAllRanges(),e.addRange(u),a&&null==e.anchorNode?e.addRange(a):hs&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qo(this.cm.display.cursorDiv,e.cursors),qo(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ha(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():In(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=lt(t,e.anchorNode,e.anchorOffset),r=lt(t,e.focusNode,e.focusOffset);n&&r&&In(t,function(){At(t.doc,dt(n,r),Ma),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=jn(e,r.line)))var s=eo(t.view[0].line),a=t.view[0].node;else var s=eo(t.view[o].line),a=t.view[o-1].node.nextSibling;var l=jn(e,i.line);if(l==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=eo(t.view[l+1].line)-1,u=t.view[l+1].node.previousSibling;for(var f=e.doc.splitLines(ut(e,a,u,s,c)),p=Qi(e.doc,zs(s,0),zs(c,Xi(e.doc,c).text.length));f.length>1&&p.length>1;)if(Mo(f)==Mo(p))f.pop(),p.pop(),c--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),s++}for(var h=0,d=0,m=f[0],g=p[0],v=Math.min(m.length,g.length);v>h&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var b=Mo(f),y=Mo(p),x=Math.min(b.length-(1==f.length?h:0),y.length-(1==p.length?h:0));x>d&&b.charCodeAt(b.length-d-1)==y.charCodeAt(y.length-d-1);)++d;f[f.length-1]=b.slice(0,b.length-d),f[0]=f[0].slice(h);var w=zs(s,h),S=zs(c,p.length?Mo(p).length-d:0);return f.length>1||f[0]||Ns(w,S)?(Tr(e.doc,f,w,S,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){e.data&&e.data!=e.startData&&Pn(this.cm,J)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.setAttribute("contenteditable","false")},onKeyPress:function(e){e.preventDefault(),Pn(this.cm,J)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},onContextMenu:No,resetPosition:No,needsContentAttribute:!0},ot.prototype),e.inputStyles={textarea:rt,contenteditable:ot},ft.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=Ns(n.anchor,r.anchor)||0!=Ns(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new pt(G(this.ranges[t].anchor),G(this.ranges[t].head));return new ft(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Ns(t,r.from())>=0&&Ns(e,r.to())<=0)return n}return-1}},pt.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Rs,js,Fs,Ws={left:0,right:0,top:0,bottom:0},$s=null,Hs=0,Bs=0,qs=0,Us=null;gs?Us=-.53:hs?Us=15:xs?Us=-.7:Ss&&(Us=-1/3);var Vs=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Vs(e);return t.x*=Us,t.y*=Us,t};var Gs=new Io,Ks=null,Ys=e.changeEnd=function(e){return e.text?zs(e.from.line+e.text.length-1,Mo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Qs.hasOwnProperty(e)&&Pn(this,Qs[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Vr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Tn(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:r,modeSpec:t,opaque:n&&n.opaque}),this.state.modeGen++,Nn(this)}),removeOverlay:Tn(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Nn(this)}}),indentLine:Tn(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),bt(this.doc,e)&&Fr(this,e,t,n)}),indentSelection:Tn(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Fr(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;n>l;++l)Fr(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Ct(this.doc,r,new pt(o,c[r].to()),Ma)}}}),getTokenAt:function(e,t){return Ti(this,e,t)},getLineTokens:function(e,t){return Ti(this,zs(e),t,!0)},getTokenTypeAt:function(e){e=gt(this.doc,e);var t,n=zi(this,Xi(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("cm-overlay "):-1;return 0>a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!ra.hasOwnProperty(t))return n;var r=ra[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var s=r[i[t][o]];s&&n.push(s)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var o=0;o<r._global.length;o++){var a=r._global[o];a.pred(i,this)&&-1==Oo(n,a.val)&&n.push(a.val)}return n},getStateAfter:function(e,t){var n=this.doc;return e=mt(n,null==e?n.first+n.size-1:e),$t(this,e+1,t)},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?gt(this.doc,e):e?r.from():r.to(),hn(this,n,t||"page")},charCoords:function(e,t){return pn(this,gt(this.doc,e),t||"page")},coordsChar:function(e,t){return e=fn(this,e,t||"page"),gn(this,e.left,e.top)},lineAtHeight:function(e,t){return e=fn(this,{top:e,left:0},t||"page").top,to(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n,r=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Xi(this.doc,e)}else n=e;return un(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-no(n):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return yn(this.display)},setGutterMarker:Tn(function(e,t,n){return Wr(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Wo(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Tn(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Dn(t,r,"gutter"),Wo(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!bt(this.doc,e))return null;var t=e;if(e=Xi(this.doc,e),!e)return null}else{var t=eo(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=hn(this,gt(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&zr(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Tn(fr),triggerOnKeyPress:Tn(dr),triggerOnKeyUp:hr,execCommand:function(e){return sa.hasOwnProperty(e)?sa[e].call(null,this):void 0},triggerElectric:Tn(function(e){et(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,s=gt(this.doc,e);t>o&&(s=Hr(this.doc,s,i,n,r),!s.hitSide);++o);return s},moveH:Tn(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Hr(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},za)}),deleteH:Tn(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):$r(this,function(n){var i=Hr(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var s=0,a=gt(this.doc,e);t>s;++s){var l=hn(this,a,"div");if(null==o?o=l.left:l.left=o,a=Br(this,l,i,n),a.hitSide)break}return a},moveV:Tn(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=hn(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=Br(n,a,e,t);return"page"==t&&s==r.sel.primary()&&Dr(n,null,pn(n,l,"div").top-a.top),l},za),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]}),findWordAt:function(e){var t=this.doc,n=Xi(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==n.length)&&r?--r:++i;for(var s=n.charAt(r),a=Fo(s,o)?function(e){return Fo(e,o)}:/\s/.test(s)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Fo(e)};r>0&&a(n.charAt(r-1));)--r;for(;i<n.length&&a(n.charAt(i));)++i}return new pt(zs(e.line,r),zs(e.line,i))},toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?Va(this.display.cursorDiv,"CodeMirror-overwrite"):Ua(this.display.cursorDiv,"CodeMirror-overwrite"),La(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Uo()},scrollTo:Tn(function(e,t){(null!=e||null!=t)&&jr(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ut(this)-this.display.barHeight,width:e.scrollWidth-Ut(this)-this.display.barWidth,clientHeight:Gt(this),clientWidth:Vt(this)}},scrollIntoView:Tn(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:zs(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)jr(this),this.curOp.scrollToPos=e;else{var n=Nr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:Tn(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(r.display.wrapper.style.width=n(e)),null!=t&&(r.display.wrapper.style.height=n(t)),r.options.lineWrapping&&sn(this);var i=r.display.viewFrom;r.doc.iter(i,r.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Dn(r,i,"widget");break}++i}),r.curOp.forceUpdate=!0,La(r,"refresh",this)}),operation:function(e){return In(this,e)},refresh:Tn(function(){var e=this.display.cachedTextHeight;Nn(this),this.curOp.forceUpdate=!0,an(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),u(this),(null==e||Math.abs(e-bn(this.display))>.5)&&s(this),La(this,"refresh",this)}),swapDoc:Tn(function(e){var t=this.doc;return t.cm=null,Yi(this,e),an(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Co(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Lo(e);var Xs=e.defaults={},Qs=e.optionHandlers={},Js=e.Init={toString:function(){return"CodeMirror.Init"}};qr("value","",function(e,t){e.setValue(t)},!0),qr("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),qr("indentUnit",2,n,!0),qr("indentWithTabs",!1),qr("smartIndent",!0),qr("tabSize",4,function(e){r(e),an(e),Nn(e)},!0),qr("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(zs(r,o))}r++});for(var i=n.length-1;i>=0;i--)Tr(e.doc,t,n[i],zs(n[i].line,n[i].ch+t.length))}}),qr("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),qr("specialCharPlaceholder",ji,function(e){e.refresh()},!0),qr("electricChars",!0),qr("inputStyle",Es?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),qr("rtlMoveVisually",!Ls),qr("wholeLineUpdateBefore",!0),qr("theme","default",function(e){a(e),l(e)},!0),qr("keyMap","default",function(t,n,r){var i=Vr(n),o=r!=e.Init&&Vr(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),qr("extraKeys",null),qr("lineWrapping",!1,i,!0),qr("gutters",[],function(e){h(e.options),l(e)},!0),qr("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?k(e.display)+"px":"0",e.refresh()},!0),qr("coverGutterNextToScrollbar",!1,function(e){b(e)},!0),qr("scrollbarStyle","native",function(e){v(e),b(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),qr("lineNumbers",!1,function(e){h(e.options),l(e)},!0),qr("firstLineNumber",1,l,!0),qr("lineNumberFormatter",function(e){return e},l,!0),qr("showCursorWhenSelecting",!1,Ot,!0),qr("resetSelectionOnContextMenu",!0),qr("lineWiseCopyCut",!0),qr("readOnly",!1,function(e,t){"nocursor"==t?(vr(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||e.display.input.reset())}),qr("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),qr("dragDrop",!0,Bn),qr("cursorBlinkRate",530),qr("cursorScrollMargin",0),qr("cursorHeight",1,Ot,!0),qr("singleCursorHeightPerLine",!0,Ot,!0),qr("workTime",100),qr("workDelay",100),qr("flattenSpans",!0,r,!0),qr("addModeClass",!1,r,!0),qr("pollInterval",100),qr("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),qr("historyEventDelay",1250),qr("viewportMargin",10,function(e){e.refresh()},!0),qr("maxHighlightLength",1e4,r,!0),qr("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),qr("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),qr("autofocus",null);var Zs=e.modes={},ea=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Zs[t]=n},e.defineMIME=function(e,t){ea[e]=t},e.resolveMode=function(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var n=ea[t.name];"string"==typeof n&&(n={name:n}),t=Do(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=Zs[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(ta.hasOwnProperty(n.name)){var o=ta[n.name];for(var s in o)o.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=o[s])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var s in n.modeProps)i[s]=n.modeProps[s];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ta=e.modeExtensions={};e.extendMode=function(e,t){var n=ta.hasOwnProperty(e)?ta[e]:ta[e]={};Ro(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){xa.prototype[e]=t},e.defineOption=qr;var na=[];e.defineInitHook=function(e){na.push(e)};var ra=e.helpers={};e.registerHelper=function(t,n,r){ra.hasOwnProperty(t)||(ra[t]=e[t]={_global:[]}),ra[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),ra[t]._global.push({pred:r,val:i})};var ia=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},oa=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var sa=e.commands={selectAll:function(e){e.setSelection(zs(e.firstLine(),0),zs(e.lastLine()),Ma)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ma)},killLine:function(e){$r(e,function(t){if(t.empty()){var n=Xi(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:zs(t.head.line+1,0)}:{from:t.head,to:zs(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){$r(e,function(t){return{from:zs(t.from().line,0),to:gt(e.doc,zs(t.to().line+1,0))}})},delLineLeft:function(e){$r(e,function(e){return{from:zs(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){$r(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){$r(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(zs(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(zs(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return os(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return as(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return ss(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},za)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},za)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?as(e,t.head):r},za)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=Na(e.getLine(o.line),o.ch,r);t.push(new Array(r-s%r+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){In(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=Xi(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new zs(i.line,i.ch-1)),i.ch>0)i=new zs(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),zs(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Xi(e.doc,i.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),zs(i.line-1,s.length-1),zs(i.line,1),"+transpose")}n.push(new pt(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){In(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),Rr(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},aa=e.keyMap={};aa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},aa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},aa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},aa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},aa["default"]=As?aa.macDefault:aa.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=zo(n.split(" "),Ur),o=0;o<i.length;o++){var s,a;o==i.length-1?(a=i.join(" "),s=r):(a=i.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var c in t)e[c]=t[c];return e};var la=e.lookupKey=function(e,t,n,r){t=Vr(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return la(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=la(e,t.fallthrough[o],n,r);if(s)return s}}},ca=e.isModifierKey=function(e){var t="string"==typeof e?e:Za[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},ua=e.keyName=function(e,t){if(ws&&34==e.keyCode&&e["char"])return!1;var n=Za[e.keyCode],r=n;return null==r||e.altGraphKey?!1:(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(Ps?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(Ps?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};e.fromTextArea=function(t,n){function r(){t.value=c.getValue()}if(n=n?Ro(n):{},n.value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var i=Uo();n.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(Ea(t.form,"submit",r),!n.leaveSubmitMethodAlone)){var o=t.form,s=o.submit;try{var a=o.submit=function(){r(),o.submit=s,o.submit(),o.submit=a}}catch(l){}}n.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Aa(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=s))}},t.style.display="none";var c=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return c};var fa=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};fa.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else var n=t&&(e.test?e.test(t):e(t));return n?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos; | ||
+ | return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Na(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Na(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Na(this.string,null,this.tabSize)-(this.lineStart?Na(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var pa=0,ha=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++pa};Lo(ha),ha.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xn(e),Ao(this,"clear")){var n=this.find();n&&Co(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Zr(s.markedSpans,this);e&&!this.collapsed?Dn(e,eo(s),"text"):e&&(null!=a.to&&(i=eo(s)),null!=a.from&&(r=eo(s))),s.markedSpans=ei(s.markedSpans,a),null==a.from&&this.collapsed&&!wi(this.doc,s)&&e&&Zi(s,bn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var l=vi(this.lines[o]),c=f(l);c>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Nn(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Pt(e.doc)),e&&Co(e,"markerCleared",e,this),t&&Sn(e),this.parent&&this.parent.clear()}},ha.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],s=Zr(o.markedSpans,this);if(null!=s.from&&(n=zs(t?o:eo(o),s.from),-1==e))return n;if(null!=s.to&&(r=zs(t?o:eo(o),s.to),1==e))return r}return n&&{from:n,to:r}},ha.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&In(n,function(){var r=e.line,i=eo(e.line),o=Jt(n,i);if(o&&(on(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!wi(t.doc,r)&&null!=t.height){var s=t.height;t.height=null;var a=ki(t)-s;a&&Zi(r,r.height+a)}})},ha.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=Oo(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ha.prototype.detachLine=function(e){if(this.lines.splice(Oo(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var pa=0,da=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Lo(da),da.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Co(this,"clear")}},da.prototype.find=function(e,t){return this.primary.find(e,t)};var ma=e.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Lo(ma),ma.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=eo(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=ki(this);Zi(n,Math.max(0,n.height-o)),e&&In(e,function(){Ci(e,n,-o),Dn(e,r,"widget")})}},ma.prototype.changed=function(){var e=this.height,t=this.doc.cm,n=this.line;this.height=null;var r=ki(this)-e;r&&(Zi(n,n.height+r),t&&In(t,function(){t.curOp.forceUpdate=!0,Ci(t,n,r)}))};var ga=e.Line=function(e,t,n){this.text=e,ci(this,t),this.height=n?n(this):1};Lo(ga),ga.prototype.lineNo=function(){return eo(this)};var va={},ba={};Vi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;r>n;++n){var i=this.lines[n];this.height-=i.height,Ai(i),Co(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;r>e;++e)if(n(this.lines[e]))return!0}},Gi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(i>e){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Vi))){var a=[];this.collapse(a),this.children=[new Vi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(o>=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var s=i.lines.splice(i.lines.length-25,25),a=new Vi(s);i.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Gi(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Oo(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Gi(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(o>e){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var ya=0,xa=e.Doc=function(e,t,n,r){if(!(this instanceof xa))return new xa(e,t,n,r);null==n&&(n=0),Gi.call(this,[new Vi([new ga("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=zs(n,0);this.sel=dt(i),this.history=new io(null),this.id=++ya,this.modeOption=t,this.lineSep=r,"string"==typeof e&&(e=this.splitLines(e)),Ui(this,{from:i,to:i,text:e}),At(this,dt(i),Ma)};xa.prototype=Do(Gi.prototype,{constructor:xa,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ji(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Mn(function(e){var t=zs(this.first,0),n=this.first+this.size-1;_r(this,{from:t,to:zs(n,Xi(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),At(this,dt(t))}),replaceRange:function(e,t,n,r){t=gt(this,t),n=n?gt(this,n):t,Tr(this,e,t,n,r)},getRange:function(e,t,n){var r=Qi(this,gt(this,e),gt(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return bt(this,e)?Xi(this,e):void 0},getLineNumber:function(e){return eo(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Xi(this,e)),vi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return gt(this,e)},getCursor:function(e){var t,n=this.sel.primary();return t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||e===!1?n.to():n.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mn(function(e,t,n){kt(this,gt(this,"number"==typeof e?zs(e,t||0):e),null,n)}),setSelection:Mn(function(e,t,n){kt(this,gt(this,e),gt(this,t||e),n)}),extendSelection:Mn(function(e,t,n){wt(this,gt(this,e),t&>(this,t),n)}),extendSelections:Mn(function(e,t){St(this,yt(this,e,t))}),extendSelectionsBy:Mn(function(e,t){St(this,zo(this.sel.ranges,e),t)}),setSelections:Mn(function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new pt(gt(this,e[r].anchor),gt(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),At(this,ht(i,t),n)}}),addSelection:Mn(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new pt(gt(this,e),gt(this,t||e))),At(this,ht(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Qi(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Qi(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Mn(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&Cr(this,r,t),o=r.length-1;o>=0;o--)_r(this,r[o]);a?Et(this,a):this.cm&&Rr(this.cm)}),undo:Mn(function(){Ar(this,"undo")}),redo:Mn(function(){Ar(this,"redo")}),undoSelection:Mn(function(){Ar(this,"undo",!0)}),redoSelection:Mn(function(){Ar(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new io(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:go(this.history.done),undone:go(this.history.undone)}},setHistory:function(e){var t=this.history=new io(this.history.maxGeneration);t.done=go(e.done.slice(0),null,!0),t.undone=go(e.undone.slice(0),null,!0)},addLineClass:Mn(function(e,t,n){return Wr(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(Vo(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0})}),removeLineClass:Mn(function(e,t,n){return Wr(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(Vo(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0})}),addLineWidget:Mn(function(e,t,n){return _i(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Gr(this,gt(this,e),gt(this,t),n,"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=gt(this,e),Gr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=gt(this,e);var t=[],n=Xi(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=gt(this,e),t=gt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];i==e.line&&e.ch>l.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first;return this.iter(function(r){var i=r.text.length+1;return i>e?(t=e,!0):(e-=i,void++n)}),gt(this,zs(n,t))},indexFromPos:function(e){e=gt(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new xa(Ji(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new xa(Ji(this,t,n),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Xr(r,Yr(this)),r},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var r=this.linked[n];if(r.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),Qr(Yr(this));break}}if(t.history==this.history){var i=[t.id];Ki(t,function(e){i.push(e.id)},!0),t.history=new io(null),t.history.done=go(this.history.done,i),t.history.undone=go(this.history.undone,i)}},iterLinkedDocs:function(e){Ki(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ya(e)},lineSeparator:function(){return this.lineSep||"\n"}}),xa.prototype.eachLine=xa.prototype.iter;var wa="iter insert remove copy getEditor constructor".split(" ");for(var Sa in xa.prototype)xa.prototype.hasOwnProperty(Sa)&&Oo(wa,Sa)<0&&(e.prototype[Sa]=function(e){return function(){return e.apply(this.doc,arguments)}}(xa.prototype[Sa]));Lo(xa);var Ca=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},ka=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},_a=e.e_stop=function(e){Ca(e),ka(e)},Ea=e.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={}),i=r[t]||(r[t]=[]);i.push(n)}},Aa=e.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers&&e._handlers[t];if(!r)return;for(var i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}}},La=e.signal=function(e,t){var n=e._handlers&&e._handlers[t];if(n)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Ia=null,Pa=30,Ta=e.Pass={toString:function(){return"CodeMirror.Pass"}},Ma={scroll:!1},Oa={origin:"*mouse"},za={origin:"+move"};Io.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Na=e.countColumn=function(e,t,n,r,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=r||0,s=i||0;;){var a=e.indexOf(" ",o);if(0>a||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}},Da=[""],Ra=function(e){e.select()};_s?Ra=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:gs&&(Ra=function(e){try{e.select()}catch(t){}});var ja,Fa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Wa=e.isWordChar=function(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Fa.test(e))},$a=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;ja=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ha=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};gs&&11>vs&&(Uo=function(){try{return document.activeElement}catch(e){return document.body}});var Ba,qa,Ua=e.rmClass=function(e,t){var n=e.className,r=Vo(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Va=e.addClass=function(e,t){var n=e.className;Vo(t).test(n)||(e.className+=(n?" ":"")+t)},Ga=!1,Ka=function(){if(gs&&9>vs)return!1;var e=Ho("div");return"draggable"in e||"dragDrop"in e}(),Ya=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Xa=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Qa=function(){var e=Ho("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ja=null,Za={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Za,function(){for(var e=0;10>e;e++)Za[e+48]=Za[e+96]=String(e);for(var e=65;90>=e;e++)Za[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Za[e+111]=Za[e+63235]="F"+e}();var el,tl=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!i.test(n))return!1;for(var r,u=n.length,f=[],p=0;u>p;++p)f.push(r=e(n.charCodeAt(p)));for(var p=0,h=c;u>p;++p){var r=f[p];"m"==r?f[p]=h:h=r}for(var p=0,d=c;u>p;++p){var r=f[p];"1"==r&&"r"==d?f[p]="n":s.test(r)&&(d=r,"r"==r&&(f[p]="R"))}for(var p=1,h=f[0];u-1>p;++p){var r=f[p];"+"==r&&"1"==h&&"1"==f[p+1]?f[p]="1":","!=r||h!=f[p+1]||"1"!=h&&"n"!=h||(f[p]=h),h=r}for(var p=0;u>p;++p){var r=f[p];if(","==r)f[p]="N";else if("%"==r){for(var m=p+1;u>m&&"%"==f[m];++m);for(var g=p&&"!"==f[p-1]||u>m&&"1"==f[m]?"1":"N",v=p;m>v;++v)f[v]=g;p=m-1}}for(var p=0,d=c;u>p;++p){var r=f[p];"L"==d&&"1"==r?f[p]="L":s.test(r)&&(d=r)}for(var p=0;u>p;++p)if(o.test(f[p])){for(var m=p+1;u>m&&o.test(f[m]);++m);for(var b="L"==(p?f[p-1]:c),y="L"==(u>m?f[m]:c),g=b||y?"L":"R",v=p;m>v;++v)f[v]=g;p=m-1}for(var x,w=[],p=0;u>p;)if(a.test(f[p])){var S=p;for(++p;u>p&&a.test(f[p]);++p);w.push(new t(0,S,p))}else{var C=p,k=w.length;for(++p;u>p&&"L"!=f[p];++p);for(var v=C;p>v;)if(l.test(f[v])){v>C&&w.splice(k,0,new t(1,C,v));var _=v;for(++v;p>v&&l.test(f[v]);++v);w.splice(k,0,new t(2,_,v)),C=v}else++v;p>C&&w.splice(k,0,new t(1,C,p))}return 1==w[0].level&&(x=n.match(/^\s+/))&&(w[0].from=x[0].length,w.unshift(new t(0,0,x[0].length))),1==Mo(w).level&&(x=n.match(/\s+$/))&&(Mo(w).to-=x[0].length,w.push(new t(0,u-x[0].length,u))),2==w[0].level&&w.unshift(new t(1,w[0].to,w[0].to)),w[0].level!=Mo(w).level&&w.push(new t(w[0].level,u,u)),w}}();return e.version="5.6.0",e}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),r=[],l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var c=n[l].head,u=t.getTokenAt(c),f=e.innerMode(t.getMode(),u.state),p=f.state;if("xml"!=f.mode.name||!p.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),d="html"==f.mode.configuration,m="object"==typeof h&&h.dontCloseTags||d&&s,g="object"==typeof h&&h.indentTags||d&&a,v=p.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var b=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==p.type||u.string.indexOf("/")==u.string.length-1||m&&i(m,b)>-1||o(t,v,c,p,!0))return e.Pass;var y=g&&i(g,b)>-1;r[l]={indent:y,text:">"+(y?"\n\n":"")+"</"+v+">",newPos:y?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var l=n.length-1;l>=0;l--){var x=r[l];t.replaceRange(x.text,n[l].head,n[l].anchor,"+insert");var w=t.listSelections().slice(0);w[l]={head:x.newPos,anchor:x.newPos},t.setSelections(w),x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function n(t,n){for(var r=t.listSelections(),i=[],s=n?"/":"</",a=0;a<r.length;a++){if(!r[a].empty())return e.Pass;var l=r[a].head,c=t.getTokenAt(l),u=e.innerMode(t.getMode(),c.state),f=u.state;if(n&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=l.ch-1))return e.Pass;var p;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)p=s+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;p=s+"style"}else{if(!f.context||!f.context.tagName||o(t,f.context.tagName,l,f))return e.Pass;p=s+f.context.tagName}">"!=t.getLine(l.line).charAt(c.end)&&(p+=">"),i[a]=p}t.replaceSelections(i),r=t.listSelections();for(var a=0;a<r.length;a++)(a==r.length-1||r[a].head.line<r[a+1].head.line)&&t.indentLine(r[a].head.line)}function r(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;r>n;++n)if(e[n]==t)return n;return-1}function o(t,n,r,i,o){if(!e.scanForClosingTag)return!1;var s=Math.min(t.lastLine()+1,r.line+500),a=e.scanForClosingTag(t,r,null,s);if(!a||a.tag!=n)return!1;for(var l=i.context,c=o?1:0;l&&l.tagName==n;l=l.prev)++c;r=a.to;for(var u=1;c>u;u++){var f=e.scanForClosingTag(t,r,null,s);if(!f||f.tag!=n)return!1;r=f.to}return!0}e.defineOption("autoCloseTags",!1,function(n,i,o){if(o!=e.Init&&o&&n.removeKeyMap("autoCloseTags"),i){var s={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(s["'/'"]=function(e){return r(e)}),("object"!=typeof i||i.whenOpening)&&(s["'>'"]=function(e){return t(e)}),n.addKeyMap(s)}});var s=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],a=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);return n&&n.index==t.pos?(t.pos+=n[0].length,"searching"):void(n?t.pos=n.index:t.skipToEnd())}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,i(t))}function s(e,t,n,r){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){d(e)}})}function a(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0}):i(prompt(n,r))}function l(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function c(e){return e.replace(/\\(.)/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":t})}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(n){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function p(t,n,i){var o=r(t);if(o.query)return h(t,n);var l=t.getSelection()||o.lastQuery;i&&t.openDialog?s(t,g,l,function(n,r){e.e_stop(r),n&&(n!=o.queryText&&f(t,o,n),h(t,r.shiftKey))}):a(t,g,"Search for:",l,function(e){e&&!o.query&&t.operation(function(){f(t,o,e),o.posFrom=o.posTo=t.getCursor(),h(t,n)})})}function h(t,n){t.operation(function(){var i=r(t),s=o(t,i.query,n?i.posFrom:i.posTo);(s.find(n)||(s=o(t,i.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),s.find(n)))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),i.posFrom=s.from(),i.posTo=s.to())})}function d(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function m(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery;a(e,v,"Replace:",n,function(n){n&&(n=u(n),a(e,b,"Replace with:","",function(r){if(r=c(r),t)e.operation(function(){for(var t=o(e,n);t.findNext();)if("string"!=typeof n){var i=e.getRange(t.from(),t.to()).match(n);t.replace(r.replace(/\$(\d)/g,function(e,t){return i[t]}))}else t.replace(r)});else{d(e);var i=o(e,n,e.getCursor()),s=function(){var t,r=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||r&&i.from().line==r.line&&i.from().ch==r.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),l(e,y,"Replace?",[function(){a(t)},s]))},a=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),s()};s()}}))})}}var g='Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',v='Replace: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',b='With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',y="Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";e.commands.find=function(e){d(e),p(e)},e.commands.findPersistent=function(e){d(e),p(e,!1,!0)},e.commands.findNext=p,e.commands.findPrev=function(e){p(e,!0)},e.commands.clearSearch=d,e.commands.replace=m,e.commands.replaceAll=function(e){m(e,!0)}}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),i=i?e.clipPos(i):r(0,0),this.pos={from:i,to:i},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,s,a=e.getLine(i.line).slice(0,i.ch),l=0;;){t.lastIndex=l;var c=t.exec(a);if(!c)break;if(o=c,s=o.index,l=o.index+(o[0].length||1),l==a.length)break}var u=o&&o[0].length||0;u||(0==s&&0==a.length?o=void 0:s!=e.getLine(i.line).length&&u++)}else{t.lastIndex=i.ch;var a=e.getLine(i.line),o=t.exec(a),u=o&&o[0].length||0,s=o&&o.index;s+u==a.length||u||(u=1)}return o&&u?{from:r(i.line,s),to:r(i.line,s+u),match:o}:void 0};else{var s=t;o&&(t=t.toLowerCase());var a=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)this.matches=t.length?function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch),c=a(l),u=c.lastIndexOf(t);if(u>-1)return u=n(l,c,u),{from:r(o.line,u),to:r(o.line,u+s.length)}}else{var l=e.getLine(o.line).slice(o.ch),c=a(l),u=c.indexOf(t);if(u>-1)return u=n(l,c,u)+o.ch,{from:r(o.line,u),to:r(o.line,u+s.length)}}}:function(){};else{var c=s.split("\n");this.matches=function(t,n){var i=l.length-1;if(t){if(n.line-(l.length-1)<e.firstLine())return;if(a(e.getLine(n.line).slice(0,c[i].length))!=l[l.length-1])return;for(var o=r(n.line,c[i].length),s=n.line-1,u=i-1;u>=1;--u,--s)if(l[u]!=a(e.getLine(s)))return;var f=e.getLine(s),p=f.length-c[0].length;if(a(f.slice(p))!=l[0])return;return{from:r(s,p),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var f=e.getLine(n.line),p=f.length-c[0].length;if(a(f.slice(p))==l[0]){for(var h=r(n.line,p),s=n.line+1,u=1;i>u;++u,++s)if(l[u]!=a(e.getLine(s)))return;if(a(e.getLine(s).slice(0,c[i].length))==l[i])return{from:h,to:r(s,c[i].length)}}}}}}}function n(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(n>i)++r;else{if(!(i>n))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)}),e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,n){var r,i=e.getWrapperElement();return r=i.appendChild(document.createElement("div")),r.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),r}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(r,i,o){function s(e){if("string"==typeof e)f.value=e;else{if(c)return;c=!0,l.parentNode.removeChild(l),u.focus(),o.onClose&&o.onClose(l)}}o||(o={}),n(this,null);var a,l=t(this,r,o.bottom),c=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(o.value&&(f.value=o.value,o.selectValueOnOpen!==!1&&f.select()),o.onInput&&e.on(f,"input",function(e){o.onInput(e,f.value,s)}),o.onKeyUp&&e.on(f,"keyup",function(e){o.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,s)||((27==t.keyCode||o.closeOnEnter!==!1&&13==t.keyCode)&&(f.blur(),e.e_stop(t),s()),13==t.keyCode&&i(f.value,t))}),o.closeOnBlur!==!1&&e.on(f,"blur",s),f.focus()):(a=l.getElementsByTagName("button")[0])&&(e.on(a,"click",function(){s(),u.focus()}),o.closeOnBlur!==!1&&e.on(a,"blur",s),a.focus()),s}),e.defineExtension("openConfirm",function(r,i,o){function s(){c||(c=!0,a.parentNode.removeChild(a),u.focus())}n(this,null);var a=t(this,r,o&&o.bottom),l=a.getElementsByTagName("button"),c=!1,u=this,f=1;l[0].focus();for(var p=0;p<l.length;++p){var h=l[p];!function(t){e.on(h,"click",function(n){e.e_preventDefault(n),s(),t&&t(u)})}(i[p]),e.on(h,"blur",function(){--f,setTimeout(function(){0>=f&&s()},200)}),e.on(h,"focus",function(){++f})}}),e.defineExtension("openNotification",function(r,i){function o(){l||(l=!0,clearTimeout(s),a.parentNode.removeChild(a))}n(this,o);var s,a=t(this,r,i&&i.bottom),l=!1,c=i&&"undefined"!=typeof i.duration?i.duration:5e3;return e.on(a,"click",function(t){e.e_preventDefault(t),o()}),c&&(s=setTimeout(o,c)),o})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),l=t.ch-1,c=l>=0&&a[o.text.charAt(l)]||a[o.text.charAt(++l)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(r&&u>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(s(t.line,l+1)),p=n(e,s(t.line,l+(u>0?1:0)),u,f||null,i);return null==p?null:{from:s(t.line,l),to:p&&p.pos,match:p&&p.ch==c.charAt(0),forward:u>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=f;p+=n){var h=e.getLine(p);if(h){var d=n>0?0:h.length-1,m=n>0?h.length:-1;if(!(h.length>o))for(p==t.line&&(d=t.ch-(0>n?1:0));d!=m;d+=n){var g=h.charAt(d);if(u.test(g)&&(void 0===r||e.getTokenTypeAt(s(p,d+1))==r)){var v=a[g];if(">"==v.charAt(1)==n>0)c.push(g);else{if(!c.length)return{pos:s(p,d),ch:g};c.pop()}}}}}return p-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),c=0;c<l.length;c++){var u=l[c].empty()&&t(e,l[c].head,!1,r);if(u&&e.getLine(u.from.line).length<=i){var f=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(u.from,s(u.from.line,u.from.ch+1),{className:f})),u.to&&e.getLine(u.to.line).length<=i&&a.push(e.markText(u.to,s(u.to.line,u.to.ch+1),{className:f}))}}if(a.length){o&&e.state.focused&&e.focus();var p=function(){e.operation(function(){for(var e=0;e<a.length;e++)a[e].clear()})};if(!n)return p;setTimeout(p,800)}}function i(e){e.operation(function(){l&&(l(),l=null),l=r(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),s=e.Pos,a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:u[t]}function n(e){return function(t){return s(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),s=n.listSelections(),a=0;a<s.length;a++){if(!s[a].empty())return e.Pass;var c=l(n,s[a].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(var a=s.length-1;a>=0;a--){var u=s[a].head;n.replaceRange("",f(u.line,u.ch-1),f(u.line,u.ch+1))}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var s=n.listSelections(),a=0;a<s.length;a++){if(!s[a].empty())return e.Pass;var c=l(n,s[a].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}n.operation(function(){n.replaceSelection("\n\n",null),n.execCommand("goCharLeft"),s=n.listSelections();for(var e=0;e<s.length;e++){var t=s[e].head.line;n.indentLine(t,null,!0),n.indentLine(t+1,null,!0)}})}function s(n,i){var o=r(n);if(!o||n.getOption("disableInput"))return e.Pass;var s=t(o,"pairs"),l=s.indexOf(i);if(-1==l)return e.Pass;for(var u,p,h=t(o,"triples"),d=s.charAt(l+1)==i,m=n.listSelections(),g=l%2==0,v=0;v<m.length;v++){var b,y=m[v],x=y.head,p=n.getRange(x,f(x.line,x.ch+1));if(g&&!y.empty())b="surround";else if(!d&&g||p!=i)if(d&&x.ch>1&&h.indexOf(i)>=0&&n.getRange(f(x.line,x.ch-2),x)==i+i&&(x.ch<=2||n.getRange(f(x.line,x.ch-3),f(x.line,x.ch-2))!=i))b="addFour";else if(d){if(e.isWordChar(p)||!c(n,x,i))return e.Pass;b="both"}else{if(!g||n.getLine(x.line).length!=x.ch&&!a(p,s)&&!/\s/.test(p))return e.Pass;b="both"}else b=h.indexOf(i)>=0&&n.getRange(x,f(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var w=l%2?s.charAt(l-1):i,S=l%2?i:s.charAt(l+1);n.operation(function(){if("skip"==u)n.execCommand("goCharRight");else if("skipThree"==u)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==u){for(var t=n.getSelections(),e=0;e<t.length;e++)t[e]=w+t[e]+S;n.replaceSelections(t,"around")}else"both"==u?(n.replaceSelection(w+S,null),n.triggerElectric(w+S),n.execCommand("goCharLeft")):"addFour"==u&&(n.replaceSelection(w+w+w+w,"before"),n.execCommand("goCharRight"))})}function a(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function l(e,t){var n=e.getRange(f(t.line,t.ch-1),f(t.line,t.ch+1));return 2==n.length?n:null}function c(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var s=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(s.pos=s.start=o.start;;){var a=t.getMode().token(s,o.state);if(s.pos>=n.ch+1)return/\bstring2?\b/.test(a);s.start=s.pos}}var u={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},f=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(h),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(h))});for(var p=u.pairs+"`",h={Backspace:i,Enter:o},d=0;d<p.length;d++)h["'"+p.charAt(d)+"'"]=n(p.charAt(d))}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,i,o,s){function a(e){var n=l(t,i);if(!n||n.to.line-n.from.line<c)return null;for(var r=t.findMarksAt(n.from),o=0;o<r.length;++o)if(r[o].__isFold&&"fold"!==s){if(!e)return null;n.cleared=!0,r[o].clear()}return n}if(o&&o.call){var l=o;o=null}else var l=r(t,o,"rangeFinder");"number"==typeof i&&(i=e.Pos(i,0));var c=r(t,o,"minFoldSize"),u=a(!0);if(r(t,o,"scanUp"))for(;!u&&i.line>t.firstLine();)i=e.Pos(i.line-1,0),u=a(!1);if(u&&!u.cleared&&"unfold"!==s){var f=n(t,o);e.on(f,"mousedown",function(t){p.clear(),e.e_preventDefault(t)});var p=t.markText(u.from,u.to,{replacedWith:f,clearOnEnter:!0,__isFold:!0});p.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)}),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);n=document.createElement("span"),n.appendChild(i),n.className="CodeMirror-foldmarker"}return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:i[n]}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}});var i={rangeFinder:e.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return r(this,e,t)})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return e===!0&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function r(e,t){for(var n=e.findMarksAt(f(t)),r=0;r<n.length;++r)if(n[r].__isFold&&n[r].find().from.line==t)return n[r]}function i(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,t,n){var o=e.state.foldGutter.options,s=t,a=e.foldOption(o,"minFoldSize"),l=e.foldOption(o,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(r(e,s))n=i(o.indicatorFolded);else{var c=f(s,0),u=l&&l(e,c);u&&u.to.line-u.from.line>=a&&(n=i(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function a(e,t,n){var i=e.state.foldGutter;if(i){var o=i.options;if(n==o.gutter){var s=r(e,t);s?s.clear():e.foldCode(f(t,0),o.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){n.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function u(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}}e.defineOption("foldGutter",!1,function(r,i,o){o&&o!=e.Init&&(r.clearGutter(r.state.foldGutter.options.gutter),r.state.foldGutter=null,r.off("gutterClick",a),r.off("change",l),r.off("viewportChange",c),r.off("fold",u),r.off("unfold",u),r.off("swapDoc",s)),i&&(r.state.foldGutter=new t(n(i)),s(r),r.on("gutterClick",a),r.on("change",l),r.on("viewportChange",c),r.on("fold",u),r.on("unfold",u),r.on("swapDoc",s))});var f=e.Pos}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function r(r){for(var i=n.ch,l=0;;){var c=0>=i?-1:a.lastIndexOf(r,i-1);if(-1!=c){if(1==l&&c<n.ch)break;if(o=t.getTokenTypeAt(e.Pos(s,c+1)),!/^(comment|string)/.test(o))return c+1;i=c-1}else{if(1==l)break;l=1,i=a.length}}}var i,o,s=n.line,a=t.getLine(s),l="{",c="}",i=r("{");if(null==i&&(l="[",c="]",i=r("[")),null!=i){var u,f,p=1,h=t.lastLine();e:for(var d=s;h>=d;++d)for(var m=t.getLine(d),g=d==s?i:0;;){var v=m.indexOf(l,g),b=m.indexOf(c,g);if(0>v&&(v=m.length),0>b&&(b=m.length),g=Math.min(v,b),g==m.length)break;if(t.getTokenTypeAt(e.Pos(d,g+1))==o)if(g==v)++p;else if(!--p){u=d,f=g;break e}++g}if(null!=u&&(s!=u||f!=i))return{from:e.Pos(s,i),to:e.Pos(u,f)}}}),e.registerHelper("fold","import",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);o>=i;++i){var s=t.getLine(i),a=s.indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,n=n.line,o=r(n);if(!o||r(n-1)||(i=r(n-2))&&i.end.line==n-1)return null;for(var s=o.end;;){var a=r(s.line+1);if(null==a)break;s=a.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:s}}),e.registerHelper("fold","include",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var n=n.line,i=r(n);if(null==i||null!=r(n-1))return null;for(var o=n;;){var s=r(o+1);if(null==s)break;++o}return{from:e.Pos(n,i+1),to:t.clipPos(e.Pos(o))}})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?r.from:e.firstLine(),this.max=r?r.to-1:e.lastLine()}function r(e,t){var n=e.cm.getTokenTypeAt(p(e.line,t));return n&&/\btag\b/.test(n)}function i(e){return e.line>=e.max?void 0:(e.ch=0,e.text=e.cm.getLine(++e.line),!0)}function o(e){return e.line<=e.min?void 0:(e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0)}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(r(e,t+1)){m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){m.lastIndex=e.ch;var t=m.exec(e.text);if(!t){if(i(e))continue;return}{if(r(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var n=[];;){var r,i=l(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(r=s(e)))return;if("selfClose"!=r)if(i[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==i[2]){n.length=c;break}if(0>c&&(!t||t==i[2]))return{tag:i[2],from:p(o,a),to:p(e.line,e.ch)}}else n.push(i[2])}}function f(e,t){for(var n=[];;){var r=c(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,s=a(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(0>l&&(!t||t==s[2]))return{tag:s[2],from:p(e.line,e.ch),to:p(i,o)}}}else a(e)}}var p=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",d=h+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+h+"]["+d+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var r=new n(e,t.line,0);;){var i,o=l(r);if(!o||r.line!=t.line||!(i=s(r)))return;if(!o[1]&&"selfClose"!=i){var t=p(r.line,r.ch),a=u(r,o[2]);return a&&{from:t,to:a.from}}}}),e.findMatchingTag=function(e,r,i){var o=new n(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var l=s(o),c=l&&p(o.line,o.ch),h=l&&a(o);if(l&&h&&!(t(o,r)>0)){var d={from:p(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==l?{open:d,close:null,at:"open"}:h[1]?{open:f(o,h[2]),close:d,at:"close"}:(o=new n(e,c.line,c.ch,i),{open:d,close:u(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,r){for(var i=new n(e,t.line,t.ch,r);;){var o=f(i);if(!o)break;var s=new n(e,t.line,t.ch,r),a=u(s,o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,r,i){var o=new n(e,t.line,t.ch,i?{from:0,to:i}:null);return u(o,r)}}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","markdown",function(t,n){function r(n){var r=t.getTokenTypeAt(e.Pos(n,0));return r&&/\bheader\b/.test(r)}function i(e,t,n){var i=t&&t.match(/^#+/);return i&&r(e)?i[0].length:(i=n&&n.match(/^[=\-]+\s*$/),i&&r(e+1)?"="==n[0]?1:2:o)}var o=100,s=t.getLine(n.line),a=t.getLine(n.line+1),l=i(n.line,s,a);if(l===o)return void 0;for(var c=t.lastLine(),u=n.line,f=t.getLine(u+2);c>u&&!(i(u+1,a,f)<=l);)++u,a=f,f=t.getLine(u+2);return{from:e.Pos(n.line,s.length),to:e.Pos(u,t.getLine(u).length)}})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var r=t.getModeAt(n),i=r.blockCommentStart,o=r.blockCommentEnd;if(i&&o){for(var s,a=n.line,l=t.getLine(a),c=n.ch,u=0;;){var f=0>=c?-1:l.lastIndexOf(i,c-1);if(-1!=f){if(1==u&&f<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(a,f+1)))){s=f+i.length;break}c=f-1}else{if(1==u)return;u=1,c=l.length}}var p,h,d=1,m=t.lastLine();e:for(var g=a;m>=g;++g)for(var v=t.getLine(g),b=g==a?s:0;;){var y=v.indexOf(i,b),x=v.indexOf(o,b);if(0>y&&(y=v.length),0>x&&(x=v.length),b=Math.min(y,x),b==v.length)break;if(b==y)++d;else if(!--d){p=g,h=b;break e}++b}if(null!=p&&(a!=p||h!=s))return{from:e.Pos(a,s),to:e.Pos(p,h)}}})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n,r){function i(t){var n=e.wheelEventPixels(t)["horizontal"==o.orientation?"x":"y"],r=o.pos;o.moveTo(o.pos+n),o.pos!=r&&e.e_preventDefault(t)}this.orientation=n,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+n,this.inner=this.node.appendChild(document.createElement("div"));var o=this;e.on(this.inner,"mousedown",function(t){function n(){e.off(document,"mousemove",r),e.off(document,"mouseup",n)}function r(e){return 1!=e.which?n():void o.moveTo(a+(e[i]-s)*(o.total/o.size))}if(1==t.which){e.e_preventDefault(t);var i="horizontal"==o.orientation?"pageX":"pageY",s=t[i],a=o.pos;e.on(document,"mousemove",r),e.on(document,"mouseup",n)}}),e.on(this.node,"click",function(t){e.e_preventDefault(t);var n,r=o.inner.getBoundingClientRect();n="horizontal"==o.orientation?t.clientX<r.left?-1:t.clientX>r.right?1:0:t.clientY<r.top?-1:t.clientY>r.bottom?1:0,o.moveTo(o.pos+n*o.screen)}),e.on(this.node,"mousewheel",i),e.on(this.node,"DOMMouseScroll",i)}function n(e,n,r){this.addClass=e,this.horiz=new t(e,"horizontal",r),n(this.horiz.node),this.vert=new t(e,"vertical",r),n(this.vert.node),this.width=null}t.prototype.moveTo=function(e,t){0>e&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),e!=this.pos&&(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",t!==!1&&this.scroll(e,this.orientation))};var r=10;t.prototype.update=function(e,t,n){this.screen=t,this.total=e,this.size=n;var i=this.screen*(this.size/this.total);r>i&&(this.size-=r-i,i=r),this.inner.style["horizontal"==this.orientation?"width":"height"]=i+"px",this.inner.style["horizontal"==this.orientation?"left":"top"]=this.pos*(this.size/this.total)+"px"},n.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var n=this.width||0,r=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=r?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(r?n:0)),this.vert.node.style.display="block",this.vert.node.style.bottom=r?n+"px":"0"),r&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?n:0)-e.barLeft),this.horiz.node.style.right=i?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?n:0,bottom:r?n:0}},n.prototype.setScrollTop=function(e){this.vert.moveTo(e,!1)},n.prototype.setScrollLeft=function(e){this.horiz.moveTo(e,!1)},n.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new n("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new n("CodeMirror-overlayscroll",e,t)}}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("xml",function(t,n){function r(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(s("atom","]]>")):null:e.match("--")?n(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(a(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(C=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==r){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=r,C=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return C="equals",null;if("<"==n){t.tokenize=r,t.state=f,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=o(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=r;break}n.next()}return e}}function a(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=a(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=r;break}return n.tokenize=a(e-1),n.tokenize(t,n)}}return"meta"}}function l(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(_.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function c(e){e.context&&(e.context=e.context.prev)}function u(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!_.contextGrabbers.hasOwnProperty(n)||!_.contextGrabbers[n].hasOwnProperty(t))return;c(e)}}function f(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?h:f}function p(e,t,n){return"word"==e?(n.tagName=t.current(),k="tag",g):(k="error",p)}function h(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&_.implicitlyClosed.hasOwnProperty(n.context.tagName)&&c(n),n.context&&n.context.tagName==r?(k="tag",d):(k="tag error",m)}return k="error",m}function d(e,t,n){return"endTag"!=e?(k="error",d):(c(n),f)}function m(e,t,n){return k="error",d(e,t,n)}function g(e,t,n){if("word"==e)return k="attribute",v;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||_.autoSelfClosers.hasOwnProperty(r)?u(n,r):(u(n,r),n.context=new l(n,r,i==n.indented)),f}return k="error",g}function v(e,t,n){return"equals"==e?b:(_.allowMissing||(k="error"),g(e,t,n))}function b(e,t,n){return"string"==e?y:"word"==e&&_.allowUnquoted?(k="string",g):(k="error",g(e,t,n))}function y(e,t,n){return"string"==e?y:g(e,t,n)}var x=t.indentUnit,w=n.multilineTagIndentFactor||1,S=n.multilineTagIndentPastTag;null==S&&(S=!0);var C,k,_=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},E=n.alignCDATA;return r.isInText=!0,{startState:function(){return{tokenize:r,state:f,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;C=null;var n=t.tokenize(e,t);return(n||C)&&"comment"!=n&&(k=null,t.state=t.state(C||n,e,t),k&&(n="error"==k?n+" error":k)),n},indent:function(t,n,o){var s=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(s&&s.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=r)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return S?t.tagStart+t.tagName.length+2:t.tagStart+x*w;if(E&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;s;){if(s.tagName==a[2]){s=s.prev;break}if(!_.implicitlyClosed.hasOwnProperty(s.tagName))break;s=s.prev}else if(a)for(;s;){var l=_.contextGrabbers[s.tagName];if(!l||!l.hasOwnProperty(a[2]))break;s=s.prev}for(;s&&!s.startOfLine;)s=s.prev;return s?s.indent+x:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function n(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.defineMode("css",function(t,n){function r(e,t){return d=t,e}function i(e,t){var n=e.next();if(v[n]){var i=v[n](e,t);if(i!==!1)return i}return"@"==n?(e.eatWhile(/[\w\\\-]/),r("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?r(null,"compare"):'"'==n||"'"==n?(t.tokenize=o(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),r("atom","hash")):"!"==n?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),r("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):"u"==n&&e.match(/rl(-prefix)?\(/)||"d"==n&&e.match("omain(")||"r"==n&&e.match("egexp(")?(e.backUp(1),t.tokenize=s,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable")):e.match(/^\w+-/)?r("meta","meta"):void 0}function o(e){return function(t,n){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(n.tokenize=null),r("string","string")}}function s(e,t){return e.next(),t.tokenize=e.match(/\s*[\"\')]/,!1)?null:o(")"),r(null,"(")}function a(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n){return e.context=new a(n,t.indentation()+g,e.context),n}function c(e){return e.context=e.context.prev,e.context.type}function u(e,t,n){return I[n.context.type](e,t,n)}function f(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return u(e,t,n)}function p(e){var t=e.current().toLowerCase();m=A.hasOwnProperty(t)?"atom":E.hasOwnProperty(t)?"keyword":"variable"}var h=n;n.propertyKeywords||(n=e.resolveMode("text/css")),n.inline=h.inline;var d,m,g=t.indentUnit,v=n.tokenHooks,b=n.documentTypes||{},y=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},S=n.propertyKeywords||{},C=n.nonStandardPropertyKeywords||{},k=n.fontProperties||{},_=n.counterDescriptors||{},E=n.colorKeywords||{},A=n.valueKeywords||{},L=n.allowNested,I={};return I.top=function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return c(n);if(/@(media|supports|(-moz-)?document)/.test(e))return l(n,t,"atBlock");if(/@(font-face|counter-style)/.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(L&&"("==e)return l(n,t,"parens")}return n.context.type},I.block=function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return S.hasOwnProperty(r)?(m="property","maybeprop"):C.hasOwnProperty(r)?(m="string-2","maybeprop"):L?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":L||"hash"!=e&&"qualifier"!=e?I.top(e,t,n):(m="error","block")},I.maybeprop=function(e,t,n){return":"==e?l(n,t,"prop"):u(e,t,n)},I.prop=function(e,t,n){if(";"==e)return c(n);if("{"==e&&L)return l(n,t,"propBlock");if("}"==e||"{"==e)return f(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return l(n,t,"interpolation")}else m+=" error";return"prop"},I.propBlock=function(e,t,n){return"}"==e?c(n):"word"==e?(m="property","maybeprop"):n.context.type},I.parens=function(e,t,n){return"{"==e||"}"==e?f(e,t,n):")"==e?c(n):"("==e?l(n,t,"parens"):"interpolation"==e?l(n,t,"interpolation"):("word"==e&&p(t),"parens")},I.pseudo=function(e,t,n){return"word"==e?(m="variable-3",n.context.type):u(e,t,n)},I.atBlock=function(e,t,n){if("("==e)return l(n,t,"atBlock_parens");if("}"==e)return f(e,t,n);if("{"==e)return c(n)&&l(n,t,L?"block":"top");if("word"==e){var r=t.current().toLowerCase();m="only"==r||"not"==r||"and"==r||"or"==r?"keyword":b.hasOwnProperty(r)?"tag":y.hasOwnProperty(r)?"attribute":x.hasOwnProperty(r)?"property":w.hasOwnProperty(r)?"keyword":S.hasOwnProperty(r)?"property":C.hasOwnProperty(r)?"string-2":A.hasOwnProperty(r)?"atom":E.hasOwnProperty(r)?"keyword":"error"}return n.context.type},I.atBlock_parens=function(e,t,n){return")"==e?c(n):"{"==e||"}"==e?f(e,t,n,2):I.atBlock(e,t,n)},I.restricted_atBlock_before=function(e,t,n){return"{"==e?l(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(m="variable","restricted_atBlock_before"):u(e,t,n)},I.restricted_atBlock=function(e,t,n){return"}"==e?(n.stateArg=null,c(n)):"word"==e?(m="@font-face"==n.stateArg&&!k.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!_.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},I.keyframes=function(e,t,n){return"word"==e?(m="variable","keyframes"):"{"==e?l(n,t,"top"):u(e,t,n)},I.at=function(e,t,n){return";"==e?c(n):"{"==e||"}"==e?f(e,t,n):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},I.interpolation=function(e,t,n){return"}"==e?c(n):"{"==e||";"==e?f(e,t,n):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:n.inline?"block":"top",stateArg:null,context:new a(n.inline?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||i)(e,t);return n&&"object"==typeof n&&(d=n[1],n=n[0]),m=n,t.state=I[t.state](d,e,t),m},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),!n.prev||("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type)&&(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=n.indent-g,n=n.prev),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var r=["domain","regexp","url","url-prefix"],i=t(r),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=t(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=t(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),f=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(f),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],d=t(h),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],b=t(v),y=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],x=t(y),w=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],S=t(w),C=r.concat(o).concat(a).concat(c).concat(f).concat(h).concat(y).concat(w);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:d,fontProperties:g,counterDescriptors:b,colorKeywords:x,valueKeywords:S,tokenHooks:{"/":function(e,t){return e.eat("*")?(t.tokenize=n,n(e,t)):!1}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:d,colorKeywords:x,valueKeywords:S,fontProperties:g,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return e.match(/\s*\{/)?[null,"{"]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return e.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:d,colorKeywords:x,valueKeywords:S,fontProperties:g,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
+ | function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,n){function r(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function i(e,t,n){return gt=e,vt=n,t}function o(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=s(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=a,a(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(r(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(_t),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(_t.test(n))return e.eatWhile(_t),i("operator","operator",e.current());if(Ct.test(n)){e.eatWhile(Ct);var o=e.current(),c=kt.propertyIsEnumerable(o)&&kt[o];return c&&"."!=t.lastType?i(c.type,c.style,o):i("variable","variable",o)}}function s(e){return function(t,n){var r,s=!1;if(xt&&"@"==t.peek()&&t.match(Et))return n.tokenize=o,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||s);)s=!s&&"\\"==r;return s||(n.tokenize=o),i("string","string")}}function a(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a=At.indexOf(s);if(a>=0&&3>a){if(!r){++o;break}if(0==--r)break}else if(a>=3&&6>a)++r;else if(Ct.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function u(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function p(e,t,n,r,i){var o=e.cc;for(It.state=e,It.stream=i,It.marked=null,It.cc=o,It.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=o.length?o.pop():wt?S:w;if(s(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return It.marked?It.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)It.cc.push(arguments[e])}function d(){return h.apply(null,arguments),!0}function m(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=It.state;if(r.context){if(It.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function g(){It.state.context={prev:It.state.context,vars:It.state.localVars},It.state.localVars=Pt}function v(){It.state.localVars=It.state.context.vars,It.state.context=It.state.context.prev}function b(e,t){var n=function(){var n=It.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new u(r,It.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function y(){var e=It.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(n){return n==e?d():";"==e?h():d(t)}return t}function w(e,t){return"var"==e?d(b("vardef",t.length),q,x(";"),y):"keyword a"==e?d(b("form"),S,w,y):"keyword b"==e?d(b("form"),w,y):"{"==e?d(b("}"),W,y):";"==e?d():"if"==e?("else"==It.state.lexical.info&&It.state.cc[It.state.cc.length-1]==y&&It.state.cc.pop()(),d(b("form"),S,w,y,Y)):"function"==e?d(tt):"for"==e?d(b("form"),X,w,y):"variable"==e?d(b("stat"),O):"switch"==e?d(b("form"),S,b("}","switch"),x("{"),W,y,y):"case"==e?d(S,x(":")):"default"==e?d(x(":")):"catch"==e?d(b("form"),g,x("("),nt,x(")"),w,y,v):"class"==e?d(b("form"),rt,y):"export"==e?d(b("form"),at,y):"import"==e?d(b("form"),lt,y):h(b("stat"),S,x(";"),y)}function S(e){return k(e,!1)}function C(e){return k(e,!0)}function k(e,t){if(It.state.fatArrowAt==It.stream.start){var n=t?M:T;if("("==e)return d(g,b(")"),j(U,")"),y,x("=>"),n,v);if("variable"==e)return h(g,U,x("=>"),n,v)}var r=t?L:A;return Lt.hasOwnProperty(e)?d(r):"function"==e?d(tt,r):"keyword c"==e?d(t?E:_):"("==e?d(b(")"),_,dt,x(")"),y,r):"operator"==e||"spread"==e?d(t?C:S):"["==e?d(b("]"),pt,y,r):"{"==e?F(N,"}",null,r):"quasi"==e?h(I,r):d()}function _(e){return e.match(/[;\}\)\],]/)?h():h(S)}function E(e){return e.match(/[;\}\)\],]/)?h():h(C)}function A(e,t){return","==e?d(S):L(e,t,!1)}function L(e,t,n){var r=0==n?A:L,i=0==n?S:C;return"=>"==e?d(g,n?M:T,v):"operator"==e?/\+\+|--/.test(t)?d(r):"?"==t?d(S,x(":"),i):d(i):"quasi"==e?h(I,r):";"!=e?"("==e?F(C,")","call",r):"."==e?d(z,r):"["==e?d(b("]"),_,x("]"),y,r):void 0:void 0}function I(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?d(I):d(S,P)}function P(e){return"}"==e?(It.marked="string-2",It.state.tokenize=l,d(I)):void 0}function T(e){return c(It.stream,It.state),h("{"==e?w:S)}function M(e){return c(It.stream,It.state),h("{"==e?w:C)}function O(e){return":"==e?d(y,w):h(A,x(";"),y)}function z(e){return"variable"==e?(It.marked="property",d()):void 0}function N(e,t){return"variable"==e||"keyword"==It.style?(It.marked="property",d("get"==t||"set"==t?D:R)):"number"==e||"string"==e?(It.marked=xt?"property":It.style+" property",d(R)):"jsonld-keyword"==e?d(R):"["==e?d(S,x("]"),R):void 0}function D(e){return"variable"!=e?h(R):(It.marked="property",d(tt))}function R(e){return":"==e?d(C):"("==e?h(tt):void 0}function j(e,t){function n(r){if(","==r){var i=It.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),d(e,n)}return r==t?d():d(x(t))}return function(r){return r==t?d():h(e,n)}}function F(e,t,n){for(var r=3;r<arguments.length;r++)It.cc.push(arguments[r]);return d(b(t,n),j(e,t),y)}function W(e){return"}"==e?d():h(w,W)}function $(e){return St&&":"==e?d(B):void 0}function H(e,t){return"="==t?d(C):void 0}function B(e){return"variable"==e?(It.marked="variable-3",d()):void 0}function q(){return h(U,$,G,K)}function U(e,t){return"variable"==e?(m(t),d()):"["==e?F(U,"]"):"{"==e?F(V,"}"):void 0}function V(e,t){return"variable"!=e||It.stream.match(/^\s*:/,!1)?("variable"==e&&(It.marked="property"),d(x(":"),U,G)):(m(t),d(G))}function G(e,t){return"="==t?d(C):void 0}function K(e){return","==e?d(q):void 0}function Y(e,t){return"keyword b"==e&&"else"==t?d(b("form","else"),w,y):void 0}function X(e){return"("==e?d(b(")"),Q,x(")"),y):void 0}function Q(e){return"var"==e?d(q,x(";"),Z):";"==e?d(Z):"variable"==e?d(J):h(S,x(";"),Z)}function J(e,t){return"in"==t||"of"==t?(It.marked="keyword",d(S)):d(A,Z)}function Z(e,t){return";"==e?d(et):"in"==t||"of"==t?(It.marked="keyword",d(S)):h(S,x(";"),et)}function et(e){")"!=e&&d(S)}function tt(e,t){return"*"==t?(It.marked="keyword",d(tt)):"variable"==e?(m(t),d(tt)):"("==e?d(g,b(")"),j(nt,")"),y,w,v):void 0}function nt(e){return"spread"==e?d(nt):h(U,$,H)}function rt(e,t){return"variable"==e?(m(t),d(it)):void 0}function it(e,t){return"extends"==t?d(S,it):"{"==e?d(b("}"),ot,y):void 0}function ot(e,t){return"variable"==e||"keyword"==It.style?"static"==t?(It.marked="keyword",d(ot)):(It.marked="property","get"==t||"set"==t?d(st,tt,ot):d(tt,ot)):"*"==t?(It.marked="keyword",d(ot)):";"==e?d(ot):"}"==e?d():void 0}function st(e){return"variable"!=e?h():(It.marked="property",d())}function at(e,t){return"*"==t?(It.marked="keyword",d(ft,x(";"))):"default"==t?(It.marked="keyword",d(S,x(";"))):h(w)}function lt(e){return"string"==e?d():h(ct,ft)}function ct(e,t){return"{"==e?F(ct,"}"):("variable"==e&&m(t),"*"==t&&(It.marked="keyword"),d(ut))}function ut(e,t){return"as"==t?(It.marked="keyword",d(ct)):void 0}function ft(e,t){return"from"==t?(It.marked="keyword",d(S)):void 0}function pt(e){return"]"==e?d():h(C,ht)}function ht(e){return"for"==e?h(dt,x("]")):","==e?d(j(E,"]")):h(j(C,"]"))}function dt(e){return"for"==e?d(X,dt):"if"==e?d(S,dt):void 0}function mt(e,t){return"operator"==e.lastType||","==e.lastType||_t.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var gt,vt,bt=t.indentUnit,yt=n.statementIndent,xt=n.jsonld,wt=n.json||xt,St=n.typescript,Ct=n.wordCharacters||/[\w$\xa1-\uffff]/,kt=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},s={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":r,"delete":r,"throw":r,"debugger":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":r,"export":e("export"),"import":e("import"),"extends":r};if(St){var a={type:"variable",style:"variable-3"},l={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:a,number:a,bool:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^]/,Et=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,At="([{}])",Lt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},It={state:null,column:null,marked:null,cc:null},Pt={name:"this",next:{name:"arguments"}};return y.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new u((e||0)-bt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=a&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==gt?n:(t.lastType="operator"!=gt||"++"!=vt&&"--"!=vt?gt:"incdec",p(t,n,gt,vt,e))},indent:function(t,r){if(t.tokenize==a)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var c=t.cc[l];if(c==y)s=s.prev;else if(c!=Y)break}"stat"==s.type&&"}"==i&&(s=s.prev),yt&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,f=i==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==u&&"{"==i?s.indented:"form"==u?s.indented+bt:"stat"==u?s.indented+(mt(t,r)?yt||bt:0):"switch"!=s.info||f||0==n.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:bt):s.indented+(/^(?:case|default)\b/.test(r)?bt:2*bt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:wt?null:"/*",blockCommentEnd:wt?null:"*/",lineComment:wt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:wt?"json":"javascript",jsonldMode:xt,jsonMode:wt}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.emmetCodeMirror=e()}}(function(){var define,module,exports;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";function r(e,t){return arguments.length>2&&"object"!=typeof t&&(t={line:arguments[1],ch:arguments[2]}),e.indexFromPos(t)}function i(e,t){return e.posFromIndex(t)}var o=function(e){return e&&e.__esModule?e["default"]:e},s=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(n,"__esModule",{value:!0});var l=o(e("./emmet")),c={"text/html":"html","application/xml":"xml","text/xsl":"xsl","text/css":"css","text/x-less":"less","text/x-scss":"scss","text/x-sass":"sass"};n.modeMap=c;var u=function(){function e(t){var n=void 0===arguments[1]?0:arguments[1];a(this,e),this.context=t,this.selectionIndex=n||0}return s(e,{selectionList:{value:function(){var e=this.context;return e.listSelections().map(function(t){var n=r(e,t.anchor),i=r(e,t.head);return{start:Math.min(n,i),end:Math.max(n,i)}})}},getCaretPos:{value:function(){return this.getSelectionRange().start}},setCaretPos:{value:function(e){this.createSelection(e)}},getSelectionRange:{value:function(){return this.selectionList()[this.selectionIndex]}},createSelection:{value:function(e,t){"undefined"==typeof t&&(t=e);var n=this.selectionList(),r=this.context;n[this.selectionIndex]={start:e,end:t},this.context.setSelections(n.map(function(e){return{head:i(r,e.start),anchor:i(r,e.end)}}))}},getSelection:{value:function(){var e=this.getSelectionRange();return e.start=i(this.context,e.start),e.end=i(this.context,e.end),this.context.getRange(e.start,e.end)}},getCurrentLineRange:{value:function(){var e=i(this.context,this.getCaretPos());return{start:r(this.context,e.line,0),end:r(this.context,e.line,this.context.getLine(e.line).length)}}},getCurrentLine:{value:function(){var e=i(this.context,this.getCaretPos());return this.context.getLine(e.line)||""}},replaceContent:{value:function(e,t,n,r){"undefined"==typeof n&&(n="undefined"==typeof t?this.getContent().length:t),"undefined"==typeof t&&(t=0),e=this.normalize(e),r||(e=l.utils.common.padString(e,l.utils.common.getLinePaddingFromPosition(this.getContent(),t)));var o=l.tabStops.extract(e,{escape:function(e){return e}});e=o.text;var s=o.tabstops[0]||{start:e.length,end:e.length};s.start+=t,s.end+=t,this.context.replaceRange(e,i(this.context,t),i(this.context,n)),this.createSelection(s.start,s.end)}},normalize:{value:function(e){var t=" ",n=this.context;return n.getOption("indentWithTabs")||(t=l.utils.common.repeatString(" ",n.getOption("indentUnit"))),l.utils.editor.normalize(e,{indentation:t})}},getContent:{value:function(){return this.context.getValue()}},getSyntax:{value:function(){var e=this.context,t=(e.posFromIndex(this.getCaretPos()),e.getModeAt(e.getCursor())),n=t.name;return"xml"===n&&t.configuration&&(n=t.configuration),n||l.utils.action.detectSyntax(this,n)}},getProfileName:{value:function(){return this.context.getOption("profile")?this.context.getOption("profile"):l.utils.action.detectProfile(this)}},prompt:{value:function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e){return prompt(e)})},getFilePath:{value:function(){return location.href}},isValidSyntax:{value:function(){return l.resources.hasSyntax(this.getSyntax())}}}),e}();n["default"]=u},{"./emmet":2}],2:[function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=n(e("emmet"));e("emmet/bundles/snippets"),t.exports=r},{emmet:37,"emmet/bundles/snippets":3}],3:[function(e){var t=e("../lib/assets/resources"),n=e("../lib/snippets.json");t.setVocabulary(n,"system")},{"../lib/assets/resources":30,"../lib/snippets.json":66}],4:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return e[e.length-1]}function n(e,t){var n=l.outputInfo(e),r=n.content,i=u(e.getSelectionRange());if(h&&!h.range.equal(i)&&(h=null),h&&i.length())if("in"==t){if("tag"==h.type&&!h.close)return!1;if(h.range.equal(h.outerRange))h.range=h.innerRange;else{var o=a.narrowToNonSpace(r,h.innerRange);h=s.find(r,o.start+1),h&&h.range.equal(i)&&h.outerRange.equal(i)&&(h.range=h.innerRange)}}else!h.innerRange.equal(h.outerRange)&&h.range.equal(h.innerRange)&&i.equal(h.range)?h.range=h.outerRange:(h=s.find(r,i.start),h&&h.range.equal(i)&&h.innerRange.equal(i)&&(h.range=h.outerRange));else h=s.find(r,i.start);return h&&(h.innerRange.equal(i)&&(h.range=h.outerRange),!h.range.equal(i))?(e.createSelection(h.range.start,h.range.end),!0):(h=null,!1)}function r(e,n){var r=[e.range(!0)];r.push(e.valueRange(!0));var i=p.nestedSectionsInRule(e),o=e.list();if(o.length||i.length){var s=Number.POSITIVE_INFINITY,a=-1;o.length&&(s=o[0].namePosition(!0),a=t(o).range(!0).end),i.length&&(i[0].start<s&&(s=i[0].start),t(i).end>a&&(a=t(i).end)),r.push(u.create2(s,a))}r=r.concat(i);var l=f.propertyFromPosition(e,n)||o[0];if(l){r.push(l.range(!0));var c=l.valueRange(!0);l.end()||(c._unterminated=!0),r.push(c)}return r}function i(e,t){var n;if("string"==typeof e){var i=p.matchEnclosingRule(e,t);i&&(n=f.parse(i.substring(e),{offset:i.start}))}else n=e;if(!n)return null;var o=r(n,t);return o=o.filter(function(e){return!!e.length}),a.unique(o,function(e){return e.valueOf()})}function o(e,n){var r=l.outputInfo(e),o=r.content,s=u(e.getSelectionRange()),c=i(r.content,s.start);if(!c&&s.length())try{var p=f.parse(s.substring(r.content),{offset:s.start});c=i(p,s.start)}catch(h){}if(!c)return!1;c=u.sort(c,!0);var d=a.find(c,function(e){return e.equal(s)});if(d||(d=a.find(c,function(e){return e._unterminated?e.include(s.start):e.inside(s.start)})),!d)return!1;var m=c.indexOf(d);if(d.equal(s)&&(m+="out"==n?1:-1),0>m||m>=c.length)if(m>=c.length&&"out"==n){pos=d.start-1;var g=i(o,pos);g&&(d=t(g.filter(function(e){return e.inside(pos)})))}else d=0>m&&"in"==n?null:null;else d=c[m];return d?(e.createSelection(d.start,d.end),!0):!1}var s=e("../assets/htmlMatcher"),a=e("../utils/common"),l=e("../utils/editor"),c=e("../utils/action"),u=e("../assets/range"),f=e("../editTree/css"),p=e("../utils/cssSections"),h=null;return{balance:function(e,t){t=String((t||"out").toLowerCase());var r=l.outputInfo(e);return c.isSupportedCSS(r.syntax)?o(e,t):n(e,t)},balanceInwardAction:function(e){return this.balance(e,"in")},balanceOutwardAction:function(e){return this.balance(e,"out")},goToMatchingPairAction:function(e){var t=String(e.getContent()),n=e.getCaretPos();"<"==t.charAt(n)&&n++;var r=s.tag(t,n);return r&&r.close?(e.setCaretPos(r.open.range.inside(n)?r.close.range.start:r.open.range.start),!0):!1}}})},{"../assets/htmlMatcher":25,"../assets/range":29,"../editTree/css":35,"../utils/action":68,"../utils/common":71,"../utils/cssSections":72,"../utils/editor":73}],5:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,n){return n=n||0,t.charAt(n)==e.charAt(0)&&t.substr(n,e.length)==e}function n(e,t,n){var r=e.getFilePath(),a="application/octet-stream";if(null===r)throw"You should save your file before using this action";var l=i.locateFile(r,t);if(null===l)throw"Can't find "+t+" file";return i.read(l,function(r,c){if(r)throw"Unable to read "+l+": "+r;var u=o.encode(String(c));if(!u)throw"Can't encode file content to base64";u="data:"+(s.mimeTypes[String(i.getExt(l))]||a)+";base64,"+u,e.replaceContent("$0"+u,n,n+t.length)}),!0}function r(e,t,n){var r=String(e.prompt("Enter path to file (absolute or relative)"));if(!r)return!1;var s=i.createPath(e.getFilePath(),r);if(!s)throw"Can't save file";return i.save(s,o.decode(t.replace(/^data\:.+?;.+?,/,""))),e.replaceContent("$0"+r,n,n+t.length),!0}var i=e("../plugin/file"),o=e("../utils/base64"),s=e("../utils/action"),a=e("../utils/editor");return{encodeDecodeDataUrlAction:function(e){var i=String(e.getSelection()),o=e.getCaretPos(),s=a.outputInfo(e);if(!i)for(var l,c=s.content;o-->=0;){if(t("src=",c,o)){(l=c.substr(o).match(/^(src=(["'])?)([^'"<>\s]+)\1?/))&&(i=l[3],o+=l[1].length);break}if(t("url(",c,o)){(l=c.substr(o).match(/^(url\((['"])?)([^'"\)\s]+)\1?/))&&(i=l[3],o+=l[1].length);break}}return i?t("data:",i)?r(e,i,o):n(e,i,o):!1}}})},{"../plugin/file":61,"../utils/action":68,"../utils/base64":69,"../utils/editor":73}],6:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){function e(e,t,n){function r(e){for(var t=e;t>=0;){var n=o.charAt(t);if("\n"==n||"\r"==n)break;t--}return o.substring(t,e)}t=t||1,n=n||0;for(var i=e.getCaretPos()+n,o=String(e.getContent()),s=o.length,a=-1,l=/^\s+$/;s>=i&&i>=0;){i+=t;var c=o.charAt(i),u=o.charAt(i+1),f=o.charAt(i-1);switch(c){case'"':case"'":u==c&&"="==f&&(a=i+1);break;case">":"<"==u&&(a=i+1);break;case"\n":case"\r":l.test(r(i-1))&&(a=i)}if(-1!=a)break}return a}return{previousEditPointAction:function(t){var n=t.getCaretPos(),r=e(t,-1);return r==n&&(r=e(t,-1,-2)),-1!=r?(t.setCaretPos(r),!0):!1},nextEditPointAction:function(t){var n=e(t,1);return-1!=n?(t.setCaretPos(n),!0):!1}}})},{}],7:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../utils/action"),n=e("../utils/common"),r=e("../utils/math"),i=e("../assets/range");return{evaluateMathAction:function(e){var o=e.getContent(),s=".+-*/\\",a=i(e.getSelectionRange());if(a.length()||(a=t.findExpressionBounds(e,function(e){return n.isNumeric(e)||-1!=s.indexOf(e)})),a&&a.length()){var l=a.substring(o);l=l.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"round($1/$2)");try{var c=n.prettifyNumber(r.evaluate(l));return e.replaceContent(c,a.start,a.end),e.setCaretPos(a.start+c.length),!0}catch(u){}}return!1}}})},{"../assets/range":29,"../utils/action":68,"../utils/common":71,"../utils/math":74}],8:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){var t=r(e.getSelectionRange()),n=String(e.getContent());if(t.length())return t.substring(n);var i=e.getCurrentLineRange();return a.extractAbbreviation(n.substring(i.start,t.start))}var n=e("../assets/handlerList"),r=e("../assets/range"),i=e("../assets/preferences"),o=e("../utils/common"),s=e("../utils/editor"),a=e("../utils/action"),l=e("../resolver/cssGradient"),c=e("../parser/abbreviation"),u=n.create();return u.add(function(e,n,r){var o=e.getSelectionRange().end,s=t(e);if(s){var l=c.expand(s,{syntax:n,profile:r,contextNode:a.captureContext(e)});if(l){var u=o-s.length,f=o,p=i.getArray("css.syntaxes");if(p&&~p.indexOf(n)){var h=e.getContent();";"==h.charAt(o)&&";"==l.charAt(l.length-1)&&f++}return e.replaceContent(l,u,f),!0}}return!1},{order:-1}),u.add(l.expandAbbreviationHandler.bind(l)),{expandAbbreviationAction:function(e,t,n){var r=o.toArray(arguments),i=s.outputInfo(e,t,n);return r[1]=i.syntax,r[2]=i.profile,u.exec(!1,r)},expandAbbreviationWithTabAction:function(e,t,n){var i=e.getSelection(),s=" ";if(i){var a=r(e.getSelectionRange()),l=o.padString(i,s);e.replaceContent(s+"${0}",e.getCaretPos());var c=r(e.getCaretPos(),a.length());return e.replaceContent(l,c.start,c.end,!0),e.createSelection(c.start,c.start+l.length),!0}return this.expandAbbreviationAction(e,t,n)||e.replaceContent(s,e.getCaretPos()),!0},_defaultHandler:function(e,t,n){var r=e.getSelectionRange().end,i=this.findAbbreviation(e);if(i){var o=a.captureContext(e),s=c.expand(i,t,n,o);if(s)return e.replaceContent(s,r-i.length,r),!0}return!1},addHandler:function(e,t){u.add(e,t)},removeHandler:function(e){u.remove(e)},findAbbreviation:t}})},{"../assets/handlerList":24,"../assets/preferences":27,"../assets/range":29,"../parser/abbreviation":53,"../resolver/cssGradient":63,"../utils/action":68,"../utils/common":71,"../utils/editor":73}],9:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return e=e.replace(/^\-/,""),~e.indexOf(".")?e.split(".")[0].length:e.length}var n=e("../utils/common"),r=e("../utils/action");return{increment01Action:function(e){return this.incrementNumber(e,.1)},increment1Action:function(e){return this.incrementNumber(e,1)},increment10Action:function(e){return this.incrementNumber(e,10)},decrement01Action:function(e){return this.incrementNumber(e,-.1)},decrement1Action:function(e){return this.incrementNumber(e,-1)},decrement10Action:function(e){return this.incrementNumber(e,-10)},incrementNumber:function(e,i){var o=!1,s=!1,a=r.findExpressionBounds(e,function(e,t,r){return n.isNumeric(e)?!0:"."==e?n.isNumeric(r.charAt(t+1))?s?!1:s=!0:!1:"-"==e?o?!1:o=!0:!1});if(a&&a.length()){var l=a.substring(String(e.getContent())),c=parseFloat(l);if(!isNaN(c)){if(c=n.prettifyNumber(c+i),/^(\-?)0+[1-9]/.test(l)){var u="";RegExp.$1&&(u="-",c=c.substring(1));var f=c.split(".");f[0]=n.zeroPadString(f[0],t(l)),c=u+f.join(".")}return e.replaceContent(c,a.start,a.end),e.createSelection(a.start,a.start+c.length),!0}}return!1}}})},{"../utils/action":68,"../utils/common":71}],10:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../assets/preferences"),n=(e("../utils/common"),e("../assets/resources"),e("../assets/htmlMatcher"),e("../utils/editor"));return t.define("css.closeBraceIndentation","\n","Indentation before closing brace of CSS rule. Some users prefere indented closing brace of CSS rule for better readability. This preference\u2019s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when \u201cInsert formatted linebreak\u201d action will be performed in CSS file). If you\u2019re such user, you may want to write put a value like <code>\\n\\t</code> in this preference."),{insertLineBreakAction:function(e){if(!this.insertLineBreakOnlyAction(e)){for(var t,r=n.getCurrentLinePadding(e),i=String(e.getContent()),o=e.getCaretPos(),s=i.length,a="\n",l=e.getCurrentLineRange(),c="",u=l.end+1;s>u&&(t=i.charAt(u)," "==t||" "==t);u++)c+=t;c.length>r.length?e.replaceContent(a+c,o,o,!0):e.replaceContent(a,o)}return!0},insertLineBreakOnlyAction:function(){return!1}}})},{"../assets/htmlMatcher":25,"../assets/preferences":27,"../assets/resources":30,"../utils/common":71,"../utils/editor":73}],11:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,r){e=e.toLowerCase(),r=r||{},"string"==typeof r&&(r={label:r}),r.label||(r.label=n(e)),i[e]={name:e,fn:t,options:r}}function n(e){return r.trim(e.charAt(0).toUpperCase()+e.substring(1).replace(/_[a-z]/g,function(e){return" "+e.charAt(1).toUpperCase()}))}var r=e("../utils/common"),i={},o={base64:e("./base64"),editPoints:e("./editPoints"),evaluateMath:e("./evaluateMath"),expandAbbreviation:e("./expandAbbreviation"),incrementDecrement:e("./incrementDecrement"),lineBreaks:e("./lineBreaks"),balance:e("./balance"),mergeLines:e("./mergeLines"),reflectCSSValue:e("./reflectCSSValue"),removeTag:e("./removeTag"),selectItem:e("./selectItem"),selectLine:e("./selectLine"),splitJoinTag:e("./splitJoinTag"),toggleComment:e("./toggleComment"),updateImageSize:e("./updateImageSize"),wrapWithAbbreviation:e("./wrapWithAbbreviation"),updateTag:e("./updateTag")},s=function(e,t){var n=o[e];return n[t].bind(n)};return t("encode_decode_data_url",s("base64","encodeDecodeDataUrlAction"),"Encode\\Decode data:URL image"),t("prev_edit_point",s("editPoints","previousEditPointAction"),"Previous Edit Point"),t("next_edit_point",s("editPoints","nextEditPointAction"),"Next Edit Point"),t("evaluate_math_expression",s("evaluateMath","evaluateMathAction"),"Numbers/Evaluate Math Expression"),t("expand_abbreviation_with_tab",s("expandAbbreviation","expandAbbreviationWithTabAction"),{hidden:!0}),t("expand_abbreviation",s("expandAbbreviation","expandAbbreviationAction"),"Expand Abbreviation"),t("insert_formatted_line_break_only",s("lineBreaks","insertLineBreakOnlyAction"),{hidden:!0}),t("insert_formatted_line_break",s("lineBreaks","insertLineBreakAction"),{hidden:!0}),t("balance_inward",s("balance","balanceInwardAction"),"Balance (inward)"),t("balance_outward",s("balance","balanceOutwardAction"),"Balance (outward)"),t("matching_pair",s("balance","goToMatchingPairAction"),"HTML/Go To Matching Tag Pair"),t("merge_lines",s("mergeLines","mergeLinesAction"),"Merge Lines"),t("reflect_css_value",s("reflectCSSValue","reflectCSSValueAction"),"CSS/Reflect Value"),t("remove_tag",s("removeTag","removeTagAction"),"HTML/Remove Tag"),t("select_next_item",s("selectItem","selectNextItemAction"),"Select Next Item"),t("select_previous_item",s("selectItem","selectPreviousItemAction"),"Select Previous Item"),t("split_join_tag",s("splitJoinTag","splitJoinTagAction"),"HTML/Split\\Join Tag Declaration"),t("toggle_comment",s("toggleComment","toggleCommentAction"),"Toggle Comment"),t("update_image_size",s("updateImageSize","updateImageSizeAction"),"Update Image Size"),t("wrap_with_abbreviation",s("wrapWithAbbreviation","wrapWithAbbreviationAction"),"Wrap With Abbreviation"),t("update_tag",s("updateTag","updateTagAction"),"HTML/Update Tag"),[1,-1,10,-10,.1,-.1].forEach(function(e){var n=e>0?"increment":"decrement",r=String(Math.abs(e)).replace(".","").substring(0,2),i=n+"_number_by_"+r,o=n+r+"Action",a="Numbers/"+n.charAt(0).toUpperCase()+n.substring(1)+" number by "+Math.abs(e);t(i,s("incrementDecrement",o),a)}),{add:t,get:function(e){return i[e.toLowerCase()]},run:function(e,t){Array.isArray(t)||(t=r.toArray(arguments,1));var n=this.get(e);if(!n)throw new Error('Action "'+e+'" is not defined');return n.fn.apply(n,t)},getAll:function(){return i},getList:function(){var e=this.getAll();return Object.keys(e).map(function(t){return e[t]})},getMenu:function(e){var t=[];return e=e||[],this.getList().forEach(function(i){if(!i.options.hidden&&!~e.indexOf(i.name)){var o=n(i.name),s=t;if(i.options.label){var a=i.options.label.split("/");o=a.pop();for(var l,c;l=a.shift();)c=r.find(s,function(e){return"submenu"==e.type&&e.name==l}),c||(c={name:l,type:"submenu",items:[]},s.push(c)),s=c.items}s.push({type:"action",name:i.name,label:o})}}),t},getActionNameForMenuTitle:function(e,t){return r.find(t||this.getMenu(),function(t){return"action"!=t.type?this.getActionNameForMenuTitle(e,t.items):t.label==e||t.name==e?t.name:void 0},this)}}})},{"../utils/common":71,"./balance":4,"./base64":5,"./editPoints":6,"./evaluateMath":7,"./expandAbbreviation":8,"./incrementDecrement":9,"./lineBreaks":10,"./mergeLines":12,"./reflectCSSValue":13,"./removeTag":14,"./selectItem":15,"./selectLine":16,"./splitJoinTag":17,"./toggleComment":18,"./updateImageSize":19,"./updateTag":20,"./wrapWithAbbreviation":21}],12:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../assets/htmlMatcher"),n=e("../utils/common"),r=e("../utils/editor"),i=e("../assets/range");return{mergeLinesAction:function(e){var o=r.outputInfo(e),s=i(e.getSelectionRange());if(!s.length()){var a=t.find(o.content,e.getCaretPos());a&&(s=a.outerRange)}if(s.length()){for(var l=s.substring(o.content),c=n.splitByLines(l),u=1;u<c.length;u++)c[u]=c[u].replace(/^\s+/,"");l=c.join("").replace(/\s{2,}/," ");var f=l.length;return l=n.escapeText(l),e.replaceContent(l,s.start,s.end),e.createSelection(s.start,s.start+f),!0}return!1}}})},{"../assets/htmlMatcher":25,"../assets/range":29,"../utils/common":71,"../utils/editor":73}],13:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t,n){function r(e){var t=d.outputInfo(e),n=e.getCaretPos(),r=f.parseFromPosition(t.content,n);if(r){var i=r.itemFromPosition(n,!0);if(i){var o=r.source,s=r.options.offset,a=n-s-i.range().start;return g.exec(!1,[i]),o!==r.source?{data:r.source,start:s,end:s+o.length,caret:s+i.range().start+a}:void 0 | ||
+ | }}}function i(e){e=f.baseName(e);var t,n="^(?:\\-\\w+\\-)?";return new RegExp("opacity"!=e&&"filter"!=e||!c.get("css.reflect.oldIEOpacity")?(t=e.match(/^border-radius-(top|bottom)(left|right)/))?n+"(?:"+e+"|border-"+t[1]+"-"+t[2]+"-radius)$":(t=e.match(/^border-(top|bottom)-(left|right)-radius/))?n+"(?:"+e+"|border-radius-"+t[1]+t[2]+")$":n+e+"$":n+"(?:opacity|filter)$")}function o(e,t){var n=/^\-(\w+)\-/,r=n.test(e)?RegExp.$1.toLowerCase():"",i=f.findParts(t);return i.reverse(),i.forEach(function(e){var i=e.substring(t).replace(n,""),o=u.vendorPrefixes(i);o&&(r&&~o.indexOf(r)&&(i="-"+r+"-"+i),t=p.replaceSubstring(t,i,e))}),t}function s(e,t){var n=a(e.name(),e.value(),t.name(),t.value());n=o(t.name(),n),t.value(n)}function a(e,t,n,r){if(e=f.baseName(e),n=f.baseName(n),"opacity"==e&&"filter"==n)return r.replace(/opacity=[^)]*/i,"opacity="+Math.floor(100*parseFloat(t)));if("filter"==e&&"opacity"==n){var i=t.match(/opacity=([^)]*)/i);return i?p.prettifyNumber(parseInt(i[1],10)/100):r}return t}var l=e("../assets/handlerList"),c=e("../assets/preferences"),u=e("../resolver/css"),f=e("../editTree/css"),p=e("../utils/common"),h=e("../utils/action"),d=e("../utils/editor"),m=e("../resolver/cssGradient");c.define("css.reflect.oldIEOpacity",!1,"Support IE6/7/8 opacity notation, e.g. <code>filter:alpha(opacity=...)</code>. Note that CSS3 and SVG also provides <code>filter</code> property so this option is disabled by default.");var g=l.create();return n=n||{},n.exports={reflectCSSValueAction:function(e){return"css"!=e.getSyntax()?!1:h.compoundUpdate(e,r(e))},_defaultHandler:function(e){var t=i(e.name());e.parent.list().forEach(function(n){t.test(n.name())&&s(e,n)})},addHandler:function(e,t){g.add(e,t)},removeHandler:function(e){g.remove(e)}},g.add(n.exports._defaultHandler.bind(n.exports),{order:-1}),g.add(m.reflectValueHandler.bind(m)),n.exports})},{"../assets/handlerList":24,"../assets/preferences":27,"../editTree/css":35,"../resolver/css":62,"../resolver/cssGradient":63,"../utils/action":68,"../utils/common":71,"../utils/editor":73}],14:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../utils/common"),n=e("../utils/editor"),r=e("../assets/htmlMatcher");return{removeTagAction:function(e){var i=n.outputInfo(e),o=r.tag(i.content,e.getCaretPos());if(o){if(o.close){var s=t.narrowToNonSpace(i.content,o.innerRange),a=t.findNewlineBounds(i.content,s.start),l=t.getLinePadding(a.substring(i.content)),c=s.substring(i.content);c=t.unindentString(c,l),e.replaceContent(t.getCaretPlaceholder()+t.escapeText(c),o.outerRange.start,o.outerRange.end)}else e.replaceContent(t.getCaretPlaceholder(),o.range.start,o.range.end);return!0}return!1}}})},{"../assets/htmlMatcher":25,"../utils/common":71,"../utils/editor":73}],15:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,n,r){for(var i,o,s=y.outputInfo(e).content,a=s.length,l=v(-1,0),c=v(e.getSelectionRange()),u=c.start,f=1e5;u>=0&&a>u&&--f>0;){if(i=n(s,u,t)){if(l.equal(i))break;if(l=i.clone(),o=r(i.substring(s),i.start,c.clone()))return e.createSelection(o.start,o.end),!0;u=t?i.start:i.end-1}u+=t?-1:1}return!1}function n(e){var n=!0;return t(e,!1,function(e,t){return n?(n=!1,a(e,t)):l(e,t)},function(e,t,n){return s(e,t,n,!1)})}function r(e){return t(e,!0,l,function(e,t,n){return s(e,t,n,!0)})}function i(e,t,n){n=n||0;var r,i,s=[],a=-1,l="",u="";return t.forEach(function(t){switch(t.type){case"tag":i=e.substring(t.start,t.end),/^<[\w\:\-]/.test(i)&&s.push(v({start:t.start+1,end:t.end}));break;case"attribute":a=t.start,l=e.substring(t.start,t.end);break;case"string":s.push(v(a,t.end-a)),r=v(t),u=r.substring(e),c(u.charAt(0))&&r.start++,c(u.charAt(u.length-1))&&r.end--,s.push(r),"class"==l&&(s=s.concat(o(r.substring(e),r.start)))}}),s=s.filter(function(e){return e.length()?(e.shift(n),!0):void 0}),b.unique(s,function(e){return e.toString()})}function o(e,t){t=t||0;var n=[],r=w.create(e);r.eatSpace(),r.start=r.pos;for(var i;i=r.next();)/[\s\u00a0]/.test(i)&&(n.push(v(r.start+t,r.pos-r.start-1)),r.eatSpace(),r.start=r.pos);return n.push(v(r.start+t,r.pos-r.start)),n}function s(e,t,n,r){var o=i(e,S.parse(e),t);r&&o.reverse();var s=b.find(o,function(e){return e.equal(n)});if(s){var a=o.indexOf(s);return a<o.length-1?o[a+1]:null}if(r)return b.find(o,function(e){return e.start<n.start});if(!s){var l=o.filter(function(e){return e.inside(n.end)});if(l.length>1)return l[1]}return b.find(o,function(e){return e.end>n.end})}function a(e,t){for(var n;t>=0;){if(n=l(e,t))return n;t--}return null}function l(e,t){var n;return"<"==e.charAt(t)&&(n=e.substring(t,e.length).match(_))?v(t,n[0]):void 0}function c(e){return'"'==e||"'"==e}function u(e){var t=[e.nameRange(!0)],n=k.nestedSectionsInRule(e);return n.forEach(function(e){t.push(v.create2(e.start,e._selectorEnd))}),e.list().forEach(function(e){t=t.concat(f(e))}),t=v.sort(t),t=t.filter(function(e){return!!e.length()}),b.unique(t,function(e){return e.toString()})}function f(e){var t=e.valueRange(!0),n=[e.range(!0),t],r=e.value();return e.valueParts().forEach(function(e){var i=e.clone();n.push(i.shift(t.start));var o=w.create(e.substring(r));if(o.match(/^[\w\-]+\(/,!0)){o.start=o.pos,o.backUp(1),o.skipToPair("(",")"),o.backUp(1);var s=o.current();n.push(v(i.start+o.start,s)),C.findParts(s).forEach(function(e){n.push(v(i.start+o.start+e.start,e.substring(s)))})}}),n}function p(e,t,n){var r=u(e);n&&r.reverse();var i=b.find(r,function(e){return e.equal(t)});if(i)return r[r.indexOf(i)+1];var o=r.filter(function(e){return e.inside(t.end)});if(o.length)return o.sort(function(e,t){return e.length()-t.length()})[0];i=b.find(r,n?function(e){return e.end<t.start}:function(e){return e.end>t.start});return i||(i=r[0]),i}function h(e){return t(e,!1,k.locateRule.bind(k),m)}function d(e){return t(e,!0,k.locateRule.bind(k),g)}function m(e,t,n){var r=C.parse(e,{offset:t});return p(r,n,!1)}function g(e,t,n){var r=C.parse(e,{offset:t});return p(r,n,!0)}var v=e("../assets/range"),b=e("../utils/common"),y=e("../utils/editor"),x=e("../utils/action"),w=e("../assets/stringStream"),S=e("../parser/xml"),C=e("../editTree/css"),k=e("../utils/cssSections"),_=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;return{selectNextItemAction:function(e){return x.isSupportedCSS(e.getSyntax())?h(e):n(e)},selectPreviousItemAction:function(e){return x.isSupportedCSS(e.getSyntax())?d(e):r(e)}}})},{"../assets/range":29,"../assets/stringStream":31,"../editTree/css":35,"../parser/xml":60,"../utils/action":68,"../utils/common":71,"../utils/cssSections":72,"../utils/editor":73}],16:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){return{selectLineAction:function(e){var t=e.getCurrentLineRange();return e.createSelection(t.start,t.end),!0}}})},{}],17:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,n){var i=t.selfClosing()||" /",o=n.open.range.substring(n.source).replace(/\s*>$/,i+">"),s=e.getCaretPos();return o.length+n.outerRange.start<s&&(s=o.length+n.outerRange.start),o=r.escapeText(o),e.replaceContent(o,n.outerRange.start,n.outerRange.end),e.setCaretPos(s),!0}function n(e,t,n){var i=e.getCaretPos(),o=t.tag_nl===!0?"\n \n":"",s=n.outerContent().replace(/\s*\/>$/,">");return i=n.outerRange.start+s.length,s+=o+"</"+n.open.name+">",s=r.escapeText(s),e.replaceContent(s,n.outerRange.start,n.outerRange.end),e.setCaretPos(i),!0}var r=e("../utils/common"),i=(e("../assets/resources"),e("../assets/htmlMatcher")),o=e("../utils/editor"),s=e("../assets/profile");return{splitJoinTagAction:function(e,r){var a=o.outputInfo(e,null,r),l=s.get(a.profile),c=i.tag(a.content,e.getCaretPos());return c?c.close?t(e,l,c):n(e,l,c):!1}}})},{"../assets/htmlMatcher":25,"../assets/profile":28,"../assets/resources":30,"../utils/common":71,"../utils/editor":73}],18:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){var t=a(e.getSelectionRange()),n=u.outputInfo(e);if(!t.length()){var r=f.tag(n.content,e.getCaretPos());r&&(t=r.outerRange)}return o(e,"<!--","-->",t)}function n(e){var t=a(e.getSelectionRange()),n=u.outputInfo(e);if(!t.length()){var i=p.parseFromPosition(n.content,e.getCaretPos());if(i){var s=r(i,e.getCaretPos());t=s?s.range(!0):a(i.nameRange(!0).start,i.source)}}return t.length()||(t=a(e.getCurrentLineRange()),l.narrowToNonSpace(n.content,t)),o(e,"/*","*/",t)}function r(e,t){var n=t-(e.options.offset||0),r=/^[\s\n\r]/;return l.find(e.list(),function(t){return t.range().end===n?r.test(e.source.charAt(n)):t.range().inside(n)})}function i(e,t,n,r){for(var i=-1,o=-1,s=function(t,n){return e.substr(n,t.length)==t};t--;)if(s(n,t)){i=t;break}if(-1!=i){t=i;for(var l=e.length;l>=t++;)if(s(r,t)){o=t+r.length;break}}return-1!=i&&-1!=o?a(i,o-i):null}function o(e,t,n,r){function o(e){return e.replace(new RegExp("^"+l.escapeForRegexp(t)+"\\s*"),function(e){return a-=e.length,""}).replace(new RegExp("\\s*"+l.escapeForRegexp(n)+"$"),"")}var s=u.outputInfo(e).content,a=e.getCaretPos(),c=null,f=i(s,a,t,n);return f&&f.overlap(r)?(r=f,c=o(r.substring(s))):(c=t+" "+r.substring(s).replace(new RegExp(l.escapeForRegexp(t)+"\\s*|\\s*"+l.escapeForRegexp(n),"g"),"")+" "+n,a+=t.length+1),null!==c?(c=l.escapeText(c),e.setCaretPos(r.start),e.replaceContent(u.unindent(e,c),r.start,r.end),e.setCaretPos(a),!0):!1}var s=e("../assets/preferences"),a=e("../assets/range"),l=e("../utils/common"),c=e("../utils/action"),u=e("../utils/editor"),f=e("../assets/htmlMatcher"),p=e("../editTree/css");return{toggleCommentAction:function(e){var r=u.outputInfo(e);if(c.isSupportedCSS(r.syntax)){var i=e.getCaretPos(),o=f.tag(r.content,i);o&&o.open.range.inside(i)&&(r.syntax="html")}var a=s.getArray("css.syntaxes");return~a.indexOf(r.syntax)?n(e):t(e)}}})},{"../assets/htmlMatcher":25,"../assets/preferences":27,"../assets/range":29,"../editTree/css":35,"../utils/action":68,"../utils/common":71,"../utils/editor":73}],19:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){var t=e.getCaretPos(),n=o.outputInfo(e),l=a.parseFromPosition(n.content,t,!0);l&&"img"==(l.name()||"").toLowerCase()&&r(e,l.value("src"),function(n){if(n){var r=l.range(!0);l.value("width",n.width),l.value("height",n.height,l.indexOf("width")+1),s.compoundUpdate(e,i.extend(r,{data:l.toString(),caret:t}))}})}function n(e){var t=e.getCaretPos(),n=o.outputInfo(e),a=l.parseFromPosition(n.content,t,!0);if(a){var c,u=a.itemFromPosition(t,!0);u&&(c=/url\((["']?)(.+?)\1\)/i.exec(u.value()||""))&&r(e,c[2],function(n){if(n){var r=a.range(!0);a.value("width",n.width+"px"),a.value("height",n.height+"px",a.indexOf("width")+1),s.compoundUpdate(e,i.extend(r,{data:a.toString(),caret:t}))}})}}function r(e,t,n){var r;if(t){if(/^data:/.test(t))return r=c.decode(t.replace(/^data\:.+?;.+?,/,"")),n(s.getImageSize(r));var i=u.locateFile(e.getFilePath(),t);if(null===i)throw"Can't find "+t+" file";u.read(i,function(e,t){if(e)throw"Unable to read "+i+": "+e;t=String(t),n(s.getImageSize(t))})}}var i=e("../utils/common"),o=e("../utils/editor"),s=e("../utils/action"),a=e("../editTree/xml"),l=e("../editTree/css"),c=e("../utils/base64"),u=e("../plugin/file");return{updateImageSizeAction:function(e){return s.isSupportedCSS(e.getSyntax())?n(e):t(e),!0}}})},{"../editTree/css":35,"../editTree/xml":36,"../plugin/file":61,"../utils/action":68,"../utils/base64":69,"../utils/common":71,"../utils/editor":73}],20:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,n){var r=(t.attribute("class")||"").split(/\s+/g);n&&r.push("+"+t.name());var o=function(e){return i.replaceCounter(e,t.counter)};r.forEach(function(t){if(t){t=o(t);var n=t.charAt(0);"+"==n?e.addClass(t.substr(1)):"-"==n?e.removeClass(t.substr(1)):e.value("class",t)}}),t.attributeList().forEach(function(t){if("class"!=t.name.toLowerCase()){var n=t.name.charAt(0);if("+"==n){var r=t.name.substr(1),i=e.get(r);i?i.value(i.value()+o(t.value)):e.value(r,o(t.value))}else"-"==n?e.remove(t.name.substr(1)):e.value(t.name,o(t.value))}})}var n=e("../editTree/xml"),r=(e("../utils/editor"),e("../utils/action")),i=e("../utils/common"),o=e("../parser/abbreviation");return{updateTagAction:function(e,t){if(t=t||e.prompt("Enter abbreviation"),!t)return!1;var n=e.getContent(),i=r.captureContext(e),o=this.getUpdatedTag(t,i,n);return o?(o.name()!=i.name&&i.match.close&&e.replaceContent("</"+o.name()+">",i.match.close.range.start,i.match.close.range.end,!0),e.replaceContent(o.source,i.match.open.range.start,i.match.open.range.end,!0),!0):!1},getUpdatedTag:function(e,r,i,s){if(!r)return null;var a=o.parse(e,s||{}),l=n.parse(r.match.open.range.substring(i),{offset:r.match.outerRange.start});a.children.forEach(function(e,n){t(l,e,n)});var c=a.children[0];return c.data("nameResolved")||l.name(c.name()),l}}})},{"../editTree/xml":36,"../parser/abbreviation":53,"../utils/action":68,"../utils/common":71,"../utils/editor":73}],21:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../assets/range"),n=e("../assets/htmlMatcher"),r=e("../utils/common"),i=e("../utils/editor"),o=e("../utils/action"),s=e("../parser/abbreviation");return{wrapWithAbbreviationAction:function(e,a,l,c){var u=i.outputInfo(e,l,c);if(a=a||e.prompt("Enter abbreviation"),!a)return null;a=String(a);var f=t(e.getSelectionRange());if(!f.length()){var p=n.tag(u.content,f.start);if(!p)return!1;f=r.narrowToNonSpace(u.content,p.range)}var h=r.escapeText(f.substring(u.content)),d=s.expand(a,{pastedContent:i.unindent(e,h),syntax:u.syntax,profile:u.profile,contextNode:o.captureContext(e)});return d?(e.replaceContent(d,f.start,f.end),!0):!1}}})},{"../assets/htmlMatcher":25,"../assets/range":29,"../parser/abbreviation":53,"../utils/action":68,"../utils/common":71,"../utils/editor":73}],22:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t){var n=[],r=e,i=t;return r.length>i.length&&(r=t,i=e),i.forEach(function(e){~r.indexOf(e)&&n.push(e)}),n}function n(e,t){"string"==typeof e&&(e=JSON.parse(e)),t||(e=i(e)),d=e.vendors,h=e.css,m=e.era}function i(e){return"string"==typeof e&&(e=JSON.parse(e)),{vendors:o(e),css:s(e),era:a(e)}}function o(e){var t={};return Object.keys(e.agents).forEach(function(n){var r=e.agents[n];t[n]={prefix:r.prefix,versions:r.versions}}),t}function s(e){{var t={};e.cats.CSS}return Object.keys(e.data).forEach(function(n){var r=e.data[n];n in p&&p[n].forEach(function(e){t[e]=r.stats})}),t}function a(e){return Object.keys(e.eras).sort(function(e,t){return parseInt(e.substr(1))-parseInt(t.substr(1))})}function l(){var e=Object.keys(d),n=u.getArray("caniuse.vendors");return n&&"all"!=n[0]?t(e,n):e}function c(){var e=u.get("caniuse.era"),t=m.indexOf(e);return~t||(t=m.indexOf("e-2")),t}var u=e("./preferences"),f=e("../utils/common");u.define("caniuse.enabled",!0,"Enable support of Can I Use database. When enabled, CSS abbreviation resolver will look at Can I Use database first before detecting CSS properties that should be resolved"),u.define("caniuse.vendors","all","A comma-separated list vendor identifiers (as described in Can I Use database) that should be supported when resolving vendor-prefixed properties. Set value to <code>all</code> to support all available properties"),u.define("caniuse.era","e-2","Browser era, as defined in Can I Use database. Examples: <code>e0</code> (current version), <code>e1</code> (near future) <code>e-2</code> (2 versions back) and so on.");var p={"border-image":["border-image"],"css-boxshadow":["box-shadow"],"css3-boxsizing":["box-sizing"],multicolumn:["column-width","column-count","columns","column-gap","column-rule-color","column-rule-style","column-rule-width","column-rule","column-span","column-fill"],"border-radius":["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],transforms2d:["transform"],"css-hyphens":["hyphens"],"css-transitions":["transition","transition-property","transition-duration","transition-timing-function","transition-delay"],"font-feature":["font-feature-settings"],"css-animation":["animation","animation-name","animation-duration","animation-timing-function","animation-iteration-count","animation-direction","animation-play-state","animation-delay","animation-fill-mode","@keyframes"],"css-gradients":["linear-gradient"],"css-masks":["mask-image","mask-source-type","mask-repeat","mask-position","mask-clip","mask-origin","mask-size","mask","mask-type","mask-box-image-source","mask-box-image-slice","mask-box-image-width","mask-box-image-outset","mask-box-image-repeat","mask-box-image","clip-path","clip-rule"],"css-featurequeries":["@supports"],flexbox:["flex","inline-flex","flex-direction","flex-wrap","flex-flow","order","flex"],calc:["calc"],"object-fit":["object-fit","object-position"],"css-grid":["grid","inline-grid","grid-template-rows","grid-template-columns","grid-template-areas","grid-template","grid-auto-rows","grid-auto-columns"," grid-auto-flow","grid-auto-position","grid"," grid-row-start","grid-column-start","grid-row-end","grid-column-end","grid-column","grid-row","grid-area","justify-self","justify-items","align-self","align-items"],"css-repeating-gradients":["repeating-linear-gradient"],"css-filters":["filter"],"user-select-none":["user-select"],"intrinsic-width":["min-content","max-content","fit-content","fill-available"],"css3-tabsize":["tab-size"]},h=null,d=null,m=null,g=null;return function(e){if("undefined"==typeof r||!r.amd)try{var t=e("fs"),n=e("path");g=t.readFileSync(n.join(__dirname,"../caniuse.json"),{encoding:"utf8"})}catch(i){}}(e),g&&n(g),{load:n,optimize:i,resolvePrefixes:function(e){if(!(u.get("caniuse.enabled")&&h&&e in h))return null;var t=[],n=h[e],r=c();return l().forEach(function(e){for(var i,o=d[e].versions.slice(r),s=0;s<o.length;s++)if(i=o[s],i&&~n[e][i].indexOf("x")){t.push(d[e].prefix);break}}),f.unique(t).sort(function(e,t){return t.length-e.length})}}})},{"../utils/common":71,"./preferences":27}],23:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t,n){function r(e){return{data:e}}var i={},o=/([@\!]?)([\w\-:]+)\s*=\s*(['"])(.*?)\3/g;return n=n||{},n.exports={add:function(e,t){var n=this;i[e]=function(){var r=t.apply(n,arguments);return r&&(r.type=e),r}},get:function(e){return i[e]},create:function(e){var t=[].slice.call(arguments,1),n=this.get(e);return n?n.apply(this,t):null},is:function(e,t){return this.type(e)===t},type:function(e){return e&&e.type}},n.exports.add("element",function(e,t,n){var r={name:e,is_empty:!!n};if(t)if(r.attributes=[],Array.isArray(t))r.attributes=t;else if("string"==typeof t)for(var i;i=o.exec(t);)r.attributes.push({name:i[2],value:i[4],isDefault:"@"==i[1],isImplied:"!"==i[1]});else r.attributes=Object.keys(t).map(function(e){return{name:e,value:t[e]}});return r}),n.exports.add("snippet",r),n.exports.add("reference",r),n.exports.add("empty",function(){return{}}),n.exports})},{}],24:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(){this._list=[]}var n=e("../utils/common");return t.prototype={add:function(e,t){var r=this._list.length;t&&"order"in t&&(r=1e4*t.order),this._list.push(n.extend({},t,{order:r,fn:e}))},remove:function(e){var t=n.find(this._list,function(t){return t.fn===e});t&&this._list.splice(this._list.indexOf(t),1)},list:function(){return this._list.sort(function(e,t){return t.order-e.order})},listFn:function(){return this.list().map(function(e){return e.fn})},exec:function(e,t){t=t||[];var r=null;return n.find(this.list(),function(n){return r=n.fn.apply(n,t),r!==e?!0:void 0}),r}},{create:function(){return new t}}})},{"../utils/common":71}],25:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t){return{name:t[1],selfClose:!!t[3],range:a(e,t[0]),type:"open"}}function n(e,t){return{name:t[1],range:a(e,t[0]),type:"close"}}function r(e,t){return{range:a(e,"number"==typeof t?t-e:t[0]),type:"comment"}}function i(e){var r,i={};return{open:function(e){var t=this.matches(e);return t&&"open"==t.type?t:null},close:function(e){var t=this.matches(e);return t&&"close"==t.type?t:null},matches:function(o){var s="p"+o;if(!(s in i)&&(i[s]=!1,"<"==e.charAt(o))){var a=e.slice(o);(r=a.match(l))?i[s]=t(o,r):(r=a.match(c))&&(i[s]=n(o,r))}return i[s]},text:function(){return e},clean:function(){i=e=r=null}}}function o(e,t,n){return e.substring(t,t+n.length)==n}function s(e,t){for(var n=[],r=null,i=t.text(),s=e.range.end,a=i.length;a>s;s++){if(o(i,s,"<!--"))for(var l=s;a>l;l++)if(o(i,l,"-->")){s=l+3;break}if(r=t.matches(s)){if("open"!=r.type||r.selfClose){if("close"==r.type){if(!n.length)return r.name==e.name?r:null;if(n[n.length-1]==r.name)n.pop();else{for(var c=!1;n.length&&!c;){var u=n.pop();u==r.name&&(c=!0)}if(!n.length&&!c)return r.name==e.name?r:null}}}else n.push(r.name);s=r.range.end-1}}}var a=e("./range"),l=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,c=/^<\/([\w\:\-]+)[^>]*>/;return{find:function(e,t){for(var n,l,c=i(e),u=null,f=null,p=t;p>=0;p--)if(u=c.open(p)){if(u.selfClose){if(u.range.cmp(t,"lt","gt"))break;continue}if(f=s(u,c)){var h=a.create2(u.range.start,f.range.end);if(h.contains(t))break}else if(u.range.contains(t))break;u=null}else if(o(e,p,"-->")){for(n=p-1;n>=0&&!o(e,n,"-->");n--)if(o(e,n,"<!--")){p=n;break}}else if(o(e,p,"<!--")){for(n=p+4,l=e.length;l>n;n++)if(o(e,n,"-->")){n+=3;break}u=r(p,n);break}if(c.clean(),u){var d=null,m=null;if(f?(d=a.create2(u.range.start,f.range.end),m=a.create2(u.range.end,f.range.start)):d=m=a.create2(u.range.start,u.range.end),"comment"==u.type){var g=d.substring(e);m.start+=g.length-g.replace(/^<\!--\s*/,"").length,m.end-=g.length-g.replace(/\s*-->$/,"").length}return{open:u,close:f,type:"comment"==u.type?"comment":"tag",innerRange:m,innerContent:function(){return this.innerRange.substring(e)},outerRange:d,outerContent:function(){return this.outerRange.substring(e)},range:m.length()&&m.cmp(t,"lte","gte")?m:d,content:function(){return this.range.substring(e)},source:e}}},tag:function(e,t){var n=this.find(e,t);return n&&"tag"==n.type?n:void 0}}})},{"./range":29}],26:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){return{log:function(){"undefined"!=typeof console&&console.log&&console.log.apply(console,arguments)}}})},{}],27:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return"string"==typeof e?(e=e.toLowerCase(),"yes"==e||"true"==e||"1"==e):!!e}function n(e){return"object"==typeof e&&!Array.isArray(e)&&"value"in e&&Object.keys(e).length<3}var r=e("../utils/common"),i={},o={},s=null,a=null;return{define:function(e,t,r){var i=e;"string"==typeof e&&(i={},i[e]={value:t,description:r}),Object.keys(i).forEach(function(e){var t=i[e];o[e]=n(t)?t:{value:t}})},set:function(e,n){var r=e;"string"==typeof e&&(r={},r[e]=n),Object.keys(r).forEach(function(e){var n=r[e];if(!(e in o))throw new Error('Property "'+e+'" is not defined. You should define it first with `define` method of current module');if(n!==o[e].value){switch(typeof o[e].value){case"boolean":n=t(n);break;case"number":n=parseInt(n+"",10)||0;break;default:null!==n&&(n+="")}i[e]=n}else e in i&&delete i[e]})},get:function(e){return e in i?i[e]:e in o?o[e].value:void 0},getArray:function(e){var t=this.get(e);return"undefined"==typeof t||null===t||""===t?null:(t=t.split(",").map(r.trim),t.length?t:null)},getDict:function(e){var t={};return this.getArray(e).forEach(function(e){var n=e.split(":");t[n[0]]=n[1]}),t},description:function(e){return e in o?o[e].description:void 0},remove:function(e){Array.isArray(e)||(e=[e]),e.forEach(function(e){e in i&&delete i[e],e in o&&delete o[e]})},list:function(){return Object.keys(o).sort().map(function(e){return{name:e,value:this.get(e),type:typeof o[e].value,description:o[e].description}},this)},load:function(e){Object.keys(e).forEach(function(t){this.set(t,e[t])},this)},exportModified:function(){return r.extend({},i)},reset:function(){i={}},_startTest:function(){s=o,a=i,o={},i={}},_stopTest:function(){o=s,i=a}}})},{"../utils/common":71}],28:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){o.extend(this,c,e)}function n(e,t){switch(String(t||"").toLowerCase()){case"lower":return e.toLowerCase();case"upper":return e.toUpperCase()}return e}function r(e,n){return l[e.toLowerCase()]=new t(n)}function i(){r("xhtml"),r("html",{self_closing_tag:!1,compact_bool:!0}),r("xml",{self_closing_tag:!0,tag_nl:!0}),r("plain",{tag_nl:!1,indent:!1,place_cursor:!1}),r("line",{tag_nl:!1,indent:!1,extraFilters:"s"}),r("css",{tag_nl:!0}),r("css_line",{tag_nl:!1})}var o=e("../utils/common"),s=e("./resources"),a=e("./preferences");a.define("profile.allowCompactBoolean",!0,'This option can be used to globally disable compact form of boolean attribues (attributes where name and value are equal). With compactform enabled, HTML tags can be outputted as <code><div contenteditable></code> instead of <code><div contenteditable="contenteditable"></code>'),a.define("profile.booleanAttributes","^contenteditable|seamless$","A regular expression for attributes that should be boolean by default.If attribute name matches this expression, you don\u2019t have to write dot after attribute name in Emmet abbreviation to mark it as boolean.");var l={},c={tag_case:"asis",attr_case:"asis",attr_quotes:"double",tag_nl:"decide",tag_nl_leaf:!1,place_cursor:!0,indent:!0,inline_break:3,compact_bool:!1,self_closing_tag:"xhtml",filters:"",extraFilters:""};return t.prototype={tagName:function(e){return n(e,this.tag_case)},attributeName:function(e){return n(e,this.attr_case)},attributeQuote:function(){return"single"==this.attr_quotes?"'":'"'},selfClosing:function(){return"xhtml"==this.self_closing_tag?" /":this.self_closing_tag===!0?"/":""},cursor:function(){return this.place_cursor?o.getCaretPlaceholder():""},isBoolean:function(e,t){if(e==t)return!0;var n=a.get("profile.booleanAttributes");return!t&&n?(n=new RegExp(n,"i"),n.test(e)):!1},allowCompactBoolean:function(){return this.compact_bool&&a.get("profile.allowCompactBoolean")}},i(),{create:function(e,n){return 2==arguments.length?r(e,n):new t(o.defaults(e||{},c))},get:function(e,n){if(!e&&n){var r=s.findItem(n,"profile");r&&(e=r)}return e?e instanceof t?e:"string"==typeof e&&e.toLowerCase()in l?l[e.toLowerCase()]:this.create(e):l.plain},remove:function(e){e=(e||"").toLowerCase(),e in l&&delete l[e]},reset:function(){l={},i()},stringCase:n}})},{"../utils/common":71,"./preferences":27,"./resources":30}],29:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t,n){function r(e,t,n){switch(n){case"eq":case"==":return e===t;case"lt":case"<":return t>e;case"lte":case"<=":return t>=e;case"gt":case">":return e>t;case"gte":case">=":return e>=t}}function i(e,t){"object"==typeof e&&"start"in e?(this.start=Math.min(e.start,e.end),this.end=Math.max(e.start,e.end)):Array.isArray(e)?(this.start=e[0],this.end=e[1]):(t="string"==typeof t?t.length:+t,this.start=e,this.end=e+t)}return i.prototype={length:function(){return Math.abs(this.end-this.start)},equal:function(e){return this.cmp(e,"eq","eq")},shift:function(e){return this.start+=e,this.end+=e,this},overlap:function(e){return e.start<=this.end&&e.end>=this.start},intersection:function(e){if(this.overlap(e)){var t=Math.max(e.start,this.start),n=Math.min(e.end,this.end);return new i(t,n-t)}return null},union:function(e){if(this.overlap(e)){var t=Math.min(e.start,this.start),n=Math.max(e.end,this.end);return new i(t,n-t)}return null},inside:function(e){return this.cmp(e,"lte","gt")},contains:function(e){return this.cmp(e,"lt","gt")},include:function(e){return this.cmp(e,"lte","gte")},cmp:function(e,t,n){var o,s;return e instanceof i?(o=e.start,s=e.end):o=s=e,r(this.start,o,t||"<=")&&r(this.end,s,n||">")},substring:function(e){return this.length()>0?e.substring(this.start,this.end):""},clone:function(){return new i(this.start,this.length())},toArray:function(){return[this.start,this.end]},toString:function(){return this.valueOf()},valueOf:function(){return"{"+this.start+", "+this.length()+"}"}},n.exports=function(e,t){return"undefined"==typeof e||null===e?null:e instanceof i?e:("object"==typeof e&&"start"in e&&"end"in e&&(t=e.end-e.start,e=e.start),new i(e,t))},n.exports.create=n.exports,n.exports.isRange=function(e){return e instanceof i},n.exports.create2=function(e,t){return"number"==typeof e&&"number"==typeof t&&(t-=e),this.create(e,t)},n.exports.sort=function(e,t){return e=e.sort(function(e,t){return e.start===t.start?t.end-e.end:e.start-t.start}),t&&e.reverse(),e},n.exports})},{}],30:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t){function n(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function i(e){return u.replaceUnescapedSymbol(e,"|",u.getCaretPlaceholder())}function o(e,t,n){return t=i(t),"snippets"==n?f.create("snippet",t):"abbreviations"==n?s(e,t):void 0}function s(e,t){e=u.trim(e);var n;return(n=v.exec(t))?f.create("element",n[1],n[2],"/"==n[4]):f.create("reference",t)}function a(e){return e.replace(/:$/,"").replace(/:/g,"-")}function l(e){var t={};return n(e,function(e,n){for(var r=n.split("|"),i=r.length-1;i>=0;i--)t[r[i]]=e}),t}var c=e("./handlerList"),u=e("../utils/common"),f=e("./elements"),p=(e("../assets/logger"),e("../vendor/stringScore")),h=e("../resolver/css"),d="system",m="user",g={},v=/^<(\w+\:?[\w\-]*)((?:\s+[@\!]?[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,b={},y={},x=c.create();return u.extend(t,{setVocabulary:function(e,t){g={};var r={};n(e,function(e,t){var i={};n(e,function(e,t){("abbreviations"==t||"snippets"==t)&&(e=l(e)),i[t]=e}),r[t]=i}),t==d?b=r:y=r},getVocabulary:function(e){return e==d?b:y},getMatchedResource:function(e,t){return x.exec(null,u.toArray(arguments))||this.findSnippet(t,e.name())},getVariable:function(e){return(this.getSection("variables")||{})[e]},setVariable:function(e,t){var n=this.getVocabulary("user")||{};"variables"in n||(n.variables={}),n.variables[e]=t,this.setVocabulary(n,"user")},hasSyntax:function(e){return e in this.getVocabulary(m)||e in this.getVocabulary(d)},addResolver:function(e,t){x.add(e,t)},removeResolver:function(e){x.remove(e)},getSection:function(e){if(!e)return null;e in g||(g[e]=u.deepMerge({},b[e],y[e]));for(var t,n=g[e],r=u.toArray(arguments,1);n&&(t=r.shift());){if(!(t in n))return null;n=n[t]}return n},findItem:function(e,t){for(var n=this.getSection(e);n;){if(t in n)return n[t];n=this.getSection(n["extends"])}},findSnippet:function(e,t,n){if(!e||!t)return null;n=n||[];var r=[t];~t.indexOf("-")&&r.push(t.replace(/\-/g,":"));var i=this.getSection(e),s=null;return["snippets","abbreviations"].some(function(t){var n=this.getSection(e,t);return n?r.some(function(e){return n[e]?s=o(e,n[e],t):void 0}):void 0},this),n.push(e),s||!i["extends"]||~n.indexOf(i["extends"])?s:this.findSnippet(i["extends"],t,n)},fuzzyFindSnippet:function(e,t,n){var r=this.fuzzyFindMatches(e,t,n)[0];return r?r.value.parsedValue:void 0},fuzzyFindMatches:function(e,t,n){n=n||.3,t=a(t);var r=this.getAllSnippets(e);return Object.keys(r).map(function(e){var n=r[e];return{key:e,score:p.score(n.nk,t,.1),value:n}}).filter(function(e){return e.score>=n}).sort(function(e,t){return e.score-t.score}).reverse()},getAllSnippets:function(e){var t="all-"+e;if(!g[t]){var r=[],i=e,s=[];do{var l=this.getSection(i);if(!l)break;["snippets","abbreviations"].forEach(function(e){var t={};n(l[e]||null,function(n,r){t[r]={nk:a(r),value:n,parsedValue:o(r,n,e),type:e}}),r.push(t)}),s.push(i),i=l["extends"]}while(i&&!~s.indexOf(i));g[t]=u.extend.apply(u,r.reverse())}return g[t]},getNewline:function(){var e=this.getVariable("newline");return"string"==typeof e?e:"\n"},setNewline:function(e){this.setVariable("newline",e),this.setVariable("nl",e)}}),t.addResolver(h.resolve.bind(h)),function(e){if("undefined"==typeof r||!r.amd)try{var n=e("fs"),i=e("path"),o=n.readFileSync(i.join(__dirname,"../snippets.json"),{encoding:"utf8"});t.setVocabulary(JSON.parse(o),d)}catch(s){}}(e),t})},{"../assets/logger":26,"../resolver/css":62,"../utils/common":71,"../vendor/stringScore":77,"./elements":23,"./handlerList":24}],31:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t) | ||
+ | };r(function(e,t,n){function r(e){this.pos=this.start=0,this.string=e,this._length=e.length}return r.prototype={eol:function(){return this.pos>=this._length},sol:function(){return 0===this.pos},peek:function(){return this.string.charAt(this.pos)},next:function(){return this.pos<this._length?this.string.charAt(this.pos++):void 0},eat:function(e){var t,n=this.string.charAt(this.pos);return t="string"==typeof e?n==e:n&&(e.test?e.test(n):e(n)),t?(++this.pos,n):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this._length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},skipToPair:function(e,t,n){for(var r,i=0,o=this.pos,s=this._length;s>o;)if(r=this.string.charAt(o++),r==e)i++;else if(r==t){if(i--,1>i)return this.pos=o,!0}else!n||'"'!=r&&"'"!=r||this.skipString(r);return!1},skipQuoted:function(e){var t=this.string.charAt(e?this.pos:this.pos-1);return'"'===t||"'"===t?(e&&this.pos++,this.skipString(t)):void 0},skipString:function(e){for(var t,n=this.pos,r=this._length;r>n;)if(t=this.string.charAt(n++),"\\"!=t&&t==e)return this.pos=n,!0;return!1},backUp:function(e){this.pos-=e},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&t!==!1&&(this.pos+=r[0].length),r}var i=n?function(e){return e.toLowerCase()}:function(e){return e};return i(this.string).indexOf(i(e),this.pos)==this.pos?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(e){return this.string.slice(this.start,this.pos-(e?1:0))}},n.exports=function(e){return new r(e)},n.exports.create=n.exports,n.exports})},{}],32:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../utils/common"),n=e("./stringStream"),r=e("./resources"),i=100,o=0,s={replaceCarets:!1,escape:function(e){return"\\"+e},tabstop:function(e){return e.token},variable:function(e){return e.token}};return{extract:function(e,n){var r={carets:""},i=[];n=t.extend({},s,n,{tabstop:function(e){var t=e.token,n="";return"cursor"==e.placeholder?i.push({start:e.start,end:e.start+t.length,group:"carets",value:""}):("placeholder"in e&&(r[e.group]=e.placeholder),e.group in r&&(n=r[e.group]),i.push({start:e.start,end:e.start+t.length,group:e.group,value:n})),t}}),n.replaceCarets&&(e=e.replace(new RegExp(t.escapeForRegexp(t.getCaretPlaceholder()),"g"),"${0:cursor}")),e=this.processText(e,n);var o="",a=0,l=i.map(function(t){o+=e.substring(a,t.start);var n=o.length,i=r[t.group]||"";return o+=i,a=t.end,{group:t.group,start:n,end:n+i.length}});return o+=e.substring(a),{text:o,tabstops:l.sort(function(e,t){return e.start-t.start})}},processText:function(e,r){r=t.extend({},s,r);for(var i,o,a,l="",c=n.create(e);i=c.next();)if("\\"!=i||c.eol()){if(a=i,"$"==i)if(c.start=c.pos-1,o=c.match(/^[0-9]+/))a=r.tabstop({start:l.length,group:c.current().substr(1),token:c.current()});else if(o=c.match(/^\{([a-z_\-][\w\-]*)\}/))a=r.variable({start:l.length,name:o[1],token:c.current()});else if(o=c.match(/^\{([0-9]+)(:.+?)?\}/,!1)){c.skipToPair("{","}");var u={start:l.length,group:o[1],token:c.current()},f=u.token.substring(u.group.length+2,u.token.length-1);f&&(u.placeholder=f.substr(1)),a=r.tabstop(u)}l+=a}else l+=r.escape(c.next());return l},upgrade:function(e,t){var n=0,r={tabstop:function(e){var r=parseInt(e.group,10);return r>n&&(n=r),e.placeholder?"${"+(r+t)+":"+e.placeholder+"}":"${"+(r+t)+"}"}};return["start","end","content"].forEach(function(t){e[t]=this.processText(e[t],r)},this),n},variablesResolver:function(e){var n={};return function(o,s){if("child"==s)return o;if("cursor"==s)return t.getCaretPlaceholder();var a=e.attribute(s);if("undefined"!=typeof a&&a!==o)return a;var l=r.getVariable(s);return l?l:(n[s]||(n[s]=i++),"${"+n[s]+":"+s+"}")}},replaceVariables:function(e,t){t=t||{};var n="function"==typeof t?t:function(e,n){return n in t?t[n]:null};return this.processText(e,{variable:function(e){var t=n(e.token,e.name,e);return null===t&&(t=r.getVariable(e.name)),(null===t||"undefined"==typeof t)&&(t=e.token),t}})},resetTabstopIndex:function(){o=0,i=100},abbrOutputProcessor:function(e,t){var n=0,r=this,i={tabstop:function(e){var t=parseInt(e.group,10);if(0===t)return"${0}";if(t>n&&(n=t),e.placeholder){var s=t+o,a=r.processText(e.placeholder,i);return"${"+s+":"+a+"}"}return"${"+(t+o)+"}"}};return e=this.processText(e,i),e=this.replaceVariables(e,this.variablesResolver(t)),o+=n+1,e}}})},{"../utils/common":71,"./resources":30,"./stringStream":31}],33:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){function e(e){this.tokens=e,this._position=0,this.reset()}return e.prototype={next:function(){if(this.hasNext()){var e=this.tokens[++this._i];return this._position=e.start,e}return this._i=this._il,null},current:function(){return this.tokens[this._i]},peek:function(){return this.tokens[this._i+i]},position:function(){return this._position},hasNext:function(){return this._i<this._il-1},reset:function(){this._i=0,this._il=this.tokens.length},item:function(){return this.tokens[this._i]},itemNext:function(){return this.tokens[this._i+1]},itemPrev:function(){return this.tokens[this._i-1]},nextUntil:function(e,t){for(var n,r="string"==typeof e?function(t){return t.type==e}:e;(n=this.next())&&(t&&t.call(this,n),!r.call(this,n)););}},{create:function(t){return new e(t)}}})},{}],34:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t){this.options=i.extend({offset:0},t),this.source=e,this._children=[],this._positions={name:0},this.initialize.apply(this,arguments)}function n(e,t,n){this.parent=e,this._name=t.value,this._value=n?n.value:"",this._positions={name:t.start,value:n?n.start:-1},this.initialize.apply(this,arguments)}var r=e("../assets/range"),i=e("../utils/common"),o=e("../vendor/klass");return t.extend=o.extend,t.prototype={type:"container",initialize:function(){},_pos:function(e,t){return e+(t?this.options.offset:0)},_updateSource:function(e,t,n){var o=r.create(t,"undefined"==typeof n?0:n-t),s=e.length-o.length(),a=function(e){Object.keys(e).forEach(function(t){e[t]>=o.end&&(e[t]+=s)})};a(this._positions);var l=function(e){e.forEach(function(e){a(e._positions),"container"==e.type&&l(e.list())})};l(this.list()),this.source=i.replaceSubstring(this.source,e,o)},add:function(e,t){var r=new n(e,t);return this._children.push(r),r},get:function(e){return"number"==typeof e?this.list()[e]:"string"==typeof e?i.find(this.list(),function(t){return t.name()===e}):e},getAll:function(e){Array.isArray(e)||(e=[e]);var t=[],n=[];return e.forEach(function(e){"string"==typeof e?t.push(e):"number"==typeof e&&n.push(e)}),this.list().filter(function(e,r){return~n.indexOf(r)||~t.indexOf(e.name())})},list:function(){return this._children},remove:function(e){var t=this.get(e);if(t){this._updateSource("",t.fullRange());var n=this._children.indexOf(t);~n&&this._children.splice(n,1)}},indexOf:function(e){return this.list().indexOf(this.get(e))},value:function(e,t,n){var r=this.get(e);return r?r.value(t):"undefined"!=typeof t?this.add(e,t,n):void 0},values:function(e){return this.getAll(e).map(function(e){return e.value()})},name:function(e){return"undefined"!=typeof e&&this._name!==(e=String(e))&&(this._updateSource(e,this._positions.name,this._positions.name+this._name.length),this._name=e),this._name},nameRange:function(e){return r.create(this._positions.name+(e?this.options.offset:0),this.name())},range:function(e){return r.create(e?this.options.offset:0,this.valueOf())},itemFromPosition:function(e,t){return i.find(this.list(),function(n){return n.range(t).inside(e)})},toString:function(){return this.valueOf()},valueOf:function(){return this.source}},n.extend=o.extend,n.prototype={type:"element",initialize:function(){},_pos:function(e,t){return e+(t?this.parent.options.offset:0)},value:function(e){return"undefined"!=typeof e&&this._value!==(e=String(e))&&(this.parent._updateSource(e,this.valueRange()),this._value=e),this._value},name:function(e){return"undefined"!=typeof e&&this._name!==(e=String(e))&&(this.parent._updateSource(e,this.nameRange()),this._name=e),this._name},namePosition:function(e){return this._pos(this._positions.name,e)},valuePosition:function(e){return this._pos(this._positions.value,e)},range:function(e){return r.create(this.namePosition(e),this.valueOf())},fullRange:function(e){return this.range(e)},nameRange:function(e){return r.create(this.namePosition(e),this.name())},valueRange:function(e){return r.create(this.valuePosition(e),this.value())},toString:function(){return this.valueOf()},valueOf:function(){return this.name()+this.value()}},{EditContainer:t,EditElement:n,createToken:function(e,t,n){var r={start:e||0,value:t||"",type:n};return r.end=r.start+r.value.length,r}}})},{"../assets/range":29,"../utils/common":71,"../vendor/klass":76}],35:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,n){n=n||g|v,t=e.substring(t);var r;return n&g&&(r=t.match(d))&&(e.start+=r[0].length),n&v&&(r=t.match(m))&&(e.end-=r[0].length),e.end<e.start&&(e.end=e.start),e}function n(e,n){var r,i,o,s=e.current();if(!s)return null;for(var a={white:1,line:1,comment:1};(s=e.current())&&s.type in a;)e.next();if(!e.hasNext())return null;s=e.current(),r=u(s.start,s.value);for(var l="@"==s.value.charAt(0);s=e.next();)if(r.end=s.end,":"==s.type||"white"==s.type){if(r.end=s.start,e.next(),":"==s.type||l)break}else if(";"==s.type||"line"==s.type){r.end=s.start,i=u(s.start,0),e.next();break}if(s=e.current(),!i&&s){"line"==s.type&&(c=s),i=u(s.start,s.value);for(var c;s=e.next();)if(i.end=s.end,"line"==s.type)c=s;else{if("}"==s.type||";"==s.type){i.end=s.start,";"==s.type&&(o=u(s.start,s.value)),e.next();break}if(":"==s.type&&c){i.end=c.start,e._i=e.tokens.indexOf(c);break}}}return i||(i=u(r.end,0)),{name:t(r,n),value:t(i,n,g|(o?v:0)),end:o||u(i.end,0)}}function r(e){var t,n=f.create(e),r=[],i=/[\s\u00a0,;]/,o=function(){n.next(),r.push(u(n.start,n.current())),n.start=n.pos};for(n.eatSpace(),n.start=n.pos;t=n.next();)if('"'==t||"'"==t){if(n.next(),!n.skipTo(t))break;o()}else if("("==t){if(n.backUp(1),!n.skipToPair("(",")"))break;n.backUp(1),o()}else i.test(t)&&(r.push(u(n.start,n.current().length-1)),n.eatWhile(i),n.start=n.pos);return o(),s.unique(r.filter(function(e){return!!e.length()}))}function i(e,t,n){var r=o(t,n);r.forEach(function(t){e._children.push(new y(e,a.createToken(t.name.start,t.nameText),a.createToken(t.value.start,t.valueText),a.createToken(t.end.start,t.endText)))})}function o(e,t){t=t||0,e=e.replace(m,"");var r=[];if(!e)return r;for(var i,o=l.parse(e),s=p.create(o);i=n(s,e);)r.push({nameText:i.name.substring(e),name:i.name.shift(t),valueText:i.value.substring(e),value:i.value.shift(t),endText:i.end.substring(e),end:i.end.shift(t)});return r}var s=e("../utils/common"),a=e("./base"),l=e("../parser/css"),c=e("../utils/cssSections"),u=e("../assets/range"),f=e("../assets/stringStream"),p=e("../assets/tokenIterator"),h={styleBefore:"\n ",styleSeparator:": ",offset:0},d=/^\s+/,m=/\s+$/,g=1,v=2,b=a.EditContainer.extend({initialize:function(e,t){s.extend(this.options,h,t),Array.isArray(e)&&(e=l.toSource(e));var n=c.findAllRules(e),r=n.shift(),o=[];n.forEach(function(e){var t=!s.find(o,function(t){return t.contains(e)});t&&o.push(e)});var a=u.create2(r.start,r._selectorEnd);this._name=a.substring(e),this._positions.name=a.start,this._positions.contentStart=r._contentStart+1;var f=r._contentStart+1,p=(r.end-1,this);o.forEach(function(t){i(p,e.substring(f,t.start),f);s.extend({},p.options,{offset:t.start+p.options.offset});f=t.end}),i(this,e.substring(f,r.end-1),f),this._saveStyle()},_saveStyle:function(){var e=this._positions.contentStart,t=this.source;this.list().forEach(function(n){if("container"!==n.type){n.styleBefore=t.substring(e,n.namePosition());var r=s.splitByLines(n.styleBefore);r.length>1&&(n.styleBefore="\n"+r[r.length-1]),n.styleSeparator=t.substring(n.nameRange().end,n.valuePosition());var i=n.styleBefore.split("*/");n.styleBefore=i[i.length-1],n.styleSeparator=n.styleSeparator.replace(/\/\*.*?\*\//g,""),e=n.range().end}})},namePosition:function(e){return this._pos(this._positions.name,e)},valuePosition:function(e){return this._pos(this._positions.contentStart,e)},valueRange:function(e){return u.create2(this.valuePosition(e),this._pos(this.valueOf().length,e)-1)},add:function(e,t,n){var r=this.list(),i=this._positions.contentStart,o=s.pick(this.options,"styleBefore","styleSeparator");"undefined"==typeof n&&(n=r.length);var l=r[n];l?i=l.fullRange().start:(l=r[n-1])&&(l.end(";"),i=l.range().end),l&&(o=s.pick(l,"styleBefore","styleSeparator"));var c=a.createToken(i+o.styleBefore.length,e),u=a.createToken(c.end+o.styleSeparator.length,t),f=new y(this,c,u,a.createToken(u.end,";"));return s.extend(f,o),this._updateSource(f.styleBefore+f.toString(),i),this._children.splice(n,0,f),f}}),y=a.EditElement.extend({initialize:function(e,t,n,r){this.styleBefore=e.options.styleBefore,this.styleSeparator=e.options.styleSeparator,this._end=r.value,this._positions.end=r.start},valueParts:function(e){var t=r(this.value());if(e){var n=this.valuePosition(!0);t.forEach(function(e){e.shift(n)})}return t},value:function(e){var t="undefined"!=typeof e,n=this.parent.list();if(t&&this.isIncomplete()){var r=this,i=s.find(n,function(e){return e!==r&&!e.isIncomplete()});this.styleSeparator=i?i.styleSeparator:this.parent.options.styleSeparator,this.parent._updateSource(this.styleSeparator,u(this.valueRange().start,0))}var o=this.constructor.__super__.value.apply(this,arguments);if(t){var a=n.indexOf(this);a===n.length-1||this.end()||this.end(";")}return o},isIncomplete:function(){return this.nameRange().end===this.valueRange().start},end:function(e){return"undefined"!=typeof e&&this._end!==e&&(this.parent._updateSource(e,this._positions.end,this._positions.end+this._end.length),this._end=e),this._end},fullRange:function(e){var t=this.range(e);return t.start-=this.styleBefore.length,t},valueOf:function(){return this.name()+this.styleSeparator+this.value()+this.end()}});return{parse:function(e,t){return new b(e,t)},parseFromPosition:function(e,t,n){var r=c.locateRule(e,t,n);return r&&r.inside(t)?this.parse(r.substring(e),{offset:r.start}):null},propertyFromPosition:function(e,t){var n=null,r="string"==typeof e?this.parseFromPosition(e,t,!0):e;return r&&(n=r.itemFromPosition(t,!0),n||(n=s.find(r.list(),function(e){return e.range(!0).end==t}))),n},baseName:function(e){return e.replace(/^\s*\-\w+\-/,"")},findParts:r,extractPropertiesFromSource:o}})},{"../assets/range":29,"../assets/stringStream":31,"../assets/tokenIterator":33,"../parser/css":54,"../utils/common":71,"../utils/cssSections":72,"./base":34}],36:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("./base"),n=e("../parser/xml"),r=e("../assets/range"),i=e("../utils/common"),o={styleBefore:" ",styleSeparator:"=",styleQuote:'"',offset:0},s=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,a=t.EditContainer.extend({initialize:function(e){i.defaults(this.options,o),this._positions.name=1;var t=null,s=n.parse(e);s.forEach(function(n){switch(n.value=r.create(n).substring(e),n.type){case"tag":/^<[^\/]+/.test(n.value)&&(this._name=n.value.substring(1));break;case"attribute":t&&this._children.push(new l(this,t)),t=n;break;case"string":this._children.push(new l(this,t,n)),t=null}},this),t&&this._children.push(new l(this,t)),this._saveStyle()},_saveStyle:function(){var e=this.nameRange().end,t=this.source;this.list().forEach(function(n){n.styleBefore=t.substring(e,n.namePosition()),-1!==n.valuePosition()&&(n.styleSeparator=t.substring(n.namePosition()+n.name().length,n.valuePosition()-n.styleQuote.length)),e=n.range().end})},add:function(e,n,r){var o=this.list(),s=this.nameRange().end,a=i.pick(this.options,"styleBefore","styleSeparator","styleQuote");"undefined"==typeof r&&(r=o.length);var c=o[r];c?s=c.fullRange().start:(c=o[r-1])&&(s=c.range().end),c&&(a=i.pick(c,"styleBefore","styleSeparator","styleQuote")),n=a.styleQuote+n+a.styleQuote;var u=new l(this,t.createToken(s+a.styleBefore.length,e),t.createToken(s+a.styleBefore.length+e.length+a.styleSeparator.length,n));return i.extend(u,a),this._updateSource(u.styleBefore+u.toString(),s),this._children.splice(r,0,u),u},addClass:function(e){var t=this.get("class");if(e=i.trim(e),!t)return this.add("class",e);var n=t.value(),r=" "+n.replace(/\n/g," ")+" ";~r.indexOf(" "+e+" ")||t.value(n+" "+e)},removeClass:function(e){var t=this.get("class");if(e=i.trim(e),t){var n=new RegExp("(^|\\s+)"+i.escapeForRegexp(e)),r=t.value().replace(n,"");i.trim(r)?t.value(r):this.remove("class")}}}),l=t.EditElement.extend({initialize:function(e,t,n){this.styleBefore=e.options.styleBefore,this.styleSeparator=e.options.styleSeparator;var r="",i=e.options.styleQuote;n&&(r=n.value,i=r.charAt(0),'"'==i||"'"==i?r=r.substring(1):i="",i&&r.charAt(r.length-1)==i&&(r=r.substring(0,r.length-1))),this.styleQuote=i,this._value=r,this._positions.value=n?n.start+i.length:-1},fullRange:function(e){var t=this.range(e);return t.start-=this.styleBefore.length,t},valueOf:function(){return this.name()+this.styleSeparator+this.styleQuote+this.value()+this.styleQuote}});return{parse:function(e,t){return new a(e,t)},parseFromPosition:function(e,t,n){var r=this.extractTag(e,t,n);return r&&r.inside(t)?this.parse(r.substring(e),{offset:r.start}):null},extractTag:function(e,t,n){var i,o=e.length,a=Math.min(2e3,o),l=null,c=function(t){var n;return"<"==e.charAt(t)&&(n=e.substr(t,a).match(s))?r.create(t,n[0]):void 0};for(i=t;i>=0&&!(l=c(i));i--);if(l&&(l.inside(t)||n))return l;if(!l&&n)return null;for(i=t;o>i;i++)if(l=c(i))return l}}})},{"../assets/range":29,"../parser/xml":60,"../utils/common":71,"./base":34}],37:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(e){module.exports=e(require,exports,module)};define(function(require,exports,module){function getFileName(e){var t=/([\w\.\-]+)$/i,n=t.exec(e);return n?n[1]:""}function normalizeProfile(e){return"object"==typeof e&&("indent"in e&&(e.indent=!!e.indent),"self_closing_tag"in e&&"number"==typeof e.self_closing_tag&&(e.self_closing_tag=!!e.self_closing_tag)),e}var global="undefined"!=typeof self?self:this,utils=require("./utils/common"),actions=require("./action/main"),parser=require("./parser/abbreviation"),file=require("./plugin/file"),preferences=require("./assets/preferences"),resources=require("./assets/resources"),profile=require("./assets/profile"),ciu=require("./assets/caniuse"),logger=require("./assets/logger"),sliceFn=Array.prototype.slice;return{expandAbbreviation:function(e,t,n,r){return parser.expand(e,{syntax:t,profile:n,contextNode:r})},run:function(){return actions.run.apply(actions,sliceFn.call(arguments,0))},loadExtensions:function(fileList){var payload={},userSnippets=null,that=this;fileList=fileList.filter(function(e){var t=file.getExt(e);return"json"===t||"js"===t});var reader=(file.readText||file.read).bind(file),next=function(){if(fileList.length){var f=fileList.shift();reader(f,function(err,content){if(err)return logger.log('Unable to read "'+f+'" file: '+err),next();switch(file.getExt(f)){case"js":try{eval(content)}catch(e){logger.log('Unable to eval "'+f+'" file: '+e)}break;case"json":var fileName=getFileName(f).toLowerCase().replace(/\.json$/,"");/^snippets/.test(fileName)?"snippets"===fileName?userSnippets=utils.parseJSON(content):payload.snippets=utils.deepMerge(payload.snippets||{},utils.parseJSON(content)):payload[fileName]=content}next()})}else userSnippets&&(payload.snippets=utils.deepMerge(payload.snippets||{},userSnippets)),that.loadUserData(payload)};next()},loadPreferences:function(e){preferences.load(utils.parseJSON(e))},loadSnippets:function(e){e=utils.parseJSON(e);var t=resources.getVocabulary("user")||{};resources.setVocabulary(utils.deepMerge(t,e),"user")},loadSystemSnippets:function(e){resources.setVocabulary(utils.parseJSON(e),"system")},loadCIU:function(e){ciu.load(utils.parseJSON(e))},resetSnippets:function(){resources.setVocabulary({},"user")},loadUserData:function(e){e=utils.parseJSON(e),e.snippets&&this.loadSnippets(e.snippets),e.preferences&&this.loadPreferences(e.preferences),e.profiles&&this.loadProfiles(e.profiles),e.caniuse&&this.loadCIU(e.caniuse);var t=e.syntaxProfiles||e.syntaxprofiles;t&&this.loadSyntaxProfiles(t)},resetUserData:function(){this.resetSnippets(),preferences.reset(),profile.reset()},loadSyntaxProfiles:function(e){e=utils.parseJSON(e);var t={};Object.keys(e).forEach(function(n){var r=e[n];n in t||(t[n]={}),t[n].profile=normalizeProfile(r)}),this.loadSnippets(t)},loadProfiles:function(e){e=utils.parseJSON(e),Object.keys(e).forEach(function(t){profile.create(t,normalizeProfile(e[t]))})},require:require,actions:actions,file:file,preferences:preferences,resources:resources,profile:profile,tabStops:require("./assets/tabStops"),htmlMatcher:require("./assets/htmlMatcher"),utils:{common:utils,action:require("./utils/action"),editor:require("./utils/editor")}}})},{"./action/main":11,"./assets/caniuse":22,"./assets/htmlMatcher":25,"./assets/logger":26,"./assets/preferences":27,"./assets/profile":28,"./assets/resources":30,"./assets/tabStops":32,"./parser/abbreviation":53,"./plugin/file":61,"./utils/action":68,"./utils/common":71,"./utils/editor":73}],38:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(){return{element:l.get("bem.elementSeparator"),modifier:l.get("bem.modifierSeparator")}}function n(e){if(c.isSnippet(e))return e;e.__bem={block:"",element:"",modifier:""};var t=r(e.attribute("class")).split(" "),n=/^[a-z]\-/i;return e.__bem.block=u.find(t,function(e){return n.test(e)}),e.__bem.block||(n=/^[a-z]/i,e.__bem.block=u.find(t,function(e){return n.test(e)})||""),t=t.map(function(t){return i(t,e)}),t=u.unique(u.flatten(t)).join(" "),t&&e.attribute("class",t),e}function r(e){e=(" "+(e||"")+" ").replace(/\s+/g," ");var n=l.get("bem.shortElementPrefix");if(n){var r=new RegExp("\\s("+u.escapeForRegexp(n)+"+)","g");e=e.replace(r,function(e,n){return" "+u.repeatString(t().element,n.length)})}return u.trim(e)}function i(e,n){e=o(e,n,"element"),e=o(e,n,"modifier");var r="",i="",s="",a=t();if(~e.indexOf(a.element)){var l=e.split(a.element);r=l.shift();var c=l.pop().split(a.modifier);l.push(c.shift()),i=l.join(a.element),s=c.join(a.modifier)}else if(~e.indexOf(a.modifier)){var u=e.split(a.modifier);r=u.shift(),s=u.join(a.modifier)}if(r||i||s){r||(r=n.__bem.block);var f=r,p=[];return i?(f+=a.element+i,p.push(f)):p.push(f),s&&p.push(f+a.modifier+s),n.__bem.block=r,n.__bem.element=i,n.__bem.modifier=s,p}return e}function o(e,n,r){var i=t(),o=new RegExp("^("+i[r]+")+","g");if(o.test(e)){for(var s=0,a=e.replace(o,function(e){return s=e.length/i[r].length,""}),l=n;l.parent&&s--;)l=l.parent;if(l&&l.__bem||(l=n),l&&l.__bem){var c=l.__bem.block;return"modifier"==r&&l.__bem.element&&(c+=i.element+l.__bem.element),c+i[r]+a}}return e}function s(e,t){return e.name&&n(e,t),e.children.forEach(function(e){s(e,t),!c.isSnippet(e)&&e.start&&(f=!0)}),e}var a=e("./html"),l=e("../assets/preferences"),c=e("../utils/abbreviation"),u=e("../utils/common");l.define("bem.elementSeparator","__","Class name\u2019s element separator."),l.define("bem.modifierSeparator","_","Class name\u2019s modifier separator."),l.define("bem.shortElementPrefix","-","Symbol for describing short \u201cblock-element\u201d notation. Class names prefixed with this symbol will be treated as element name for parent\u2018s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation.");var f=!1;return function(e,t){return f=!1,e=s(e,t),f&&(e=a(e,t)),e}})},{"../assets/preferences":27,"../utils/abbreviation":67,"../utils/common":71,"./html":44}],39:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,n){var o=r.get("filter.commentTrigger");if("*"!=o){var s=i.find(o.split(","),function(t){return!!e.attribute(i.trim(t))});if(!s)return}var a={node:e,name:e.name(),padding:e.parent?e.parent.padding:"",attr:function(t,n,r){var i=e.attribute(t);return i?(n||"")+i+(r||""):""}},l=t?t(a):"",c=n?n(a):"";e.start=e.start.replace(/</,l+"<"),e.end=e.end.replace(/>/,">"+c)}function n(e,r,i){return e.children.forEach(function(e){s.isBlock(e)&&t(e,r,i),n(e,r,i)}),e}{var r=e("../assets/preferences"),i=e("../utils/common"),o=e("../utils/template"),s=e("../utils/abbreviation");e("./main")}return r.define("filter.commentAfter",'\n<!-- /<%= attr("id", "#") %><%= attr("class", ".") %> -->',"A definition of comment that should be placed <i>after</i> matched element when <code>comment</code> filter is applied. This definition is an ERB-style template passed to <code>_.template()</code> function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n<ul><li><code>attr(name, before, after)</code> \u2013 a function that outputsspecified attribute value concatenated with <code>before</code> and <code>after</code> strings. If attribute doesn't exists, the empty string will be returned.</li><li><code>node</code> \u2013 current node (instance of <code>AbbreviationNode</code>)</li><li><code>name</code> \u2013 name of current tag</li><li><code>padding</code> \u2013 current string padding, can be used for formatting</li></ul>"),r.define("filter.commentBefore","","A definition of comment that should be placed <i>before</i> matched element when <code>comment</code> filter is applied. For more info, read description of <code>filter.commentAfter</code> property"),r.define("filter.commentTrigger","id, class","A comma-separated list of attribute names that should exist in abbreviatoin where comment should be added. If you wish to add comment for every element, set this option to <code>*</code>"),function(e){var t=o(r.get("filter.commentBefore")),i=o(r.get("filter.commentAfter"));return n(e,t,i)}})},{"../assets/preferences":27,"../utils/abbreviation":67,"../utils/common":71,"../utils/template":75,"./main":47}],40:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){function e(e){return e.parent&&!e.parent.parent&&!e.index()}return function t(n,r,i){return i=i||0,n.children.forEach(function(n){e(n)||r.tag_nl===!1||(n.start="\n"+n.start),t(n,r,i+1)}),n}})},{}],41:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){function e(e){return e.replace(/([<>&])/g,function(e,n){return t[n]})}var t={"<":"<",">":">","&":"&"};return function n(t){return t.children.forEach(function(t){t.start=e(t.start),t.end=e(t.end),t.content=e(t.content),n(t)}),t}})},{}],42:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){var t=h.getArray("format.noIndentTags")||[];return~t.indexOf(e.name())?"":" "}function n(e){return e.parent&&p.hasBlockChildren(e.parent)}function r(e){return e.parent&&!e.parent.parent&&!e.index()}function i(e,t){return t.tag_nl===!0||p.isBlock(e)?!0:e.parent&&t.inline_break?s(e.parent,t):!1}function o(e,t){return e.children.length&&i(e.children[0],t)}function s(e,t){var n=0;return!!f.find(e.children,function(e){return e.isTextNode()||!p.isInline(e)?n=0:p.isInline(e)&&n++,n>=t.inline_break?!0:void 0})}function a(e){return!e.parent}function l(e,t){return e.start=e.end="",!r(e)&&t.tag_nl!==!1&&i(e,t)&&(a(e.parent)||!p.isInline(e.parent))&&(e.start="\n"+e.start),e}function c(e,t){var n=e.children.some(function(e){return p.isSnippet(e)?!1:!p.isInline(e)});return n?!0:s(e,t)}function u(e,s){e.start=e.end=d;var a=p.isUnary(e),l="\n",u=t(e);if(s.tag_nl!==!1){var f=s.tag_nl===!0&&(s.tag_nl_leaf||e.children.length);if(!f){var m=h.getArray("format.forceIndentationForTags")||[];f=~m.indexOf(e.name())}e.isTextNode()||(i(e,s)?(r(e)||p.isSnippet(e.parent)&&!e.index()||(e.start=l+e.start),(p.hasBlockChildren(e)||o(e,s)||f&&!a)&&(e.end=l+e.end),(p.hasTagsInContent(e)||f&&!e.children.length&&!a)&&(e.start+=l+u)):p.isInline(e)&&n(e)&&!r(e)?e.start=l+e.start:p.isInline(e)&&c(e,s)&&(e.end=l+e.end),e.padding=u)}return e}{var f=e("../utils/common"),p=e("../utils/abbreviation"),h=e("../assets/preferences");e("../assets/resources")}h.define("format.noIndentTags","html","A comma-separated list of tag names that should not get inner indentation."),h.define("format.forceIndentationForTags","body","A comma-separated list of tag names that should <em>always</em> get inner indentation.");var d="%s";return function m(e,t,n){return n=n||0,e.children.forEach(function(e){p.isSnippet(e)?l(e,t,n):u(e,t,n),m(e,t,n+1)}),e}})},{"../assets/preferences":27,"../assets/resources":30,"../utils/abbreviation":67,"../utils/common":71}],43:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return s.trim(e).replace(/\s+/g,".")}function n(e){var t=[],n=null,r=/^data-/i;return e.forEach(function(e){r.test(e.name)?(n||(n=[],t.push({name:"data",value:n})),n.push(s.extend({},e,{name:e.name.replace(r,"")}))):t.push(e)}),t}function r(e,t){var n=t.attributeQuote();return"{"+e.map(function(e){var i=n+e.value+n;return Array.isArray(e.value)?i=r(e.value,t):e.isBoolean&&(i="true"),":"+e.name+" => "+i}).join(", ")+"}"}function i(e,i){var o="",s=[],a=(i.attributeQuote(),i.cursor());return e.attributeList().forEach(function(e){var n=i.attributeName(e.name);switch(n.toLowerCase()){case"id":o+="#"+(e.value||a);break;case"class":o+="."+t(e.value||a);break;default:s.push({name:n,value:e.value||a,isBoolean:i.isBoolean(e.name,e.value)})}}),s.length&&(o+=r(n(s),i)),o}function o(e,t){if(!e.parent)return e;var n=i(e,t),r=t.cursor(),o=a.isUnary(e),l=t.self_closing_tag&&o?"/":"",c="",u="%"+t.tagName(e.name());"%div"==u.toLowerCase()&&n&&-1==n.indexOf("{")&&(u=""),e.end="",c=u+n+l,e.content&&!/^\s/.test(e.content)&&(e.content=" "+e.content);var f="%s";return e.start=s.replaceSubstring(e.start,c,e.start.indexOf(f),f),e.children.length||o||(e.start+=r),e}var s=e("../utils/common"),a=e("../utils/abbreviation"),l=e("./format");return function c(e,t,n){return n=n||0,n||(e=l(e,"_format",t)),e.children.forEach(function(e){a.isSnippet(e)||o(e,t,n),c(e,t,n+1)}),e}})},{"../utils/abbreviation":67,"../utils/common":71,"./format":42}],44:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t){var n=t.attributeQuote(),r=t.cursor();return e.attributeList().map(function(e){var i=t.isBoolean(e.name,e.value),o=t.attributeName(e.name),s=i?o:e.value;return i&&t.allowCompactBoolean()?" "+o:" "+o+"="+n+(s||r)+n}).join("")}function n(e,n){if(!e.parent)return e;var s=t(e,n),a=n.cursor(),l=r.isUnary(e),c="",u="";if(!e.isTextNode()){var f=n.tagName(e.name());l?(c="<"+f+s+n.selfClosing()+">",e.end=""):(c="<"+f+s+">",u="</"+f+">")}var p="%s";return e.start=i.replaceSubstring(e.start,c,e.start.indexOf(p),p),e.end=i.replaceSubstring(e.end,u,e.end.indexOf(p),p),e.children.length||l||~e.content.indexOf(a)||o.extract(e.content).tabstops.length||(e.start+=a),e}var r=e("../utils/abbreviation"),i=e("../utils/common"),o=e("../assets/tabStops"),s=e("./format");return function a(e,t,i){return i=i||0,i||(e=s(e,t,i)),e.children.forEach(function(e){r.isSnippet(e)||n(e,t,i),a(e,t,i+1)}),e}})},{"../assets/tabStops":32,"../utils/abbreviation":67,"../utils/common":71,"./format":42}],45:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return s.trim(e).replace(/\s+/g,".")}function n(e,t){var n=t.attributeQuote();return"("+e.map(function(e){return e.isBoolean?e.name:e.name+"="+n+e.value+n}).join(", ")+")"}function r(e,r){var i="",o=[],s=(r.attributeQuote(),r.cursor());return e.attributeList().forEach(function(e){var n=r.attributeName(e.name);switch(n.toLowerCase()){case"id":i+="#"+(e.value||s);break;case"class":i+="."+t(e.value||s);break;default:o.push({name:n,value:e.value||s,isBoolean:r.isBoolean(e.name,e.value)})}}),o.length&&(i+=n(o,r)),i}function i(e){if(e.content){var t=c.replaceVariables(e.content,function(e,t){return"nl"===t||"newline"===t?"\n":e});if(f.test(t)&&!p.test(t)){var n="| ";e.content="\n"+n+s.padString(t,n)}else h.test(t)||(e.content=" "+t)}}function o(e,t){if(!e.parent)return e; | ||
+ | var n=r(e,t),o=t.cursor(),l=a.isUnary(e),c=t.tagName(e.name());"div"==c.toLowerCase()&&n&&"("!=n.charAt(0)&&(c=""),e.end="";var u=c+n;i(e);var f="%s";return e.start=s.replaceSubstring(e.start,u,e.start.indexOf(f),f),e.children.length||l||(e.start+=o),e}var s=e("../utils/common"),a=e("../utils/abbreviation"),l=e("./format"),c=e("../assets/tabStops"),u=e("../assets/profile"),f=/[\n\r]/,p=/^\s*\|/,h=/^\s/;return function d(e,t,n){return n=n||0,n||(e=l(e,u.get("xml"))),e.children.forEach(function(e){a.isSnippet(e)||o(e,t,n),d(e,t,n+1)}),e}})},{"../assets/profile":28,"../assets/tabStops":32,"../utils/abbreviation":67,"../utils/common":71,"./format":42}],46:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){var e={"class":"className","for":"htmlFor"};return function t(n){return n.children.forEach(function(n){n._attributes.forEach(function(t){t.name in e&&(t.name=e[t.name])}),t(n)}),n}})},{}],47:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return e?"string"==typeof e?e.split(/[\|,]/g):e:[]}var n=e("../utils/common"),r=e("../assets/profile"),i=e("../assets/resources"),o={html:e("./html"),haml:e("./haml"),jade:e("./jade"),jsx:e("./jsx"),slim:e("./slim"),xsl:e("./xsl"),css:e("./css"),bem:e("./bem"),c:e("./comment"),e:e("./escape"),s:e("./singleLine"),t:e("./trim")},s="html";return{add:function(e,t){o[e]=t},apply:function(e,i,s){return s=r.get(s),t(i).forEach(function(t){var r=n.trim(t.toLowerCase());r&&r in o&&(e=o[r](e,s))}),e},composeList:function(e,n,o){n=r.get(n);var a=t(n.filters||i.findItem(e,"filters")||s);return n.extraFilters&&(a=a.concat(t(n.extraFilters))),o&&(a=a.concat(t(o))),a&&a.length||(a=t(s)),a},extract:function(e){var n="";return e=e.replace(/\|([\w\|\-]+)$/,function(e,t){return n=t,""}),[e,t(n)]}}})},{"../assets/profile":28,"../assets/resources":30,"../utils/common":71,"./bem":38,"./comment":39,"./css":40,"./escape":41,"./haml":43,"./html":44,"./jade":45,"./jsx":46,"./singleLine":48,"./slim":49,"./trim":50,"./xsl":51}],48:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../utils/abbreviation"),n=/^\s+/,r=/[\n\r]/g;return function i(e){return e.children.forEach(function(e){t.isSnippet(e)||(e.start=e.start.replace(n,""),e.end=e.end.replace(n,"")),e.start=e.start.replace(r,""),e.end=e.end.replace(r,""),e.content=e.content.replace(r,""),i(e)}),e}})},{"../utils/abbreviation":67}],49:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return a.trim(e).replace(/\s+/g,".")}function n(){var e=" ",t="";switch(f.get("slim.attributesWrapper")){case"round":e="(",t=")";break;case"square":e="[",t="]";break;case"curly":e="{",t="}"}return{start:e,end:t}}function r(e,t){var r=t.attributeQuote(),i=n();return i.start+e.map(function(e){var t=r+e.value+r;if(e.isBoolean){if(i.end)return e.name;t="true"}return e.name+"="+t}).join(" ")+i.end}function i(e,n){var i="",o=[],s=(n.attributeQuote(),n.cursor());return e.attributeList().forEach(function(e){var r=n.attributeName(e.name);switch(r.toLowerCase()){case"id":i+="#"+(e.value||s);break;case"class":i+="."+t(e.value||s);break;default:o.push({name:r,value:e.value||s,isBoolean:n.isBoolean(e.name,e.value)})}}),o.length&&(i+=r(o,n)),i}function o(e){if(e.content){var t=u.replaceVariables(e.content,function(e,t){return"nl"===t||"newline"===t?"\n":e});if(h.test(t)&&!d.test(t)){var n=" ";e.content="\n| "+a.padString(t,n)}else m.test(t)||(e.content=" "+t)}}function s(e,t){if(!e.parent)return e;var n=i(e,t),r=t.cursor(),s=l.isUnary(e),c=t.self_closing_tag&&s?"/":"",u=t.tagName(e.name());"div"==u.toLowerCase()&&n&&-1=="([{".indexOf(n.charAt(0))&&(u=""),e.end="";var f=u+n+c;o(e);var p="%s";return e.start=a.replaceSubstring(e.start,f,e.start.indexOf(p),p),e.children.length||s||(e.start+=r),e}var a=e("../utils/common"),l=e("../utils/abbreviation"),c=e("./format"),u=e("../assets/tabStops"),f=e("../assets/preferences"),p=e("../assets/profile"),h=/[\n\r]/,d=/^\s*\|/,m=/^\s/;return f.define("slim.attributesWrapper","none","Defines how attributes will be wrapped:<ul><li><code>none</code> \u2013 no wrapping;</li><li><code>round</code> \u2014 wrap attributes with round braces;</li><li><code>square</code> \u2014 wrap attributes with round braces;</li><li><code>curly</code> \u2014 wrap attributes with curly braces.</li></ul>"),function g(e,t,n){return n=n||0,n||(e=c(e,p.get("xml"))),e.children.forEach(function(e){l.isSnippet(e)||s(e,t,n),g(e,t,n+1)}),e}})},{"../assets/preferences":27,"../assets/profile":28,"../assets/tabStops":32,"../utils/abbreviation":67,"../utils/common":71,"./format":42}],50:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,n){return e.children.forEach(function(e){e.content&&(e.content=e.content.replace(n,"")),t(e,n)}),e}var n=e("../assets/preferences");return n.define("filter.trimRegexp","[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*","Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in <code>t</code> (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents)."),function(e){var r=new RegExp(n.get("filter.trimRegexp"));return t(e,r)}})},{"../assets/preferences":27}],51:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){e.start=e.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"")}var n=e("../utils/abbreviation"),r={"xsl:variable":1,"xsl:with-param":1};return function i(e){return e.children.forEach(function(e){!n.isSnippet(e)&&(e.name()||"").toLowerCase()in r&&e.children.length&&t(e),i(e)}),e}})},{"../utils/abbreviation":67}],52:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t){return Math.round(Math.random()*(t-e)+e)}function n(e,n){for(var r=e.length,i=Math.min(r,n),o=[];o.length<i;){var s=t(0,r-1);~o.indexOf(s)||o.push(s)}return o.map(function(t){return e[t]})}function r(e){return"string"==typeof e?e.charAt(t(0,e.length-1)):e[t(0,e.length-1)]}function i(e,t){return e.length&&(e[0]=e[0].charAt(0).toUpperCase()+e[0].substring(1)),e.join(" ")+(t||r("?!..."))}function o(e){var n=e.length;if(!(2>n)){var r=0;r=n>3&&6>=n?t(0,1):n>6&&12>=n?t(0,2):t(1,4);for(var i,o,s=0;r>s;s++)i=t(0,e.length-2),o=e[i],","!==o.charAt(o.length-1)&&(e[i]+=",")}}function s(e,r,s){var a=l[e];if(!a)return"";var c,u=[],f=0;for(r=parseInt(r,10),s&&a.common&&(c=a.common.slice(0,r),c.length>5&&(c[4]+=","),f+=c.length,u.push(i(c,".")));r>f;)c=n(a.words,Math.min(t(2,30),r-f)),f+=c.length,o(c),u.push(i(c));return u.join(" ")}var a=e("../assets/preferences"),l={en:{common:["lorem","ipsum","dolor","sit","amet","consectetur","adipisicing","elit"],words:["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus","tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus","quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod","explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]},sp:{common:["mujer","uno","dolor","m\xe1s","de","poder","mismo","si"],words:["ejercicio","preferencia","perspicacia","laboral","pa\xf1o","suntuoso","molde","namibia","planeador","mirar","dem\xe1s","oficinista","excepci\xf3n","odio","consecuencia","casi","auto","chicharra","velo","elixir","ataque","no","odio","temporal","cu\xf3rum","dign\xedsimo","facilismo","letra","nihilista","expedici\xf3n","alma","alveolar","aparte","le\xf3n","animal","como","paria","belleza","modo","natividad","justo","ataque","s\xe9quito","pillo","sed","ex","y","voluminoso","temporalidad","verdades","racional","asunci\xf3n","incidente","marejada","placenta","amanecer","fuga","previsor","presentaci\xf3n","lejos","necesariamente","sospechoso","adiposidad","quind\xedo","p\xf3cima","voluble","d\xe9bito","sinti\xf3","accesorio","falda","sapiencia","volutas","queso","permacultura","laudo","soluciones","entero","pan","litro","tonelada","culpa","libertario","mosca","dictado","reincidente","nascimiento","dolor","escolar","impedimento","m\xednima","mayores","repugnante","dulce","obcecado","monta\xf1a","enigma","total","delet\xe9reo","d\xe9cima","c\xe1bala","fotograf\xeda","dolores","molesto","olvido","paciencia","resiliencia","voluntad","molestias","magn\xedfico","distinci\xf3n","ovni","marejada","cerro","torre","y","abogada","manantial","corporal","agua","crep\xfasculo","ataque","desierto","laboriosamente","angustia","afortunado","alma","encefalograma","materialidad","cosas","o","renuncia","error","menos","conejo","abad\xeda","analfabeto","remo","fugacidad","oficio","en","alm\xe1cigo","vos","pan","represi\xf3n","n\xfameros","triste","refugiado","trote","inventor","corchea","repelente","magma","recusado","patr\xf3n","expl\xedcito","paloma","s\xedndrome","inmune","autoinmune","comodidad","ley","vietnamita","demonio","tasmania","repeler","ap\xe9ndice","arquitecto","columna","yugo","computador","mula","a","prop\xf3sito","fantas\xeda","alias","rayo","tenedor","deleznable","ventana","cara","anemia","corrupto"]},ru:{common:["\u0434\u0430\u043b\u0435\u043a\u043e-\u0434\u0430\u043b\u0435\u043a\u043e","\u0437\u0430","\u0441\u043b\u043e\u0432\u0435\u0441\u043d\u044b\u043c\u0438","\u0433\u043e\u0440\u0430\u043c\u0438","\u0432 \u0441\u0442\u0440\u0430\u043d\u0435","\u0433\u043b\u0430\u0441\u043d\u044b\u0445","\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b\u0445","\u0436\u0438\u0432\u0443\u0442","\u0440\u044b\u0431\u043d\u044b\u0435","\u0442\u0435\u043a\u0441\u0442\u044b"],words:["\u0432\u0434\u0430\u043b\u0438","\u043e\u0442 \u0432\u0441\u0435\u0445","\u043e\u043d\u0438","\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0445","\u0434\u043e\u043c\u0430\u0445","\u043d\u0430 \u0431\u0435\u0440\u0435\u0433\u0443","\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430","\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e","\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e","\u043e\u043a\u0435\u0430\u043d\u0430","\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439","\u0440\u0443\u0447\u0435\u0435\u043a","\u0434\u0430\u043b\u044c","\u0436\u0443\u0440\u0447\u0438\u0442","\u043f\u043e \u0432\u0441\u0435\u0439","\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442","\u0435\u0435","\u0432\u0441\u0435\u043c\u0438","\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438","\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438","\u044d\u0442\u0430","\u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f","\u0441\u0442\u0440\u0430\u043d\u0430","\u043a\u043e\u0442\u043e\u0440\u043e\u0439","\u0436\u0430\u0440\u0435\u043d\u043d\u044b\u0435","\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f","\u0437\u0430\u043b\u0435\u0442\u0430\u044e\u0442","\u043f\u0440\u044f\u043c\u043e","\u0440\u043e\u0442","\u0434\u0430\u0436\u0435","\u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0430\u044f","\u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f","\u043d\u0435","\u0438\u043c\u0435\u0435\u0442","\u0432\u043b\u0430\u0441\u0442\u0438","\u043d\u0430\u0434","\u0440\u044b\u0431\u043d\u044b\u043c\u0438","\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438","\u0432\u0435\u0434\u0443\u0449\u0438\u043c\u0438","\u0431\u0435\u0437\u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u043d\u044b\u0439","\u043e\u0431\u0440\u0430\u0437","\u0436\u0438\u0437\u043d\u0438","\u043e\u0434\u043d\u0430\u0436\u0434\u044b","\u043e\u0434\u043d\u0430","\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f","\u0441\u0442\u0440\u043e\u0447\u043a\u0430","\u0440\u044b\u0431\u043d\u043e\u0433\u043e","\u0442\u0435\u043a\u0441\u0442\u0430","\u0438\u043c\u0435\u043d\u0438","lorem","ipsum","\u0440\u0435\u0448\u0438\u043b\u0430","\u0432\u044b\u0439\u0442\u0438","\u0431\u043e\u043b\u044c\u0448\u043e\u0439","\u043c\u0438\u0440","\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438","\u0432\u0435\u043b\u0438\u043a\u0438\u0439","\u043e\u043a\u0441\u043c\u043e\u043a\u0441","\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u043b","\u043e","\u0437\u043b\u044b\u0445","\u0437\u0430\u043f\u044f\u0442\u044b\u0445","\u0434\u0438\u043a\u0438\u0445","\u0437\u043d\u0430\u043a\u0430\u0445","\u0432\u043e\u043f\u0440\u043e\u0441\u0430","\u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0445","\u0442\u043e\u0447\u043a\u0430\u0445","\u0437\u0430\u043f\u044f\u0442\u043e\u0439","\u043d\u043e","\u0442\u0435\u043a\u0441\u0442","\u0434\u0430\u043b","\u0441\u0431\u0438\u0442\u044c","\u0441\u0435\u0431\u044f","\u0442\u043e\u043b\u043a\u0443","\u043e\u043d","\u0441\u043e\u0431\u0440\u0430\u043b","\u0441\u0435\u043c\u044c","\u0441\u0432\u043e\u0438\u0445","\u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0445","\u0431\u0443\u043a\u0432","\u043f\u043e\u0434\u043f\u043e\u044f\u0441\u0430\u043b","\u0438\u043d\u0438\u0446\u0438\u0430\u043b","\u0437\u0430","\u043f\u043e\u044f\u0441","\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f","\u0434\u043e\u0440\u043e\u0433\u0443","\u0432\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c","\u043f\u0435\u0440\u0432\u0443\u044e","\u0432\u0435\u0440\u0448\u0438\u043d\u0443","\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445","\u0433\u043e\u0440","\u0431\u0440\u043e\u0441\u0438\u043b","\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439","\u0432\u0437\u0433\u043b\u044f\u0434","\u043d\u0430\u0437\u0430\u0434","\u0441\u0438\u043b\u0443\u044d\u0442","\u0441\u0432\u043e\u0435\u0433\u043e","\u0440\u043e\u0434\u043d\u043e\u0433\u043e","\u0433\u043e\u0440\u043e\u0434\u0430","\u0431\u0443\u043a\u0432\u043e\u0433\u0440\u0430\u0434","\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","\u0434\u0435\u0440\u0435\u0432\u043d\u0438","\u0430\u043b\u0444\u0430\u0432\u0438\u0442","\u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","\u0441\u0432\u043e\u0435\u0433\u043e","\u043f\u0435\u0440\u0435\u0443\u043b\u043a\u0430","\u0433\u0440\u0443\u0441\u0442\u043d\u044b\u0439","\u0440\u0435\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439","\u0432\u043e\u043f\u0440\u043e\u0441","\u0441\u043a\u0430\u0442\u0438\u043b\u0441\u044f","\u0435\u0433\u043e","\u0449\u0435\u043a\u0435","\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b","\u0441\u0432\u043e\u0439","\u043f\u0443\u0442\u044c","\u0434\u043e\u0440\u043e\u0433\u0435","\u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b","\u0440\u0443\u043a\u043e\u043f\u0438\u0441\u044c","\u043e\u043d\u0430","\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b\u0430","\u043c\u043e\u0435\u0439","\u0432\u0441\u0435","\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f","\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e","\u0440\u0430\u0437","\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435","\u0447\u0442\u043e","\u043c\u0435\u043d\u044f","\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c","\u044d\u0442\u043e","\u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430","\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0441\u044f","\u0442\u044b","\u043b\u0443\u0447\u0448\u0435","\u0441\u0432\u043e\u044e","\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e","\u0441\u0442\u0440\u0430\u043d\u0443","\u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0432\u0448\u0438\u0441\u044c","\u0440\u0443\u043a\u043e\u043f\u0438\u0441\u0438","\u043d\u0430\u0448","\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b","\u0441\u0432\u043e\u0439","\u043f\u0443\u0442\u044c","\u0432\u0441\u043a\u043e\u0440\u0435","\u0435\u043c\u0443","\u043f\u043e\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f","\u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0439","\u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u044c","\u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445","\u0442\u0435\u043a\u0441\u0442\u043e\u0432","\u043d\u0430\u043f\u043e\u0438\u0432\u0448\u0438\u0439","\u044f\u0437\u044b\u043a\u043e\u043c","\u0440\u0435\u0447\u044c\u044e","\u0437\u0430\u043c\u0430\u043d\u0438\u0432\u0448\u0438\u0439","\u0441\u0432\u043e\u0435","\u0430\u0433\u0435\u043d\u0441\u0442\u0432\u043e","\u043a\u043e\u0442\u043e\u0440\u043e\u0435","\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e","\u0441\u043d\u043e\u0432\u0430","\u0441\u043d\u043e\u0432\u0430","\u0441\u0432\u043e\u0438\u0445","\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445","\u0435\u0441\u043b\u0438","\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438","\u0442\u043e","\u0436\u0438\u0432\u0435\u0442","\u0442\u0430\u043c","\u0434\u043e","\u0441\u0438\u0445","\u043f\u043e\u0440"]}};return a.define("lorem.defaultLang","en",'Default language of generated dummy text. Currently, <code>en</code> and <code>ru</code> are supported, but users can add their own syntaxes see <a href="http://docs.emmet.io/abbreviations/lorem-ipsum/">docs</a>.'),a.define("lorem.omitCommonPart",!1,"Omit commonly used part (e.g. \u201cLorem ipsum dolor sit amet\u201c) from generated text."),{addLang:function(e,t){"string"==typeof t?t={words:t.split(" ").filter(function(e){return!!e})}:Array.isArray(t)&&(t={words:t}),l[e]=t},preprocessor:function(e){var t,n=/^(?:lorem|lipsum)([a-z]{2})?(\d*)$/i,r=!a.get("lorem.omitCommonPart");e.findAll(function(e){if(e._name&&(t=e._name.match(n))){var i=t[2]||30,o=t[1]||a.get("lorem.defaultLang")||"en";e._name="",e.data("forceNameResolving",e.isRepeating()||e.attributeList().length),e.data("pasteOverwrites",!0),e.data("paste",function(e){return s(o,i,!e&&r)})}})}}})},{"../assets/preferences":27}],53:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(){this.parent=null,this.children=[],this._attributes=[],this.abbreviation="",this.counter=1,this._name=null,this._text="",this.repeatCount=1,this.hasImplicitRepeat=!1,this._data={},this.start="",this.end="",this.content="",this.padding=""}function n(e){return e.substring(1,e.length-1)}function r(e){e=g.trim(e);for(var i,o,s=new t,a=s.addChild(),l=b.create(e),c=1e3,u=function(e){a.addChild(e)},f=function(){l.start=l.pos,l.eatWhile(function(e){if("["==e||"{"==e){if(l.skipToPair(e,L[e]))return l.backUp(1),!0;throw new Error('Invalid abbreviation: mo matching "'+L[e]+'" found for character at '+l.pos)}if("+"==e){l.next();var t=l.eol()||~"+>^*".indexOf(l.peek());return l.backUp(1),t}return"("!=e&&p(e)})};!l.eol()&&--c>0;)switch(i=l.peek()){case"(":if(l.start=l.pos,!l.skipToPair("(",")"))throw new Error('Invalid abbreviation: mo matching ")" found for character at '+l.pos);var h=r(n(l.current()));(o=l.match(/^\*(\d+)?/,!0))&&a._setRepeat(o[1]),h.children.forEach(u);break;case">":a=a.addChild(),l.next();break;case"+":a=a.parent.addChild(),l.next();break;case"^":var d=a.parent||a;a=(d.parent||d).addChild(),l.next();break;default:f(),a.setAbbreviation(l.current()),l.start=l.pos}if(1>c)throw new Error("Endless loop detected");return s}function i(e){e=g.trim(e);for(var t,n=[],r=b(e);t=r.next();)if(" "==t){for(n.push(g.trim(r.current()));" "==r.peek();)r.next();r.start=r.pos}else if(('"'==t||"'"==t)&&!r.skipString(t))throw new Error("Invalid attribute set");return n.push(g.trim(r.current())),n}function o(e){var t=e.charAt(0);if('"'==t||"'"==t){e=e.substr(1);var n=e.charAt(e.length-1);n===t&&(e=e.substr(0,e.length-1))}return e}function s(e){var t=/^[\w\-:\$@]+\.?$/;return i(e).map(function(e){if(t.test(e)){var n="";return"."==e.charAt(e.length-1)&&(e=e.substr(0,e.length-1),n=e),{name:e,value:n}}if(~e.indexOf("=")){var r=e.split("=");return{name:r.shift(),value:o(r.join("="))}}return{name:A,value:o(e)}})}function a(e){for(var t=[],r={"#":"id",".":"class"},i=null,o=b.create(e);!o.eol();)switch(o.peek()){case"#":case".":null===i&&(i=o.pos);var a=r[o.peek()];o.next(),o.start=o.pos,o.eatWhile(E),t.push({name:a,value:o.current()});break;case"[":if(null===i&&(i=o.pos),o.start=o.pos,!o.skipToPair("[","]"))throw new Error("Invalid attribute set definition");t=t.concat(s(n(o.current())));break;default:o.next()}return t.length?{element:e.substring(0,i),attributes:l(t)}:null}function l(e){e=e.map(function(e){return g.clone(e)});var t={};return e.filter(function(e){if(!(e.name in t))return t[e.name]=e;var n=t[e.name];return"class"==e.name.toLowerCase()?n.value+=(n.value.length?" ":"")+e.value:(n.value=e.value,n.isImplied=!!e.isImplied),!1})}function c(e){if(!~e.indexOf("{"))return null;for(var t=b.create(e);!t.eol();)switch(t.peek()){case"[":case"(":t.skipToPair(t.peek(),L[t.peek()]);break;case"{":return t.start=t.pos,t.skipToPair("{","}"),{element:e.substring(0,t.start),text:n(t.current())};default:t.next()}}function u(e){for(var t,n,r,i=e.children.length-1;i>=0;i--)if(n=e.children[i],n.isRepeating())for(r=t=n.repeatCount,n.repeatCount=1,n.updateProperty("counter",1),n.updateProperty("maxCount",r);--t>0;)n.parent.addChild(n.clone(),i+1).updateProperty("counter",t+1).updateProperty("maxCount",r);return e.children.forEach(u),e}function f(e){for(var t=e.children.length-1;t>=0;t--){var n=e.children[t];n.isGroup()?n.replace(f(n).children):n.isEmpty()&&n.remove()}return e.children.forEach(f),e}function p(e){var t=e.charCodeAt(0),n="#.*:$-_!@|%";return t>64&&91>t||t>96&&123>t||t>47&&58>t||-1!=n.indexOf(e)}var h=e("../assets/tabStops"),d=e("../assets/profile"),m=e("../filter/main"),g=e("../utils/common"),v=e("../utils/abbreviation"),b=e("../assets/stringStream"),y=e("../generator/lorem"),x=e("./processor/pastedContent"),w=e("./processor/tagName"),S=e("./processor/resourceMatcher"),C=e("./processor/attributes"),k=e("./processor/href"),_=/^[\w\-\$\:@\!%]+\+?$/i,E=/[\w\-:\$@]/,A="%default",L={"[":"]","(":")","{":"}"},I=Array.prototype.splice,P=[],T=[],M=[];return t.prototype={addChild:function(e,n){return e=e||new t,e.parent=this,"undefined"==typeof n?this.children.push(e):this.children.splice(n,0,e),e},clone:function(){var e=new t,n=["abbreviation","counter","_name","_text","repeatCount","hasImplicitRepeat","start","end","content","padding"];return n.forEach(function(t){e[t]=this[t]},this),e._attributes=this._attributes.map(function(e){return g.extend({},e)}),e._data=g.extend({},this._data),e.children=this.children.map(function(t){return t=t.clone(),t.parent=e,t}),e},remove:function(){if(this.parent){var e=this.parent.children.indexOf(this);~e&&this.parent.children.splice(e,1)}return this},replace:function(){var e=this.parent,t=e.children.indexOf(this),n=g.flatten(arguments);I.apply(e.children,[t,1].concat(n)),n.forEach(function(t){t.parent=e})},updateProperty:function(e,t){return this[e]=t,this.children.forEach(function(n){n.updateProperty(e,t)}),this},find:function(e){return this.findAll(e,{amount:1})[0]},findAll:function(e,t){if(t=g.extend({amount:0,found:0},t||{}),"function"!=typeof e){var n=e.toLowerCase();e=function(e){return e.name().toLowerCase()==n}}var r=[];return this.children.forEach(function(n){e(n)&&(r.push(n),t.found++,t.amount&&t.found>=t.amount)||(r=r.concat(n.findAll(e)))}),r.filter(function(e){return!!e})},data:function(e,t){return 2==arguments.length&&(this._data[e]=t),this._data[e]},name:function(){return this._name},attributeList:function(){return l(this._attributes.slice(0))},attribute:function(e,t){if(2==arguments.length){if(null===t){var n=this._attributes.filter(function(t){return t.name===e}),r=this;return void n.forEach(function(e){var t=r._attributes.indexOf(e);~t&&r._attributes.splice(t,1)})}var i=this._attributes.map(function(e){return e.name}),o=i.indexOf(e.toLowerCase());~o?this._attributes[o].value=t:this._attributes.push({name:e,value:t})}return(g.find(this.attributeList(),function(t){return t.name==e})||{}).value},index:function(){return this.parent?this.parent.children.indexOf(this):-1},_setRepeat:function(e){e?this.repeatCount=parseInt(e,10)||1:this.hasImplicitRepeat=!0},setAbbreviation:function(e){e=e||"";var t=this;e=e.replace(/\*(\d+)?$/,function(e,n){return t._setRepeat(n),""}),this.abbreviation=e;var n=c(e);n&&(e=n.element,this.content=this._text=n.text);var r=a(e);if(r&&(e=r.element,this._attributes=r.attributes),this._name=e,this._name&&!_.test(this._name))throw new Error("Invalid abbreviation")},valueOf:function(){var e=this.start,t=this.end,n=this.content,r=this;M.forEach(function(i){e=i(e,r,"start"),n=i(n,r,"content"),t=i(t,r,"end")});var i=this.children.map(function(e){return e.valueOf()}).join("");return n=v.insertChildContent(n,i,{keepVariable:!1}),e+g.padString(n,this.padding)+t},toString:function(){return this.valueOf()},hasEmptyChildren:function(){return!!g.find(this.children,function(e){return e.isEmpty()})},hasImplicitName:function(){return!this._name&&!this.isTextNode()},isGroup:function(){return!this.abbreviation},isEmpty:function(){return!this.abbreviation&&!this.children.length},isRepeating:function(){return this.repeatCount>1||this.hasImplicitRepeat},isTextNode:function(){return!this.name()&&!this.attributeList().length},isElement:function(){return!this.isEmpty()&&!this.isTextNode()},deepestChild:function(){if(!this.children.length)return null;for(var e=this;e.children.length;)e=e.children[e.children.length-1];return e}},M.push(function(e,t){return g.replaceCounter(e,t.counter,t.maxCount)}),M.push(h.abbrOutputProcessor.bind(h)),[y,S,C,x,w,k].forEach(function(e){e.preprocessor&&P.push(e.preprocessor.bind(e)),e.postprocessor&&T.push(e.postprocessor.bind(e))}),{DEFAULT_ATTR_NAME:A,parse:function(e,t){t=t||{};var n=r(e),i=this;if(t.contextNode){n._name=t.contextNode.name;var o={};n._attributes.forEach(function(e){o[e.name]=e}),t.contextNode.attributes.forEach(function(e){e.name in o?o[e.name].value=e.value:(e=g.clone(e),n._attributes.push(e),o[e.name]=e)})}return P.forEach(function(e){e(n,t,i)}),"counter"in t&&n.updateProperty("counter",t.counter),n=f(u(n)),T.forEach(function(e){e(n,t,i)}),n},expand:function(e,t){if(!e)return"";if("string"==typeof t)throw new Error("Deprecated use of `expand` method: `options` must be object");t=t||{},t.syntax||(t.syntax=g.defaultSyntax());var n=d.get(t.profile,t.syntax);h.resetTabstopIndex();var r=m.extract(e),i=this.parse(r[0],t),o=m.composeList(t.syntax,n,r[1]);return m.apply(i,o,n),i.valueOf()},AbbreviationNode:t,addPreprocessor:function(e){~P.indexOf(e)||P.push(e)},removeFilter:function(e){var t=P.indexOf(e);~t&&P.splice(t,1)},addPostprocessor:function(e){~T.indexOf(e)||T.push(e)},removePostprocessor:function(e){var t=T.indexOf(e);~t&&T.splice(t,1)},addOutputProcessor:function(e){~M.indexOf(e)||M.push(e)},removeOutputProcessor:function(e){var t=M.indexOf(e);~t&&M.splice(t,1)},isAllowedChar:function(e){return e=String(e),p(e)||~">+^[](){}".indexOf(e)}}})},{"../assets/profile":28,"../assets/stringStream":31,"../assets/tabStops":32,"../filter/main":47,"../generator/lorem":52,"../utils/abbreviation":67,"../utils/common":71,"./processor/attributes":55,"./processor/href":56,"./processor/pastedContent":57,"./processor/resourceMatcher":58,"./processor/tagName":59}],54:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){function e(e,t){return t=t||e.charCodeAt(0),t>=97&&122>=t||t>=65&&90>=t||t>=1024&&1279>=t||"&"===e||"_"===e||"<"===e||">"===e||"="===e||"-"===e}function t(e,t){return t=t||e.charCodeAt(0),t>=48&&57>=t}function n(e,t){m.tokens.push({value:e,type:t||e,start:null,end:null})}function r(e){for(var t=e.chnum,n=e.source.replace(/\r\n?/g,"\n"),r=e.source.substring(0,t+1).replace(/\r\n?/g,"\n"),i=r.split("\n"),o=(i[i.length-1]||"").length,s=n.split("\n")[i.length-1]||"",a=100,l=Math.max(0,o-a),c=s.substr(l,2*a)+"\n",u=0;o-l-1>u;u++)c+="-";return c+="^",{line:i.length,ch:o,text:s,hint:c}}function i(e){var t=o(e),n=new Error(t.message,"",t.line);throw n.line=t.line,n.ch=t.ch,n.name=t.name,n.hint=t.hint,n}function o(e){{var t=r(g);m.tokens}m.tokens=null;var n="CSS parsing error at line "+t.line+", char "+t.ch+": "+e;return n+="\n"+t.hint,{name:"ParseError",message:n,hint:t.hint,line:t.line,ch:t.ch}}function s(){for(var e=g.ch,t="";" "===e||" "===e;)t+=e,e=g.nextChar();n(t,"white")}function a(){var e,t=g,r=t.ch,i=r;if(e=t.nextChar(),"/"===e)for(;r&&"\n"!==e&&"\r"!==e;)i+=e,r=e,e=t.nextChar();else{if("*"!==e)return n(i,i);for(;r&&("*"!==r||"/"!==e);)i+=e,r=e,e=t.nextChar()}i+=e,t.nextChar(),n(i,"comment")}function l(){var e,t=g,n=t.ch,r=n,o=n;for(n=t.nextChar();n!==r;)"\n"===n?(e=t.nextChar(),"\\"===e?o+=n+e:i("Unterminated string")):o+="\\"===n?n+t.nextChar():n,n=t.nextChar();return o+=n}function c(){var e=l();g.nextChar(),n(e,"string")}function u(){var e=g,t=e.ch,r=1,o=t,s=!1;for(t=e.nextChar();t&&!s;)"("===t?r++:")"===t?(r--,r||(s=!0)):'"'===t||"'"===t?t=l():""===t&&i("Unterminated brace"),o+=t,t=e.nextChar();n(o,"brace")}function f(r){var i=g.ch,o=r?r+i:i;i=g.nextChar();for(var s=i.charCodeAt(0);e(i,s)||t(i,s);)o+=i,i=g.nextChar(),s=i.charCodeAt(0);n(o,"identifier")}function p(){var e,r=g,i=r.ch,o=i,s="."===o;if(i=r.nextChar(),e=!t(i),s&&e)return n(o,".");if("-"===o&&e)return f("-");for(;""!==i&&(t(i)||!s&&"."===i);)"."===i&&(s=!0),o+=i,i=r.nextChar();n(o,"number")}function h(){var e=g,t=e.ch,r=t,i=e.nextChar();return"="===i&&v(r,!0)?(r+=i,n(r,"match"),void e.nextChar()):void n(r,r)}function d(){var r=g.ch;return" "===r||" "===r?s():"/"===r?a():'"'===r||"'"===r?c():"("===r?u():"-"===r||"."===r||t(r)?p():e(r)?f():v(r)?h():"\r"===r?("\n"===g.peek()&&(r+=g.nextChar()),n(r,"line"),void g.nextChar()):"\n"===r?(n(r,"line"),void g.nextChar()):void i("Unrecognized character '"+r+"'")}var m={tokens:null},g={init:function(e){this.source=e,this.ch="",this.chnum=-1,this.nextChar()},nextChar:function(){return this.ch=this.source.charAt(++this.chnum)},peek:function(){return this.source.charAt(this.chnum+1)}},v=function(){for(var e="{}[]()+*=.,;:>~|\\%$#@^!".split(""),t="*^|$~".split(""),n={},r={},i=0;i<e.length;i+=1)n[e[i]]=!0;for(i=0;i<t.length;i+=1)r[t[i]]=!0;return function(e,t){return t?e in r:e in n}}();return{lex:function(e){if(g.init(e),m.tokens=[],e)for(;""!==g.ch;)d();else m.tokens.push(this.white());var t=m.tokens;return m.tokens=null,t},parse:function(e){for(var t,n=this.lex(e),r=0,i=0,o=n.length;o>i;i++)t=n[i],t.start=r,t.end=r+=t.value.length;return n},white:function(){return{value:"",type:"white",start:0,end:0}},toSource:function(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}}})},{}],55:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,s){e.children.forEach(function(e){var a=e.attributeList(),l=e.attribute(s.DEFAULT_ATTR_NAME);if("undefined"!=typeof l){if(e.attribute(s.DEFAULT_ATTR_NAME,null),a.length){var c=n.find(a,r)||n.find(a,i)||n.find(a,o);if(c){var u=e.attribute(c.name),f=n.replaceUnescapedSymbol(u,"|",l);u==f&&(f=l),e.attribute(c.name,f)}}}else a.forEach(function(t){t.isImplied&&e.attribute(t.name,null)});t(e,s)})}var n=e("../../utils/common"),r=function(e){return e.isDefault},i=function(e){return e.isImplied},o=function(e){return!e.value};return{preprocessor:function(e,n,r){t(e,r)}}})},{"../../utils/common":71}],56:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t) | ||
+ | };r(function(e){var t=e("../../assets/preferences"),n=e("../../utils/common"),r=e("./pastedContent");return t.define("href.autodetect",!0,"Enables or disables automatic URL recognition when wrapping text with <code><a></code> tag. With this option enabled, if wrapped text matches URL or e-mail pattern it will be automatically inserted into <code>href</code> attribute."),t.define("href.urlPattern","^(?:(?:https?|ftp|file)://|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])","RegExp pattern to match wrapped URLs. Matched content will be inserts as-is into <code>href</code> attribute, only whitespace will be trimmed."),t.define("href.emailPattern","^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,5}$","RegExp pattern to match wrapped e-mails. Unlike <code>href.urlPattern</code>, wrapped content will be prefixed with <code>mailto:</code> in <code>href</code> attribute"),{postprocessor:function(e,i){if(t.get("href.autodetect")){var o=new RegExp(t.get("href.urlPattern"),"i"),s=new RegExp(t.get("href.emailPattern"),"i"),a=/^([a-z]+:)?\/\//i;e.findAll(function(e){if("a"==e.name().toLowerCase()&&!e.attribute("href")){var t=n.trim(r.pastedContent(e)||i.pastedContent);t&&(o.test(t)?(a.test(t)||(t="http://"+t),e.attribute("href",t)):s.test(t)&&e.attribute("href","mailto:"+t))}})}}}})},{"../../assets/preferences":27,"../../utils/common":71,"./pastedContent":57}],57:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){for(var t=[],n=a.create(e);!n.eol();){if("\\"==n.peek())n.next();else if(n.start=n.pos,n.match(c,!0)){t.push(l.create(n.start,c));continue}n.next()}return t}function n(e,n){var r=t(e);return r.reverse().forEach(function(t){e=o.replaceSubstring(e,n,t)}),e}function r(e){return t(e.content).length?!0:!!o.find(e.attributeList(),function(e){return!!t(e.value).length})}function i(e,t,i){var o=e.findAll(function(e){return r(e)});if(r(e)&&o.unshift(e),o.length)o.forEach(function(e){e.content=n(e.content,t),e._attributes.forEach(function(e){e.value=n(e.value,t)})});else{var a=e.deepestChild()||e;a.content=i?t:s.insertChildContent(a.content,t)}}var o=e("../../utils/common"),s=e("../../utils/abbreviation"),a=e("../../assets/stringStream"),l=e("../../assets/range"),c="$#";return{pastedContent:function(e){var t=e.data("paste");return Array.isArray(t)?t[e.counter-1]:"function"==typeof t?t(e.counter-1,e.content):t?t:void 0},preprocessor:function(e,t){if(t.pastedContent){var n=o.splitByLines(t.pastedContent,!0).map(o.trim);e.findAll(function(e){return e.hasImplicitRepeat?(e.data("paste",n),e.repeatCount=n.length):void 0})}},postprocessor:function(e,t){var n=this,r=e.findAll(function(e){var t=n.pastedContent(e);return t&&i(e,t,!!e.data("pasteOverwrites")),!!t});!r.length&&t.pastedContent&&i(e,t.pastedContent)}}})},{"../../assets/range":29,"../../assets/stringStream":31,"../../utils/abbreviation":67,"../../utils/common":71}],58:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,i,s){e.children.slice(0).forEach(function(e){var a=n.getMatchedResource(e,i);"string"==typeof a&&(a=r.create("snippet",a)),e.data("resource",a);var l=r.type(a);if("snippet"==l){var c=a.data,u=e._text||e.content;u&&(c=o.insertChildContent(c,u)),e.content=c}else if("element"==l)e._name=a.name,Array.isArray(a.attributes)&&(e._attributes=[].concat(a.attributes,e._attributes));else if("reference"==l){var f=s.parse(a.data,{syntax:i});if(e.repeatCount>1){var p=f.findAll(function(e){return e.hasImplicitRepeat});p.length||(p=f.children),p.forEach(function(t){t.repeatCount=e.repeatCount,t.hasImplicitRepeat=!1})}var h=f.deepestChild();h&&(e.children.forEach(function(e){h.addChild(e)}),h.content=e.content),f.children.forEach(function(t){e.attributeList().forEach(function(e){t.attribute(e.name,e.value)})}),e.replace(f.children)}t(e,i,s)})}var n=e("../../assets/resources"),r=e("../../assets/elements"),i=e("../../utils/common"),o=e("../../utils/abbreviation");return{preprocessor:function(e,n,r){var o=n.syntax||i.defaultSyntax();t(e,o,r)}}})},{"../../assets/elements":23,"../../assets/resources":30,"../../utils/abbreviation":67,"../../utils/common":71}],59:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return e.children.forEach(function(e){(e.hasImplicitName()||e.data("forceNameResolving"))&&(e._name=n.resolve(e.parent.name()),e.data("nameResolved",!0)),t(e)}),e}var n=e("../../resolver/tagName");return{postprocessor:t}})},{"../../resolver/tagName":65}],60:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t){function r(n){return t.tokenize=n,n(e,t)}var s=e.next();if("<"==s){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?r(i("atom","]]>")):null:e.match("--")?r(i("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(o(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=i("meta","?>"),"meta";k=e.eat("/")?"closeTag":"openTag",e.eatSpace(),C="";for(var a;a=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)C+=a;return t.tokenize=n,"tag"}if("&"==s){var l;return l=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),l?"atom":"error"}return e.eatWhile(/[^&<]/),"text"}function n(e,n){var i=e.next();return">"==i||"/"==i&&e.eat(">")?(n.tokenize=t,k=">"==i?"endTag":"selfcloseTag","tag"):"="==i?(k="equals",null):/[\'\"]/.test(i)?(n.tokenize=r(i),n.tokenize(e,n)):(e.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function r(e){return function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=n;break}return"string"}}function i(e,n){return function(r,i){for(;!r.eol();){if(r.match(n)){i.tokenize=t;break}r.next()}return e}}function o(e){return function(n,r){for(var i;null!==(i=n.next());){if("<"==i)return r.tokenize=o(e+1),r.tokenize(n,r);if(">"==i){if(1==e){r.tokenize=t;break}return r.tokenize=o(e-1),r.tokenize(n,r)}}return"meta"}}function s(){for(var e=arguments.length-1;e>=0;e--)_.cc.push(arguments[e])}function a(){return s.apply(null,arguments),!0}function l(e,t){var n=S.doNotIndent.hasOwnProperty(e)||_.context&&_.context.noIndent;_.context={prev:_.context,tagName:e,indent:_.indented,startOfLine:t,noIndent:n}}function c(){_.context&&(_.context=_.context.prev)}function u(e){if("openTag"==e)return _.tagName=C,a(d,f(_.startOfLine));if("closeTag"==e){var t=!1;return _.context?_.context.tagName!=C&&(S.implicitlyClosed.hasOwnProperty(_.context.tagName.toLowerCase())&&c(),t=!_.context||_.context.tagName!=C):t=!0,t&&(x="error"),a(p(t))}return a()}function f(e){return function(t){return"selfcloseTag"==t||"endTag"==t&&S.autoSelfClosers.hasOwnProperty(_.tagName.toLowerCase())?(h(_.tagName.toLowerCase()),a()):"endTag"==t?(h(_.tagName.toLowerCase()),l(_.tagName,e),a()):a()}}function p(e){return function(t){return e&&(x="error"),"endTag"==t?(c(),a()):(x="error",a(arguments.callee))}}function h(e){for(var t;;){if(!_.context)return;if(t=_.context.tagName.toLowerCase(),!S.contextGrabbers.hasOwnProperty(t)||!S.contextGrabbers[t].hasOwnProperty(e))return;c()}}function d(e){return"word"==e?(x="attribute",a(m,d)):"endTag"==e||"selfcloseTag"==e?s():(x="error",a(d))}function m(e){return"equals"==e?a(g,d):(S.allowMissing||(x="error"),"endTag"==e||"selfcloseTag"==e?s():a())}function g(e){return"string"==e?a(v):"word"==e&&S.allowUnquoted?(x="string",a()):(x="error","endTag"==e||"selfCloseTag"==e?s():a())}function v(e){return"string"==e?a(v):s()}function b(){return{tokenize:t,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}}function y(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=0),e.eatSpace())return null;x=k=C=null;var n=t.tokenize(e,t);if(t.type=k,(n||k)&&"comment"!=n)for(_=t;;){var r=t.cc.pop()||u;if(r(k||n))break}return t.startOfLine=!1,x||n}var x,w=e("../assets/stringStream"),S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!0,allowMissing:!0},C=null,k=null,_=null;return{parse:function(e,t){t=t||0;for(var n=b(),r=w.create(e),i=[];!r.eol();)i.push({type:y(r,n),start:r.start+t,end:r.pos+t}),r.start=r.pos;return i}}})},{"../assets/stringStream":31}],61:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t,n){function i(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(String.fromCharCode(e[n]));return t.join("")}function o(e){var t=/^https?:\/\//;return t.test(e)}var s=e("../utils/common");return function(e){if("undefined"==typeof r||!r.amd)try{fs=e("fs"),path=e("path")}catch(t){}}(e),n.exports=function(e){e&&s.extend(n.exports,e)},s.extend(n.exports,{_parseParams:function(e){var t={path:e[0],size:0};return e=s.toArray(e,1),t.callback=e[e.length-1],e=e.slice(0,e.length-1),e.length&&(t.size=e[0]),t},_read:function(t,n){if(o(t.path))var r=e(/^https:/.test(t.path)?"https":"http").get(t.path,function(e){var i=[],o=0,s=!1;e.on("data",function(e){o+=e.length,i.push(e),t.size&&o>=t.size&&(s=!0,n(null,Buffer.concat(i)),r.abort())}).on("end",function(){s||(s=!0,n(null,Buffer.concat(i)))})}).on("error",n);else if(t.size){var i=fs.openSync(t.path,"r"),s=new Buffer(t.size);fs.read(i,s,0,t.size,null,function(e){n(e,s)})}else n(null,fs.readFileSync(t.path))},read:function(){var e=this._parseParams(arguments);this._read(e,function(t,n){e.callback(t,t?"":i(n))})},readText:function(){var e=this._parseParams(arguments);this._read(e,function(t,n){e.callback(t,t?"":n.toString())})},locateFile:function(e,t){if(o(t))return t;var n,r=e;for(t=t.replace(/^\/+/,"");r&&r!==path.dirname(r);)if(r=path.dirname(r),n=path.join(r,t),fs.existsSync(n))return n;return""},createPath:function(e,t,n){var r=fs.statSync(e);return r&&!r.isDirectory()&&(e=path.dirname(e)),n(path.resolve(e,t))},save:function(e,t){fs.writeFileSync(e,t,"ascii")},getExt:function(e){var t=(e||"").match(/\.([\w\-]+)$/);return t?t[1].toLowerCase():""}})})},{"../utils/common":71}],62:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t,n){function r(e){var t=e&&e.charCodeAt(0);return e&&"."==e||t>47&&58>t}function i(e){return e=k.trim(e),/\/\*|\n|\r/.test(e)?!1:/^[a-z0-9\-]+\s*\:/i.test(e)?2==e.replace(/\$\{.+?\}/g,"").split(":").length:!1}function o(e){"-"!=e.charAt(0)||/^\-[\.\d]/.test(e)||(e=e.replace(/^\-+/,""));var t=e.charAt(0);return"#"==t?s(e):"$"==t?k.escapeText(e):l(e)}function s(e){var t=e.replace(/^#+/,"")||"0";if("t"==t.toLowerCase())return"transparent";var n="";t=t.replace(/\.(\d+)$/,function(e){return n="0"+e,""});var r=k.repeatString,i=null;switch(t.length){case 1:i=r(t,6);break;case 2:i=r(t,3);break;case 3:i=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2);break;case 4:i=t+t.substr(0,2);break;case 5:i=t+t.charAt(0);break;default:i=t.substr(0,6)}if(n)return a(i,n);if(x.get("css.color.short")){var o=i.split("");o[0]==o[1]&&o[2]==o[3]&&o[4]==o[5]&&(i=o[0]+o[2]+o[4])}switch(x.get("css.color.case")){case"upper":i=i.toUpperCase();break;case"lower":i=i.toLowerCase()}return"#"+i}function a(e,t){var n=parseInt(e.substr(0,2),16),r=parseInt(e.substr(2,2),16),i=parseInt(e.substr(4,2),16);return"rgba("+[n,r,i,t].join(", ")+")"}function l(e){var t=x.getDict("css.keywordAliases");return e in t?t[e]:e}function c(e){var t=x.getDict("css.unitAliases");return e in t?t[e]:e}function u(e){return~x.getArray("css.keywords").indexOf(l(e))}function f(e,t){var n=L[t];return n||(n=k.find(L,function(e){return e.prefix==t})),n&&n.supports(e)}function p(e){var t=C.resolvePrefixes(e);return t||(t=[],Object.keys(L).forEach(function(n){f(e,n)&&t.push(L[n].prefix)}),t.length||(t=null)),t}function h(e,t){var n=[],r=p(e);if(r){var i={};Object.keys(L).forEach(function(e){i[L[e].prefix]=e}),n=r.map(function(e){return i[e]})}return n.length||t||Object.keys(L).forEach(function(e){L[e].obsolete||n.push(e)}),n}function d(e,t){"string"==typeof t&&(t={prefix:t}),L[e]=k.extend({},A,t)}function m(e,t){if(t){"styl"==t&&(t="stylus");var n=x.get(t+"."+e);if("undefined"!=typeof n)return n}return x.get("css."+e)}function g(e,t){var n=e.indexOf(":");return e=e.substring(0,n).replace(/\s+$/,"")+m("valueSeparator",t)+k.trim(e.substring(n+1)),e.replace(/\s*;\s*$/,m("propertyEnd",t))}function v(e,t,n){return"string"!=typeof e&&(e=e.data),i(e)?(t&&(~e.indexOf(";")?e=e.split(";").join(" !important;"):e+=" !important"),g(e,n)):e}function b(e){var t=x.getArray(e),n=x.getArray(e+"Addon");return n&&n.forEach(function(e){"-"==e.charAt(0)?t=k.without(t,e.substr(1)):("+"==e.charAt(0)&&(e=e.substr(1)),t.push(e))}),t}function y(e,t,n){var r=[],i={},o=E.findParts(e.value);return o.reverse(),o.forEach(function(t){var n=t.substring(e.value);(p(n)||[]).forEach(function(o){i[o]||(i[o]=e.value,r.push(o)),i[o]=k.replaceSubstring(i[o],"-"+o+"-"+n,t)})}),r.map(function(r){return v(e.name+":"+i[r],t,n)})}var x=e("../assets/preferences"),w=e("../assets/resources"),S=e("../assets/stringStream"),C=e("../assets/caniuse"),k=e("../utils/common"),_=e("../utils/template"),E=e("../editTree/css"),A={prefix:"emmet",obsolete:!1,transformName:function(e){return"-"+this.prefix+"-"+e},properties:function(){return b("css."+this.prefix+"Properties")||[]},supports:function(e){return~this.properties().indexOf(e)}},L={},I="${1};";x.define("css.valueSeparator",": ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations."),x.define("css.propertyEnd",";","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations."),x.define("stylus.valueSeparator"," ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations in Stylus dialect."),x.define("stylus.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in Stylus dialect."),x.define("sass.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in SASS dialect."),x.define("css.syntaxes","css, less, sass, scss, stylus, styl","List of syntaxes that should be treated as CSS dialects."),x.define("css.autoInsertVendorPrefixes",!0,"Automatically generate vendor-prefixed copies of expanded CSS property. By default, Emmet will generate vendor-prefixed properties only when you put dash before abbreviation (e.g. <code>-bxsh</code>). With this option enabled, you don\u2019t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you."),x.define("less.autoInsertVendorPrefixes",!1,"Same as <code>css.autoInsertVendorPrefixes</code> but for LESS syntax"),x.define("scss.autoInsertVendorPrefixes",!1,"Same as <code>css.autoInsertVendorPrefixes</code> but for SCSS syntax"),x.define("sass.autoInsertVendorPrefixes",!1,"Same as <code>css.autoInsertVendorPrefixes</code> but for SASS syntax"),x.define("stylus.autoInsertVendorPrefixes",!1,"Same as <code>css.autoInsertVendorPrefixes</code> but for Stylus syntax");var P=_("A comma-separated list of CSS properties that may have <code><%= vendor %></code> vendor prefix. This list is used to generate a list of prefixed properties when expanding <code>-property</code> abbreviations. Empty list means that all possible CSS values may have <code><%= vendor %></code> prefix."),T=_("A comma-separated list of <em>additional</em> CSS properties for <code>css.<%= vendor %>Preperties</code> preference. You should use this list if you want to add or remove a few CSS properties to original set. To add a new property, simply write its name, to remove it, precede property with hyphen.<br>For example, to add <em>foo</em> property and remove <em>border-radius</em> one, the preference value will look like this: <code>foo, -border-radius</code>."),M={webkit:"animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius",moz:"animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius",ms:"accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, wrap-flow, wrap-margin, wrap-through, writing-mode",o:"dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style"};return Object.keys(M).forEach(function(e){x.define("css."+e+"Properties",M[e],P({vendor:e})),x.define("css."+e+"PropertiesAddon","",T({vendor:e}))}),x.define("css.unitlessProperties","z-index, line-height, opacity, font-weight, zoom","The list of properties whose values \u200b\u200bmust not contain units."),x.define("css.intUnit","px","Default unit for integer values"),x.define("css.floatUnit","em","Default unit for float values"),x.define("css.keywords","auto, inherit, all","A comma-separated list of valid keywords that can be used in CSS abbreviations."),x.define("css.keywordAliases","a:auto, i:inherit, s:solid, da:dashed, do:dotted, t:transparent","A comma-separated list of keyword aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:keyword_name</code>."),x.define("css.unitAliases","e:em, p:%, x:ex, r:rem","A comma-separated list of unit aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:unit_value</code>."),x.define("css.color.short",!0,"Should color values like <code>#ffffff</code> be shortened to <code>#fff</code> after abbreviation with color was expanded."),x.define("css.color.case","keep","Letter case of color values generated by abbreviations with color (like <code>c#0</code>). Possible values are <code>upper</code>, <code>lower</code> and <code>keep</code>."),x.define("css.fuzzySearch",!0,"Enable fuzzy search among CSS snippet names. When enabled, every <em>unknown</em> snippet will be scored against available snippet names (not values or CSS properties!). The match with best score will be used to resolve snippet value. For example, with this preference enabled, the following abbreviations are equal: <code>ov:h</code> == <code>ov-h</code> == <code>o-h</code> == <code>oh</code>"),x.define("css.fuzzySearchMinScore",.3,"The minium score (from 0 to 1) that fuzzy-matched abbreviation should achive. Lower values may produce many false-positive matches, higher values may reduce possible matches."),x.define("css.alignVendor",!1,"If set to <code>true</code>, all generated vendor-prefixed properties will be aligned by real property name."),d("w",{prefix:"webkit"}),d("m",{prefix:"moz"}),d("s",{prefix:"ms"}),d("o",{prefix:"o"}),n=n||{},n.exports={addPrefix:d,supportsPrefix:f,resolve:function(e,t){var n=x.getArray("css.syntaxes");return n&&~n.indexOf(t)&&e.isElement()?this.expandToSnippet(e.abbreviation,t):null},prefixed:function(e,t){return f(e,t)?"-"+t+"-"+e:e},listPrefixes:function(){return L.map(function(e){return e.prefix})},getPrefix:function(e){return L[e]},removePrefix:function(e){e in L&&delete L[e]},extractPrefixes:function(e){if("-"!=e.charAt(0))return{property:e,prefixes:null};for(var t,n=1,r=e.length,i=[];r>n;){if(t=e.charAt(n),"-"==t){n++;break}if(!(t in L)){i.length=0,n=1;break}i.push(t),n++}return n==r-1&&(n=1,i.length=1),{property:e.substring(n),prefixes:i.length?i:"all"}},findValuesInAbbreviation:function(e,t){t=t||"css";for(var n,i=0,o=e.length,s="";o>i;){if(n=e.charAt(i),r(n)||"#"==n||"$"==n||"-"==n&&r(e.charAt(i+1))){s=e.substring(i);break}i++}for(var a=e.substring(0,e.length-s.length),l=[];~a.indexOf("-")&&!w.findSnippet(t,a);){var c=a.split("-"),f=c.pop();if(!u(f))break;l.unshift(f),a=c.join("-")}return l.join("-")+s},parseValues:function(e){for(var t=S.create(e),n=[],i=null;i=t.next();)"$"==i?(t.match(/^[^\$]+/,!0),n.push(t.current())):"#"==i?(t.match(/^t|[0-9a-f]+(\.\d+)?/i,!0),n.push(t.current())):"-"==i?((u(k.last(n))||t.start&&r(e.charAt(t.start-1)))&&(t.start=t.pos),t.match(/^\-?[0-9]*(\.[0-9]+)?[a-z%\.]*/,!0),n.push(t.current())):(t.match(/^[0-9]*(\.[0-9]*)?[a-z%]*/,!0),n.push(t.current())),t.start=t.pos;return n.filter(function(e){return!!e}).map(o)},extractValues:function(e){var t=this.findValuesInAbbreviation(e);return t?{property:e.substring(0,e.length-t.length).replace(/-$/,""),values:this.parseValues(t)}:{property:e,values:null}},normalizeValue:function(e,t){t=(t||"").toLowerCase();var n=x.getArray("css.unitlessProperties");return e.replace(/^(\-?[0-9\.]+)([a-z]*)$/,function(e,r,i){return i||"0"!=r&&!~n.indexOf(t)?i?r+c(i):r.replace(/\.$/,"")+x.get(~r.indexOf(".")?"css.floatUnit":"css.intUnit"):r})},expand:function(e,t,n){n=n||"css";var r=x.get(n+".autoInsertVendorPrefixes"),o=/^(.+)\!$/.test(e);o&&(e=RegExp.$1);var s=w.findSnippet(n,e);if(s&&!r)return v(s,o,n);var a=this.extractPrefixes(e),l=this.extractValues(a.property),c=k.extend(a,l);if(s?c.values=null:s=w.findSnippet(n,c.property),!s&&x.get("css.fuzzySearch")&&(s=w.fuzzyFindSnippet(n,c.property,parseFloat(x.get("css.fuzzySearchMinScore")))),s)"string"!=typeof s&&(s=s.data);else{if(!c.property)return null;s=c.property+":"+I}if(!i(s))return s;var u=this.splitSnippet(s),f=[];!t&&c.values&&(t=c.values.map(function(e){return this.normalizeValue(e,u.name)},this).join(" ")+";"),u.value=t||u.value;var p,d="all"==c.prefixes||!c.prefixes&&r?h(u.name,r&&"all"!=c.prefixes):c.prefixes,m=[];if((d||[]).forEach(function(e){e in L&&(p=L[e].transformName(u.name),m.push(p),f.push(v(p+":"+u.value,o,n)))}),f.push(v(u.name+":"+u.value,o,n)),m.push(u.name),f=y(u,o,n).concat(f),x.get("css.alignVendor")){var g=k.getStringsPads(m);f=f.map(function(e,t){return g[t]+e})}return f},expandToSnippet:function(e,t){var n=this.expand(e,null,t);return null===n?null:Array.isArray(n)?n.join("\n"):"string"!=typeof n?n.data:n+""},splitSnippet:function(e){if(e=k.trim(e),-1==e.indexOf(":"))return{name:e,value:I};var t=e.split(":");return{name:k.trim(t.shift()),value:k.trim(t.join(":")).replace(/^(\$\{0\}|\$0)(\s*;?)$/,"${1}$2")}},getSyntaxPreference:m,transformSnippet:v,vendorPrefixes:p},n.exports})},{"../assets/caniuse":22,"../assets/preferences":27,"../assets/resources":30,"../assets/stringStream":31,"../editTree/css":35,"../utils/common":71,"../utils/template":75}],63:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e,t,n){function r(e,t){var n=f.findSnippet(t,e);if(!n&&u.get("css.fuzzySearch")){var r=parseFloat(u.get("css.fuzzySearchMinScore"));n=f.fuzzyFindSnippet(t,e,r)}return n?("string"!=typeof n&&(n=n.data),h.splitSnippet(n).name):void 0}function i(e){var t=h.vendorPrefixes(e);return t||(t=u.getArray("css.gradient.prefixes")),t||[]}function o(e,t){var n=[],r=t.name(),o=u.get("css.gradient.omitDefaultDirection");u.get("css.gradient.fallback")&&~r.toLowerCase().indexOf("background")&&n.push({name:"background-color",value:"${1:"+e[0].gradient.colorStops[0].color+"}"});var a=t.value();return i("linear-gradient").forEach(function(t){var i=h.prefixed(r,t);if("webkit"==t&&u.get("css.gradient.oldWebkit"))try{n.push({name:i,value:s(e,a,{prefix:t,oldWebkit:!0,omitDefaultDirection:o})})}catch(l){}n.push({name:i,value:s(e,a,{prefix:t,omitDefaultDirection:o})})}),n.sort(function(e,t){return t.name.length-e.name.length})}function s(e,t,n){return n=n||{},e=p.clone(e),e.reverse().forEach(function(e,r){var i=!r&&n.placeholder?n.placeholder:"",o=n.oldWebkit?e.gradient.stringifyOldWebkit(n):e.gradient.stringify(n);t=p.replaceSubstring(t,o+i,e.matchedPart)}),t}function a(e){"string"!=typeof e&&(e=e.name());var t=(h.vendorPrefixes(e)||[]).map(function(t){return"-"+t+"-"+e});return t.push(e),t}function l(e,t){var n=e.parent,r=u.get("css.alignVendor"),i=u.get("css.gradient.omitDefaultDirection"),l=e.styleSeparator,c=e.styleBefore;if(n.getAll(a(e)).forEach(function(t){t!=e&&/gradient/i.test(t.value())&&(t.styleSeparator.length<l.length&&(l=t.styleSeparator),t.styleBefore.length<c.length&&(c=t.styleBefore),n.remove(t))}),r){if(c!=e.styleBefore){var f=e.fullRange();n._updateSource(c,f.start,f.start+e.styleBefore.length),e.styleBefore=c}l!=e.styleSeparator&&(n._updateSource(l,e.nameRange().end,e.valueRange().start),e.styleSeparator=l)}var h=e.value(),d=o(t,e);if(r){var m=[],g=[];d.forEach(function(e){m.push(e.name),g.push(e.value)}),g.push(e.value()),m.push(e.name());var v=p.getStringsPads(g.map(function(e){return e.substring(0,e.indexOf("("))})),b=p.getStringsPads(m);e.name(b[b.length-1]+e.name()),d.forEach(function(e,t){e.name=b[t]+e.name,e.value=v[t]+e.value}),e.value(v[v.length-1]+e.value())}d.forEach(function(t){n.add(t.name,t.value,n.indexOf(e))}),e.value(s(t,h,{placeholder:"${2}",omitDefaultDirection:i}))}function c(e,t,n){if(n=n||"css","css"==n||"less"==n||"scss"==n)return!0;for(var r=e.property.valueRange(!0).start,i=e.gradients,o=i.length-1;o>=0;o--)if(i[o].matchedPart.start+r>=t)return!1;return!0}var u=e("../assets/preferences"),f=e("../assets/resources"),p=e("../utils/common"),h=(e("../assets/stringStream"),e("./css")),d=e("../assets/range"),m=e("../editTree/css"),g=e("../utils/editor"),v=e("./gradient/linear"),b=["css","less","sass","scss","stylus","styl"];return u.define("css.gradient.prefixes","webkit, moz, o","A comma-separated list of vendor-prefixes for which values should be generated."),u.define("css.gradient.oldWebkit",!1,"Generate gradient definition for old Webkit implementations"),u.define("css.gradient.omitDefaultDirection",!0,"Do not output default direction definition in generated gradients."),u.define("css.gradient.defaultProperty","background-image","When gradient expanded outside CSS value context, it will produce properties with this name."),u.define("css.gradient.fallback",!1,"With this option enabled, CSS gradient generator will produce <code>background-color</code> property with gradient first color as fallback for old browsers."),n=n||{},n.exports={findGradients:function(e){var t=e.value(),n=[];return e.valueParts().forEach(function(e){var r=e.substring(t);if(v.isLinearGradient(r)){var i=v.parse(r);i&&n.push({gradient:i,matchedPart:e})}}),n.length?n:null},gradientsFromCSSProperty:function(e,t){var n=m.propertyFromPosition(e,t);if(n){var r=this.findGradients(n);if(r)return{property:n,gradients:r}}return null},expandAbbreviationHandler:function(e,t,n){var i=g.outputInfo(e,t,n);if(!~b.indexOf(i.syntax))return!1;var o=e.getCaretPos(),s=i.content,a=this.gradientsFromCSSProperty(s,o);if(a){if(!c(a,o,i.syntax))return!1;var u=a.property,f=u.parent,h=f.options.offset||0,d=h+f.toString().length;if(/[\n\r]/.test(u.value())){var m=u.valueRange(!0).start+p.last(a.gradients).matchedPart.end;s=p.replaceSubstring(s,";",m);var v=this.gradientsFromCSSProperty(s,o);v&&(a=v,u=a.property,f=u.parent)}u.end(";");var y=r(u.name(),t);return y&&u.name(y),l(u,a.gradients),e.replaceContent(f.toString(),h,d,!0),!0}return this.expandGradientOutsideValue(e,t)},expandGradientOutsideValue:function(e,t){var n=u.get("css.gradient.defaultProperty"),r=u.get("css.gradient.omitDefaultDirection");if(!n)return!1;var i=String(e.getContent()),a=d.create(e.getCurrentLineRange()),l=a.substring(i).replace(/^\s+/,function(e){return a.start+=e.length,""}).replace(/\s+$/,function(e){return a.end-=e.length,""}),c="a{"+n+": "+l+";}",f=this.gradientsFromCSSProperty(c,c.length-2);if(f){var m=o(f.gradients,f.property);m.push({name:f.property.name(),value:s(f.gradients,f.property.value(),{placeholder:"${2}",omitDefaultDirection:r})});var g=h.getSyntaxPreference("valueSeparator",t),v=h.getSyntaxPreference("propertyEnd",t);if(u.get("css.alignVendor")){var b=p.getStringsPads(m.map(function(e){return e.value.substring(0,e.value.indexOf("("))}));m.forEach(function(e,t){e.value=b[t]+e.value})}return m=m.map(function(e){return e.name+g+e.value+v}),e.replaceContent(m.join("\n"),a.start,a.end),!0}return!1},reflectValueHandler:function(e){var t=u.get("css.gradient.omitDefaultDirection"),n=this.findGradients(e);if(!n)return!1;var r=this,i=e.value();return e.parent.getAll(a(e)).forEach(function(o){if(o!==e){var a=r.findGradients(o);if(a){var l=o.value(),c=a[0].matchedPart.substring(l),u="";/^\s*\-([a-z]+)\-/.test(c)&&(u=RegExp.$1),o.value(s(n,i,{prefix:u,omitDefaultDirection:t}))}}}),!0}}})},{"../assets/preferences":27,"../assets/range":29,"../assets/resources":30,"../assets/stringStream":31,"../editTree/css":35,"../utils/common":71,"../utils/editor":73,"./css":62,"./gradient/linear":64}],64:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t) | ||
+ | };r(function(e){function t(e){this.colorStops=[],this.direction=180;for(var t,n,i=s.create(a.trim(e));t=i.next();)","==i.peek()?(n=i.current(),this.colorStops.length||!f.test(n)&&!p.test(n)?this.addColorStop(n):this.direction=r(n),i.next(),i.eatSpace(),i.start=i.pos):"("==t&&i.skipTo(")");this.addColorStop(i.current())}function n(e){return a.trim(e).replace(/\s+/g," ")}function r(e){if("number"==typeof e)return e;if(e=n(e).toLowerCase(),f.test(e))return+RegExp.$1;var t=/^to\s/.test(e)?"to ":"",r=~e.indexOf("left")&&"left",i=~e.indexOf("right")&&"right",o=~e.indexOf("top")&&"top",s=~e.indexOf("bottom")&&"bottom",a=n(t+(o||s||"")+" "+(r||i||""));return l[a]||0}function i(e,t){for(var n=/^to\s/,r=Object.keys(l).filter(function(e){var r=n.test(e);return t?!r:r}),i=0;i<r.length;i++)if(l[r[i]]==e)return r[i];return t&&(e=(e+270)%360),e+"deg"}function o(e){if(e=i(e,!0),f.test(e))throw"The direction is an angle that can\u2019t be converted.";var t=function(t){return~e.indexOf(t)?"100%":"0"};return t("left")+" "+t("top")+", "+t("right")+" "+t("bottom")}var s=e("../../assets/stringStream"),a=e("../../utils/common"),l={bottom:0,"bottom left":45,left:90,"top left":135,top:180,"top right":225,right:270,"bottom right":315,"to top":0,"to top right":45,"to right":90,"to bottom right":135,"to bottom":180,"to bottom left":225,"to left":270,"to top left":315},c=["top","to bottom","0deg"],u=/^\s*(\-[a-z]+\-)?(lg|linear\-gradient)\s*\(/i,f=/(\d+)deg/i,p=/top|bottom|left|right/i;return t.prototype={type:"linear-gradient",addColorStop:function(e,t){e=n(e||""),e&&(e=this.parseColorStop(e),"undefined"==typeof t?this.colorStops.push(e):this.colorStops.splice(t,0,e))},parseColorStop:function(e){e=n(e);var t=null;if(e=e.replace(/^(\w+\(.+?\))\s*/,function(e,n){return t=n,""}),!t){var r=e.split(" ");t=r[0],e=r[1]||""}var i={color:t};return e&&e.replace(/^(\-?[\d\.]+)([a-z%]+)?$/,function(e,t,n){i.position=t,~t.indexOf(".")?n="":n||(n="%"),n&&(i.unit=n)}),i},stringify:function(e){e=e||{};var t="linear-gradient";e.prefix&&(t="-"+e.prefix+"-"+t);var n=this.colorStops.map(function(e){var t=e.position?" "+e.position+(e.unit||""):"";return e.color+t}),r=i(this.direction,!!e.prefix);return e.omitDefaultDirection&&~c.indexOf(r)||n.unshift(r),t+"("+n.join(", ")+")"},stringifyOldWebkit:function(){var e=this.colorStops.map(function(e){return a.clone(e)});return e.forEach(function(e){if("position"in e){if(!~e.position.indexOf(".")&&"%"!=e.unit)throw"Can't convert color stop '"+(e.position+(e.unit||""))+"'";e.position=parseFloat(e.position)/("%"==e.unit?100:1)}}),this._fillImpliedPositions(e),e=e.map(function(t,n){return t.position||n?1==t.position&&n==e.length-1?"to("+t.color+")":"color-stop("+t.position.toFixed(2).replace(/\.?0+$/,"")+", "+t.color+")":"from("+t.color+")"}),"-webkit-gradient(linear, "+o((this.direction+180)%360)+", "+e.join(", ")+")"},_fillImpliedPositions:function(e){var t=0;e.forEach(function(n,r){if(!r)return n.position=n.position||0;if(r!=e.length-1||"position"in n||(n.position=1),"position"in n){var i=e[t].position||0,o=(n.position-i)/(r-t);e.slice(t,r).forEach(function(e,t){e.position=i+o*t}),t=r}})},valueOf:function(){return this.stringify()}},{parse:function(e){if(!this.isLinearGradient(e))throw"Invalid linear gradient definition:\n"+e;return e=e.replace(/^\s*[\-a-z]+\s*\(|\)\s*$/gi,""),new t(e)},isLinearGradient:function(e){return u.test(e)},resolveDirection:r,stringifyDirection:i}})},{"../../assets/stringStream":31,"../../utils/common":71}],65:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../utils/common"),n={empty:[],blockLevel:"address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6".split(","),inlineLevel:"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var".split(",")},r={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};return{resolve:function(e){return e=(e||"").toLowerCase(),e in r?this.getMapping(e):this.isInlineLevel(e)?"span":"div"},getMapping:function(e){return r[e.toLowerCase()]},isInlineLevel:function(e){return this.isTypeOf(e,"inlineLevel")},isBlockLevel:function(e){return this.isTypeOf(e,"blockLevel")},isEmptyElement:function(e){return this.isTypeOf(e,"empty")},isTypeOf:function(e,t){return~n[t].indexOf(e)},addMapping:function(e,t){r[e]=t},removeMapping:function(e){e in r&&delete r[e]},addElementToCollection:function(e,t){n[t]||(n[t]=[]);var r=this.getCollection(t);~r.indexOf(e)||r.push(e)},removeElementFromCollection:function(e,r){r in n&&(n[r]=t.without(this.getCollection(r),e))},getCollection:function(e){return n[e]}}})},{"../utils/common":71}],66:[function(e,t){t.exports={variables:{lang:"en",locale:"en-US",charset:"UTF-8",indentation:" ",newline:"\n"},css:{filters:"css",profile:"css",snippets:{"@i":"@import url(|);","@import":"@import url(|);","@m":"@media ${1:screen} {\n |\n}","@media":"@media ${1:screen} {\n |\n}","@f":"@font-face {\n font-family:|;\n src:url(|);\n}","@f+":"@font-face {\n font-family: '${1:FontName}';\n src: url('${2:FileName}.eot');\n src: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n url('${2:FileName}.woff') format('woff'),\n url('${2:FileName}.ttf') format('truetype'),\n url('${2:FileName}.svg#${1:FontName}') format('svg');\n font-style: ${3:normal};\n font-weight: ${4:normal};\n}","@kf":"@-webkit-keyframes ${1:identifier} {\n ${2:from} { ${3} }${6}\n ${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n ${2:from} { ${3} }${6}\n ${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n ${2:from} { ${3} }${6}\n ${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n ${2:from} { ${3} }${6}\n ${4:to} { ${5} }\n}",anim:"animation:|;","anim-":"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};",animdel:"animation-delay:${1:time};",animdir:"animation-direction:${1:normal};","animdir:n":"animation-direction:normal;","animdir:r":"animation-direction:reverse;","animdir:a":"animation-direction:alternate;","animdir:ar":"animation-direction:alternate-reverse;",animdur:"animation-duration:${1:0}s;",animfm:"animation-fill-mode:${1:both};","animfm:f":"animation-fill-mode:forwards;","animfm:b":"animation-fill-mode:backwards;","animfm:bt":"animation-fill-mode:both;","animfm:bh":"animation-fill-mode:both;",animic:"animation-iteration-count:${1:1};","animic:i":"animation-iteration-count:infinite;",animn:"animation-name:${1:none};",animps:"animation-play-state:${1:running};","animps:p":"animation-play-state:paused;","animps:r":"animation-play-state:running;",animtf:"animation-timing-function:${1:linear};","animtf:e":"animation-timing-function:ease;","animtf:ei":"animation-timing-function:ease-in;","animtf:eo":"animation-timing-function:ease-out;","animtf:eio":"animation-timing-function:ease-in-out;","animtf:l":"animation-timing-function:linear;","animtf:cb":"animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});",ap:"appearance:${none};","!":"!important",pos:"position:${1:relative};","pos:s":"position:static;","pos:a":"position:absolute;","pos:r":"position:relative;","pos:f":"position:fixed;",t:"top:|;","t:a":"top:auto;",r:"right:|;","r:a":"right:auto;",b:"bottom:|;","b:a":"bottom:auto;",l:"left:|;","l:a":"left:auto;",z:"z-index:|;","z:a":"z-index:auto;",fl:"float:${1:left};","fl:n":"float:none;","fl:l":"float:left;","fl:r":"float:right;",cl:"clear:${1:both};","cl:n":"clear:none;","cl:l":"clear:left;","cl:r":"clear:right;","cl:b":"clear:both;",colm:"columns:|;",colmc:"column-count:|;",colmf:"column-fill:|;",colmg:"column-gap:|;",colmr:"column-rule:|;",colmrc:"column-rule-color:|;",colmrs:"column-rule-style:|;",colmrw:"column-rule-width:|;",colms:"column-span:|;",colmw:"column-width:|;",d:"display:${1:block};","d:n":"display:none;","d:b":"display:block;","d:f":"display:flex;","d:if":"display:inline-flex;","d:i":"display:inline;","d:ib":"display:inline-block;","d:ib+":"display: inline-block;\n*display: inline;\n*zoom: 1;","d:li":"display:list-item;","d:ri":"display:run-in;","d:cp":"display:compact;","d:tb":"display:table;","d:itb":"display:inline-table;","d:tbcp":"display:table-caption;","d:tbcl":"display:table-column;","d:tbclg":"display:table-column-group;","d:tbhg":"display:table-header-group;","d:tbfg":"display:table-footer-group;","d:tbr":"display:table-row;","d:tbrg":"display:table-row-group;","d:tbc":"display:table-cell;","d:rb":"display:ruby;","d:rbb":"display:ruby-base;","d:rbbg":"display:ruby-base-group;","d:rbt":"display:ruby-text;","d:rbtg":"display:ruby-text-group;",v:"visibility:${1:hidden};","v:v":"visibility:visible;","v:h":"visibility:hidden;","v:c":"visibility:collapse;",ov:"overflow:${1:hidden};","ov:v":"overflow:visible;","ov:h":"overflow:hidden;","ov:s":"overflow:scroll;","ov:a":"overflow:auto;",ovx:"overflow-x:${1:hidden};","ovx:v":"overflow-x:visible;","ovx:h":"overflow-x:hidden;","ovx:s":"overflow-x:scroll;","ovx:a":"overflow-x:auto;",ovy:"overflow-y:${1:hidden};","ovy:v":"overflow-y:visible;","ovy:h":"overflow-y:hidden;","ovy:s":"overflow-y:scroll;","ovy:a":"overflow-y:auto;",ovs:"overflow-style:${1:scrollbar};","ovs:a":"overflow-style:auto;","ovs:s":"overflow-style:scrollbar;","ovs:p":"overflow-style:panner;","ovs:m":"overflow-style:move;","ovs:mq":"overflow-style:marquee;",zoo:"zoom:1;",zm:"zoom:1;",cp:"clip:|;","cp:a":"clip:auto;","cp:r":"clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});",bxz:"box-sizing:${1:border-box};","bxz:cb":"box-sizing:content-box;","bxz:bb":"box-sizing:border-box;",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};","bxsh:r":"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});","bxsh:ra":"box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});","bxsh:n":"box-shadow:none;",m:"margin:|;","m:a":"margin:auto;",mt:"margin-top:|;","mt:a":"margin-top:auto;",mr:"margin-right:|;","mr:a":"margin-right:auto;",mb:"margin-bottom:|;","mb:a":"margin-bottom:auto;",ml:"margin-left:|;","ml:a":"margin-left:auto;",p:"padding:|;",pt:"padding-top:|;",pr:"padding-right:|;",pb:"padding-bottom:|;",pl:"padding-left:|;",w:"width:|;","w:a":"width:auto;",h:"height:|;","h:a":"height:auto;",maw:"max-width:|;","maw:n":"max-width:none;",mah:"max-height:|;","mah:n":"max-height:none;",miw:"min-width:|;",mih:"min-height:|;",mar:"max-resolution:${1:res};",mir:"min-resolution:${1:res};",ori:"orientation:|;","ori:l":"orientation:landscape;","ori:p":"orientation:portrait;",ol:"outline:|;","ol:n":"outline:none;",olo:"outline-offset:|;",olw:"outline-width:|;","olw:tn":"outline-width:thin;","olw:m":"outline-width:medium;","olw:tc":"outline-width:thick;",ols:"outline-style:|;","ols:n":"outline-style:none;","ols:dt":"outline-style:dotted;","ols:ds":"outline-style:dashed;","ols:s":"outline-style:solid;","ols:db":"outline-style:double;","ols:g":"outline-style:groove;","ols:r":"outline-style:ridge;","ols:i":"outline-style:inset;","ols:o":"outline-style:outset;",olc:"outline-color:#${1:000};","olc:i":"outline-color:invert;",bfv:"backface-visibility:|;","bfv:h":"backface-visibility:hidden;","bfv:v":"backface-visibility:visible;",bd:"border:|;","bd+":"border:${1:1px} ${2:solid} ${3:#000};","bd:n":"border:none;",bdbk:"border-break:${1:close};","bdbk:c":"border-break:close;",bdcl:"border-collapse:|;","bdcl:c":"border-collapse:collapse;","bdcl:s":"border-collapse:separate;",bdc:"border-color:#${1:000};","bdc:t":"border-color:transparent;",bdi:"border-image:url(|);","bdi:n":"border-image:none;",bdti:"border-top-image:url(|);","bdti:n":"border-top-image:none;",bdri:"border-right-image:url(|);","bdri:n":"border-right-image:none;",bdbi:"border-bottom-image:url(|);","bdbi:n":"border-bottom-image:none;",bdli:"border-left-image:url(|);","bdli:n":"border-left-image:none;",bdci:"border-corner-image:url(|);","bdci:n":"border-corner-image:none;","bdci:c":"border-corner-image:continue;",bdtli:"border-top-left-image:url(|);","bdtli:n":"border-top-left-image:none;","bdtli:c":"border-top-left-image:continue;",bdtri:"border-top-right-image:url(|);","bdtri:n":"border-top-right-image:none;","bdtri:c":"border-top-right-image:continue;",bdbri:"border-bottom-right-image:url(|);","bdbri:n":"border-bottom-right-image:none;","bdbri:c":"border-bottom-right-image:continue;",bdbli:"border-bottom-left-image:url(|);","bdbli:n":"border-bottom-left-image:none;","bdbli:c":"border-bottom-left-image:continue;",bdf:"border-fit:${1:repeat};","bdf:c":"border-fit:clip;","bdf:r":"border-fit:repeat;","bdf:sc":"border-fit:scale;","bdf:st":"border-fit:stretch;","bdf:ow":"border-fit:overwrite;","bdf:of":"border-fit:overflow;","bdf:sp":"border-fit:space;",bdlen:"border-length:|;","bdlen:a":"border-length:auto;",bdsp:"border-spacing:|;",bds:"border-style:|;","bds:n":"border-style:none;","bds:h":"border-style:hidden;","bds:dt":"border-style:dotted;","bds:ds":"border-style:dashed;","bds:s":"border-style:solid;","bds:db":"border-style:double;","bds:dtds":"border-style:dot-dash;","bds:dtdtds":"border-style:dot-dot-dash;","bds:w":"border-style:wave;","bds:g":"border-style:groove;","bds:r":"border-style:ridge;","bds:i":"border-style:inset;","bds:o":"border-style:outset;",bdw:"border-width:|;",bdtw:"border-top-width:|;",bdrw:"border-right-width:|;",bdbw:"border-bottom-width:|;",bdlw:"border-left-width:|;",bdt:"border-top:|;",bt:"border-top:|;","bdt+":"border-top:${1:1px} ${2:solid} ${3:#000};","bdt:n":"border-top:none;",bdts:"border-top-style:|;","bdts:n":"border-top-style:none;",bdtc:"border-top-color:#${1:000};","bdtc:t":"border-top-color:transparent;",bdr:"border-right:|;",br:"border-right:|;","bdr+":"border-right:${1:1px} ${2:solid} ${3:#000};","bdr:n":"border-right:none;",bdrst:"border-right-style:|;","bdrst:n":"border-right-style:none;",bdrc:"border-right-color:#${1:000};","bdrc:t":"border-right-color:transparent;",bdb:"border-bottom:|;",bb:"border-bottom:|;","bdb+":"border-bottom:${1:1px} ${2:solid} ${3:#000};","bdb:n":"border-bottom:none;",bdbs:"border-bottom-style:|;","bdbs:n":"border-bottom-style:none;",bdbc:"border-bottom-color:#${1:000};","bdbc:t":"border-bottom-color:transparent;",bdl:"border-left:|;",bl:"border-left:|;","bdl+":"border-left:${1:1px} ${2:solid} ${3:#000};","bdl:n":"border-left:none;",bdls:"border-left-style:|;","bdls:n":"border-left-style:none;",bdlc:"border-left-color:#${1:000};","bdlc:t":"border-left-color:transparent;",bdrs:"border-radius:|;",bdtrrs:"border-top-right-radius:|;",bdtlrs:"border-top-left-radius:|;",bdbrrs:"border-bottom-right-radius:|;",bdblrs:"border-bottom-left-radius:|;",bg:"background:#${1:000};","bg+":"background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};","bg:n":"background:none;","bg:ie":"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",bgc:"background-color:#${1:fff};","bgc:t":"background-color:transparent;",bgi:"background-image:url(|);","bgi:n":"background-image:none;",bgr:"background-repeat:|;","bgr:n":"background-repeat:no-repeat;","bgr:x":"background-repeat:repeat-x;","bgr:y":"background-repeat:repeat-y;","bgr:sp":"background-repeat:space;","bgr:rd":"background-repeat:round;",bga:"background-attachment:|;","bga:f":"background-attachment:fixed;","bga:s":"background-attachment:scroll;",bgp:"background-position:${1:0} ${2:0};",bgpx:"background-position-x:|;",bgpy:"background-position-y:|;",bgbk:"background-break:|;","bgbk:bb":"background-break:bounding-box;","bgbk:eb":"background-break:each-box;","bgbk:c":"background-break:continuous;",bgcp:"background-clip:${1:padding-box};","bgcp:bb":"background-clip:border-box;","bgcp:pb":"background-clip:padding-box;","bgcp:cb":"background-clip:content-box;","bgcp:nc":"background-clip:no-clip;",bgo:"background-origin:|;","bgo:pb":"background-origin:padding-box;","bgo:bb":"background-origin:border-box;","bgo:cb":"background-origin:content-box;",bgsz:"background-size:|;","bgsz:a":"background-size:auto;","bgsz:ct":"background-size:contain;","bgsz:cv":"background-size:cover;",c:"color:#${1:000};","c:r":"color:rgb(${1:0}, ${2:0}, ${3:0});","c:ra":"color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});",cm:"/* |${child} */",cnt:"content:'|';","cnt:n":"content:normal;","cnt:oq":"content:open-quote;","cnt:noq":"content:no-open-quote;","cnt:cq":"content:close-quote;","cnt:ncq":"content:no-close-quote;","cnt:a":"content:attr(|);","cnt:c":"content:counter(|);","cnt:cs":"content:counters(|);",tbl:"table-layout:|;","tbl:a":"table-layout:auto;","tbl:f":"table-layout:fixed;",cps:"caption-side:|;","cps:t":"caption-side:top;","cps:b":"caption-side:bottom;",ec:"empty-cells:|;","ec:s":"empty-cells:show;","ec:h":"empty-cells:hide;",lis:"list-style:|;","lis:n":"list-style:none;",lisp:"list-style-position:|;","lisp:i":"list-style-position:inside;","lisp:o":"list-style-position:outside;",list:"list-style-type:|;","list:n":"list-style-type:none;","list:d":"list-style-type:disc;","list:c":"list-style-type:circle;","list:s":"list-style-type:square;","list:dc":"list-style-type:decimal;","list:dclz":"list-style-type:decimal-leading-zero;","list:lr":"list-style-type:lower-roman;","list:ur":"list-style-type:upper-roman;",lisi:"list-style-image:|;","lisi:n":"list-style-image:none;",q:"quotes:|;","q:n":"quotes:none;","q:ru":"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';","q:en":"quotes:'\\201C' '\\201D' '\\2018' '\\2019';",ct:"content:|;","ct:n":"content:normal;","ct:oq":"content:open-quote;","ct:noq":"content:no-open-quote;","ct:cq":"content:close-quote;","ct:ncq":"content:no-close-quote;","ct:a":"content:attr(|);","ct:c":"content:counter(|);","ct:cs":"content:counters(|);",coi:"counter-increment:|;",cor:"counter-reset:|;",va:"vertical-align:${1:top};","va:sup":"vertical-align:super;","va:t":"vertical-align:top;","va:tt":"vertical-align:text-top;","va:m":"vertical-align:middle;","va:bl":"vertical-align:baseline;","va:b":"vertical-align:bottom;","va:tb":"vertical-align:text-bottom;","va:sub":"vertical-align:sub;",ta:"text-align:${1:left};","ta:l":"text-align:left;","ta:c":"text-align:center;","ta:r":"text-align:right;","ta:j":"text-align:justify;","ta-lst":"text-align-last:|;","tal:a":"text-align-last:auto;","tal:l":"text-align-last:left;","tal:c":"text-align-last:center;","tal:r":"text-align-last:right;",td:"text-decoration:${1:none};","td:n":"text-decoration:none;","td:u":"text-decoration:underline;","td:o":"text-decoration:overline;","td:l":"text-decoration:line-through;",te:"text-emphasis:|;","te:n":"text-emphasis:none;","te:ac":"text-emphasis:accent;","te:dt":"text-emphasis:dot;","te:c":"text-emphasis:circle;","te:ds":"text-emphasis:disc;","te:b":"text-emphasis:before;","te:a":"text-emphasis:after;",th:"text-height:|;","th:a":"text-height:auto;","th:f":"text-height:font-size;","th:t":"text-height:text-size;","th:m":"text-height:max-size;",ti:"text-indent:|;","ti:-":"text-indent:-9999px;",tj:"text-justify:|;","tj:a":"text-justify:auto;","tj:iw":"text-justify:inter-word;","tj:ii":"text-justify:inter-ideograph;","tj:ic":"text-justify:inter-cluster;","tj:d":"text-justify:distribute;","tj:k":"text-justify:kashida;","tj:t":"text-justify:tibetan;",tov:"text-overflow:${ellipsis};","tov:e":"text-overflow:ellipsis;","tov:c":"text-overflow:clip;",to:"text-outline:|;","to+":"text-outline:${1:0} ${2:0} ${3:#000};","to:n":"text-outline:none;",tr:"text-replace:|;","tr:n":"text-replace:none;",tt:"text-transform:${1:uppercase};","tt:n":"text-transform:none;","tt:c":"text-transform:capitalize;","tt:u":"text-transform:uppercase;","tt:l":"text-transform:lowercase;",tw:"text-wrap:|;","tw:n":"text-wrap:normal;","tw:no":"text-wrap:none;","tw:u":"text-wrap:unrestricted;","tw:s":"text-wrap:suppress;",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};","tsh:r":"text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});","tsh:ra":"text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});","tsh+":"text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};","tsh:n":"text-shadow:none;",trf:"transform:|;","trf:skx":"transform: skewX(${1:angle});","trf:sky":"transform: skewY(${1:angle});","trf:sc":"transform: scale(${1:x}, ${2:y});","trf:scx":"transform: scaleX(${1:x});","trf:scy":"transform: scaleY(${1:y});","trf:scz":"transform: scaleZ(${1:z});","trf:sc3":"transform: scale3d(${1:x}, ${2:y}, ${3:z});","trf:r":"transform: rotate(${1:angle});","trf:rx":"transform: rotateX(${1:angle});","trf:ry":"transform: rotateY(${1:angle});","trf:rz":"transform: rotateZ(${1:angle});","trf:t":"transform: translate(${1:x}, ${2:y});","trf:tx":"transform: translateX(${1:x});","trf:ty":"transform: translateY(${1:y});","trf:tz":"transform: translateZ(${1:z});","trf:t3":"transform: translate3d(${1:tx}, ${2:ty}, ${3:tz});",trfo:"transform-origin:|;",trfs:"transform-style:${1:preserve-3d};",trs:"transition:${1:prop} ${2:time};",trsde:"transition-delay:${1:time};",trsdu:"transition-duration:${1:time};",trsp:"transition-property:${1:prop};",trstf:"transition-timing-function:${1:tfunc};",lh:"line-height:|;",whs:"white-space:|;","whs:n":"white-space:normal;","whs:p":"white-space:pre;","whs:nw":"white-space:nowrap;","whs:pw":"white-space:pre-wrap;","whs:pl":"white-space:pre-line;",whsc:"white-space-collapse:|;","whsc:n":"white-space-collapse:normal;","whsc:k":"white-space-collapse:keep-all;","whsc:l":"white-space-collapse:loose;","whsc:bs":"white-space-collapse:break-strict;","whsc:ba":"white-space-collapse:break-all;",wob:"word-break:|;","wob:n":"word-break:normal;","wob:k":"word-break:keep-all;","wob:ba":"word-break:break-all;",wos:"word-spacing:|;",wow:"word-wrap:|;","wow:nm":"word-wrap:normal;","wow:n":"word-wrap:none;","wow:u":"word-wrap:unrestricted;","wow:s":"word-wrap:suppress;","wow:b":"word-wrap:break-word;",wm:"writing-mode:${1:lr-tb};","wm:lrt":"writing-mode:lr-tb;","wm:lrb":"writing-mode:lr-bt;","wm:rlt":"writing-mode:rl-tb;","wm:rlb":"writing-mode:rl-bt;","wm:tbr":"writing-mode:tb-rl;","wm:tbl":"writing-mode:tb-lr;","wm:btl":"writing-mode:bt-lr;","wm:btr":"writing-mode:bt-rl;",lts:"letter-spacing:|;","lts-n":"letter-spacing:normal;",f:"font:|;","f+":"font:${1:1em} ${2:Arial,sans-serif};",fw:"font-weight:|;","fw:n":"font-weight:normal;","fw:b":"font-weight:bold;","fw:br":"font-weight:bolder;","fw:lr":"font-weight:lighter;",fs:"font-style:${italic};","fs:n":"font-style:normal;","fs:i":"font-style:italic;","fs:o":"font-style:oblique;",fv:"font-variant:|;","fv:n":"font-variant:normal;","fv:sc":"font-variant:small-caps;",fz:"font-size:|;",fza:"font-size-adjust:|;","fza:n":"font-size-adjust:none;",ff:"font-family:|;","ff:s":"font-family:serif;","ff:ss":"font-family:sans-serif;","ff:c":"font-family:cursive;","ff:f":"font-family:fantasy;","ff:m":"font-family:monospace;","ff:a":'font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;',"ff:t":'font-family: "Times New Roman", Times, Baskerville, Georgia, serif;',"ff:v":"font-family: Verdana, Geneva, sans-serif;",fef:"font-effect:|;","fef:n":"font-effect:none;","fef:eg":"font-effect:engrave;","fef:eb":"font-effect:emboss;","fef:o":"font-effect:outline;",fem:"font-emphasize:|;",femp:"font-emphasize-position:|;","femp:b":"font-emphasize-position:before;","femp:a":"font-emphasize-position:after;",fems:"font-emphasize-style:|;","fems:n":"font-emphasize-style:none;","fems:ac":"font-emphasize-style:accent;","fems:dt":"font-emphasize-style:dot;","fems:c":"font-emphasize-style:circle;","fems:ds":"font-emphasize-style:disc;",fsm:"font-smooth:|;","fsm:a":"font-smooth:auto;","fsm:n":"font-smooth:never;","fsm:aw":"font-smooth:always;",fst:"font-stretch:|;","fst:n":"font-stretch:normal;","fst:uc":"font-stretch:ultra-condensed;","fst:ec":"font-stretch:extra-condensed;","fst:c":"font-stretch:condensed;","fst:sc":"font-stretch:semi-condensed;","fst:se":"font-stretch:semi-expanded;","fst:e":"font-stretch:expanded;","fst:ee":"font-stretch:extra-expanded;","fst:ue":"font-stretch:ultra-expanded;",op:"opacity:|;","op+":"opacity: $1;\nfilter: alpha(opacity=$2);","op:ie":"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);","op:ms":"-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",rsz:"resize:|;","rsz:n":"resize:none;","rsz:b":"resize:both;","rsz:h":"resize:horizontal;","rsz:v":"resize:vertical;",cur:"cursor:${pointer};","cur:a":"cursor:auto;","cur:d":"cursor:default;","cur:c":"cursor:crosshair;","cur:ha":"cursor:hand;","cur:he":"cursor:help;","cur:m":"cursor:move;","cur:p":"cursor:pointer;","cur:t":"cursor:text;",fxd:"flex-direction:|;","fxd:r":"flex-direction:row;","fxd:rr":"flex-direction:row-reverse;","fxd:c":"flex-direction:column;","fxd:cr":"flex-direction:column-reverse;",fxw:"flex-wrap: |;","fxw:n":"flex-wrap:nowrap;","fxw:w":"flex-wrap:wrap;","fxw:wr":"flex-wrap:wrap-reverse;",fxf:"flex-flow:|;",jc:"justify-content:|;","jc:fs":"justify-content:flex-start;","jc:fe":"justify-content:flex-end;","jc:c":"justify-content:center;","jc:sb":"justify-content:space-between;","jc:sa":"justify-content:space-around;",ai:"align-items:|;","ai:fs":"align-items:flex-start;","ai:fe":"align-items:flex-end;","ai:c":"align-items:center;","ai:b":"align-items:baseline;","ai:s":"align-items:stretch;",ac:"align-content:|;","ac:fs":"align-content:flex-start;","ac:fe":"align-content:flex-end;","ac:c":"align-content:center;","ac:sb":"align-content:space-between;","ac:sa":"align-content:space-around;","ac:s":"align-content:stretch;",ord:"order:|;",fxg:"flex-grow:|;",fxsh:"flex-shrink:|;",fxb:"flex-basis:|;",fx:"flex:|;",as:"align-self:|;","as:a":"align-self:auto;","as:fs":"align-self:flex-start;","as:fe":"align-self:flex-end;","as:c":"align-self:center;","as:b":"align-self:baseline;","as:s":"align-self:stretch;",pgbb:"page-break-before:|;","pgbb:au":"page-break-before:auto;","pgbb:al":"page-break-before:always;","pgbb:l":"page-break-before:left;","pgbb:r":"page-break-before:right;",pgbi:"page-break-inside:|;","pgbi:au":"page-break-inside:auto;","pgbi:av":"page-break-inside:avoid;",pgba:"page-break-after:|;","pgba:au":"page-break-after:auto;","pgba:al":"page-break-after:always;","pgba:l":"page-break-after:left;","pgba:r":"page-break-after:right;",orp:"orphans:|;",us:"user-select:${none};",wid:"widows:|;",wfsm:"-webkit-font-smoothing:${antialiased};","wfsm:a":"-webkit-font-smoothing:antialiased;","wfsm:s":"-webkit-font-smoothing:subpixel-antialiased;","wfsm:sa":"-webkit-font-smoothing:subpixel-antialiased;","wfsm:n":"-webkit-font-smoothing:none;"}},html:{filters:"html",profile:"html",snippets:{"!!!":"<!DOCTYPE html>","!!!4t":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',"!!!4s":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',"!!!xt":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',"!!!xs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',"!!!xxs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',c:"<!-- |${child} -->","cc:ie6":"<!--[if lte IE 6]>\n ${child}|\n<![endif]-->","cc:ie":"<!--[if IE]>\n ${child}|\n<![endif]-->","cc:noie":"<!--[if !IE]><!-->\n ${child}|\n<!--<![endif]-->"},abbreviations:{"!":"html:5",a:'<a href="">',"a:link":'<a href="http://|">',"a:mail":'<a href="mailto:|">',abbr:'<abbr title="">',"acr|acronym":'<acronym title="">',base:'<base href="" />',basefont:"<basefont/>",br:"<br/>",frame:"<frame/>",hr:"<hr/>",bdo:'<bdo dir="">',"bdo:r":'<bdo dir="rtl">',"bdo:l":'<bdo dir="ltr">',col:"<col/>",link:'<link rel="stylesheet" href="" />',"link:css":'<link rel="stylesheet" href="${1:style}.css" />',"link:print":'<link rel="stylesheet" href="${1:print}.css" media="print" />',"link:favicon":'<link rel="shortcut icon" type="image/x-icon" href="${1:favicon.ico}" />',"link:touch":'<link rel="apple-touch-icon" href="${1:favicon.png}" />',"link:rss":'<link rel="alternate" type="application/rss+xml" title="RSS" href="${1:rss.xml}" />',"link:atom":'<link rel="alternate" type="application/atom+xml" title="Atom" href="${1:atom.xml}" />',"link:im|link:import":'<link rel="import" href="${1:component}.html" />',meta:"<meta/>","meta:utf":'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />',"meta:win":'<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />',"meta:vp":'<meta name="viewport" content="width=${1:device-width}, user-scalable=${2:no}, initial-scale=${3:1.0}, maximum-scale=${4:1.0}, minimum-scale=${5:1.0}" />',"meta:compat":'<meta http-equiv="X-UA-Compatible" content="${1:IE=7}" />',style:"<style>",script:'<script !src="">',"script:src":'<script src="">',img:'<img src="" alt="" />',"img:s|img:srcset":'<img srcset="" src="" alt="" />',"img:z|img:sizes":'<img sizes="" srcset="" src="" alt="" />',picture:"<picture>","src|source":"<source/>","src:sc|source:src":'<source src="" type=""/>',"src:s|source:srcset":'<source srcset=""/>',"src:m|source:media":'<source media="(${1:min-width: })" srcset=""/>',"src:t|source:type":'<source srcset="|" type="${1:image/}"/>',"src:z|source:sizes":'<source sizes="" srcset=""/>',"src:mt|source:media:type":'<source media="(${1:min-width: })" srcset="" type="${2:image/}"/>',"src:mz|source:media:sizes":'<source media="(${1:min-width: })" sizes="" srcset=""/>',"src:zt|source:sizes:type":'<source sizes="" srcset="" type="${1:image/}"/>',iframe:'<iframe src="" frameborder="0">',embed:'<embed src="" type="" />',object:'<object data="" type="">',param:'<param name="" value="" />',map:'<map name="">',area:'<area shape="" coords="" href="" alt="" />',"area:d":'<area shape="default" href="" alt="" />',"area:c":'<area shape="circle" coords="" href="" alt="" />',"area:r":'<area shape="rect" coords="" href="" alt="" />',"area:p":'<area shape="poly" coords="" href="" alt="" />',form:'<form action="">',"form:get":'<form action="" method="get">',"form:post":'<form action="" method="post">',label:'<label for="">',input:'<input type="${1:text}" />',inp:'<input type="${1:text}" name="" id="" />',"input:h|input:hidden":"input[type=hidden name]","input:t|input:text":"inp","input:search":"inp[type=search]","input:email":"inp[type=email]","input:url":"inp[type=url]","input:p|input:password":"inp[type=password]","input:datetime":"inp[type=datetime]","input:date":"inp[type=date]","input:datetime-local":"inp[type=datetime-local]","input:month":"inp[type=month]","input:week":"inp[type=week]","input:time":"inp[type=time]","input:tel":"inp[type=tel]","input:number":"inp[type=number]","input:color":"inp[type=color]","input:c|input:checkbox":"inp[type=checkbox]","input:r|input:radio":"inp[type=radio]","input:range":"inp[type=range]","input:f|input:file":"inp[type=file]","input:s|input:submit":'<input type="submit" value="" />',"input:i|input:image":'<input type="image" src="" alt="" />',"input:b|input:button":'<input type="button" value="" />',isindex:"<isindex/>","input:reset":"input:button[type=reset]",select:'<select name="" id="">',"select:d|select:disabled":"select[disabled.]","opt|option":'<option value="">',textarea:'<textarea name="" id="" cols="${1:30}" rows="${2:10}">',marquee:'<marquee behavior="" direction="">',"menu:c|menu:context":"menu[type=context]>","menu:t|menu:toolbar":"menu[type=toolbar]>",video:'<video src="">',audio:'<audio src="">',"html:xml":'<html xmlns="http://www.w3.org/1999/xhtml">',keygen:"<keygen/>",command:"<command/>","btn:s|button:s|button:submit":"button[type=submit]","btn:r|button:r|button:reset":"button[type=reset]","btn:d|button:d|button:disabled":"button[disabled.]","fst:d|fset:d|fieldset:d|fieldset:disabled":"fieldset[disabled.]",bq:"blockquote",fig:"figure",figc:"figcaption",pic:"picture",ifr:"iframe",emb:"embed",obj:"object",cap:"caption",colg:"colgroup",fst:"fieldset",btn:"button",optg:"optgroup",tarea:"textarea",leg:"legend",sect:"section",art:"article",hdr:"header",ftr:"footer",adr:"address",dlg:"dialog",str:"strong",prog:"progress",mn:"main",tem:"template",fset:"fieldset",datag:"datagrid",datal:"datalist",kg:"keygen",out:"output",det:"details",cmd:"command",doc:"html>(head>meta[charset=${charset}]+title{${1:Document}})+body",doc4:'html>(head>meta[http-equiv="Content-Type" content="text/html;charset=${charset}"]+title{${1:Document}})+body',"ri:d|ri:dpr":"img:s","ri:v|ri:viewport":"img:z","ri:a|ri:art":"pic>src:m+img","ri:t|ri:type":"pic>src:t+img","html:4t":"!!!4t+doc4[lang=${lang}]","html:4s":"!!!4s+doc4[lang=${lang}]","html:xt":"!!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]","html:xs":"!!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]","html:xxs":"!!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]","html:5":"!!!+doc[lang=${lang}]","ol+":"ol>li","ul+":"ul>li","dl+":"dl>dt+dd","map+":"map>area","table+":"table>tr>td","colgroup+":"colgroup>col","colg+":"colgroup>col","tr+":"tr>td","select+":"select>option","optgroup+":"optgroup>option","optg+":"optgroup>option","pic+":"picture>source:srcset+img"}},xml:{"extends":"html",profile:"xml",filters:"html"},xsl:{"extends":"html",profile:"xml",filters:"html, xsl",abbreviations:{"tm|tmatch":'<xsl:template match="" mode="">',"tn|tname":'<xsl:template name="">',call:'<xsl:call-template name=""/>',ap:'<xsl:apply-templates select="" mode=""/>',api:"<xsl:apply-imports/>",imp:'<xsl:import href=""/>',inc:'<xsl:include href=""/>',ch:"<xsl:choose>","wh|xsl:when":'<xsl:when test="">',ot:"<xsl:otherwise>","if":'<xsl:if test="">',par:'<xsl:param name="">',pare:'<xsl:param name="" select=""/>',"var":'<xsl:variable name="">',vare:'<xsl:variable name="" select=""/>',wp:'<xsl:with-param name="" select=""/>',key:'<xsl:key name="" match="" use=""/>',elem:'<xsl:element name="">',attr:'<xsl:attribute name="">',attrs:'<xsl:attribute-set name="">',cp:'<xsl:copy select=""/>',co:'<xsl:copy-of select=""/>',val:'<xsl:value-of select=""/>',"for|each":'<xsl:for-each select="">',tex:"<xsl:text></xsl:text>",com:"<xsl:comment>",msg:'<xsl:message terminate="no">',fall:"<xsl:fallback>",num:'<xsl:number value=""/>',nam:'<namespace-alias stylesheet-prefix="" result-prefix=""/>',pres:'<xsl:preserve-space elements=""/>',strip:'<xsl:strip-space elements=""/>',proc:'<xsl:processing-instruction name="">',sort:'<xsl:sort select="" order=""/>',"choose+":"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}"},snippets:{"!!!":'<?xml version="1.0" encoding="UTF-8"?>'}},haml:{filters:"haml","extends":"html",profile:"xml"},jade:{filters:"jade","extends":"html",profile:"xml"},jsx:{filters:"jsx, html","extends":"html",profile:"xml"},slim:{filters:"slim","extends":"html",profile:"xml"},scss:{"extends":"css"},sass:{"extends":"css"},less:{"extends":"css"},stylus:{"extends":"css"},styl:{"extends":"stylus"}} | ||
+ | },{}],67:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../assets/elements"),n=e("../assets/tabStops"),r=e("../utils/common"),i=e("../resolver/tagName");return{isUnary:function(e){if(e.children.length||e._text||this.isSnippet(e))return!1;var t=e.data("resource");return t&&t.is_empty},isInline:function(e){return e.isTextNode()||!e.name()||i.isInlineLevel(e.name())},isBlock:function(e){return this.isSnippet(e)||!this.isInline(e)},isSnippet:function(e){return t.is(e.data("resource"),"snippet")},hasTagsInContent:function(e){return r.matchesTag(e.content)},hasBlockChildren:function(e){return this.hasTagsInContent(e)&&this.isBlock(e)||e.children.some(function(e){return this.isBlock(e)},this)},insertChildContent:function(e,t,i){i=r.extend({keepVariable:!0,appendIfNoChild:!0},i||{});var o=!1;return e=n.replaceVariables(e,function(n,s,a){var l=n;return"child"==s&&(l=r.padString(t,r.getLinePaddingFromPosition(e,a.start)),o=!0,i.keepVariable&&(l+=n)),l}),!o&&i.appendIfNoChild&&(e+=t),e}}})},{"../assets/elements":23,"../assets/tabStops":32,"../resolver/tagName":65,"../utils/common":71}],68:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("./common"),n=e("./cssSections"),r=e("../parser/abbreviation"),i=e("../assets/htmlMatcher"),o=e("../editTree/xml"),s=e("../assets/range"),a=e("../assets/resources");return{mimeTypes:{gif:"image/gif",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",svg:"image/svg+xml",html:"text/html",htm:"text/html"},extractAbbreviation:function(e){for(var n=e.length,i=-1,o=0,s=0,a=0;;){if(n--,0>n){i=0;break}var l=e.charAt(n);if("]"==l)s++;else if("["==l){if(!s){i=n+1;break}s--}else if("}"==l)a++;else if("{"==l){if(!a){i=n+1;break}a--}else if(")"==l)o++;else if("("==l){if(!o){i=n+1;break}o--}else{if(s||a)continue;if(!r.isAllowedChar(l)||">"==l&&t.endsWithTag(e.substring(0,n+1))){i=n+1;break}}}return-1==i||a||s||o?"":e.substring(i).replace(/^[\*\+\>\^]+/,"")},getImageSize:function(e){var t="\x89PNG\r\n�\n",n="\xff\xd8",r="GIF8",i=0,o=function(){return e.charCodeAt(i++)};if(e.substr(0,8)===t)return i=e.indexOf("IHDR")+4,{width:o()<<24|o()<<16|o()<<8|o(),height:o()<<24|o()<<16|o()<<8|o()};if(e.substr(0,4)===r)return i=6,{width:o()|o()<<8,height:o()|o()<<8};if(e.substr(0,2)===n){i=2;for(var s=e.length;s>i;){if(255!=o())return;var a=o();if(218==a)break;var l=o()<<8|o();if(!(!(a>=192&&207>=a)||4&a||8&a))return i+=1,{height:o()<<8|o(),width:o()<<8|o()};i+=l-2}}},captureContext:function(e,t){var n={html:1,xml:1,xsl:1},r=e.getSyntax();if(r in n){var s=e.getContent();"undefined"==typeof t&&(t=e.getCaretPos());var a=i.find(s,t);if(a&&"tag"==a.type){var l=a.open,c={name:l.name,attributes:[],match:a},u=o.parse(l.range.substring(s));return u&&(c.attributes=u.getAll().map(function(e){return{name:e.name(),value:e.value()}})),c}}return null},findExpressionBounds:function(e,t){for(var n=String(e.getContent()),r=n.length,i=e.getCaretPos()-1,o=i+1;i>=0&&t(n.charAt(i),i,n);)i--;for(;r>o&&t(n.charAt(o),o,n);)o++;return o>i?s([++i,o]):void 0},compoundUpdate:function(e,t){if(t){var n=e.getSelectionRange();return e.replaceContent(t.data,t.start,t.end,!0),e.createSelection(t.caret,t.caret+n.end-n.start),!0}return!1},detectSyntax:function(e,t){var n=t||"html";return a.hasSyntax(n)||(n="html"),"html"==n&&(this.isStyle(e)||this.isInlineCSS(e))&&(n="css"),"styl"==n&&(n="stylus"),n},detectProfile:function(e){var t=e.getSyntax(),n=a.findItem(t,"profile");if(n)return n;switch(t){case"xml":case"xsl":return"xml";case"css":if(this.isInlineCSS(e))return"line";break;case"html":return n=a.getVariable("profile"),n||(n=this.isXHTML(e)?"xhtml":"html"),n}return"xhtml"},isXHTML:function(e){return-1!=e.getContent().search(/<!DOCTYPE[^>]+XHTML/i)},isStyle:function(e){return!!n.styleTagRange(e.getContent(),e.getCaretPos())},isSupportedCSS:function(e){return"css"==e||"less"==e||"scss"==e},isInlineCSS:function(e){return!!n.styleAttrRange(e.getContent(),e.getCaretPos())}}})},{"../assets/htmlMatcher":25,"../assets/range":29,"../assets/resources":30,"../editTree/xml":36,"../parser/abbreviation":53,"./common":71,"./cssSections":72}],69:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(t){for(var n,r,i,o,s,a,l,c,u,f,p=[],h=0,d=t.length,m=e;d>h;)c=t.charCodeAt(h++),u=t.charCodeAt(h++),f=t.charCodeAt(h++),n=255&c,r=255&u,i=255&f,o=n>>2,s=(3&n)<<4|r>>4,a=(15&r)<<2|i>>6,l=63&i,isNaN(u)?a=l=64:isNaN(f)&&(l=64),p.push(m.charAt(o)+m.charAt(s)+m.charAt(a)+m.charAt(l));return p.join("")},decode:function(t){var n,r,i,o,s,a,l,c,u=0,f=0,p=[],h=e,d=t.length;if(!t)return t;t+="";do o=h.indexOf(t.charAt(u++)),s=h.indexOf(t.charAt(u++)),a=h.indexOf(t.charAt(u++)),l=h.indexOf(t.charAt(u++)),c=o<<18|s<<12|a<<6|l,n=c>>16&255,r=c>>8&255,i=255&c,p[f++]=64==a?String.fromCharCode(n):64==l?String.fromCharCode(n,r):String.fromCharCode(n,r,i);while(d>u);return p.join("")}}})},{}],70:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("./common"),n=(e("../assets/range"),e("../assets/stringStream")),r=/\/\*|\/\//;return{strip:function(e){if(!r.test(e))return e;for(var i,o,s=n(e),a=[];i=s.next();)if("/"===i){if(o=s.peek(),"*"===o)s.start=s.pos-1,s.skipTo("*/")?s.pos+=2:s.skipToEnd(),a.push([s.start,s.pos]);else if("/"===o){for(s.start=s.pos-1;(o=s.next())&&"\n"!==o&&"\r"!=o;);a.push([s.start,s.pos])}}else s.skipQuoted();return t.replaceWith(e,a," ")}}})},{"../assets/range":29,"../assets/stringStream":31,"./common":71}],71:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("../assets/range"),n="${0}";return{reTag:/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,defaultSyntax:function(){return"html"},defaultProfile:function(){return"plain"},endsWithTag:function(e){return this.reTag.test(e)},isNumeric:function(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e&&e>47&&58>e},trim:function(){return String.prototype.trim?function(e){return e?e.trim():""}:function(e){return(e||"").replace(/^\s+|\s+$/g,"")}}(),splitByLines:function(e,t){var n="\n",r=(e||"").replace(/\r\n/g,"\n").replace(/\n\r/g,"\n").replace(/\r/g,"\n").replace(/\n/g,n).split(n);return t&&(r=r.filter(function(e){return e.length&&!!this.trim(e)},this)),r},repeatString:function(e,t){for(var n="";t--;)n+=e;return n},getStringsPads:function(e){var t=e.map(function(e){return"string"==typeof e?e.length:+e}),n=t.reduce(function(e,t){return"undefined"==typeof e?t:Math.max(e,t)});return t.map(function(e){var t=n-e;return t?this.repeatString(" ",t):""},this)},padString:function(e,t){var n=[],r=this.splitByLines(e),i="\n";n.push(r[0]);for(var o=1;o<r.length;o++)n.push(i+t+r[o]);return n.join("")},zeroPadString:function(e,t){for(var n="",r=e.length;t>r++;)n+="0";return n+e},unindentString:function(e,t){for(var n,r=this.splitByLines(e),i=t.length,o=0,s=r.length;s>o;o++)n=r[o],n.substr(0,i)===t&&(r[o]=n.substr(i));return r.join("\n")},replaceUnescapedSymbol:function(e,t,n){for(var r=0,i=e.length,o=t.length,s=0;i>r;)if("\\"==e.charAt(r))r+=o+1;else if(e.substr(r,o)==t){var a=o;s++;var l=n;if("function"==typeof n){var c=n(e,t,r,s);c?(a=c[0].length,l=c[1]):l=!1}if(l===!1){r++;continue}e=e.substring(0,r)+l+e.substring(r+a),i=e.length,r+=l.length}else r++;return e},replaceCounter:function(e,t,n){var r="$";e=String(e),t=String(t),/^\-?\d+$/.test(t)&&(t=+t);var i=this;return this.replaceUnescapedSymbol(e,r,function(e,r,o){if("{"==e.charAt(o+1)||i.isNumeric(e.charAt(o+1)))return!1;for(var s=o+1;"$"==e.charAt(s)&&"{"!=e.charAt(s+1);)s++;var a,l=s-o,c=0,u=!1;return(a=e.substr(s).match(/^@(\-?)(\d*)/))&&(s+=a[0].length,a[1]&&(u=!0),c=parseInt(a[2]||1,10)-1),u&&n&&"number"==typeof t&&(t=n-t+1),t+=c,[e.substring(o,s),i.zeroPadString(t+"",l)]})},matchesTag:function(e){return this.reTag.test(e||"")},escapeText:function(e){return e.replace(/([\$\\])/g,"\\$1")},unescapeText:function(e){return e.replace(/\\(.)/g,"$1")},getCaretPlaceholder:function(){return"function"==typeof n?n.apply(this,arguments):n},setCaretPlaceholder:function(e){n=e},getLinePadding:function(e){return(e.match(/^(\s+)/)||[""])[0]},getLinePaddingFromPosition:function(e,t){var n=this.findNewlineBounds(e,t);return this.getLinePadding(n.substring(e))},escapeForRegexp:function(e){var t=new RegExp("[.*+?|()\\[\\]{}\\\\]","g");return e.replace(t,"\\$&")},prettifyNumber:function(e,t){return e.toFixed("undefined"==typeof t?2:t).replace(/\.?0+$/,"")},replaceSubstring:function(e,t,n,r){return"object"==typeof n&&"end"in n&&(r=n.end,n=n.start),"string"==typeof r&&(r=n+r.length),"undefined"==typeof r&&(r=n),0>n||n>e.length?e:e.substring(0,n)+t+e.substring(r)},replaceWith:function(e,t,n,r){if(t.length){var i=0,o=[];t.forEach(function(t){var s=r?n:this.repeatString(n,t[1]-t[0]);o.push(e.substring(i,t[0]),s),i=t[1]},this),e=o.join("")+e.substring(i)}return e},narrowToNonSpace:function(e,n,r){for(var i=t.create(n,r),o=/[\s\n\r\u00a0]/;i.start<i.end&&o.test(e.charAt(i.start));)i.start++;for(;i.end>i.start;)if(i.end--,!o.test(e.charAt(i.end))){i.end++;break}return i},findNewlineBounds:function(e,n){for(var r,i=e.length,o=0,s=i-1,a=n-1;a>0;a--)if(r=e.charAt(a),"\n"==r||"\r"==r){o=a+1;break}for(var l=n;i>l;l++)if(r=e.charAt(l),"\n"==r||"\r"==r){s=l;break}return t.create(o,s-o)},deepMerge:function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length;for("object"!=typeof s&&"function"!=typeof s&&(s={});l>a;a++)if(null!==(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(r&&("object"==typeof r||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&"object"==typeof n?n:{},s[t]=this.deepMerge(o,r)):void 0!==r&&(s[t]=r));return s},parseJSON:function(e){if("object"==typeof e)return e;try{return JSON.parse(e)}catch(t){return{}}},unique:function(e,t){var n=[];return e.filter(function(e){var r=t?t(e):e;return n.indexOf(r)<0?(n.push(r),!0):void 0})},pick:function(e){var t={},n=this.toArray(arguments,1);return Object.keys(e).forEach(function(r){~n.indexOf(r)&&(t[r]=e[r])}),t},find:function(e,t,n){var r;return n&&(t=t.bind(n)),Array.isArray(e)?e.some(function(e,n){return t(e,n)?r=e:void 0}):Object.keys(e).some(function(n,i){return t(e[n],i)?r=e[n]:void 0}),r},toArray:function(e,t){return Array.isArray(e)&&!t?e:Array.prototype.slice.call(e,t||0)},extend:function(e){for(var t,n=1,r=arguments.length;r>n;n++)t=arguments[n],t&&Object.keys(t).forEach(function(n){e[n]=t[n]});return e},defaults:function(e){for(var t,n=1,r=arguments.length;r>n;n++)t=arguments[n],t&&Object.keys(t).forEach(function(n){n in e||(e[n]=t[n])});return e},flatten:function(e,t){t=t||[];var n=this;return n.toArray(e).forEach(function(e){Array.isArray(e)?n.flatten(e,t):t.push(e)}),t},clone:function(e){return Array.isArray(e)?e.slice(0):this.extend({},e)},without:function(e){return this.toArray(arguments,1).forEach(function(t){for(var n;~(n=e.indexOf(t));)e.splice(n,1)}),e},last:function(e){return e[e.length-1]}}})},{"../assets/range":29}],72:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){return'"'==e||"'"==e}function n(){return u=(u+1)%f,"s"+u}function r(e,t){this.id=n(),this.parent=null,this.nextSibling=null,this.previousSibling=null,this._source=t,this._name=null,this._content=null,this._data={},!e&&t&&(e=s(0,t)),this.range=e,this.children=[]}var i=e("./common"),o=e("./comments"),s=e("../assets/range"),a=e("../assets/stringStream"),l=(e("../parser/css"),e("../assets/htmlMatcher")),c=e("../editTree/xml"),u=1,f=1e6,p=/^(\s*).+?(\s*)$/,h=/\s/g;return r.prototype={addChild:function(e){e instanceof r||(e=new r(e));var t=i.last(this.children);return t&&(t.nextSibling=e,e.previousSibling=t),e.parent=this,this.children.push(e),e},root:function(){var e=this;do if(!e.parent)return e;while(e=e.parent);return e},source:function(){return this._source||this.root()._source},name:function(){if(null===this._name){var e=this.nameRange();e&&(this._name=e.substring(this.source()))}return this._name},nameRange:function(){return this.range&&"_selectorEnd"in this.range?s.create2(this.range.start,this.range._selectorEnd):void 0},matchDeep:function(e){if(!this.range.inside(e))return null;for(var t,n=0,r=this.children.length;r>n;n++)if(t=this.children[n].matchDeep(e))return t;return this.parent?this:null},allRanges:function(){var e=[];return this.parent&&e.push(this.range),this.children.forEach(function(t){e=e.concat(t.allRanges())}),e},data:function(e,t){return"undefined"!=typeof t&&(this._data[e]=t),this._data[e]},stringify:function(e){e=e||"";var t="";return this.children.forEach(function(n){t+=e+n.name().replace(/\n/g,"\\n")+"\n",t+=n.stringify(e+"--")}),t},content:function(){if(null!==this._content)return this._content;if(!(this.range&&"_contentStart"in this.range))return"";var e=s.create2(this.range._contentStart+1,this.range.end-1),t=this.source(),n=e.start,r="";return this.children.forEach(function(e){r+=t.substring(n,e.range.start),n=e.range.end}),r+=t.substring(n,e.end),this._content=i.trim(r)}},{findAllRules:function(e){e=this.sanitize(e);for(var n,r,o=a(e),l=[],c=this,u=function(t){var n=c.extractSelector(e,t.start),r=s.create2(n.start,t.end);r._selectorEnd=n.end,r._contentStart=t.start,l.push(r)};r=o.next();)if(t(r)){if(!o.skipString(r))break}else"{"==r&&(n=this.matchBracesRanges(e,o.pos-1),n.forEach(u),n.length)&&(o.pos=i.last(n).end);return l.sort(function(e,t){return e.start-t.start})},matchBracesRanges:function(e,t,n){n&&(e=this.sanitize(e));var r=a(e);r.start=r.pos=t;for(var i,o=[],l=[];i=r.next();)if("{"==i)o.push(r.pos-1);else if("}"==i){if(!o.length)throw"Invalid source structure (check for curly braces)";if(l.push(s.create2(o.pop(),r.pos)),!o.length)return l}else r.skipQuoted();return l},extractSelector:function(e,t,n){n&&(e=this.sanitize(e));for(var r,i=function(){var n=e.charAt(t);if('"'==n||"'"==n){for(;--t>=0&&(e.charAt(t)!=n||"\\"==e.charAt(t-1)););return!0}return!1},o=t;--t>=0;)if(!i())if(r=e.charAt(t),")"!=r){if("{"==r||"}"==r||";"==r){t++;break}}else for(;--t>=0&&(i()||"("!=e.charAt(t)););0>t&&(t=0);var a=e.substring(t,o),l=a.replace(h," ").match(p);return l&&(t+=l[1].length,o-=l[2].length),s.create2(t,o)},matchEnclosingRule:function(e,t){"string"==typeof e&&(e=this.findAllRules(e));var n=e.filter(function(e){return e.inside(t)});return i.last(n)},locateRule:function(e,t,n){var r=0,i=this.styleTagRange(e,t);i&&(r=i.start,t-=i.start,e=i.substring(e));var o=this.findAllRules(e),s=this.matchEnclosingRule(o,t);if(s)return s.shift(r);for(var a=0,l=o.length;l>a;a++)if(o[a].start>t)return o[n?a-1:a].shift(r)},sanitize:function(e){e=o.strip(e);for(var n,r,s=a(e),l=[];n=s.next();)if(t(n))s.skipString(n);else if(("#"===n||"@"===n)&&(r=s.peek(),"{"===r)){if(s.start=s.pos-1,!s.skipTo("}"))throw"Invalid string interpolation at "+s.start;s.pos+=1,l.push([s.start,s.pos])}return i.replaceWith(e,l,"a")},sectionTree:function(e){var t=new r(null,e),n=this.findAllRules(e),i=function(e,n){for(;n&&n.range;){if(n.range.contains(e))return n.addChild(e);n=n.parent}return t.addChild(e)},o=t;return n.forEach(function(e){o=i(e,o)}),t},nestedSectionsInRule:function(e){var t=e.valueRange(!0).start,n=this.findAllRules(e.valueRange().substring(e.source));return n.forEach(function(e){e.start+=t,e.end+=t,e._selectorEnd+=t,e._contentStart+=t}),n},styleTagRange:function(e,t){var n=l.tag(e,t);return n&&"style"==n.open.name.toLowerCase()&&n.innerRange.cmp(t,"lte","gte")&&n.innerRange},styleAttrRange:function(e,t){var n=c.parseFromPosition(e,t,!0);if(n){var r=n.itemFromPosition(t,!0);return r&&"style"==r.name().toLowerCase()&&r.valueRange(!0).cmp(t,"lte","gte")&&r.valueRange(!0)}},CSSSection:r}})},{"../assets/htmlMatcher":25,"../assets/range":29,"../assets/stringStream":31,"../editTree/xml":36,"../parser/css":54,"./comments":70,"./common":71}],73:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){var t=e("./common"),n=e("../assets/resources");return{isInsideTag:function(e,t){for(var n=/^<\/?\w[\w\:\-]*.*?>/,r=t;r>-1&&"<"!=e.charAt(r);)r--;if(-1!=r){var i=n.exec(e.substring(r));if(i&&t>r&&t<r+i[0].length)return!0}return!1},outputInfo:function(e,t,n){return n=n||e.getProfileName(),{syntax:String(t||e.getSyntax()),profile:n||null,content:String(e.getContent())}},unindent:function(e,n){return t.unindentString(n,this.getCurrentLinePadding(e))},getCurrentLinePadding:function(e){return t.getLinePadding(e.getCurrentLine())},normalize:function(e,r){r=t.extend({newline:n.getNewline(),indentation:n.getVariable("indentation")},r);var i=function(e){return t.repeatString(r.indentation,e.length)},o=t.splitByLines(e);return" "!==r.indentation&&(o=o.map(function(e){return e.replace(/^\s+/,function(e){return e.replace(/\t/g,i)})})),o.join(r.newline)}}})},{"../assets/resources":30,"./common":71}],74:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){function e(e){function t(){}return t.prototype=e,new t}function t(e,t,n,r){this.type_=e,this.index_=t||0,this.prio_=n||0,this.number_=void 0!==r&&null!==r?r:0,this.toString=function(){switch(this.type_){case g:return this.number_;case v:case b:case y:return this.index_;case x:return"CALL";default:return"Invalid Token"}}}function n(e,t,n,r){this.tokens=e,this.ops1=t,this.ops2=n,this.functions=r}function r(e){return"string"==typeof e?(w.lastIndex=0,w.test(e)?"'"+e.replace(w,function(e){var t=S[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+"'":"'"+e+"'"):e}function i(e,t){return Number(e)+Number(t)}function o(e,t){return e-t}function s(e,t){return e*t}function a(e,t){return e/t}function l(e,t){return e%t}function c(e,t){return""+e+t}function u(e){return-e}function f(e){return Math.random()*(e||1)}function p(e){e=Math.floor(e);for(var t=e;e>1;)t*=--e;return t}function h(e,t){return Math.sqrt(e*e+t*t)}function d(e,t){return"[object Array]"!=Object.prototype.toString.call(e)?[e,t]:(e=e.slice(),e.push(t),e)}function m(){this.success=!1,this.errormsg="",this.expression="",this.pos=0,this.tokennumber=0,this.tokenprio=0,this.tokenindex=0,this.tmpprio=0,this.ops1={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sqrt:Math.sqrt,log:Math.log,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,"-":u,exp:Math.exp},this.ops2={"+":i,"-":o,"*":s,"/":a,"%":l,"^":Math.pow,",":d,"||":c},this.functions={random:f,fac:p,min:Math.min,max:Math.max,pyt:h,pow:Math.pow,atan2:Math.atan2},this.consts={E:Math.E,PI:Math.PI}}var g=0,v=1,b=2,y=3,x=4,w=/[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,S={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"};n.prototype={simplify:function(r){r=r||{};var i,o,s,a,l=[],c=[],u=this.tokens.length,f=0;for(f=0;u>f;f++){a=this.tokens[f];var p=a.type_;if(p===g)l.push(a);else if(p===y&&a.index_ in r)a=new t(g,0,0,r[a.index_]),l.push(a);else if(p===b&&l.length>1)o=l.pop(),i=l.pop(),s=this.ops2[a.index_],a=new t(g,0,0,s(i.number_,o.number_)),l.push(a);else if(p===v&&l.length>0)i=l.pop(),s=this.ops1[a.index_],a=new t(g,0,0,s(i.number_)),l.push(a);else{for(;l.length>0;)c.push(l.shift());c.push(a)}}for(;l.length>0;)c.push(l.shift());return new n(c,e(this.ops1),e(this.ops2),e(this.functions))},substitute:function(r,i){i instanceof n||(i=(new m).parse(String(i)));var o,s=[],a=this.tokens.length,l=0;for(l=0;a>l;l++){o=this.tokens[l];var c=o.type_;if(c===y&&o.index_===r)for(var u=0;u<i.tokens.length;u++){var f=i.tokens[u],p=new t(f.type_,f.index_,f.prio_,f.number_);s.push(p)}else s.push(o)}var h=new n(s,e(this.ops1),e(this.ops2),e(this.functions));return h},evaluate:function(e){e=e||{};var t,n,r,i,o=[],s=this.tokens.length,a=0;for(a=0;s>a;a++){i=this.tokens[a];var l=i.type_;if(l===g)o.push(i.number_);else if(l===b)n=o.pop(),t=o.pop(),r=this.ops2[i.index_],o.push(r(t,n));else if(l===y)if(i.index_ in e)o.push(e[i.index_]);else{if(!(i.index_ in this.functions))throw new Error("undefined variable: "+i.index_);o.push(this.functions[i.index_])}else if(l===v)t=o.pop(),r=this.ops1[i.index_],o.push(r(t));else{if(l!==x)throw new Error("invalid Expression");if(t=o.pop(),r=o.pop(),!r.apply||!r.call)throw new Error(r+" is not a function");o.push("[object Array]"==Object.prototype.toString.call(t)?r.apply(void 0,t):r.call(void 0,t))}}if(o.length>1)throw new Error("invalid Expression (parity)");return o[0]},toString:function(e){var t,n,i,o,s=[],a=this.tokens.length,l=0;for(l=0;a>l;l++){o=this.tokens[l];var c=o.type_;if(c===g)s.push(r(o.number_));else if(c===b)n=s.pop(),t=s.pop(),i=o.index_,s.push(e&&"^"==i?"Math.pow("+t+","+n+")":"("+t+i+n+")");else if(c===y)s.push(o.index_);else if(c===v)t=s.pop(),i=o.index_,s.push("-"===i?"("+i+t+")":i+"("+t+")");else{if(c!==x)throw new Error("invalid Expression");t=s.pop(),i=s.pop(),s.push(i+"("+t+")")}}if(s.length>1)throw new Error("invalid Expression (parity)");return s[0]},variables:function(){for(var e=this.tokens.length,t=[],n=0;e>n;n++){var r=this.tokens[n];r.type_===y&&-1==t.indexOf(r.index_)&&t.push(r.index_)}return t},toJSFunction:function(e,t){var n=new Function(e,"with(Parser.values) { return "+this.simplify(t).toString(!0)+"; }");return n}},m.parse=function(e){return(new m).parse(e)},m.evaluate=function(e,t){return m.parse(e).evaluate(t)},m.Expression=n,m.values={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sqrt:Math.sqrt,log:Math.log,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,random:f,fac:p,exp:Math.exp,min:Math.min,max:Math.max,pyt:h,pow:Math.pow,atan2:Math.atan2,E:Math.E,PI:Math.PI};var C=1,k=2,_=4,E=8,A=16,L=32,I=64,P=128,T=256;return m.prototype={parse:function(r){this.errormsg="",this.success=!0;var i=[],o=[];this.tmpprio=0;var s=C|E|_|I,a=0;for(this.expression=r,this.pos=0;this.pos<this.expression.length;)if(this.isOperator())this.isSign()&&s&I?(this.isNegativeSign()&&(this.tokenprio=2,this.tokenindex="-",a++,this.addfunc(o,i,v)),s=C|E|_|I):this.isComment()||(0===(s&k)&&this.error_parsing(this.pos,"unexpected operator"),a+=2,this.addfunc(o,i,b),s=C|E|_|I);else if(this.isNumber()){0===(s&C)&&this.error_parsing(this.pos,"unexpected number");var l=new t(g,0,0,this.tokennumber);o.push(l),s=k|A|L}else if(this.isString()){0===(s&C)&&this.error_parsing(this.pos,"unexpected string");var l=new t(g,0,0,this.tokennumber);o.push(l),s=k|A|L}else if(this.isLeftParenth())0===(s&E)&&this.error_parsing(this.pos,'unexpected "("'),s&P&&(a+=2,this.tokenprio=-2,this.tokenindex=-1,this.addfunc(o,i,x)),s=C|E|_|I|T;else if(this.isRightParenth()){if(s&T){var l=new t(g,0,0,[]);o.push(l)}else 0===(s&A)&&this.error_parsing(this.pos,'unexpected ")"');s=k|A|L|E|P}else if(this.isComma())0===(s&L)&&this.error_parsing(this.pos,'unexpected ","'),this.addfunc(o,i,b),a+=2,s=C|E|_|I;else if(this.isConst()){0===(s&C)&&this.error_parsing(this.pos,"unexpected constant");var c=new t(g,0,0,this.tokennumber);o.push(c),s=k|A|L}else if(this.isOp2())0===(s&_)&&this.error_parsing(this.pos,"unexpected function"),this.addfunc(o,i,b),a+=2,s=E;else if(this.isOp1())0===(s&_)&&this.error_parsing(this.pos,"unexpected function"),this.addfunc(o,i,v),a++,s=E;else if(this.isVar()){0===(s&C)&&this.error_parsing(this.pos,"unexpected variable");var u=new t(y,this.tokenindex,0,0);o.push(u),s=k|A|L|E|P}else this.isWhite()||(""===this.errormsg?this.error_parsing(this.pos,"unknown character"):this.error_parsing(this.pos,this.errormsg));for((this.tmpprio<0||this.tmpprio>=10)&&this.error_parsing(this.pos,'unmatched "()"');i.length>0;){var f=i.pop();o.push(f)}return a+1!==o.length&&this.error_parsing(this.pos,"parity"),new n(o,e(this.ops1),e(this.ops2),e(this.functions))},evaluate:function(e,t){return this.parse(e).evaluate(t)},error_parsing:function(e,t){throw this.success=!1,this.errormsg="parse error [column "+e+"]: "+t,new Error(this.errormsg)},addfunc:function(e,n,r){for(var i=new t(r,this.tokenindex,this.tokenprio+this.tmpprio,0);n.length>0&&i.prio_<=n[n.length-1].prio_;)e.push(n.pop());n.push(i)},isNumber:function(){for(var e=!1,t="";this.pos<this.expression.length;){var n=this.expression.charCodeAt(this.pos);if(!(n>=48&&57>=n||46===n))break;t+=this.expression.charAt(this.pos),this.pos++,this.tokennumber=parseFloat(t),e=!0}return e},unescape:function(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e.charAt(i);if(r){switch(o){case"'":n.push("'");break;case"\\":n.push("\\");break;case"/":n.push("/");break;case"b":n.push("\b");break;case"f":n.push("\f");break;case"n":n.push("\n");break;case"r":n.push("\r");break;case"t":n.push(" ");break;case"u":var s=parseInt(e.substring(i+1,i+5),16);n.push(String.fromCharCode(s)),i+=4;break;default:throw this.error_parsing(t+i,"Illegal escape sequence: '\\"+o+"'")}r=!1}else"\\"==o?r=!0:n.push(o)}return n.join("")},isString:function(){var e=!1,t="",n=this.pos;if(this.pos<this.expression.length&&"'"==this.expression.charAt(this.pos))for(this.pos++;this.pos<this.expression.length;){var r=this.expression.charAt(this.pos);if("'"==r&&"\\"!=t.slice(-1)){this.pos++,this.tokennumber=this.unescape(t,n),e=!0;break}t+=this.expression.charAt(this.pos),this.pos++}return e},isConst:function(){var e;for(var t in this.consts){var n=t.length;if(e=this.expression.substr(this.pos,n),t===e)return this.tokennumber=this.consts[t],this.pos+=n,!0}return!1},isOperator:function(){var e=this.expression.charCodeAt(this.pos);if(43===e)this.tokenprio=0,this.tokenindex="+";else if(45===e)this.tokenprio=0,this.tokenindex="-";else if(124===e){if(124!==this.expression.charCodeAt(this.pos+1))return!1;this.pos++,this.tokenprio=0,this.tokenindex="||"}else if(42===e)this.tokenprio=1,this.tokenindex="*";else if(47===e)this.tokenprio=2,this.tokenindex="/";else if(37===e)this.tokenprio=2,this.tokenindex="%";else{if(94!==e)return!1;this.tokenprio=3,this.tokenindex="^"}return this.pos++,!0},isSign:function(){var e=this.expression.charCodeAt(this.pos-1);return 45===e||43===e?!0:!1},isPositiveSign:function(){var e=this.expression.charCodeAt(this.pos-1);return 43===e?!0:!1},isNegativeSign:function(){var e=this.expression.charCodeAt(this.pos-1);return 45===e?!0:!1},isLeftParenth:function(){var e=this.expression.charCodeAt(this.pos);return 40===e?(this.pos++,this.tmpprio+=10,!0):!1},isRightParenth:function(){var e=this.expression.charCodeAt(this.pos);return 41===e?(this.pos++,this.tmpprio-=10,!0):!1},isComma:function(){var e=this.expression.charCodeAt(this.pos);return 44===e?(this.pos++,this.tokenprio=-1,this.tokenindex=",",!0):!1},isWhite:function(){var e=this.expression.charCodeAt(this.pos);return 32===e||9===e||10===e||13===e?(this.pos++,!0):!1},isOp1:function(){for(var e="",t=this.pos;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||"_"!=n&&("0">n||n>"9")))break;e+=n}return e.length>0&&e in this.ops1?(this.tokenindex=e,this.tokenprio=5,this.pos+=e.length,!0):!1},isOp2:function(){for(var e="",t=this.pos;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||"_"!=n&&("0">n||n>"9")))break;e+=n}return e.length>0&&e in this.ops2?(this.tokenindex=e,this.tokenprio=5,this.pos+=e.length,!0):!1},isVar:function(){for(var e="",t=this.pos;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||"_"!=n&&("0">n||n>"9")))break;e+=n}return e.length>0?(this.tokenindex=e,this.tokenprio=4,this.pos+=e.length,!0):!1},isComment:function(){var e=this.expression.charCodeAt(this.pos-1);return 47===e&&42===this.expression.charCodeAt(this.pos)?(this.pos=this.expression.indexOf("*/",this.pos)+2,1===this.pos&&(this.pos=this.expression.length),!0):!1}},m})},{}],75:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e){for(var t=[],n=o(e);!n.eol();)","==n.peek()&&(t.push(s.trim(n.current())),n.next(),n.start=n.pos),n.next();return t.push(s.trim(n.current())),t.filter(function(e){return!!e})}function n(e){for(var n,r=null,i=o(e);!i.eol();){if("("==i.peek()){r=i.current(),i.start=i.pos,i.skipToPair("(",")",!0),n=i.current(),n=t(n.substring(1,n.length-1));break}i.next()}return r&&{name:r,args:n}}function r(e,t){if(/^['"]/.test(e))return e.replace(/^(['"])(.+?)\1$/,"$2");if(!isNaN(+e))return+e;if(e){for(var n=e.split("."),r=t;n.length;)r=r[n.shift()];return r}}function i(e,t){return e.replace(/<%[=\-](.+?)%>/g,function(e,i){i=s.trim(i);var o=n(i);if(o){var a=o.args.map(function(e){return r(e,t)});return t[o.name].apply(t,a)}return r(i,t)})}var o=e("../assets/stringStream"),s=e("./common");return function(e,t){return t?i(e,t):function(t){return i(e,t)}}})},{"../assets/stringStream":31,"./common":71}],76:[function(e,t,n){if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(e){function t(e,t,i){var o;return o=t&&t.hasOwnProperty("constructor")?t.constructor:function(){e.apply(this,arguments)},n.extend(o,e),r.prototype=e.prototype,o.prototype=new r,t&&n.extend(o.prototype,t),i&&n.extend(o,i),o.prototype.constructor=o,o.__super__=e.prototype,o}var n=e("../utils/common"),r=function(){};return{extend:function(e,n){var r=t(this,e,n);return r.extend=this.extend,e.hasOwnProperty("toString")&&(r.prototype.toString=e.toString),r}}})},{"../utils/common":71}],77:[function(e,t,n){/*! | ||
+ | * string_score.js: String Scoring Algorithm 0.1.10 | ||
+ | * | ||
+ | * http://joshaven.com/string_score | ||
+ | * https://github.com/joshaven/string_score | ||
+ | * | ||
+ | * Copyright (C) 2009-2011 Joshaven Potter <yourtech@gmail.com> | ||
+ | * Special thanks to all of the contributors listed here https://github.com/joshaven/string_score | ||
+ | * MIT license: http://www.opensource.org/licenses/mit-license.php | ||
+ | * | ||
+ | * Date: Tue Mar 1 2011 | ||
+ | */ | ||
+ | if("object"==typeof t&&"function"!=typeof r)var r=function(r){t.exports=r(e,n,t)};r(function(){return{score:function(e,t,n){if(e==t)return 1;if(""==t)return 0;for(var r,i,o,s,a,l,c,u,f,p=0,h=t.length,d=e.length,m=1,g=0;h>g;++g){if(l=t.charAt(g),c=e.indexOf(l.toLowerCase()),u=e.indexOf(l.toUpperCase()),f=Math.min(c,u),a=f>-1?f:Math.max(c,u),-1===a){if(n){m+=1-n;continue}return 0}s=.1,e[a]===l&&(s+=.1),0===a?(s+=.6,0===g&&(r=1)):" "===e.charAt(a-1)&&(s+=.8),e=e.substring(a+1,d),p+=s}return i=p/h,o=(i*(h/d)+i)/2,o/=m,r&&1>o+.15&&(o+=.15),o}}})},{}],78:[function(e,t){"use strict";function n(e){var t=void 0===arguments[1]?f:arguments[1];return t=a(t),e.__emmetKeymap=t,e.addKeyMap(t),e}function r(){if(CodeMirror.version>="3.1")return CodeMirror.Pass;throw CodeMirror.Pass}function i(e){return function(t){var n;return t.operation(function(){return n=s(e,new c(t))}),n}}function o(e){return function(t){var n=new c(t),r=n.selectionList(),i=null;return t.operation(function(){for(var t=0,o=r.length;o>t&&(n.selectionIndex=t,i=s(e,n),i!==CodeMirror.Pass);t++);}),i}}function s(e,t){if("expand_abbreviation_with_tab"==e&&(t.context.somethingSelected()||!t.isValidSyntax()))return r();var n=!1;try{if(n=u.run(e,t),!n&&"insert_formatted_line_break_only"==e)return r()}catch(i){console.error(i)}return n}function a(e){var t=/Mac/.test(navigator.platform),n={};return Object.keys(e).forEach(function(r){return n[t?r:r.replace("Cmd","Ctrl")]=e[r]}),n}var l=function(e){return e&&e.__esModule?e["default"]:e};t.exports=n;var c=l(e("./editor")),u=l(e("./emmet")),f={"Cmd-E":"emmet.expand_abbreviation",Tab:"emmet.expand_abbreviation_with_tab","Cmd-D":"emmet.balance_outward","Cmd-M":"emmet.matching_pair","Shift-Cmd-A":"emmet.wrap_with_abbreviation","Ctrl-Alt-Right":"emmet.next_edit_point","Ctrl-Alt-Left":"emmet.prev_edit_point","Cmd-L":"emmet.select_line","Cmd-Shift-M":"emmet.merge_lines","Cmd-/":"emmet.toggle_comment","Cmd-J":"emmet.split_join_tag","Cmd-K":"emmet.remove_tag","Shift-Cmd-Y":"emmet.evaluate_math_expression","Ctrl-Up":"emmet.increment_number_by_1","Ctrl-Down":"emmet.decrement_number_by_1","Ctrl-Alt-Up":"emmet.increment_number_by_01","Ctrl-Alt-Down":"emmet.decrement_number_by_01","Shift-Ctrl-Up":"emmet.increment_number_by_10","Shift-Ctrl-Down":"emmet.decrement_number_by_10","Shift-Cmd-.":"emmet.select_next_item","Shift-Cmd-,":"emmet.select_previous_item","Cmd-B":"emmet.reflect_css_value",Enter:"emmet.insert_formatted_line_break_only"},p=["prev_edit_point","next_edit_point","merge_lines","reflect_css_value","select_next_item","select_previous_item","wrap_with_abbreviation","update_tag","insert_formatted_line_break_only"];n.dispose=function(e){e.__emmetKeymap&&(e.removeKeyMap(e.__emmetKeymap),delete e.__emmetKeymap)},n.defaultKeymap=f,n.systemKeymap=a,n.emmet=u,n.EmmetEditor=c,n.setup=function(e){u.actions.getList().forEach(function(t){var n=t.name,r="emmet."+n;e.commands[r]||(e.commands[r]=~p.indexOf(n)?i(n):o(n))}),e.defineOption?e.defineOption("profile","html"):e.defaults.profile="html"},"undefined"!=typeof CodeMirror&&n.setup(CodeMirror)},{"./editor":1,"./emmet":2}]},{},[78])(78)}),/*! | ||
+ | * async | ||
+ | * https://github.com/caolan/async | ||
+ | * | ||
+ | * Copyright 2010-2014 Caolan McMahon | ||
+ | * Released under the MIT license | ||
+ | */ | ||
+ | function(){function e(e){var n=!1;return function(){if(n)throw new Error("Callback was already called.");n=!0,e.apply(t,arguments)}}var t,n,r={};t=this,null!=t&&(n=t.async),r.noConflict=function(){return t.async=n,r};var i=Object.prototype.toString,o=Array.isArray||function(e){return"[object Array]"===i.call(e)},s=function(e,t){for(var n=0;n<e.length;n+=1)t(e[n],n,e)},a=function(e,t){if(e.map)return e.map(t);var n=[];return s(e,function(e,r,i){n.push(t(e,r,i))}),n},l=function(e,t,n){return e.reduce?e.reduce(t,n):(s(e,function(e,r,i){n=t(n,e,r,i)}),n)},c=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};"undefined"!=typeof process&&process.nextTick?(r.nextTick=process.nextTick,r.setImmediate="undefined"!=typeof setImmediate?function(e){setImmediate(e)}:r.nextTick):"function"==typeof setImmediate?(r.nextTick=function(e){setImmediate(e)},r.setImmediate=r.nextTick):(r.nextTick=function(e){setTimeout(e,0)},r.setImmediate=r.nextTick),r.each=function(t,n,r){function i(e){e?(r(e),r=function(){}):(o+=1,o>=t.length&&r())}if(r=r||function(){},!t.length)return r();var o=0;s(t,function(t){n(t,e(i))})},r.forEach=r.each,r.eachSeries=function(e,t,n){if(n=n||function(){},!e.length)return n();var r=0,i=function(){t(e[r],function(t){t?(n(t),n=function(){}):(r+=1,r>=e.length?n():i())})};i()},r.forEachSeries=r.eachSeries,r.eachLimit=function(e,t,n,r){var i=u(t);i.apply(null,[e,n,r])},r.forEachLimit=r.eachLimit;var u=function(e){return function(t,n,r){if(r=r||function(){},!t.length||0>=e)return r();var i=0,o=0,s=0;!function a(){if(i>=t.length)return r();for(;e>s&&o<t.length;)o+=1,s+=1,n(t[o-1],function(e){e?(r(e),r=function(){}):(i+=1,s-=1,i>=t.length?r():a())})}()}},f=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r.each].concat(t))}},p=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[u(e)].concat(n))}},h=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r.eachSeries].concat(t))}},d=function(e,t,n,r){if(t=a(t,function(e,t){return{index:t,value:e}}),r){var i=[];e(t,function(e,t){n(e.value,function(n,r){i[e.index]=r,t(n)})},function(e){r(e,i)})}else e(t,function(e,t){n(e.value,function(e){t(e)})})};r.map=f(d),r.mapSeries=h(d),r.mapLimit=function(e,t,n,r){return m(t)(e,n,r)};var m=function(e){return p(e,d)};r.reduce=function(e,t,n,i){r.eachSeries(e,function(e,r){n(t,e,function(e,n){t=n,r(e)})},function(e){i(e,t)})},r.inject=r.reduce,r.foldl=r.reduce,r.reduceRight=function(e,t,n,i){var o=a(e,function(e){return e}).reverse();r.reduce(o,t,n,i)},r.foldr=r.reduceRight;var g=function(e,t,n,r){var i=[];t=a(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n&&i.push(e),t()})},function(){r(a(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};r.filter=f(g),r.filterSeries=h(g),r.select=r.filter,r.selectSeries=r.filterSeries;var v=function(e,t,n,r){var i=[];t=a(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n||i.push(e),t()})},function(){r(a(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};r.reject=f(v),r.rejectSeries=h(v);var b=function(e,t,n,r){e(t,function(e,t){n(e,function(n){n?(r(e),r=function(){}):t()})},function(){r()})};r.detect=f(b),r.detectSeries=h(b),r.some=function(e,t,n){r.each(e,function(e,r){t(e,function(e){e&&(n(!0),n=function(){}),r()})},function(){n(!1)})},r.any=r.some,r.every=function(e,t,n){r.each(e,function(e,r){t(e,function(e){e||(n(!1),n=function(){}),r()})},function(){n(!0)})},r.all=r.every,r.sortBy=function(e,t,n){r.map(e,function(e,n){t(e,function(t,r){t?n(t):n(null,{value:e,criteria:r})})},function(e,t){if(e)return n(e);var r=function(e,t){var n=e.criteria,r=t.criteria;return r>n?-1:n>r?1:0};n(null,a(t.sort(r),function(e){return e.value}))})},r.auto=function(e,t){t=t||function(){};var n=c(e),i=n.length;if(!i)return t();var a={},u=[],f=function(e){u.unshift(e)},p=function(e){for(var t=0;t<u.length;t+=1)if(u[t]===e)return void u.splice(t,1)},h=function(){i--,s(u.slice(0),function(e){e()})};f(function(){if(!i){var e=t;t=function(){},e(null,a)}}),s(n,function(n){var i=o(e[n])?e[n]:[e[n]],u=function(e){var i=Array.prototype.slice.call(arguments,1);if(i.length<=1&&(i=i[0]),e){var o={};s(c(a),function(e){o[e]=a[e]}),o[n]=i,t(e,o),t=function(){}}else a[n]=i,r.setImmediate(h)},d=i.slice(0,Math.abs(i.length-1))||[],m=function(){return l(d,function(e,t){return e&&a.hasOwnProperty(t)},!0)&&!a.hasOwnProperty(n)};if(m())i[i.length-1](u,a);else{var g=function(){m()&&(p(g),i[i.length-1](u,a))};f(g)}})},r.retry=function(e,t,n){var i=5,o=[];"function"==typeof e&&(n=t,t=e,e=i),e=parseInt(e,10)||i;var s=function(i,s){for(var a=function(e,t){return function(n){e(function(e,r){n(!e||t,{err:e,result:r})},s)}};e;)o.push(a(t,!(e-=1)));r.series(o,function(e,t){t=t[t.length-1],(i||n)(t.err,t.result)})};return n?s():s},r.waterfall=function(e,t){if(t=t||function(){},!o(e)){var n=new Error("First argument to waterfall must be an array of functions");return t(n)}if(!e.length)return t();var i=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var o=Array.prototype.slice.call(arguments,1),s=e.next();o.push(s?i(s):t),r.setImmediate(function(){e.apply(null,o)})}}};i(r.iterator(e))()};var y=function(e,t,n){if(n=n||function(){},o(t))e.map(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var r={};e.each(c(t),function(e,n){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[e]=i,n(t)})},function(e){n(e,r)})}};r.parallel=function(e,t){y({map:r.map,each:r.each},e,t)},r.parallelLimit=function(e,t,n){y({map:m(t),each:u(t)},e,n)},r.series=function(e,t){if(t=t||function(){},o(e))r.mapSeries(e,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},t);else{var n={};r.eachSeries(c(e),function(t,r){e[t](function(e){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),n[t]=i,r(e)})},function(e){t(e,n)})}},r.iterator=function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)},r.apply=function(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t.concat(Array.prototype.slice.call(arguments)))}};var x=function(e,t,n,r){var i=[];e(t,function(e,t){n(e,function(e,n){i=i.concat(n||[]),t(e)})},function(e){r(e,i)})};r.concat=f(x),r.concatSeries=h(x),r.whilst=function(e,t,n){e()?t(function(i){return i?n(i):void r.whilst(e,t,n)}):n()},r.doWhilst=function(e,t,n){e(function(i){if(i)return n(i);var o=Array.prototype.slice.call(arguments,1);t.apply(null,o)?r.doWhilst(e,t,n):n()})},r.until=function(e,t,n){e()?n():t(function(i){return i?n(i):void r.until(e,t,n)})},r.doUntil=function(e,t,n){e(function(i){if(i)return n(i);var o=Array.prototype.slice.call(arguments,1);t.apply(null,o)?n():r.doUntil(e,t,n)})},r.queue=function(t,n){function i(e,t,n,i){return e.started||(e.started=!0),o(t)||(t=[t]),0==t.length?r.setImmediate(function(){e.drain&&e.drain()}):void s(t,function(t){var o={data:t,callback:"function"==typeof i?i:null};n?e.tasks.unshift(o):e.tasks.push(o),e.saturated&&e.tasks.length===e.concurrency&&e.saturated(),r.setImmediate(e.process)})}void 0===n&&(n=1);var a=0,l={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,started:!1,paused:!1,push:function(e,t){i(l,e,!1,t)},kill:function(){l.drain=null,l.tasks=[]},unshift:function(e,t){i(l,e,!0,t)},process:function(){if(!l.paused&&a<l.concurrency&&l.tasks.length){var n=l.tasks.shift();l.empty&&0===l.tasks.length&&l.empty(),a+=1;var r=function(){a-=1,n.callback&&n.callback.apply(n,arguments),l.drain&&l.tasks.length+a===0&&l.drain(),l.process()},i=e(r);t(n.data,i)}},length:function(){return l.tasks.length},running:function(){return a},idle:function(){return l.tasks.length+a===0},pause:function(){l.paused!==!0&&(l.paused=!0)},resume:function(){if(l.paused!==!1){l.paused=!1;for(var e=1;e<=l.concurrency;e++)r.setImmediate(l.process)}}};return l},r.priorityQueue=function(e,t){function n(e,t){return e.priority-t.priority}function i(e,t,n){for(var r=-1,i=e.length-1;i>r;){var o=r+(i-r+1>>>1);n(t,e[o])>=0?r=o:i=o-1}return r}function a(e,t,a,l){return e.started||(e.started=!0),o(t)||(t=[t]),0==t.length?r.setImmediate(function(){e.drain&&e.drain()}):void s(t,function(t){var o={data:t,priority:a,callback:"function"==typeof l?l:null};e.tasks.splice(i(e.tasks,o,n)+1,0,o),e.saturated&&e.tasks.length===e.concurrency&&e.saturated(),r.setImmediate(e.process)})}var l=r.queue(e,t);return l.push=function(e,t,n){a(l,e,t,n)},delete l.unshift,l},r.cargo=function(e,t){var n=!1,i=[],l={tasks:i,payload:t,saturated:null,empty:null,drain:null,drained:!0,push:function(e,n){o(e)||(e=[e]),s(e,function(e){i.push({data:e,callback:"function"==typeof n?n:null}),l.drained=!1,l.saturated&&i.length===t&&l.saturated()}),r.setImmediate(l.process)},process:function c(){if(!n){if(0===i.length)return l.drain&&!l.drained&&l.drain(),void(l.drained=!0);var r="number"==typeof t?i.splice(0,t):i.splice(0,i.length),o=a(r,function(e){return e.data});l.empty&&l.empty(),n=!0,e(o,function(){n=!1;var e=arguments;s(r,function(t){t.callback&&t.callback.apply(null,e)}),c()})}},length:function(){return i.length},running:function(){return n}};return l};var w=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[e]&&s(n,function(t){console[e](t)}))}]))}};r.log=w("log"),r.dir=w("dir"),r.memoize=function(e,t){var n={},i={};t=t||function(e){return e};var o=function(){var o=Array.prototype.slice.call(arguments),s=o.pop(),a=t.apply(null,o);a in n?r.nextTick(function(){s.apply(null,n[a])}):a in i?i[a].push(s):(i[a]=[s],e.apply(null,o.concat([function(){n[a]=arguments;var e=i[a];delete i[a];for(var t=0,r=e.length;r>t;t++)e[t].apply(null,arguments)}])))};return o.memo=n,o.unmemoized=e,o},r.unmemoize=function(e){return function(){return(e.unmemoized||e).apply(null,arguments)}},r.times=function(e,t,n){for(var i=[],o=0;e>o;o++)i.push(o);return r.map(i,t,n)},r.timesSeries=function(e,t,n){for(var i=[],o=0;e>o;o++)i.push(o);return r.mapSeries(i,t,n)},r.seq=function(){var e=arguments;return function(){var t=this,n=Array.prototype.slice.call(arguments),i=n.pop();r.reduce(e,n,function(e,n,r){n.apply(t,e.concat([function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);r(e,t)}]))},function(e,n){i.apply(t,[e].concat(n))})}},r.compose=function(){return r.seq.apply(null,Array.prototype.reverse.call(arguments))};var S=function(e,t){var n=function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();return e(t,function(e,t){e.apply(n,r.concat([t]))},i)};if(arguments.length>2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};r.applyEach=f(S),r.applyEachSeries=h(S),r.forever=function(e,t){function n(r){if(r){if(t)return t(r);throw r}e(n)}n()},"undefined"!=typeof module&&module.exports?module.exports=r:"undefined"!=typeof define&&define.amd?define([],function(){return r}):t.async=r}(),window.Keytrap=function(){"use strict";function e(e){var t=e.keyCode||e.which,n=[t];return e.shiftKey&&16!==e.keyCode&&n.push(16),e.ctrlKey&&17!==e.keyCode&&n.push(17),e.altKey&&18!==e.keyCode&&n.push(18),e.metaKey&&91!==e.keyCode&&n.push(91),n.sort(),n.join("+")}function t(e){return l[e]?l[e]:e.toUpperCase().charCodeAt(0)}function n(e){for(var n=e.split("+"),r=[],i=0;i<n.length;i++)r.push(t(n[i]));return r.sort(),r.join("+")}function r(e){for(var t=[],r=e.split(","),i=0;i<r.length;i++)t.push(n(r[i]));return t}function i(e,t){if(s[t]){for(var n=s[t],r=0;r<n.length;r++)n[r](e);if(a[t]&&e)return jQuery.Event(e).stopPropagation(),!1}}function o(t){return i(t,e(t))}var s={},a={},l={backspace:8,tab:9,enter:13,"return":13,shift:16,ctrl:17,comctrl:17,alt:18,option:18,capslock:20,esc:27,escape:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:46,meta:91,command:91,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,'"':222};return-1!==navigator.appVersion.indexOf("Mac")&&(l.comctrl=91),jQuery(document).on("keydown",o),{bind:function(e,t,n){for(var i=r(e),o=i.length-1;o>=0;o--)jQuery.isArray(s[i[o]])||(s[i[o]]=[]),s[i[o]].push(t),a[i[o]]=n?!0:!1},getKeyCode:function(e){return t(e)},getKeyEventID:function(t){return"string"==typeof t?n(t):e(t)},keyEventMatchesKeyCombo:function(t,r){return e(t)===n(r)},trigger:function(e,t){i(e,t)}}}(),/*! | ||
+ | * typeahead.js 0.10.5 | ||
+ | * https://github.com/twitter/typeahead.js | ||
+ | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT | ||
+ | */ | ||
+ | function(e){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return"undefined"==typeof e},toStr:function(e){return t.isUndefined(e)||null===e?"":e+""},bind:e.proxy,each:function(t,n){function r(e,t){return n(t,e)}e.each(t,r)},map:e.map,filter:e.grep,every:function(t,n){var r=!0;return t?(e.each(t,function(e,i){return(r=n.call(null,i,e,t))?void 0:!1}),!!r):r},some:function(t,n){var r=!1;return t?(e.each(t,function(e,i){return(r=n.call(null,i,e,t))?!1:void 0}),!!r):r},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(t){function n(){return String(t)}return e.isFunction(t)?t:n},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var r,i;return function(){var o,s,a=this,l=arguments;return o=function(){r=null,n||(i=e.apply(a,l))},s=n&&!r,clearTimeout(r),r=setTimeout(o,t),s&&(i=e.apply(a,l)),i}},throttle:function(e,t){var n,r,i,o,s,a;return s=0,a=function(){s=new Date,i=null,o=e.apply(n,r)},function(){var l=new Date,c=t-(l-s);return n=this,r=arguments,0>=c?(clearTimeout(i),i=null,s=l,o=e.apply(n,r)):i||(i=setTimeout(a,c)),o}},noop:function(){}}}(),n=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),r=function(){"use strict";var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(e.input,{marginTop:"-1px"}),e}(),i=function(){"use strict";function n(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var r="typeahead:";return t.mixin(n.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(r+e,t)}}),n}(),o=function(){"use strict";function e(e,t,n,r){var i;if(!n)return this;for(t=t.split(l),n=r?a(n,r):n,this._callbacks=this._callbacks||{};i=t.shift();)this._callbacks[i]=this._callbacks[i]||{sync:[],async:[]},this._callbacks[i][e].push(n);return this}function t(t,n,r){return e.call(this,"async",t,n,r)}function n(t,n,r){return e.call(this,"sync",t,n,r)}function r(e){var t;if(!this._callbacks)return this;for(e=e.split(l);t=e.shift();)delete this._callbacks[t];return this}function i(e){var t,n,r,i,s;if(!this._callbacks)return this;for(e=e.split(l),r=[].slice.call(arguments,1);(t=e.shift())&&(n=this._callbacks[t]);)i=o(n.sync,this,[t].concat(r)),s=o(n.async,this,[t].concat(r)),i()&&c(s);return this}function o(e,t,n){function r(){for(var r,i=0,o=e.length;!r&&o>i;i+=1)r=e[i].apply(t,n)===!1;return!r}return r}function s(){var e;return e=window.setImmediate?function(e){setImmediate(function(){e()})}:function(e){setTimeout(function(){e()},0)}}function a(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}var l=/\s+/,c=s();return{onSync:n,onAsync:t,off:r,trigger:i}}(),s=function(e){"use strict";function n(e,n,r){for(var i,o=[],s=0,a=e.length;a>s;s++)o.push(t.escapeRegExChars(e[s]));return i=r?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",n?new RegExp(i):new RegExp(i,"i")}var r={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(i){function o(t){var n,r,o;return(n=a.exec(t.data))&&(o=e.createElement(i.tagName),i.className&&(o.className=i.className),r=t.splitText(n.index),r.splitText(n[0].length),o.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(o,r)),!!n}function s(e,t){for(var n,r=3,i=0;i<e.childNodes.length;i++)n=e.childNodes[i],n.nodeType===r?i+=t(n)?1:0:s(n,t)}var a;i=t.mixin({},r,i),i.node&&i.pattern&&(i.pattern=t.isArray(i.pattern)?i.pattern:[i.pattern],a=n(i.pattern,i.caseSensitive,i.wordsOnly),s(i.node,o))}}(window.document),a=function(){"use strict";function n(n){var i,o,s,l,c=this;n=n||{},n.input||e.error("input is missing"),i=t.bind(this._onBlur,this),o=t.bind(this._onFocus,this),s=t.bind(this._onKeydown,this),l=t.bind(this._onInput,this),this.$hint=e(n.hint),this.$input=e(n.input).on("blur.tt",i).on("focus.tt",o).on("keydown.tt",s),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop),t.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){a[e.which||e.keyCode]||t.defer(t.bind(c._onInput,c,e))}):this.$input.on("input.tt",l),this.query=this.$input.val(),this.$overflowHelper=r(this.$input)}function r(t){return e('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function i(e,t){return n.normalizeQuery(e)===n.normalizeQuery(t)}function s(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var a;return a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},n.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(n.prototype,o,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(e){var t=a[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(e,t){var n,r,i;switch(e){case"tab":r=this.getHint(),i=this.getInputValue(),n=r&&r!==i&&!s(t);break;case"up":case"down":n=!s(t);break;default:n=!1}n&&t.preventDefault()},_shouldTrigger:function(e,t){var n;switch(e){case"tab":n=!s(t);break;default:n=!0}return n},_checkInputValue:function(){var e,t,n;e=this.getInputValue(),t=i(e,this.query),n=t?this.query.length!==e.length:!1,this.query=e,t?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(e){this.query=e},getInputValue:function(){return this.$input.val()},setInputValue:function(e,t){this.$input.val(e),t?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,n,r;e=this.getInputValue(),t=this.getHint(),n=e!==t&&0===t.indexOf(e),r=""!==e&&n&&!this.hasOverflow(),!r&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,n,r;return e=this.$input.val().length,n=this.$input[0].selectionStart,t.isNumber(n)?n===e:document.selection?(r=document.selection.createRange(),r.moveStart("character",-e),e===r.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),n}(),l=function(){"use strict";function i(r){r=r||{},r.templates=r.templates||{},r.source||e.error("missing source"),r.name&&!c(r.name)&&e.error("invalid dataset name: "+r.name),this.query=null,this.highlight=!!r.highlight,this.name=r.name||t.getUniqueId(),this.source=r.source,this.displayFn=a(r.display||r.displayKey),this.templates=l(r.templates,this.displayFn),this.$el=e(n.dataset.replace("%CLASS%",this.name))}function a(e){function n(t){return t[e]}return e=e||"value",t.isFunction(e)?e:n}function l(e,n){function r(e){return"<p>"+n(e)+"</p>"}return{empty:e.empty&&t.templatify(e.empty),header:e.header&&t.templatify(e.header),footer:e.footer&&t.templatify(e.footer),suggestion:e.suggestion||r}}function c(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var u="ttDataset",f="ttValue",p="ttDatum";return i.extractDatasetName=function(t){return e(t).data(u)},i.extractValue=function(t){return e(t).data(f)},i.extractDatum=function(t){return e(t).data(p)},t.mixin(i.prototype,o,{_render:function(i,o){function a(){return m.templates.empty({query:i,isEmpty:!0})}function l(){function a(t){var i;return i=e(n.suggestion).append(m.templates.suggestion(t)).data(u,m.name).data(f,m.displayFn(t)).data(p,t),i.children().each(function(){e(this).css(r.suggestionChild)}),i}var l,c;return l=e(n.suggestions).css(r.suggestions),c=t.map(o,a),l.append.apply(l,c),m.highlight&&s({className:"tt-highlight",node:l[0],pattern:i}),l}function c(){return m.templates.header({query:i,isEmpty:!d})}function h(){return m.templates.footer({query:i,isEmpty:!d})}if(this.$el){var d,m=this;this.$el.empty(),d=o&&o.length,!d&&this.templates.empty?this.$el.html(a()).prepend(m.templates.header?c():null).append(m.templates.footer?h():null):d&&this.$el.html(l()).prepend(m.templates.header?c():null).append(m.templates.footer?h():null),this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(e){function t(t){n.canceled||e!==n.query||n._render(e,t)}var n=this;this.query=e,this.canceled=!1,this.source(e,t)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),i}(),c=function(){"use strict";function n(n){var r,o,s,a=this;n=n||{},n.menu||e.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=t.map(n.datasets,i),r=t.bind(this._onSuggestionClick,this),o=t.bind(this._onSuggestionMouseEnter,this),s=t.bind(this._onSuggestionMouseLeave,this),this.$menu=e(n.menu).on("click.tt",".tt-suggestion",r).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",s),t.each(this.datasets,function(e){a.$menu.append(e.getRoot()),e.onSync("rendered",a._onRendered,a)})}function i(e){return new l(e)}return t.mixin(n.prototype,o,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",e(t.currentTarget))},_onSuggestionMouseEnter:function(t){this._removeCursor(),this._setCursor(e(t.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function e(e){return e.isEmpty()}this.isEmpty=t.every(this.datasets,e),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(e,t){e.first().addClass("tt-cursor"),!t&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(e){var t,n,r,i;if(this.isOpen){if(n=this._getCursor(),t=this._getSuggestions(),this._removeCursor(),r=t.index(n)+e,r=(r+1)%(t.length+1)-1,-1===r)return void this.trigger("cursorRemoved");-1>r&&(r=t.length-1),this._setCursor(i=t.eq(r)),this._ensureVisible(i)}},_ensureVisible:function(e){var t,n,r,i;t=e.position().top,n=t+e.outerHeight(!0),r=this.$menu.scrollTop(),i=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>t?this.$menu.scrollTop(r+t):n>i&&this.$menu.scrollTop(r+(n-i))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(e){this.$menu.css("ltr"===e?r.ltr:r.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(e){var t=null;return e.length&&(t={raw:l.extractDatum(e),value:l.extractValue(e),datasetName:l.extractDatasetName(e)}),t},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(e){function n(t){t.update(e)}t.each(this.datasets,n)},empty:function(){function e(e){e.clear()}t.each(this.datasets,e),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function e(e){e.destroy()}this.$menu.off(".tt"),this.$menu=null,t.each(this.datasets,e)}}),n}(),u=function(){"use strict";function o(n){var r,o,l;n=n||{},n.input||e.error("missing input"),this.isActivated=!1,this.autoselect=!!n.autoselect,this.minLength=t.isNumber(n.minLength)?n.minLength:1,this.$node=s(n.input,n.withHint),r=this.$node.find(".tt-dropdown-menu"),o=this.$node.find(".tt-input"),l=this.$node.find(".tt-hint"),o.on("blur.tt",function(e){var n,i,s;n=document.activeElement,i=r.is(n),s=r.has(n).length>0,t.isMsie()&&(i||s)&&(e.preventDefault(),e.stopImmediatePropagation(),t.defer(function(){o.focus()}))}),r.on("mousedown.tt",function(e){e.preventDefault()}),this.eventBus=n.eventBus||new i({el:o}),this.dropdown=new c({menu:r,datasets:n.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new a({input:o,hint:l}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function s(t,i){var o,s,a,c;o=e(t),s=e(n.wrapper).css(r.wrapper),a=e(n.dropdown).css(r.dropdown),c=o.clone().css(r.hint).css(l(o)),c.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),o.data(f,{dir:o.attr("dir"),autocomplete:o.attr("autocomplete"),spellcheck:o.attr("spellcheck"),style:o.attr("style")}),o.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(i?r.input:r.inputWithNoHint);try{!o.attr("dir")&&o.attr("dir","auto")}catch(u){}return o.wrap(s).parent().prepend(i?c:null).append(a)}function l(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function u(e){var n=e.find(".tt-input");t.each(n.data(f),function(e,r){t.isUndefined(e)?n.removeAttr(r):n.attr(r,e)}),n.detach().removeData(f).removeClass("tt-input").insertAfter(e),e.remove()}var f="ttAttrs";return t.mixin(o.prototype,{_onSuggestionClicked:function(e,t){var n;(n=this.dropdown.getDatumForSuggestion(t))&&this._select(n)},_onCursorMoved:function(){var e=this.dropdown.getDatumForCursor();this.input.setInputValue(e.value,!0),this.eventBus.trigger("cursorchanged",e.raw,e.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(e,t){var n,r;n=this.dropdown.getDatumForCursor(),r=this.dropdown.getDatumForTopSuggestion(),n?(this._select(n),t.preventDefault()):this.autoselect&&r&&(this._select(r),t.preventDefault())},_onTabKeyed:function(e,t){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n),t.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(e,t){this.input.clearHintIfInvalid(),t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var e;this.dir!==(e=this.input.getLanguageDirection())&&(this.dir=e,this.$node.css("direction",e),this.dropdown.setLanguageDirection(e))},_updateHint:function(){var e,n,r,i,o,s;e=this.dropdown.getDatumForTopSuggestion(),e&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(n=this.input.getInputValue(),r=a.normalizeQuery(n),i=t.escapeRegExChars(r),o=new RegExp("^(?:"+i+")(.+$)","i"),s=o.exec(e.value),s?this.input.setHint(n+s[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(e){var t,n,r,i;t=this.input.getHint(),n=this.input.getQuery(),r=e||this.input.isCursorAtEnd(),t&&n!==t&&r&&(i=this.dropdown.getDatumForTopSuggestion(),i&&this.input.setInputValue(i.value),this.eventBus.trigger("autocompleted",i.raw,i.datasetName))},_select:function(e){this.input.setQuery(e.value),this.input.setInputValue(e.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",e.raw,e.datasetName),this.dropdown.close(),t.defer(t.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(e){e=t.toStr(e),this.isActivated?this.input.setInputValue(e):(this.input.setQuery(e),this.input.setInputValue(e,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),u(this.$node),this.$node=null}}),o}();!function(){"use strict";var n,r,o;n=e.fn.typeahead,r="ttTypeahead",o={initialize:function(n,o){function s(){var s,a,l=e(this);t.each(o,function(e){e.highlight=!!n.highlight}),a=new u({input:l,eventBus:s=new i({el:l}),withHint:t.isUndefined(n.hint)?!0:!!n.hint,minLength:n.minLength,autoselect:n.autoselect,datasets:o}),l.data(r,a)}return o=t.isArray(o)?o:[].slice.call(arguments,1),n=n||{},this.each(s)},open:function(){function t(){var t,n=e(this);(t=n.data(r))&&t.open()}return this.each(t)},close:function(){function t(){var t,n=e(this);(t=n.data(r))&&t.close()}return this.each(t)},val:function(t){function n(){var n,i=e(this);(n=i.data(r))&&n.setVal(t)}function i(e){var t,n;return(t=e.data(r))&&(n=t.getVal()),n}return arguments.length?this.each(n):i(this.first())},destroy:function(){function t(){var t,n=e(this);(t=n.data(r))&&(t.destroy(),n.removeData(r))}return this.each(t)}},e.fn.typeahead=function(t){var n;return o[t]&&"initialize"!==t?(n=this.filter(function(){return!!e(this).data(r)}),o[t].apply(n,[].slice.call(arguments,1))):o.initialize.apply(this,arguments)},e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this}}()}(window.jQuery),/* | ||
+ | Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com> | ||
+ | Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com> | ||
+ | Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com> | ||
+ | Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be> | ||
+ | Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> | ||
+ | Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com> | ||
+ | Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com> | ||
+ | Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com> | ||
+ | Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com> | ||
+ | |||
+ | Redistribution and use in source and binary forms, with or without | ||
+ | modification, are permitted provided that the following conditions are met: | ||
+ | |||
+ | * Redistributions of source code must retain the above copyright | ||
+ | notice, this list of conditions and the following disclaimer. | ||
+ | * Redistributions in binary form must reproduce the above copyright | ||
+ | notice, this list of conditions and the following disclaimer in the | ||
+ | documentation and/or other materials provided with the distribution. | ||
+ | |||
+ | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
+ | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
+ | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
+ | ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
+ | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
+ | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
+ | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
+ | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
+ | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
+ | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
+ | */ | ||
+ | function(e,t){"use strict";"function"==typeof define&&define.amd?define(["exports"],t):t("undefined"!=typeof exports?exports:e.esprima={})}(this,function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(){this.$data={}}function r(e){return e>=48&&57>=e}function i(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function o(e){return"01234567".indexOf(e)>=0}function s(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&"\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff".indexOf(String.fromCharCode(e))>0}function a(e){return 10===e||13===e||8232===e||8233===e}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&Vn.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function c(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&Vn.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function u(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function f(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function p(e){return"eval"===e||"arguments"===e}function h(e){if(Xn&&f(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function d(e,n,r,i,o){var s;t("number"==typeof r,"Comment must have valid position"),rr.lastCommentStart>=r||(rr.lastCommentStart=r,s={type:e,value:n},ir.range&&(s.range=[r,i]),ir.loc&&(s.loc=o),ir.comments.push(s),ir.attachComment&&(ir.leadingComments.push(s),ir.trailingComments.push(s)))}function m(){var e,t,n,r;for(e=Qn-2,t={start:{line:Jn,column:Qn-Zn-2}};er>Qn;)if(n=Yn.charCodeAt(Qn),++Qn,a(n))return ir.comments&&(r=Yn.slice(e+2,Qn-1),t.end={line:Jn,column:Qn-Zn-1},d("Line",r,e,Qn-1,t)),13===n&&10===Yn.charCodeAt(Qn)&&++Qn,++Jn,void(Zn=Qn);ir.comments&&(r=Yn.slice(e+2,Qn),t.end={line:Jn,column:Qn-Zn},d("Line",r,e,Qn,t))}function g(){var e,t,n,r;for(ir.comments&&(e=Qn-2,t={start:{line:Jn,column:Qn-Zn-2}});er>Qn;)if(n=Yn.charCodeAt(Qn),a(n))13===n&&10===Yn.charCodeAt(Qn+1)&&++Qn,++Jn,++Qn,Zn=Qn,Qn>=er&&U({},Un.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===Yn.charCodeAt(Qn+1))return++Qn,++Qn,void(ir.comments&&(r=Yn.slice(e+2,Qn-2),t.end={line:Jn,column:Qn-Zn},d("Block",r,e,Qn,t)));++Qn}else++Qn;U({},Un.UnexpectedToken,"ILLEGAL")}function v(){for(var e;er>Qn;)if(e=Yn.charCodeAt(Qn),s(e))++Qn;else if(a(e))++Qn,13===e&&10===Yn.charCodeAt(Qn)&&++Qn,++Jn,Zn=Qn;else{if(47!==e)break;if(e=Yn.charCodeAt(Qn+1),47===e)++Qn,++Qn,m();else{if(42!==e)break;++Qn,++Qn,g()}}}function b(e){var t,n,r,o=0;for(n="u"===e?4:2,t=0;n>t;++t){if(!(er>Qn&&i(Yn[Qn])))return"";r=Yn[Qn++],o=16*o+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(o)}function y(){var e,t,n,r;for(e=Yn[Qn],t=0,"}"===e&&U({},Un.UnexpectedToken,"ILLEGAL");er>Qn&&(e=Yn[Qn++],i(e));)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&U({},Un.UnexpectedToken,"ILLEGAL"),65535>=t?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function x(){var e,t;for(e=Yn.charCodeAt(Qn++),t=String.fromCharCode(e),92===e&&(117!==Yn.charCodeAt(Qn)&&U({},Un.UnexpectedToken,"ILLEGAL"),++Qn,e=b("u"),e&&"\\"!==e&&l(e.charCodeAt(0))||U({},Un.UnexpectedToken,"ILLEGAL"),t=e);er>Qn&&(e=Yn.charCodeAt(Qn),c(e));)++Qn,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==Yn.charCodeAt(Qn)&&U({},Un.UnexpectedToken,"ILLEGAL"),++Qn,e=b("u"),e&&"\\"!==e&&c(e.charCodeAt(0))||U({},Un.UnexpectedToken,"ILLEGAL"),t+=e);return t}function w(){var e,t;for(e=Qn++;er>Qn;){if(t=Yn.charCodeAt(Qn),92===t)return Qn=e,x();if(!c(t))break;++Qn}return Yn.slice(e,Qn)}function S(){var e,t,n;return e=Qn,t=92===Yn.charCodeAt(Qn)?x():w(),n=1===t.length?Wn.Identifier:h(t)?Wn.Keyword:"null"===t?Wn.NullLiteral:"true"===t||"false"===t?Wn.BooleanLiteral:Wn.Identifier,{type:n,value:t,lineNumber:Jn,lineStart:Zn,range:[e,Qn]}}function C(){var e,t,n,r,i=Qn,o=Yn.charCodeAt(Qn),s=Yn[Qn];switch(o){case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++Qn,ir.tokenize&&(40===o?ir.openParenToken=ir.tokens.length:123===o&&(ir.openCurlyToken=ir.tokens.length)),{type:Wn.Punctuator,value:String.fromCharCode(o),lineNumber:Jn,lineStart:Zn,range:[i,Qn]};default:if(e=Yn.charCodeAt(Qn+1),61===e)switch(o){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:return Qn+=2,{type:Wn.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:Jn,lineStart:Zn,range:[i,Qn]};case 33:case 61:return Qn+=2,61===Yn.charCodeAt(Qn)&&++Qn,{type:Wn.Punctuator,value:Yn.slice(i,Qn),lineNumber:Jn,lineStart:Zn,range:[i,Qn]}}}return t=Yn[Qn+1],n=Yn[Qn+2],r=Yn[Qn+3],">"===s&&">"===t&&">"===n&&"="===r?(Qn+=4,{type:Wn.Punctuator,value:">>>=",lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):">"===s&&">"===t&&">"===n?(Qn+=3,{type:Wn.Punctuator,value:">>>",lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):"<"===s&&"<"===t&&"="===n?(Qn+=3,{type:Wn.Punctuator,value:"<<=",lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):">"===s&&">"===t&&"="===n?(Qn+=3,{type:Wn.Punctuator,value:">>=",lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):"."===s&&"."===t&&"."===n?(Qn+=3,{type:Wn.Punctuator,value:"...",lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):s===t&&"+-<>&|".indexOf(s)>=0?(Qn+=2,{type:Wn.Punctuator,value:s+t,lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):"="===s&&">"===t?(Qn+=2,{type:Wn.Punctuator,value:"=>",lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):"<>=!+-*%&|^/".indexOf(s)>=0?(++Qn,{type:Wn.Punctuator,value:s,lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):"."===s?(++Qn,{type:Wn.Punctuator,value:s,lineNumber:Jn,lineStart:Zn,range:[i,Qn]}):void U({},Un.UnexpectedToken,"ILLEGAL")}function k(e){for(var t="";er>Qn&&i(Yn[Qn]);)t+=Yn[Qn++];return 0===t.length&&U({},Un.UnexpectedToken,"ILLEGAL"),l(Yn.charCodeAt(Qn))&&U({},Un.UnexpectedToken,"ILLEGAL"),{type:Wn.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:Jn,lineStart:Zn,range:[e,Qn]}}function _(e){var t,n;for(n="";er>Qn&&(t=Yn[Qn],"0"===t||"1"===t);)n+=Yn[Qn++];return 0===n.length&&U({},Un.UnexpectedToken,"ILLEGAL"),er>Qn&&(t=Yn.charCodeAt(Qn),(l(t)||r(t))&&U({},Un.UnexpectedToken,"ILLEGAL")),{type:Wn.NumericLiteral,value:parseInt(n,2),lineNumber:Jn,lineStart:Zn,range:[e,Qn]}}function E(e,t){var n,i;for(o(e)?(i=!0,n="0"+Yn[Qn++]):(i=!1,++Qn,n="");er>Qn&&o(Yn[Qn]);)n+=Yn[Qn++];return i||0!==n.length||U({},Un.UnexpectedToken,"ILLEGAL"),(l(Yn.charCodeAt(Qn))||r(Yn.charCodeAt(Qn)))&&U({},Un.UnexpectedToken,"ILLEGAL"),{type:Wn.NumericLiteral,value:parseInt(n,8),octal:i,lineNumber:Jn,lineStart:Zn,range:[t,Qn]}}function A(){var e,n,i;if(i=Yn[Qn],t(r(i.charCodeAt(0))||"."===i,"Numeric literal must start with a decimal digit or a decimal point"),n=Qn,e="","."!==i){if(e=Yn[Qn++],i=Yn[Qn],"0"===e){if("x"===i||"X"===i)return++Qn,k(n);if("b"===i||"B"===i)return++Qn,_(n);if("o"===i||"O"===i||o(i))return E(i,n);i&&r(i.charCodeAt(0))&&U({},Un.UnexpectedToken,"ILLEGAL")}for(;r(Yn.charCodeAt(Qn));)e+=Yn[Qn++];i=Yn[Qn]}if("."===i){for(e+=Yn[Qn++];r(Yn.charCodeAt(Qn));)e+=Yn[Qn++];i=Yn[Qn]}if("e"===i||"E"===i)if(e+=Yn[Qn++],i=Yn[Qn],("+"===i||"-"===i)&&(e+=Yn[Qn++]),r(Yn.charCodeAt(Qn)))for(;r(Yn.charCodeAt(Qn));)e+=Yn[Qn++];else U({},Un.UnexpectedToken,"ILLEGAL");return l(Yn.charCodeAt(Qn))&&U({},Un.UnexpectedToken,"ILLEGAL"),{type:Wn.NumericLiteral,value:parseFloat(e),lineNumber:Jn,lineStart:Zn,range:[n,Qn]}}function L(){var e,n,r,i,s,l,c="",u=!1;for(e=Yn[Qn],t("'"===e||'"'===e,"String literal must starts with a quote"),n=Qn,++Qn;er>Qn;){if(r=Yn[Qn++],r===e){e="";break}if("\\"===r)if(r=Yn[Qn++],r&&a(r.charCodeAt(0)))++Jn,"\r"===r&&"\n"===Yn[Qn]&&++Qn,Zn=Qn;else switch(r){case"n":c+="\n";break;case"r":c+="\r";break;case"t":c+=" ";break;case"u":case"x":"{"===Yn[Qn]?(++Qn,c+=y()):(l=Qn,s=b(r),s?c+=s:(Qn=l,c+=r));break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+="�";break;default:o(r)?(i="01234567".indexOf(r),0!==i&&(u=!0),er>Qn&&o(Yn[Qn])&&(u=!0,i=8*i+"01234567".indexOf(Yn[Qn++]),"0123".indexOf(r)>=0&&er>Qn&&o(Yn[Qn])&&(i=8*i+"01234567".indexOf(Yn[Qn++]))),c+=String.fromCharCode(i)):c+=r}else{if(a(r.charCodeAt(0)))break;c+=r}}return""!==e&&U({},Un.UnexpectedToken,"ILLEGAL"),{type:Wn.StringLiteral,value:c,octal:u,lineNumber:Jn,lineStart:Zn,range:[n,Qn]}}function I(){var e,t,n,r,i,s,l,c,u="";for(n=!1,r=!1,t=Qn,++Qn;er>Qn;){if(e=Yn[Qn++],"`"===e){r=!0,n=!0;break}if("$"===e){if("{"===Yn[Qn]){++Qn,n=!0;break}u+=e}else if("\\"===e)if(e=Yn[Qn++],a(e.charCodeAt(0)))++Jn,"\r"===e&&"\n"===Yn[Qn]&&++Qn,Zn=Qn;else switch(e){case"n":u+="\n";break;case"r":u+="\r";break;case"t":u+=" ";break;case"u":case"x":"{"===Yn[Qn]?(++Qn,u+=y()):(i=Qn,s=b(e),s?u+=s:(Qn=i,u+=e));break;case"b":u+="\b";break;case"f":u+="\f";break;case"v":u+="�";break;default:o(e)?(l="01234567".indexOf(e),0!==l&&(c=!0),er>Qn&&o(Yn[Qn])&&(c=!0,l=8*l+"01234567".indexOf(Yn[Qn++]),"0123".indexOf(e)>=0&&er>Qn&&o(Yn[Qn])&&(l=8*l+"01234567".indexOf(Yn[Qn++]))),u+=String.fromCharCode(l)):u+=e}else a(e.charCodeAt(0))?(++Jn,"\r"===e&&"\n"===Yn[Qn]&&++Qn,Zn=Qn,u+="\n"):u+=e}return n||U({},Un.UnexpectedToken,"ILLEGAL"),{type:Wn.Template,value:{cooked:u,raw:Yn.slice(t+1,Qn-(r?1:2))},tail:r,octal:c,lineNumber:Jn,lineStart:Zn,range:[t,Qn]}}function P(e){var t,n;return nr=null,v(),t=e.head?"`":"}",Yn[Qn]!==t&&U({},Un.UnexpectedToken,"ILLEGAL"),n=I(),F(),n}function T(e,t){var n,r=e;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t){return parseInt(t,16)<=1114111?"x":void U({},Un.InvalidRegExp)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{n=new RegExp(r)}catch(i){U({},Un.InvalidRegExp)}try{return new RegExp(e,t)}catch(o){return null}}function M(){var e,n,r,i,o;for(e=Yn[Qn],t("/"===e,"Regular expression literal must start with a slash"),n=Yn[Qn++],r=!1,i=!1;er>Qn;)if(e=Yn[Qn++],n+=e,"\\"===e)e=Yn[Qn++],a(e.charCodeAt(0))&&U({},Un.UnterminatedRegExp),n+=e;else if(a(e.charCodeAt(0)))U({},Un.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||U({},Un.UnterminatedRegExp),o=n.substr(1,n.length-2),{value:o,literal:n}}function O(){var e,t,n,r;for(t="",n="";er>Qn&&(e=Yn[Qn],c(e.charCodeAt(0)));)if(++Qn,"\\"===e&&er>Qn)if(e=Yn[Qn],"u"===e){if(++Qn,r=Qn,e=b("u"))for(n+=e,t+="\\u";Qn>r;++r)t+=Yn[r];else Qn=r,n+="u",t+="\\u";V({},Un.UnexpectedToken,"ILLEGAL")}else t+="\\",V({},Un.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function z(){var e,t,n,r;return nr=null,v(),e=Qn,t=M(),n=O(),r=T(t.value,n.value),ir.tokenize?{type:Wn.RegularExpression,value:r,regex:{pattern:t.value,flags:n.value},lineNumber:Jn,lineStart:Zn,range:[e,Qn]}:{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},range:[e,Qn]}}function N(e){return e.type===Wn.Identifier||e.type===Wn.Keyword||e.type===Wn.BooleanLiteral||e.type===Wn.NullLiteral}function D(){var e,t;if(e=ir.tokens[ir.tokens.length-1],!e)return z();if("Punctuator"===e.type){if(")"===e.value)return t=ir.tokens[ir.openParenToken-1],!t||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?C():z();if("}"===e.value){if(ir.tokens[ir.openCurlyToken-3]&&"Keyword"===ir.tokens[ir.openCurlyToken-3].type){if(t=ir.tokens[ir.openCurlyToken-4],!t)return C()}else{if(!ir.tokens[ir.openCurlyToken-4]||"Keyword"!==ir.tokens[ir.openCurlyToken-4].type)return C();if(t=ir.tokens[ir.openCurlyToken-5],!t)return z()}return Hn.indexOf(t.value)>=0?C():z()}return z()}return"Keyword"===e.type&&"this"!==e.value?z():C()}function R(){var e;return v(),Qn>=er?{type:Wn.EOF,lineNumber:Jn,lineStart:Zn,range:[Qn,Qn]}:(e=Yn.charCodeAt(Qn),40===e||41===e||58===e?C():39===e||34===e?L():96===e?I():l(e)?S():46===e?r(Yn.charCodeAt(Qn+1))?A():C():r(e)?A():ir.tokenize&&47===e?D():C())}function j(){var e;return e=nr,Qn=e.range[1],Jn=e.lineNumber,Zn=e.lineStart,nr=R(),Qn=e.range[1],Jn=e.lineNumber,Zn=e.lineStart,e}function F(){var e,t,n;e=Qn,t=Jn,n=Zn,nr=R(),Qn=e,Jn=t,Zn=n}function W(){var e,t,n,r,i;return e="function"==typeof ir.advance?ir.advance:R,t=Qn,n=Jn,r=Zn,null===nr&&(nr=e()),Qn=nr.range[1],Jn=nr.lineNumber,Zn=nr.lineStart,i=e(),Qn=t,Jn=n,Zn=r,i}function $(){return ir.loc||ir.range?(v(),{offset:Qn,line:Jn,col:Qn-Zn}):void 0}function H(e){var t,n,r=ir.bottomRightStack,i=r[r.length-1];if(!(e.type===Bn.Program&&e.body.length>0)){if(ir.trailingComments.length>0?ir.trailingComments[0].range[0]>=e.range[1]?(n=ir.trailingComments,ir.trailingComments=[]):ir.trailingComments.length=0:i&&i.trailingComments&&i.trailingComments[0].range[0]>=e.range[1]&&(n=i.trailingComments,delete i.trailingComments),i)for(;i&&i.range[0]>=e.range[0];)t=i,i=r.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):ir.leadingComments.length>0&&ir.leadingComments[ir.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=ir.leadingComments,ir.leadingComments=[]),n&&(e.trailingComments=n),r.push(e)}}function B(e,t){return ir.range&&(t.range=[e.offset,Qn]),ir.loc&&(t.loc={start:{line:e.line,column:e.col},end:{line:Jn,column:Qn-Zn}},t=tr.postProcess(t)),ir.attachComment&&H(t),t}function q(){var e,t,n,r;return e=Qn,t=Jn,n=Zn,v(),r=Jn!==t,Qn=e,Jn=t,Zn=n,r}function U(e,n){var r,i=Array.prototype.slice.call(arguments,2),o=n.replace(/%(\d)/g,function(e,n){return t(n<i.length,"Message reference must be in range"),i[n]});throw"number"==typeof e.lineNumber?(r=new Error("Line "+e.lineNumber+": "+o),r.index=e.range[0],r.lineNumber=e.lineNumber,r.column=e.range[0]-Zn+1):(r=new Error("Line "+Jn+": "+o),r.index=Qn,r.lineNumber=Jn,r.column=Qn-Zn+1),r.description=o,r}function V(){try{U.apply(null,arguments)}catch(e){if(!ir.errors)throw e;ir.errors.push(e)}}function G(e){if(e.type===Wn.EOF&&U(e,Un.UnexpectedEOS),e.type===Wn.NumericLiteral&&U(e,Un.UnexpectedNumber),e.type===Wn.StringLiteral&&U(e,Un.UnexpectedString),e.type===Wn.Identifier&&U(e,Un.UnexpectedIdentifier),e.type===Wn.Keyword){if(u(e.value))U(e,Un.UnexpectedReserved);else if(Xn&&f(e.value))return void V(e,Un.StrictReservedWord);U(e,Un.UnexpectedToken,e.value)}e.type===Wn.Template&&U(e,Un.UnexpectedTemplate,e.value.raw),U(e,Un.UnexpectedToken,e.value)}function K(e){var t=j();(t.type!==Wn.Punctuator||t.value!==e)&&G(t)}function Y(e){var t=j();(t.type!==Wn.Keyword||t.value!==e)&&G(t)}function X(e){return nr.type===Wn.Punctuator&&nr.value===e}function Q(e){return nr.type===Wn.Keyword&&nr.value===e}function J(e){return nr.type===Wn.Identifier&&nr.value===e}function Z(){var e;return nr.type!==Wn.Punctuator?!1:(e=nr.value,"="===e||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function et(){var e,t=Qn,n=Jn,r=Zn,i=nr;return 59===Yn.charCodeAt(Qn)?void j():(e=Jn,v(),Jn!==e?(Qn=t,Jn=n,Zn=r,void(nr=i)):X(";")?void j():void(nr.type===Wn.EOF||X("}")||G(nr)))}function tt(e){return e.type===Bn.Identifier||e.type===Bn.MemberExpression}function nt(e){return tt(e)||e.type===Bn.ObjectPattern||e.type===Bn.ArrayPattern}function rt(){var e,t=[],n=[],r=null,i=!0,o=$();for(K("[");!X("]");)"for"===nr.value&&nr.type===Wn.Keyword?(i||U({},Un.ComprehensionError),Q("for"),e=tn({ignoreBody:!0}),e.of=e.type===Bn.ForOfStatement,e.type=Bn.ComprehensionBlock,e.left.kind&&U({},Un.ComprehensionError),n.push(e)):"if"===nr.value&&nr.type===Wn.Keyword?(i||U({},Un.ComprehensionError),Y("if"),K("("),r=Mt(),K(")")):","===nr.value&&nr.type===Wn.Punctuator?(i=!1,j(),t.push(null)):(e=mt(),t.push(e),e&&e.type===Bn.SpreadElement?X("]")||U({},Un.ElementAfterSpreadElement):X("]")||Q("for")||Q("if")||(K(","),i=!1));return K("]"),r&&!n.length&&U({},Un.ComprehensionRequiresBlock),n.length?(1!==t.length&&U({},Un.ComprehensionError),B(o,tr.createComprehensionExpression(r,n,t[0]))):B(o,tr.createArrayExpression(t))}function it(e){var t,n,r,i,o,s=$();return t=Xn,n=rr.yieldAllowed,rr.yieldAllowed=e.generator,r=e.params||[],i=e.defaults||[],o=dn(),e.name&&Xn&&p(r[0].name)&&V(e.name,Un.StrictParamName),Xn=t,rr.yieldAllowed=n,B(s,tr.createFunctionExpression(null,r,i,o,e.rest||null,e.generator,o.type!==Bn.BlockStatement))}function ot(e){var t,n,r;return t=Xn,Xn=!0,n=bn(),n.stricted&&V(n.stricted,n.message),r=it({params:n.params,defaults:n.defaults,rest:n.rest,generator:e.generator}),Xn=t,r}function st(){var e,t,n=$(),r=j();return r.type===Wn.StringLiteral||r.type===Wn.NumericLiteral?(Xn&&r.octal&&V(r,Un.StrictOctalLiteral),B(n,tr.createLiteral(r))):r.type===Wn.Punctuator&&"["===r.value?(n=$(),e=Tt(),t=B(n,e),K("]"),t):B(n,tr.createIdentifier(r.value))}function at(){var e,t,n,r,i,o=$();return e=nr,i="["===e.value&&e.type===Wn.Punctuator,e.type===Wn.Identifier||i?(n=st(),"get"!==e.value||X(":")||X("(")?"set"!==e.value||X(":")||X("(")?X(":")?(j(),B(o,tr.createProperty("init",n,Tt(),!1,!1,i))):X("(")?B(o,tr.createProperty("init",n,ot({generator:!1}),!0,!1,i)):(i&&G(nr),B(o,tr.createProperty("init",n,n,!1,!0,!1))):(i="["===nr.value,t=st(),K("("),e=nr,r=[Nt()],K(")"),B(o,tr.createProperty("set",t,it({params:r,generator:!1,name:e}),!1,!1,i))):(i="["===nr.value,t=st(),K("("),K(")"),B(o,tr.createProperty("get",t,it({generator:!1}),!1,!1,i)))):e.type===Wn.EOF||e.type===Wn.Punctuator?(X("*")||G(e),j(),i=nr.type===Wn.Punctuator&&"["===nr.value,n=st(),X("(")||G(j()),B(o,tr.createProperty("init",n,ot({generator:!0}),!0,!1,i))):(t=st(),X(":")?(j(),B(o,tr.createProperty("init",t,Tt(),!1,!1,!1))):X("(")?B(o,tr.createProperty("init",t,ot({generator:!1}),!0,!1,!1)):void G(j()))}function lt(e){var t=String;return e.type===Bn.Identifier?e.name:t(e.value)}function ct(){var e,t,r,i,o=[],s=new n,a=$();for(K("{");!X("}");)e=at(),e.computed||(t=lt(e.key),r="init"===e.kind?qn.Data:"get"===e.kind?qn.Get:qn.Set,s.has(t)?(i=s.get(t),i===qn.Data?Xn&&r===qn.Data?V({},Un.StrictDuplicateProperty):r!==qn.Data&&V({},Un.AccessorDataProperty):r===qn.Data?V({},Un.AccessorDataProperty):i&r&&V({},Un.AccessorGetSet),s.set(t,i|r)):s.set(t,r)),o.push(e),X("}")||K(",");return K("}"),B(a,tr.createObjectExpression(o))}function ut(e){var t=$(),n=P(e);return Xn&&n.octal&&U(n,Un.StrictOctalLiteral),B(t,tr.createTemplateElement({raw:n.value.raw,cooked:n.value.cooked},n.tail))}function ft(){var e,t,n,r=$();for(e=ut({head:!0}),t=[e],n=[];!e.tail;)n.push(Mt()),e=ut({head:!1}),t.push(e);return B(r,tr.createTemplateLiteral(t,n))}function pt(){var e;return K("("),++rr.parenthesizedCount,e=Mt(),K(")"),e}function ht(){var e,t,n,r;if(t=nr.type,t===Wn.Identifier)return e=$(),B(e,tr.createIdentifier(j().value));if(t===Wn.StringLiteral||t===Wn.NumericLiteral)return Xn&&nr.octal&&V(nr,Un.StrictOctalLiteral),e=$(),B(e,tr.createLiteral(j()));if(t===Wn.Keyword){if(Q("this"))return e=$(),j(),B(e,tr.createThisExpression());if(Q("function"))return xn();if(Q("class"))return En();if(Q("super"))return e=$(),j(),B(e,tr.createIdentifier("super"))}return t===Wn.BooleanLiteral?(e=$(),n=j(),n.value="true"===n.value,B(e,tr.createLiteral(n))):t===Wn.NullLiteral?(e=$(),n=j(),n.value=null,B(e,tr.createLiteral(n))):X("[")?rt():X("{")?ct():X("(")?pt():X("/")||X("/=")?(e=$(),r=tr.createLiteral(z()),F(),B(e,r)):t===Wn.Template?ft():void G(j())}function dt(){var e,t=[];if(K("("),!X(")"))for(;er>Qn&&(e=mt(),t.push(e),!X(")"));)e.type===Bn.SpreadElement&&U({},Un.ElementAfterSpreadElement),K(",");return K(")"),t}function mt(){if(X("...")){var e=$();return j(),B(e,tr.createSpreadElement(Tt()))}return Tt()}function gt(){var e=$(),t=j();return N(t)||G(t),B(e,tr.createIdentifier(t.value))}function vt(){return K("."),gt()}function bt(){var e;return K("["),e=Mt(),K("]"),e}function yt(){var e,t,n=$();return Y("new"),e=wt(),t=X("(")?dt():[],B(n,tr.createNewExpression(e,t))}function xt(){var e,t,n=$();for(e=Q("new")?yt():ht();X(".")||X("[")||X("(")||nr.type===Wn.Template;)X("(")?(t=dt(),e=B(n,tr.createCallExpression(e,t))):e=X("[")?B(n,tr.createMemberExpression("[",e,bt())):X(".")?B(n,tr.createMemberExpression(".",e,vt())):B(n,tr.createTaggedTemplateExpression(e,ft()));return e}function wt(){var e,t=$();for(e=Q("new")?yt():ht();X(".")||X("[")||nr.type===Wn.Template;)e=X("[")?B(t,tr.createMemberExpression("[",e,bt())):X(".")?B(t,tr.createMemberExpression(".",e,vt())):B(t,tr.createTaggedTemplateExpression(e,ft()));return e}function St(){var e,t=$(),n=xt();return nr.type!==Wn.Punctuator?n:(!X("++")&&!X("--")||q()||(Xn&&n.type===Bn.Identifier&&p(n.name)&&V({},Un.StrictLHSPostfix),tt(n)||U({},Un.InvalidLHSInAssignment),e=j(),n=B(t,tr.createPostfixExpression(e.value,n))),n)}function Ct(){var e,t,n;return nr.type!==Wn.Punctuator&&nr.type!==Wn.Keyword?St():X("++")||X("--")?(e=$(),t=j(),n=Ct(),Xn&&n.type===Bn.Identifier&&p(n.name)&&V({},Un.StrictLHSPrefix),tt(n)||U({},Un.InvalidLHSInAssignment),B(e,tr.createUnaryExpression(t.value,n))):X("+")||X("-")||X("~")||X("!")?(e=$(),t=j(),n=Ct(),B(e,tr.createUnaryExpression(t.value,n))):Q("delete")||Q("void")||Q("typeof")?(e=$(),t=j(),n=Ct(),n=B(e,tr.createUnaryExpression(t.value,n)),Xn&&"delete"===n.operator&&n.argument.type===Bn.Identifier&&V({},Un.StrictDelete),n):St()}function kt(e,t){var n=0;if(e.type!==Wn.Punctuator&&e.type!==Wn.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function _t(){var e,t,n,r,i,o,s,a,l,c,u;if(r=rr.allowIn,rr.allowIn=!0,c=$(),a=Ct(),t=nr,n=kt(t,r),0===n)return a;for(t.prec=n,j(),u=[c,$()],o=Ct(),i=[a,t,o];(n=kt(nr,r))>0;){for(;i.length>2&&n<=i[i.length-2].prec;)o=i.pop(),s=i.pop().value,a=i.pop(),e=tr.createBinaryExpression(s,a,o),u.pop(),c=u.pop(),B(c,e),i.push(e),u.push(c);t=j(),t.prec=n,i.push(t),u.push($()),e=Ct(),i.push(e)}for(rr.allowIn=r,l=i.length-1,e=i[l],u.pop();l>1;)e=tr.createBinaryExpression(i[l-1].value,i[l-2],e),l-=2,c=u.pop(),B(c,e);return e}function Et(){var e,t,n,r,i=$();return e=_t(),X("?")&&(j(),t=rr.allowIn,rr.allowIn=!0,n=Tt(),rr.allowIn=t,K(":"),r=Tt(),e=B(i,tr.createConditionalExpression(e,n,r))),e}function At(e){var t,n,r,i;if(e.type===Bn.ObjectExpression)for(e.type=Bn.ObjectPattern,t=0,n=e.properties.length;n>t;t+=1)r=e.properties[t],"init"!==r.kind&&U({},Un.InvalidLHSInAssignment),At(r.value);else if(e.type===Bn.ArrayExpression)for(e.type=Bn.ArrayPattern,t=0,n=e.elements.length;n>t;t+=1)i=e.elements[t],i&&At(i);else e.type===Bn.Identifier?p(e.name)&&U({},Un.InvalidLHSInAssignment):e.type===Bn.SpreadElement?(At(e.argument),e.argument.type===Bn.ObjectPattern&&U({},Un.ObjectPatternAsSpread)):e.type!==Bn.MemberExpression&&e.type!==Bn.CallExpression&&e.type!==Bn.NewExpression&&U({},Un.InvalidLHSInAssignment)}function Lt(e,t){var n,r,i,o;if(t.type===Bn.ObjectExpression)for(t.type=Bn.ObjectPattern,n=0,r=t.properties.length;r>n;n+=1)i=t.properties[n],"init"!==i.kind&&U({},Un.InvalidLHSInFormalsList),Lt(e,i.value);else if(t.type===Bn.ArrayExpression)for(t.type=Bn.ArrayPattern,n=0,r=t.elements.length;r>n;n+=1)o=t.elements[n],o&&Lt(e,o);else t.type===Bn.Identifier?gn(e,t,t.name):t.type===Bn.SpreadElement?(t.argument.type!==Bn.Identifier&&U({},Un.InvalidLHSInFormalsList),gn(e,t.argument,t.argument.name)):U({},Un.InvalidLHSInFormalsList)}function It(e){var r,i,o,s,a,l,c,u;for(s=[],a=[],l=0,u=null,c={paramSet:new n},r=0,i=e.length;i>r;r+=1)if(o=e[r],o.type===Bn.Identifier)s.push(o),a.push(null),gn(c,o,o.name);else if(o.type===Bn.ObjectExpression||o.type===Bn.ArrayExpression)Lt(c,o),s.push(o),a.push(null);else if(o.type===Bn.SpreadElement)t(r===i-1,"It is guaranteed that SpreadElement is last element by parseExpression"),o.argument.type!==Bn.Identifier&&U({},Un.InvalidLHSInFormalsList),Lt(c,o.argument),u=o.argument;else{if(o.type!==Bn.AssignmentExpression)return null;s.push(o.left),a.push(o.right),++l,gn(c,o.left,o.left.name)}return c.message===Un.StrictParamDupe&&U(Xn?c.stricted:c.firstRestricted,c.message),0===l&&(a=[]),{params:s,defaults:a,rest:u,stricted:c.stricted,firstRestricted:c.firstRestricted,message:c.message}}function Pt(e,t){var n,r,i;return K("=>"),n=Xn,r=rr.yieldAllowed,rr.yieldAllowed=!1,i=dn(),Xn&&e.firstRestricted&&U(e.firstRestricted,e.message),Xn&&e.stricted&&V(e.stricted,e.message),Xn=n,rr.yieldAllowed=r,B(t,tr.createArrowFunctionExpression(e.params,e.defaults,i,e.rest,i.type!==Bn.BlockStatement))}function Tt(){var e,t,n,r,i,o=!1;if(rr.yieldAllowed&&J("yield")||Xn&&Q("yield"))return wn();if(i=rr.parenthesizedCount,e=$(),X("(")){if(n=W(),n.type===Wn.Punctuator&&")"===n.value||"..."===n.value)return r=bn(),X("=>")||G(j()),Pt(r,e);o=!0}return n=nr,t=Et(),X("=>")&&(rr.parenthesizedCount===i||rr.parenthesizedCount===i+1)&&(t.type===Bn.Identifier?r=It([t]):t.type===Bn.AssignmentExpression||t.type===Bn.ArrayExpression||t.type===Bn.ObjectExpression?(o||G(j()),r=It([t])):t.type===Bn.SequenceExpression&&(r=It(t.expressions)),r)?Pt(r,e):(Z()&&(Xn&&t.type===Bn.Identifier&&p(t.name)&&V(n,Un.StrictLHSAssignment),!X("=")||t.type!==Bn.ObjectExpression&&t.type!==Bn.ArrayExpression?tt(t)||U({},Un.InvalidLHSInAssignment):At(t),t=B(e,tr.createAssignmentExpression(j().value,t,Tt()))),t)}function Mt(){var e,t,n,r,i;if(e=$(),t=Tt(),n=[t],X(",")){for(;er>Qn&&X(",");)if(j(),t=mt(),n.push(t),t.type===Bn.SpreadElement){i=!0,X(")")||U({},Un.ElementAfterSpreadElement);break}r=B(e,tr.createSequenceExpression(n))}return i&&"=>"!==W().value&&U({},Un.IllegalSpread),r||t}function Ot(){for(var e,t=[];er>Qn&&!X("}")&&(e=Ln(),"undefined"!=typeof e);)t.push(e);return t}function zt(){var e,t=$();return K("{"),e=Ot(),K("}"),B(t,tr.createBlockStatement(e))}function Nt(){var e=$(),t=j();return t.type!==Wn.Identifier&&G(t),B(e,tr.createIdentifier(t.value))}function Dt(e){var t,n=$(),r=null;return X("{")?(t=ct(),At(t)):X("[")?(t=rt(),At(t)):(t=rr.allowKeyword?gt():Nt(),Xn&&p(t.name)&&V({},Un.StrictVarName)),"const"===e?(X("=")||U({},Un.NoUnintializedConst),K("="),r=Tt()):X("=")&&(j(),r=Tt()),B(n,tr.createVariableDeclarator(t,r))}function Rt(e){var t=[];do{if(t.push(Dt(e)),!X(","))break;j()}while(er>Qn);return t}function jt(){var e,t=$();return Y("var"),e=Rt(),et(),B(t,tr.createVariableDeclaration(e,"var"))}function Ft(e){var t,n=$();return Y(e),t=Rt(e),et(),B(n,tr.createVariableDeclaration(t,e))}function Wt(){var e,t=$();return nr.type!==Wn.StringLiteral&&U({},Un.InvalidModuleSpecifier),e=tr.createModuleSpecifier(nr),j(),B(t,e)}function $t(){var e=$();return K("*"),B(e,tr.createExportBatchSpecifier())}function Ht(){var e,t=null,n=$();return Q("default")?(j(),e=B(n,tr.createIdentifier("default"))):e=Nt(),J("as")&&(j(),t=gt()),B(n,tr.createExportSpecifier(e,t))}function Bt(){var e,t,n,r=null,i=null,o=[],s=$();if(Y("export"),Q("default")){if(j(),Q("function")||Q("class")){if(e=W(),N(e))return t=Ln(),B(s,tr.createExportDeclaration(!0,t,[t.id],null));switch(nr.value){case"class":return B(s,tr.createExportDeclaration(!0,En(),[],null));case"function":return B(s,tr.createExportDeclaration(!0,xn(),[],null))}}return J("from")&&U({},Un.UnexpectedToken,nr.value),r=X("{")?ct():X("[")?rt():Tt(),et(),B(s,tr.createExportDeclaration(!0,r,[],null))}if(nr.type===Wn.Keyword)switch(nr.value){case"let":case"const":case"var":case"class":case"function":return B(s,tr.createExportDeclaration(!1,Ln(),o,null))}if(X("*"))return o.push($t()),J("from")||U({},nr.value?Un.UnexpectedToken:Un.MissingFromClause,nr.value),j(),i=Wt(),et(),B(s,tr.createExportDeclaration(!1,null,o,i));if(K("{"),!X("}"))do n=n||Q("default"),o.push(Ht());while(X(",")&&j());return K("}"),J("from")?(j(),i=Wt(),et()):n?U({},nr.value?Un.UnexpectedToken:Un.MissingFromClause,nr.value):et(),B(s,tr.createExportDeclaration(!1,r,o,i))}function qt(){var e,t=null,n=$();return e=gt(),J("as")&&(j(),t=Nt()),B(n,tr.createImportSpecifier(e,t))}function Ut(){var e=[];if(K("{"),!X("}"))do e.push(qt());while(X(",")&&j());return K("}"),e}function Vt(){var e,t=$();return e=gt(),B(t,tr.createImportDefaultSpecifier(e))}function Gt(){var e,t=$();return K("*"),J("as")||U({},Un.NoAsAfterImportNamespace),j(),e=gt(),B(t,tr.createImportNamespaceSpecifier(e))}function Kt(){var e,t,n=$();return Y("import"),e=[],nr.type===Wn.StringLiteral?(t=Wt(),et(),B(n,tr.createImportDeclaration(e,t))):(!Q("default")&&N(nr)&&(e.push(Vt()),X(",")&&j()),X("*")?e.push(Gt()):X("{")&&(e=e.concat(Ut())),J("from")||U({},nr.value?Un.UnexpectedToken:Un.MissingFromClause,nr.value),j(),t=Wt(),et(),B(n,tr.createImportDeclaration(e,t)))}function Yt(){var e=$();return K(";"),B(e,tr.createEmptyStatement())}function Xt(){var e=$(),t=Mt();return et(),B(e,tr.createExpressionStatement(t))}function Qt(){var e,t,n,r=$();return Y("if"),K("("),e=Mt(),K(")"),t=hn(),Q("else")?(j(),n=hn()):n=null,B(r,tr.createIfStatement(e,t,n))}function Jt(){var e,t,n,r=$();return Y("do"),n=rr.inIteration,rr.inIteration=!0,e=hn(),rr.inIteration=n,Y("while"),K("("),t=Mt(),K(")"),X(";")&&j(),B(r,tr.createDoWhileStatement(e,t))}function Zt(){var e,t,n,r=$();return Y("while"),K("("),e=Mt(),K(")"),n=rr.inIteration,rr.inIteration=!0,t=hn(),rr.inIteration=n,B(r,tr.createWhileStatement(e,t))}function en(){var e=$(),t=j(),n=Rt();return B(e,tr.createVariableDeclaration(n,t.value))}function tn(e){var t,n,r,i,o,s,a,l,c=$();return t=n=r=null,Y("for"),J("each")&&U({},Un.EachNotAllowed),K("("),X(";")?j():(Q("var")||Q("let")||Q("const")?(rr.allowIn=!1,t=en(),rr.allowIn=!0,1===t.declarations.length&&(Q("in")||J("of"))&&(a=nr,("in"!==a.value&&"var"===t.kind||!t.declarations[0].init)&&(j(),i=t,o=Mt(),t=null))):(rr.allowIn=!1,t=Mt(),rr.allowIn=!0,J("of")?(a=j(),i=t,o=Mt(),t=null):Q("in")&&(nt(t)||U({},Un.InvalidLHSInForIn),a=j(),i=t,o=Mt(),t=null)),"undefined"==typeof i&&K(";")),"undefined"==typeof i&&(X(";")||(n=Mt()),K(";"),X(")")||(r=Mt())),K(")"),l=rr.inIteration,rr.inIteration=!0,void 0!==e&&e.ignoreBody||(s=hn()),rr.inIteration=l,"undefined"==typeof i?B(c,tr.createForStatement(t,n,r,s)):"in"===a.value?B(c,tr.createForInStatement(i,o,s)):B(c,tr.createForOfStatement(i,o,s))}function nn(){var e=null,t=$();return Y("continue"),59===Yn.charCodeAt(Qn)?(j(),rr.inIteration||U({},Un.IllegalContinue),B(t,tr.createContinueStatement(null))):q()?(rr.inIteration||U({},Un.IllegalContinue),B(t,tr.createContinueStatement(null))):(nr.type===Wn.Identifier&&(e=Nt(),rr.labelSet.has(e.name)||U({},Un.UnknownLabel,e.name)),et(),null!==e||rr.inIteration||U({},Un.IllegalContinue),B(t,tr.createContinueStatement(e)))}function rn(){var e=null,t=$();return Y("break"),59===Yn.charCodeAt(Qn)?(j(),rr.inIteration||rr.inSwitch||U({},Un.IllegalBreak),B(t,tr.createBreakStatement(null))):q()?(rr.inIteration||rr.inSwitch||U({},Un.IllegalBreak),B(t,tr.createBreakStatement(null))):(nr.type===Wn.Identifier&&(e=Nt(),rr.labelSet.has(e.name)||U({},Un.UnknownLabel,e.name)),et(),null!==e||rr.inIteration||rr.inSwitch||U({},Un.IllegalBreak),B(t,tr.createBreakStatement(e)))}function on(){var e=null,t=$();return Y("return"),rr.inFunctionBody||V({},Un.IllegalReturn),32===Yn.charCodeAt(Qn)&&l(Yn.charCodeAt(Qn+1))?(e=Mt(),et(),B(t,tr.createReturnStatement(e))):q()?B(t,tr.createReturnStatement(null)):(X(";")||X("}")||nr.type===Wn.EOF||(e=Mt()),et(),B(t,tr.createReturnStatement(e)))}function sn(){var e,t,n=$();return Xn&&V({},Un.StrictModeWith),Y("with"),K("("),e=Mt(),K(")"),t=hn(),B(n,tr.createWithStatement(e,t))}function an(){var e,t,n=[],r=$();for(Q("default")?(j(),e=null):(Y("case"),e=Mt()),K(":");er>Qn&&!(X("}")||Q("default")||Q("case"))&&(t=Ln(),"undefined"!=typeof t);)n.push(t);return B(r,tr.createSwitchCase(e,n))}function ln(){var e,t,n,r,i,o=$();if(Y("switch"),K("("),e=Mt(),K(")"),K("{"),t=[],X("}"))return j(),B(o,tr.createSwitchStatement(e,t));for(r=rr.inSwitch,rr.inSwitch=!0,i=!1;er>Qn&&!X("}");)n=an(),null===n.test&&(i&&U({},Un.MultipleDefaultsInSwitch),i=!0),t.push(n);return rr.inSwitch=r,K("}"),B(o,tr.createSwitchStatement(e,t))}function cn(){var e,t=$();return Y("throw"),q()&&U({},Un.NewlineAfterThrow),e=Mt(),et(),B(t,tr.createThrowStatement(e))}function un(){var e,t,n=$();return Y("catch"),K("("),X(")")&&G(nr),e=Mt(),Xn&&e.type===Bn.Identifier&&p(e.name)&&V({},Un.StrictCatchVariable),K(")"),t=zt(),B(n,tr.createCatchClause(e,t))}function fn(){var e,t=[],n=null,r=$();return Y("try"),e=zt(),Q("catch")&&t.push(un()),Q("finally")&&(j(),n=zt()),0!==t.length||n||U({},Un.NoCatchOrFinally),B(r,tr.createTryStatement(e,[],t,n)) | ||
+ | }function pn(){var e=$();return Y("debugger"),et(),B(e,tr.createDebuggerStatement())}function hn(){var e,t,n,r=nr.type;if(r===Wn.EOF&&G(nr),r===Wn.Punctuator)switch(nr.value){case";":return Yt();case"{":return zt();case"(":return Xt()}if(r===Wn.Keyword)switch(nr.value){case"break":return rn();case"continue":return nn();case"debugger":return pn();case"do":return Jt();case"for":return tn();case"function":return yn();case"class":return An();case"if":return Qt();case"return":return on();case"switch":return ln();case"throw":return cn();case"try":return fn();case"var":return jt();case"while":return Zt();case"with":return sn()}return e=$(),t=Mt(),t.type===Bn.Identifier&&X(":")?(j(),rr.labelSet.has(t.name)&&U({},Un.Redeclaration,"Label",t.name),rr.labelSet.set(t.name,!0),n=hn(),rr.labelSet.delete(t.name),B(e,tr.createLabeledStatement(t,n))):(et(),B(e,tr.createExpressionStatement(t)))}function dn(){return X("{")?mn():Tt()}function mn(){var e,t,r,i,o,s,a,l,c,u=[],f=$();for(K("{");er>Qn&&nr.type===Wn.StringLiteral&&(t=nr,e=Ln(),u.push(e),e.expression.type===Bn.Literal);)r=Yn.slice(t.range[0]+1,t.range[1]-1),"use strict"===r?(Xn=!0,i&&V(i,Un.StrictOctalLiteral)):!i&&t.octal&&(i=t);for(o=rr.labelSet,s=rr.inIteration,a=rr.inSwitch,l=rr.inFunctionBody,c=rr.parenthesizedCount,rr.labelSet=new n,rr.inIteration=!1,rr.inSwitch=!1,rr.inFunctionBody=!0,rr.parenthesizedCount=0;er>Qn&&!X("}")&&(e=Ln(),"undefined"!=typeof e);)u.push(e);return K("}"),rr.labelSet=o,rr.inIteration=s,rr.inSwitch=a,rr.inFunctionBody=l,rr.parenthesizedCount=c,B(f,tr.createBlockStatement(u))}function gn(e,t,n){Xn?(p(n)&&(e.stricted=t,e.message=Un.StrictParamName),e.paramSet.has(n)&&(e.stricted=t,e.message=Un.StrictParamDupe)):e.firstRestricted||(p(n)?(e.firstRestricted=t,e.message=Un.StrictParamName):f(n)?(e.firstRestricted=t,e.message=Un.StrictReservedWord):e.paramSet.has(n)&&(e.firstRestricted=t,e.message=Un.StrictParamDupe)),e.paramSet.set(n,!0)}function vn(e){var t,n,r,i;return t=nr,"..."===t.value&&(t=j(),n=!0),X("[")?(r=rt(),Lt(e,r)):X("{")?(n&&U({},Un.ObjectPatternAsRestParameter),r=ct(),Lt(e,r)):(r=Nt(),gn(e,t,t.value)),X("=")&&(n&&V(nr,Un.DefaultRestParameter),j(),i=Tt(),++e.defaultCount),n?(X(")")||U({},Un.ParameterAfterRestParameter),e.rest=r,!1):(e.params.push(r),e.defaults.push(i),!X(")"))}function bn(e){var t,r=$();if(t={params:[],defaultCount:0,defaults:[],rest:null,firstRestricted:e},K("("),!X(")"))for(t.paramSet=new n;er>Qn&&vn(t);)K(",");return K(")"),0===t.defaultCount&&(t.defaults=[]),B(r,t)}function yn(){var e,t,n,r,i,o,s,a,l,c=$();return Y("function"),l=!1,X("*")&&(j(),l=!0),n=nr,e=Nt(),Xn?p(n.value)&&V(n,Un.StrictFunctionName):p(n.value)?(i=n,o=Un.StrictFunctionName):f(n.value)&&(i=n,o=Un.StrictReservedWord),r=bn(i),i=r.firstRestricted,r.message&&(o=r.message),s=Xn,a=rr.yieldAllowed,rr.yieldAllowed=l,t=mn(),Xn&&i&&U(i,o),Xn&&r.stricted&&V(r.stricted,o),Xn=s,rr.yieldAllowed=a,B(c,tr.createFunctionDeclaration(e,r.params,r.defaults,t,r.rest,l,!1))}function xn(){var e,t,n,r,i,o,s,a,l=null,c=$();return Y("function"),a=!1,X("*")&&(j(),a=!0),X("(")||(e=nr,l=Nt(),Xn?p(e.value)&&V(e,Un.StrictFunctionName):p(e.value)?(t=e,n=Un.StrictFunctionName):f(e.value)&&(t=e,n=Un.StrictReservedWord)),r=bn(t),t=r.firstRestricted,r.message&&(n=r.message),o=Xn,s=rr.yieldAllowed,rr.yieldAllowed=a,i=mn(),Xn&&t&&U(t,n),Xn&&r.stricted&&V(r.stricted,n),Xn=o,rr.yieldAllowed=s,B(c,tr.createFunctionExpression(l,r.params,r.defaults,i,r.rest,a,!1))}function wn(){var e,n,r,i=$();return e=j(),t("yield"===e.value,"Called parseYieldExpression with non-yield lookahead."),rr.yieldAllowed||V({},Un.IllegalYield),n=!1,X("*")&&(j(),n=!0),r=Tt(),B(i,tr.createYieldExpression(r,n))}function Sn(e){return"get"===e.kind||"set"===e.kind||e.value.generator}function Cn(){var e,t,n,r,i,o=$();return"static"===nr.value?(r=Kn.static,j()):r=Kn.prototype,X("*")?(j(),i="["===nr.value,B(o,tr.createMethodDefinition(r,"",st(),ot({generator:!0}),i))):(e=nr,t=st(),"get"!==e.value||X("(")?"set"!==e.value||X("(")?(i="["===e.value,B(o,tr.createMethodDefinition(r,"",t,ot({generator:!1}),i))):(i="["===nr.value,t=st(),K("("),e=nr,n=[Nt()],K(")"),B(o,tr.createMethodDefinition(r,"set",t,it({params:n,generator:!1,name:e}),i))):(i="["===nr.value,t=st(),K("("),K(")"),B(o,tr.createMethodDefinition(r,"get",t,it({generator:!1}),i))))}function kn(){return X(";")?void j():Cn()}function _n(){var e,t,r,i=[],o={},s=$();for(o[Kn.static]=new n,o[Kn.prototype]=new n,K("{");er>Qn&&!X("}");)e=kn(o),"undefined"!=typeof e&&(i.push(e),t=!e.computed&<(e.key),t!==!1&&(r=e.static?Kn.static:Kn.prototype,"constructor"!==t||e.static||(Sn(e)&&U(e,Un.IllegalClassConstructorProperty),o[Kn.prototype].has("constructor")&&U(e.key,Un.IllegalDuplicateClassProperty)),o[r].set(t,!0)));return K("}"),B(s,tr.createClassBody(i))}function En(){var e,t,n=null,r=$();return Y("class"),Q("extends")||X("{")||(e=Nt()),Q("extends")&&(Y("extends"),t=rr.yieldAllowed,rr.yieldAllowed=!1,n=Tt(),rr.yieldAllowed=t),B(r,tr.createClassExpression(e,n,_n()))}function An(){var e,t,n=null,r=$();return Y("class"),e=Nt(),Q("extends")&&(Y("extends"),t=rr.yieldAllowed,rr.yieldAllowed=!1,n=Tt(),rr.yieldAllowed=t),B(r,tr.createClassDeclaration(e,n,_n()))}function Ln(){if(nr.type===Wn.Keyword)switch(nr.value){case"const":case"let":return Ft(nr.value);case"function":return yn();case"export":return V({},Un.IllegalExportDeclaration),Bt();case"import":return V({},Un.IllegalImportDeclaration),Kt();default:return hn()}return nr.type!==Wn.EOF?hn():void 0}function In(){if(ir.isModule&&nr.type===Wn.Keyword)switch(nr.value){case"export":return Bt();case"import":return Kt()}return Ln()}function Pn(){for(var e,t,n,r,i=[];er>Qn&&(t=nr,t.type===Wn.StringLiteral)&&(e=In(),i.push(e),e.expression.type===Bn.Literal);)n=Yn.slice(t.range[0]+1,t.range[1]-1),"use strict"===n?(Xn=!0,r&&V(r,Un.StrictOctalLiteral)):!r&&t.octal&&(r=t);for(;er>Qn&&(e=In(),"undefined"!=typeof e);)i.push(e);return i}function Tn(){var e,t=$();return Xn=!!ir.isModule,F(),e=Pn(),B(t,tr.createProgram(e))}function Mn(){var e,t,n,r,i;return v(),e={start:{line:Jn,column:Qn-Zn}},t=ir.advance(),e.end={line:Jn,column:Qn-Zn},t.type!==Wn.EOF&&(n=[t.range[0],t.range[1]],r=Yn.slice(t.range[0],t.range[1]),i={type:$n[t.type],value:r,range:n,loc:e},t.regex&&(i.regex={pattern:t.regex.pattern,flags:t.regex.flags}),ir.tokens.push(i)),t}function On(){var e,t,n,r;return v(),e=Qn,t={start:{line:Jn,column:Qn-Zn}},n=ir.scanRegExp(),t.end={line:Jn,column:Qn-Zn},ir.tokenize||(ir.tokens.length>0&&(r=ir.tokens[ir.tokens.length-1],r.range[0]===e&&"Punctuator"===r.type&&("/"===r.value||"/="===r.value)&&ir.tokens.pop()),ir.tokens.push({type:"RegularExpression",value:n.literal,regex:n.regex,range:[e,Qn],loc:t})),n}function zn(){var e,t,n,r=[];for(e=0;e<ir.tokens.length;++e)t=ir.tokens[e],n={type:t.type,value:t.value},t.regex&&(n.regex={pattern:t.regex.pattern,flags:t.regex.flags}),ir.range&&(n.range=t.range),ir.loc&&(n.loc=t.loc),r.push(n);ir.tokens=r}function Nn(){"undefined"!=typeof ir.tokens&&(ir.advance=R,ir.scanRegExp=z,R=Mn,z=On)}function Dn(){"function"==typeof ir.scanRegExp&&(R=ir.advance,z=ir.scanRegExp)}function Rn(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}function jn(e,t){var r,i,o;r=String,"string"==typeof e||e instanceof String||(e=r(e)),tr=Gn,Yn=e,Qn=0,Jn=Yn.length>0?1:0,Zn=0,er=Yn.length,nr=null,rr={allowKeyword:!0,allowIn:!0,labelSet:new n,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},ir={},t=t||{},t.tokens=!0,ir.tokens=[],ir.tokenize=!0,ir.openParenToken=-1,ir.openCurlyToken=-1,ir.range="boolean"==typeof t.range&&t.range,ir.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(ir.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(ir.errors=[]),Nn();try{if(F(),nr.type===Wn.EOF)return ir.tokens;for(i=j();nr.type!==Wn.EOF;)try{i=j()}catch(s){if(i=nr,ir.errors){ir.errors.push(s);break}throw s}zn(),o=ir.tokens,"undefined"!=typeof ir.comments&&(o.comments=ir.comments),"undefined"!=typeof ir.errors&&(o.errors=ir.errors)}catch(a){throw a}finally{Dn(),ir={}}return o}function Fn(e,t){var r,i;i=String,"string"==typeof e||e instanceof String||(e=i(e)),tr=Gn,Yn=e,Qn=0,Jn=Yn.length>0?1:0,Zn=0,er=Yn.length,nr=null,rr={allowKeyword:!1,allowIn:!0,labelSet:new n,parenthesizedCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1,yieldAllowed:!1},ir={},"undefined"!=typeof t&&(ir.range="boolean"==typeof t.range&&t.range,ir.loc="boolean"==typeof t.loc&&t.loc,ir.attachComment="boolean"==typeof t.attachComment&&t.attachComment,ir.loc&&null!==t.source&&void 0!==t.source&&(tr=Rn(tr,{postProcess:function(e){return e.loc.source=i(t.source),e}})),"module"===t.sourceType&&(ir.isModule=!0),"boolean"==typeof t.tokens&&t.tokens&&(ir.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(ir.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(ir.errors=[]),ir.attachComment&&(ir.range=!0,ir.comments=[],ir.bottomRightStack=[],ir.trailingComments=[],ir.leadingComments=[])),Nn();try{r=Tn(),"undefined"!=typeof ir.comments&&(r.comments=ir.comments),"undefined"!=typeof ir.tokens&&(zn(),r.tokens=ir.tokens),"undefined"!=typeof ir.errors&&(r.errors=ir.errors)}catch(o){throw o}finally{Dn(),ir={}}return r}var Wn,$n,Hn,Bn,qn,Un,Vn,Gn,Kn,Yn,Xn,Qn,Jn,Zn,er,tr,nr,rr,ir;Wn={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10},$n={},$n[Wn.BooleanLiteral]="Boolean",$n[Wn.EOF]="<end>",$n[Wn.Identifier]="Identifier",$n[Wn.Keyword]="Keyword",$n[Wn.NullLiteral]="Null",$n[Wn.NumericLiteral]="Numeric",$n[Wn.Punctuator]="Punctuator",$n[Wn.StringLiteral]="String",$n[Wn.RegularExpression]="RegularExpression",Hn=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],Bn={ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AssignmentExpression:"AssignmentExpression",BinaryExpression:"BinaryExpression",BlockStatement:"BlockStatement",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportDeclaration:"ExportDeclaration",ExportBatchSpecifier:"ExportBatchSpecifier",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",ForStatement:"ForStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",LabeledStatement:"LabeledStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},qn={Data:1,Get:2,Set:4},Kn={"static":"static",prototype:"prototype"},Un={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInFormalsList:"Invalid left-hand side in formals list",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalDuplicateClassProperty:"Illegal duplicate property in class definition",IllegalClassConstructorProperty:"Illegal constructor property in class definition",IllegalReturn:"Illegal return statement",IllegalYield:"Illegal yield expression",IllegalSpread:"Illegal spread element",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",ParameterAfterRestParameter:"Rest parameter must be final parameter of an argument list",DefaultRestParameter:"Rest parameter can not have a default value",ElementAfterSpreadElement:"Spread must be the final element of an element list",ObjectPatternAsRestParameter:"Invalid rest parameter",ObjectPatternAsSpread:"Invalid spread argument",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",MissingFromClause:"Missing from clause",NoAsAfterImportNamespace:"Missing as after import *",InvalidModuleSpecifier:"Invalid module specifier",IllegalImportDeclaration:"Illegal import declaration",IllegalExportDeclaration:"Illegal export declaration",NoUnintializedConst:"Const must be initialized",ComprehensionRequiresBlock:"Comprehension must have at least one block",ComprehensionError:"Comprehension Error",EachNotAllowed:"Each is not supported"},Vn={NonAsciiIdentifierStart:new RegExp("[\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]"),NonAsciiIdentifierPart:new RegExp("[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\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\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\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\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\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-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\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-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]")},n.prototype.get=function(e){return e="$"+e,this.$data[e]},n.prototype.set=function(e,t){return e="$"+e,this.$data[e]=t,this},n.prototype.has=function(e){return e="$"+e,Object.prototype.hasOwnProperty.call(this.$data,e)},n.prototype.delete=function(e){return e="$"+e,delete this.$data[e]},Gn={name:"SyntaxTree",postProcess:function(e){return e},createArrayExpression:function(e){return{type:Bn.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:Bn.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){var r="||"===e||"&&"===e?Bn.LogicalExpression:Bn.BinaryExpression;return{type:r,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:Bn.BlockStatement,body:e}},createBreakStatement:function(e){return{type:Bn.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:Bn.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:Bn.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:Bn.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:Bn.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:Bn.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:Bn.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:Bn.EmptyStatement}},createExpressionStatement:function(e){return{type:Bn.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:Bn.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:Bn.ForInStatement,left:e,right:t,body:n,each:!1}},createForOfStatement:function(e,t,n){return{type:Bn.ForOfStatement,left:e,right:t,body:n}},createFunctionDeclaration:function(e,t,n,r,i,o,s){return{type:Bn.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:i,generator:o,expression:s}},createFunctionExpression:function(e,t,n,r,i,o,s){return{type:Bn.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:i,generator:o,expression:s}},createIdentifier:function(e){return{type:Bn.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:Bn.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:Bn.LabeledStatement,label:e,body:t}},createLiteral:function(e){var t={type:Bn.Literal,value:e.value,raw:Yn.slice(e.range[0],e.range[1])};return e.regex&&(t.regex=e.regex),t},createMemberExpression:function(e,t,n){return{type:Bn.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:Bn.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:Bn.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:Bn.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:Bn.Program,body:e}},createProperty:function(e,t,n,r,i,o){return{type:Bn.Property,key:t,value:n,kind:e,method:r,shorthand:i,computed:o}},createReturnStatement:function(e){return{type:Bn.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:Bn.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:Bn.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:Bn.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:Bn.ThisExpression}},createThrowStatement:function(e){return{type:Bn.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:Bn.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:Bn.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:Bn.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:Bn.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:Bn.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:Bn.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:Bn.WithStatement,object:e,body:t}},createTemplateElement:function(e,t){return{type:Bn.TemplateElement,value:e,tail:t}},createTemplateLiteral:function(e,t){return{type:Bn.TemplateLiteral,quasis:e,expressions:t}},createSpreadElement:function(e){return{type:Bn.SpreadElement,argument:e}},createTaggedTemplateExpression:function(e,t){return{type:Bn.TaggedTemplateExpression,tag:e,quasi:t}},createArrowFunctionExpression:function(e,t,n,r,i){return{type:Bn.ArrowFunctionExpression,id:null,params:e,defaults:t,body:n,rest:r,generator:!1,expression:i}},createMethodDefinition:function(e,t,n,r,i){return{type:Bn.MethodDefinition,key:n,value:r,kind:t,"static":e===Kn.static,computed:i}},createClassBody:function(e){return{type:Bn.ClassBody,body:e}},createClassExpression:function(e,t,n){return{type:Bn.ClassExpression,id:e,superClass:t,body:n}},createClassDeclaration:function(e,t,n){return{type:Bn.ClassDeclaration,id:e,superClass:t,body:n}},createModuleSpecifier:function(e){return{type:Bn.ModuleSpecifier,value:e.value,raw:Yn.slice(e.range[0],e.range[1])}},createExportSpecifier:function(e,t){return{type:Bn.ExportSpecifier,id:e,name:t}},createExportBatchSpecifier:function(){return{type:Bn.ExportBatchSpecifier}},createImportDefaultSpecifier:function(e){return{type:Bn.ImportDefaultSpecifier,id:e}},createImportNamespaceSpecifier:function(e){return{type:Bn.ImportNamespaceSpecifier,id:e}},createExportDeclaration:function(e,t,n,r){return{type:Bn.ExportDeclaration,"default":!!e,declaration:t,specifiers:n,source:r}},createImportSpecifier:function(e,t){return{type:Bn.ImportSpecifier,id:e,name:t}},createImportDeclaration:function(e,t){return{type:Bn.ImportDeclaration,specifiers:e,source:t}},createYieldExpression:function(e,t){return{type:Bn.YieldExpression,argument:e,delegate:t}},createComprehensionExpression:function(e,t,n){return{type:Bn.ComprehensionExpression,filter:e,blocks:t,body:n}}},e.version="1.1.0-dev-harmony",e.tokenize=jn,e.parse=Fn,e.Syntax=function(){var e,t={};"function"==typeof Object.create&&(t=Object.create(null));for(e in Bn)Bn.hasOwnProperty(e)&&(t[e]=Bn[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}),function(e){function t(e,n){if({}.hasOwnProperty.call(t.cache,e))return t.cache[e];var r=t.resolve(e);if(!r)throw new Error("Failed to resolve module "+e);var i={id:e,require:t,filename:e,exports:{},loaded:!1,parent:n,children:[]};n&&n.children.push(i);var o=e.slice(0,e.lastIndexOf("/")+1);return t.cache[e]=i.exports,r.call(i.exports,i,i.exports,o,e),i.loaded=!0,t.cache[e]=i.exports}t.modules={},t.cache={},t.resolve=function(e){return{}.hasOwnProperty.call(t.modules,e)?t.modules[e]:void 0},t.define=function(e,n){t.modules[e]=n};var n=function(t){return t="/",{title:"browser",version:"v0.10.26",browser:!0,env:{},argv:[],nextTick:e.setImmediate||function(e){setTimeout(e,0)},cwd:function(){return t},chdir:function(e){t=e}}}();t.define("/tools/entry-point.js",function(n){!function(){"use strict";e.escodegen=t("/escodegen.js",n),escodegen.browser=!0}()}),t.define("/escodegen.js",function(n,r){!function(i,o,s,a,l,c,u,f,p,h,d,m,g,v,b,y,x,w,S,C,k,_,E,A,L){"use strict";function I(e){switch(e.type){case i.AssignmentExpression:case i.ArrayExpression:case i.ArrayPattern:case i.BinaryExpression:case i.CallExpression:case i.ConditionalExpression:case i.ClassExpression:case i.ExportBatchSpecifier:case i.ExportSpecifier:case i.FunctionExpression:case i.Identifier:case i.ImportSpecifier:case i.Literal:case i.LogicalExpression:case i.MemberExpression:case i.MethodDefinition:case i.NewExpression:case i.ObjectExpression:case i.ObjectPattern:case i.Property:case i.SequenceExpression:case i.ThisExpression:case i.UnaryExpression:case i.UpdateExpression:case i.YieldExpression:return!0}return!1}function P(e){switch(e.type){case i.BlockStatement:case i.BreakStatement:case i.CatchClause:case i.ContinueStatement:case i.ClassDeclaration:case i.ClassBody:case i.DirectiveStatement:case i.DoWhileStatement:case i.DebuggerStatement:case i.EmptyStatement:case i.ExpressionStatement:case i.ForStatement:case i.ForInStatement:case i.ForOfStatement:case i.FunctionDeclaration:case i.IfStatement:case i.LabeledStatement:case i.ModuleDeclaration:case i.Program:case i.ReturnStatement:case i.SwitchStatement:case i.SwitchCase:case i.ThrowStatement:case i.TryStatement:case i.VariableDeclaration:case i.VariableDeclarator:case i.WhileStatement:case i.WithStatement:return!0 | ||
+ | }return!1}function T(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:" ",base:0,adjustMultilineComment:!1},newline:"\n",space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null}}function M(e,t){var n="";for(t|=0;t>0;t>>>=1,e+=e)1&t&&(n+=e);return n}function O(e){return/[\r\n]/g.test(e)}function z(e){var t=e.length;return t&&c.code.isLineTerminator(e.charCodeAt(t-1))}function N(e,t){function n(e){return"object"==typeof e&&e instanceof Object&&!(e instanceof RegExp)}var r,i;for(r in t)t.hasOwnProperty(r)&&(i=t[r],n(i)?n(e[r])?N(e[r],i):e[r]=N({},i):e[r]=i);return e}function D(e){var t,n,r,i,o;if(e!==e)throw new Error("Numeric literal whose value is NaN");if(0>e||0===e&&0>1/e)throw new Error("Numeric literal whose value is negative");if(e===1/0)return h?"null":d?"1e400":"1e+400";if(t=""+e,!d||t.length<3)return t;for(n=t.indexOf("."),!h&&48===t.charCodeAt(0)&&1===n&&(n=0,t=t.slice(1)),r=t,t=t.replace("e+","e"),i=0,(o=r.indexOf("e"))>0&&(i=+r.slice(o+1),r=r.slice(0,o)),n>=0&&(i-=r.length-n-1,r=+(r.slice(0,n)+r.slice(n+1))+""),o=0;48===r.charCodeAt(r.length+o-1);)--o;return 0!==o&&(i-=o,r=r.slice(0,o)),0!==i&&(r+="e"+i),(r.length<t.length||m&&e>1e12&&Math.floor(e)===e&&(r="0x"+e.toString(16)).length<t.length)&&+r===e&&(t=r),t}function R(e,t){return 8232===(-2&e)?(t?"u":"\\u")+(8232===e?"2028":"2029"):10===e||13===e?(t?"":"\\")+(10===e?"n":"r"):String.fromCharCode(e)}function j(e){var t,n,r,i,o,s,a,l;if(n=e.toString(),e.source){if(t=n.match(/\/([^/]*)$/),!t)return n;for(r=t[1],n="",a=!1,l=!1,i=0,o=e.source.length;o>i;++i)s=e.source.charCodeAt(i),l?(n+=R(s,l),l=!1):(a?93===s&&(a=!1):47===s?n+="\\":91===s&&(a=!0),n+=R(s,l),l=92===s);return"/"+n+"/"+r}return n}function F(e,t){var n,r="\\";switch(e){case 8:r+="b";break;case 12:r+="f";break;case 9:r+="t";break;default:n=e.toString(16).toUpperCase(),r+=h||e>255?"u"+"0000".slice(n.length)+n:0!==e||c.code.isDecimalDigit(t)?11===e?"x0B":"x"+"00".slice(n.length)+n:"0"}return r}function W(e){var t="\\";switch(e){case 92:t+="\\";break;case 10:t+="n";break;case 13:t+="r";break;case 8232:t+="u2028";break;case 8233:t+="u2029";break;default:throw new Error("Incorrectly classified character")}return t}function $(e){var t,n,r,i;for(i="double"===g?'"':"'",t=0,n=e.length;n>t;++t){if(r=e.charCodeAt(t),39===r){i='"';break}if(34===r){i="'";break}92===r&&++t}return i+e+i}function H(e){var t,n,r,i,o,s="",a=0,l=0;for(t=0,n=e.length;n>t;++t){if(r=e.charCodeAt(t),39===r)++a;else if(34===r)++l;else if(47===r&&h)s+="\\";else{if(c.code.isLineTerminator(r)||92===r){s+=W(r);continue}if(h&&32>r||!(h||v||r>=32&&126>=r)){s+=F(r,e.charCodeAt(t+1));continue}}s+=String.fromCharCode(r)}if(i=!("double"===g||"auto"===g&&a>l),o=i?"'":'"',!(i?a:l))return o+s+o;for(e=s,s=o,t=0,n=e.length;n>t;++t)r=e.charCodeAt(t),(39===r&&i||34===r&&!i)&&(s+="\\"),s+=String.fromCharCode(r);return s+o}function B(e){var t,n,r,i="";for(t=0,n=e.length;n>t;++t)r=e[t],i+=u(r)?B(r):r;return i}function q(e,t){if(!E)return u(e)?B(e):e;if(null==t){if(e instanceof a)return e;t={}}return null==t.loc?new a(null,null,E,e,t.name||null):new a(t.loc.start.line,t.loc.start.column,E===!0?t.loc.source||null:E,e,t.name||null)}function U(){return y?y:" "}function V(e,t){var n,r,i,o;return n=q(e).toString(),0===n.length?[t]:(r=q(t).toString(),0===r.length?[e]:(i=n.charCodeAt(n.length-1),o=r.charCodeAt(0),(43===i||45===i)&&i===o||c.code.isIdentifierPart(i)&&c.code.isIdentifierPart(o)||47===i&&105===o?[e,U(),t]:c.code.isWhiteSpace(i)||c.code.isLineTerminator(i)||c.code.isWhiteSpace(o)||c.code.isLineTerminator(o)?[e,t]:[e,y,t]))}function G(e){return[f,e]}function K(e){var t,n;return t=f,f+=p,n=e.call(this,f),f=t,n}function Y(e){var t;for(t=e.length-1;t>=0&&!c.code.isLineTerminator(e.charCodeAt(t));--t);return e.length-1-t}function X(e,t){var n,r,i,o,s,a,l,u;for(n=e.split(/\r\n|[\r\n]/),a=Number.MAX_VALUE,r=1,i=n.length;i>r;++r){for(o=n[r],s=0;s<o.length&&c.code.isWhiteSpace(o.charCodeAt(s));)++s;a>s&&(a=s)}for(void 0!==t?(l=f,"*"===n[1][a]&&(t+=" "),f=t):(1&a&&--a,l=f),r=1,i=n.length;i>r;++r)u=q(G(n[r].slice(a))),n[r]=E?u.join(""):u;return f=l,n.join("\n")}function Q(e,t){return"Line"===e.type?z(e.value)?"//"+e.value:"//"+e.value+"\n":k.format.indent.adjustMultilineComment&&/[\n\r]/.test(e.value)?X("/*"+e.value+"*/",t):"/*"+e.value+"*/"}function J(e,t){var n,r,o,s,a,l,c;if(e.leadingComments&&e.leadingComments.length>0){for(s=t,o=e.leadingComments[0],t=[],S&&e.type===i.Program&&0===e.body.length&&t.push("\n"),t.push(Q(o)),z(q(t).toString())||t.push("\n"),n=1,r=e.leadingComments.length;r>n;++n)o=e.leadingComments[n],c=[Q(o)],z(q(c).toString())||c.push("\n"),t.push(G(c));t.push(G(s))}if(e.trailingComments)for(a=!z(q(t).toString()),l=M(" ",Y(q([f,t,p]).toString())),n=0,r=e.trailingComments.length;r>n;++n)o=e.trailingComments[n],a?(t=0===n?[t,p]:[t,l],t.push(Q(o,l))):t=[t,G(Q(o))],n!==r-1&&!z(q(t).toString())&&(t=[t,"\n"]);return t}function Z(e,t,n){return n>t?["(",e,")"]:e}function et(e,t,n){var r,o;return o=!k.comment||!e.leadingComments,e.type===i.BlockStatement&&o?[y,gt(e,{functionBody:n})]:e.type===i.EmptyStatement&&o?";":(K(function(){r=[b,G(gt(e,{semicolonOptional:t,functionBody:n}))]}),r)}function tt(e,t){var n=z(q(t).toString());return e.type!==i.BlockStatement||k.comment&&e.leadingComments||n?n?[t,f]:[t,b,f]:[t,y]}function nt(e){var t,n,r;for(r=e.split(/\r\n|\n/),t=1,n=r.length;n>t;t++)r[t]=b+f+r[t];return r}function rt(e,t){var n,r,i;return n=e[k.verbatim],"string"==typeof n?r=Z(nt(n),o.Sequence,t.precedence):(r=nt(n.content),i=null!=n.precedence?n.precedence:o.Sequence,r=Z(r,i,t.precedence)),q(r,e)}function it(e){return q(e.name,e)}function ot(e,t){var n;return n=e.type===i.Identifier?it(e):dt(e,{precedence:t.precedence,allowIn:t.allowIn,allowCall:!0})}function st(e){var t,n,r,s;if(s=!1,e.type!==i.ArrowFunctionExpression||e.rest||e.defaults&&0!==e.defaults.length||1!==e.params.length||e.params[0].type!==i.Identifier){for(r=["("],e.defaults&&(s=!0),t=0,n=e.params.length;n>t;++t)r.push(s&&e.defaults[t]?ht(e.params[t],e.defaults[t],"=",{precedence:o.Assignment,allowIn:!0,allowCall:!0}):ot(e.params[t],{precedence:o.Assignment,allowIn:!0,allowCall:!0})),n>t+1&&r.push(","+y);e.rest&&(e.params.length&&r.push(","+y),r.push("..."),r.push(it(e.rest,{precedence:o.Assignment,allowIn:!0,allowCall:!0}))),r.push(")")}else r=[it(e.params[0])];return r}function at(e){var t,n;return t=st(e),e.type===i.ArrowFunctionExpression&&(t.push(y),t.push("=>")),e.expression?(t.push(y),n=dt(e.body,{precedence:o.Assignment,allowIn:!0,allowCall:!0}),"{"===n.toString().charAt(0)&&(n=["(",n,")"]),t.push(n)):t.push(et(e.body,!1,!0)),t}function lt(e,t,n){var r=["for"+y+"("];return K(function(){t.left.type===i.VariableDeclaration?K(function(){r.push(t.left.kind+U()),r.push(gt(t.left.declarations[0],{allowIn:!1}))}):r.push(dt(t.left,{precedence:o.Call,allowIn:!0,allowCall:!0})),r=V(r,e),r=[V(r,dt(t.right,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),")"]}),r.push(et(t.body,n)),r}function ct(e,t,n){function r(){for(a=e.declarations[0],k.comment&&a.leadingComments?(i.push("\n"),i.push(G(gt(a,{allowIn:n})))):(i.push(U()),i.push(gt(a,{allowIn:n}))),o=1,s=e.declarations.length;s>o;++o)a=e.declarations[o],k.comment&&a.leadingComments?(i.push(","+b),i.push(G(gt(a,{allowIn:n})))):(i.push(","+y),i.push(gt(a,{allowIn:n})))}var i,o,s,a;return i=[e.kind],e.declarations.length>1?K(r):r(),i.push(t),i}function ut(e){var t=["{",b];return K(function(n){var r,s;for(r=0,s=e.body.length;s>r;++r)t.push(n),t.push(dt(e.body[r],{precedence:o.Sequence,allowIn:!0,allowCall:!0,type:i.Property})),s>r+1&&t.push(b)}),z(q(t).toString())||t.push(b),t.push(f),t.push("}"),t}function ft(e){var t;if(e.hasOwnProperty("raw")&&_&&k.raw)try{if(t=_(e.raw).body[0].expression,t.type===i.Literal&&t.value===e.value)return e.raw}catch(e){}return null===e.value?"null":"string"==typeof e.value?H(e.value):"number"==typeof e.value?D(e.value):"boolean"==typeof e.value?e.value?"true":"false":j(e.value)}function pt(e,t,n){var r=[];return t&&r.push("["),r.push(dt(e,n)),t&&r.push("]"),r}function ht(e,t,n,r){var i,s;return s=r.precedence,i=r.allowIn||o.Assignment<s,Z([dt(e,{precedence:o.Call,allowIn:i,allowCall:!0}),y+n+y,dt(t,{precedence:o.Assignment,allowIn:i,allowCall:!0})],o.Assignment,s)}function dt(e,t){var n,r,a,l,u,p,h,d,m,g,v,w,S,C,_,E;if(r=t.precedence,w=t.allowIn,S=t.allowCall,a=e.type||t.type,k.verbatim&&e.hasOwnProperty(k.verbatim))return rt(e,t);switch(a){case i.SequenceExpression:for(n=[],w|=o.Sequence<r,u=0,p=e.expressions.length;p>u;++u)n.push(dt(e.expressions[u],{precedence:o.Assignment,allowIn:w,allowCall:!0})),p>u+1&&n.push(","+y);n=Z(n,o.Sequence,r);break;case i.AssignmentExpression:n=ht(e.left,e.right,e.operator,t);break;case i.ArrowFunctionExpression:w|=o.ArrowFunction<r,n=Z(at(e),o.ArrowFunction,r);break;case i.ConditionalExpression:w|=o.Conditional<r,n=Z([dt(e.test,{precedence:o.LogicalOR,allowIn:w,allowCall:!0}),y+"?"+y,dt(e.consequent,{precedence:o.Assignment,allowIn:w,allowCall:!0}),y+":"+y,dt(e.alternate,{precedence:o.Assignment,allowIn:w,allowCall:!0})],o.Conditional,r);break;case i.LogicalExpression:case i.BinaryExpression:l=s[e.operator],w|=r>l,h=dt(e.left,{precedence:l,allowIn:w,allowCall:!0}),g=h.toString(),n=47===g.charCodeAt(g.length-1)&&c.code.isIdentifierPart(e.operator.charCodeAt(0))?[h,U(),e.operator]:V(h,e.operator),h=dt(e.right,{precedence:l+1,allowIn:w,allowCall:!0}),"/"===e.operator&&"/"===h.toString().charAt(0)||"<"===e.operator.slice(-1)&&"!--"===h.toString().slice(0,3)?(n.push(U()),n.push(h)):n=V(n,h),n="in"!==e.operator||w?Z(n,l,r):["(",n,")"];break;case i.CallExpression:for(n=[dt(e.callee,{precedence:o.Call,allowIn:!0,allowCall:!0,allowUnparenthesizedNew:!1})],n.push("("),u=0,p=e.arguments.length;p>u;++u)n.push(dt(e.arguments[u],{precedence:o.Assignment,allowIn:!0,allowCall:!0})),p>u+1&&n.push(","+y);n.push(")"),n=S?Z(n,o.Call,r):["(",n,")"];break;case i.NewExpression:if(p=e.arguments.length,C=void 0===t.allowUnparenthesizedNew||t.allowUnparenthesizedNew,n=V("new",dt(e.callee,{precedence:o.New,allowIn:!0,allowCall:!1,allowUnparenthesizedNew:C&&!x&&0===p})),!C||x||p>0){for(n.push("("),u=0;p>u;++u)n.push(dt(e.arguments[u],{precedence:o.Assignment,allowIn:!0,allowCall:!0})),p>u+1&&n.push(","+y);n.push(")")}n=Z(n,o.New,r);break;case i.MemberExpression:n=[dt(e.object,{precedence:o.Call,allowIn:!0,allowCall:S,allowUnparenthesizedNew:!1})],e.computed?(n.push("["),n.push(dt(e.property,{precedence:o.Sequence,allowIn:!0,allowCall:S})),n.push("]")):(e.object.type===i.Literal&&"number"==typeof e.object.value&&(h=q(n).toString(),h.indexOf(".")<0&&!/[eExX]/.test(h)&&c.code.isDecimalDigit(h.charCodeAt(h.length-1))&&!(h.length>=2&&48===h.charCodeAt(0))&&n.push(".")),n.push("."),n.push(it(e.property))),n=Z(n,o.Member,r);break;case i.UnaryExpression:h=dt(e.argument,{precedence:o.Unary,allowIn:!0,allowCall:!0}),""===y?n=V(e.operator,h):(n=[e.operator],e.operator.length>2?n=V(n,h):(g=q(n).toString(),m=g.charCodeAt(g.length-1),v=h.toString().charCodeAt(0),(43===m||45===m)&&m===v||c.code.isIdentifierPart(m)&&c.code.isIdentifierPart(v)?(n.push(U()),n.push(h)):n.push(h))),n=Z(n,o.Unary,r);break;case i.YieldExpression:n=e.delegate?"yield*":"yield",e.argument&&(n=V(n,dt(e.argument,{precedence:o.Yield,allowIn:!0,allowCall:!0}))),n=Z(n,o.Yield,r);break;case i.UpdateExpression:n=e.prefix?Z([e.operator,dt(e.argument,{precedence:o.Unary,allowIn:!0,allowCall:!0})],o.Unary,r):Z([dt(e.argument,{precedence:o.Postfix,allowIn:!0,allowCall:!0}),e.operator],o.Postfix,r);break;case i.FunctionExpression:E=e.generator&&!k.moz.starlessGenerator,n=E?"function*":"function",n=e.id?[n,E?y:U(),it(e.id),at(e)]:[n+y,at(e)];break;case i.ExportBatchSpecifier:n="*";break;case i.ArrayPattern:case i.ArrayExpression:if(!e.elements.length){n="[]";break}d=e.elements.length>1,n=["[",d?b:""],K(function(t){for(u=0,p=e.elements.length;p>u;++u)e.elements[u]?(n.push(d?t:""),n.push(dt(e.elements[u],{precedence:o.Assignment,allowIn:!0,allowCall:!0}))):(d&&n.push(t),u+1===p&&n.push(",")),p>u+1&&n.push(","+(d?b:y))}),d&&!z(q(n).toString())&&n.push(b),n.push(d?f:""),n.push("]");break;case i.ClassExpression:n=["class"],e.id&&(n=V(n,dt(e.id,{allowIn:!0,allowCall:!0}))),e.superClass&&(h=V("extends",dt(e.superClass,{precedence:o.Assignment,allowIn:!0,allowCall:!0})),n=V(n,h)),n.push(y),n.push(gt(e.body,{semicolonOptional:!0,directiveContext:!1}));break;case i.MethodDefinition:n=e["static"]?["static"+y]:[],"get"===e.kind||"set"===e.kind?n=V(n,[V(e.kind,pt(e.key,e.computed,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),at(e.value)]):(h=[pt(e.key,e.computed,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),at(e.value)],e.value.generator?(n.push("*"),n.push(h)):n=V(n,h));break;case i.Property:"get"===e.kind||"set"===e.kind?n=[e.kind,U(),pt(e.key,e.computed,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),at(e.value)]:e.shorthand?n=pt(e.key,e.computed,{precedence:o.Sequence,allowIn:!0,allowCall:!0}):e.method?(n=[],e.value.generator&&n.push("*"),n.push(pt(e.key,e.computed,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),n.push(at(e.value))):n=[pt(e.key,e.computed,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),":"+y,dt(e.value,{precedence:o.Assignment,allowIn:!0,allowCall:!0})];break;case i.ObjectExpression:if(!e.properties.length){n="{}";break}if(d=e.properties.length>1,K(function(){h=dt(e.properties[0],{precedence:o.Sequence,allowIn:!0,allowCall:!0,type:i.Property})}),!d&&!O(q(h).toString())){n=["{",y,h,y,"}"];break}K(function(t){if(n=["{",b,t,h],d)for(n.push(","+b),u=1,p=e.properties.length;p>u;++u)n.push(t),n.push(dt(e.properties[u],{precedence:o.Sequence,allowIn:!0,allowCall:!0,type:i.Property})),p>u+1&&n.push(","+b)}),z(q(n).toString())||n.push(b),n.push(f),n.push("}");break;case i.ObjectPattern:if(!e.properties.length){n="{}";break}if(d=!1,1===e.properties.length)_=e.properties[0],_.value.type!==i.Identifier&&(d=!0);else for(u=0,p=e.properties.length;p>u;++u)if(_=e.properties[u],!_.shorthand){d=!0;break}n=["{",d?b:""],K(function(t){for(u=0,p=e.properties.length;p>u;++u)n.push(d?t:""),n.push(dt(e.properties[u],{precedence:o.Sequence,allowIn:!0,allowCall:!0})),p>u+1&&n.push(","+(d?b:y))}),d&&!z(q(n).toString())&&n.push(b),n.push(d?f:""),n.push("}");break;case i.ThisExpression:n="this";break;case i.Identifier:n=it(e);break;case i.ImportSpecifier:case i.ExportSpecifier:n=[e.id.name],e.name&&n.push(U()+"as"+U()+e.name.name);break;case i.Literal:n=ft(e);break;case i.GeneratorExpression:case i.ComprehensionExpression:n=a===i.GeneratorExpression?["("]:["["],k.moz.comprehensionExpressionStartsWithAssignment&&(h=dt(e.body,{precedence:o.Assignment,allowIn:!0,allowCall:!0}),n.push(h)),e.blocks&&K(function(){for(u=0,p=e.blocks.length;p>u;++u)h=dt(e.blocks[u],{precedence:o.Sequence,allowIn:!0,allowCall:!0}),u>0||k.moz.comprehensionExpressionStartsWithAssignment?n=V(n,h):n.push(h)}),e.filter&&(n=V(n,"if"+y),h=dt(e.filter,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),n=V(n,["(",h,")"])),k.moz.comprehensionExpressionStartsWithAssignment||(h=dt(e.body,{precedence:o.Assignment,allowIn:!0,allowCall:!0}),n=V(n,h)),n.push(a===i.GeneratorExpression?")":"]");break;case i.ComprehensionBlock:h=e.left.type===i.VariableDeclaration?[e.left.kind,U(),gt(e.left.declarations[0],{allowIn:!1})]:dt(e.left,{precedence:o.Call,allowIn:!0,allowCall:!0}),h=V(h,e.of?"of":"in"),h=V(h,dt(e.right,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),n=["for"+y+"(",h,")"];break;case i.SpreadElement:n=["...",dt(e.argument,{precedence:o.Assignment,allowIn:!0,allowCall:!0})];break;case i.TaggedTemplateExpression:n=[dt(e.tag,{precedence:o.Call,allowIn:!0,allowCall:S,allowUnparenthesizedNew:!1}),dt(e.quasi,{precedence:o.Primary})],n=Z(n,o.TaggedTemplate,r);break;case i.TemplateElement:n=e.value.raw;break;case i.TemplateLiteral:for(n=["`"],u=0,p=e.quasis.length;p>u;++u)n.push(dt(e.quasis[u],{precedence:o.Primary,allowIn:!0,allowCall:!0})),p>u+1&&(n.push("${"+y),n.push(dt(e.expressions[u],{precedence:o.Sequence,allowIn:!0,allowCall:!0})),n.push(y+"}"));n.push("`");break;default:throw new Error("Unknown expression type: "+e.type)}return k.comment&&(n=J(e,n)),q(n,e)}function mt(e,t){var n,r;return 0===e.specifiers.length?["import",y,ft(e.source),t]:(n=["import"],r=0,e.specifiers[0]["default"]&&(n=V(n,[e.specifiers[0].id.name]),++r),e.specifiers[r]&&(0!==r&&n.push(","),n.push(y+"{"),e.specifiers.length-r===1?(n.push(y),n.push(dt(e.specifiers[r],{precedence:o.Sequence,allowIn:!0,allowCall:!0})),n.push(y+"}"+y)):(K(function(t){var i,s;for(n.push(b),i=r,s=e.specifiers.length;s>i;++i)n.push(t),n.push(dt(e.specifiers[i],{precedence:o.Sequence,allowIn:!0,allowCall:!0})),s>i+1&&n.push(","+b)}),z(q(n).toString())||n.push(b),n.push(f+"}"+y))),n=V(n,["from"+y,ft(e.source),t]))}function gt(e,t){var n,r,s,a,l,c,p,h,d,m;switch(a=!0,h=";",l=!1,c=!1,t&&(a=void 0===t.allowIn||t.allowIn,!w&&t.semicolonOptional===!0&&(h=""),l=t.functionBody,c=t.directiveContext),e.type){case i.BlockStatement:s=["{",b],K(function(){for(n=0,r=e.body.length;r>n;++n)p=G(gt(e.body[n],{semicolonOptional:n===r-1,directiveContext:l})),s.push(p),z(q(p).toString())||s.push(b)}),s.push(G("}"));break;case i.BreakStatement:s=e.label?"break "+e.label.name+h:"break"+h;break;case i.ContinueStatement:s=e.label?"continue "+e.label.name+h:"continue"+h;break;case i.ClassBody:s=ut(e);break;case i.ClassDeclaration:s=["class "+e.id.name],e.superClass&&(p=V("extends",dt(e.superClass,{precedence:o.Assignment,allowIn:!0,allowCall:!0})),s=V(s,p)),s.push(y),s.push(gt(e.body,{semicolonOptional:!0,directiveContext:!1}));break;case i.DirectiveStatement:s=k.raw&&e.raw?e.raw+h:$(e.directive)+h;break;case i.DoWhileStatement:s=V("do",et(e.body)),s=tt(e.body,s),s=V(s,["while"+y+"(",dt(e.test,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),")"+h]);break;case i.CatchClause:K(function(){var t;s=["catch"+y+"(",dt(e.param,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),")"],e.guard&&(t=dt(e.guard,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),s.splice(2,0," if ",t))}),s.push(et(e.body));break;case i.DebuggerStatement:s="debugger"+h;break;case i.EmptyStatement:s=";";break;case i.ExportDeclaration:if(s=["export"],e["default"]){s=V(s,"default"),s=V(s,dt(e.declaration,{precedence:o.Assignment,allowIn:!0,allowCall:!0})+h);break}if(e.specifiers){0===e.specifiers.length?s=V(s,"{"+y+"}"):e.specifiers[0].type===i.ExportBatchSpecifier?s=V(s,dt(e.specifiers[0],{precedence:o.Sequence,allowIn:!0,allowCall:!0})):(s=V(s,"{"),K(function(t){var n,r;for(s.push(b),n=0,r=e.specifiers.length;r>n;++n)s.push(t),s.push(dt(e.specifiers[n],{precedence:o.Sequence,allowIn:!0,allowCall:!0})),r>n+1&&s.push(","+b)}),z(q(s).toString())||s.push(b),s.push(f+"}")),e.source?s=V(s,["from"+y,ft(e.source),h]):s.push(h);break}e.declaration&&(s=V(s,gt(e.declaration,{semicolonOptional:""===h})));break;case i.ExpressionStatement:s=[dt(e.expression,{precedence:o.Sequence,allowIn:!0,allowCall:!0})],p=q(s).toString(),"{"===p.charAt(0)||"class"===p.slice(0,5)&&" {".indexOf(p.charAt(5))>=0||"function"===p.slice(0,8)&&"* (".indexOf(p.charAt(8))>=0||C&&c&&e.expression.type===i.Literal&&"string"==typeof e.expression.value?s=["(",s,")"+h]:s.push(h);break;case i.ImportDeclaration:s=mt(e,h);break;case i.VariableDeclarator:s=e.init?[dt(e.id,{precedence:o.Assignment,allowIn:a,allowCall:!0}),y,"=",y,dt(e.init,{precedence:o.Assignment,allowIn:a,allowCall:!0})]:ot(e.id,{precedence:o.Assignment,allowIn:a});break;case i.VariableDeclaration:s=ct(e,h,a);break;case i.ThrowStatement:s=[V("throw",dt(e.argument,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),h];break;case i.TryStatement:if(s=["try",et(e.block)],s=tt(e.block,s),e.handlers)for(n=0,r=e.handlers.length;r>n;++n)s=V(s,gt(e.handlers[n])),(e.finalizer||n+1!==r)&&(s=tt(e.handlers[n].body,s));else{for(m=e.guardedHandlers||[],n=0,r=m.length;r>n;++n)s=V(s,gt(m[n])),(e.finalizer||n+1!==r)&&(s=tt(m[n].body,s));if(e.handler)if(u(e.handler))for(n=0,r=e.handler.length;r>n;++n)s=V(s,gt(e.handler[n])),(e.finalizer||n+1!==r)&&(s=tt(e.handler[n].body,s));else s=V(s,gt(e.handler)),e.finalizer&&(s=tt(e.handler.body,s))}e.finalizer&&(s=V(s,["finally",et(e.finalizer)]));break;case i.SwitchStatement:if(K(function(){s=["switch"+y+"(",dt(e.discriminant,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),")"+y+"{"+b]}),e.cases)for(n=0,r=e.cases.length;r>n;++n)p=G(gt(e.cases[n],{semicolonOptional:n===r-1})),s.push(p),z(q(p).toString())||s.push(b);s.push(G("}"));break;case i.SwitchCase:K(function(){for(s=e.test?[V("case",dt(e.test,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),":"]:["default:"],n=0,r=e.consequent.length,r&&e.consequent[0].type===i.BlockStatement&&(p=et(e.consequent[0]),s.push(p),n=1),n!==r&&!z(q(s).toString())&&s.push(b);r>n;++n)p=G(gt(e.consequent[n],{semicolonOptional:n===r-1&&""===h})),s.push(p),n+1!==r&&!z(q(p).toString())&&s.push(b)});break;case i.IfStatement:K(function(){s=["if"+y+"(",dt(e.test,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),")"]}),e.alternate?(s.push(et(e.consequent)),s=tt(e.consequent,s),s=e.alternate.type===i.IfStatement?V(s,["else ",gt(e.alternate,{semicolonOptional:""===h})]):V(s,V("else",et(e.alternate,""===h)))):s.push(et(e.consequent,""===h));break;case i.ForStatement:K(function(){s=["for"+y+"("],e.init?e.init.type===i.VariableDeclaration?s.push(gt(e.init,{allowIn:!1})):(s.push(dt(e.init,{precedence:o.Sequence,allowIn:!1,allowCall:!0})),s.push(";")):s.push(";"),e.test?(s.push(y),s.push(dt(e.test,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),s.push(";")):s.push(";"),e.update?(s.push(y),s.push(dt(e.update,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),s.push(")")):s.push(")")}),s.push(et(e.body,""===h));break;case i.ForInStatement:s=lt("in",e,""===h);break;case i.ForOfStatement:s=lt("of",e,""===h);break;case i.LabeledStatement:s=[e.label.name+":",et(e.body,""===h)];break;case i.ModuleDeclaration:s=["module",U(),e.id.name,U(),"from",y,ft(e.source),h];break;case i.Program:for(r=e.body.length,s=[S&&r>0?"\n":""],n=0;r>n;++n)p=G(gt(e.body[n],{semicolonOptional:!S&&n===r-1,directiveContext:!0})),s.push(p),r>n+1&&!z(q(p).toString())&&s.push(b);break;case i.FunctionDeclaration:d=e.generator&&!k.moz.starlessGenerator,s=[d?"function*":"function",d?y:U(),it(e.id),at(e)];break;case i.ReturnStatement:s=e.argument?[V("return",dt(e.argument,{precedence:o.Sequence,allowIn:!0,allowCall:!0})),h]:["return"+h];break;case i.WhileStatement:K(function(){s=["while"+y+"(",dt(e.test,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),")"]}),s.push(et(e.body,""===h));break;case i.WithStatement:K(function(){s=["with"+y+"(",dt(e.object,{precedence:o.Sequence,allowIn:!0,allowCall:!0}),")"]}),s.push(et(e.body,""===h));break;default:throw new Error("Unknown statement type: "+e.type)}return k.comment&&(s=J(e,s)),p=q(s).toString(),e.type===i.Program&&!S&&""===b&&"\n"===p.charAt(p.length-1)&&(s=E?q(s).replaceRight(/\s+$/,""):p.replace(/\s+$/,"")),q(s,e)}function vt(e){if(P(e))return gt(e);if(I(e))return dt(e,{precedence:o.Sequence,allowIn:!0,allowCall:!0});throw new Error("Unknown node type: "+e.type)}function bt(i,o){var s,l,c=T();return null!=o?("string"==typeof o.indent&&(c.format.indent.style=o.indent),"number"==typeof o.base&&(c.format.indent.base=o.base),o=N(c,o),p=o.format.indent.style,f="string"==typeof o.base?o.base:M(p,o.format.indent.base)):(o=c,p=o.format.indent.style,f=M(p,o.format.indent.base)),h=o.format.json,d=o.format.renumber,m=h?!1:o.format.hexadecimal,g=h?"double":o.format.quotes,v=o.format.escapeless,b=o.format.newline,y=o.format.space,o.format.compact&&(b=y=p=f=""),x=o.format.parentheses,w=o.format.semicolons,S=o.format.safeConcatenation,C=o.directive,_=h?null:o.parse,E=o.sourceMap,k=o,E&&(a=r.browser?e.sourceMap.SourceNode:t("/node_modules/source-map/lib/source-map.js",n).SourceNode),s=vt(i),E?(l=s.toStringWithSourceMap({file:o.file,sourceRoot:o.sourceMapRoot}),o.sourceContent&&l.map.setSourceContent(o.sourceMap,o.sourceContent),o.sourceMapWithCode?l:l.map.toString()):(l={code:s.toString(),map:null},o.sourceMapWithCode?l:l.code)}l=t("/node_modules/estraverse/estraverse.js",n),c=t("/node_modules/esutils/lib/utils.js",n),i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportSpecifier:"ImportSpecifier",ImportDeclaration:"ImportDeclaration",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleDeclaration:"ModuleDeclaration",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Unary:13,Postfix:14,Call:15,New:16,TaggedTemplate:17,Member:18,Primary:19},s={"||":o.LogicalOR,"&&":o.LogicalAND,"|":o.BitwiseOR,"^":o.BitwiseXOR,"&":o.BitwiseAND,"==":o.Equality,"!=":o.Equality,"===":o.Equality,"!==":o.Equality,is:o.Equality,isnt:o.Equality,"<":o.Relational,">":o.Relational,"<=":o.Relational,">=":o.Relational,"in":o.Relational,"instanceof":o.Relational,"<<":o.BitwiseSHIFT,">>":o.BitwiseSHIFT,">>>":o.BitwiseSHIFT,"+":o.Additive,"-":o.Additive,"*":o.Multiplicative,"%":o.Multiplicative,"/":o.Multiplicative},u=Array.isArray,u||(u=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),A={indent:{style:"",base:0},renumber:!0,hexadecimal:!0,quotes:"auto",escapeless:!0,compact:!0,parentheses:!1,semicolons:!1},L=T().format,r.version=t("/package.json",n).version,r.generate=bt,r.attachComments=l.attachComments,r.Precedence=N({},o),r.browser=!1,r.FORMAT_MINIFY=A,r.FORMAT_DEFAULTS=L}()}),t.define("/package.json",function(e){e.exports={name:"escodegen",description:"ECMAScript code generator",homepage:"http://github.com/Constellation/escodegen",main:"escodegen.js",bin:{esgenerate:"./bin/esgenerate.js",escodegen:"./bin/escodegen.js"},version:"1.4.1",engines:{node:">=0.10.0"},maintainers:[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],repository:{type:"git",url:"http://github.com/Constellation/escodegen.git"},dependencies:{estraverse:"^1.5.1",esutils:"^1.1.4",esprima:"^1.2.2"},optionalDependencies:{"source-map":"~0.1.37"},devDependencies:{"esprima-moz":"*",semver:"^3.0.1",bluebird:"^2.2.2","jshint-stylish":"^0.4.0",chai:"^1.9.1","gulp-mocha":"^1.0.0","gulp-eslint":"^0.1.8",gulp:"^3.8.6","bower-registry-client":"^0.2.1","gulp-jshint":"^1.8.0","commonjs-everywhere":"^0.9.7"},licenses:[{type:"BSD",url:"http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD"}],scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",release:"node tools/release.js","build-min":"./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",build:"./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"}}}),t.define("/node_modules/source-map/lib/source-map.js",function(e,n){n.SourceMapGenerator=t("/node_modules/source-map/lib/source-map/source-map-generator.js",e).SourceMapGenerator,n.SourceMapConsumer=t("/node_modules/source-map/lib/source-map/source-map-consumer.js",e).SourceMapConsumer,n.SourceNode=t("/node_modules/source-map/lib/source-map/source-node.js",e).SourceNode}),t.define("/node_modules/source-map/lib/source-map/source-node.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,null!=r&&this.add(r)}var i=e("/node_modules/source-map/lib/source-map/source-map-generator.js",n).SourceMapGenerator,o=e("/node_modules/source-map/lib/source-map/util.js",n),s=/(\r?\n)/,a=/\r\n|[\s\S]/g;r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=n?o.join(n,e.source):e.source;a.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new r,l=e.split(s),c=function(){var e=l.shift(),t=l.shift()||"";return e+t},u=1,f=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(u<e.generatedLine)){var t=l[0],n=t.substr(0,e.generatedColumn-f);return l[0]=t.substr(e.generatedColumn-f),f=e.generatedColumn,i(p,n),p=e,void 0}var n="";i(p,c()),u++,f=0}for(;u<e.generatedLine;)a.add(c()),u++;if(f<e.generatedColumn){var t=l[0];a.add(t.substr(0,e.generatedColumn)),l[0]=t.substr(e.generatedColumn),f=e.generatedColumn}p=e},this),l.length>0&&(p&&i(p,c()),a.add(l.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=o.join(n,e)),a.setSourceContent(e,r))}),a},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!(e instanceof r||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!(e instanceof r||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,i=this.children.length;i>n;n++)t=this.children[n],t instanceof r?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;r-1>n;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},r.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n instanceof r?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},r.prototype.setSourceContent=function(e,t){this.sourceContents[o.toSetString(e)]=t},r.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;n>t;t++)this.children[t]instanceof r&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,n=i.length;n>t;t++)e(o.fromSetString(i[t]),this.sourceContents[i[t]])},r.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},r.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new i(e),r=!1,o=null,l=null,c=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?((o!==i.source||l!==i.line||c!==i.column||u!==i.name)&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),o=i.source,l=i.line,c=i.column,u=i.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),o=null,r=!1),e.match(a).forEach(function(e,a,l){s.test(e)?(t.line++,t.column=0,a+1===l.length?(o=null,r=!1):r&&n.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column+=e.length | ||
+ | })}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},t.SourceNode=r})}),t.define("/node_modules/source-map/lib/source-map/util.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t){function n(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')}function r(e){var t=e.match(h);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var t=e,n=r(e);if(n){if(!n.path)return e;t=n.path}for(var o,s="/"===t.charAt(0),a=t.split(/\/+/),l=0,c=a.length-1;c>=0;c--)o=a[c],"."===o?a.splice(c,1):".."===o?l++:l>0&&(""===o?(a.splice(c+1,l),l=0):(a.splice(c,2),l--));return t=a.join("/"),""===t&&(t=s?"/":"."),n?(n.path=t,i(n)):t}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=r(t),s=r(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),i(n);if(n||t.match(d))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var a="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=a,i(s)):a}function a(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");var n=r(e);return"/"==t.charAt(0)&&n&&"/"==n.path?t.slice(1):0===t.indexOf(e+"/")?t.substr(e.length+1):t}function l(e){return"$"+e}function c(e){return e.substr(1)}function u(e,t){var n=e||"",r=t||"";return(n>r)-(r>n)}function f(e,t,n){var r;return r=u(e.source,t.source),r?r:(r=e.originalLine-t.originalLine,r?r:(r=e.originalColumn-t.originalColumn,r||n?r:(r=u(e.name,t.name),r?r:(r=e.generatedLine-t.generatedLine,r?r:e.generatedColumn-t.generatedColumn))))}function p(e,t,n){var r;return r=e.generatedLine-t.generatedLine,r?r:(r=e.generatedColumn-t.generatedColumn,r||n?r:(r=u(e.source,t.source),r?r:(r=e.originalLine-t.originalLine,r?r:(r=e.originalColumn-t.originalColumn,r?r:u(e.name,t.name)))))}t.getArg=n;var h=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,d=/^data:.+\,.+$/;t.urlParse=r,t.urlGenerate=i,t.normalize=o,t.join=s,t.relative=a,t.toSetString=l,t.fromSetString=c,t.compareByOriginalPositions=f,t.compareByGeneratedPositions=p})}),t.define("/node_modules/source-map/node_modules/amdefine/amdefine.js",function(e,r,i,o){"use strict";function s(e,r){function i(e){var t,n;for(t=0;e[t];t+=1)if(n=e[t],"."===n)e.splice(t,1),t-=1;else if(".."===n){if(1===t&&(".."===e[2]||".."===e[0]))break;t>0&&(e.splice(t-1,2),t-=2)}}function s(e,t){var n;return e&&"."===e.charAt(0)&&t&&(n=t.split("/"),n=n.slice(0,n.length-1),n=n.concat(e.split("/")),i(n),e=n.join("/")),e}function a(e){return function(t){return s(t,e)}}function l(e){function t(t){d[e]=t}return t.fromText=function(){throw new Error("amdefine does not implement load.fromText")},t}function c(t,n,i){var s,a,l,c;if(t)a=d[t]={},l={id:t,uri:o,exports:a},s=f(r,a,l,t);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,a=e.exports,l=e,s=f(r,a,l,e.id)}n&&(n=n.map(function(e){return s(e)})),c="function"==typeof i?i.apply(l.exports,n):i,void 0!==c&&(l.exports=c,t&&(d[t]=l.exports))}function u(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):"string"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=["require","exports","module"]),e?h[e]=[e,t,n]:c(e,t,n)}var f,p,h={},d={},m=!1,g=t("path",e);return f=function(e,t,r,i){function o(o,s){return"string"==typeof o?p(e,t,r,o,i):(o=o.map(function(n){return p(e,t,r,n,i)}),void n.nextTick(function(){s.apply(null,o)}))}return o.toUrl=function(e){return 0===e.indexOf(".")?s(e,g.dirname(r.filename)):e},o},r=r||function(){return e.require.apply(e,arguments)},p=function(e,t,n,r,i){var o,u,m=r.indexOf("!"),g=r;if(-1===m){if(r=s(r,i),"require"===r)return f(e,t,n,i);if("exports"===r)return t;if("module"===r)return n;if(d.hasOwnProperty(r))return d[r];if(h[r])return c.apply(null,h[r]),d[r];if(e)return e(g);throw new Error("No module with ID: "+r)}return o=r.substring(0,m),r=r.substring(m+1,r.length),u=p(e,t,n,o,i),r=u.normalize?u.normalize(r,a(i)):s(r,i),d[r]?d[r]:(u.load(r,f(e,t,n,i),l(r),{}),d[r])},u.require=function(e){return d[e]?d[e]:h[e]?(c.apply(null,h[e]),d[e]):void 0},u.amd={},u}e.exports=s}),t.define("/node_modules/source-map/lib/source-map/source-map-generator.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t,n){function r(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._sources=new s,this._names=new s,this._mappings=[],this._sourcesContents=null}var i=e("/node_modules/source-map/lib/source-map/base64-vlq.js",n),o=e("/node_modules/source-map/lib/source-map/util.js",n),s=e("/node_modules/source-map/lib/source-map/array-set.js",n).ArraySet;r.prototype._version=3,r.fromSourceMap=function(e){var t=e.sourceRoot,n=new r({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)}),n},r.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._validateMapping(t,n,r,i),null!=r&&!this._sources.has(r)&&this._sources.add(r),null!=i&&!this._names.has(i)&&this._names.add(i),this._mappings.push({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},r.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[o.toSetString(n)]=t):(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var i=this._sourceRoot;null!=i&&(r=o.relative(i,r));var a=new s,l=new s;this._mappings.forEach(function(t){if(t.source===r&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=n&&(t.source=o.join(n,t.source)),null!=i&&(t.source=o.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&null!=t.name&&(t.name=s.name))}var c=t.source;null!=c&&!a.has(c)&&a.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)},this),this._sources=a,this._names=l,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=i&&(t=o.relative(i,t)),this.setSourceContent(t,r))},this)},r.prototype._validateMapping=function(e,t,n,r){if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!r||e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){var e,t=0,n=1,r=0,s=0,a=0,l=0,c="";this._mappings.sort(o.compareByGeneratedPositions);for(var u=0,f=this._mappings.length;f>u;u++){if(e=this._mappings[u],e.generatedLine!==n)for(t=0;e.generatedLine!==n;)c+=";",n++;else if(u>0){if(!o.compareByGeneratedPositions(e,this._mappings[u-1]))continue;c+=","}c+=i.encode(e.generatedColumn-t),t=e.generatedColumn,null!=e.source&&(c+=i.encode(this._sources.indexOf(e.source)-l),l=this._sources.indexOf(e.source),c+=i.encode(e.originalLine-1-s),s=e.originalLine-1,c+=i.encode(e.originalColumn-r),r=e.originalColumn,null!=e.name&&(c+=i.encode(this._names.indexOf(e.name)-a),a=this._names.indexOf(e.name)))}return c},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this)},t.SourceMapGenerator=r})}),t.define("/node_modules/source-map/lib/source-map/array-set.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t,n){function r(){this._array=[],this._set={}}var i=e("/node_modules/source-map/lib/source-map/util.js",n);r.fromArray=function(e,t){for(var n=new r,i=0,o=e.length;o>i;i++)n.add(e[i],t);return n},r.prototype.add=function(e,t){var n=this.has(e),r=this._array.length;(!n||t)&&this._array.push(e),n||(this._set[i.toSetString(e)]=r)},r.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,i.toSetString(e))},r.prototype.indexOf=function(e){if(this.has(e))return this._set[i.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},t.ArraySet=r})}),t.define("/node_modules/source-map/lib/source-map/base64-vlq.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t,n){function r(e){return 0>e?(-e<<1)+1:(e<<1)+0}function i(e){var t=1===(1&e),n=e>>1;return t?-n:n}var o=e("/node_modules/source-map/lib/source-map/base64.js",n),s=5,a=1<<s,l=a-1,c=a;t.encode=function(e){var t,n="",i=r(e);do t=i&l,i>>>=s,i>0&&(t|=c),n+=o.encode(t);while(i>0);return n},t.decode=function(e){var t,n,r=0,a=e.length,u=0,f=0;do{if(r>=a)throw new Error("Expected more digits in base 64 VLQ value.");n=o.decode(e.charAt(r++)),t=!!(n&c),n&=l,u+=n<<f,f+=s}while(t);return{value:i(u),rest:e.slice(r)}}})}),t.define("/node_modules/source-map/lib/source-map/base64.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t){var n={},r={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e,t){n[e]=t,r[t]=e}),t.encode=function(e){if(e in r)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){if(e in n)return n[e];throw new TypeError("Not a valid base 64 digit: "+e)}})}),t.define("/node_modules/source-map/lib/source-map/source-map-consumer.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t,n){function r(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=i.getArg(t,"version"),r=i.getArg(t,"sources"),o=i.getArg(t,"names",[]),a=i.getArg(t,"sourceRoot",null),l=i.getArg(t,"sourcesContent",null),c=i.getArg(t,"mappings"),u=i.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);this._names=s.fromArray(o,!0),this._sources=s.fromArray(r,!0),this.sourceRoot=a,this.sourcesContent=l,this._mappings=c,this.file=u}var i=e("/node_modules/source-map/lib/source-map/util.js",n),o=e("/node_modules/source-map/lib/source-map/binary-search.js",n),s=e("/node_modules/source-map/lib/source-map/array-set.js",n).ArraySet,a=e("/node_modules/source-map/lib/source-map/base64-vlq.js",n);r.fromSourceMap=function(e){var t=Object.create(r.prototype);return t._names=s.fromArray(e._names.toArray(),!0),t._sources=s.fromArray(e._sources.toArray(),!0),t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file,t.__generatedMappings=e._mappings.slice().sort(i.compareByGeneratedPositions),t.__originalMappings=e._mappings.slice().sort(i.compareByOriginalPositions),t},r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?i.join(this.sourceRoot,e):e},this)}}),r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),r.prototype._parseMappings=function(e){for(var t,n,r=1,o=0,s=0,l=0,c=0,u=0,f=/^[,;]/,p=e;p.length>0;)if(";"===p.charAt(0))r++,p=p.slice(1),o=0;else if(","===p.charAt(0))p=p.slice(1);else{if(t={},t.generatedLine=r,n=a.decode(p),t.generatedColumn=o+n.value,o=t.generatedColumn,p=n.rest,p.length>0&&!f.test(p.charAt(0))){if(n=a.decode(p),t.source=this._sources.at(c+n.value),c+=n.value,p=n.rest,0===p.length||f.test(p.charAt(0)))throw new Error("Found a source, but no line and column");if(n=a.decode(p),t.originalLine=s+n.value,s=t.originalLine,t.originalLine+=1,p=n.rest,0===p.length||f.test(p.charAt(0)))throw new Error("Found a source and line, but no column");n=a.decode(p),t.originalColumn=l+n.value,l=t.originalColumn,p=n.rest,p.length>0&&!f.test(p.charAt(0))&&(n=a.decode(p),t.name=this._names.at(u+n.value),u+=n.value,p=n.rest)}this.__generatedMappings.push(t),"number"==typeof t.originalLine&&this.__originalMappings.push(t)}this.__generatedMappings.sort(i.compareByGeneratedPositions),this.__originalMappings.sort(i.compareByOriginalPositions)},r.prototype._findMapping=function(e,t,n,r,i){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return o.search(e,t,i)},r.prototype.originalPositionFor=function(e){var t={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositions);if(n&&n.generatedLine===t.generatedLine){var r=i.getArg(n,"source",null);return null!=r&&null!=this.sourceRoot&&(r=i.join(this.sourceRoot,r)),{source:r,line:i.getArg(n,"originalLine",null),column:i.getArg(n,"originalColumn",null),name:i.getArg(n,"name",null)}}return{source:null,line:null,column:null,name:null}},r.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=i.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var t;if(null!=this.sourceRoot&&(t=i.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!t.path||"/"==t.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){var t={source:i.getArg(e,"source"),originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")};null!=this.sourceRoot&&(t.source=i.relative(this.sourceRoot,t.source));var n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions);return n?{line:i.getArg(n,"generatedLine",null),column:i.getArg(n,"generatedColumn",null)}:{line:null,column:null}},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.prototype.eachMapping=function(e,t,n){var o,s=t||null,a=n||r.GENERATED_ORDER;switch(a){case r.GENERATED_ORDER:o=this._generatedMappings;break;case r.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var l=this.sourceRoot;o.map(function(e){var t=e.source;return null!=t&&null!=l&&(t=i.join(l,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,s)},t.SourceMapConsumer=r})}),t.define("/node_modules/source-map/lib/source-map/binary-search.js",function(e){if("function"!=typeof n)var n=t("/node_modules/source-map/node_modules/amdefine/amdefine.js",e)(e,t);n(function(e,t){function n(e,t,r,i,o){var s=Math.floor((t-e)/2)+e,a=o(r,i[s],!0);return 0===a?i[s]:a>0?t-s>1?n(s,t,r,i,o):i[s]:s-e>1?n(e,s,r,i,o):0>e?null:i[e]}t.search=function(e,t,r){return t.length>0?n(-1,t.length,e,t,r):null}})}),t.define("/node_modules/esutils/lib/utils.js",function(e,n){!function(){"use strict";n.ast=t("/node_modules/esutils/lib/ast.js",e),n.code=t("/node_modules/esutils/lib/code.js",e),n.keyword=t("/node_modules/esutils/lib/keyword.js",e)}()}),t.define("/node_modules/esutils/lib/keyword.js",function(e){!function(n){"use strict";function r(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function i(e,t){return t||"yield"!==e?o(e,t):!1}function o(e,t){if(t&&r(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function s(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||o(e,t)}function l(e){return"eval"===e||"arguments"===e}function c(e){var t,r,i;if(0===e.length)return!1;if(i=e.charCodeAt(0),!n.isIdentifierStart(i)||92===i)return!1;for(t=1,r=e.length;r>t;++t)if(i=e.charCodeAt(t),!n.isIdentifierPart(i)||92===i)return!1;return!0}function u(e,t){return c(e)&&!s(e,t)}function f(e,t){return c(e)&&!a(e,t)}n=t("/node_modules/esutils/lib/code.js",e),e.exports={isKeywordES5:i,isKeywordES6:o,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:l,isIdentifierName:c,isIdentifierES5:u,isIdentifierES6:f}}()}),t.define("/node_modules/esutils/lib/code.js",function(e){!function(t){"use strict";function n(e){return e>=48&&57>=e}function r(e){return n(e)||e>=97&&102>=e||e>=65&&70>=e}function i(e){return e>=48&&55>=e}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||92===e||e>=128&&t.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&t.NonAsciiIdentifierPart.test(String.fromCharCode(e))}t={NonAsciiIdentifierStart:new RegExp("[\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]"),NonAsciiIdentifierPart:new RegExp("[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\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\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\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\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\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-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\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-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]")},e.exports={isDecimalDigit:n,isHexDigit:r,isOctalDigit:i,isWhiteSpace:o,isLineTerminator:s,isIdentifierStart:a,isIdentifierPart:l}}()}),t.define("/node_modules/esutils/lib/ast.js",function(e){!function(){"use strict";function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return r(e)||null!=e&&"FunctionDeclaration"===e.type}function o(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function s(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=o(t)}while(t);return!1}e.exports={isExpression:t,isStatement:r,isIterationStatement:n,isSourceElement:i,isProblematicIfStatement:s,trailingStatement:o}}()}),t.define("/node_modules/estraverse/estraverse.js",function(e,t){!function(e,n){"use strict";"function"==typeof define&&define.amd?define(["exports"],n):n(void 0!==t?t:e.estraverse={})}(this,function(e){"use strict";function t(){}function n(e){var t,r,i={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],i[t]="object"==typeof r&&null!==r?n(r):r);return i}function r(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function i(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?r=n:(i=o+1,r-=n+1);return i}function o(e,t){var n,r,i,o;for(r=e.length,i=0;r;)n=r>>>1,o=i+n,t(e[o])?(i=o+1,r-=n+1):r=n;return i}function s(e,t){this.parent=e,this.key=t}function a(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function l(){}function c(e,t){var n=new l;return n.traverse(e,t)}function u(e,t){var n=new l;return n.replace(e,t)}function f(e,t){var n;return n=i(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),n-=1,n>=0&&(e.extendedRange[0]=t[n].range[1]),e}function p(e,t,r){var i,o,s,a,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(s=0,o=t.length;o>s;s+=1)i=n(t[s]),i.extendedRange=[0,e.range[0]],l.push(i);e.leadingComments=l}return e}for(s=0,o=t.length;o>s;s+=1)l.push(f(n(t[s]),r));return a=0,c(e,{enter:function(e){for(var t;a<l.length&&(t=l[a],!(t.extendedRange[1]>e.range[0]));)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(a,1)):a+=1;return a===l.length?m.Break:l[a].extendedRange[0]>e.range[1]?m.Skip:void 0}}),a=0,c(e,{leave:function(e){for(var t;a<l.length&&(t=l[a],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),l.splice(a,1)):a+=1;return a===l.length?m.Break:l[a].extendedRange[0]>e.range[1]?m.Skip:void 0}}),e}var h,d,m,g,v,b;h={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},d=Array.isArray,d||(d=function(e){return"[object Array]"===Object.prototype.toString.call(e) | ||
+ | }),t(r),t(o),g={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],Identifier:[],IfStatement:["test","consequent","alternate"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},v={},b={},m={Break:v,Skip:b},s.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.path=function(){function e(e,t){if(d(t))for(r=0,i=t.length;i>r;++r)e.push(t[r]);else e.push(t)}var t,n,r,i,o,s;if(!this.__current.path)return null;for(o=[],t=2,n=this.__leavelist.length;n>t;++t)s=this.__leavelist[t],e(o,s.path);return e(o,this.__current.path),o},l.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;t>e;++e)n.push(this.__leavelist[e].node);return n},l.prototype.current=function(){return this.__current.node},l.prototype.__execute=function(e,t){var n,r;return r=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(r=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,r},l.prototype.notify=function(e){this.__state=e},l.prototype.skip=function(){this.notify(b)},l.prototype["break"]=function(){this.notify(v)},l.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null},l.prototype.traverse=function(e,t){var n,r,i,o,s,l,c,u,f,p,m,y;for(this.__initialize(e,t),y={},n=this.__worklist,r=this.__leavelist,n.push(new a(e,null,null,null)),r.push(new a(null,null,null,null));n.length;)if(i=n.pop(),i!==y){if(i.node){if(l=this.__execute(t.enter,i),this.__state===v||l===v)return;if(n.push(y),r.push(i),this.__state===b||l===b)continue;for(o=i.node,s=i.wrap||o.type,p=g[s],u=p.length;(u-=1)>=0;)if(c=p[u],m=o[c])if(d(m))for(f=m.length;(f-=1)>=0;)m[f]&&(i=s!==h.ObjectExpression&&s!==h.ObjectPattern||"properties"!==p[u]?new a(m[f],[c,f],null,null):new a(m[f],[c,f],"Property",null),n.push(i));else n.push(new a(m,c,null,null))}}else if(i=r.pop(),l=this.__execute(t.leave,i),this.__state===v||l===v)return},l.prototype.replace=function(e,t){var n,r,i,o,l,c,u,f,p,m,y,x,w;for(this.__initialize(e,t),y={},n=this.__worklist,r=this.__leavelist,x={root:e},c=new a(e,null,null,new s(x,"root")),n.push(c),r.push(c);n.length;)if(c=n.pop(),c!==y){if(l=this.__execute(t.enter,c),void 0!==l&&l!==v&&l!==b&&(c.ref.replace(l),c.node=l),this.__state===v||l===v)return x.root;if((i=c.node)&&(n.push(y),r.push(c),this.__state!==b&&l!==b))for(o=c.wrap||i.type,p=g[o],u=p.length;(u-=1)>=0;)if(w=p[u],m=i[w])if(d(m))for(f=m.length;(f-=1)>=0;)m[f]&&(c=o===h.ObjectExpression&&"properties"===p[u]?new a(m[f],[w,f],"Property",new s(m,f)):new a(m[f],[w,f],null,new s(m,f)),n.push(c));else n.push(new a(m,w,null,new s(i,w)))}else if(c=r.pop(),l=this.__execute(t.leave,c),void 0!==l&&l!==v&&l!==b&&c.ref.replace(l),this.__state===v||l===v)return x.root;return x.root},e.version="1.5.1-dev",e.Syntax=h,e.traverse=c,e.replace=u,e.attachComments=p,e.VisitorKeys=g,e.VisitorOption=m,e.Controller=l})}),t("/tools/entry-point.js")}.call(this,this),/** | ||
+ | * lscache library | ||
+ | * Copyright (c) 2011, Pamela Fox | ||
+ | * | ||
+ | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
+ | * you may not use this file except in compliance with the License. | ||
+ | * You may obtain a copy of the License at | ||
+ | * | ||
+ | * http://www.apache.org/licenses/LICENSE-2.0 | ||
+ | * | ||
+ | * Unless required by applicable law or agreed to in writing, software | ||
+ | * distributed under the License is distributed on an "AS IS" BASIS, | ||
+ | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
+ | * See the License for the specific language governing permissions and | ||
+ | * limitations under the License. | ||
+ | */ | ||
+ | function(e,t){"function"==typeof define&&define.amd?define([],t):"undefined"!=typeof module&&module.exports?module.exports=t():e.lscache=t()}(this,function(){function e(){var e="__lscachetest__",n=e;if(void 0!==p)return p;try{s(e,n),a(e),p=!0}catch(r){p=t(r)?!0:!1}return p}function t(e){return e&&"QUOTA_EXCEEDED_ERR"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||"QuotaExceededError"===e.name?!0:!1}function n(){return void 0===h&&(h=null!=window.JSON),h}function r(e){return e+m}function i(){return Math.floor((new Date).getTime()/v)}function o(e){return localStorage.getItem(d+y+e)}function s(e,t){localStorage.removeItem(d+y+e),localStorage.setItem(d+y+e,t)}function a(e){localStorage.removeItem(d+y+e)}function l(e){for(var t=new RegExp("^"+d+y+"(.*)"),n=localStorage.length-1;n>=0;--n){var i=localStorage.key(n);i=i&&i.match(t),i=i&&i[1],i&&i.indexOf(m)<0&&e(i,r(i))}}function c(e){var t=r(e);a(e),a(t)}function u(e){var t=r(e),n=o(t);if(n){var s=parseInt(n,g);if(i()>=s)return a(e),a(t),!0}}function f(e,t){x&&"console"in window&&"function"==typeof window.console.warn&&(window.console.warn("lscache - "+e),t&&window.console.warn("lscache - The error was: "+t.message))}var p,h,d="lscache-",m="-cacheexpiration",g=10,v=6e4,b=Math.floor(864e13/v),y="",x=!1,w={set:function(u,p,h){if(e()){if("string"!=typeof p){if(!n())return;try{p=JSON.stringify(p)}catch(d){return}}try{s(u,p)}catch(d){if(!t(d))return void f("Could not add item with key '"+u+"'",d);var m,v=[];l(function(e,t){var n=o(t);n=n?parseInt(n,g):b,v.push({key:e,size:(o(e)||"").length,expiration:n})}),v.sort(function(e,t){return t.expiration-e.expiration});for(var y=(p||"").length;v.length&&y>0;)m=v.pop(),f("Cache is full, removing item with key '"+u+"'"),c(m.key),y-=m.size;try{s(u,p)}catch(d){return void f("Could not add item with key '"+u+"', perhaps it's too big?",d)}}h?s(r(u),(i()+h).toString(g)):a(r(u))}},get:function(t){if(!e())return null;if(u(t))return null;var r=o(t);if(!r||!n())return r;try{return JSON.parse(r)}catch(i){return r}},remove:function(t){e()&&c(t)},supported:function(){return e()},flush:function(){e()&&l(function(e){c(e)})},flushExpired:function(){e()&&l(function(e){u(e)})},setBucket:function(e){y=e},resetBucket:function(){y=""},enableWarnings:function(e){x=e}};return w});var CacheGet={_inMemoryStore:{},findInMemory:function(e){this._find(e,"inmemory")},findInLocalStorage:function(e){this._find(e,"localstorage")},_find:function(e,t){this._validateOpts(e);var n=this._findInStorage(e,t);n?e.cb(n):this._fetchAndCache(e,"inmemory")},_validateOpts:function(e){if(!e.key)throw"Invalid key";if(!e.url)throw"Invalid URL";if(!e.cb)throw"Invalid callback"},_findInStorage:function(e,t){return"inmemory"===t?this._inMemoryStore[e.key]:lscache.get(e.key)},_fetchAndCache:function(e,t){var n=this;$.ajax({dataType:e.dataType||"text",url:e.url,success:function(r){"inmemory"===t?n._inMemoryStore[e.key]=r:lscache.set(e.key,r,e.expire),e.cb(r)}})}},IDGenerator={length:8,generate:function(){for(var e=(+new Date).toString().split("").reverse(),t="",n=0;n<this.length;++n){var r=this._getRandomInt(0,e.length-1);t+=e[r]}return t},_getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}; | ||
Revision as of 07:50, 3 September 2015