",options:{disabled:!1,create:null},_createWidget:function(n,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),n),this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(e,n){var i,r,o,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},i=e.split("."),e=i.shift(),i.length){for(r=s[e]=t.widget.extend({},this.options[e]),o=0;i.length-1>o;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(e=i.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=n}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(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(e,n,i){var r,o=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=r=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),t.each(i,function(i,s){function a(){return e||o.options.disabled!==!0&&!t(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||t.guid++);var c=i.match(/^([\w:-]*)\s*(.*)$/),l=c[1]+o.eventNamespace,u=c[2];u?r.delegate(u,l,a):n.bind(l,a)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,n,i){var r,o,s=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(t.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?n:r.effect||n:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&t.effects&&t.effects.effect[a]?i[e](r):a!==e&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){t(this)[e](),o&&o.call(i[0]),n()})}}),t.widget}),function(t){"function"==typeof define&&define.amd?define(["jquery","./widget"],t):t(jQuery)}(function(t){var e=!1;return t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.11.0",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(n){return!0===t.data(n.target,e.widgetName+".preventClickEvent")?(t.removeData(n.target,e.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(n){if(!e){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,r=1===n.which,o="string"==typeof this.options.cancel&&n.target.nodeName?t(n.target).closest(this.options.cancel).length:!1;return r&&!o&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):e.which?this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted):this._mouseUp(e)},_mouseUp:function(n){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),e=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.resizable",t.ui.mouse,{version:"1.11.0",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(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,n){if("hidden"===t(e).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;return e[i]>0?!0:(e[i]=1,r=e[i]>0,e[i]=0,r)},_create:function(){var e,n,i,r,o,s=this,a=this.options;if(this.element.addClass("ui-resizable"),t.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(t("
").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||(t(".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"),e=this.handles.split(","),this.handles={},n=0;e.length>n;n++)i=t.trim(e[n]),o="ui-resizable-"+i,r=t("
"),r.css({zIndex:a.zIndex}),"se"===i&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[i]=".ui-resizable-"+i,this.element.append(r);this._renderAxis=function(e){var n,i,r,o;e=e||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)&&(i=t(this.handles[n],this.element),o=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),r=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),e.css(r,o),this._proportionallyResize()),t(this.handles[n]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){s.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=r&&r[1]?r[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),s._handles.show())}).mouseleave(function(){a.disabled||s.resizing||(t(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,n=function(e){t(e).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),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_mouseCapture:function(e){var n,i,r=!1;for(n in this.handles)i=t(this.handles[n])[0],(i===e.target||t.contains(i,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var n,i,r,o=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(n+=t(o.containment).scrollLeft()||0,i+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},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.originalPosition={left:n,top:i},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===r?this.axis+"-resize":r),s.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var n,i=this.helper,r={},o=this.originalMousePosition,s=this.axis,a=e.pageX-o.left||0,c=e.pageY-o.top||0,l=this._change[s];return this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height},l?(n=l.apply(this,[e,a,c]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(n=this._updateRatio(n,e)),n=this._respectSize(n,e),this._updateCache(n),this._propagate("resize",e),this.position.top!==this.prevPosition.top&&(r.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(r.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(r.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(r.height=this.size.height+"px"),i.css(r),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(r)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var n,i,r,o,s,a,c,l=this.options,u=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),r=i&&this._hasScroll(n[0],"left")?0:u.sizeDiff.height,o=i?0:u.sizeDiff.width,s={width:u.helper.width()-o,height:u.helper.height()-r},a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,c=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(t.extend(s,{top:c,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,n,i,r,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||t)&&(e=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),i>o.minHeight&&(o.minHeight=i),o.maxWidth>n&&(o.maxWidth=n),o.maxHeight>r&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,n=this.size,i=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===i&&(t.left=e.left+(n.width-t.width),t.top=null),"nw"===i&&(t.top=e.top+(n.height-t.height),t.left=e.left+(n.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,n=this.axis,i=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth
t.width,s=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,l=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return o&&(t.width=e.minWidth),s&&(t.height=e.minHeight),i&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),i&&l&&(t.left=a-e.maxWidth),s&&u&&(t.top=c-e.minHeight),r&&u&&(t.top=c-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,n,i,r,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(r=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],n=[r.css("borderTopWidth"),r.css("borderRightWidth"),r.css("borderBottomWidth"),r.css("borderLeftWidth")],i=[r.css("paddingTop"),r.css("paddingRight"),r.css("paddingBottom"),r.css("paddingLeft")],e=0;n.length>e;e++)this.borderDif[e]=(parseInt(n[e],10)||0)+(parseInt(i[e],10)||0);r.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,n=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t(""),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(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var n=this.originalSize,i=this.originalPosition;return{left:i.left+e,width:n.width-e}},n:function(t,e,n){var i=this.originalSize,r=this.originalPosition;return{top:r.top+n,height:i.height-n}},s:function(t,e,n){return{height:this.originalSize.height+n}},se:function(e,n,i){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,n,i]))},sw:function(e,n,i){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,n,i]))},ne:function(e,n,i){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,n,i]))},nw:function(e,n,i){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,n,i]))}},_propagate:function(e,n){t.ui.plugin.call(this,e,[n,this.ui()]),"resize"!==e&&this._trigger(e,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,prevSize:this.prevSize,prevPosition:this.prevPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var n=t(this).resizable("instance"),i=n.options,r=n._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,a=o?0:n.sizeDiff.width,c={width:n.size.width-a,height:n.size.height-s},l=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(t.extend(c,u&&l?{top:u,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={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)};r&&r.length&&t(r[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,n,i,r,o,s,a,c=t(this).resizable("instance"),l=c.options,u=c.element,d=l.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(c.containerElement=t(p),/document/.test(d)||d===document?(c.containerOffset={left:0,top:0},c.containerPosition={left:0,top:0},c.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(p),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,i){n[t]=c._num(e.css("padding"+i))}),c.containerOffset=e.offset(),c.containerPosition=e.position(),c.containerSize={height:e.innerHeight()-n[3],width:e.innerWidth()-n[1]},i=c.containerOffset,r=c.containerSize.height,o=c.containerSize.width,s=c._hasScroll(p,"left")?p.scrollWidth:o,a=c._hasScroll(p)?p.scrollHeight:r,c.parentData={element:p,left:i.left,top:i.top,width:s,height:a}))},resize:function(e,n){var i,r,o,s,a=t(this).resizable("instance"),c=a.options,l=a.containerOffset,u=a.position,d=a._aspectRatio||e.shiftKey,p={top:0,left:0},h=a.containerElement,f=!0;h[0]!==document&&/static/.test(h.css("position"))&&(p=l),u.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-p.left),d&&(a.size.height=a.size.width/a.aspectRatio,f=!1),a.position.left=c.helper?l.left:0),u.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),d&&(a.size.width=a.size.height*a.aspectRatio,f=!1),a.position.top=a._helper?l.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-p.left:a.offset.left-l.left)+a.sizeDiff.width),r=Math.abs((a._helper?a.offset.top-p.top:a.offset.top-l.top)+a.sizeDiff.height),o=a.containerElement.get(0)===a.element.parent().get(0),s=/relative|absolute/.test(a.containerElement.css("position")),o&&s&&(i-=Math.abs(a.parentData.left)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,d&&(a.size.height=a.size.width/a.aspectRatio,f=!1)),r+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-r,d&&(a.size.width=a.size.height*a.aspectRatio,f=!1)),f||(a.position.left=n.prevPosition.left,a.position.top=n.prevPosition.top,a.size.width=n.prevSize.width,a.size.height=n.prevSize.height)
},stop:function(){var e=t(this).resizable("instance"),n=e.options,i=e.containerOffset,r=e.containerPosition,o=e.containerElement,s=t(e.helper),a=s.offset(),c=s.outerWidth()-e.sizeDiff.width,l=s.outerHeight()-e.sizeDiff.height;e._helper&&!n.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-r.left-i.left,width:c,height:l}),e._helper&&!n.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-r.left-i.left,width:c,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),n=e.options,i=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof n.alsoResize||n.alsoResize.parentNode?i(n.alsoResize):n.alsoResize.length?(n.alsoResize=n.alsoResize[0],i(n.alsoResize)):t.each(n.alsoResize,function(t){i(t)})},resize:function(e,n){var i=t(this).resizable("instance"),r=i.options,o=i.originalSize,s=i.originalPosition,a={height:i.size.height-o.height||0,width:i.size.width-o.width||0,top:i.position.top-s.top||0,left:i.position.left-s.left||0},c=function(e,i){t(e).each(function(){var e=t(this),r=t(this).data("ui-resizable-alsoresize"),o={},s=i&&i.length?i:e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(s,function(t,e){var n=(r[e]||0)+(a[e]||0);n&&n>=0&&(o[e]=n||null)}),e.css(o)})};"object"!=typeof r.alsoResize||r.alsoResize.nodeType?c(r.alsoResize):t.each(r.alsoResize,function(t,e){c(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),n=e.options,i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).resizable("instance"),n=e.options,i=e.size,r=e.originalSize,o=e.originalPosition,s=e.axis,a="number"==typeof n.grid?[n.grid,n.grid]:n.grid,c=a[0]||1,l=a[1]||1,u=Math.round((i.width-r.width)/c)*c,d=Math.round((i.height-r.height)/l)*l,p=r.width+u,h=r.height+d,f=n.maxWidth&&p>n.maxWidth,g=n.maxHeight&&h>n.maxHeight,m=n.minWidth&&n.minWidth>p,v=n.minHeight&&n.minHeight>h;n.grid=a,m&&(p+=c),v&&(h+=l),f&&(p-=c),g&&(h-=l),/^(se|s|e)$/.test(s)?(e.size.width=p,e.size.height=h):/^(ne)$/.test(s)?(e.size.width=p,e.size.height=h,e.position.top=o.top-d):/^(sw)$/.test(s)?(e.size.width=p,e.size.height=h,e.position.left=o.left-u):(h-l>0?(e.size.height=h,e.position.top=o.top-d):(e.size.height=l,e.position.top=o.top+r.height-l),p-c>0?(e.size.width=p,e.position.left=o.left-u):(e.size.width=c,e.position.left=o.left+r.width-c))}}),t.ui.resizable}),function(){var t,e,n,i,r,o,s,a,c,l,u,d,p=[].slice,h=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},f={}.hasOwnProperty,g=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},m=function(t,e){return function(){return t.apply(e,arguments)}};n={bind:function(t,e){var n,i,r,o,s;for(i=t.split(" "),n=this.hasOwnProperty("_callbacks")&&(this._callbacks||(this._callbacks={})),o=0,s=i.length;s>o;o++)r=i[o],n[r]||(n[r]=[]),n[r].push(e);return this},one:function(t,e){var n;return this.bind(t,n=function(){return this.unbind(t,n),e.apply(this,arguments)})},trigger:function(){var t,e,n,i,r,o,s;if(t=arguments.length>=1?p.call(arguments,0):[],n=t.shift(),i=this.hasOwnProperty("_callbacks")&&(null!=(s=this._callbacks)?s[n]:void 0)){for(r=0,o=i.length;o>r&&(e=i[r],e.apply(this,t)!==!1);r++);return!0}},listenTo:function(t,e,n){return t.bind(e,n),this.listeningTo||(this.listeningTo=[]),this.listeningTo.push({obj:t,ev:e,callback:n}),this},listenToOnce:function(t,e,n){var i,r;return r=this.listeningToOnce||(this.listeningToOnce=[]),t.bind(e,i=function(){var o,s,a,c,l;for(s=-1,o=c=0,l=r.length;l>c;o=++c)a=r[o],a.obj===t&&a.ev===e&&a.callback===n&&(s=o);return t.unbind(e,i),-1!==s&&r.splice(s,1),n.apply(this,arguments)}),r.push({obj:t,ev:e,callback:n,handler:i}),this},stopListening:function(e,n){var i,r,o,s,a,c,l,u,d,p,h,f,g,m,v;if(0===arguments.length){for(g=[this.listeningTo,this.listeningToOnce],l=0,p=g.length;p>l;l++)if(a=g[l])for(u=0,h=a.length;h>u;u++)c=a[u],c.obj.unbind(c.ev,c.handler||c.callback);return this.listeningTo=void 0,this.listeningToOnce=void 0}if(e){for(m=[this.listeningTo,this.listeningToOnce],v=[],d=0,f=m.length;f>d;d++)a=m[d],a&&(n=n?n.split(" "):[void 0],v.push(function(){var e,l,u;for(u=[],e=0,l=n.length;l>e;e++)i=n[e],u.push(function(){var e,n,l;for(l=[],s=e=n=a.length-1;0>=n?0>=e:e>=0;s=0>=n?++e:--e)c=a[s],i&&i!==c.ev?i?(r=c.ev.split(" "),~(o=r.indexOf(i))?(r.splice(o,1),c.ev=t.trim(r.join(" ")),l.push(c.obj.unbind(i,c.handler||c.callback))):l.push(void 0)):l.push(void 0):(c.obj.unbind(c.ev,c.handler||c.callback),-1!==s?l.push(a.splice(s,1)):l.push(void 0));return l}());return u}()));return v}},unbind:function(t,e){var n,i,r,o,s,a,c,l,u,d;if(0===arguments.length)return this._callbacks={},this;if(!t)return this;for(i=t.split(" "),a=0,l=i.length;l>a;a++)if(s=i[a],o=null!=(d=this._callbacks)?d[s]:void 0)if(e){for(r=c=0,u=o.length;u>c;r=++c)if(n=o[r],n===e){o=o.slice(),o.splice(r,1),this._callbacks[s]=o;break}}else delete this._callbacks[s];return this}},n.on=n.bind,n.off=n.unbind,i={trace:!0,logPrefix:"(App)",log:function(){var t;return t=arguments.length>=1?p.call(arguments,0):[],this.trace?(this.logPrefix&&t.unshift(this.logPrefix),"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log.apply(console,t),this):void 0}},d=["included","extended"],o=function(){function t(){"function"==typeof this.init&&this.init.apply(this,arguments)}return t.include=function(t){var e,n,i;if(!t)throw new Error("include(obj) requires obj");for(e in t)n=t[e],0>h.call(d,e)&&(this.prototype[e]=n);return null!=(i=t.included)&&i.apply(this),this},t.extend=function(t){var e,n,i;if(!t)throw new Error("extend(obj) requires obj");for(e in t)n=t[e],0>h.call(d,e)&&(this[e]=n);return null!=(i=t.extended)&&i.apply(this),this},t.proxy=function(t){return function(e){return function(){return t.apply(e,arguments)}}(this)},t.prototype.proxy=function(t){return function(e){return function(){return t.apply(e,arguments)}}(this)},t}(),r=function(e){function i(t){i.__super__.constructor.apply(this,arguments),t&&this.load(t),this.cid=(null!=t?t.cid:void 0)||this.constructor.uid("c-")}return g(i,e),i.extend(n),i.records=[],i.irecords={},i.attributes=[],i.configure=function(){var t,e;return e=arguments[0],t=arguments.length>=2?p.call(arguments,1):[],this.className=e,this.deleteAll(),t.length&&(this.attributes=t),this.attributes&&(this.attributes=u(this.attributes)),this.attributes||(this.attributes=[]),this.unbind(),this},i.toString=function(){return""+this.className+"("+this.attributes.join(", ")+")"},i.find=function(t){var e;if(e=this.exists(t),!e)throw new Error('"'+this.className+'" model could not find a record for the ID "'+t+'"');return e},i.exists=function(t){var e;return null!=(e=this.irecords[t])?e.clone():void 0},i.addRecord=function(t){return t.id&&this.irecords[t.id]&&this.irecords[t.id].remove(),t.id||(t.id=t.cid),this.records.push(t),this.irecords[t.id]=t,this.irecords[t.cid]=t},i.refresh=function(t,e){var n,i,r,o,s;for(null==e&&(e={}),e.clear&&this.deleteAll(),i=this.fromJSON(t),c(i)||(i=[i]),o=0,s=i.length;s>o;o++)n=i[o],this.addRecord(n);return this.sort(),r=this.cloneArray(i),this.trigger("refresh",r,e),r},i.select=function(t){var e,n,i,r,o;for(r=this.records,o=[],n=0,i=r.length;i>n;n++)e=r[n],t(e)&&o.push(e.clone());return o},i.findByAttribute=function(t,e){var n,i,r,o;for(o=this.records,i=0,r=o.length;r>i;i++)if(n=o[i],n[t]===e)return n.clone();return null},i.findAllByAttribute=function(t,e){return this.select(function(n){return n[t]===e})},i.each=function(t){var e,n,i,r,o;for(r=this.records,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(t(e.clone()));return o},i.all=function(){return this.cloneArray(this.records)},i.first=function(){var t;return null!=(t=this.records[0])?t.clone():void 0},i.last=function(){var t;return null!=(t=this.records[this.records.length-1])?t.clone():void 0},i.count=function(){return this.records.length},i.deleteAll=function(){return this.records=[],this.irecords={}},i.destroyAll=function(t){var e,n,i,r,o;for(r=this.records,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e.destroy(t));return o},i.update=function(t,e,n){return this.find(t).updateAttributes(e,n)},i.create=function(t,e){var n;return n=new this(t),n.save(e)},i.destroy=function(t,e){return this.find(t).destroy(e)},i.change=function(t){return"function"==typeof t?this.bind("change",t):this.trigger.apply(this,["change"].concat(p.call(arguments)))},i.fetch=function(t){return"function"==typeof t?this.bind("fetch",t):this.trigger.apply(this,["fetch"].concat(p.call(arguments)))},i.toJSON=function(){return this.records},i.fromJSON=function(t){var e,n,i,r;if(t){if("string"==typeof t&&(t=JSON.parse(t)),c(t)){for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(new this(e));return r}return new this(t)}},i.fromForm=function(){var t;return(t=new this).fromForm.apply(t,arguments)},i.sort=function(){return this.comparator&&this.records.sort(this.comparator),this},i.cloneArray=function(t){var e,n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(e.clone());return r},i.idCounter=0,i.uid=function(t){var e;return null==t&&(t=""),e=t+this.idCounter++,this.exists(e)&&(e=this.uid(t)),e},i.prototype.isNew=function(){return!this.exists()},i.prototype.isValid=function(){return!this.validate()},i.prototype.validate=function(){},i.prototype.load=function(t){var e,n;t.id&&(this.id=t.id);for(e in t)n=t[e],t.hasOwnProperty(e)&&"function"==typeof this[e]?this[e](n):this[e]=n;return this},i.prototype.attributes=function(){var t,e,n,i,r;for(e={},r=this.constructor.attributes,n=0,i=r.length;i>n;n++)t=r[n],t in this&&(e[t]="function"==typeof this[t]?this[t]():this[t]);return this.id&&(e.id=this.id),e},i.prototype.eql=function(t){return!!(t&&t.constructor===this.constructor&&t.cid===this.cid||t.id&&t.id===this.id)},i.prototype.save=function(t){var e,n;return null==t&&(t={}),t.validate!==!1&&(e=this.validate())?(this.trigger("error",e),!1):(this.trigger("beforeSave",t),n=this.isNew()?this.create(t):this.update(t),this.stripCloneAttrs(),this.trigger("save",t),n)},i.prototype.stripCloneAttrs=function(){var t,e;if(!this.hasOwnProperty("cid")){for(t in this)f.call(this,t)&&(e=this[t],this.constructor.attributes.indexOf(t)>-1&&delete this[t]);return this}},i.prototype.updateAttribute=function(t,e,n){var i;return i={},i[t]=e,this.updateAttributes(i,n)},i.prototype.updateAttributes=function(t,e){return this.load(t),this.save(e)},i.prototype.changeID=function(t){var e;if(t!==this.id)return e=this.constructor.irecords,e[t]=e[this.id],delete e[this.id],this.id=t,this.save()},i.prototype.remove=function(){var t,e,n,i,r;for(n=this.constructor.records.slice(0),t=i=0,r=n.length;r>i;t=++i)if(e=n[t],this.eql(e)){n.splice(t,1);break}return this.constructor.records=n,delete this.constructor.irecords[this.id],delete this.constructor.irecords[this.cid]},i.prototype.destroy=function(t){return null==t&&(t={}),this.trigger("beforeDestroy",t),this.remove(),this.destroyed=!0,this.trigger("destroy",t),this.trigger("change","destroy",t),this.listeningTo&&this.stopListening(),this.unbind(),this},i.prototype.dup=function(t){var e;return null==t&&(t=!0),e=this.attributes(),t?delete e.id:e.cid=this.cid,new this.constructor(e)},i.prototype.clone=function(){return a(this)},i.prototype.reload=function(){var t;return this.isNew()?this:(t=this.constructor.find(this.id),this.load(t.attributes()),t)},i.prototype.refresh=function(t){var e;return e=this.constructor.irecords[this.id],e.load(t),this.trigger("refresh"),this},i.prototype.toJSON=function(){return this.attributes()},i.prototype.toString=function(){return"<"+this.constructor.className+" ("+JSON.stringify(this)+")>"},i.prototype.fromForm=function(e){var n,i,r,o,s,a,c,l,u,d,p,h,f,g;for(o={},h=t(e).find("[type=checkbox]:not([value])"),s=0,l=h.length;l>s;s++)n=h[s],o[n.name]=t(n).prop("checked");for(f=t(e).find('[type=checkbox][name$="[]"]'),a=0,u=f.length;u>a;a++)n=f[a],r=n.name.replace(/\[\]$/,""),o[r]||(o[r]=[]),t(n).prop("checked")&&o[r].push(n.value);for(g=t(e).serializeArray(),c=0,d=g.length;d>c;c++)i=g[c],o[p=i.name]||(o[p]=i.value);return this.load(o)},i.prototype.exists=function(){return this.constructor.exists(this.id)},i.prototype.update=function(t){var e,n;return this.trigger("beforeUpdate",t),n=this.constructor.irecords,n[this.id].load(this.attributes()),this.constructor.sort(),e=n[this.id].clone(),e.trigger("update",t),e.trigger("change","update",t),e},i.prototype.create=function(t){var e,n;return this.trigger("beforeCreate",t),this.id||(this.id=this.cid),n=this.dup(!1),this.constructor.addRecord(n),this.constructor.sort(),e=n.clone(),e.trigger("create",t),e.trigger("change","create",t),e},i.prototype.bind=function(t,e){var n,i,r,o,s,a;for(this.constructor.bind(t,n=function(t){return function(n){return n&&t.eql(n)?e.apply(t,arguments):void 0}}(this)),a=t.split(" "),r=function(t){return function(i){var r;return t.constructor.bind("unbind",r=function(o,s,a){if(o&&t.eql(o)){if(s&&s!==i)return;if(a&&a!==e)return;return t.constructor.unbind(i,n),t.constructor.unbind("unbind",r)}})}}(this),o=0,s=a.length;s>o;o++)i=a[o],r(i);return this},i.prototype.one=function(t,e){var n;return this.bind(t,n=function(i){return function(){return i.unbind(t,n),e.apply(i,arguments)}}(this))},i.prototype.trigger=function(){var t,e;return t=arguments.length>=1?p.call(arguments,0):[],t.splice(1,0,this),(e=this.constructor).trigger.apply(e,t)},i.prototype.listenTo=function(){return n.listenTo.apply(this,arguments)},i.prototype.listenToOnce=function(){return n.listenToOnce.apply(this,arguments)},i.prototype.stopListening=function(){return n.stopListening.apply(this,arguments)},i.prototype.unbind=function(t,e){var n,i,r,o,s;if(0===arguments.length)return this.trigger("unbind");if(t){for(o=t.split(" "),s=[],i=0,r=o.length;r>i;i++)n=o[i],s.push(this.trigger("unbind",n,e));return s}},i}(o),r.prototype.on=r.prototype.bind,r.prototype.off=r.prototype.unbind,e=function(e){function r(e){this.release=m(this.release,this);var n,i,o,s,a;this.options=e,a=this.options;for(i in a)s=a[i],this[i]=s;for(this.el||(this.el=document.createElement(this.tag)),this.el=t(this.el),this.$el=this.el,this.className&&this.el.addClass(this.className),this.attributes&&this.el.attr(this.attributes),this.events||(this.events=this.constructor.events),this.elements||(this.elements=this.constructor.elements),n=this;o=n.constructor.__super__;)o.events&&(this.events=t.extend({},o.events,this.events)),o.elements&&(this.elements=t.extend({},o.elements,this.elements)),n=o;this.events&&this.delegateEvents(this.events),this.elements&&this.refreshElements(),r.__super__.constructor.apply(this,arguments)}return g(r,e),r.include(n),r.include(i),r.prototype.eventSplitter=/^(\S+)\s*(.*)$/,r.prototype.tag="div",r.prototype.release=function(){return this.trigger("release",this),this.el.remove(),this.unbind(),this.stopListening()},r.prototype.$=function(e){return t(e,this.el)},r.prototype.delegateEvents=function(t){var e,n,i,r,o,s;s=[];for(n in t){if(r=t[n],"function"==typeof r)r=function(t){return function(e){return function(){return e.apply(t,arguments),!0}}}(this)(r);else{if(!this[r])throw new Error(""+r+" doesn't exist");r=function(t){return function(e){return function(){return t[e].apply(t,arguments),!0}}}(this)(r)}i=n.match(this.eventSplitter),e=i[1],o=i[2],""===o?s.push(this.el.bind(e,r)):s.push(this.el.on(e,o,r))}return s},r.prototype.refreshElements=function(){var t,e,n,i;n=this.elements,i=[];for(t in n)e=n[t],i.push(this[e]=this.$(t));return i},r.prototype.delay=function(t,e){return setTimeout(this.proxy(t),e||0)},r.prototype.html=function(t){return this.el.html(t.el||t),this.refreshElements(),this.el},r.prototype.append=function(){var t,e,n;return e=arguments.length>=1?p.call(arguments,0):[],e=function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.el||t);return r}(),(n=this.el).append.apply(n,e),this.refreshElements(),this.el},r.prototype.appendTo=function(t){return this.el.appendTo(t.el||t),this.refreshElements(),this.el},r.prototype.prepend=function(){var t,e,n;return e=arguments.length>=1?p.call(arguments,0):[],e=function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.el||t);return r}(),(n=this.el).prepend.apply(n,e),this.refreshElements(),this.el},r.prototype.replace=function(e){var n,i,r;return e=e.el||e,"string"==typeof e&&(e=t.trim(e)),r=[this.el,t((null!=(i=t.parseHTML(e))?i[0]:void 0)||e)],n=r[0],this.el=r[1],n.replaceWith(this.el),this.delegateEvents(this.events),this.refreshElements(),this.el},r}(o),t=("undefined"!=typeof window&&null!==window?window.jQuery:void 0)||("undefined"!=typeof window&&null!==window?window.Zepto:void 0)||function(t){return t},a=Object.create||function(t){var e;return e=function(){},e.prototype=t,new e},c=function(t){return"[object Array]"===Object.prototype.toString.call(t)},l=function(t){var e;if(!t)return!0;for(e in t)return!1;return!0},u=function(t){return Array.prototype.slice.call(t,0)},s=this.Spine={},"undefined"!=typeof module&&null!==module&&(module.exports=s),s.version="1.2.0",s.isArray=c,s.isBlank=l,s.$=t,s.Events=n,s.Log=i,s.Module=o,s.Controller=e,s.Model=r,o.extend.call(s,n),o.create=o.sub=e.create=e.sub=r.sub=function(t,e){var n;return n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return g(e,t),e}(this),t&&n.include(t),e&&n.extend(e),"function"==typeof n.unbind&&n.unbind(),n},r.setup=function(t,e){var n;return null==e&&(e=[]),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return g(e,t),e}(this),n.configure.apply(n,[t].concat(p.call(e))),n},s.Class=o}.call(this),function(){var t,e,n={}.hasOwnProperty,i=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},r=[].slice;e=this.Spine||require("spine"),t=e.$,e.Manager=function(t){function n(){this.controllers=[],this.bind("change",this.change),this.add.apply(this,arguments)}return i(n,t),n.include(e.Events),n.prototype.add=function(){var t,e,n,i,o;for(e=arguments.length>=1?r.call(arguments,0):[],o=[],n=0,i=e.length;i>n;n++)t=e[n],o.push(this.addOne(t));return o},n.prototype.addOne=function(t){return t.bind("active",function(e){return function(){var n;return n=arguments.length>=1?r.call(arguments,0):[],e.trigger.apply(e,["change",t].concat(r.call(n)))}}(this)),t.bind("release",function(e){return function(){return e.controllers.splice(e.controllers.indexOf(t),1)}}(this)),this.controllers.push(t)},n.prototype.deactivate=function(){return this.trigger.apply(this,["change",!1].concat(r.call(arguments)))},n.prototype.change=function(){var t,e,n,i,o,s;for(n=arguments[0],t=arguments.length>=2?r.call(arguments,1):[],s=this.controllers,i=0,o=s.length;o>i;i++)e=s[i],e!==n&&e.deactivate.apply(e,t);return n?n.activate.apply(n,t):void 0},n}(e.Module),e.Controller.include({active:function(){var t;return t=arguments.length>=1?r.call(arguments,0):[],"function"==typeof t[0]?this.bind("active",t[0]):(t.unshift("active"),this.trigger.apply(this,t)),this},isActive:function(){return this.el.hasClass("active")},activate:function(){return this.el.addClass("active"),this},deactivate:function(){return this.el.removeClass("active"),this}}),e.Stack=function(t){function n(){var t,i,r,o,s;n.__super__.constructor.apply(this,arguments),this.manager=new e.Manager,o=this.controllers;for(t in o){if(i=o[t],null!=this[t])throw Error("'@"+t+"' already assigned - choose a different name");this[t]=new i({stack:this}),this.add(this[t])}s=this.routes,r=function(t){return function(e,n){var i;return"function"==typeof n&&(i=n),i||(i=function(){var e;return(e=t[n]).active.apply(e,arguments)}),t.route(e,i)}}(this);for(t in s)i=s[t],r(t,i);this["default"]&&this[this["default"]].active()}return i(n,t),n.prototype.controllers={},n.prototype.routes={},n.prototype.className="spine stack",n.prototype.add=function(t){return this.manager.add(t),this.append(t)},n}(e.Controller),"undefined"!=typeof module&&null!==module&&(module.exports=e.Manager),"undefined"!=typeof module&&null!==module&&(module.exports.Stack=e.Stack)}.call(this),function(){var t,e,n,i,r,o,s,a,c,l,u=[].slice,d=function(t,e){return function(){return t.apply(e,arguments)}},p={}.hasOwnProperty,h=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};l=this.Spine||require("spine"),t=l.$,s=l.Model,a=t({}),e={getURL:function(t){return("function"==typeof t.url?t.url():void 0)||t.url},getCollectionURL:function(t){return t?"function"==typeof t.url?this.generateURL(t):t.url:void 0},getScope:function(t){return("function"==typeof t.scope?t.scope():void 0)||t.scope},generateURL:function(){var t,n,i,r,o;return i=arguments[0],t=arguments.length>=2?u.call(arguments,1):[],i.className?(n=i.className.toLowerCase()+"s",o=e.getScope(i)):(n="string"==typeof i.constructor.url?i.constructor.url:i.constructor.className.toLowerCase()+"s",o=e.getScope(i)||e.getScope(i.constructor)),t.unshift(n),t.unshift(o),r=t.join("/"),r=r.replace(/(\/\/)/g,"/"),r=r.replace(/^\/|\/$/g,""),0!==r.indexOf("../")?s.host+"/"+r:r},enabled:!0,disable:function(t){var e;if(!this.enabled)return t();this.enabled=!1;try{return t()}catch(n){throw e=n}finally{this.enabled=!0}},queue:function(t){return t?a.queue(t):a.queue()},clearQueue:function(){return this.queue([])}},n=function(){function n(){}return n.prototype.defaults={dataType:"json",processData:!1,headers:{"X-Requested-With":"XMLHttpRequest"}},n.prototype.queue=e.queue,n.prototype.ajax=function(e,n){return t.ajax(this.ajaxSettings(e,n))},n.prototype.ajaxQueue=function(n,i,r){var o,s,a,c,l;return s=null,o=t.Deferred(),a=o.promise(),e.enabled?(l=this.ajaxSettings(n,i),c=function(n){var i;return null!=(null!=r?r.id:void 0)&&(null==l.url&&(l.url=e.getURL(r)),null!=(i=l.data)&&(i.id=r.id)),l.data=JSON.stringify(l.data),s=t.ajax(l).done(o.resolve).fail(o.reject).then(n,n)},a.abort=function(e){var n;return s?s.abort(e):(n=t.inArray(c,this.queue()),n>-1&&this.queue().splice(n,1),o.rejectWith(l.context||l,[a,e,""]),a)},this.queue(c),a):a},n.prototype.ajaxSettings=function(e,n){return t.extend({},this.defaults,n,e)},n}(),i=function(t){function n(t){this.model=t,this.failResponse=d(this.failResponse,this),this.recordsResponse=d(this.recordsResponse,this)}return h(n,t),n.prototype.find=function(t,n,i){var r;return null==i&&(i={}),r=new this.model({id:t}),this.ajaxQueue(n,{type:"GET",url:i.url||e.getURL(r)}).done(this.recordsResponse).fail(this.failResponse)},n.prototype.all=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:"GET",url:n.url||e.getURL(this.model)}).done(this.recordsResponse).fail(this.failResponse)},n.prototype.fetch=function(t,e){var n;return null==t&&(t={}),null==e&&(e={}),(n=t.id)?(delete t.id,this.find(n,t,e).done(function(t){return function(n){return t.model.refresh(n,e)}}(this))):this.all(t,e).done(function(t){return function(n){return t.model.refresh(n,e)}}(this))},n.prototype.recordsResponse=function(t,e,n){return this.model.trigger("ajaxSuccess",null,e,n)},n.prototype.failResponse=function(t,e,n){return this.model.trigger("ajaxError",null,t,e,n)},n}(n),c=function(t){function n(t){this.record=t,this.failResponse=d(this.failResponse,this),this.recordResponse=d(this.recordResponse,this),this.model=this.record.constructor}return h(n,t),n.prototype.reload=function(t,e){return null==e&&(e={}),this.ajaxQueue(t,{type:"GET",url:e.url},this.record).done(this.recordResponse(e)).fail(this.failResponse(e))},n.prototype.create=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:"POST",contentType:"application/json",data:this.record.toJSON(),url:n.url||e.getCollectionURL(this.record)}).done(this.recordResponse(n)).fail(this.failResponse(n))},n.prototype.update=function(t,e){return null==e&&(e={}),this.ajaxQueue(t,{type:"PUT",contentType:"application/json",data:this.record.toJSON(),url:e.url},this.record).done(this.recordResponse(e)).fail(this.failResponse(e))},n.prototype.destroy=function(t,e){return null==e&&(e={}),this.ajaxQueue(t,{type:"DELETE",url:e.url},this.record).done(this.recordResponse(e)).fail(this.failResponse(e))},n.prototype.recordResponse=function(t){return null==t&&(t={}),function(n){return function(i,r,o){var s,a;return e.disable(function(){return l.isBlank(i)||n.record.destroyed?void 0:(i.id&&n.record.id!==i.id&&n.record.changeID(i.id),n.record.refresh(i))}),n.record.trigger("ajaxSuccess",i,r,o),null!=(s=t.success)&&s.apply(n.record),null!=(a=t.done)?a.apply(n.record):void 0}}(this)},n.prototype.failResponse=function(t){return null==t&&(t={}),function(e){return function(n,i,r){var o,s;return e.record.trigger("ajaxError",n,i,r),null!=(o=t.error)&&o.apply(e.record),null!=(s=t.fail)?s.apply(e.record):void 0}}(this)},n}(n),s.host="",o={ajax:function(){return new c(this)},url:function(){var t;return t=arguments.length>=1?u.call(arguments,0):[],t.unshift(encodeURIComponent(this.id)),e.generateURL.apply(e,[this].concat(u.call(t)))}},r={ajax:function(){return new i(this)},url:function(){var t;return t=arguments.length>=1?u.call(arguments,0):[],e.generateURL.apply(e,[this].concat(u.call(t)))}},s.Ajax={extended:function(){return this.fetch(this.ajaxFetch),this.change(this.ajaxChange),this.extend(r),this.include(o)},ajaxFetch:function(){var t;return(t=this.ajax()).fetch.apply(t,arguments)},ajaxChange:function(t,e,n){return null==n&&(n={}),n.ajax!==!1?t.ajax()[e](n.ajax,n):void 0}},s.Ajax.Methods={extended:function(){return this.extend(r),this.include(o)}},e.defaults=n.prototype.defaults,e.Base=n,e.Singleton=c,e.Collection=i,l.Ajax=e,"undefined"!=typeof module&&null!==module&&(module.exports=e)}.call(this),function(){var t,e,n,i,r,o,s={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c=[].slice;e=this.Spine||require("spine"),t=e.$,i=/^#*/,r=/:([\w\d]+)/g,o=/\*([\w\d]+)/g,n=/[-[\]{}()+?.,\\^$|#\s]/g,e.Route=function(s){function l(t,e){var i;if(this.path=t,this.callback=e,this.names=[],"string"==typeof t){for(r.lastIndex=0;null!==(i=r.exec(t));)this.names.push(i[1]);for(o.lastIndex=0;null!==(i=o.exec(t));)this.names.push(i[1]);t=t.replace(n,"\\$&").replace(r,"([^/]*)").replace(o,"(.*?)"),this.route=new RegExp("^"+t+"$")}else this.route=t}var u;return a(l,s),l.extend(e.Events),l.historySupport=null!=(null!=(u=window.history)?u.pushState:void 0),l.routes=[],l.options={trigger:!0,history:!1,shim:!1,replace:!1,redirect:!1},l.add=function(t,e){var n,i,r;if("object"!=typeof t||t instanceof RegExp)return this.routes.push(new this(t,e));r=[];for(n in t)i=t[n],r.push(this.add(n,i));return r},l.setup=function(e){return null==e&&(e={}),this.options=t.extend({},this.options,e),this.options.history&&(this.history=this.historySupport&&this.options.history),this.options.shim?void 0:(this.history?t(window).bind("popstate",this.change):t(window).bind("hashchange",this.change),this.change())},l.unbind=function(){return this.options.shim?void 0:this.history?t(window).unbind("popstate",this.change):t(window).unbind("hashchange",this.change)},l.navigate=function(){var e,n,i,r,o;if(e=arguments.length>=1?c.call(arguments,0):[],i={},n=e[e.length-1],"object"==typeof n?i=e.pop():"boolean"==typeof n&&(i.trigger=e.pop()),i=t.extend({},this.options,i),r=e.join("/"),this.path!==r&&(this.path=r,this.trigger("navigate",this.path),i.trigger&&(o=this.matchRoute(this.path,i)),!i.shim)){if(!o){if("function"==typeof i.redirect)return i.redirect.apply(this,[this.path,i]);i.redirect===!0&&this.redirect(this.path)}return this.history&&i.replace?history.replaceState({},document.title,this.path):this.history?history.pushState({},document.title,this.path):window.location.hash=this.path}},l.getPath=function(){var t;return this.history?(t=window.location.pathname,"/"!==t.substr(0,1)&&(t="/"+t)):(t=window.location.hash,t=t.replace(i,"")),t},l.getHost=function(){return""+window.location.protocol+"//"+window.location.host},l.change=function(){var t;return t=this.getPath(),t!==this.path?(this.path=t,this.matchRoute(this.path)):void 0},l.matchRoute=function(t,e){var n,i,r,o;for(o=this.routes,i=0,r=o.length;r>i;i++)if(n=o[i],n.match(t,e))return this.trigger("change",n,t),n},l.redirect=function(t){return window.location=t},l.prototype.match=function(t,e){var n,i,r,o,s,a;if(null==e&&(e={}),i=this.route.exec(t),!i)return!1;if(e.match=i,o=i.slice(1),this.names.length)for(n=s=0,a=o.length;a>s;n=++s)r=o[n],e[this.names[n]]=r;return this.callback.call(null,e)!==!1},l}(e.Module),e.Route.change=e.Route.proxy(e.Route.change),e.Controller.include({route:function(t,n){return e.Route.add(t,this.proxy(n))},routes:function(t){var e,n,i;i=[];for(e in t)n=t[e],i.push(this.route(e,n));return i},navigate:function(){return e.Route.navigate.apply(e.Route,arguments)}}),"undefined"!=typeof module&&null!==module&&(module.exports=e.Route)}.call(this),function(){this.COMPONENTS={label:{id:"label",text:I18N_STRINGS["widgets.label"],tb_text:I18N_STRINGS["widgets.label"],width:80,height:45,fs:14,br:0,bs:0,ha:"center",va:"middle",z:5,lh:1.45},text_view:{id:"text_view",text:I18N_STRINGS["widgets.text_view_placeholder"],tb_text:I18N_STRINGS["widgets.text_view"],width:200,height:64,fs:12,br:0,bs:0,ha:"left",va:"top",z:5,lh:1.45},pg:{id:"pg",desc:I18N_STRINGS.pg_desc,tb_icon:"tap",icon:"tap",width:52,height:52,br:0,bs:0,z:7},lr:{id:"lr",desc:I18N_STRINGS.lr_desc,tb_text:I18N_STRINGS["widgets.lr"],width:45,height:45,br:0,bs:0,z:7},icon_button:{id:"icon_button",text:"",desc:I18N_STRINGS.ib_desc,icon:"star",tb_icon:"star",width:45,height:45,br:0,bs:0,is:24,z:5},"switch":{id:"switch",text:"",width:50,height:30,br:0,bs:0,z:5},button:{id:"button",text:I18N_STRINGS["widgets.button"],tb_text:I18N_STRINGS["widgets.button"],width:60,height:30,fs:14,br:8,bs:1,ha:"center",va:"middle",z:5},text_field:{id:"text_field",text:I18N_STRINGS["widgets.text_input"],tb_text:I18N_STRINGS["widgets.text_input"],width:200,height:30,fs:14,br:8,bs:1,ha:"left",va:"middle",z:5},image_view:{id:"image_view",desc:I18N_STRINGS.img_desc,text:"",width:200,height:120,tb_icon:"picture-o",br:0,bs:0,z:3},map_view:{id:"map_view",desc:I18N_STRINGS.map_desc,text:"",width:"100%",height:230,z:2},navigation_bar:{id:"navigation_bar",desc:I18N_STRINGS.navbar_desc,text:I18N_STRINGS["widgets.navbar_title"],tb_text:I18N_STRINGS["widgets.navbar"],width:"100%",height:45,fs:18,top:20,left:0,z:4},search_bar:{id:"search_bar",text:I18N_STRINGS["widgets.search"],tb_text:I18N_STRINGS["widgets.search"],width:"100%",height:45,tb_icon:"search",fs:14,ha:"left",z:4},tab_bar:{id:"tab_bar",desc:I18N_STRINGS.tabbar_desc,text:"",tb_text:I18N_STRINGS["widgets.tab_bar"],width:"100%",height:45,bottom:0,left:0,z:4},tab_item:{id:"tab_item",text:I18N_STRINGS["widgets.tab"],tb_text:I18N_STRINGS["widgets.tab"],tb_icon:"star",icon:"star",width:80,height:45,fs:12,is:24,z:5},rectangle:{id:"rectangle",text:"",width:"100%",height:100,z:2},rounded_rect:{id:"rounded_rect",text:"",width:300,height:100,br:8,bs:1,z:2},hr:{id:"hr",text:"",width:150,height:11,z:5},ve:{id:"ve",text:"",width:11,height:150,z:5},keyboard:{id:"keyboard",text:I18N_STRINGS["return"],width:"100%",tb_icon:"keyboard-o",bottom:0,left:0,z:2},status_bar:{id:"status_bar",text:I18N_STRINGS.carrier,tb_text:I18N_STRINGS.carrier,width:"100%",height:20,tb_icon:"signal",left:0,top:0,z:4},sticky:{id:"sticky",tb_text:I18N_STRINGS.sticky,width:200,height:180,z:10}},this.FAICONS=[{type:["basics"],title:"star,五角星",icon:"star"},{type:["basics"],title:"user,用户,人",icon:"user"},{type:["directional"],title:"angle-right",icon:"angle-right"},{type:["directional"],title:"angle-left",icon:"angle-left"},{type:["basics"],title:"home,家,房子",icon:"home"},{type:["directional"],title:"chevron-left",icon:"chevron-left"},{type:["directional"],title:"chevron-down",icon:"chevron-down"},{type:["directional"],title:"chevron-right",icon:"chevron-right"},{type:["basics"],title:"map-marker,地图",icon:"map-marker"},{type:["basics","form"],title:"circle,圆圈",icon:"circle"},{type:[],icon:"cog"},{type:["basics"],title:"plus,加",icon:"plus"},{type:["basics"],title:"heart,心,喜欢",icon:"heart"},{type:["basics"],title:"search,搜索",icon:"search"},{type:["directional"],title:"arrow-left",icon:"arrow-left"},{type:["basics"],title:"envelope-o,信封,邮件",icon:"envelope-o"},{type:["basics"],title:"calendar,日历",icon:"calendar"},{type:["basics","form"],title:"square-o,方块",icon:"square-o"},{type:[],icon:"times"},{type:["text"],title:"th-list,列表",icon:"th-list"},{type:["basics","form"],title:"circle-o,圆圈",icon:"circle-o"},{type:["basics"],title:"check,对号",icon:"check"},{type:[],icon:"navicon"},{type:["directional"],title:"caret-down",icon:"caret-down"},{type:["basics"],title:"comment-o,评论",icon:"comment-o"},{type:["basics"],title:"users,group,用户,讨论组,人",icon:"users"},{type:["basics"],title:"comment,评论",icon:"comment"},{type:["basics"],title:"thumbs-o-up,大拇指",icon:"thumbs-o-up"},{type:["basics"],title:"share-square-o,分享",icon:"share-square-o"},{type:["basics"],title:"camera,镜头,照相机",icon:"camera"},{type:[],icon:"bars"},{type:["basics"],title:"clock-o,时钟,闹钟",icon:"clock-o"},{type:["directional"],title:"angle-double-down",icon:"angle-double-down"},{type:["basics"],title:"shopping-cart,购物车,购物",icon:"shopping-cart"},{type:["basics"],title:"ellipsis-h,省略号",icon:"ellipsis-h"},{type:["basics"],title:"check-circle,对号",icon:"check-circle"},{type:["basics"],title:"star-o,五角星",icon:"star-o"},{type:["basics"],title:"female,女性,女子",icon:"female"},{type:["basics"],title:"asterisk,星号",icon:"asterisk"},{type:["basics"],title:"heart-o,心,喜欢",icon:"heart-o"},{type:["basics"],title:"comments-o,评论",icon:"comments-o"},{type:["directional"],title:"caret-right",icon:"caret-right"},{type:["text"],title:"list-alt,列表",icon:"list-alt"},{type:["basics"],title:"comments,评论",icon:"comments"},{type:["basics"],title:"pencil,铅笔",icon:"pencil"},{type:["basics"],title:"male,男性,男子",icon:"male"},{type:["basics"],title:"gift,礼物",icon:"gift"},{type:[],icon:"file-o"},{type:["basics","form"],title:"check-square-o,对号",icon:"check-square-o"},{type:["basics"],title:"smile-o,微笑,开心,表情",icon:"smile-o"},{type:["directional"],title:"angle-down",icon:"angle-down"},{type:["basics"],title:"thumbs-o-down,大拇指",icon:"thumbs-o-down"},{type:[],icon:"pencil-square-o"},{type:["basics"],title:"phone,电话",icon:"phone"},{type:["basics"],title:"bookmark,书签",icon:"bookmark"},{type:[],icon:"photo"},{type:["basics"],title:"eye,预览,眼睛",icon:"eye"},{type:["text"],title:"list-ul,列表",icon:"list-ul"},{type:["video"],title:"play,播放",icon:"play"},{type:["basics"],title:"key,钥匙",icon:"key"},{type:["basics"],title:"location-arrow,位置,导航",icon:"location-arrow"},{type:[],icon:"paper-plane"},{type:["basics"],title:"wrench,扳手",icon:"wrench"},{type:[],icon:"bar-chart-o"},{type:["directional"],title:"arrow-circle-o-up",icon:"arrow-circle-o-up"},{type:[],icon:"picture-o"},{type:["basics"],title:"share,分享",icon:"share"},{type:["text"],title:"th,列表",icon:"th"},{type:["directional"],title:"long-arrow-left",icon:"long-arrow-left"},{type:["basics"],title:"plus-circle,加",icon:"plus-circle"},{type:["basics"],title:"trophy,奖品",icon:"trophy"},{type:["basics"],title:"ellipsis-v,省略号",icon:"ellipsis-v"},{type:["basics"],title:"sort-desc,排序,排列",icon:"sort-desc"},{type:["text"],title:"align-justify,对齐",icon:"align-justify"},{type:["basics"],title:"music,音乐",icon:"music"},{type:["basics"],title:"trash-o,垃圾桶,回收站,删除",icon:"trash-o"},{type:["brand"],title:"facebook",icon:"facebook"},{type:["text"],title:"th-large,列表",icon:"th-large"},{type:["basics"],title:"globe,地球",icon:"globe"},{type:["basics"],title:"bell-o,铃铛",icon:"bell-o"},{type:["basics"],title:"refresh,刷新",icon:"refresh"},{type:["directional"],title:"caret-left",icon:"caret-left"},{type:["basics"],title:"bookmark-o,书签",icon:"bookmark-o"},{type:["basics"],title:"book,书",icon:"book"},{type:["basics"],title:"glass,玻璃杯,杯子",icon:"glass"},{type:["basics"],title:"lightbulb-o,灯泡",icon:"lightbulb-o"},{type:[],icon:"wechat"},{type:["basics"],title:"credit-card,信用卡,银行卡",icon:"credit-card"},{type:["basics"],title:"bell,铃铛",icon:"bell"},{type:["basics"],title:"send,paper-plane,发送,纸飞机",icon:"send"},{type:[],icon:"repeat"},{type:["basics"],title:"minus-circle,减号,横线",icon:"minus-circle"},{type:["directional"],title:"arrow-circle-right",icon:"arrow-circle-right"},{type:["brand"],title:"weibo,微博",icon:"weibo"},{type:["basics"],title:"reply,回复",icon:"reply"},{type:["basics"],title:"signal,信号",icon:"signal"},{type:["basics"],title:"truck,卡车",icon:"truck"},{type:["basics"],title:"minus,减号,横线",icon:"minus"},{type:["basics"],title:"lock,锁",icon:"lock"},{type:["directional"],title:"chevron-circle-right",icon:"chevron-circle-right"},{type:["basics"],title:"thumbs-up,大拇指,赞",icon:"thumbs-up"},{type:["basics"],title:"video-camera,视频,摄像机",icon:"video-camera"},{type:["basics"],title:"flag,旗帜,旗子",icon:"flag"},{type:["directional"],title:"arrow-up",icon:"arrow-up"},{type:["basics"],title:"gamepad",icon:"gamepad"},{type:["basics"],title:"crosshairs",icon:"crosshairs"},{type:["directional"],title:"chevron-up",icon:"chevron-up"},{type:["directional"],title:"arrow-circle-left",icon:"arrow-circle-left"},{type:[],icon:"cogs"},{type:["text"],title:"table,表格",icon:"table"},{type:["directional"],title:"caret-up",icon:"caret-up"},{type:["basics"],title:"folder-open,文件夹",icon:"folder-open"},{type:["basics"],title:"flask,烧瓶,烧杯",icon:"flask"},{type:["brand"],title:"qq,腾讯",icon:"qq"},{type:["brand"],title:"github-alt",icon:"github-alt"},{type:["basics"],title:"spinner,加载",icon:"spinner"},{type:["basics"],title:"sun-o,太阳",icon:"sun-o"},{type:["basics"],title:"child,小孩,孩子",icon:"child"},{type:["basics"],title:"download,下载",icon:"download"},{type:["basics"],title:"filter,过滤",icon:"filter"},{type:[],icon:"user-md"},{type:["brand"],title:"flickr",icon:"flickr"},{type:[],icon:"jpy"},{type:["directional"],title:"hand-o-right",icon:"hand-o-right"},{type:["basics"],title:"rss",icon:"rss"},{type:["basics"],title:"circle-o-notch,圆圈",icon:"circle-o-notch"},{type:["directional"],title:"arrow-circle-o-down",icon:"arrow-circle-o-down"},{type:[],icon:"bolt"},{type:["brand"],title:"facebook-square",icon:"facebook-square"},{type:["basics"],title:"fire,火",icon:"fire"},{type:["brand"],title:"twitter-square",icon:"twitter-square"},{type:["video"],title:"backward,后退",icon:"backward"},{type:["directional"],title:"arrow-right",icon:"arrow-right"},{type:["basics"],title:"reorder,bars,navicon,排序",icon:"reorder"},{type:["video"],title:"forward,前进",icon:"forward"},{type:["directional"],title:"arrow-down",icon:"arrow-down"},{type:["basics"],title:"check-circle-o,对号",icon:"check-circle-o"},{type:["basics"],title:"send-o,paper-plane-o,发送,纸飞机",icon:"send-o"},{type:["basics"],title:"calendar-o,日历",icon:"calendar-o"},{type:["basics"],title:"car,automobile,汽车",icon:"car"},{type:["text"],title:"paperclip,回形针",icon:"paperclip"},{type:["directional"],title:"angle-double-right",icon:"angle-double-right"},{type:["basics"],title:"cutlery,餐具,刀叉",icon:"cutlery"},{type:["basics"],title:"briefcase",icon:"briefcase"},{type:["basics","form"],title:"check-square,对号",icon:"check-square"},{type:[],icon:"bank"},{type:["basics"],title:"info-circle,提示",icon:"info-circle"},{type:["basics"],title:"star-half-o,五角星",icon:"star-half-o"},{type:["basics"],title:"compass,指南针",icon:"compass"},{type:["basics"],title:"money,钱,钞票",icon:"money"},{type:[],icon:"usd"},{type:[],icon:"exclamation-triangle"},{type:["basics"],title:"camera-retro,镜头,照相机",icon:"camera-retro"},{type:["basics"],title:"microphone,麦克风,话筒",icon:"microphone"},{type:["basics"],title:"volume-up,音量",icon:"volume-up"},{type:[],icon:"automobile"},{type:["basics"],title:"search-plus,搜索",icon:"search-plus"},{type:["basics","form"],title:"minus-square-o,减号",icon:"minus-square-o"},{type:["basics"],title:"times-circle,关闭,删除,乘",icon:"times-circle"},{type:["directional"],title:"long-arrow-right",icon:"long-arrow-right"},{type:["basics"],title:"building-o,建筑",icon:"building-o"},{type:["basics"],title:"sign-in,登录",icon:"sign-in"},{type:["text"],title:"list,列表",icon:"list"},{type:["basics"],title:"tags,标签",icon:"tags"},{type:["basics"],title:"coffee,咖啡",icon:"coffee"},{type:["basics"],title:"bullhorn,放大器,扩音器,话筒",icon:"bullhorn"},{type:["video"],title:"play-circle-o,播放",icon:"play-circle-o"},{type:[],icon:"file-text-o"},{type:["basics"],title:"envelope,信封,邮件",icon:"envelope"},{type:["basics"],title:"phone-square,电话",icon:"phone-square"},{type:["video"],title:"step-forward,前进,下一段",icon:"step-forward"},{type:["video"],title:"step-backward,后退,上一段",icon:"step-backward"},{type:["basics"],title:"barcode,条形码",icon:"barcode"},{type:[],icon:"life-bouy"},{type:[],icon:"cab"},{type:["basics"],title:"sort-asc,排序,排列",icon:"sort-asc"},{type:["basics"],title:"folder,文件夹",icon:"folder"},{type:["basics"],title:"film,电影,胶片",icon:"film"},{type:["basics"],title:"plane,飞机",icon:"plane"},{type:["basics"],title:"tasks,任务",icon:"tasks"},{type:["basics"],title:"external-link,链接",icon:"external-link"},{type:["brand"],title:"twitter",icon:"twitter"},{type:["basics"],title:"exchange,交换",icon:"exchange"},{type:["basics"],title:"thumbs-down,大拇指",icon:"thumbs-down"},{type:["brand"],title:"codepen",icon:"codepen"},{type:["basics"],title:"magnet,磁铁",icon:"magnet"},{type:["brand"],title:"vimeo-square",icon:"vimeo-square"},{type:["brand"],title:"instagram",icon:"instagram"},{type:["brand"],title:"renren,人人",icon:"renren"},{type:["brand"],title:"android,安卓",icon:"android"},{type:["brand"],title:"github-square",icon:"github-square"},{type:["video"],title:"fast-forward,快进",icon:"fast-forward"},{type:["basics"],title:"inbox,收件箱",icon:"inbox"},{type:["basics"],title:"tag,标签",icon:"tag"},{type:["basics"],title:"quote-right,引号",icon:"quote-right"},{type:["basics"],title:"suitcase,手提箱",icon:"suitcase"},{type:["basics"],title:"info,提示",icon:"info"},{type:["basics"],title:"power-off,关机",icon:"power-off"},{type:["basics"],title:"headphones,耳机",icon:"headphones"},{type:["basics"],title:"road,路",icon:"road"},{type:["basics"],title:"exclamation,感叹号",icon:"exclamation"},{type:["basics","form"],title:"plus-square-o,加号",icon:"plus-square-o"},{type:["directional"],title:"angle-up",icon:"angle-up"},{type:["basics"],title:"pencil-square,铅笔",icon:"pencil-square"},{type:["brand"],title:"ra,rebel",icon:"ra"},{type:["directional"],title:"arrow-circle-down",icon:"arrow-circle-down"},{type:["basics"],title:"frown-o,皱眉,难过,表情",icon:"frown-o"},{type:["basics"],title:"mobile,mobile-phone,手机",icon:"mobile"},{type:["basics"],title:"lemon-o,柠檬",icon:"lemon-o"},{type:["basics"],title:"qrcode,二维码",icon:"qrcode"},{type:["text"],title:"link,链接",icon:"link"},{type:["basics"],title:"umbrella,雨伞",icon:"umbrella"},{type:["brand"],title:"foursquare",icon:"foursquare"},{type:["basics"],title:"paw,手掌,熊掌",icon:"paw"},{type:["basics"],title:"folder-open-o,文件夹",icon:"folder-open-o"},{type:["basics"],title:"gavel,legal",icon:"gavel"},{type:[],icon:"tachometer"},{type:["text"],title:"bold,粗体",icon:"bold"},{type:["basics","form"],title:"plus-square,加号",icon:"plus-square"},{type:[],icon:"scissors"},{type:["brand"],title:"weixin,wechat,微信",icon:"weixin"},{type:["basics"],title:"keyboard-o,键盘",icon:"keyboard-o"},{type:["video"],title:"pause,暂停",icon:"pause"},{type:["brand"],title:"tencent-weibo,腾讯微博",icon:"tencent-weibo"},{type:["brand"],title:"git-square",icon:"git-square"},{type:["basics"],title:"cubes,立方体,方块",icon:"cubes"},{type:["basics","form"],title:"dot-circle-o,圆圈",icon:"dot-circle-o"},{type:["brand"],title:"windows",icon:"windows"},{type:["directional"],title:"long-arrow-up",icon:"long-arrow-up"},{type:["brand"],title:"hacker-news",icon:"hacker-news"},{type:["basics"],title:"external-link-square,链接",icon:"external-link-square"},{type:["basics"],title:"rocket,火箭",icon:"rocket"},{type:["basics"],title:"certificate",icon:"certificate"},{type:["video"],title:"fast-backward,快退",icon:"fast-backward"},{type:["basics"],title:"ban,禁止",icon:"ban"},{type:["basics"],title:"tint",icon:"tint"},{type:["text"],title:"italic,斜体",icon:"italic"},{type:[],icon:"file-text"},{type:["basics"],title:"cloud,云",icon:"cloud"},{type:["basics","form"],title:"minus-square,减号",icon:"minus-square"},{type:["basics"],title:"random,随机",icon:"random"},{type:[],icon:"clipboard"},{type:["brand"],title:"google-plus-square",icon:"google-plus-square"},{type:["basics"],title:"image,photo,picture-o,图片",icon:"image"},{type:["basics"],title:"taxi,cab,出租",icon:"taxi"},{type:["basics"],title:"anchor,锚",icon:"anchor"},{type:["basics"],title:"bullseye,靶子,靶心",icon:"bullseye"},{type:["basics"],title:"reply-all,回复所有",icon:"reply-all"},{type:["brand"],title:"pinterest",icon:"pinterest"},{type:["basics"],title:"ticket,票",icon:"ticket"},{type:["basics"],title:"leaf,树叶",icon:"leaf"},{type:["basics"],title:"archive,归档",icon:"archive"},{type:["basics"],title:"times-circle-o,关闭,删除,乘",icon:"times-circle-o"},{type:["brand"],title:"vine",icon:"vine"},{type:["basics"],title:"tree,树",icon:"tree"},{type:["text"],title:"list-ol,列表",icon:"list-ol"},{type:["video"],title:"expand,放大,全屏",icon:"expand"},{type:["basics"],title:"question,问号,问题",icon:"question"},{type:["basics"],title:"search-minus,搜索",icon:"search-minus"},{type:["text"],title:"font,字体",icon:"font"},{type:["basics"],title:"quote-left,引号",icon:"quote-left"},{type:[],icon:"files-o"},{type:["basics"],title:"sign-out,注销",icon:"sign-out"},{type:["basics"],title:"question-circle,问号,问题",icon:"question-circle"},{type:[],icon:"ge"},{type:["basics"],title:"exclamation-circle,感叹号",icon:"exclamation-circle"},{type:["directional"],title:"chevron-circle-left",icon:"chevron-circle-left"},{type:[],icon:"stethoscope"},{type:[],icon:"chain-broken"},{type:["brand"],title:"dribbble",icon:"dribbble"},{type:["brand"],title:"google-plus",icon:"google-plus"},{type:[],icon:"ambulance"},{type:["text"],title:"text-height,文字高度",icon:"text-height"},{type:["basics"],title:"print,打印",icon:"print"},{type:[],icon:"undo"},{type:["basics"],title:"wheelchair,轮椅",icon:"wheelchair"},{type:["basics"],title:"shield,盾牌",icon:"shield"},{type:["basics","directional"],title:"arrows-h",icon:"arrows-h"},{type:["brand"],title:"vk",icon:"vk"},{type:["brand"],title:"stack-exchange",icon:"stack-exchange"},{type:["brand"],title:"github",icon:"github"},{type:["directional"],title:"angle-double-left",icon:"angle-double-left"},{type:["brand"],title:"linkedin",icon:"linkedin"},{type:["brand"],title:"linux",icon:"linux"},{type:["basics"],title:"meh-o",icon:"meh-o"},{type:["brand"],title:"jsfiddle",icon:"jsfiddle"},{type:["basics"],title:"fighter-jet,飞机",icon:"fighter-jet"},{type:["text"],title:"indent,缩进",icon:"indent"},{type:["basics"],title:"sort-amount-desc,排序,排列",icon:"sort-amount-desc"},{type:["text"],title:"align-left,对齐",icon:"align-left"},{type:["basics"],title:"share-square,分享",icon:"share-square"},{type:["basics"],title:"hdd-o,硬盘",icon:"hdd-o"},{type:["text"],title:"floppy-o,软盘,保存",icon:"floppy-o"},{type:["brand"],title:"drupal",icon:"drupal"},{type:["text"],title:"align-center,对齐",icon:"align-center"},{type:["basics"],title:"adjust",icon:"adjust"},{type:["directional"],title:"hand-o-up",icon:"hand-o-up"},{type:["basics"],title:"unlock,解锁",icon:"unlock"},{type:["basics"],title:"graduation-cap",icon:"graduation-cap"},{type:["brand","video"],title:"youtube-play",icon:"youtube-play"},{type:["brand"],title:"spotify",icon:"spotify"},{type:[],icon:"file-powerpoint-o"},{type:["brand"],title:"stack-overflow",icon:"stack-overflow"},{type:["basics"],title:"recycle,回收,循环",icon:"recycle"},{type:[],icon:"medkit"},{type:["basics"],title:"volume-off,音量",icon:"volume-off"},{type:["basics"],title:"flag-checkered,旗帜,旗子",icon:"flag-checkered"},{type:["directional"],title:"chevron-circle-down",icon:"chevron-circle-down"},{type:["basics"],title:"volume-down,音量",icon:"volume-down"},{type:["basics"],title:"eye-slash,预览,眼睛",icon:"eye-slash"},{type:[],icon:"paper-plane-o"},{type:[],icon:"file-word-o"},{type:["directional"],title:"long-arrow-down",icon:"long-arrow-down"},{type:["basics"],title:"unlock-alt,解锁",icon:"unlock-alt"},{type:["basics"],title:"cloud-upload,云,上传",icon:"cloud-upload"},{type:["basics"],title:"folder-o,文件夹",icon:"folder-o"},{type:["basics","text"],title:"eraser,橡皮擦",icon:"eraser"},{type:["video"],title:"play-circle,播放",icon:"play-circle"},{type:["directional","video"],title:"arrows-alt,放大,全屏",icon:"arrows-alt"},{type:["brand"],title:"dropbox",icon:"dropbox"},{type:["brand"],title:"git",icon:"git"},{type:["brand"],title:"linkedin-square",icon:"linkedin-square"},{type:["basics"],title:"language,语言",icon:"language"},{type:["brand"],title:"gittip",icon:"gittip"},{type:["basics"],title:"laptop,笔记本",icon:"laptop"},{type:["brand"],title:"joomla",icon:"joomla"},{type:["basics"],title:"sort-alpha-desc,排序,排列",icon:"sort-alpha-desc"},{type:["basics"],title:"sort,排序,排列",icon:"sort"},{type:["brand"],title:"skype",icon:"skype"},{type:["basics"],title:"thumb-tack,大拇指",icon:"thumb-tack"},{type:["brand"],title:"behance",icon:"behance"},{type:["basics"],title:"bug,虫子",icon:"bug"},{type:["basics"],title:"sitemap",icon:"sitemap"},{type:["basics"],title:"building,建筑",icon:"building"},{type:["text"],title:"columns,列",icon:"columns"},{type:["video"],title:"compress,压缩",icon:"compress"},{type:["basics"],title:"crop,裁剪",icon:"crop"},{type:["brand"],title:"pied-piper-alt",icon:"pied-piper-alt"},{type:[],icon:"institution"},{type:["brand"],title:"behance-square",icon:"behance-square"},{type:["basics"],title:"sort-amount-asc,排序,排列",icon:"sort-amount-asc"},{type:["basics"],title:"beer,啤酒",icon:"beer"},{type:["basics"],title:"level-up,向上",icon:"level-up"},{type:["brand"],title:"pied-piper",icon:"pied-piper"},{type:["basics"],title:"desktop,桌面",icon:"desktop"},{type:["brand"],title:"trello",icon:"trello"},{type:["brand"],title:"digg",icon:"digg"},{type:["brand"],title:"google",icon:"google"},{type:["brand"],title:"html5",icon:"html5"},{type:[],icon:"hospital-o"},{type:["basics"],title:"envelope-square,信封,邮件",icon:"envelope-square"},{type:["text"],title:"superscript,上标",icon:"superscript"},{type:["basics"],title:"caret-square-o-left,三角",icon:"caret-square-o-left"},{type:["text"],title:"strikethrough,删除线",icon:"strikethrough"},{type:["basics"],title:"cloud-download,云,下载",icon:"cloud-download"},{type:["video"],title:"stop,停止",icon:"stop"},{type:["basics"],title:"sort-numeric-asc,排序,排列",icon:"sort-numeric-asc"},{type:["basics"],title:"flag-o,旗帜,旗子",icon:"flag-o"},{type:["directional"],title:"arrow-circle-o-right",icon:"arrow-circle-o-right"},{type:[],icon:"h-square"},{type:["brand"],title:"steam-square",icon:"steam-square"},{type:["basics"],title:"magic,魔法",icon:"magic"},{type:["brand"],title:"soundcloud",icon:"soundcloud"},{type:["brand"],title:"pagelines",icon:"pagelines"},{type:["brand"],title:"steam",icon:"steam"},{type:["basics"],title:"moon-o,月亮",icon:"moon-o"},{type:["directional"],title:"chevron-circle-up",icon:"chevron-circle-up"},{type:["basics"],title:"retweet,转推,转发",icon:"retweet"},{type:["basics"],title:"space-shuttle",icon:"space-shuttle"},{type:["brand"],title:"reddit",icon:"reddit"},{type:["basics"],title:"microphone-slash,麦克风,话筒",icon:"microphone-slash"},{type:[],icon:"file-excel-o"},{type:["brand"],title:"reddit-square",icon:"reddit-square"},{type:["text"],title:"align-right,对齐",icon:"align-right"},{type:[],icon:"file-pdf-o"},{type:["brand"],title:"xing-square",icon:"xing-square"},{type:[],icon:"file-picture-o"},{type:["brand"],title:"adn",icon:"adn"},{type:["basics"],title:"spoon,勺子",icon:"spoon"},{type:["brand"],title:"youtube",icon:"youtube"},{type:["basics"],title:"database,数据库",icon:"database"},{type:["basics"],title:"area-chart,图表",icon:"area-chart"},{type:["basics","directional"],title:"arrows",icon:"arrows"},{type:["basics","directional"],title:"arrows-v",icon:"arrows-v"},{type:["basics"],title:"at",icon:"at"},{type:["basics"],title:"bar-chart,条形图,图表",icon:"bar-chart"},{type:["basics"],title:"bell-slash,铃铛",icon:"bell-slash"},{type:["basics"],title:"bell-slash-o,铃铛",icon:"bell-slash-o"},{type:["basics"],title:"bicycle,自行车",icon:"bicycle"},{type:["basics"],title:"binoculars",icon:"binoculars"},{type:["basics"],title:"birthday-cake,生日蛋糕",icon:"birthday-cake"},{type:["basics"],title:"flash,bolt,闪电",icon:"flash"},{type:["basics"],title:"bomb,炸弹",icon:"bomb"},{type:["basics"],title:"bus,公共汽车,公车",icon:"bus"},{type:["basics"],title:"calculator,计算器",icon:"calculator"},{type:["basics"],title:"caret-square-o-down,三角",icon:"caret-square-o-down"},{type:["basics"],title:"caret-square-o-right,三角",icon:"caret-square-o-right"},{type:["basics"],title:"caret-square-o-up,三角",icon:"caret-square-o-up"},{type:["basics"],title:"cc,抄送",icon:"cc"},{type:["basics"],title:"circle-thin,圆圈",icon:"circle-thin"},{type:["basics"],title:"code,代码",icon:"code"},{type:["basics"],title:"code-fork,代码",icon:"code-fork"},{type:["basics"],title:"gear,cog,setting,设置,齿轮",icon:"gear"},{type:["basics"],title:"gears,cogs,settings,设置,齿轮",icon:"gears"},{type:["basics"],title:"copyright,版权",icon:"copyright"},{type:["basics"],title:"cube,立方体,方块",icon:"cube"},{type:["basics"],title:"warning,exclamation-triangle,感叹号,警告",icon:"warning"},{type:["basics"],title:"eyedropper,拾色器",icon:"eyedropper"},{type:["basics"],title:"fax,传真",icon:"fax"},{type:["basics"],title:"fire-extinguisher,灭火器",icon:"fire-extinguisher"},{type:["basics"],title:"futbol-o",icon:"futbol-o"},{type:["basics"],title:"history,历史",icon:"history"},{type:["basics"],title:"level-down,向下",icon:"level-down"},{type:["basics"],title:"life-ring,life-saver,support,救生圈,支持",icon:"life-ring"},{type:["basics"],title:"line-chart,线条图,图表",icon:"line-chart"},{type:["basics"],title:"newspaper-o,报纸",icon:"newspaper-o"},{type:["basics"],title:"paint-brush,画笔",icon:"paint-brush"},{type:["basics"],title:"edit,pencil-square-o,编辑,铅笔",icon:"edit"},{type:["basics"],title:"pie-chart,饼状图,图表",icon:"pie-chart"},{type:["basics"],title:"plug,插头",icon:"plug"},{type:["basics"],title:"puzzle-piece",icon:"puzzle-piece"},{type:["basics"],title:"rss-square",icon:"rss-square"},{type:["basics","brand"],title:"share-alt,分享",icon:"share-alt"},{type:["basics","brand"],title:"share-alt-square,分享",icon:"share-alt-square"},{type:["basics"],title:"sliders",icon:"sliders"},{type:["basics"],title:"sort-alpha-asc,排序,排列",icon:"sort-alpha-asc"},{type:["basics"],title:"sort-numeric-desc,排序,排列",icon:"sort-numeric-desc"},{type:["basics","form"],title:"square,方块",icon:"square"},{type:["basics"],title:"star-half,五角星",icon:"star-half"},{type:["basics"],title:"tablet,平板,iPad",icon:"tablet"},{type:["basics"],title:"dashboard,tachometer,仪表盘",icon:"dashboard"},{type:["basics"],title:"terminal,终端",icon:"terminal"},{type:["basics"],title:"close,remove,times,关闭,删除,乘",icon:"close"},{type:["basics"],title:"toggle-off,开关",icon:"toggle-off"},{type:["basics"],title:"toggle-on,开关",icon:"toggle-on"},{type:["basics"],title:"trash,垃圾桶,回收站,删除",icon:"trash"},{type:["basics"],title:"tty",icon:"tty"},{type:["basics"],title:"university,bank,大学,银行",icon:"university"},{type:["basics"],title:"upload,上传",icon:"upload"},{type:["basics"],title:"wifi,无线",icon:"wifi"},{type:["text"],title:"unlink,chain-broken,删除链接",icon:"unlink"},{type:["text"],title:"paste,clipboard,粘贴",icon:"paste"},{type:["text"],title:"copy,复制",icon:"copy"},{type:["text"],title:"header,标题",icon:"header"},{type:["text"],title:"dedent,outdent,缩进",icon:"dedent"},{type:["text"],title:"paragraph,段落",icon:"paragraph"},{type:["text"],title:"rotate-right,repeat,右旋转,重做",icon:"rotate-right"},{type:["text"],title:"cut,scissors,剪切,剪刀",icon:"cut"},{type:["text"],title:"subscript,下标,脚注",icon:"subscript"},{type:["text"],title:"save,floppy,保存,软盘",icon:"save"},{type:["text"],title:"text-width,文字宽度",icon:"text-width"},{type:["text"],title:"underline,下划线",icon:"underline"},{type:["text"],title:"rotate-left,undo,左旋转,撤销",icon:"rotate-left"},{type:["directional"],title:"angle-double-up",icon:"angle-double-up"},{type:["directional"],title:"arrow-circle-o-left",icon:"arrow-circle-o-left"},{type:["directional"],title:"arrow-circle-up",icon:"arrow-circle-up"},{type:["directional"],title:"toggle-down,caret-square-o-down",icon:"toggle-down"},{type:["directional"],title:"toggle-left,caret-square-o-left",icon:"toggle-left"},{type:["directional"],title:"toggle-right,caret-square-o-right",icon:"toggle-right"},{type:["directional"],title:"toggle-up,caret-square-o-up",icon:"toggle-up"},{type:["directional"],title:"hand-o-down",icon:"hand-o-down"},{type:["directional"],title:"hand-o-left",icon:"hand-o-left"},{type:["brand"],title:"angellist",icon:"angellist"},{type:["brand"],title:"apple,苹果",icon:"apple"},{type:["brand"],title:"bitbucket",icon:"bitbucket"},{type:["brand"],title:"bitbucket-square",icon:"bitbucket-square"},{type:["brand"],title:"bitcoin,btc",icon:"bitcoin"},{type:["brand"],title:"cc-amex",icon:"cc-amex"},{type:["brand"],title:"cc-discover",icon:"cc-discover"},{type:["brand"],title:"cc-mastercard",icon:"cc-mastercard"},{type:["brand"],title:"cc-paypal",icon:"cc-paypal"},{type:["brand"],title:"cc-stripe",icon:"cc-stripe"},{type:["brand"],title:"cc-visa",icon:"cc-visa"},{type:["brand"],title:"css3",icon:"css3"},{type:["brand"],title:"delicious",icon:"delicious"},{type:["brand"],title:"deviantart",icon:"deviantart"},{type:["brand"],title:"google-wallet",icon:"google-wallet"},{type:["brand"],title:"ioxhost",icon:"ioxhost"},{type:["brand"],title:"lastfm",icon:"lastfm"},{type:["brand"],title:"lastfm-square",icon:"lastfm-square"},{type:["brand"],title:"maxcdn",icon:"maxcdn"},{type:["brand"],title:"meanpath",icon:"meanpath"},{type:["brand"],title:"openid",icon:"openid"},{type:["brand"],title:"paypal",icon:"paypal"},{type:["brand"],title:"pinterest-square",icon:"pinterest-square"},{type:["brand"],title:"slack",icon:"slack"},{type:["brand"],title:"slideshare",icon:"slideshare"},{type:["brand"],title:"stumbleupon",icon:"stumbleupon"},{type:["brand"],title:"stumbleupon-circle",icon:"stumbleupon-circle"},{type:["brand"],title:"tumblr",icon:"tumblr"},{type:["brand"],title:"tumblr-square",icon:"tumblr-square"},{type:["brand"],title:"twitch",icon:"twitch"},{type:["brand"],title:"wordpress",icon:"wordpress"},{type:["brand"],title:"xing",icon:"xing"},{type:["brand"],title:"yahoo,雅虎",icon:"yahoo"},{type:["brand"],title:"yelp",icon:"yelp"},{type:["brand"],title:"youtube-square",icon:"youtube-square"},{type:["video"],title:"eject,弹出",icon:"eject"}],this.INSPECTABLES={label:["text","fs","br","bs","ha","va","width","height","top","left","z","th","lh","td","bo","i","bg","bc","tc","o","ts","tsc","ds","sc"],text_view:["text","fs","br","bs","ha","va","width","height","top","left","z","th","lh","td","bo","i","bg","bc","tc","o","ts","tsc","ds","sc"],sticky:["text","width","height","top","left","bg","tc","ds","sc"],button:["text","fs","br","bs","ha","va","width","height","top","left","z","th","td","bo","i","bg","bc","tc","o","ts","tsc","ds","sc"],icon_button:["is","icon","br","bs","top","left","width","height","z","th","bg","bc","tc","o","ds","sc"],text_field:["text","fs","br","bs","ha","va","width","height","top","left","z","th","bg","bc","tc","o","ds","sc"],"switch":["top","left","z"],image_view:["bs","br","width","height","top","left","image","z","th","bg","bc","tc","o","p","ds","sc"],map_view:["width","height","top","left","z"],navigation_bar:["text","fs","z","th","td","bo","i","bg","tc","bc","o","ts","tsc","ds","sc"],search_bar:["text","fs","top","left","ha","z","th","bg","tc","bc","o","ds","sc"],tab_item:["text","is","icon","width","left","top","fs","z","th","bg","tc","o","ds","sc"],tab_bar:["z","th","bg","bc","o","ds","sc"],hr:["width","height","top","left","z","th","bg"],ve:["width","height","top","left","z","th","bg"],keyboard:["text","th"],status_bar:["text","th","bg","tc","bc","o","z"],rectangle:["width","height","top","left","z","th","bg","bc","o","ds","sc"],rounded_rect:["br","bs","width","height","top","left","z","th","bg","bc","o","ds","sc"],lr:["width","height","top","left","z"],pg:["icon"]},this.INSPECTABLES.pg=[],Spine.Model.Dirty={lsave:function(t){return null==t&&(t=!0),Spine.Ajax.disable(function(t){return function(){return t.save()
}}(this)),t&&$("body").trigger("queue:add",[this]),!0},ldestroy:function(t){return null==t&&(t=!0),Spine.Ajax.disable(function(t){return function(){return t.destroy()}}(this)),t?$("body").trigger("queue:add",[this]):void 0}},this.checkFA=function(t){return 0!==$("#fontawesome i").width()?t():setTimeout(function(){return checkFA(t)},10)}}.call(this),function(){var t,e,n,i,r,o,s,a=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},c={}.hasOwnProperty,l=function(t,e){function n(){this.constructor=t}for(var i in e)c.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};e=this.Jot=function(t,n){return e[t]=function(t){var e,n;return null==t&&(t={}),t=t instanceof Array?t:[t],n=arguments.callee.t,function(){var i,r,o;for(o=[],i=0,r=t.length;r>i;i++)e=t[i],o.push(n.render(e));return o}().join("\n")},e[t].t=new e.Template(n)},e.toString=function(){return"Jot"},e.Module=n=function(){function t(){}return t.moduleKeywords=["included","extended"],t.include=function(t){var e,n,i;if(!t)throw new Error("include(obj) requires obj");for(e in t)n=t[e],0>a.call(this.moduleKeywords,e)&&(this.prototype[e]=n);return null!=(i=t.included)&&i.apply(this),this},t}(),e.Helper={isBlank:function(t){var e;if(!t)return!0;for(e in t)return!1;return!0},eval:function(t,n,i){var r,o,s,a;if("$"===n)return t.toString();for(o=n.split("."),a=t,s=0;o.length>s;){if(r=o[s],e.Helper.isBlank(r))throw"Syntax error: "+n;a||(a={}),a="function"==typeof a[r]?a[r]():a[r],s++}return i?a instanceof Array?!a.length:!a:a},interpolate:function(t,n){return n?t.replace(/{{([$_a-zA-Z][$_a-zA-Z0-9\.]*)}}/g,function(){return e.Helper.eval(n,arguments[1],!1)||""}):t},compact:function(t){var e,n,i;for(e=n=0,i=t.length;i>=0?i>=n:n>=i;e=i>=0?++n:--n)t[e]||t.splice(e,1);return t}},e.Node=i=function(t){function n(t){var e,i,r;if(null==t&&(t=""),this.children=[],i=t.match(/^(([\.#]?([a-zA-Z]|\{\{[^\{]*\}\})(([a-zA-Z0-9-_]|\{\{[^\{]*\}\})*))+)(\((.*)\))?(:?$|\s+(.*)$)/),!i)throw"SyntaxError in line: "+t;if(r=i[1],this.attrs=i[7],this.mode=":"===i[8]?"plain":"node",this.content=i[9],this.tag=(r.match(/^[a-zA-Z\{\}][\{\}a-zA-Z0-9-_]*/)||["div"])[0],-1===n.Tags.indexOf(this.tag))throw"SyntaxError: Illegel tag name "+this.tag;if(-1!==n.VoidTags.indexOf(this.tag)&&(this.voidElement=!0),!this.isBlank(this.content)&&this.voidElement)throw"SyntaxError: void element can't contain content";if(e=r.match(/#[a-zA-Z\{\}][\{\}a-zA-Z0-9-$_]*/g)||[""],e instanceof Array&&e.length>1)throw"SyntaxError: One tag should only have one id";this.id=e[0].slice(1),this.classes=r.match(/\.[a-zA-Z\{\}][\{\}a-zA-Z0-9-$_]*/g)||[""],this.classes=this.classes.join(" ").replace(/\./g,""),this.compile()}return l(n,t),n.include(e.Helper),n.hooks={doctype:function(){return""}},n.Tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","doctype","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","legend","li","link","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","svg","path","animate","circle"],n.VoidTags=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n.prototype.addChild=function(t){if(this.voidElement)throw"SyntaxError: void element can't contain child element";return this.children.push(t),t.parent=this},n.prototype.compile=function(){return e.Node.hooks[this.tag]?e.Node.hooks[this.tag](obj):(this.head="",this.tail="",this.head+="<"+this.tag,""!==this.id&&(this.head+=' id="'+this.id+'"'),""!==this.classes&&(this.head+=' class="'+this.classes+'"'),this.attrs&&""!==this.attrs&&(this.head+=" "+this.attrs),this.head+=">",this.voidElement?void 0:(this.content&&(this.head+=this.content),this.tail+=""+this.tag+">"))},n.prototype.render=function(t){var e;return this.html=this.head,this.children.length>0?this.interpolate(this.head,t)+"\n"+this.compact(function(){var n,i,r,o;for(r=this.children,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e.render(t));return o}.call(this)).join("\n")+"\n"+this.interpolate(this.tail,t):this.interpolate(this.head+this.tail,t)},n}(e.Module),e.Plain=o=function(t){function n(t){this.content=null!=t?t:"",this.mode="plain",this.compile()}return l(n,t),n.include(e.Helper),n.prototype.compile=function(){return this.html=this.content},n.prototype.render=function(t){return this.interpolate(this.html,t)},n}(e.Module),e.Partial=r=function(t){function n(t){if(this.name=t,this.mode="partial",this.name=this.name.match(/^\s*([a-zA-Z\{][\{\}a-zA-Z0-9-_]*)\s*$/)[1],!this.name)throw"Illegal partial name"}return l(n,t),n.include(e.Helper),n.prototype.render=function(t){var n;return n=this.interpolate(this.name,t),e[n](t)},n}(e.Module),e.Expression=t=function(t){function n(t){var e;null==t&&(t=""),this.children=[],this.mode="node",e=t.match(/(\!)?([a-zA-Z$_][a-zA-Z0-9_$\.]+)(\?)?/),this.invert="!"===e[1],this.attr=e[2],this.q=e[3]}return l(n,t),n.include(e.Helper),n.prototype.addChild=function(t){return this.children.push(t),t.parent=this},n.prototype.render=function(t){var e,n;return n=this.eval(t,this.attr,this.invert),this.q||this.invert?n?this.renderChildren(t):null:n instanceof Array?this.compact(function(){var t,i,r;for(r=[],t=0,i=n.length;i>t;t++)e=n[t],r.push(this.renderChildren(e));return r}.call(this)).join("\n"):this.renderChildren(n)},n.prototype.renderChildren=function(t){var e;return function(){var n,i,r,o;for(r=this.children,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e.render(t));return o}.call(this).join("\n")},n}(e.Module),e.Template=s=function(t){function n(t){var e,n,i,r;for(this.roots=[],this.indentions=[],t=t.replace(/(\r\n|\r)/,"\n"),r=t.split("\n"),n=0,i=r.length;i>n;n++)e=r[n],this.isBlank(e.replace(/\s/g,""))||this.parseLine(e)}return l(n,t),n.include(e.Helper),n.prototype.parseLine=function(t){var n,i,r,o,s,a;return a=t.match(/^(\s*)([:=\-\!])?(.*)$/),i=a[1].replace(" "," ").length,s=a[2],n=a[3],o=this.indentions[i-2],"!"!==s?(r=o&&"plain"===o.mode||":"===s?new e.Plain(n):"="===s?new e.Partial(n):"-"===s?new e.Expression(n):new e.Node(n),o?o.addChild(r):this.roots.push(r),this.indentions[i]=r):void 0},n.prototype.render=function(t){var e;return this.compact(function(){var n,i,r,o;for(r=this.roots,o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(e.render(t));return o}.call(this)).join("\n")},n}(e.Module)}.call(this),void 0===jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t,e,n){function i(n){var i=e.console;o[n]||(o[n]=!0,t.migrateWarnings.push(n),i&&i.warn&&!t.migrateMute&&(i.warn("JQMIGRATE: "+n),t.migrateTrace&&i.trace&&i.trace()))}function r(e,r,o,s){if(Object.defineProperty)try{return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:function(){return i(s),o},set:function(t){i(s),o=t}}),n}catch(a){}t._definePropertyBroken=!0,e[r]=o}var o={};t.migrateWarnings=[],!t.migrateMute&&e.console&&e.console.log&&e.console.log("JQMIGRATE: Logging is active"),t.migrateTrace===n&&(t.migrateTrace=!0),t.migrateReset=function(){o={},t.migrateWarnings.length=0},"BackCompat"===document.compatMode&&i("jQuery is not compatible with Quirks Mode");var s=t("",{size:1}).attr("size")&&t.attrFn,a=t.attr,c=t.attrHooks.value&&t.attrHooks.value.get||function(){return null},l=t.attrHooks.value&&t.attrHooks.value.set||function(){return n},u=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,h=/^(?:checked|selected)$/i;r(t,"attrFn",s||{},"jQuery.attrFn is deprecated"),t.attr=function(e,r,o,c){var l=r.toLowerCase(),f=e&&e.nodeType;return c&&(4>a.length&&i("jQuery.fn.attr( props, pass ) is deprecated"),e&&!d.test(f)&&(s?r in s:t.isFunction(t.fn[r])))?t(e)[r](o):("type"===r&&o!==n&&u.test(e.nodeName)&&e.parentNode&&i("Can't change the 'type' of an input or button in IE 6/7/8"),!t.attrHooks[l]&&p.test(l)&&(t.attrHooks[l]={get:function(e,i){var r,o=t.prop(e,i);return o===!0||"boolean"!=typeof o&&(r=e.getAttributeNode(i))&&r.nodeValue!==!1?i.toLowerCase():n},set:function(e,n,i){var r;return n===!1?t.removeAttr(e,i):(r=t.propFix[i]||i,r in e&&(e[r]=!0),e.setAttribute(i,i.toLowerCase())),i}},h.test(l)&&i("jQuery.fn.attr('"+l+"') may use property instead of attribute")),a.call(t,e,r,o))},t.attrHooks.value={get:function(t,e){var n=(t.nodeName||"").toLowerCase();return"button"===n?c.apply(this,arguments):("input"!==n&&"option"!==n&&i("jQuery.fn.attr('value') no longer gets properties"),e in t?t.value:null)},set:function(t,e){var r=(t.nodeName||"").toLowerCase();return"button"===r?l.apply(this,arguments):("input"!==r&&"option"!==r&&i("jQuery.fn.attr('value', val) no longer sets properties"),t.value=e,n)}};var f,g,m=t.fn.init,v=t.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;t.fn.init=function(e,n,r){var o;return e&&"string"==typeof e&&!t.isPlainObject(n)&&(o=y.exec(t.trim(e)))&&o[0]&&("<"!==e.charAt(0)&&i("$(html) HTML strings must start with '<' character"),o[3]&&i("$(html) HTML text after last tag is ignored"),"#"===o[0].charAt(0)&&(i("HTML string cannot start with a '#' character"),t.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),t.parseHTML)?m.call(this,t.parseHTML(o[2],n,!0),n,r):m.apply(this,arguments)},t.fn.init.prototype=t.fn,t.parseJSON=function(t){return t||null===t?v.apply(this,arguments):(i("jQuery.parseJSON requires a valid JSON string"),null)},t.uaMatch=function(t){t=t.toLowerCase();var e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||0>t.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},t.browser||(f=t.uaMatch(navigator.userAgent),g={},f.browser&&(g[f.browser]=!0,g.version=f.version),g.chrome?g.webkit=!0:g.webkit&&(g.safari=!0),t.browser=g),r(t,"browser",t.browser,"jQuery.browser is deprecated"),t.sub=function(){function e(t,n){return new e.fn.init(t,n)}t.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(i,r){return r&&r instanceof t&&!(r instanceof e)&&(r=e(r)),t.fn.init.call(this,i,r,n)},e.fn.init.prototype=e.fn;var n=e(document);return i("jQuery.sub() is deprecated"),e},t.ajaxSetup({converters:{"text json":t.parseJSON}});var b=t.fn.data;t.fn.data=function(e){var r,o,s=this[0];return!s||"events"!==e||1!==arguments.length||(r=t.data(s,e),o=t._data(s,e),r!==n&&r!==o||o===n)?b.apply(this,arguments):(i("Use of jQuery.fn.data('events') is deprecated"),o)};var w=/\/(java|ecma)script/i,x=t.fn.andSelf||t.fn.addBack;t.fn.andSelf=function(){return i("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),x.apply(this,arguments)},t.clean||(t.clean=function(e,r,o,s){r=r||document,r=!r.nodeType&&r[0]||r,r=r.ownerDocument||r,i("jQuery.clean() is deprecated");var a,c,l,u,d=[];if(t.merge(d,t.buildFragment(e,r).childNodes),o)for(l=function(t){return!t.type||w.test(t.type)?s?s.push(t.parentNode?t.parentNode.removeChild(t):t):o.appendChild(t):n},a=0;null!=(c=d[a]);a++)t.nodeName(c,"script")&&l(c)||(o.appendChild(c),c.getElementsByTagName!==n&&(u=t.grep(t.merge([],c.getElementsByTagName("script")),l),d.splice.apply(d,[a+1,0].concat(u)),a+=u.length));return d});var _=t.event.add,k=t.event.remove,S=t.event.trigger,T=t.fn.toggle,N=t.fn.live,C=t.fn.die,$="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",I=RegExp("\\b(?:"+$+")\\b"),E=/(?:^|\s)hover(\.\S+|)\b/,j=function(e){return"string"!=typeof e||t.event.special.hover?e:(E.test(e)&&i("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),e&&e.replace(E,"mouseenter$1 mouseleave$1"))};t.event.props&&"attrChange"!==t.event.props[0]&&t.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),t.event.dispatch&&r(t.event,"handle",t.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),t.event.add=function(t,e,n,r,o){t!==document&&I.test(e)&&i("AJAX events should be attached to document: "+e),_.call(this,t,j(e||""),n,r,o)},t.event.remove=function(t,e,n,i,r){k.call(this,t,j(e)||"",n,i,r)},t.fn.error=function(){var t=Array.prototype.slice.call(arguments,0);return i("jQuery.fn.error() is deprecated"),t.splice(0,0,"error"),arguments.length?this.bind.apply(this,t):(this.triggerHandler.apply(this,t),this)},t.fn.toggle=function(e,n){if(!t.isFunction(e)||!t.isFunction(n))return T.apply(this,arguments);i("jQuery.fn.toggle(handler, handler...) is deprecated");var r=arguments,o=e.guid||t.guid++,s=0,a=function(n){var i=(t._data(this,"lastToggle"+e.guid)||0)%s;return t._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),r[i].apply(this,arguments)||!1};for(a.guid=o;r.length>s;)r[s++].guid=o;return this.click(a)},t.fn.live=function(e,n,r){return i("jQuery.fn.live() is deprecated"),N?N.apply(this,arguments):(t(this.context).on(e,this.selector,n,r),this)},t.fn.die=function(e,n){return i("jQuery.fn.die() is deprecated"),C?C.apply(this,arguments):(t(this.context).off(e,this.selector||"**",n),this)},t.event.trigger=function(t,e,n,r){return n||I.test(t)||i("Global events are undocumented and deprecated"),S.call(this,t,e,n||document,r)},t.each($.split("|"),function(e,n){t.event.special[n]={setup:function(){var e=this;return e!==document&&(t.event.add(document,n+"."+t.guid,function(){t.event.trigger(n,null,e,!0)}),t._data(this,n,t.guid++)),!1},teardown:function(){return this!==document&&t.event.remove(document,n+"."+t._data(this,n)),!1}}})}(jQuery,window),function(){$.fn.extend({jscroll:function(){var t;return t=".jspVerticalBar",this.jScrollPane({hideFocus:!0,animateScroll:!0}),this.bind("jsp-scroll-y",function(){return this.last||$(this).find(t).stop().fadeTo("fast",.9),$.isWindows()?void 0:!this.last||(new Date).getTime()-this.last>800?(this.last=(new Date).getTime(),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(e){return function(){return $(e).find(t).stop().fadeTo("slow",0),e.timer=null,e.last=null}}(this),1e3)):void 0})},transitionEnd:function(t){return this.one("webkitTransitionEnd transitionend",function(e){return function(){return e.unbind("webkitTransitionEnd"),e.unbind("transitionend"),t()}}(this))},ncss:function(t,e){return this.css("-webkit-"+t,e),this.css("-moz-"+t,e),this.css(t,e)},enableTransition:function(t){return this.ncss("transition","all "+t+" ease-in-out")},disableTransition:function(t){return this.ncss("transition","none"),t?setTimeout(function(){return t()},20):void 0},boxShadow:function(t){return this.ncss("box-shadow",t)},transform:function(t){return this.ncss("transform",t)},translateX:function(t){return this.ncss("transform","translateX("+t+"px)")},translateY:function(t){return this.ncss("transform","translateY("+t+"px)")},translate:function(t,e){return this.ncss("transform","translate("+t+"px, "+e+"px)")},zindex:function(t){return this.css("z-index",t)}}),$.ga=function(){return window.ga?window.ga.apply(window,arguments):void 0},$.isWindows=function(){return/(Windows)/.test(navigator.userAgent)},$.isMobile=function(){return/(iPod|iPhone|iPad|Android)/.test(navigator.userAgent)},$.validDeviceType=function(t){return-1!==navigator.userAgent.toLowerCase().indexOf(t.device)},$.validDevice=function(t){return $(window).width()===t.width&&$(window).height()===t.height},$.isTablet=function(){return/(iPad)/.test(navigator.userAgent)},$.isIOS=function(){return/(iPod|iPhone|iPad)/.test(navigator.userAgent)},$.isAndroid=function(){return/(Android)/.test(navigator.userAgent)},$.isWeChat=function(){return/MicroMessenger/.test(navigator.userAgent)},$.pointInRect=function(t,e,n){return t>n.left&&n.left+n.width>t&&e>n.top&&n.top+n.height>e},$.user=function(){return $("body").data("user")},$.project=function(){return Project.find($("#workspace").data("project_cid"))},$.staticMap=function(){return"/images/workspace/staticmap_"+$("body").data("locale")+".png"},$.mapCenter=function(){return window.google?"CN"===$("body").data("country")||"imock.dev"===window.location.hostname?new google.maps.LatLng(39.9264,116.401):new google.maps.LatLng(40.698,-73.986):void 0},$.viewOnly=function(){return $.user()&&"expired"===$.user().state&&$.project().isPrivate()},$.scale=function(){return $("#workspace").data("scale")},$.preference=function(){return Preference.first()},$.readDataURL=function(t,e){var n,i;if(t)return i=/^image\/*/,i.test(t.type)?t.size>2048e3?($.ga("send","event","image","Too large: "+t.size),alert(I18N_STRINGS.exceed_size),void 0):(n=new FileReader,n.onload=function(t){return e(t.target.result)},n.readAsDataURL(t)):(alert(I18N_STRINGS.unsupported),void 0)},window.Spine&&(Spine.Model.prototype.refresh=function(t){var e;return e=this.constructor.irecords[this.id],e&&e.load(t),this.trigger("refresh"),this})}.call(this),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var s=e||window.event,a=c.call(arguments,1),l=0,u=0,d=0,p=0;if(e=t.event.fix(s),e.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*d,d=0),l=0===d?u:d,"deltaY"in s&&(d=-1*s.deltaY,l=d),"deltaX"in s&&(u=s.deltaX,0===d&&(l=-1*u)),0!==d||0!==u){if(1===s.deltaMode){var h=t.data(this,"mousewheel-line-height");l*=h,d*=h,u*=h}else if(2===s.deltaMode){var f=t.data(this,"mousewheel-page-height");l*=f,d*=f,u*=f}return p=Math.max(Math.abs(d),Math.abs(u)),(!o||o>p)&&(o=p,i(s,p)&&(o/=40)),i(s,p)&&(l/=40,u/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/o),u=Math[u>=1?"floor":"ceil"](u/o),d=Math[d>=1?"floor":"ceil"](d/o),e.deltaX=u,e.deltaY=d,e.deltaFactor=o,e.deltaMode=0,a.unshift(e,l,u,d),r&&clearTimeout(r),r=setTimeout(n,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function n(){o=null}function i(t,e){return u.settings.adjustOldDeltas&&"mousewheel"===t.type&&0===e%120}var r,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice;if(t.event.fixHooks)for(var l=s.length;l;)t.event.fixHooks[s[--l]]=t.event.mouseHooks;var u=t.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",u.getLineHeight(this)),t.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=a.length;t;)this.removeEventListener(a[--t],e,!1);else this.onmousewheel=null},getLineHeight:function(e){return parseInt(t(e)["offsetParent"in t.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t){function e(){this===r.elem&&(r.pos=[-260,-260],r.elem=!1,o=3)}var n,i,r={pos:[-260,-260]},o=3,s=document,a=s.documentElement,c=s.body;t.event.special.mwheelIntent={setup:function(){var n=t(this).bind("mousewheel",t.event.special.mwheelIntent.handler);return this!==s&&this!==a&&this!==c&&n.bind("mouseleave",e),n=null,!0},teardown:function(){return t(this).unbind("mousewheel",t.event.special.mwheelIntent.handler).unbind("mouseleave",e),!0},handler:function(e){var s=[e.clientX,e.clientY];return this===r.elem||Math.abs(r.pos[0]-s[0])>o||Math.abs(r.pos[1]-s[1])>o?(r.elem=this,r.pos=s,o=250,clearTimeout(i),i=setTimeout(function(){o=10},200),clearTimeout(n),n=setTimeout(function(){o=3},1500),e=t.extend({},e,{type:"mwheelIntent"}),(t.event.dispatch||t.event.handle).apply(this,arguments)):void 0}},t.fn.extend({mwheelIntent:function(t){return t?this.bind("mwheelIntent",t):this.trigger("mwheelIntent")},unmwheelIntent:function(t){return this.unbind("mwheelIntent",t)}}),t(function(){c=s.body,t(s).bind("mwheelIntent.mwheelIntentDefault",t.noop)})}(jQuery),function(t,e,n){t.fn.jScrollPane=function(i){function r(i,r){function o(e){var r,a,l,d,p,h,m=!1,v=!1;if(B=e,q===n)p=i.scrollTop(),h=i.scrollLeft(),i.css({overflow:"hidden",padding:0}),W=i.innerWidth()+be,G=i.innerHeight(),i.width(W),q=t('').css("padding",ye).append(i.children()),F=t('').css({width:W+"px",height:G+"px"}).append(q).appendTo(i);else{if(i.css("width",""),m=B.stickToBottom&&$(),v=B.stickToRight&&I(),d=i.innerWidth()+be!=W||i.outerHeight()!=G,d&&(W=i.innerWidth()+be,G=i.innerHeight(),F.css({width:W+"px",height:G+"px"})),!d&&we==X&&q.outerHeight()==J)return i.width(W),void 0;we=X,q.css("width",""),i.width(W),F.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}q.css("overflow","auto"),X=e.contentWidth?e.contentWidth:q[0].scrollWidth,J=q[0].scrollHeight,q.css("overflow",""),Y=X/W,U=J/G,Q=U>1,V=Y>1,V||Q?(i.addClass("jspScrollable"),r=B.maintainPosition&&(te||ie),r&&(a=N(),l=C()),s(),c(),u(),r&&(S(v?X-W:a,!1),k(m?J-G:l,!1)),A(),E(),z(),B.enableKeyboardNavigation&&R(),B.clickOnTrack&&f(),L(),B.hijackInternalLinks&&O()):(i.removeClass("jspScrollable"),q.css({top:0,left:0,width:F.width()}),j(),P(),D(),g()),B.autoReinitialise&&!ve?ve=setInterval(function(){o(B)},B.autoReinitialiseDelay):!B.autoReinitialise&&ve&&clearInterval(ve),p&&i.scrollTop(0)&&k(p,!1),h&&i.scrollLeft(0)&&S(h,!1),i.trigger("jsp-initialised",[V||Q])}function s(){Q&&(F.append(t('').append(t(''),t('').append(t('').append(t(''),t(''))),t(''))),re=F.find(">.jspVerticalBar"),oe=re.find(">.jspTrack"),K=oe.find(">.jspDrag"),B.showArrows&&(le=t('').bind("mousedown.jsp",p(0,-1)).bind("click.jsp",M),ue=t('').bind("mousedown.jsp",p(0,1)).bind("click.jsp",M),B.arrowScrollOnHover&&(le.bind("mouseover.jsp",p(0,-1,le)),ue.bind("mouseover.jsp",p(0,1,ue))),d(oe,B.verticalArrowPositions,le,ue)),ae=G,F.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){ae-=t(this).outerHeight()}),K.hover(function(){K.addClass("jspHover")},function(){K.removeClass("jspHover")}).bind("mousedown.jsp",function(e){t("html").bind("dragstart.jsp selectstart.jsp",M),K.addClass("jspActive");var n=e.pageY-K.position().top;return t("html").bind("mousemove.jsp",function(t){v(t.pageY-n,!1)}).bind("mouseup.jsp mouseleave.jsp",m),!1}),a())}function a(){oe.height(ae+"px"),te=0,se=B.verticalGutter+oe.outerWidth(),q.width(W);try{0===re.position().left&&q.css("margin-left",se+"px")}catch(t){}}function c(){V&&(F.append(t('').append(t(''),t('').append(t('').append(t(''),t(''))),t(''))),de=F.find(">.jspHorizontalBar"),pe=de.find(">.jspTrack"),ee=pe.find(">.jspDrag"),B.showArrows&&(ge=t('').bind("mousedown.jsp",p(-1,0)).bind("click.jsp",M),me=t('').bind("mousedown.jsp",p(1,0)).bind("click.jsp",M),B.arrowScrollOnHover&&(ge.bind("mouseover.jsp",p(-1,0,ge)),me.bind("mouseover.jsp",p(1,0,me))),d(pe,B.horizontalArrowPositions,ge,me)),ee.hover(function(){ee.addClass("jspHover")},function(){ee.removeClass("jspHover")}).bind("mousedown.jsp",function(e){t("html").bind("dragstart.jsp selectstart.jsp",M),ee.addClass("jspActive");var n=e.pageX-ee.position().left;return t("html").bind("mousemove.jsp",function(t){b(t.pageX-n,!1)}).bind("mouseup.jsp mouseleave.jsp",m),!1}),he=F.innerWidth(),l())}function l(){F.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){he-=t(this).outerWidth()}),pe.width(he+"px"),ie=0}function u(){if(V&&Q){var e=pe.outerHeight(),n=oe.outerWidth();ae-=e,t(de).find(">.jspCap:visible,>.jspArrow").each(function(){he+=t(this).outerWidth()}),he-=n,G-=n,W-=e,pe.parent().append(t('').css("width",e+"px")),a(),l()}V&&q.width(F.outerWidth()-be+"px"),J=q.outerHeight(),U=J/G,V&&(fe=Math.ceil(1/Y*he),fe>B.horizontalDragMaxWidth?fe=B.horizontalDragMaxWidth:B.horizontalDragMinWidth>fe&&(fe=B.horizontalDragMinWidth),ee.width(fe+"px"),ne=he-fe,w(ie)),Q&&(ce=Math.ceil(1/U*ae),ce>B.verticalDragMaxHeight?ce=B.verticalDragMaxHeight:B.verticalDragMinHeight>ce&&(ce=B.verticalDragMinHeight),K.height(ce+"px"),Z=ae-ce,y(te))}function d(t,e,n,i){var r,o="before",s="after";"os"==e&&(e=/Mac/.test(navigator.platform)?"after":"split"),e==o?s=e:e==s&&(o=e,r=n,n=i,i=r),t[o](n)[s](i)}function p(t,e,n){return function(){return h(t,e,this,n),this.blur(),!1}}function h(e,n,i,r){i=t(i).addClass("jspActive");var o,s,a=!0,c=function(){0!==e&&xe.scrollByX(e*B.arrowButtonSpeed),0!==n&&xe.scrollByY(n*B.arrowButtonSpeed),s=setTimeout(c,a?B.initialDelay:B.arrowRepeatFreq),a=!1};c(),o=r?"mouseout.jsp":"mouseup.jsp",r=r||t("html"),r.bind(o,function(){i.removeClass("jspActive"),s&&clearTimeout(s),s=null,r.unbind(o)})}function f(){g(),Q&&oe.bind("mousedown.jsp",function(e){if(e.originalTarget===n||e.originalTarget==e.currentTarget){var i,r=t(this),o=r.offset(),s=e.pageY-o.top-te,a=!0,c=function(){var t=r.offset(),n=e.pageY-t.top-ce/2,o=G*B.scrollPagePercent,u=Z*o/(J-G);if(0>s)te-u>n?xe.scrollByY(-o):v(n);else{if(!(s>0))return l(),void 0;n>te+u?xe.scrollByY(o):v(n)}i=setTimeout(c,a?B.initialDelay:B.trackClickRepeatFreq),a=!1},l=function(){i&&clearTimeout(i),i=null,t(document).unbind("mouseup.jsp",l)};return c(),t(document).bind("mouseup.jsp",l),!1}}),V&&pe.bind("mousedown.jsp",function(e){if(e.originalTarget===n||e.originalTarget==e.currentTarget){var i,r=t(this),o=r.offset(),s=e.pageX-o.left-ie,a=!0,c=function(){var t=r.offset(),n=e.pageX-t.left-fe/2,o=W*B.scrollPagePercent,u=ne*o/(X-W);if(0>s)ie-u>n?xe.scrollByX(-o):b(n);else{if(!(s>0))return l(),void 0;n>ie+u?xe.scrollByX(o):b(n)}i=setTimeout(c,a?B.initialDelay:B.trackClickRepeatFreq),a=!1},l=function(){i&&clearTimeout(i),i=null,t(document).unbind("mouseup.jsp",l)};return c(),t(document).bind("mouseup.jsp",l),!1}})}function g(){pe&&pe.unbind("mousedown.jsp"),oe&&oe.unbind("mousedown.jsp")}function m(){t("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),K&&K.removeClass("jspActive"),ee&&ee.removeClass("jspActive")}function v(t,e){Q&&(0>t?t=0:t>Z&&(t=Z),e===n&&(e=B.animateScroll),e?xe.animate(K,"top",t,y):(K.css("top",t),y(t)))}function y(t){t===n&&(t=K.position().top),F.scrollTop(0),te=t;var e=0===te,r=te==Z,o=t/Z,s=-o*(J-G);(_e!=e||Se!=r)&&(_e=e,Se=r,i.trigger("jsp-arrow-change",[_e,Se,ke,Te])),x(e,r),q.css("top",s),i.trigger("jsp-scroll-y",[-s,e,r]).trigger("scroll")}function b(t,e){V&&(0>t?t=0:t>ne&&(t=ne),e===n&&(e=B.animateScroll),e?xe.animate(ee,"left",t,w):(ee.css("left",t),w(t)))}function w(t){t===n&&(t=ee.position().left),F.scrollTop(0),ie=t;var e=0===ie,r=ie==ne,o=t/ne,s=-o*(X-W);(ke!=e||Te!=r)&&(ke=e,Te=r,i.trigger("jsp-arrow-change",[_e,Se,ke,Te])),_(e,r),q.css("left",s),i.trigger("jsp-scroll-x",[-s,e,r]).trigger("scroll")}function x(t,e){B.showArrows&&(le[t?"addClass":"removeClass"]("jspDisabled"),ue[e?"addClass":"removeClass"]("jspDisabled"))}function _(t,e){B.showArrows&&(ge[t?"addClass":"removeClass"]("jspDisabled"),me[e?"addClass":"removeClass"]("jspDisabled"))}function k(t,e){var n=t/(J-G);v(n*Z,e)}function S(t,e){var n=t/(X-W);b(n*ne,e)}function T(e,n,i){var r,o,s,a,c,l,u,d,p,h=0,f=0;try{r=t(e)}catch(g){return}for(o=r.outerHeight(),s=r.outerWidth(),F.scrollTop(0),F.scrollLeft(0);!r.is(".jspPane");)if(h+=r.position().top,f+=r.position().left,r=r.offsetParent(),/^body|html$/i.test(r[0].nodeName))return;a=C(),l=a+G,a>h||n?d=h-B.horizontalGutter:h+o>l&&(d=h-G+o+B.horizontalGutter),isNaN(d)||k(d,i),c=N(),u=c+W,c>f||n?p=f-B.horizontalGutter:f+s>u&&(p=f-W+s+B.horizontalGutter),isNaN(p)||S(p,i)}function N(){return-q.position().left}function C(){return-q.position().top}function $(){var t=J-G;return t>20&&10>t-C()}function I(){var t=X-W;return t>20&&10>t-N()}function E(){F.unbind(Ce).bind(Ce,function(t,e,n,i){var r=ie,o=te,s=t.deltaFactor||B.mouseWheelSpeed;return xe.scrollBy(n*s,-i*s,!1),r==ie&&o==te})}function j(){F.unbind(Ce)}function M(){return!1}function A(){q.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(t){T(t.target,!1)})}function P(){q.find(":input,a").unbind("focus.jsp")}function R(){function e(){var t=ie,e=te;switch(n){case 40:xe.scrollByY(B.keyboardSpeed,!1);break;case 38:xe.scrollByY(-B.keyboardSpeed,!1);break;case 34:case 32:xe.scrollByY(G*B.scrollPagePercent,!1);break;case 33:xe.scrollByY(-G*B.scrollPagePercent,!1);break;case 39:xe.scrollByX(B.keyboardSpeed,!1);break;case 37:xe.scrollByX(-B.keyboardSpeed,!1)}return r=t!=ie||e!=te}var n,r,o=[];V&&o.push(de[0]),Q&&o.push(re[0]),q.focus(function(){i.focus()}),i.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(i){if(i.target===this||o.length&&t(i.target).closest(o).length){var s=ie,a=te;switch(i.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:n=i.keyCode,e();break;case 35:k(J-G),n=null;break;case 36:k(0),n=null}return r=i.keyCode==n&&s!=ie||a!=te,!r}}).bind("keypress.jsp",function(t){return t.keyCode==n&&e(),!r}),B.hideFocus?(i.css("outline","none"),"hideFocus"in F[0]&&i.attr("hideFocus",!0)):(i.css("outline",""),"hideFocus"in F[0]&&i.attr("hideFocus",!1))}function D(){i.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function L(){if(location.hash&&location.hash.length>1){var e,n,i=escape(location.hash.substr(1));try{e=t("#"+i+', a[name="'+i+'"]')}catch(r){return}e.length&&q.find(i)&&(0===F.scrollTop()?n=setInterval(function(){F.scrollTop()>0&&(T(e,!0),t(document).scrollTop(F.position().top),clearInterval(n))},50):(T(e,!0),t(document).scrollTop(F.position().top)))}}function O(){t(document.body).data("jspHijack")||(t(document.body).data("jspHijack",!0),t(document.body).delegate("a[href*=#]","click",function(n){var i,r,o,s,a,c,l=this.href.substr(0,this.href.indexOf("#")),u=location.href;if(-1!==location.href.indexOf("#")&&(u=location.href.substr(0,location.href.indexOf("#"))),l===u){i=escape(this.href.substr(this.href.indexOf("#")+1));try{r=t("#"+i+', a[name="'+i+'"]')}catch(d){return}r.length&&(o=r.closest(".jspScrollable"),s=o.data("jsp"),s.scrollToElement(r,!0),o[0].scrollIntoView&&(a=t(e).scrollTop(),c=r.offset().top,(a>c||c>a+t(e).height())&&o[0].scrollIntoView()),n.preventDefault())}}))}function z(){var t,e,n,i,r,o=!1;F.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(s){var a=s.originalEvent.touches[0];t=N(),e=C(),n=a.pageX,i=a.pageY,r=!1,o=!0}).bind("touchmove.jsp",function(s){if(o){var a=s.originalEvent.touches[0],c=ie,l=te;return xe.scrollTo(t+n-a.pageX,e+i-a.pageY),r=r||Math.abs(n-a.pageX)>5||Math.abs(i-a.pageY)>5,c==ie&&l==te}}).bind("touchend.jsp",function(){o=!1}).bind("click.jsp-touchclick",function(){return r?(r=!1,!1):void 0})}function H(){var t=C(),e=N();i.removeClass("jspScrollable").unbind(".jsp"),i.replaceWith(Ne.append(q.children())),Ne.scrollTop(t),Ne.scrollLeft(e),ve&&clearInterval(ve)}var B,q,W,G,F,X,J,Y,U,Q,V,K,Z,te,ee,ne,ie,re,oe,se,ae,ce,le,ue,de,pe,he,fe,ge,me,ve,ye,be,we,xe=this,_e=!0,ke=!0,Se=!1,Te=!1,Ne=i.clone(!1,!1).empty(),Ce=t.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";"border-box"===i.css("box-sizing")?(ye=0,be=0):(ye=i.css("paddingTop")+" "+i.css("paddingRight")+" "+i.css("paddingBottom")+" "+i.css("paddingLeft"),be=(parseInt(i.css("paddingLeft"),10)||0)+(parseInt(i.css("paddingRight"),10)||0)),t.extend(xe,{reinitialise:function(e){e=t.extend({},B,e),o(e)},scrollToElement:function(t,e,n){T(t,e,n)},scrollTo:function(t,e,n){S(t,n),k(e,n)},scrollToX:function(t,e){S(t,e)},scrollToY:function(t,e){k(t,e)},scrollToPercentX:function(t,e){S(t*(X-W),e)},scrollToPercentY:function(t,e){k(t*(J-G),e)},scrollBy:function(t,e,n){xe.scrollByX(t,n),xe.scrollByY(e,n)},scrollByX:function(t,e){var n=N()+Math[0>t?"floor":"ceil"](t),i=n/(X-W);
b(i*ne,e)},scrollByY:function(t,e){var n=C()+Math[0>t?"floor":"ceil"](t),i=n/(J-G);v(i*Z,e)},positionDragX:function(t,e){b(t,e)},positionDragY:function(t,e){v(t,e)},animate:function(t,e,n,i){var r={};r[e]=n,t.animate(r,{duration:B.animateDuration,easing:B.animateEase,queue:!1,step:i})},getContentPositionX:function(){return N()},getContentPositionY:function(){return C()},getContentWidth:function(){return X},getContentHeight:function(){return J},getPercentScrolledX:function(){return N()/(X-W)},getPercentScrolledY:function(){return C()/(J-G)},getIsScrollableH:function(){return V},getIsScrollableV:function(){return Q},getContentPane:function(){return q},scrollToBottom:function(t){v(Z,t)},hijackInternalLinks:t.noop,destroy:function(){H()}}),o(r)}return i=t.extend({},t.fn.jScrollPane.defaults,i),t.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){i[this]=i[this]||i.speed}),this.each(function(){var e=t(this),n=e.data("jsp");n?n.reinitialise(i):(t("script",e).filter('[type="text/javascript"],:not([type])').remove(),n=new r(e,i),e.data("jsp",n))})},t.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:n,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}}(jQuery,this);var deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),deviceIsBlackBerry10=navigator.userAgent.indexOf("BB10")>0;FastClick.prototype.needsClick=function(t){"use strict";switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===t.type||t.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(t.className)},FastClick.prototype.needsFocus=function(t){"use strict";switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndroid;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},FastClick.prototype.sendClick=function(t,e){"use strict";var n,i;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),i=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},FastClick.prototype.determineEventType=function(t){"use strict";return deviceIsAndroid&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(t){"use strict";var e;deviceIsIOS&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},FastClick.prototype.updateScrollParent=function(t){"use strict";var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(t){"use strict";return t.nodeType===Node.TEXT_NODE?t.parentNode:t},FastClick.prototype.onTouchStart=function(t){"use strict";var e,n,i;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],deviceIsIOS){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!deviceIsIOS4){if(n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},FastClick.prototype.onTouchMove=function(t){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},FastClick.prototype.findControl=function(t){"use strict";return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(t){"use strict";var e,n,i,r,o,s=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTime100||deviceIsIOS&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(s),this.sendClick(s,t),deviceIsIOS&&"select"===i||(this.targetElement=null,t.preventDefault()),!1);return deviceIsIOS&&!deviceIsIOS4&&(r=s.fastClickScrollParent,r&&r.fastClickLastScrollTop!==r.scrollTop)?!0:(this.needsClick(s)||(t.preventDefault(),this.sendClick(s,t)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(t){"use strict";return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable?!this.needsClick(this.targetElement)||this.cancelNextClick?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0:!0},FastClick.prototype.onClick=function(t){"use strict";var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},FastClick.prototype.destroy=function(){"use strict";var t=this.layer;deviceIsAndroid&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(t){"use strict";var e,n,i;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!deviceIsAndroid)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(deviceIsBlackBerry10&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction?!0:!1},FastClick.attach=function(t,e){"use strict";return new FastClick(t,e)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick,function(t){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}(function(t){"use strict";function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=l),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=t.extend({},t.fn.swipe.defaults,e),this.each(function(){var i=t(this),r=i.data(C);r||(r=new n(this,e),i.data(C,r))})}function n(e,n){function $(e){if(!(le()||t(e.target).closest(n.excludedElements,Ge).length>0)){var i,r=e.originalEvent?e.originalEvent:e,o=S?r.touches[0]:r;return Fe=w,S?Xe=r.touches.length:e.preventDefault(),Re=0,De=null,qe=null,Le=0,Oe=0,ze=0,He=1,Be=0,Je=fe(),We=ve(),ae(),!S||Xe===n.fingers||n.fingers===y||W()?(de(0,o),Ye=Ne(),2==Xe&&(de(1,r.touches[1]),Oe=ze=we(Je[0].start,Je[1].start)),(n.swipeStatus||n.pinchStatus)&&(i=R(r,Fe))):i=!1,i===!1?(Fe=k,R(r,Fe),i):(n.hold&&(tn=setTimeout(t.proxy(function(){Ge.trigger("hold",[r.target]),n.hold&&(i=n.hold.call(Ge,r,r.target))},this),n.longTapThreshold)),ue(!0),null)}}function I(t){var e=t.originalEvent?t.originalEvent:t;if(Fe!==_&&Fe!==k&&!ce()){var i,r=S?e.touches[0]:e,o=pe(r);if(Ue=Ne(),S&&(Xe=e.touches.length),n.hold&&clearTimeout(tn),Fe=x,2==Xe&&(0==Oe?(de(1,e.touches[1]),Oe=ze=we(Je[0].start,Je[1].start)):(pe(e.touches[1]),ze=we(Je[0].end,Je[1].end),qe=_e(Je[0].end,Je[1].end)),He=xe(Oe,ze),Be=Math.abs(Oe-ze)),Xe===n.fingers||n.fingers===y||!S||W()){if(De=Te(o.start,o.end),B(t,De),Re=ke(o.start,o.end),Le=be(),ge(De,Re),(n.swipeStatus||n.pinchStatus)&&(i=R(e,Fe)),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var s=!0;if(n.triggerOnTouchLeave){var a=Ce(this);s=$e(o.end,a)}!n.triggerOnTouchEnd&&s?Fe=P(x):n.triggerOnTouchLeave&&!s&&(Fe=P(_)),(Fe==k||Fe==_)&&R(e,Fe)}}else Fe=k,R(e,Fe);i===!1&&(Fe=k,R(e,Fe))}}function E(t){var e=t.originalEvent;return S&&e.touches.length>0?(se(),!0):(ce()&&(Xe=Ve),Ue=Ne(),Le=be(),O()||!L()?(Fe=k,R(e,Fe)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Fe===x?(t.preventDefault(),Fe=_,R(e,Fe)):!n.triggerOnTouchEnd&&Q()?(Fe=_,D(e,Fe,h)):Fe===x&&(Fe=k,R(e,Fe)),ue(!1),null)}function j(){Xe=0,Ue=0,Ye=0,Oe=0,ze=0,He=1,ae(),ue(!1)}function M(t){var e=t.originalEvent;n.triggerOnTouchLeave&&(Fe=P(_),R(e,Fe))}function A(){Ge.unbind(Ee,$),Ge.unbind(Pe,j),Ge.unbind(je,I),Ge.unbind(Me,E),Ae&&Ge.unbind(Ae,M),ue(!1)}function P(t){var e=t,i=H(),r=L(),o=O();return!i||o?e=k:!r||t!=x||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&t==_&&n.triggerOnTouchLeave&&(e=k):e=_,e}function R(t,e){var n=void 0;return J()||X()?n=D(t,e,d):(G()||W())&&n!==!1&&(n=D(t,e,p)),re()&&n!==!1?n=D(t,e,f):oe()&&n!==!1?n=D(t,e,g):ie()&&n!==!1&&(n=D(t,e,h)),e===k&&j(t),e===_&&(S?0==t.touches.length&&j(t):j(t)),n}function D(e,l,u){var m=void 0;if(u==d){if(Ge.trigger("swipeStatus",[l,De||null,Re||0,Le||0,Xe,Je]),n.swipeStatus&&(m=n.swipeStatus.call(Ge,e,l,De||null,Re||0,Le||0,Xe,Je),m===!1))return!1;if(l==_&&F()){if(Ge.trigger("swipe",[De,Re,Le,Xe,Je]),n.swipe&&(m=n.swipe.call(Ge,e,De,Re,Le,Xe,Je),m===!1))return!1;switch(De){case i:Ge.trigger("swipeLeft",[De,Re,Le,Xe,Je]),n.swipeLeft&&(m=n.swipeLeft.call(Ge,e,De,Re,Le,Xe,Je));break;case r:Ge.trigger("swipeRight",[De,Re,Le,Xe,Je]),n.swipeRight&&(m=n.swipeRight.call(Ge,e,De,Re,Le,Xe,Je));break;case o:Ge.trigger("swipeUp",[De,Re,Le,Xe,Je]),n.swipeUp&&(m=n.swipeUp.call(Ge,e,De,Re,Le,Xe,Je));break;case s:Ge.trigger("swipeDown",[De,Re,Le,Xe,Je]),n.swipeDown&&(m=n.swipeDown.call(Ge,e,De,Re,Le,Xe,Je))}}}if(u==p){if(Ge.trigger("pinchStatus",[l,qe||null,Be||0,Le||0,Xe,He,Je]),n.pinchStatus&&(m=n.pinchStatus.call(Ge,e,l,qe||null,Be||0,Le||0,Xe,He,Je),m===!1))return!1;if(l==_&&q())switch(qe){case a:Ge.trigger("pinchIn",[qe||null,Be||0,Le||0,Xe,He,Je]),n.pinchIn&&(m=n.pinchIn.call(Ge,e,qe||null,Be||0,Le||0,Xe,He,Je));break;case c:Ge.trigger("pinchOut",[qe||null,Be||0,Le||0,Xe,He,Je]),n.pinchOut&&(m=n.pinchOut.call(Ge,e,qe||null,Be||0,Le||0,Xe,He,Je))}}return u==h?(l===k||l===_)&&(clearTimeout(Ze),clearTimeout(tn),V()&&!te()?(Ke=Ne(),Ze=setTimeout(t.proxy(function(){Ke=null,Ge.trigger("tap",[e.target]),n.tap&&(m=n.tap.call(Ge,e,e.target))},this),n.doubleTapThreshold)):(Ke=null,Ge.trigger("tap",[e.target]),n.tap&&(m=n.tap.call(Ge,e,e.target)))):u==f?(l===k||l===_)&&(clearTimeout(Ze),Ke=null,Ge.trigger("doubletap",[e.target]),n.doubleTap&&(m=n.doubleTap.call(Ge,e,e.target))):u==g&&(l===k||l===_)&&(clearTimeout(Ze),Ke=null,Ge.trigger("longtap",[e.target]),n.longTap&&(m=n.longTap.call(Ge,e,e.target))),m}function L(){var t=!0;return null!==n.threshold&&(t=Re>=n.threshold),t}function O(){var t=!1;return null!==n.cancelThreshold&&null!==De&&(t=me(De)-Re>=n.cancelThreshold),t}function z(){return null!==n.pinchThreshold?Be>=n.pinchThreshold:!0}function H(){var t;return t=n.maxTimeThreshold?Le>=n.maxTimeThreshold?!1:!0:!0}function B(t,e){if(n.allowPageScroll===l||W())t.preventDefault();else{var a=n.allowPageScroll===u;switch(e){case i:(n.swipeLeft&&a||!a&&n.allowPageScroll!=m)&&t.preventDefault();break;case r:(n.swipeRight&&a||!a&&n.allowPageScroll!=m)&&t.preventDefault();break;case o:(n.swipeUp&&a||!a&&n.allowPageScroll!=v)&&t.preventDefault();break;case s:(n.swipeDown&&a||!a&&n.allowPageScroll!=v)&&t.preventDefault()}}}function q(){var t=Y(),e=U(),n=z();return t&&e&&n}function W(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function G(){return!(!q()||!W())}function F(){var t=H(),e=L(),n=Y(),i=U(),r=O(),o=!r&&i&&n&&e&&t;return o}function X(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function J(){return!(!F()||!X())}function Y(){return Xe===n.fingers||n.fingers===y||!S}function U(){return 0!==Je[0].end.x}function Q(){return!!n.tap}function V(){return!!n.doubleTap}function K(){return!!n.longTap}function Z(){if(null==Ke)return!1;var t=Ne();return V()&&n.doubleTapThreshold>=t-Ke}function te(){return Z()}function ee(){return(1===Xe||!S)&&(isNaN(Re)||n.threshold>Re)}function ne(){return Le>n.longTapThreshold&&b>Re}function ie(){return!(!ee()||!Q())}function re(){return!(!Z()||!V())}function oe(){return!(!ne()||!K())}function se(){Qe=Ne(),Ve=event.touches.length+1}function ae(){Qe=0,Ve=0}function ce(){var t=!1;if(Qe){var e=Ne()-Qe;n.fingerReleaseThreshold>=e&&(t=!0)}return t}function le(){return!(Ge.data(C+"_intouch")!==!0)}function ue(t){t===!0?(Ge.bind(je,I),Ge.bind(Me,E),Ae&&Ge.bind(Ae,M)):(Ge.unbind(je,I,!1),Ge.unbind(Me,E,!1),Ae&&Ge.unbind(Ae,M,!1)),Ge.data(C+"_intouch",t===!0)}function de(t,e){var n=void 0!==e.identifier?e.identifier:0;return Je[t].identifier=n,Je[t].start.x=Je[t].end.x=e.pageX||e.clientX,Je[t].start.y=Je[t].end.y=e.pageY||e.clientY,Je[t]}function pe(t){var e=void 0!==t.identifier?t.identifier:0,n=he(e);return n.end.x=t.pageX||t.clientX,n.end.y=t.pageY||t.clientY,n}function he(t){for(var e=0;Je.length>e;e++)if(Je[e].identifier==t)return Je[e]}function fe(){for(var t=[],e=0;5>=e;e++)t.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return t}function ge(t,e){e=Math.max(e,me(t)),We[t].distance=e}function me(t){return We[t]?We[t].distance:void 0}function ve(){var t={};return t[i]=ye(i),t[r]=ye(r),t[o]=ye(o),t[s]=ye(s),t}function ye(t){return{direction:t,distance:0}}function be(){return Ue-Ye}function we(t,e){var n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return Math.round(Math.sqrt(n*n+i*i))}function xe(t,e){var n=1*(e/t);return n.toFixed(2)}function _e(){return 1>He?c:a}function ke(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}function Se(t,e){var n=t.x-e.x,i=e.y-t.y,r=Math.atan2(i,n),o=Math.round(180*r/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Te(t,e){var n=Se(t,e);return 45>=n&&n>=0?i:360>=n&&n>=315?i:n>=135&&225>=n?r:n>45&&135>n?s:o}function Ne(){var t=new Date;return t.getTime()}function Ce(e){e=t(e);var n=e.offset(),i={left:n.left,right:n.left+e.outerWidth(),top:n.top,bottom:n.top+e.outerHeight()};return i}function $e(t,e){return t.x>e.left&&t.xe.top&&t.y>16)+(e>>16)+(n>>16);return i<<16|65535&n}function n(t,e){return t<>>32-e}function i(t,i,r,o,s,a){return e(n(e(e(i,t),e(o,a)),s),r)}function r(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function o(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}function c(t,n){t[n>>5]|=128<>>9<<4)+14]=n;var i,c,l,u,d,p=1732584193,h=-271733879,f=-1732584194,g=271733878;for(i=0;t.length>i;i+=16)c=p,l=h,u=f,d=g,p=r(p,h,f,g,t[i],7,-680876936),g=r(g,p,h,f,t[i+1],12,-389564586),f=r(f,g,p,h,t[i+2],17,606105819),h=r(h,f,g,p,t[i+3],22,-1044525330),p=r(p,h,f,g,t[i+4],7,-176418897),g=r(g,p,h,f,t[i+5],12,1200080426),f=r(f,g,p,h,t[i+6],17,-1473231341),h=r(h,f,g,p,t[i+7],22,-45705983),p=r(p,h,f,g,t[i+8],7,1770035416),g=r(g,p,h,f,t[i+9],12,-1958414417),f=r(f,g,p,h,t[i+10],17,-42063),h=r(h,f,g,p,t[i+11],22,-1990404162),p=r(p,h,f,g,t[i+12],7,1804603682),g=r(g,p,h,f,t[i+13],12,-40341101),f=r(f,g,p,h,t[i+14],17,-1502002290),h=r(h,f,g,p,t[i+15],22,1236535329),p=o(p,h,f,g,t[i+1],5,-165796510),g=o(g,p,h,f,t[i+6],9,-1069501632),f=o(f,g,p,h,t[i+11],14,643717713),h=o(h,f,g,p,t[i],20,-373897302),p=o(p,h,f,g,t[i+5],5,-701558691),g=o(g,p,h,f,t[i+10],9,38016083),f=o(f,g,p,h,t[i+15],14,-660478335),h=o(h,f,g,p,t[i+4],20,-405537848),p=o(p,h,f,g,t[i+9],5,568446438),g=o(g,p,h,f,t[i+14],9,-1019803690),f=o(f,g,p,h,t[i+3],14,-187363961),h=o(h,f,g,p,t[i+8],20,1163531501),p=o(p,h,f,g,t[i+13],5,-1444681467),g=o(g,p,h,f,t[i+2],9,-51403784),f=o(f,g,p,h,t[i+7],14,1735328473),h=o(h,f,g,p,t[i+12],20,-1926607734),p=s(p,h,f,g,t[i+5],4,-378558),g=s(g,p,h,f,t[i+8],11,-2022574463),f=s(f,g,p,h,t[i+11],16,1839030562),h=s(h,f,g,p,t[i+14],23,-35309556),p=s(p,h,f,g,t[i+1],4,-1530992060),g=s(g,p,h,f,t[i+4],11,1272893353),f=s(f,g,p,h,t[i+7],16,-155497632),h=s(h,f,g,p,t[i+10],23,-1094730640),p=s(p,h,f,g,t[i+13],4,681279174),g=s(g,p,h,f,t[i],11,-358537222),f=s(f,g,p,h,t[i+3],16,-722521979),h=s(h,f,g,p,t[i+6],23,76029189),p=s(p,h,f,g,t[i+9],4,-640364487),g=s(g,p,h,f,t[i+12],11,-421815835),f=s(f,g,p,h,t[i+15],16,530742520),h=s(h,f,g,p,t[i+2],23,-995338651),p=a(p,h,f,g,t[i],6,-198630844),g=a(g,p,h,f,t[i+7],10,1126891415),f=a(f,g,p,h,t[i+14],15,-1416354905),h=a(h,f,g,p,t[i+5],21,-57434055),p=a(p,h,f,g,t[i+12],6,1700485571),g=a(g,p,h,f,t[i+3],10,-1894986606),f=a(f,g,p,h,t[i+10],15,-1051523),h=a(h,f,g,p,t[i+1],21,-2054922799),p=a(p,h,f,g,t[i+8],6,1873313359),g=a(g,p,h,f,t[i+15],10,-30611744),f=a(f,g,p,h,t[i+6],15,-1560198380),h=a(h,f,g,p,t[i+13],21,1309151649),p=a(p,h,f,g,t[i+4],6,-145523070),g=a(g,p,h,f,t[i+11],10,-1120210379),f=a(f,g,p,h,t[i+2],15,718787259),h=a(h,f,g,p,t[i+9],21,-343485551),p=e(p,c),h=e(h,l),f=e(f,u),g=e(g,d);return[p,h,f,g]}function l(t){var e,n="";for(e=0;32*t.length>e;e+=8)n+=String.fromCharCode(255&t[e>>5]>>>e%32);return n}function u(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;n.length>e;e+=1)n[e]=0;for(e=0;8*t.length>e;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<16&&(r=c(r,8*t.length)),n=0;16>n;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=c(o.concat(u(e)),512+8*e.length),l(c(s.concat(i),640))}function h(t){var e,n,i="0123456789abcdef",r="";for(n=0;t.length>n;n+=1)e=t.charCodeAt(n),r+=i.charAt(15&e>>>4)+i.charAt(15&e);return r}function f(t){return unescape(encodeURIComponent(t))}function g(t){return d(f(t))}function m(t){return h(g(t))}function v(t,e){return p(f(t),f(e))}function y(t,e){return h(v(t,e))}function b(t,e,n){return e?n?v(e,t):y(e,t):n?g(t):m(t)}"function"==typeof define&&define.amd?define(function(){return b}):t.md5=b}(this),function(t){t.fn.qrcode=function(e){function n(t){this.mode=a,this.data=t}function i(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function r(t,e){if(void 0==t.length)throw Error(t.length+"/"+e);for(var n=0;t.length>n&&0==t[n];)n++;this.num=Array(t.length-n+e);for(var i=0;t.length-n>i;i++)this.num[i]=t[i+n]}function o(t,e){this.totalCount=t,this.dataCount=e}function s(){this.buffer=[],this.length=0}var a;n.prototype={getLength:function(){return this.data.length},write:function(t){for(var e=0;this.data.length>e;e++)t.put(this.data.charCodeAt(e),8)}},i.prototype={addData:function(t){this.dataList.push(new n(t)),this.dataCache=null},isDark:function(t,e){if(0>t||t>=this.moduleCount||0>e||e>=this.moduleCount)throw Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var t=1,t=1;40>t;t++){for(var e=o.getRSBlocks(t,this.errorCorrectLevel),n=new s,i=0,r=0;e.length>r;r++)i+=e[r].dataCount;for(r=0;this.dataList.length>r;r++)e=this.dataList[r],n.put(e.mode,4),n.put(e.getLength(),c.getLengthInBits(e.mode,t)),e.write(n);if(8*i>=n.getLengthInBits())break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=Array(this.moduleCount);for(var n=0;this.moduleCount>n;n++){this.modules[n]=Array(this.moduleCount);for(var r=0;this.moduleCount>r;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var n=-1;7>=n;n++)if(!(-1>=t+n||t+n>=this.moduleCount))for(var i=-1;7>=i;i++)-1>=e+i||e+i>=this.moduleCount||(this.modules[t+n][e+i]=n>=0&&6>=n&&(0==i||6==i)||i>=0&&6>=i&&(0==n||6==n)||n>=2&&4>=n&&i>=2&&4>=i?!0:!1)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;8>n;n++){this.makeImpl(!0,n);var i=c.getLostPoint(this);(0==n||t>i)&&(t=i,e=n)}return e},createMovieClip:function(t,e,n){for(t=t.createEmptyMovieClip(e,n),this.make(),e=0;this.modules.length>e;e++)for(var n=1*e,i=0;this.modules[e].length>i;i++){var r=1*i;this.modules[e][i]&&(t.beginFill(0,100),t.moveTo(r,n),t.lineTo(r+1,n),t.lineTo(r+1,n+1),t.lineTo(r,n+1),t.endFill())}return t},setupTimingPattern:function(){for(var t=8;this.moduleCount-8>t;t++)null==this.modules[t][6]&&(this.modules[t][6]=0==t%2);for(t=8;this.moduleCount-8>t;t++)null==this.modules[6][t]&&(this.modules[6][t]=0==t%2)},setupPositionAdjustPattern:function(){for(var t=c.getPatternPosition(this.typeNumber),e=0;t.length>e;e++)for(var n=0;t.length>n;n++){var i=t[e],r=t[n];if(null==this.modules[i][r])for(var o=-2;2>=o;o++)for(var s=-2;2>=s;s++)this.modules[i+o][r+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s?!0:!1}},setupTypeNumber:function(t){for(var e=c.getBCHTypeNumber(this.typeNumber),n=0;18>n;n++){var i=!t&&1==(1&e>>n);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(n=0;18>n;n++)i=!t&&1==(1&e>>n),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i},setupTypeInfo:function(t,e){for(var n=c.getBCHTypeInfo(this.errorCorrectLevel<<3|e),i=0;15>i;i++){var r=!t&&1==(1&n>>i);6>i?this.modules[i][8]=r:8>i?this.modules[i+1][8]=r:this.modules[this.moduleCount-15+i][8]=r}for(i=0;15>i;i++)r=!t&&1==(1&n>>i),8>i?this.modules[8][this.moduleCount-i-1]=r:9>i?this.modules[8][15-i-1+1]=r:this.modules[8][15-i-1]=r;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,i=this.moduleCount-1,r=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;2>a;a++)if(null==this.modules[i][s-a]){var l=!1;t.length>o&&(l=1==(1&t[o]>>>r)),c.getMask(e,i,s-a)&&(l=!l),this.modules[i][s-a]=l,r--,-1==r&&(o++,r=7)}if(i+=n,0>i||i>=this.moduleCount){i-=n,n=-n;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(t,e,n){for(var e=o.getRSBlocks(t,e),r=new s,a=0;n.length>a;a++){var l=n[a];r.put(l.mode,4),r.put(l.getLength(),c.getLengthInBits(l.mode,t)),l.write(r)}for(a=t=0;e.length>a;a++)t+=e[a].dataCount;if(r.getLengthInBits()>8*t)throw Error("code length overflow. ("+r.getLengthInBits()+">"+8*t+")");for(8*t>=r.getLengthInBits()+4&&r.put(0,4);0!=r.getLengthInBits()%8;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*t)&&(r.put(i.PAD0,8),!(r.getLengthInBits()>=8*t));)r.put(i.PAD1,8);return i.createBytes(r,e)},i.createBytes=function(t,e){for(var n=0,i=0,o=0,s=Array(e.length),a=Array(e.length),l=0;e.length>l;l++){var u=e[l].dataCount,d=e[l].totalCount-u,i=Math.max(i,u),o=Math.max(o,d);s[l]=Array(u);for(var p=0;s[l].length>p;p++)s[l][p]=255&t.buffer[p+n];for(n+=u,p=c.getErrorCorrectPolynomial(d),u=new r(s[l],p.getLength()-1).mod(p),a[l]=Array(p.getLength()-1),p=0;a[l].length>p;p++)d=p+u.getLength()-a[l].length,a[l][p]=d>=0?u.get(d):0}for(p=l=0;e.length>p;p++)l+=e[p].totalCount;for(n=Array(l),p=u=0;i>p;p++)for(l=0;e.length>l;l++)s[l].length>p&&(n[u++]=s[l][p]);for(p=0;o>p;p++)for(l=0;e.length>l;l++)a[l].length>p&&(n[u++]=a[l][p]);return n},a=4;for(var c={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;c.getBCHDigit(e)-c.getBCHDigit(c.G15)>=0;)e^=c.G15<=0;)e^=c.G18<>>=1;return e},getPatternPosition:function(t){return c.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return 0==(e+n)%2;case 1:return 0==e%2;case 2:return 0==n%3;case 3:return 0==(e+n)%3;case 4:return 0==(Math.floor(e/2)+Math.floor(n/3))%2;case 5:return 0==e*n%2+e*n%3;case 6:return 0==(e*n%2+e*n%3)%2;case 7:return 0==(e*n%3+(e+n)%2)%2;default:throw Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new r([1],0),n=0;t>n;n++)e=e.multiply(new r([1,l.gexp(n)],0));return e},getLengthInBits:function(t,e){if(e>=1&&10>e)switch(t){case 1:return 10;case 2:return 9;case a:return 8;case 8:return 8;default:throw Error("mode:"+t)}else if(27>e)switch(t){case 1:return 12;case 2:return 11;case a:return 16;case 8:return 10;default:throw Error("mode:"+t)}else{if(!(41>e))throw Error("type:"+e);switch(t){case 1:return 14;case 2:return 13;case a:return 16;case 8:return 12;default:throw Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,i=0;e>i;i++)for(var r=0;e>r;r++){for(var o=0,s=t.isDark(i,r),a=-1;1>=a;a++)if(!(0>i+a||i+a>=e))for(var c=-1;1>=c;c++)0>r+c||r+c>=e||0==a&&0==c||s==t.isDark(i+a,r+c)&&o++;o>5&&(n+=3+o-5)}for(i=0;e-1>i;i++)for(r=0;e-1>r;r++)o=0,t.isDark(i,r)&&o++,t.isDark(i+1,r)&&o++,t.isDark(i,r+1)&&o++,t.isDark(i+1,r+1)&&o++,(0==o||4==o)&&(n+=3);for(i=0;e>i;i++)for(r=0;e-6>r;r++)t.isDark(i,r)&&!t.isDark(i,r+1)&&t.isDark(i,r+2)&&t.isDark(i,r+3)&&t.isDark(i,r+4)&&!t.isDark(i,r+5)&&t.isDark(i,r+6)&&(n+=40);for(r=0;e>r;r++)for(i=0;e-6>i;i++)t.isDark(i,r)&&!t.isDark(i+1,r)&&t.isDark(i+2,r)&&t.isDark(i+3,r)&&t.isDark(i+4,r)&&!t.isDark(i+5,r)&&t.isDark(i+6,r)&&(n+=40);for(r=o=0;e>r;r++)for(i=0;e>i;i++)t.isDark(i,r)&&o++;return t=Math.abs(100*o/e/e-50)/5,n+10*t}},l={glog:function(t){if(1>t)throw Error("glog("+t+")");return l.LOG_TABLE[t]},gexp:function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return l.EXP_TABLE[t]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},u=0;8>u;u++)l.EXP_TABLE[u]=1<u;u++)l.EXP_TABLE[u]=l.EXP_TABLE[u-4]^l.EXP_TABLE[u-5]^l.EXP_TABLE[u-6]^l.EXP_TABLE[u-8];for(u=0;255>u;u++)l.LOG_TABLE[l.EXP_TABLE[u]]=u;return r.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=Array(this.getLength()+t.getLength()-1),n=0;this.getLength()>n;n++)for(var i=0;t.getLength()>i;i++)e[n+i]^=l.gexp(l.glog(this.get(n))+l.glog(t.get(i)));return new r(e,0)},mod:function(t){if(0>this.getLength()-t.getLength())return this;for(var e=l.glog(this.get(0))-l.glog(t.get(0)),n=Array(this.getLength()),i=0;this.getLength()>i;i++)n[i]=this.get(i);for(i=0;t.getLength()>i;i++)n[i]^=l.gexp(l.glog(t.get(i))+e);return new r(n,0).mod(t)}},o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(t,e){var n=o.getRsBlockTable(t,e);
if(void 0==n)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var i=n.length/3,r=[],s=0;i>s;s++)for(var a=n[3*s+0],c=n[3*s+1],l=n[3*s+2],u=0;a>u;u++)r.push(new o(c,l));return r},o.getRsBlockTable=function(t,e){switch(e){case 1:return o.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return o.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return o.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return o.RS_BLOCK_TABLE[4*(t-1)+3]}},s.prototype={get:function(t){return 1==(1&this.buffer[Math.floor(t/8)]>>>7-t%8)},put:function(t,e){for(var n=0;e>n;n++)this.putBit(1==(1&t>>>e-n-1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);e>=this.buffer.length&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},"string"==typeof e&&(e={text:e}),e=t.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,correctLevel:2,background:"#ffffff",foreground:"#000000"},e),this.each(function(){var n;if("canvas"==e.render){n=new i(e.typeNumber,e.correctLevel),n.addData(e.text),n.make();var r=document.createElement("canvas");r.width=e.width,r.height=e.height;for(var o=r.getContext("2d"),s=e.width/n.getModuleCount(),a=e.height/n.getModuleCount(),c=0;n.getModuleCount()>c;c++)for(var l=0;n.getModuleCount()>l;l++){o.fillStyle=n.isDark(c,l)?e.foreground:e.background;var u=Math.ceil((l+1)*s)-Math.floor(l*s),d=Math.ceil((c+1)*s)-Math.floor(c*s);o.fillRect(Math.round(l*s),Math.round(c*a),u,d)}}else for(n=new i(e.typeNumber,e.correctLevel),n.addData(e.text),n.make(),r=t("").css("width",e.width+"px").css("height",e.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",e.background),o=e.width/n.getModuleCount(),s=e.height/n.getModuleCount(),a=0;n.getModuleCount()>a;a++)for(c=t("
").css("height",s+"px").appendTo(r),l=0;n.getModuleCount()>l;l++)t(" | ").css("width",o+"px").css("background-color",n.isDark(a,l)?e.foreground:e.background).appendTo(c);n=r,jQuery(n).appendTo(this)})}}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.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||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var n=this.options;return this.helper||n.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){t("").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var n=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,n){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",e,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.options.refreshPositions&&(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")),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var n=this,i=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",e)!==!1&&n._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e])):"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),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_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 e,n,i,r=this.options;return r.containment?"window"===r.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===r.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):r.containment.constructor===Array?(this.containment=r.containment,void 0):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),n=t(r.containment),i=n[0],i&&(e="hidden"!==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),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*i}},_generatePosition:function(e){var n,i,r,o,s=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,c=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(i=this.relative_container.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.leftn[2]&&(c=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(l=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,l=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((c-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,c=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)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:c-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():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},_trigger:function(e,n,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[n,i]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,n){var i=t(this).data("ui-draggable"),r=i.options,o=t.extend({},n,{item:i.element});i.sortables=[],t(r.connectToSortable).each(function(){var n=t.data(this,"ui-sortable");n&&!n.options.disabled&&(i.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",e,o))})},stop:function(e,n){var i=t(this).data("ui-draggable"),r=t.extend({},n,{item:i.element});t.each(i.sortables,function(){this.instance.isOver?(this.instance.isOver=0,i.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===i.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,r))})},drag:function(e,n){var i=t(this).data("ui-draggable"),r=this;t.each(i.sortables,function(){var o=!1,s=this;this.instance.positionAbs=i.positionAbs,this.instance.helperProportions=i.helperProportions,this.instance.offset.click=i.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(i.sortables,function(){return this.instance.positionAbs=i.positionAbs,this.instance.helperProportions=i.helperProportions,this.instance.offset.click=i.offset.click,this!==s&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(s.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(r).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=i.offset.click.top,this.instance.offset.click.left=i.offset.click.left,this.instance.offset.parent.left-=i.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=i.offset.parent.top-this.instance.offset.parent.top,i._trigger("toSortable",e),i.dropped=this.instance.element,i.currentItem=i.element,this.instance.fromOutside=i),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),i._trigger("fromSortable",e),i.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),n=t(this).data("ui-draggable").options;e.css("cursor")&&(n._cursor=e.css("cursor")),e.css("cursor",n.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,n){var i=t(n.helper),r=t(this).data("ui-draggable").options;i.css("opacity")&&(r._opacity=i.css("opacity")),i.css("opacity",r.opacity)},stop:function(e,n){var i=t(this).data("ui-draggable").options;i._opacity&&t(n.helper).css("opacity",i._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var n=t(this).data("ui-draggable"),i=n.options,r=!1;n.scrollParent[0]!==document&&"HTML"!==n.scrollParent[0].tagName?(i.axis&&"x"===i.axis||(n.overflowOffset.top+n.scrollParent[0].offsetHeight-e.pageY=0;d--)a=h.snapElements[d].left,c=a+h.snapElements[d].width,l=h.snapElements[d].top,u=l+h.snapElements[d].height,a-g>v||m>c+g||l-g>b||y>u+g||!t.contains(h.snapElements[d].item.ownerDocument,h.snapElements[d].item)?(h.snapElements[d].snapping&&h.options.snap.release&&h.options.snap.release.call(h.element,e,t.extend(h._uiHash(),{snapItem:h.snapElements[d].item})),h.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(i=g>=Math.abs(l-b),r=g>=Math.abs(u-y),o=g>=Math.abs(a-v),s=g>=Math.abs(c-m),i&&(n.position.top=h._convertPositionTo("relative",{top:l-h.helperProportions.height,left:0}).top-h.margins.top),r&&(n.position.top=h._convertPositionTo("relative",{top:u,left:0}).top-h.margins.top),o&&(n.position.left=h._convertPositionTo("relative",{top:0,left:a-h.helperProportions.width}).left-h.margins.left),s&&(n.position.left=h._convertPositionTo("relative",{top:0,left:c}).left-h.margins.left)),p=i||r||o||s,"outer"!==f.snapMode&&(i=g>=Math.abs(l-y),r=g>=Math.abs(u-b),o=g>=Math.abs(a-m),s=g>=Math.abs(c-v),i&&(n.position.top=h._convertPositionTo("relative",{top:l,left:0}).top-h.margins.top),r&&(n.position.top=h._convertPositionTo("relative",{top:u-h.helperProportions.height,left:0}).top-h.margins.top),o&&(n.position.left=h._convertPositionTo("relative",{top:0,left:a}).left-h.margins.left),s&&(n.position.left=h._convertPositionTo("relative",{top:0,left:c-h.helperProportions.width}).left-h.margins.left)),!h.snapElements[d].snapping&&(i||r||o||s||p)&&h.options.snap.snap&&h.options.snap.snap.call(h.element,e,t.extend(h._uiHash(),{snapItem:h.snapElements[d].item})),h.snapElements[d].snapping=i||r||o||s||p)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,n=this.data("ui-draggable").options,i=t.makeArray(t(n.stack)).sort(function(e,n){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(n).css("zIndex"),10)||0)});i.length&&(e=parseInt(t(i[0]).css("zIndex"),10)||0,t(i).each(function(n){t(this).css("zIndex",e+n)}),this.css("zIndex",e+i.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,n){var i=t(n.helper),r=t(this).data("ui-draggable").options;i.css("zIndex")&&(r._zIndex=i.css("zIndex")),i.css("zIndex",r.zIndex)},stop:function(e,n){var i=t(this).data("ui-draggable").options;i._zIndex&&t(n.helper).css("zIndex",i._zIndex)}})}(jQuery),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Asset=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Asset","cid","width","height","thumb","image","raw","name","deleted","project_cids"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),n.prototype.load=function(t){return this.id=t.cid,n.__super__.load.call(this,t),this.project_cids||(this.project_cids="")},n.prototype.preload=function(){return(new Image).src=this.image},n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Colorset=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Colorset","cid","tc","sc","bg","ds","bc","o"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),n.prototype.load=function(t){return this.id=t.cid,n.__super__.load.call(this,t)},n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Feedback=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Feedback","comment"),n.extend(Spine.Model.Ajax),n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Link=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}var i,r;return e(n,t),n.configure("Link","cid","widget_cids","target_cid","screen_cid","transition","gesture"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),i=function(){var t,e,n,i;for(n=["none","slideleft","slideright","leftmenu","rightmenu","slideleft2","leftout","slideright2","rightout","topin","topout","popin","popout"],i=[],t=0,e=n.length;e>t;t++)r=n[t],i.push({id:r,name:I18N_STRINGS["tr.n."+r],desc:I18N_STRINGS["tr.d."+r]});return i}(),n.prototype.load=function(t){return this.id=t.cid,n.__super__.load.call(this,t),this.transitions=i},n.prototype.cwidgets=function(){var t,e,n,i,r,o;for(i=function(){var e,n,i,r;for(i=this.widget_cids.split(","),r=[],e=0,n=i.length;n>e;e++)t=i[e],Widget.exists(t)?r.push(Widget.find(t)):r.push(void 0);return r}.call(this),e=r=0,o=i.length;o>r;e=++r)n=i[e],n||i.splice(e,1);return i},n.prototype.cscreen=function(){return Screen.find(this.screen_cid)},n.prototype.restore=function(t){return this.widget_cids=t.widget_cids,this.target_cid=t.target_cid,this.transition=t.transition},n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Preference=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Preference","cid","palette","pt","pl","text","tt","tl","asset","at","al","aw","ah","ruler","rt","rl","look","lt","ll","link_line"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Project=function(t){function n(){n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Project","name","access_token","description","cid","updated_at","version","icon","splash","retina_splash","width","height","device","scale","password","model","access","wechat","archived","deleted"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),n.prototype.load=function(t){return this.id=t.cid,n.__super__.load.call(this,t),this.access_token||(this.access_token=Math.uuid(20)),this.model||(this.model=this.device_model())},n.prototype.cscreens=function(){return Screen.select(function(t){return function(e){return e.project_cid===t.cid}}(this))},n.prototype.sorted_screens=function(){var t;return t=Screen.select(function(t){return function(e){return e.project_cid===t.cid&&!e.parent_cid}}(this)),t.sort(function(t,e){return t.position-e.position})},n.prototype.homeScreen=function(){var t,e,n,i,r;for(t={position:1e3},r=this.cscreens(),n=0,i=r.length;i>n;n++)e=r[n],e.positionthis.height?"landscape":"portrait"},n.prototype.isPrivate=function(){return"private"===this.access},n.prototype.isPublic=function(){return"public"===this.access},n.prototype.carrier=function(){var t,e,n,i,r,o,s,a;for(s=this.cscreens(),n=0,r=s.length;r>n;n++)for(t=s[n],a=t.cwidgets(),i=0,o=a.length;o>i;i++)if(e=a[i],"status_bar"===e.name)return e.text;return COMPONENTS.status_bar.text},n.prototype.swidth=function(t){return"portrait"===t.toLowerCase()?Math.min(this.width,this.height):Math.max(this.width,this.height)},n.prototype.sheight=function(t){return"portrait"===t.toLowerCase()?Math.max(this.width,this.height):Math.min(this.width,this.height)},n.prototype.os_icon=function(){return"android"===this.device?"android":"apple"},n.prototype.device_icon=function(){return"ipad"===this.device?"tablet":"mobile"},n.prototype.device_model=function(){var t,e,n,i,r;i=Math.min(this.width,this.height),t=Math.max(this.width,this.height),r=DEVICES[this.device];for(e in r)if(n=r[e],i===n.width&&t===n.height)return e},n.prototype.device_name=function(){var t,e,n,i,r;i=Math.min(this.width,this.height),t=Math.max(this.width,this.height),r=DEVICES[this.device];for(e in r)if(n=r[e],i===n.width&&t===n.height)return n.name},n.prototype.isCustomize=function(){return"customize"===this.model},n.prototype.hasPassword=function(){return!Spine.isBlank(this.password)},n.prototype.setDeviceModel=function(t){var e,n,i,r,o;if(e=DEVICES[this.device][t]){for(o=this.cscreens(),i=0,r=o.length;r>i;i++)n=o[i],n.width=e.width,n.height=e.height+n.height-this.height,n.lsave();return this.width=e.width,this.height=e.height,this.model=t}},n.prototype.setSplash=function(t){return Spine.isBlank(t)?"ipad"===this.device?(this.splash="/images/splashes/ipad_"+this.orient()+"_normal.png",this.retina_splash="/images/splashes/ipad_"+this.orient()+"_retina.png"):(this.splash="/images/splashes/normal.png",this.retina_splash="/images/splashes/retina.png"):this.splash=this.retina_splash=t},n.prototype.setup=function(){return COMPONENTS.status_bar.text=COMPONENTS.status_bar.tb_text=this.carrier(),"android"===this.device&&this.setupAndroid(),"iphone"===this.device&&this.setupiPhone(),"ipad"===this.device?this.setupiPad():void 0},n.prototype.setupAndroid=function(){return COMPONENTS.status_bar.height=23,COMPONENTS.navigation_bar.top=23,COMPONENTS.navigation_bar.height=55},n.prototype.setupiPhone=function(){return COMPONENTS.status_bar.height=20,COMPONENTS.navigation_bar.top=20,COMPONENTS.navigation_bar.height=45},n.prototype.setupiPad=function(){return COMPONENTS.status_bar.height=20,COMPONENTS.navigation_bar.top=20,COMPONENTS.navigation_bar.height=45},n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Screen=function(t){function n(){n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Screen","cid","name","orientation","position","project_cid","parent_cid","expanded","height","hh","fh"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),n.prototype.load=function(t){return this.id=t.cid,n.__super__.load.call(this,t),this.project_cid?(this.height||(this.height=this.cp().sheight(this.orient())),this.width=this.cp().swidth(this.orient()),this.device||(this.device=this.cp().device),this.scale||(this.scale=this.cp().scale)):void 0},n.prototype.orient=function(){return this.orientation.toLowerCase()},n.prototype.h=function(){return Math.round(this.height*$.scale()/100)},n.prototype.w=function(){return Math.round(this.width*$.scale()/100)},n.prototype.cp=function(){return Project.find(this.project_cid)},n.prototype.cwidgets=function(){var t;return t=this.cid,Widget.select(function(e){return e.screen_cid===t})},n.prototype.clinks=function(){var t;return t=this.cid,Link.select(function(e){return e.screen_cid===t})},n.prototype.children=function(){var t,e;return t=this.cid,e=n.select(function(e){return e.parent_cid===t}),e.sort(function(t,e){return t.position-e.position})},n.prototype.findLinkByWidgetCid=function(t){var e,n,i,r,o;for(o=this.clinks(),i=0,r=o.length;r>i;i++)if(e=o[i],n=new RegExp(t),n.test(e.widget_cids))return e},n.prototype.setOrientation=function(t){return this.orientation=t,this.height=this.cp().sheight(t),this.width=this.cp().swidth(t)},n.prototype.setup=function(t){var e;return e=new Widget({name:"status_bar",text:COMPONENTS.status_bar.text,left:0,top:0,width:this.width,height:COMPONENTS.status_bar.height,screen_cid:this.cid,cid:"w"+Math.uuid(10,16)}),e.lsave(),t?(e=new Widget({name:"navigation_bar",left:0,top:COMPONENTS.navigation_bar.top,height:COMPONENTS.navigation_bar.height,text:t,width:this.width,screen_cid:this.cid,cid:"w"+Math.uuid(10,16)}),e.lsave()):void 0},n.prototype.statusBar=function(){var t,e,n,i;for(i=this.cwidgets(),e=0,n=i.length;n>e;e++)if(t=i[e],"status_bar"===t.name)return t;return null},n.prototype.maxWidgetHeight=function(){var t,e,n,i,r;for(t=0,r=this.cwidgets(),n=0,i=r.length;i>n;n++)e=r[n],!e.isFooter()&&!e.inFooter()&&e.b()>t&&e.inScreen()&&(t=e.b());return t+=this.footerHeight(),t>this.h()&&(t=this.h()),100*t/$.scale()},n.prototype.hasStatusBar=function(){var t;return-1!==function(){var e,n,i,r;for(i=this.cwidgets(),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(t.name);return r}.call(this).indexOf("status_bar")},n.prototype.hasKeyboard=function(){var t;return-1!==function(){var e,n,i,r;for(i=this.cwidgets(),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(t.name);return r}.call(this).indexOf("keyboard")},n.prototype.hasTabbar=function(){var t;return-1!==function(){var e,n,i,r;for(i=this.cwidgets(),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(t.name);return r}.call(this).indexOf("tab_bar")},n.prototype._headerHeight=function(){var t,e;return t=function(){var t,n,i,r;for(i=this.cwidgets(),r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(e.name);return r}.call(this),-1!==t.indexOf("navigation_bar")?COMPONENTS.navigation_bar.height+COMPONENTS.status_bar.height+1:-1!==t.indexOf("status_bar")?COMPONENTS.status_bar.height:0},n.prototype.headerHeight=function(){return(this.hh||this._headerHeight())*$.scale()/100},n.prototype._footerHeight=function(){var t;return t=this.hasKeyboard()?this.keyboardH(this.orient()):this.hasTabbar()?45:0},n.prototype.footerHeight=function(){return(this.fh||this._footerHeight())*$.scale()/100},n.prototype.footerTop=function(){return this.h()-this.footerHeight()},n.prototype.outerHeight=function(){return this.h()+62},n.prototype.outerWidth=function(){return this.w()+42},n.prototype.dW=function(){return Math.round(this.cp().swidth(this.orient())*$.scale()/100)},n.prototype.dH=function(){return Math.round(this.cp().sheight(this.orient())*$.scale()/100)},n.prototype.eH=function(){return this.h()-this.dH()},n.prototype.keyboardH=function(t){return"ipad"===this.cp().device?"portrait"===t?264:352:"portrait"===t?218:160},n.prototype.retina_splash=function(){return this.cp().retina_splash},n}(Spine.Model)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Widget=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.configure("Widget","screen_cid","name","text","icon","top","left","width","height","cid","fs","br","bs","is","ha","va","image","z","th","lh","o","ds","sc","bg","tc","bc","bo","i","td","f","ts","tsc","p"),n.include(Spine.Model.Dirty),n.extend(Spine.Model.Ajax),n.zoomables={label:"n,s,e,w,ne,nw,se,sw",button:"n,s,e,w,ne,nw,se,sw",text_field:"n,s,e,w,ne,nw,se,sw",rectangle:"n,s,e,w,ne,nw,se,sw",rounded_rect:"n,s,e,w,ne,nw,se,sw",lr:"n,s,e,w,ne,nw,se,sw",tab_item:"w,e",image_view:"n,s,e,w,ne,nw,se,sw",icon_button:"n,s,e,w,ne,nw,se,sw",video_view:"n,s,e,w,ne,nw,se,sw",text_view:"n,s,e,w,ne,nw,se,sw",sticky:"n,s,e,w,ne,nw,se,sw",map_view:"n,s,e,w,ne,nw,se,sw",segmented_control:"w,e",hr:"w,e",ve:"n,s",search_bar:"w,e"},n.prototype.load=function(t){var e;
return this.id=t.cid,n.__super__.load.call(this,t),this.multiline=-1!==["text_view","label","sticky"].indexOf(this.name),this.iconic=-1!==["icon_button","tab_item"].indexOf(this.name),this.linkable=-1===["status_bar","tab_bar","keyboard","hr","ve","map_view"].indexOf(this.name),this.moveable=-1===["status_bar","tab_bar","keyboard","navigation_bar"].indexOf(this.name),this.editable=-1!==["label","button","text_field","navigation_bar","search_bar","tab_item","text_view","status_bar","keyboard","sticky"].indexOf(this.name),this.zoomable=n.zoomables[this.name],e=COMPONENTS[this.name],e&&("number"!=typeof this.fs&&(this.fs=e.fs),"number"!=typeof this.is&&(this.is=e.is),"number"!=typeof this.br&&(this.br=e.br),"number"!=typeof this.bs&&(this.bs=e.bs),this.ha||(this.ha=e.ha),this.va||(this.va=e.va),this.z||(this.z=e.z),e.lh&&(this.lh||(this.lh=Math.floor(this.fs*e.lh)))),this.text||(this.text=""),this.th||(this.th="status_bar"===this.name?"light":""),0!==this.o&&(this.o||(this.o=100)),this.ds||(this.ds=0),this.sc||(this.sc="#aaaaaa"),this.ts||(this.ts=0),this.tsc||(this.tsc="#aaaaaa"),this.bo||(this.bo=0),this.i||(this.i=0),this.td||(this.td="normal"),this.bg||(this.bg=""),this.tc||(this.tc=""),this.bc||(this.bc=""),this.p=void 0===this.p?1:this.p?1:0},n.prototype.cs=function(){return this._cs||(this._cs=Screen.find(this.screen_cid))},n.prototype.isContainer=function(){return-1!==["navigation_bar","rectangle","rounded_rect"].indexOf(this.name)},n.prototype.isFullWidth=function(){return-1!==["navigation_bar","status_bar","tab_bar","search_bar","keyboard"].indexOf(this.name)},n.prototype.isFooter=function(){return-1!==["tab_bar","keyboard"].indexOf(this.name)},n.prototype.themeable=function(){return-1!==["status_bar","navigation_bar","tab_bar","search_bar","image_view","keyboard"].indexOf(this.name)},n.prototype.inScreen=function(){return this.r()>0&&this.l()=this.cs().footerTop()&&this.t()<=this.cs().h()},n.prototype.restore=function(t){return this.screen_cid=t.screen_cid,this.name=t.name,this.text=t.text,this.icon=t.icon,this.width=t.width,this.height=t.height,this.left=t.left,this.top=t.top,this.fs=t.fs,this.is=t.is,this.bs=t.bs,this.br=t.br,this.va=t.va,this.ha=t.ha,this.lh=t.lh,this.z=t.z,this.th=t.th,this.image=t.image,this.bg=t.bg,this.tc=t.tc,this.bc=t.bc,this.ds=t.ds,this.sc=t.sc,this.ts=t.ts,this.tsc=t.tsc,this.o=t.o,this.bo=t.bo,this.i=t.i,this.td=t.td,this.p=t.p},n.prototype._l=function(){return null!==this.left?Math.round(this.left):COMPONENTS[this.name].left},n.prototype.l=function(){return Math.round(this._l()*this.s()/100)},n.prototype.t=function(){return null!==this.top?Math.round(this.top*this.s()/100):void 0!==COMPONENTS[this.name].top?Math.round(COMPONENTS[this.name].top*this.s()/100):void 0!==COMPONENTS[this.name].bottom?this.cs().h()-Math.round(this.height*this.s()/100):void 0},n.prototype.w=function(){return Math.round(this.width*this.s()/100)},n.prototype.h=function(){return Math.round(this.height*this.s()/100)},n.prototype.r=function(){return this.l()+this.w()},n.prototype.b=function(){return this.t()+this.h()},n.prototype._setAttr=function(t,e,n){return this[t]=Math.round(100*e/this.s()),e>this[n]()&&(this[t]+=1),this[n]()>e?this[t]-=1:void 0},n.prototype.setL=function(t){return this._setAttr("left",t,"l")},n.prototype.setT=function(t){return this._setAttr("top",t,"t")},n.prototype.setW=function(t){return this._setAttr("width",t,"w")},n.prototype.setH=function(t){return this._setAttr("height",t,"h")},n.prototype.s=function(){return $("#workspace").data("scale")},n.prototype.fS=function(){return Math.round(this.fs*this.s()/100)},n.prototype.iS=function(){return Math.round(this.is*this.s()/100)},n.prototype.bR=function(){return Math.round(this.br*this.s()/100)},n}(Spine.Model)}.call(this),function(){Jot("account",'#account\n .nav\n .profile\n img.avatar(src={{avatar}})\n .info\n p.name\n :{{name}}\n p.email\n :{{email}}\n ul\n li.active\n a(href="#profile")\n i.fa.fa-user\n :'+I18N_STRINGS["account.account"]+'\n li\n a(href="#billings")\n i.fa.fa-money\n :'+I18N_STRINGS["account.billings"]+'\n li\n a(href="#setting")\n i.fa.fa-cogs\n :'+I18N_STRINGS["account.settings"]+"\n .content\n #profile.tab-pane.active\n h3\n :"+I18N_STRINGS["account.account"]+"\n .subscription\n p\n span.attr\n :"+I18N_STRINGS["account.current_plan"]+": \n span.plan\n :{{plan_name}}\n p\n span.attr\n :"+I18N_STRINGS["account.status"]+': \n span(class="{{state}}")\n :{{state_name}}\n - pro?\n p\n span.attr\n :'+I18N_STRINGS.next_billing_on+": \n :{{next_billing_on}}\n h4\n - !free?\n :"+I18N_STRINGS.renew+"\n - free?\n :"+I18N_STRINGS.upgrade+"\n table.table\n thead\n tr\n th "+I18N_STRINGS.plan+"\n th "+I18N_STRINGS.details+"\n th "+I18N_STRINGS.price+"\n th "+I18N_STRINGS.action+"\n tbody\n tr\n td "+I18N_STRINGS.free+"\n td "+I18N_STRINGS.public_apps+"\n td "+I18N_STRINGS.free+"\n td\n tr\n td "+I18N_STRINGS.monthly+"\n td "+I18N_STRINGS.unlimited+"\n - developed?\n td "+I18N_STRINGS.monthly_price+"\n - !developed?\n td "+I18N_STRINGS.cnmonthly_price+'\n td\n - developed?\n a.btn.btn-small(href="/paypal/'+I18N_STRINGS.monthly_plan+'" data-method="put")\n :'+I18N_STRINGS.pay_with_paypal+'\n a.btn.btn-small(href="/alipay/'+I18N_STRINGS.monthly_plan+'" data-method="put")\n :'+I18N_STRINGS.pay_with_alipay+'\n - !developed?\n a.btn.btn-small(href="/paypal/cnmonthly" data-method="put")\n :'+I18N_STRINGS.pay_with_paypal+'\n a.btn.btn-small(href="/alipay/cnmonthly" data-method="put")\n :'+I18N_STRINGS.pay_with_alipay+"\n tr\n td "+I18N_STRINGS.yearly+"\n td "+I18N_STRINGS.unlimited+"\n - developed?\n td "+I18N_STRINGS.yearly_price+"\n - !developed?\n td "+I18N_STRINGS.cnyearly_price+'\n td\n - developed?\n a.btn.btn-small(href="/paypal/'+I18N_STRINGS.yearly_plan+'" data-method="put")\n :'+I18N_STRINGS.pay_with_paypal+'\n a.btn.btn-small(href="/alipay/'+I18N_STRINGS.yearly_plan+'" data-method="put")\n :'+I18N_STRINGS.pay_with_alipay+'\n - !developed?\n a.btn.btn-small(href="/paypal/cnyearly" data-method="put")\n :'+I18N_STRINGS.pay_with_paypal+'\n a.btn.btn-small(href="/alipay/cnyearly" data-method="put")\n :'+I18N_STRINGS.pay_with_alipay+"\n tr\n td(colspan='4') "+I18N_STRINGS.expires+'\n .cancel-account\n a.btn.btn-danger(href="#cancel-account")\n :'+I18N_STRINGS["account.cancel"]+"\n #billings.tab-pane\n h3 "+I18N_STRINGS["account.billings"]+"\n table.table\n thead\n tr\n th "+I18N_STRINGS.billing_date+"\n th "+I18N_STRINGS.amount+"\n th "+I18N_STRINGS.payment_gateway+"\n tbody\n - orders\n tr\n td {{date}}\n td {{amount}} {{currency}}\n td {{gateway}}\n #setting.tab-pane\n h3\n :"+I18N_STRINGS["account.settings"]+"\n form#user\n .alert.alert-success\n :"+I18N_STRINGS["account.updated_success"]+"\n .alert.alert-danger\n .form-group\n label "+I18N_STRINGS.name+'\n input.form-control(type="text" required name="user[name]" value="{{name}}")\n .form-group\n label Email\n input.form-control(type="email" required name="user[email]" value="{{email}}")\n .form-group\n label '+I18N_STRINGS.password+'\n input.form-control(type="password" name="user[password]")\n .form-group\n label '+I18N_STRINGS.password_confirmation+'\n input.form-control(type="password" name="user[password_confirmation]")\n button.btn(type="submit")\n i.fa.fa-spin.fa-spinner\n :'+I18N_STRINGS.update+"\n #cancel-account.tab-pane\n h3\n :"+I18N_STRINGS["account.cancel"]+"\n p\n :"+I18N_STRINGS["account.sorry_see_you_go"]+"\n p\n :"+I18N_STRINGS["account.once_account_cancelled"]+"\n p\n :"+I18N_STRINGS["account.cancel_charging"]+'\n p\n a.btn#no-thanks(href="#")\n :'+I18N_STRINGS.no_thanks+'\n a.btn.btn-danger(href="/users/{{id}}" data-method="delete" data-confirm="'+I18N_STRINGS["account.last_confirmation"]+'")\n :'+I18N_STRINGS["account.cancel_confirm"])}.call(this),function(){Jot("design",'#components\n .header\n a.circle.home.logo(href="#apps")\n img(width="36" height="36" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAA4VBMVEUAAACAgICDg4SioqKLi4uZmZmDg4NISEiqqqp/f3+CgoKIiIiGhoaOjo59fX2GhoZ6enqDg4OQkJCEhIWHh4iKioqLi4uqqqqbm5vp6eno6Ojn5+fq6uq7u7urq6vm5uavr66xsbHl5eW0tLTi4uLr6+u3t7a5ubmpqanj4+Onp6fk5OStra3u7u7DwsKjo6Pt7ey+vr7MzMy1tbXV1dWwsLDg4OClpaXw8PDAwMDHx8aRkZGZmZmgoaHR0dGOjo3e3t7z8/KcnJyHh4efn5/JycmWlpaJiYn19fX+/v7a2totJGooAAAASHRSTlMABKwWfDHwAQO7T6u8Pab7heQ+huW8UBUX//////////////////////////////////////////////////////////////4kpkSBAAADXklEQVQ4y22Uh27bMBBA2QynStKmGR0corZE7S3ZWla8Euf/P6gnu60btEdBIHAPx9vot3y8Quj8+ot0P5vdS1+uzxG6+ojey9UHhD59vovTbCiKIZPju8+fEPpw9Y5B6FJqozF5PsjrPBmjVroExYkBuxfrdHyeJxY7HJzMn810fTGpTszZpphjhhk7QoQx4IrN2R8KTEpelWCdAQYfHAVjTEhYxRKofzFnnm/pxCeUUBCiEF8hGFMcJtrNkfqALjaVRQn2McEEPtAqIdMVTIui2V0AAG9ergdi+qZZ+a7vgvgmNSPHth2+Wy7b9SUgV0iSQ0pIErrwHAj8mJ0vokUqy45ar74Cgj61b0zXk2zAig5HgfugNQsZEMexHXX5AD59TpmiW6MXZ6GOCYWTyPLCcGRAtECIFfj+/a5QzIqlsVr5uu8y3WUjT1VZ0zSVe7VXb17O0XVvum7F5Lg2Qyy6BR6tRhhiH9VawEXf1XH7DX1xGISGi07wwRGrrVVZRi62eyMAS7HWbLzVI5IiXLmmybZx0Me9gU199OR+fI2NUlU7d9/Xm6/oPrPcyZeiXXtGgxXXyoSsaoYKEI/3eCc2T2iWERNyiHkgaiVx4ZZqjqGVOTguxD7reD9Ds8HyKdRAFVzocNEZJMewbcPQ1KAWscfjGbrf0goERy9Lz3fhRmTbyW07nyDueQA9IamxfEX3k1RNvSLxFZ8VPLWPkMq5EGp8CymwoBZ+kkFChsSdrlEAJbEnCDLFtf4RkqlQqiiEel3JaQJWCWQzyB2wVYKpQN19Q+d3b9aEJdAcXV7NLV3Hr8oga14sgrJUNQ5lgQInVKEKq3jHbb4dw7mbZcMQLUF2PbfjGzS1ypgQAs04egut09Qsy3NNCBGv2uXLerlqH9Cx6RQKYhVlXzZeX6fR1CVl4MWrXdtC0x3atwgJw0wP6VAaKyNvjrFB+J7YHNr3NAgQVlhljXCOUMknCgYBmONI0YRYNMEsnD83aQRNCfEHUM7u5jR4kjAtepg7PdxG0N8AaRB9dwvq05ivhvk0cOBb2qSpPKUy93Y3oHy3MBbTwmChudhGUQpixC+nhXFaPYs3a/76lg1Zto1ssbydVs9/l9gANuScd+uzBzBzYv5Zh0+3j9c//l6HPwELc6LO8GufbwAAAABJRU5ErkJggg==")\n a.name {{project.name}}\n .prev.linkable(data-cid="prev" data-desc="'+I18N_STRINGS.link_back_desc+'")\n span\n :'+I18N_STRINGS.link_back+'\n i.fa.fa-dot-circle-o\n #screen_linkprev\n #tooltip\n p.desc\n .container.jscroll\n - components\n .item(data-id="{{id}}" data-desc="{{desc}}")\n div(class="t{{id}} component")\n i.fa.fa-{{tb_icon}}\n span {{tb_text}}\n .clearfix\n .footer\n a(href="#feedback_modal" data-toggle=\'modal\')\n :'+I18N_STRINGS.support+"\n :/\n a(href='#help_modal' data-toggle='modal')\n :"+I18N_STRINGS.shortcuts+"\n#network-error\n :"+I18N_STRINGS.network_error+"\n#actions\n a.circle.large.save.saved\n i.fa.fa-spin.fa-spinner\n i.fa.fa-save\n span\n :"+I18N_STRINGS.save+"\n a.circle.large.download\n i.fa.fa-download\n span\n :"+I18N_STRINGS.download+"\n a.circle.large.rotate\n i.fa.fa-rotate-right\n span\n :"+I18N_STRINGS.rotate+'\n a.circle.large.link_line\n i.fa.fa-link\n span\n a.circle.large.launch(href="#apps/{{project.cid}}/preview")\n i.fa.fa-rocket\n span\n :'+I18N_STRINGS.launch+"\n a.circle.large#new_screen\n i.fa.fa-plus\n span\n :"+I18N_STRINGS.new_screen+"\n .last_saved\n :"+I18N_STRINGS.last_saved+':\n abbr.timeago(title="{{project.updated_at}}")\n\n#screens.screens(data-selectable=\'true\')\n - screens\n = screen\n#selection\n #toolbar.active\n a.tool.del\n i.fa.fa-trash\n a.tool.palette(data-name="palette")\n a.tool.text(data-name="text")\n i.fa.fa-font\n a.tool.asset(data-name="asset")\n i.fa.fa-picture-o\n a.tool.ruler(data-name="ruler")\n .clearfix\n .w.handler\n .e.handler\n .n.handler\n .s.handler\n .nw.handler\n .ne.handler\n .sw.handler\n .se.handler\n#screen_links\n .placeholder\n :'+I18N_STRINGS.drag_to_create_screen+"\n .links.jscroll\n= toolboxes\n#links\n .links\n .link.design\n .helper\n span\n :"+I18N_STRINGS.drag_to_link_screen+"\n .line\n .handler\n i.fa.fa-link")}.call(this),function(){Jot("install",".box\n .card\n .title \n :"+I18N_STRINGS.install+" {{name}}\n .meta\n p\n :"+I18N_STRINGS.preview_on_device+"\n p\n :1.\n - wechat?\n :"+I18N_STRINGS.tap+"\n i.fa.fa-ellipsis-h\n : "+I18N_STRINGS.open_in_safari+"\n - !wechat?\n :"+I18N_STRINGS.tap+'\n img(width="19" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAA1BAMAAADfUYSoAAAAFVBMVEUAAAAGfv8Eff8Xh/8Ae/cAgfcDev8kxpS2AAAABnRSTlMAgGPrExbGXyRsAAAAYUlEQVQ4y+3MsQ2AMBADQMMEofk6VSZgEyZ4Cu8/Ai+QXgpOmTJuYp2cR+aAZGMRM7rOKENzmss1/i/aDaJ5P6thO0s/C0OLJ3PV1/YTfZhtuvFLlOxjk7/LphmWTTPJ0B64+0mEocrEDQAAAABJRU5ErkJggg==")\n :, '+I18N_STRINGS.add_to_home_screen+'\n p\n :2.\n a.view_inapp(href="#")\n - wechat?\n :'+I18N_STRINGS.view_in_wechat+"\n - !wechat?\n :"+I18N_STRINGS.view_in_browser+"\n :"+I18N_STRINGS.has_difference)}.call(this),function(){Jot("list",'a#new-app.circle.large(href="#new-app")\n i.fa.fa-plus\n span\n :'+I18N_STRINGS.new_app+'\n#app-list\n #apps\n ul.tabs\n li.access.active(data-access="all")\n :'+I18N_STRINGS.all_apps+'\n li.access(data-access="public")\n :'+I18N_STRINGS.public_apps+'\n li.access(data-access="private")\n :'+I18N_STRINGS.private_apps+"\n li.archived\n :"+I18N_STRINGS.archived+"\n - user\n - days_left?\n li.days_left\n :"+I18N_STRINGS["account.status"]+':\n :{{days_left}}\n - projects\n a#app{{cid}}(href="#apps/{{cid}}" data-cid="{{cid}}" data-access="{{access}}" class="{{version}} app {{access}}")\n .card\n .icons\n span.circle.edit\n i.fa.fa-cog\n span.circle.dup\n i.fa.fa-copy\n span.circle.archive\n i.fa.fa-archive\n span.circle.del\n i.fa.fa-trash-o\n .title\n span.lock\n i.fa.fa-lock\n span.name\n :{{name}}\n span.os\n i.fa.fa-{{os_icon}}\n .icon\n img(src="{{icon}}")\n .meta\n p\n :'+I18N_STRINGS.app_device+":\n :{{device_name}}\n p\n :"+I18N_STRINGS.last_updated+':\n abbr.timeago(title="{{updated_at}}") {{updated_at}}\n .clearfix\n .clearfix')}.call(this),function(){Jot("no_app",".box\n .card\n .title \n :"+I18N_STRINGS.no_app+"\n .meta\n p\n :"+I18N_STRINGS.login_from_desktop)}.call(this),function(){Jot("order",".order\n .span2 {{date}}\n .span2\n a(href=\"{{receipt}}\" target='_blank') Download Receipt\n .span1 USD ${{total}}")}.call(this),function(){Jot("screen","#screen{{cid}}.screen.{{orient}}.{{device}}.x{{scale}}(data-selectable='true')\n #canvas{{cid}}.canvas(data-selectable='true')\n .vertical_line.left\n .vertical_line.right\n .vertical_line.center\n .horizon_line.top\n .horizon_line.bottom\n .horizon_line.center\n .placeholder\n :"+I18N_STRINGS.drag_to_start+"\n .actions\n a.circle.enlarge\n i.fa.fa-angle-double-down\n a.circle.reduct\n i.fa.fa-angle-double-up\n .splash\n img(src=\"{{retina_splash}}\")\n .slider\n a.tip(href='#slider_modal' data-toggle='modal')\n i.fa.fa-question-circle\n .hh\n .triangle\n .fh\n .triangle"),Jot("screen_preview",'#pscreen{{cid}}.pcanvas.{{orient}}(data-cid="{{cid}}" data-orientation="{{orient}}")\n .widgets.jscroll\n .scontainer\n .header\n .footer\n .stickies')}.call(this),function(){Jot("screen_link",'#screen_link{{cid}}.link.sortable.linkable(data-cid="{{cid}}" draggable="true" data-parent="p{{parent_cid}}")\n .actions\n a.dup.action\n i.fa.fa-copy\n a.del.action\n i.fa.fa-trash-o\n .ve\n .hr\n .name\n a.icon\n i.fa.fa-file-o\n a.action.expand\n i.fa.fa-plus-square-o\n i.fa.fa-minus-square-o\n span\n :{{name}}\n input(name=\'title\' value="{{name}}")\n#children{{cid}}.children(data-cid="{{cid}}")\n - children\n = screen_link\n .new_child.sortable\n .ve\n .hr\n .name\n i.fa.fa-plus-circle\n :'+I18N_STRINGS.new_screen)}.call(this),function(){Jot("simulator","#simulator-container\n #sharing.mhide\n h4\n :"+I18N_STRINGS.view_on_device+"\n #qrcode\n h4.url\n :"+I18N_STRINGS.sharing_url+'\n input#sharing_url.form-control(value="'+(window.location.protocol+"//"+window.location.host)+'/app/{{access_token}}")\n - hasPassword?\n h4#sharing_password\n :'+I18N_STRINGS.password+': {{password}}\n #simulator.{{orientation}}.{{device}}.x{{scale}}\n .splash\n img(src="{{retina_splash}}")\n .loading\n svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="#333")\n circle(cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(45 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(90 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.2s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(135 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.3s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(180 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.4s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(225 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(270 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.6s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(315 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.7s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n circle(transform="rotate(180 16 16)" cx="16" cy="3" r="0")\n animate(attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.4s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline")\n #stickies\n #app.screens\n #gs\n #gh.fixed\n #gf.fixed\n #gestures\n .sleft.gesture\n img(src="images/gestures/left.png")\n .sright.gesture\n img(src="images/gestures/right.png")\n .sup.gesture\n img(src="images/gestures/up.png")\n .sdown.gesture\n img(src="images/gestures/down.png")\n .shold.gesture\n img(src="images/gestures/hold.png")\n #home\n a#back_prev\n i.fa.fa-chevron-left\n a#reset_app\n i.fa.fa-circle-o\n #actions.mhide\n a#back_to_design.circle.large(href="#apps/{{cid}}")\n i.fa.fa-times\n span\n :'+I18N_STRINGS.back)}.call(this),function(){Jot("toolboxes",'#ruler.toolbox(data-name="ruler" data-top="rt" data-left="rl")\n .header\n b\n :'+I18N_STRINGS["toolbox.ruler"]+"\n .close\n i.fa.fa-close\n .body\n .group\n .half.attr.left(data-attr='left')\n .input-group\n = number_input\n label.center X\n .half.attr.top(data-attr='top')\n .input-group\n = number_input\n label.center Y\n .half.attr.width(data-attr='width')\n .input-group\n = number_input\n label.center "+I18N_STRINGS["inspector.width"]+"\n .half.attr.height(data-attr='height')\n .input-group\n = number_input\n label.center "+I18N_STRINGS["inspector.height"]+"\n .clearfix\n\n .group\n .col.inline.attr.z(data-attr='z' data-max='99' data-min='1')\n label\n :"+I18N_STRINGS["inspector.z"]+"\n a(href='#z_index' data-toggle='modal')\n i.fa.fa-question-circle\n .input-group\n = number_input\n .clearfix\n .col.attr.inline.br(data-attr='br')\n label "+I18N_STRINGS["inspector.radius"]+"\n .input-group\n = number_input\n .clearfix\n .col\n a.btn.btn-default.circularize\n :"+I18N_STRINGS["inspector.circularize"]+'\n\n#asset.toolbox(data-name="asset" data-top="at" data-left="al")\n .header\n b\n :'+I18N_STRINGS["toolbox.assets"]+'\n .close\n i.fa.fa-close\n .body\n .group.icon\n .col.inline.attr.is(data-attr="is")\n label '+I18N_STRINGS["inspector.icon_size"]+"\n .input-group\n = number_input\n .clearfix\n .col\n input#icon_search(type='text' placeholder='"+I18N_STRINGS["inspector.search"]+'\')\n ul.filter\n li.all.active(data-type="all")\n :'+I18N_STRINGS["icons.all"]+'\n li(data-type="basics")\n :'+I18N_STRINGS["icons.basic"]+'\n li(data-type="brand")\n :'+I18N_STRINGS["icons.brand"]+'\n li(data-type="text")\n :'+I18N_STRINGS["icons.text"]+'\n li(data-type="directional")\n :'+I18N_STRINGS["icons.direct"]+'\n li(data-type="form")\n :'+I18N_STRINGS["icons.form"]+'\n li(data-type="video")\n :'+I18N_STRINGS["icons.video"]+"\n .clearfix\n .icons.jscroll\n - icons\n a.si.circle(data-icon='{{icon}}' title='{{title}}')\n i.fa.fa-{{icon}}\n .clearfix\n .group.image\n .col\n input#asset_search(type='text' placeholder='"+I18N_STRINGS["inspector.asset_search"]+'\')\n select#asset_filter\n option(value="")\n :'+I18N_STRINGS.filter_by_project+'\n - filters\n option(value="{{cid}}")\n :{{name}}\n .col.attr.p(data-attr=\'p\')\n label.checkbox\n input.bool-input(type="checkbox")\n :'+I18N_STRINGS["inspector.p"]+"\n .clearfix\n .assets.jscroll\n .col.attr.image(data-attr='image')\n input(type=\"file\")\n #upload\n i.fa.fa-cloud-upload.fa-2x\n br\n :"+I18N_STRINGS["inspector.drop_image"]+"\n br\n :"+I18N_STRINGS["inspector.click_to_upload"]+'\n - assets\n - !deleted?\n = asset\n .clearfix\n\n#palette.toolbox(data-name="palette" data-top="pt" data-left="pl")\n .header\n b\n :'+I18N_STRINGS["toolbox.palette"]+'\n .close\n i.fa.fa-close\n .body\n .group.themes\n .light.theme(data-theme="light")\n .indigo.theme(data-theme="indigo")\n .blue.theme(data-theme="blue")\n .lblue.theme(data-theme="lblue")\n .cyan.theme(data-theme="cyan")\n .teal.theme(data-theme="teal")\n .green.theme(data-theme="green")\n .lgreen.theme(data-theme="lgreen")\n .lorange.theme(data-theme="lorange")\n .orange.theme(data-theme="orange")\n .red.theme(data-theme="red")\n .pink.theme(data-theme="pink")\n .purple.theme(data-theme="purple")\n .dpurple.theme(data-theme="dpurple")\n .grey.theme(data-theme="grey")\n .dark.theme(data-theme="dark")\n .clearfix\n .group.colorsets\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .colorset C\n .clearfix\n .group\n .col.inline.attr.bg(data-attr=\'bg\')\n label '+I18N_STRINGS["inspector.bg"]+"\n .input-group.color\n input.text-input(type='text')\n span.input-group-addon\n .clearfix\n .col.inline.attr.tc(data-attr='tc')\n label "+I18N_STRINGS["inspector.tc"]+"\n .input-group.color\n input.text-input(type='text')\n span.input-group-addon\n .clearfix\n .col.attr.inline.bs(data-attr='bs')\n label "+I18N_STRINGS["inspector.bs"]+"\n .input-group\n = number_input\n .clearfix\n .col.inline.attr.bc(data-attr='bc')\n label "+I18N_STRINGS["inspector.bc"]+"\n .input-group.color\n input.text-input(type='text')\n span.input-group-addon\n .clearfix\n .col.attr.inline.ds(data-attr='ds' data-min='0')\n label "+I18N_STRINGS["inspector.ds"]+"\n .input-group\n = number_input\n .clearfix\n .col.attr.inline.sc(data-attr='sc')\n label "+I18N_STRINGS["inspector.sc"]+"\n .input-group.color\n input.text-input(type='text')\n span.input-group-addon\n .clearfix\n .col.attr.inline.o(data-attr='o' data-max='100' data-min='0')\n label "+I18N_STRINGS["inspector.o"]+"\n .input-group\n = number_input\n .clearfix\n .col\n a.btn.btn-default.new-colorset\n :"+I18N_STRINGS["inspector.new_colorset"]+'\n\n#colorpicker.toolbox(data-name="colorpicker" data-top="ct" data-left="cl")\n .header\n b\n :'+I18N_STRINGS["toolbox.colorpicker"]+'\n .close\n i.fa.fa-close\n .body\n\n#text.toolbox(data-name="text" data-top="tt" data-left="tl")\n .header\n b\n :'+I18N_STRINGS["toolbox.text"]+'\n .close\n i.fa.fa-close\n .body\n .group\n .col.attr.td\n .btn-group.style\n button.btn.btn-default.bo(type="button" data-val="1" data-attr="bo")\n :B\n button.btn.btn-default.i(type="button" data-val="1" data-attr="i")\n :I\n button.btn.btn-default.overline(type="button" data-val="overline" data-attr="td")\n :U\n button.btn.btn-default.line-through(type="button" data-val="line-through" data-attr="td")\n :U\n button.btn.btn-default.underline(type="button" data-val="underline" data-attr="td")\n :U\n .clearfix\n .col.attr.text(data-attr=\'text\')\n textarea.text-input\n .col.inline.attr.fs(data-attr=\'fs\')\n label '+I18N_STRINGS["inspector.font_size"]+"\n .input-group\n = number_input\n .clearfix\n .col.inline.attr.lh(data-attr='lh')\n label "+I18N_STRINGS["inspector.line_height"]+"\n .input-group\n = number_input\n .clearfix\n\n .col.attr.inline.tsc(data-attr='tsc')\n label "+I18N_STRINGS["inspector.tsc"]+"\n .input-group.color\n input.text-input(type='text')\n span.input-group-addon\n .clearfix\n .col.attr.inline.ts(data-attr='ts' data-min='0')\n label "+I18N_STRINGS["inspector.ts"]+'\n .input-group\n = number_input\n .clearfix\n\n .col.attr.ha(data-attr=\'ha\')\n .btn-group\n button.btn.btn-default(type="button" data-val="left")\n i.fa.fa-align-left\n button.btn.btn-default(type="button" data-val="center")\n i.fa.fa-align-center\n button.btn.btn-default(type="button" data-val="right")\n i.fa.fa-align-right\n .clearfix\n .col.attr.va(data-attr=\'va\')\n .btn-group.vertical\n button.btn.btn-default(type="button" data-val="top")\n i.fa.fa-align-left\n button.btn.btn-default(type="button" data-val="middle")\n i.fa.fa-align-center\n button.btn.btn-default(type="button" data-val="bottom")\n i.fa.fa-align-right\n .clearfix'),Jot("number_input","span.input-group-addon.minus\n i.fa.fa-minus\ninput.text-input(type='text')\nspan.input-group-addon.plus\n i.fa.fa-plus"),Jot("asset",'#asset{{cid}}.asset(data-cid="{{cid}}")\n .col\n .thumb\n img(src="{{thumb}}")\n .col\n .pull-right\n a.remove(href="#")\n i.fa.fa-times-circle\n .input-group\n input(type="text" value="{{name}}")')}.call(this),function(){Jot("widget_link",'#widget_link{{cid}}{{postfix}}.link(data-cid="{{cid}}")\n .region\n img\n .line\n .cut\n i.fa.fa-cut\n .handler\n .gesture.tap\n .settings\n .triangle\n .gestures\n .gesture.tap(data-g="tap")\n .gesture.hold(data-g="hold")\n .gesture.left(data-g="left")\n .gesture.right(data-g="right")\n .gesture.up(data-g="up")\n .gesture.down(data-g="down")\n .transitions\n .demo.{{transition}}\n .area\n .page1\n :'+I18N_STRINGS.hover_here+"\n .page2\n :"+I18N_STRINGS.target+'\n .desc\n :DESC\n - transitions\n .transition.{{id}}(data-transition="{{id}}")\n :{{name}}\n .btriangle')}.call(this),function(){Jot.text_field=Jot.navigation_bar=Jot.button=function(t){return'\n '+t.text+"\n
"},Jot.lr=Jot.tab_bar=Jot.rounded_rect=Jot.ve=Jot.hr=Jot.rectangle=function(t){return'\n \n
'},Jot.image_view=function(t){return''},Jot.video_view=function(t){return'\n \n
'},Jot.keyboard=function(t){return'"
},Jot.map_view=function(t){return''},Jot.search_bar=function(t){return'"},Jot.segmented_control=function(t){return'"},Jot.status_bar=function(t){return''},Jot["switch"]=function(t){return''},Jot.tab_item=function(t){return'"},Jot.icon_button=Jot.pg=function(t){return'\n \n
'},Jot.sticky=Jot.label=Jot.text_view=function(t){return''},Jot.widget=function(t,e){return null==e&&(e=""),t.postfix=e,Jot[t.name](t)}}.call(this),function(){this.View=function(){function t(){}return t.prototype.trigger=function(t,e){return $("body").trigger(t,e)},t.prototype.canvasLeft=function(){var t,e;return t=$(".screen.active").position().left,e=parseInt($(".screen.active").css("margin-left")),Math.round(t+e+21)},t.prototype.canvasTop=function(){return Math.round($(".screen.active").position().top+21)},t.prototype.canvasWidth=function(){return $(".screen.active .canvas").width()},t.prototype.canvasHeight=function(){return $(".screen.active .canvas").height()},t.prototype.canvas=function(){return $(".screen.active .canvas")},t.prototype.setupSplash=function(t,e){var n;if("ipad"!==t.cp().device)return"landscape"===t.orientation?(n=Math.abs((t.dH()-t.dW())/2),$(e).css("top",0-n+"px"),$(e).css("left",n+"px"),$(e).width(t.dH()),$(e).height(t.dW())):($(e).css("top","0px"),$(e).css("left","0px"),$(e).width(t.dW()),$(e).height(t.dH()))},t}()}.call(this),function(){this.WidgetManager=function(){function t(){}return t.select=function(t){var e,n;if(!$("body").data("mouseup")&&!$.viewOnly())return t.preventDefault(),t.stopPropagation(),e=$(t.target).closest(".widget").attr("data-cid"),n=Widget.find(e),t.shiftKey||t.ctrlKey||t.metaKey?$("body").trigger("selection:append",[n]):($("body").trigger("selection:clear"),$("body").trigger("selection:select",[[n]]))},t.design=function(t,e){return this.renderOutline(t,e),this.renderText(t,e),this.renderAttrs(t,e),this.renderImage(t,e),this.renderTheme(t,e)},t.renderTheme=function(t,e){var n,i;return $("#widget"+t.cid+e).removeClass($("#widget"+t.cid+e).data("theme")),$("#widget"+t.cid+e).addClass(t.th),$("#widget"+t.cid+e).data("theme",t.th),this.setBg(t,e),this.setTc(t,e),this.setBc(t,e),n=INSPECTABLES[t.name],i=document.getElementById("widget"+t.cid+e),-1!==n.indexOf("br")&&(i.style.boxShadow="0 0 "+t.ds+"px "+t.sc),i.style.textShadow=0===t.ts?"":"0 0 "+t.ts+"px "+t.tsc,-1!==n.indexOf("o")?i.style.opacity=t.o/100:void 0},t.remove=function(t){var e;return $("#widget"+t).remove(),Widget.exists(t)&&(e=Widget.find(t),e.ldestroy()),$("#design").trigger("slider:update")},t.renderText=function(t,e){var n,i,r;return t.multiline&&t.text?(r=t.text.replace(/^[\s\n]+/m,"").replace(/[\s\n]+$/m,"").split(/\n/),n=function(){var t,e,n;for(n=[],t=0,e=r.length;e>t;t++)i=r[t],n.push(""+i+"
");return n}().join(""),$("#widget"+t.cid+e+" .text").html(n)):$("#widget"+t.cid+" span.text").text(t.text)},t.renderOutline=function(t,e){var n;return n=document.getElementById("widget"+t.cid+e),t.zoomable&&(n.style.width=t.w()+"px",n.style.height=t.h()+"px"),"number"==typeof t.left&&(n.style.left=t.l()+"px"),"number"==typeof t.top?n.style.top=t.t()+"px":void 0},t.renderAttrs=function(t,e){var n,i;return(n=INSPECTABLES[t.name])?(i=document.getElementById("widget"+t.cid+e),-1!==n.indexOf("fs")&&(i.style.fontSize=t.fS()+"px"),-1!==n.indexOf("is")&&$("#widget"+t.cid+e+" i").css("font-size",t.iS()+"px"),-1!==n.indexOf("br")&&(i.style.borderRadius=t.bR()+"px",$("#widget"+t.cid+e+" img").css("border-radius",t.bR()+"px")),-1!==n.indexOf("bs")&&(i.style.borderWidth=t.bs+"px"),-1!==n.indexOf("ha")&&(i.style.textAlign=t.ha),-1!==n.indexOf("lh")&&(i.style.lineHeight=t.lh+"px"),-1!==n.indexOf("z")&&(i.style.zIndex=t.z),i.style.fontWeight=t.bo?"bold":"normal",i.style.fontStyle=t.i?"italic":"normal",-1!==n.indexOf("va")&&(i.className="widget "+t.name+" v"+t.va),"normal"!==t.td&&(i.className+=" td"+t.td),-1!==n.indexOf("p")?t.p?$("#widget"+t.cid+e+" img").attr("height","auto"):$("#widget"+t.cid+e+" img").attr("height","100%"):void 0):void 0},t.renderImage=function(t,e){var n,i;if("image_view"===t.name){if(i=INSPECTABLES[t.name],-1===i.indexOf("image")||Spine.isBlank(t.image))return $("#widget"+t.cid+e+" img").attr("src","").hide(),$("#widget"+t.cid+e+" span").show();if(Asset.exists(t.image)&&(n=Asset.find(t.image),$("#widget"+t.cid+e+" img").data("image")!==n.cid))return $("#widget"+t.cid+e+" i").removeClass("fa-picture-o"),$("#widget"+t.cid+e+" i").addClass("fa-spin fa-spinner"),$("#widget"+t.cid+e+" img").load(function(){return $("#widget"+t.cid+e+" span").hide()}),$("#widget"+t.cid+e+" img").attr("src",n.raw||n.image).show(),$("#widget"+t.cid+e+" img").data("image",n.cid)}},t.bgView=function(t,e){return"image_view"===t.name||"hr"===t.name||"ve"===t.name?$("#widget"+t.cid+e+" span"):$("#widget"+t.cid+e)},t.bcView=function(t,e){return $("#widget"+t.cid+e)},t.tcView=function(t,e){return $("#widget"+t.cid+e)},t.bg=function(t){return this.rgb2hex(this.bgView(t,"").css("background-color"))},t.bc=function(t){var e;return e=this.bcView(t,"").css("border-left-color")||this.bcView(t).css("border-top-color")||this.bcView(t).css("border-right-color")||this.bcView(t).css("border-bottom-color"),this.rgb2hex(e)},t.tc=function(t){return this.rgb2hex(this.tcView(t,"").css("color"))},t.setTc=function(t,e){return"status_bar"===t.name?($("#widget"+t.cid+e).css("color",t.tc),$("#widget"+t.cid+e+" .signal .ball").css("background-color",t.tc),$("#widget"+t.cid+e+" .battery .body").css("border-color",t.tc),$("#widget"+t.cid+e+" .battery .body .inner").css("background-color",t.tc),$("#widget"+t.cid+e+" .battery .head").css("background-color",t.tc)):this.tcView(t,e).css("color",t.tc)},t.setBg=function(t,e){return this.bgView(t,e).css("background-color",t.bg)},t.setBc=function(t,e){return this.bcView(t,e).css("border-color",t.bc)},t.hex=function(t){return("0"+parseInt(t).toString(16)).slice(-2)},t.rgb2hex=function(t){return t&&"rgba(0, 0, 0, 0)"!==t&&"transparent"!==t?(t=t.match(/^rgb[a]*\((\d+),\s*(\d+),\s*(\d+)/),"#"+this.hex(t[1])+this.hex(t[2])+this.hex(t[3])):"transparent"},t.newImageView=function(t,e,n,i,r){var o,s,a,c;return c=t.width,s=t.height,c>r.width&&(s=Math.round(s*(r.width/c)),c=r.width),o=new Asset({cid:"i"+Math.uuid(14,16),raw:t.src,name:e}),o.lsave(),o.thumb=o.raw,$("#asset .assets").prepend(Jot.asset(o)),e="image_view",a=new Widget({name:e,width:c,height:s,bs:COMPONENTS[e].bs,br:COMPONENTS[e].br,image:o.cid,screen_cid:r.cid,cid:"w"+Math.uuid(10,16)}),a.setL(n),a.setT(i),$("#screen"+r.cid+" .canvas").append(Jot.widget(a)),$("#widget"+a.cid).trigger("mb.widget.design",[a]),a.lsave(),a},t}()}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.LinkManager=function(t){function n(){$("#design").on("click","#links .handler, #links .region",function(t){return function(e){return t.selectByHandler(e)}}(this)),$("#design").on("click","#links .cut",function(t){return function(e){return t.removeCurrent(e)}}(this)),$("#design").on("click","#links .transition",function(t){return function(e){return t.updateTransition(e)}}(this)),$("#design").on("click","#links .settings .gesture",function(t){return function(e){return t.updateGesture(e)}}(this)),$("body").on("mb.widget_link.remove",function(t){return function(e,n){return t.remove(n)}}(this)),$("body").on("mb.widget_link.select",function(t){return function(e,n){return t.select(e,n)}}(this)),$("body").on("mb.widget_link.update",function(t){return function(e){return t.update(e)}}(this)),$("body").on("mb.widget_link.render",function(t){return function(e,n){return t.render(n)}}(this)),$("body").on("mb.widget_link.insert",function(t){return function(e,n){return t.insertLink(n)}}(this)),$("body").on("mb.widget_link.clear",function(t){return function(e){return t.clear(e)}}(this))}var i,r;return e(n,t),n.prototype.selectByHandler=function(t){var e;if(!$.viewOnly())return $(t.target).closest(".link").hasClass("selected")||$(t.target).closest(".link").hasClass("design")?($(".link.selected .settings").toggle(),!1):(this.clear(),e=Link.find($(t.target).closest(".link").data("cid")),$("body").trigger("selection:select",[e.cwidgets()]),$(".link.selected .settings").toggle())},n.prototype.updateGesture=function(t){var e,n,i;return t.preventDefault(),t.stopPropagation(),i=$(t.target).closest(".link"),e=Link.find(i.data("cid")),i.find(".gesture."+e.gesture).removeClass("current"),$(t.target).closest(".gesture").addClass("current"),e.gesture=$(t.target).closest(".gesture").data("g"),e.lsave(),$("#widget_link"+e.cid+" .handler .gesture").removeClass("tap left right up down hold"),$("#widget_link"+e.cid+" .handler .gesture").addClass(e.gesture),n=e.cwidgets()[0],"pg"===n.name?($("#widget"+n.cid+" i").removeClass("fa-"+n.icon),n.icon=e.gesture,n.lsave(),$("#widget"+n.cid+" i").addClass("fa-"+n.icon)):void 0},n.prototype.updateTransition=function(t){var e,n;return t.preventDefault(),t.stopPropagation(),n=$(t.target).closest(".link"),e=Link.find(n.data("cid")),n.find(".transition."+e.transition).removeClass("current"),n.find(".demo").removeClass(e.transition),$(t.target).closest(".transition").addClass("current"),e.transition=$(t.target).closest(".transition").data("transition"),e.lsave(),n.find(".demo").addClass(e.transition),n.find(".desc").text(I18N_STRINGS["tr.d."+e.transition])},n.prototype.removeCurrent=function(t){var e,n;return t.preventDefault(),t.stopPropagation(),$("#links .link.selected").length?(e=$("#links .link.selected").data("cid"),Link.exists(e)&&(n=Link.find(e)),n?(this.trigger("undoStack:add",[[n.dup()],null]),this.remove(e)):void 0):void 0},n.prototype.remove=function(t){var e,n,i;return Link.exists(t)&&(e=Link.find(t)),e&&(i=e.cwidgets(),n=$("#widget_link"+t).hasClass("selected"),$("#widget_link"+t).remove(),e.ldestroy(),n)?$("body").trigger("selection:select",[i]):void 0},n.prototype.render=function(t){var e,n,i,r,o;if(t){for(n=Screen.find(t),$("#links .links").html(""),o=n.clinks(),i=0,r=o.length;r>i;i++)e=o[i],this.insertLink(e);return this.initDraggable("#links .link.design")}},n.preview=function(t,e){var n,i,r,o,s,a,c,l,u,d,p,h,f;if(!e.length)return $("body").trigger("mb.widget_link.remove",[t.cid]),void 0;if("pg"!==e[0].name)return u=Math.min.apply(Math,function(){var t,n,i;for(i=[],t=0,n=e.length;n>t;t++)a=e[t],i.push(a.l());return i}()),p=Math.min.apply(Math,function(){var t,n,i;for(i=[],t=0,n=e.length;n>t;t++)a=e[t],i.push(a.t());return i}()),d=Math.max.apply(Math,function(){var t,n,i;for(i=[],t=0,n=e.length;n>t;t++)a=e[t],i.push(a.l()+a.w());return i}()),c=Math.max.apply(Math,function(){var t,n,i;for(i=[],t=0,n=e.length;n>t;t++)a=e[t],i.push(a.t()+a.h());return i}()),h=d-u,l=c-p,n=d,s=p+l/2+1,o="#widget_link"+t.cid+"p",$(""+o).css("left",n+"px"),$(""+o).css("top",s+"px"),$(""+o).width(0),f=Math.max.apply(Math,function(){var t,n,i;for(i=[],t=0,n=e.length;n>t;t++)a=e[t],i.push(a.z);return i}()),$(""+o).css("z-index",f),i=0-h,r=0-l/2,44>h&&(i-=(44-h)/2,h=44),44>l&&(r-=(44-l)/2,l=44),$(""+o+" .region").css("left",i+"px"),$(""+o+" .region").css("top",r+"px"),$(""+o+" .region").width(h),$(""+o+" .region").height(l),$(""+o+" .region").addClass("clickable"),$(""+o+" .region").attr("data-cid",t.cid),"tap"!==t.gesture&&h>=92?$(""+o+" .region img").attr("src","images/gestures/"+t.gesture+".png"):void 0},n.prototype.insertLink=function(t){return"prev"!==t.target_cid||$(".prev").is(":visible")?($("#links .links").append(Jot.widget_link(t)),this.renderLink(t),this.initDraggable("#widget_link"+t.cid)):void 0},n.prototype.select=function(t,e){var n,i,r,o;return o=function(){var t,i,r;for(r=[],t=0,i=e.length;i>t;t++)n=e[t],r.push(n.cid);return r}().join(","),i=Link.findByAttribute("widget_cids",o),i?(r="#widget_link"+i.cid,this.renderLink(i),$("#widget_link"+i.cid).addClass("selected")):($(".link.design").data("widget_cids",o),this.renderDesign(),$("#links .link.design").show(),0===Link.count()?$("#links .link.design .helper").show():$("#links .link.design .helper").hide())},n.prototype.update_widgets=function(t){var e,n,i,r,o,s,a,c,l,u,d,p,h;for(n=function(){var e,n,i;for(i=[],e=0,n=t.length;n>e;e++)s=t[e],i.push(s.cid);return i}(),o=Screen.find($("#screen_links .active").data("cid")),p=o.clinks(),h=[],c=0,u=p.length;u>c;c++)if(r=p[c],r.widget_cids){for(a=r.widget_cids.split(","),l=0,d=n.length;d>l;l++)e=n[l],i=a.indexOf(e),-1!==i&&a.splice(i,1);a.length?a.join(",")!==r.widget_cids?(r.widget_cids=a.join(","),r.lsave(),h.push(this.renderLink(r))):h.push(void 0):($("#widget_link"+r.cid).remove(),h.push(r.ldestroy()))}else h.push(r.ldestroy());return h},n.prototype.update=function(){var t,e,n,i,r,o;if(t=$("#screen_links .active").data("cid")){for(n=Screen.find(t),o=n.clinks(),i=0,r=o.length;r>i;i++)e=o[i],this.renderLink(e);if("none"!==$(".link.design").css("display"))return this.renderDesign()}},n.prototype.renderLink=function(t){var e,n,i,o,s,a,c,l,u,d,p,h,f;if((!t||"prev"!==t.target_cid||$(".prev").is(":visible"))&&(i="#widget_link"+t.cid,f=t.cwidgets(),$(""+i).length))return u=Math.min.apply(Math,function(){var t,e,n;for(n=[],t=0,e=f.length;e>t;t++)s=f[t],n.push(s.l());return n}()),p=Math.min.apply(Math,function(){var t,e,n;for(n=[],t=0,e=f.length;e>t;t++)s=f[t],n.push(s.t());return n}()),d=Math.max.apply(Math,function(){var t,e,n;for(n=[],t=0,e=f.length;e>t;t++)s=f[t],n.push(s.l()+s.w());return n}()),a=Math.max.apply(Math,function(){var t,e,n;for(n=[],t=0,e=f.length;e>t;t++)s=f[t],n.push(s.t()+s.h());return n}()),h=d-u,l=a-p,c=function(){var t,e,n;for(n=[],t=0,e=f.length;e>t;t++)s=f[t],n.push(s.cid);return n}().join(","),e=this.canvasLeft()+d,o=this.canvasTop()+p+l/2-1,n=0,$(""+i).css("left",e+"px"),$(""+i).css("top",o+"px"),$(""+i).width(n),$(""+i).data("widget_cids",c),f.length>1?($(""+i+" .region").css("left",0-h+"px"),$(""+i+" .region").css("top",0-l/2+"px"),$(""+i+" .region").width(h),$(""+i+" .region").height(l)):$(""+i+" .region").hide(),r.call(this,i,t)},r=function(t,e){var n,i,r,o,s,a,c,l,u,d,p,h,f;return f=$(window).width(),1024>f&&(f=1024),u=$("#screen_link"+e.target_cid),u.is(":visible")||(u=u.closest(".children").prev(".link")),u.length?(a=$(""+t).position().left+$(""+t).outerWidth(),p=$(""+t).position().top-1,o=u.offset().left-a,o+=u.closest(".children").length?17:10,s=u.offset().top+u.outerHeight()/2-p,i=o/2,r=s/2,h=Math.sqrt(Math.pow(o,2)+Math.pow(s,2)),c=i-h/2,l=r-1,n=180*Math.atan2(0-r,0-i)/Math.PI,$(""+t+" .line").transform("rotate("+n+"deg)"),$(""+t+" .line").css("left",c+"px"),$(""+t+" .line").css("top",l+"px"),$(""+t+" .line").width(h),$(""+t+" .handler").css("left",i+"px"),$(""+t+" .handler").css("top",r+"px"),$(""+t+" .handler .gesture").removeClass("tap left up down right hold"),$(""+t+" .handler .gesture").addClass(e.gesture),$(""+t+" .settings").css("left",i-136+"px"),d=u.offset().top+u.outerHeight(),(d+p)/2>$(window).height()/2?($(""+t+" .triangle").hide(),$(""+t+" .btriangle").show(),$(""+t+" .settings").css("top",r-335+"px")):($(""+t+" .triangle").show(),$(""+t+" .btriangle").hide(),$(""+t+" .settings").css("top",r+40+"px")),$(""+t+" .transition").removeClass("current"),$(""+t+" .transition."+e.transition).addClass("current"),$(""+t+" .desc").text(I18N_STRINGS["tr.d."+e.transition]),$(""+t+" .gesture").removeClass("current"),$(""+t+" .gesture."+e.gesture).addClass("current")):($("body").trigger("mb.widget_link.remove",[e.cid]),void 0)},n.prototype.renderDesign=function(){var t,e,n,i,r,o,s,a,c,l,u,d;return(o=$(".link.design").data("widget_cids"))?(d=function(){var e,n,i,r;for(i=o.split(","),r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(Widget.find(t));return r}(),a=Math.min.apply(Math,function(){var t,e,n;for(n=[],t=0,e=d.length;e>t;t++)i=d[t],n.push(i.l());return n}()),l=Math.min.apply(Math,function(){var t,e,n;for(n=[],t=0,e=d.length;e>t;t++)i=d[t],n.push(i.t());return n}()),c=Math.max.apply(Math,function(){var t,e,n;for(n=[],t=0,e=d.length;e>t;t++)i=d[t],n.push(i.l()+i.w());return n}()),r=Math.max.apply(Math,function(){var t,e,n;for(n=[],t=0,e=d.length;e>t;t++)i=d[t],n.push(i.t()+i.h());return n}()),u=c-a,s=r-l,e=this.canvasLeft()+c,n=this.canvasTop()+l+s/2-1,$(".link.design").css("left",e+"px"),$(".link.design").css("top",n+"px"),d.length>1?($(".link.design .region").css("left",0-u+"px"),$(".link.design .region").css("top",0-s/2+"px"),$(".link.design .region").width(u),$(".link.design .region").height(s)):$(".link.design .region").hide(),$(".link.design .line").css("left","0px"),$(".link.design .line").css("top","0px"),$(".link.design .line").transform("rotate(0deg)"),$(".link.design .line").width(46),$(".link.design .handler").css("left","46px"),$(".link.design .handler").css("top","0px")):void 0},n.prototype.clear=function(){return $("#links .links .link").removeClass("selected"),$("#links .link.design").data("widget_cids",null),$("#links .link.design").hide(),$(".line .cut").attr("style",""),$(".settings").attr("style","")},i=function(t,e){var n,i,r,o;return r=$("#screen_links .active").data("cid"),o=function(){var t,i,r,o;for(r=e.split(","),o=[],t=0,i=r.length;i>t;t++)n=r[t],o.push(Widget.find(n));return o}(),this.update_widgets(o),i=new Link({screen_cid:r,target_cid:t,widget_cids:e,transition:"none",gesture:"tap",cid:"l"+Math.uuid(10,16)}),i.lsave(),this.insertLink(i),$("#widget_link"+i.cid).addClass("selected"),$(".link.selected .settings").show(),this.trigger("undoStack:add",[null,[i.dup()]])},n.prototype.initDraggable=function(t){return $(""+t+" .handler").draggable({refreshPositions:!0,start:function(){return function(){return $(""+t).hasClass("selected")||$(""+t).hasClass("design")?($(""+t+" .line").css("left","0px"),$(""+t+" .line").css("top","0px"),$(""+t+" .line .cut").css("display","none"),$(""+t+" .settings").css("display","none"),$(".toolbox").hide()):!1}}(this),drag:function(){return function(e,n){var i,r,o,s,a,c,l,u,d,p,h,f,g,m,v,y;for(s=n.position.left,a=n.position.top,r=s/2,o=a/2,h=Math.sqrt(Math.pow(s,2)+Math.pow(a,2)),l=r-h/2,p=o-1,i=180*Math.atan2(0-o,0-r)/Math.PI,$(""+t+" .line").css("left",l+"px"),$(""+t+" .line").css("top",p+"px"),$(""+t+" .line").width(h),$(""+t+" .line").transform("rotate("+i+"deg)"),f=s+$(""+t).position().left,g=a+$(""+t).position().top,y=$(".linkable"),m=0,v=y.length;v>m;m++)u=y[m],d={top:$(u).offset().top,left:$(u).offset().left,width:$(u).outerWidth(),height:$(u).outerHeight()},$.pointInRect(f,g,d)&&$(u).data("cid")!==$(".screen.active").data("cid")&&($(u).hasClass("linking")||($(".linking").removeClass("linking"),$(u).addClass("linking")),c=!0);return c?void 0:$(".linking").removeClass("linking")}}(this),stop:function(e){return function(){var n,o,s,a,c;return $(".linking").length?(o=$(".linking").data("cid"),c=$(""+t).data("widget_cids"),$(".linking").removeClass("linking"),$(""+t).data("cid")?(s=Link.find($(""+t).data("cid")),n=s.dup(),s.target_cid=o,s.lsave(),e.trigger("undoStack:add",[[n],[s.dup()]]),r.call(e,t,s)):($(""+t).hide(),i.call(e,o,c))):$(""+t).data("cid")?(s=Link.find($(""+t).data("cid")),r.call(e,t,s)):($(""+t+" .line").css("left","0px"),$(""+t+" .line").css("top","0px"),$(""+t+" .line").width(46),$(""+t+" .line").transform("rotate(0deg)"),$(""+t+" .handler").css("left","46px"),$(""+t+" .handler").css("top","0px")),$(""+t+" .line .cut").show(),$(""+t+" .settings").show(),$(".toolbox").css("display",""),o=$(""+t).data("widget_cids"),Widget.exists(o)?a=Widget.find(o):void 0}}(this)})},n}(this.View)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.ScreenManager=function(t){function n(){$("#design").on("render",function(t){return function(e,n){return t.render(e,n)}}(this)),$("#design").on("orient:update",function(t){return function(e){return t.updateOrientation(e)}}(this)),$("#design").on("carrier:update",function(t){return function(e,n){return t.updateCarrier(n)}}(this)),$("#design").on("height:adjust",function(t){return function(){return t.updateHeight(0)}}(this)),$("#design").on("click",".enlarge",function(t){return function(){return t.updateHeight(80)}}(this)),$("#design").on("click",".reduct",function(t){return function(){return t.updateHeight(-80)}}(this)),$("body").sortable&&($("#workspace").on("deactive","#screen_links .link.active",function(t){return function(e){return s.call(t,e)}}(this)),$("#workspace").on("click","#screen_links .link",function(t){return function(e){return i.call(t,e)}}(this)),$("#workspace").on("dblclick","#screen_links .link",function(t){return function(e){return l.call(t,e)}}(this)),$("#workspace").on("click","#screen_links .link .expand",function(t){return function(e){return u.call(t,e)}}(this)),$("#workspace").on("click","#screen_links .link .dup",function(t){return function(e){return c.call(t,e)}}(this)),$("#workspace").on("click","#screen_links .link .del",function(t){return function(e){return a.call(t,e)}}(this)),$("#workspace").on("blur","#screen_links .link input",function(t){return function(e){return o.call(t,e)}}(this)),$("#workspace").on("click","#new_screen",function(t){return function(e){return t.add(e)}}(this)),$("#workspace").on("click","#screen_links .new_child",function(t){return function(e){return t.newChild(e)}}(this)),$("#workspace").on("keyup","#screen_links .link input",function(t){return 13===t.which?$(t.target).blur():void 0}),$("body").sortable("#screen_links .links .sortable"),$("body").on("sortupdate",function(t){return function(e,n){return t.sort(n),$("body").trigger("mb.widget_link.render",[$(".screen.active").data("cid")])}}(this)),$("#design").on("dragover","#screen_links",function(t){return $(t.target).hasClass("sortable-placeholder")?void 0:(t.stopPropagation(),t.preventDefault(),t.originalEvent.dataTransfer.dropEffect="copy")}),$("#design").on("drop","#screen_links",function(t){return function(e){return $(e.target).hasClass("sortable-placeholder")?void 0:(e.stopPropagation(),e.preventDefault(),t.dropToCreate(e))}}(this)))}var i,r,o,s,a,c,l,u;return e(n,t),n.prototype.newChild=function(t){var e,n,i;return t.preventDefault(),t.stopPropagation(),e=$(t.target).closest(".children"),n=e.data("cid"),i=e.find(".link").length,this.newScreen(t,i,n)},n.prototype.add=function(t){return t.preventDefault(),this.newScreen(t,$.project().cscreens().length)},n.prototype.newScreen=function(t,e,n){var i,r;if(!$.viewOnly())return i=Screen.find($(".screen.active").data("cid")),r=new Screen({name:I18N_STRINGS.screen+(" "+(e+1)),project_cid:$.project().cid,parent_cid:n,orientation:i.orientation,cid:"s"+Math.uuid(12,16),position:e}),r.lsave(),n?$(t.target).closest(".new_child").before(Jot.screen_link(r)):$("#screen_links .links .active").closest(".children").length?$("#screen_links .links .active").closest(".children").after(Jot.screen_link(r)):$("#screen_links .links .active").next(".children").after(Jot.screen_link(r)),$("#screens").append(Jot.screen(r)),r.setup(null),$("#design").trigger("render",[r]),$("#screen_link"+r.cid).trigger("click"),n||this.trigger("sortupdate",[r.cid]),t.target=$("#screen_link"+r.cid),l(t),$(".jscroll").jscroll()},n.prototype.dropToCreate=function(t){var e;return(e=t.originalEvent.dataTransfer.files[0])?$.readDataURL(e,function(){return function(t){var n,i;return n=e.name.replace(/\..+$/,""),i=new Screen({name:n,project_cid:$.project().cid,orientation:"portrait",cid:"s"+Math.uuid(12,16),position:$.project().cscreens().length}),i.lsave(),$("#screen_links .links .children").last().after(Jot.screen_link(i)),$("#screens").append(Jot.screen(i)),$("#design").trigger("render",[i]),$(".jscroll").jscroll(),setTimeout(function(){var e;return $("#screen_link"+i.cid).trigger("click"),e=new Image,e.onload=function(){return WidgetManager.newImageView(e,n,0,0,i),$("#design").trigger("height:adjust"),$(".screen.active .placeholder").hide(),$("#screen_links .placeholder").hide()},e.src=t},0)}}(this)):void 0},u=function(t){var e,n;return t.preventDefault(),t.stopPropagation(),e=$(t.target).closest(".link"),e.toggleClass("expanded"),e.next(".children").toggleClass("expanded"),n=Screen.find(e.data("cid")),n.expanded=e.hasClass("expanded"),n.lsave(),$("body").trigger("mb.widget_link.update"),$(".jscroll").jscroll()},l=function(t){var e,n,i,r;return t.preventDefault(),i=$(t.target).closest(".link"),i.attr("draggable",!1),r=i.find("div.name"),n=i.find("input"),e=i.find(".dup, .del"),r.hide(),e.hide(),n.show().focus()},o=function(t){var e,n,i,r,o,s,a;return i=$(t.target).closest(".link"),i.attr("draggable",!0),o=i.find("div.name"),r=i.find("input"),e=i.find(".dup, .del"),$(t.target).hide(),o.show(),e.show(),n=i.attr("data-cid"),s=$(t.target).val(),Spine.isBlank(s)&&(s="Untitled"),o.find("span").text(s),Screen.exists(n)&&(a=Screen.find(n)),a&&s!==a.name&&(a.name=s,a.lsave()),o.show(),r.hide()},c=function(t){var e,n,i,r,o,s;return t.preventDefault(),t.stopPropagation(),r=$(t.target).closest(".link"),e=r.next(".children"),n=r.attr("data-cid"),Screen.exists(n)&&(s=Screen.find(n)),s?(o=""+s.name+" Copy",i=new Screen({name:o,project_cid:$.project().cid,orientation:s.orientation,cid:"s"+Math.uuid(12,16),parent_cid:s.parent_cid,height:s.height,hh:s.hh,fh:s.fh}),i.lsave(),setTimeout(function(r){return function(){var o,a,c,u,d,p,h,f,g,m,v,y;for(e.after(Jot.screen_link(i)),$("#screens").append(Jot.screen(i)),p={},v=s.cwidgets(),a=h=0,g=v.length;g>h;a=++h)u=v[a],o=u.dup(),o.load({screen_cid:i.cid,cid:"w"+Math.uuid(10,16)}),o.lsave(),p[u.cid]=o.cid;for(y=s.clinks(),f=0,m=y.length;m>f;f++)c=y[f],d=function(){var t,e,i,r;for(i=c.widget_cids.split(","),r=[],t=0,e=i.length;e>t;t++)n=i[t],r.push(p[n]);return r}().join(","),c=new Link({gesture:c.gesture,screen_cid:i.cid,target_cid:c.target_cid,widget_cids:d,transition:c.transition,cid:"l"+Math.uuid(10,16)}),c.lsave();return $("#design").trigger("render",[i]),$("#screen_link"+i.cid).trigger("click"),r.trigger("sortupdate",[i.cid]),t.target=$("#screen_link"+i.cid),l(t),$(".jscroll").jscroll()}}(this),10)):void 0},a=function(t){var e,n,i,r,o,s;return t.preventDefault(),t.stopPropagation(),i=$(t.target).closest(".link"),n=i.attr("data-cid"),Screen.exists(n)&&(s=Screen.find(n)),s?s.children().length?alert(I18N_STRINGS.remove_children_first):1>=$.project().cscreens().length?alert(I18N_STRINGS.cant_remove_screen):(o=confirm("'"+s.name+"'"+I18N_STRINGS.screen_remove_confirmation),o===!0?(r=$("#screen_link"+n).prev(".link"),e=$("#screen_link"+n).hasClass("active"),$("#screen_link"+n).remove(),$("#children"+n).remove(),$("#screen"+n).remove(),Link.select(function(t){return t.target_cid===s.cid?$("body").trigger("mb.widget_link.remove",[t.cid]):void 0}),s.ldestroy(),r.length||(r=s.parent_cid?$("#children"+s.parent_cid).prev():$("#screen_links .links .link").first()),e&&r.trigger("click"),$("body").trigger("selection:clear"),$("body").trigger("mb.widget_link.update"),$(".jscroll").jscroll()):void 0):void 0},s=function(t){var e;return $(t.target).removeClass("active"),e=$(t.target).attr("data-cid"),$("#screen"+e).hide(),$("#screen"+e).removeClass("active"),$(".jscroll").jscroll()},i=function(t){var e,n,i;return t.preventDefault(),n=$(t.target).closest(".link"),n.hasClass("active")?void 0:(i=Screen.find(n.data("cid")),$("#screen"+i.cid+" .widget").length||$("#design").trigger("render",[i]),$("#screen"+i.cid).css("height",i.outerHeight()+"px"),$("#screen"+i.cid).css("width",i.outerWidth()+"px"),$("#screen"+i.cid).css("margin-left",0-i.outerWidth()/2+"px"),i.h()<=i.dH()&&$("#screen"+i.cid+" .reduct").hide(),$("#links .link").hide(),e=n.attr("data-cid"),n.index()>0||n.closest(".children").length?($(".prev").show(),$("#components .container").css("top","92px")):($(".prev").hide(),$("#components .container").css("top","46px")),$("#screen_links .links .active").trigger("deactive"),n.addClass("active"),r(n,e),$(".jscroll").jscroll(),$(".screen.active .widget").length>2?$(".screen.active .placeholder").hide():$(".screen.active .placeholder").show(),$("#screen_links .link").length>2&&$("#screen_links .placeholder").hide(),$("#design").trigger("slider:update"))},r=function(t,e){return $("#screen"+e).show(),$("#screen"+e).addClass("active"),$("#text_editor").remove(),$(".screen.active .status_bar").length?$("#components .tstatus_bar").hide():$("#components .tstatus_bar").show(),setTimeout(function(){return $(".widget").show(),$("body").trigger("selection:clear"),$("body").trigger("mb.widget_link.render",[e])},0)},n.prototype.sort=function(t){var e,n,i,r,o,s,a,c;for(r=$("#screen_link"+t).closest(".children"),o=Screen.find(t),o.parent_cid=r.data("cid")||null,$("#screen_link"+t).attr("data-parent","p"+(o.parent_cid||"")),o.parent_cid&&(o.expanded=!1),o.lsave(),i=o.parent_cid?$("#screen_links .link[data-parent=p"+o.parent_cid+"]"):$("#screen_links .link[data-parent=p]"),c=[],n=s=0,a=i.length;a>s;n=++s)e=i[n],o=Screen.find($(e).data("cid")),o.position=n,c.push(o.lsave());return c},n.prototype.updateTop=function(t){var e;return e=t.cid,$("#widget"+e).transitionEnd(function(){return $("#widget"+e).disableTransition()}),$("#widget"+t.cid).enableTransition("0.3s"),WidgetManager.renderOutline(t,"")},n.prototype.updateHeight=function(t){var e,n,i,r,o,s,a;if(i=Screen.find($(".screen.active").data("cid")),e=i.maxWidgetHeight(),(t>=0&&e>i.height||0>t&&i.height>e)&&(t=e-i.height),n=Math.round(100*i.dH()/$.scale()),n>i.height+t&&(t=n-i.height),Math.abs(t)>0){for(a=i.cwidgets(),o=0,s=a.length;s>o;o++)r=a[o],r.inFooter()&&(r.top&&(r.top+=t),r.lsave(),this.updateTop(r));return i.height+=t,i.lsave(),$("body").trigger("selection:clear"),$(".screen.active").css("height",i.outerHeight()+"px"),$("body").trigger("mb.widget_link.update"),i.h()<=i.dH()?$(".screen.active .reduct").hide():$(".screen.active .reduct").show()}},n.prototype.updateCarrier=function(t){var e,n,i,r,o;for(o=$("#design .canvas .status_bar"),i=0,r=o.length;r>i;i++)n=o[i],e=Widget.find($(n).data("cid")),e.text=t,e.lsave(),$(n).find("span.text").text(t);return COMPONENTS.status_bar.text=COMPONENTS.status_bar.tb_text=t,$("#components .status_bar span").text(t)},n.prototype.updateOrientation=function(){var t,e,n,i,r,o,s;if(!this.inTransition){for(this.inTransition=!0,e=$(".screen.active").hasClass("portrait")?"landscape":"portrait",t=$(".screen.active").data("cid"),n=Screen.find(t),n.setOrientation(e),n.lsave(),s=n.cwidgets(),r=0,o=s.length;o>r;r++)i=s[r],i.isFullWidth()&&(i.setW(n.width),"keyboard"===i.name&&(i.height=n.keyboardH(n.orient())),i.lsave());return $(".widget").hide(),$("#links .links .link").hide(),$(".screen.active").hasClass("portrait")?($(".screen.active").removeClass("portrait"),$(".screen.active").addClass("landscape")):($(".screen.active").removeClass("landscape"),$(".screen.active").addClass("portrait")),$(".screen.active").css("width",n.outerWidth()+"px"),$(".screen.active").css("margin-left",0-n.outerWidth()/2+"px"),$(".screen.active").css("height",n.outerHeight()+"px"),setTimeout(function(t){return function(){return $(".widget").show(),$("#links .links .link").show(),$("body").trigger("mb.widget_link.render",[n.cid]),t.inTransition=!1
}}(this),300)}},n.prototype.render=function(t,e){var n,i,r,o,s,a,c,l,u,d;if(e){for($("#screen"+e.cid).data("cid",e.cid),i="",l=e.cwidgets(),o=0,a=l.length;a>o;o++)r=l[o],i+=Jot.widget(r);for(n=document.getElementById("canvas"+e.cid),n.innerHTML+=i,u=e.cwidgets(),d=[],s=0,c=u.length;c>s;s++)r=u[s],d.push(WidgetManager.design(r,""));return d}},n}(this.View)}.call(this),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};this.Runner=function(t){function n(){$("body").on("click","a#reset_app",function(t){return function(){return t.loadScreen(t.project.homeScreen().cid)}}(this)),$("body").on("click","a#back_prev",function(t){return function(){return t.backPrev()}}(this)),$("body").on("click","#sharing_url",function(){return $("#sharing_url").select()}),window.addEventListener("message",function(t){return function(e){var n;return n=JSON.parse(e.data),"back"===n.event?t.backPrev():void 0}}(this),!1),$("body").on("click",".clickable",function(t){return function(e){return t.wj(e,"tap")}}(this)),$("body").on("click",".pcanvas, #gh, #gf",function(t){return function(e){return t.pj(e,"tap")}}(this)),$("body").on("selection:moveUp",function(t){return function(){return t.moveUp()}}(this)),$("body").on("selection:moveDown",function(t){return function(){return t.moveDown()}}(this)),$.isMobile()?(window.onresize=function(t){return function(){return t.reload()}}(this),this.delay="0.2s",$("body").on("touchstart",".pcanvas",function(t){return function(){return t.mousedown=!0,t.mousemove=!1,!0}}(this)),$("body").on("touchmove",".pcanvas",function(t){return function(){return t.mousedown?(t.mousemove=!0,!0):void 0}}(this)),$("body").on("touchend",function(t){return function(){return t.mousedown=!1,!0}}(this))):(this.delay="0.3s",$("body").on("mousedown","#simulator",function(t){return function(e){return!$("#preview").is(":visible")&&$("#design").length?!0:(t.mousedown=!0,t.mousemove=!1,t.clientY=e.clientY,t.screenTop=$(".pcanvas.active .jspPane").position().top,!0)}}(this)),$("body").on("mousemove","#simulator",function(t){return function(e){var n,i,r;return t.mousedown?(t.mousemove=!0,i=e.clientY-t.clientY,r=t.screenTop+i,r>0&&(r=0),n=$(".pcanvas.active").height()-$(".pcanvas.active .jspPane").height(),n>0&&(n=0),n>r&&(r=n),$(".pcanvas.active .jspPane").css("top",r+"px"),!0):!0}}(this)),$("body").on("mouseup",function(t){return function(){return t.mousedown=!1,!0}}(this))),this.lastEvent=new Date}return e(n,t),n.prototype.loadScreen=function(t){var e;if($(".pcanvas.active").data("cid")!==t&&(e=Screen.exists(t)))return this.setOrientation(e.cid,function(t){return function(){return $(".pcanvas.menu").removeClass("lmenu rmenu menu"),t.prepareTransition(e.cid,"none"),t.none(e.cid)}}(this))},n.prototype.backPrev=function(){var t;if(this.home.cid!==$(".pcanvas.active").data("cid"))return t=new Link({target_cid:"prev",transition:"none"}),this.j(t)},n.prototype.validEvent=function(){var t;return t=new Date-this.lastEvent,this.lastEvent=new Date,t>500},n.prototype.pj=function(t,e){var n,i,r,o,s,a,c;if(this.validEvent()&&(n=$(".pcanvas.active").data("cid"),Screen.exists(n))){for(r=Screen.find(n),$("#gestures .gesture").hide(),c=r.cwidgets(),s=0,a=c.length;a>s;s++)if(o=c[s],i=Link.findByAttribute("widget_cids",o.cid),"pg"===o.name&&i&&$("#gestures .s"+o.icon).show(),"pg"===o.name&&o.icon===e&&i)return this.j(i),void 0;if(!this.mousemove)return $(t.target).closest(".pcanvas").hasClass("menu")?this.resetmenu($(t.target).closest(".pcanvas").data("cid")):($(".pcanvas.active .link .region, #gh .link .region, #gf .link .region").css("opacity","0.6"),$("#gestures").show(),setTimeout(function(){return $("#gestures").hide(),$(".pcanvas.active .link .region, #gh .link .region, #gf .link .region").css("opacity","0")},400))}},n.prototype.wj=function(t,e){var n;return t.preventDefault(),t.stopPropagation(),this.mousedown=!1,n=Link.find($(t.target).closest(".clickable").data("cid")),e!==n.gesture?(this.pj(t,e),void 0):this.validEvent()?$(t.target).closest(".pcanvas").hasClass("menu")?this.resetmenu():this.j(n):void 0},n.prototype.j=function(t){var e,n,i;if(t&&(e=t.target_cid,i=t.transition,!Spine.isBlank(e))){if("prev"===e){if(n=$(".pcanvas.active").data("prev"),!n)return;if(e=n.pop(),$(".pcanvas.active").data("prev",n),$("#pscreen"+e).hasClass("menu"))return this.resetmenu(e),void 0}else n=$("#pscreen"+e).data("prev"),n||(n=[]),n.push($(".pcanvas.active").data("cid")),$("#pscreen"+e).data("prev",n);return this.setOrientation(e,function(t){return function(n){return n&&(i="none"),t.prepareTransition(e,i),setTimeout(function(){return t[i](e)},10)}}(this))}},n.prototype.none=function(t){var e;return e=$(".pcanvas.active").data("cid"),this.hideScreen(".pcanvas.menu"),$(".pcanvas.menu").removeClass("lmenu rmenu menu"),$("#pscreen"+t).disableTransition(function(n){return function(){return $("#pscreen"+t).enableTransition(n.delay),$("#pscreen"+t).addClass("active"),setTimeout(function(){return $("#pscreen"+e).removeClass("active top"),n.hideScreen("#pscreen"+e),n.doneTransition()},100)}}(this))},n.prototype.slideleft=function(t){var e;return e=$(".pcanvas.active").data("cid"),t!==$(".pcanvas.menu").data("cid")&&this.hideScreen(".pcanvas.menu"),$(".pcanvas.menu").removeClass("lmenu rmenu menu"),$("#pscreen"+t).zindex("5"),$("#pscreen"+t).disableTransition(function(n){return function(){var i;return $("#pscreen"+t).enableTransition(n.delay),i=$(".pcanvas.active").width(),$(".pcanvas.active").translateX(0-i),$("#pscreen"+t).translateX(0),$(".pcanvas.active").transitionEnd(function(){return $(".pcanvas.active").removeClass("active"),$("#pscreen"+t).addClass("active top"),n.hideScreen("#pscreen"+e),n.doneTransition()})}}(this))},n.prototype.slideright=function(t){var e;return e=$(".pcanvas.active").data("cid"),t!==$(".pcanvas.menu").data("cid")&&this.hideScreen(".pcanvas.menu"),$(".pcanvas.menu").removeClass("lmenu rmenu menu"),$("#pscreen"+t).zindex("5"),$("#pscreen"+t).disableTransition(function(n){return function(){var i;return $("#pscreen"+t).enableTransition(n.delay),i=$(".pcanvas.active").width(),$(".pcanvas.active").translateX(i),$("#pscreen"+t).translateX(0),$(".pcanvas.active").transitionEnd(function(){return $(".pcanvas.active").removeClass("active"),$("#pscreen"+t).addClass("active top"),n.hideScreen("#pscreen"+e),n.doneTransition()})}}(this))},n.prototype.resetmenu=function(){return $(".pcanvas.menu").translateX(0),$(".pcanvas.menu").transitionEnd(function(t){return function(){return $(".pcanvas.active").removeClass("active"),$(".pcanvas.menu").addClass("active"),$(".pcanvas.menu").removeClass("lmenu menu"),t.doneTransition()}}(this))},n.prototype.leftmenu=function(t){return $("#pscreen"+t).zindex("2"),$("#pscreen"+t).disableTransition(function(e){return function(){var n;return $("#pscreen"+t).enableTransition(e.delay),n=$(".pcanvas.active").width(),$(".pcanvas.active").translateX(3*n/4),$(".pcanvas.active").transitionEnd(function(){return $(".pcanvas.active").removeClass("active"),$("#pscreen"+t).addClass("active"),e.doneTransition()})}}(this))},n.prototype.rightmenu=function(t){return $("#pscreen"+t).zindex("2"),$("#pscreen"+t).disableTransition(function(e){return function(){var n;return $("#pscreen"+t).enableTransition(e.delay),n=$(".pcanvas.menu").width(),$(".pcanvas.menu").translateX(0-3*n/4),$(".pcanvas.menu").transitionEnd(function(){return $(".pcanvas.active").removeClass("active"),$("#pscreen"+t).addClass("active"),e.doneTransition()})}}(this))},n.prototype.fixedIn=function(t,e){var n;return n=$(".pcanvas.active").data("cid"),$("#pscreen"+t).zindex("5"),$("#pscreen"+t).disableTransition(function(i){return function(){return $("#pscreen"+t).enableTransition(i.delay),$("#pscreen"+t)[e](0),$("#pscreen"+t).transitionEnd(function(){return $(".pcanvas.active").removeClass("active"),$("#pscreen"+t).addClass("active top"),i.hideScreen("#pscreen"+n),i.hideScreen(".pcanvas.menu"),i.doneTransition()})}}(this))},n.prototype.topin=function(t){return this.fixedIn(t,"translateY")},n.prototype.popin=function(t){return this.fixedIn(t,"translateY")},n.prototype.slideleft2=function(t){return this.fixedIn(t,"translateX")},n.prototype.slideright2=function(t){return this.fixedIn(t,"translateX")},n.prototype.fixedOut=function(t,e,n){var i;return i=$(".pcanvas.active").data("cid"),$("#pscreen"+t).zindex("2"),$("#pscreen"+t).disableTransition(function(r){return function(){return $("#pscreen"+t).enableTransition(r.delay),$(".pcanvas.active")[e](n),$(".pcanvas.active").transitionEnd(function(){return $(".pcanvas.active").removeClass("active"),$("#pscreen"+t).addClass("active"),r.hideScreen("#pscreen"+i),r.showScreen(".pcanvas.menu"),r.doneTransition()})}}(this))},n.prototype.leftout=function(t){var e;return e=0-$(".pcanvas.active").width(),this.fixedOut(t,"translateX",e)},n.prototype.rightout=function(t){var e;return e=$(".pcanvas.active").width(),this.fixedOut(t,"translateX",e)},n.prototype.topout=function(t){var e;return e=0-$(".pcanvas.active").height(),this.fixedOut(t,"translateY",e)},n.prototype.popout=function(t){var e;return e=$(".pcanvas.active").height(),this.fixedOut(t,"translateY",e)},n.prototype.prepareTransition=function(t,e){var n,i,r,o;return $(".pcanvas.active").removeClass("lmenu rmenu menu top"),i=Screen.find(t),this.showScreen("#pscreen"+t),this.renderWidgets(i),this.renderLinks(i),n=$(".pcanvas.active").height()-1,r=$(".pcanvas.active").width()-1,"popin"===e?$("#pscreen"+t).translate(0,n):"topin"===e?$("#pscreen"+t).translate(0,0-n):-1!==["leftmenu","rightmenu"].indexOf(e)?($(".pcanvas.menu").removeClass("lmenu rmenu menu"),"leftmenu"===e?$(".pcanvas.active").addClass("lmenu menu"):$(".pcanvas.active").addClass("rmenu menu"),$("#pscreen"+t).translate(0,0)):-1!==["popout","none","leftout","rightout","topout"].indexOf(e)?$("#pscreen"+t).translate(0,0):-1!==["slideright","slideleft2"].indexOf(e)?(o=$(".pcanvas.menu").length?0-3*r/4:0-r,$("#pscreen"+t).translate(o,0)):-1!==["slideleft","slideright2"].indexOf(e)&&(o=$(".pcanvas.menu").length?3*r/4:r,$("#pscreen"+t).translate(o,0)),$("#app #gf .keyboard").hide(),$("#app .scontainer .header, #app .scontainer .footer").hide(),-1!==["slideright","slideleft","none"].indexOf(e)?($("#app #gh").translateY(0),$("#app #gf").translateY(0)):($("#app #gh").translateY(-1024),$("#app #gf").translateY(-1024))},n.prototype.doneTransition=function(){var t;return $(".pcanvas.active").removeClass("menu lmenu rmenu"),$(".pcanvas.active").zindex(""),t=$(".pcanvas.active").data("cid"),t!==this.project.homeScreen().cid?$("#home").show():$("#home").hide(),$("#app #gh").translateY(0),$("#app #gf").translateY(0),this.setupGW(Screen.exists(t)),this.setupGS(Screen.exists(t)),this.setupWG(),this.setupGM(),$("#app .pcanvas.active .header, #app .pcanvas.active .footer").show(),$.isMobile()||($("#app .jscroll").jscroll(),$("#stickies").html($(".pcanvas.active .stickies").html()),$("#stickies .sticky").draggable({refreshPositions:!0})),"function"==typeof MB.screenLoaded?MB.screenLoaded(t):void 0},n.prototype.run=function(){return this.prepareOrientation(this.home),this.setupSplash(this.project.homeScreen(),"#simulator .splash img"),$("#simulator .splash").show(),$("#simulator #app").hide(),this.project.setup(),this.start=(new Date).getTime(),setTimeout(function(t){return function(){var e;return t.renderScreen(),t.end=(new Date).getTime(),e=t.end-t.start,e>=600?t.launch():setTimeout(function(){return t.launch()},600-e)}}(this),10),$("#qrcode").qrcode({text:$("#sharing_url").val(),width:150,height:150})},n.prototype.prepareOrientation=function(t){var e,n,i,r,o;return e=$(window).width()>$(window).height()?"landscape":"portrait",r=[],$.isMobile()?$.validDevice(this.project)?e===t.orient()?(o=$(window).width(),n=$(window).height()):(n=$(window).width(),o=$(window).height()):(o=t.dW(),n=t.dH(),$.isTablet()||(e===t.orient()?(i=$(window).width()/t.dW(),n=Math.round($(window).height()/i)):(i=$(window).width()/t.dH(),o=Math.round($(window).height()/i)),r.push("scale("+i+")"))):(o=t.dW(),n=t.dH(),o+=2*parseInt($("#simulator").css("padding-left")),n+=parseInt($("#simulator").css("padding-top"))+parseInt($("#simulator").css("padding-bottom"))),$("#simulator").css("width",o+"px"),$("#simulator").css("height",n+"px"),$("#simulator").css("margin-left",Math.round(0-o/2)+"px"),$.isMobile()&&$("#simulator").css("margin-top",Math.round(0-n/2)+"px"),$.isMobile()?(e!==t.orient()&&r.push("rotate(-90deg)"),$("#simulator").css("-webkit-transform",r.join(" "))):void 0},n.prototype.setOrientation=function(t,e){var n,i;if(Screen.exists(t))if(i=Screen.find(t),n=i.orient(),$("#simulator").hasClass(n)){if(e)return e(!1)}else if($("#simulator").removeClass("portrait landscape"),$("#simulator").addClass(n),this.prepareOrientation(i),this.hideActive(),this.clearCanvas(),e&&e(!0),!$.isMobile())return $("#app .jscroll").jscroll()},n.prototype.hideActive=function(){var t;return t=$(".pcanvas.active").data("cid"),$(".pcanvas.active").hide(),$.isMobile()?void 0:setTimeout(function(){return $("#pscreen"+t).show()},300)},n.prototype.clearCanvas=function(){return $(".scontainer").html(""),$("#gh").html(""),$("#gf").html(""),$("#gs").html("")},n.prototype.reload=function(){var t,e;return t=$(".pcanvas.active").data("cid"),Screen.exists(t)?(e=Screen.find(t),this.clearCanvas(),this.prepareOrientation(e),this.prepareTransition(t,"none"),$(".pcanvas.menu").length&&this.prepareTransition($(".pcanvas.menu").data("cid")),this.doneTransition()):void 0},n.prototype.launch=function(){return $("#simulator .splash").hide(),$("#splash").hide(),$("#simulator #app").show(),$.isMobile()||$("#app .jscroll").jscroll(),this.setupPG(this.home),this.doneTransition(),"function"==typeof MB.onload?MB.onload():void 0},n.prototype.setupGW=function(t){var e;if(t)return $(".pcanvas.active .scontainer .status_bar").length&&$("#gs").html($(".pcanvas.active .scontainer .status_bar")[0].outerHTML),$("#app #gh").html($(".pcanvas.active .scontainer").html()),$("#app #gh").css("height",t.headerHeight()+"px"),$("#app .pcanvas.active .scontainer > .header").css("height",t.headerHeight()+"px"),$("#app #gf").html($(".pcanvas.active .scontainer").html()),$("#app #gf").css("height",t.footerHeight()+"px"),$("#app .pcanvas.active .scontainer > .footer").css("height",t.footerHeight()+"px"),e=t.h()-t.footerHeight(),$("#app #gf .widget").css("margin-top",0-e+"px"),$("#app #gf .link").css("margin-top",0-e+"px"),$("#app #gf .keyboard").show()},n.prototype.setupGS=function(t){return t?(t.hasStatusBar()?$("#gs").show():$("#gs").hide(),$.validDeviceType(this.project)&&$.isIOS()&&window.navigator.standalone?$("#gs .status_bar").addClass("standalone"):void 0):void 0},n.prototype.setupWG=function(){return $(".clickable").swipe({swipe:function(t){return function(e,n){return t.wj(e,n)}}(this),tap:function(){return!1},hold:function(t){return function(e){return t.wj(e,"hold")}}(this),allowPageScroll:"vertical"})},n.prototype.setupPG=function(){return $("#app").swipe({swipe:function(t){return function(e,n){return t.pj(e,n)}}(this),tap:function(){return!1},hold:function(t){return function(e){return t.pj(e,"hold")}}(this),allowPageScroll:"vertical"})},n.prototype.setupGM=function(){var t,e,n,i,r,o,s;if("CN"!==$("body").data("country")&&($("#app .map_view").swipe({swipe:function(t){return function(){return t.validEvent()}}(this)}),window.google)){for(n={center:$.mapCenter(),zoom:14,disableDefaultUI:!0,mapTypeId:google.maps.MapTypeId.TERRAIN},o=$(".pcanvas.active .map_view .gmap"),s=[],i=0,r=o.length;r>i;i++)t=o[i],$(t).find(".gm-style").length?s.push(void 0):s.push(e=new google.maps.Map(t,n));return s}},n.prototype.renderScreen=function(){var t,e,n,i,r,o,s,a;for(e="",s=this.project.cscreens(),n=0,r=s.length;r>n;n++)t=s[n],e+=Jot.screen_preview(t);for($("#app").append(e),a=this.project.cscreens(),i=0,o=a.length;o>i;i++)t=a[i],t.cid!==this.home.cid&&this.hideScreen("#pscreen"+t.cid),this.preloadImages(t),$.isMobile()||($("#pscreen"+t.cid+" .widgets").css("width",t.dW()+"px"),$("#pscreen"+t.cid+" .widgets").css("height",t.dH()+"px"));return this.renderWidgets(this.home),this.renderLinks(this.home),$("#pscreen"+this.home.cid).addClass("active")},n.prototype.preloadImages=function(t){var e,n,i,r,o,s;for(o=t.cwidgets(),s=[],i=0,r=o.length;r>i;i++)n=o[i],n.image&&Asset.exists(n.image)?(e=Asset.find(n.image),s.push(e.preload())):s.push(void 0);return s},n.prototype.renderWidgets=function(t){var e,n,i,r,o,s,a,c,l,u;if(!$("#pscreen"+t.cid+" .widget").length){for(r="",n="",l=t.cwidgets(),o=0,a=l.length;a>o;o++)i=l[o],"sticky"===i.name?n+=Jot.widget(i,"p"):r+=Jot.widget(i,"p");for($("#pscreen"+t.cid+" .widgets .scontainer").append(r),$.isMobile()||$("#pscreen"+t.cid+" .stickies").append(n),u=t.cwidgets(),s=0,c=u.length;c>s;s++)i=u[s],"sticky"===i.name&&$.isMobile()||WidgetManager.design(i,"p");return e=$.isMobile()?Math.max(t.maxWidgetHeight(),$("#simulator").height()):t.h(),$("#pscreen"+t.cid+" .widgets .scontainer").css("height",e+"px")}},n.prototype.renderLinks=function(t){var e,n,i,r,o,s;if(!$("#pscreen"+t.cid+" .link").length){for(o=t.clinks(),s=[],i=0,r=o.length;r>i;i++)e=o[i],e.postfix="p",n=e.cwidgets(),$("#pscreen"+t.cid+" .widgets .scontainer").append(Jot.widget_link(e)),s.push(LinkManager.preview(e,n));return s}},n.prototype.renderImage=function(t){var e,n,i,r,o;for(r=t.cwidgets(),o=[],n=0,i=r.length;i>n;n++)e=r[n],o.push(WidgetManager.renderImage(e,"p"));return o},n.prototype.moveUp=function(){var t,e;if($("#preview").is(":visible"))return t=$(".pcanvas.active .jscroll").data("jsp"),e=t.getContentPositionY(),e-=80,t.scrollTo(0,e)},n.prototype.moveDown=function(){var t,e;if($("#preview").is(":visible"))return t=$(".pcanvas.active .jscroll").data("jsp"),e=t.getContentPositionY(),e+=80,t.scrollTo(0,e)},n.prototype.hideScreen=function(t){return $.isMobile()?setTimeout(function(){return $(t).hide()},200):void 0},n.prototype.showScreen=function(t){return $.isMobile()?$(t).show():void 0},n}(this.View),this.DesignRunner=function(t){function n(){n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.render=function(t,e){return Project.exists(t)&&(this.project=Project.find(t)),this.project?($.isMobile()&&(this.project.scale=100,$("#workspace").data("scale",100)),this.home=Screen.find(e),this.project.orientation=this.home.orientation,$("#preview").html(Jot.simulator(this.project)),$("#design").css("overflow","hidden"),$("#design").hide(),$("#preview").show(),this.run()):Spine.Route.navigate("apps")},n}(this.Runner),this.SharingRunner=function(t){function n(t){this.project=t,n.__super__.constructor.apply(this,arguments),this.screenManager=new ScreenManager,this.linkManager=new LinkManager}return e(n,t),n.prototype.render=function(){return this.home=this.project.homeScreen(),this.project.orientation=this.home.orientation,this.project.setup(),$.isMobile()?(this.project.scale=100,$("#workspace").data("scale",100)):$("#workspace").data("scale",this.project.scale),$("#workspace").html(Jot.simulator(this.project)),$("#sharing_password").hide(),"file:"===window.location.protocol&&$("#sharing").hide(),setTimeout(function(){return $("#workspace").show(),$.isMobile()||$("#logo").show(),$("#back_to_design").hide()},100),this.run()},n}(this.Runner)}.call(this),function(){window.MB={launch:function(t){return checkFA(function(){return t.password.length&&MB.encrypted_password!==t.password&&md5(prompt(I18N_STRINGS.credential_required))!==t.password?alert(I18N_STRINGS.invalid_credential):(MB.runner=new SharingRunner(t),MB.runner.render())})},init:function(t){var e,n;return $("#loading").hide(),window.DEVICES=t.devices,n=new Project,n.load(t.project),n.lsave(!1),Screen.refresh(t.screens),Widget.refresh(t.widgets),Asset.refresh(t.assets),Link.refresh(t.links),$("title").text(n.name),$("body").data("country",t.country),(new Image).src=$.staticMap(),!$.isIOS()||window.navigator.standalone||n.wechat?MB.launch(n):(e=Jot.install({name:n.name,wechat:$.isWeChat()}),$("#workspace").html(e),$("#splash").hide(),$("#workspace").show(),$("a.view_inapp").click(function(){return MB.launch(n)}))},load:function(t,e){return $.isMobile()&&($("body").addClass("mobile"),FastClick.attach(document.body)),MB.encrypted_password=e,$.browser.webkit||$.browser.mozilla?"file:"===window.location.protocol?this._loadLocal(t):this._loadOnline(t):($("#loading").hide(),$("#nonsupport").show())},_loadOnline:function(t){var e,n;return n="/app/"+t+".json?"+(new Date).valueOf(),e=$.getJSON(n,function(t){try{localStorage.setItem(window.location.pathname,JSON.stringify(t))}catch(e){console.log("private")}return setTimeout(function(){return MB.init(t)},300),$(".indicator").css("height","100%")}),e.fail(function(){var t;return localStorage.getItem(window.location.pathname)?(t=JSON.parse(localStorage.getItem(window.location.pathname)),MB.init(t)):alert("Network error.")})},_loadLocal:function(){var t,e,n,i;for(window.MBData.project.retina_splash="images/splash.png",i=window.MBData.assets,e=0,n=i.length;n>e;e++)t=i[e],t.image=t.image.replace(/^.+uploads\//,"");return $(".indicator").transitionEnd(function(){return MB.init(window.MBData)}),$(".indicator").css("height","100%"),$.staticMap=function(){return"images/workspace/staticmap_"+$("body").data("locale")+".png"}}}}.call(this);