common.min.js 867 KB

1
  1. function resizeView(){var e=document.documentElement.clientHeight,t=$(".footer").length>0?$(".footer").css("height"):0,a=$(".left-menu-content").length>0?$(".left-menu-content").css("height"):0,n=$(".footer").length>0?$(".footer").width():0,i=$(".right-content").length>0?$(".right-content").width():0;2==$(".left-menu, .right-content").length&&n!=i-1&&($(".footer").length>0?$(".footer").hide():$(".footer").show()),$(".main-panel-body,.panel-cut").css("min-height",e-100),$(".caret-wxapp .panel-app").css("min-height",e-95),parseInt(a)>e-50?$(".skin-black .right-content>.content").css("min-height",parseInt(a)-parseInt(t)-30+"px"):$(".skin-black .right-content>.content").css("min-height",e-parseInt(t)-93+"px"),$(".link-group").each(function(){var e=$(this).children("a").length;$(this).css("min-width",100*e+10)})}function we7ResourceMusicFormController(e){var t=this;t.music={title:"",HQUrl:"",url:"",description:""},t.$onInit=function(){t.music.url=t.musicurl},t.$onChanges=function(e){t.music.url=e.musicurl.currentValue},t.selectVoice=function(){t.doselect()},t.ok=function(){""!=t.music.title?""!=t.music.url?e.$emit("add_music",t.music):util.message("请选择媒体文件"):util.message("标题不能为空")}}function UploadController(e,t,a,n){function i(t){n(function(){e.uploading=t})}function s(e){if(!l.uploading){var t=e[0];l.filename=t.name,l.filesize=parseInt(t.size/1024),l.files=e,i(!0);var n=l.uploadUrl;a.upload(e,n,{onProgress:o}).then(function(e){var t=JSON.parse(e);i(!1),r(),t.message&&""!=t.message?l.onUploadError({mes:t.message}):l.onUploaded()},function(e){r(),i(!1),l.onUploadError("")})}}function o(t){var a=parseInt(t.loaded/t.total*100);t.filename=t.name,t.filesize=parseInt(t.size/1024),t.progress=a,l.onProgress({file:t,progress:a}),n(function(){e.progress=a})}function r(){var e=document.getElementById("we7resourceFile");e.value=null,e.addEventListener("change",function(e){s(e.target.files)})}var l=this;l.currentFile=null,e.uploading=!0,l.uploadProgress=0,l.$onInit=function(){},document.addEventListener&&(document.addEventListener("dragenter",function(e){e.stopPropagation(),e.preventDefault()},!1),document.addEventListener("dragover",function(e){e.stopPropagation(),e.preventDefault()},!1),document.getElementById("material-Modal").addEventListener("drop",function(e){e.stopPropagation(),e.preventDefault(),s(e.dataTransfer.files)})),r()}function uiUploader(e,t){function a(e){for(var t=0;t<e.length;t++)r.files.push(e[t])}function n(e){r.options=e;for(var t=e.headers||{},a=e.options||{},n=0;n<r.files.length&&r.activeUploads!=r.options.concurrency;n++)r.files[n].active||o(r.files[n],r.options.url,r.options.data,r.options.paramName,t,a)}function i(e){r.files.splice(r.files.indexOf(e),1)}function s(e){var t=["n/a","bytes","KiB","MiB","GiB","TB","PB","EiB","ZiB","YiB"],a=0===e?0:+Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,a)).toFixed(a?1:0)+" "+t[isNaN(e)?0:a+1]}function o(e,t,a,i,o,l){var c,u,d;if(a=a||{},i=i||"file",r.activeUploads+=1,e.active=!0,c=new window.XMLHttpRequest,!0===l.withCredentials&&(c.withCredentials=!0),u=new window.FormData,c.open("POST",t),o)for(var p in o)o.hasOwnProperty(p)&&c.setRequestHeader(p,o[p]);if(c.upload.onloadstart=function(){},c.upload.onprogress=function(t){t.lengthComputable&&(e.loaded=t.loaded,e.total=t.total,e.humanSize=s(t.loaded),angular.isFunction(r.options.onProgress)&&r.options.onProgress(e))},c.upload.onload=function(){angular.isFunction(r.options.onUploadSuccess)&&r.options.onUploadSuccess(e)},c.upload.onerror=function(e){angular.isFunction(r.options.onError)&&r.options.onError(e)},c.onload=function(){r.activeUploads-=1,r.uploadedFiles+=1,n(r.options),angular.isFunction(r.options.onCompleted)&&r.options.onCompleted(e,c.responseText,c.status),0===r.activeUploads&&(r.uploadedFiles=0,angular.isFunction(r.options.onCompletedAll)&&r.options.onCompletedAll(r.files))},a)for(d in a)a.hasOwnProperty(d)&&u.append(d,a[d]);return u.append(i,e,e.name),c.send(u),c}var r=this;return r.files=[],r.options={},r.activeUploads=0,r.uploadedFiles=0,{addFiles:a,getFiles:function(){return r.files},files:r.files,startUpload:n,removeFile:i,removeAll:function(){r.files.splice(0,r.files.length)},upload:function(e,s,o){var r=t.defer();return a(e),n({url:s,oncurrency:5,onProgress:function(e){o.onProgress&&o.onProgress(e)},onCompleted:function(e,t){i(e),r.resolve(t)}}),r.promise}}}function VoiceController(e,t,a,n){function i(){a.getResources("voice",e.currentPage,1==e.index).then(function(e){o.voices=e.items,o.pager=t.trustAsHtml(e.pager)})}function s(){e.uploadurl=0===e.index?"./index.php?c=utility&a=file&do=wechat_upload&upload_type=audio&mode=perm&uniacid="+e.uniacid:"./index.php?c=utility&a=file&do=upload&upload_type=audio&global="+e.global+"&dest_dir="+e.dest_dir+"&uniacid="+e.uniacid}e.resourceType="voice",n("we7resource-base-controller",{$scope:e}),e.uploadname="上传语音",e.accept="audio/amr,audio/mp3,audio/wma,audio/wmv,audio/amr";var o=this;o.$onInit=function(){o.multiple=!1},o.itemClick=function(t){if(!o.multiple)return e.needConvert()?void util.message("当前资源无法选择"):t.selected?void(t.selected=!1):(t.selected=!0,void e.$emit("selected_voice",t))},e.canConvert=function(e){return!1},e.loadData=function(){i()},e.onIndexChange=function(e){i(),s()},s(),e.$on("voice_page_change",function(t,a){e.setCurrentPage(a)}),o.timeToDate=function(e){return new Date(1e3*e)},o.getTitle=function(e){return o.isWechat?e.attachment:e.filename},i()}!function(e){"use strict";function t(e,t){return t=t||Error,function(){var a,n,i=arguments,s=i[0],o="["+(e?e+":":"")+s+"] ";for(o+=i[1].replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1)+2;return t<i.length?ve(i[t]):e}),o+="\nhttp://errors.angularjs.org/1.5.6/"+(e?e+"/":"")+s,n=2,a="?";n<i.length;n++,a="&")o+=a+"p"+(n-2)+"="+encodeURIComponent(ve(i[n]));return new t(o)}}function a(e){if(null==e||A(e))return!1;if(_n(e)||$(e)||bn&&e instanceof bn)return!0;var t="length"in Object(e)&&e.length;return x(t)&&(t>=0&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function n(e,t,i){var s,o;if(e)if(I(e))for(s in e)"prototype"==s||"length"==s||"name"==s||e.hasOwnProperty&&!e.hasOwnProperty(s)||t.call(i,e[s],s,e);else if(_n(e)||a(e)){var r="object"!=typeof e;for(s=0,o=e.length;s<o;s++)(r||s in e)&&t.call(i,e[s],s,e)}else if(e.forEach&&e.forEach!==n)e.forEach(t,i,e);else if(w(e))for(s in e)t.call(i,e[s],s,e);else if("function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else for(s in e)gn.call(e,s)&&t.call(i,e[s],s,e);return e}function i(e,t,a){for(var n=Object.keys(e).sort(),i=0;i<n.length;i++)t.call(a,e[n[i]],n[i]);return n}function s(e){return function(t,a){e(a,t)}}function o(){return++Mn}function r(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function l(e,t,a){for(var n=e.$$hashKey,i=0,s=t.length;i<s;++i){var o=t[i];if(y(o)||I(o))for(var c=Object.keys(o),u=0,d=c.length;u<d;u++){var p=c[u],m=o[p];a&&y(m)?k(m)?e[p]=new Date(m.valueOf()):S(m)?e[p]=new RegExp(m):m.nodeName?e[p]=m.cloneNode(!0):N(m)?e[p]=m.clone():(y(e[p])||(e[p]=_n(m)?[]:{}),l(e[p],[m],!0)):e[p]=m}}return r(e,n),e}function c(e){return l(e,$n.call(arguments,1),!1)}function u(e){return l(e,$n.call(arguments,1),!0)}function d(e){return parseInt(e,10)}function p(e,t){return c(Object.create(e),t)}function m(){}function g(e){return e}function f(e){return function(){return e}}function h(e){return I(e.toString)&&e.toString!==In}function v(e){return void 0===e}function b(e){return void 0!==e}function y(e){return null!==e&&"object"==typeof e}function w(e){return null!==e&&"object"==typeof e&&!Sn(e)}function $(e){return"string"==typeof e}function x(e){return"number"==typeof e}function k(e){return"[object Date]"===In.call(e)}function I(e){return"function"==typeof e}function S(e){return"[object RegExp]"===In.call(e)}function A(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function M(e){return"[object File]"===In.call(e)}function _(e){return"[object FormData]"===In.call(e)}function D(e){return"[object Blob]"===In.call(e)}function T(e){return"boolean"==typeof e}function E(e){return e&&I(e.then)}function P(e){return e&&x(e.length)&&Dn.test(In.call(e))}function j(e){return"[object ArrayBuffer]"===In.call(e)}function N(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function O(e){var t,a={},n=e.split(",");for(t=0;t<n.length;t++)a[n[t]]=!0;return a}function L(e){return fn(e.nodeName||e[0]&&e[0].nodeName)}function U(e,t){var a=e.indexOf(t);return a>=0&&e.splice(a,1),a}function B(e,t){function a(e,t){var a,n=t.$$hashKey;if(_n(e))for(var s=0,o=e.length;s<o;s++)t.push(i(e[s]));else if(w(e))for(a in e)t[a]=i(e[a]);else if(e&&"function"==typeof e.hasOwnProperty)for(a in e)e.hasOwnProperty(a)&&(t[a]=i(e[a]));else for(a in e)gn.call(e,a)&&(t[a]=i(e[a]));return r(t,n),t}function i(e){if(!y(e))return e;var t=o.indexOf(e);if(-1!==t)return l[t];if(A(e)||C(e))throw An("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var n=!1,i=s(e);return void 0===i&&(i=_n(e)?[]:Object.create(Sn(e)),n=!0),o.push(e),l.push(i),n?a(e,i):i}function s(e){switch(In.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(i(e.buffer));case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var a=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]);return a.lastIndex=e.lastIndex,a;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(I(e.cloneNode))return e.cloneNode(!0)}var o=[],l=[];if(t){if(P(t)||j(t))throw An("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw An("cpi","Can't copy! Source and destination are identical.");return _n(t)?t.length=0:n(t,function(e,a){"$$hashKey"!==a&&delete t[a]}),o.push(e),l.push(t),a(e,t)}return i(e)}function R(e,t){if(_n(e)){t=t||[];for(var a=0,n=e.length;a<n;a++)t[a]=e[a]}else if(y(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function z(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var a,n,i,s=typeof e;if(s==typeof t&&"object"==s){if(!_n(e)){if(k(e))return!!k(t)&&z(e.getTime(),t.getTime());if(S(e))return!!S(t)&&e.toString()==t.toString();if(C(e)||C(t)||A(e)||A(t)||_n(t)||k(t)||S(t))return!1;i=ge();for(n in e)if("$"!==n.charAt(0)&&!I(e[n])){if(!z(e[n],t[n]))return!1;i[n]=!0}for(n in t)if(!(n in i)&&"$"!==n.charAt(0)&&b(t[n])&&!I(t[n]))return!1;return!0}if(!_n(t))return!1;if((a=e.length)==t.length){for(n=0;n<a;n++)if(!z(e[n],t[n]))return!1;return!0}}return!1}function F(e,t,a){return e.concat($n.call(t,a))}function V(e,t){return $n.call(e,t||0)}function q(e,t){var a=arguments.length>2?V(arguments,2):[];return!I(t)||t instanceof RegExp?t:a.length?function(){return arguments.length?t.apply(e,F(a,arguments,0)):t.apply(e,a)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(t,a){var n=a;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?n=void 0:A(a)?n="$WINDOW":a&&e.document===a?n="$DOCUMENT":C(a)&&(n="$SCOPE"),n}function W(e,t){if(!v(e))return x(t)||(t=t?2:null),JSON.stringify(e,H,t)}function Y(e){return $(e)?JSON.parse(e):e}function G(e,t){e=e.replace(Nn,"");var a=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(a)?t:a}function Q(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}function K(e,t,a){a=a?-1:1;var n=e.getTimezoneOffset();return Q(e,a*(G(t,n)-n))}function J(e){e=bn(e).clone();try{e.empty()}catch(e){}var t=bn("<div>").append(e).html();try{return e[0].nodeType===Rn?fn(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+fn(t)})}catch(e){return fn(t)}}function Z(e){try{return decodeURIComponent(e)}catch(e){}}function X(e){var t={};return n((e||"").split("&"),function(e){var a,n,i;e&&(n=e=e.replace(/\+/g,"%20"),-1!==(a=e.indexOf("="))&&(n=e.substring(0,a),i=e.substring(a+1)),b(n=Z(n))&&(i=!b(i)||Z(i),gn.call(t,n)?_n(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i))}),t}function ee(e){var t=[];return n(e,function(e,a){_n(e)?n(e,function(e){t.push(ae(a,!0)+(!0===e?"":"="+ae(e,!0)))}):t.push(ae(a,!0)+(!0===e?"":"="+ae(e,!0)))}),t.length?t.join("&"):""}function te(e){return ae(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ae(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ne(e,t){var a,n,i=On.length;for(n=0;n<i;++n)if(a=On[n]+t,$(a=e.getAttribute(a)))return a;return null}function ie(e,t){var a,i,s={};n(On,function(t){var n=t+"app";!a&&e.hasAttribute&&e.hasAttribute(n)&&(a=e,i=e.getAttribute(n))}),n(On,function(t){var n,s=t+"app";!a&&(n=e.querySelector("["+s.replace(":","\\:")+"]"))&&(a=n,i=n.getAttribute(s))}),a&&(s.strictDi=null!==ne(a,"strict-di"),t(a,i?[i]:[],s))}function se(t,a,i){y(i)||(i={}),i=c({strictDi:!1},i);var s=function(){if((t=bn(t)).injector()){var n=t[0]===e.document?"document":J(t);throw An("btstrpd","App already bootstrapped with this element '{0}'",n.replace(/</,"&lt;").replace(/>/,"&gt;"))}(a=a||[]).unshift(["$provide",function(e){e.value("$rootElement",t)}]),i.debugInfoEnabled&&a.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),a.unshift("ng");var s=Ze(a,i.strictDi);return s.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,a,n){e.$apply(function(){t.data("$injector",n),a(t)(e)})}]),s},o=/^NG_ENABLE_DEBUG_INFO!/,r=/^NG_DEFER_BOOTSTRAP!/;if(e&&o.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(o,"")),e&&!r.test(e.name))return s();e.name=e.name.replace(r,""),Cn.resumeBootstrap=function(e){return n(e,function(e){a.push(e)}),s()},I(Cn.resumeDeferredBootstrap)&&Cn.resumeDeferredBootstrap()}function oe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function re(e){var t=Cn.element(e).injector();if(!t)throw An("test","no injector found for element argument to getTestability");return t.get("$$testability")}function le(e,t){return t=t||"_",e.replace(Ln,function(e,a){return(a?t:"")+e.toLowerCase()})}function ce(e,t,a){if(!e)throw An("areq","Argument '{0}' is {1}",t||"?",a||"required");return e}function ue(e,t,a){return a&&_n(e)&&(e=e[e.length-1]),ce(I(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function de(e,t){if("hasOwnProperty"===e)throw An("badname","hasOwnProperty is not a valid {0} name",t)}function pe(e,t,a){if(!t)return e;for(var n,i=t.split("."),s=e,o=i.length,r=0;r<o;r++)n=i[r],e&&(e=(s=e)[n]);return!a&&I(e)?q(s,e):e}function me(e){for(var t,a=e[0],n=e[e.length-1],i=1;a!==n&&(a=a.nextSibling);i++)(t||e[i]!==a)&&(t||(t=bn($n.call(e,0,i))),t.push(a));return t||e}function ge(){return Object.create(null)}function fe(e){function a(e,t,a){return e[t]||(e[t]=a())}var n=t("$injector"),i=t("ng"),s=a(e,"angular",Object);return s.$$minErr=s.$$minErr||t,a(s,"module",function(){var e={};return function(t,s,o){return function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)}(t,"module"),s&&e.hasOwnProperty(t)&&(e[t]=null),a(e,t,function(){function e(e,t,a,n){return n||(n=i),function(){return n[a||"push"]([e,t,arguments]),u}}function a(e,a){return function(n,s){return s&&I(s)&&(s.$$moduleName=t),i.push([e,a,arguments]),u}}if(!s)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",t);var i=[],r=[],l=[],c=e("$injector","invoke","push",r),u={_invokeQueue:i,_configBlocks:r,_runBlocks:l,requires:s,name:t,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:a("$provide","decorator"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),component:a("$compileProvider","component"),config:c,run:function(e){return l.push(e),this}};return o&&c(o),u})}})}function he(e){var t=[];return JSON.stringify(e,function(e,a){if(a=H(e,a),y(a)){if(t.indexOf(a)>=0)return"...";t.push(a)}return a})}function ve(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):v(e)?"undefined":"string"!=typeof e?he(e):e}function be(){return++Wn}function ye(e){return e.replace(Qn,function(e,t,a,n){return n?a.toUpperCase():a}).replace(Kn,"Moz$1")}function we(e){return!ei.test(e)}function $e(e){var t=e.nodeType;return t===Bn||!t||t===Fn}function xe(e,t){var a,i,s,o,r=t.createDocumentFragment(),l=[];if(we(e))l.push(t.createTextNode(e));else{for(a=a||r.appendChild(t.createElement("div")),i=(ti.exec(e)||["",""])[1].toLowerCase(),s=ni[i]||ni._default,a.innerHTML=s[1]+e.replace(ai,"<$1></$2>")+s[2],o=s[0];o--;)a=a.lastChild;l=F(l,a.childNodes),(a=r.firstChild).textContent=""}return r.textContent="",r.innerHTML="",n(l,function(e){r.appendChild(e)}),r}function ke(t,a){a=a||e.document;var n;return(n=Xn.exec(t))?[a.createElement(n[1])]:(n=xe(t,a))?n.childNodes:[]}function Ie(e,t){var a=e.parentNode;a&&a.replaceChild(t,e),t.appendChild(e)}function Se(e){if(e instanceof Se)return e;var t;if($(e)&&(e=Tn(e),t=!0),!(this instanceof Se)){if(t&&"<"!=e.charAt(0))throw Zn("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Se(e)}t?Ne(this,ke(e)):Ne(this,e)}function Ae(e){return e.cloneNode(!0)}function Ce(e,t){if(t||_e(e),e.querySelectorAll)for(var a=e.querySelectorAll("*"),n=0,i=a.length;n<i;n++)_e(a[n])}function Me(e,t,a,i){if(b(i))throw Zn("offargs","jqLite#off() does not support the `selector` argument");var s=De(e),o=s&&s.events,r=s&&s.handle;if(r)if(t){var l=function(t){var n=o[t];b(a)&&U(n||[],a),b(a)&&n&&n.length>0||(Gn(e,t,r),delete o[t])};n(t.split(" "),function(e){l(e),Jn[e]&&l(Jn[e])})}else for(t in o)"$destroy"!==t&&Gn(e,t,r),delete o[t]}function _e(e,t){var a=e.ng339,n=a&&Hn[a];if(n){if(t)return void delete n.data[t];n.handle&&(n.events.$destroy&&n.handle({},"$destroy"),Me(e)),delete Hn[a],e.ng339=void 0}}function De(e,t){var a=e.ng339,n=a&&Hn[a];return t&&!n&&(e.ng339=a=be(),n=Hn[a]={events:{},data:{},handle:void 0}),n}function Te(e,t,a){if($e(e)){var n=b(a),i=!n&&t&&!y(t),s=!t,o=De(e,!i),r=o&&o.data;if(n)r[t]=a;else{if(s)return r;if(i)return r&&r[t];c(r,t)}}}function Ee(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Pe(e,t){t&&e.setAttribute&&n(t.split(" "),function(t){e.setAttribute("class",Tn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Tn(t)+" "," ")))})}function je(e,t){if(t&&e.setAttribute){var a=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");n(t.split(" "),function(e){e=Tn(e),-1===a.indexOf(" "+e+" ")&&(a+=e+" ")}),e.setAttribute("class",Tn(a))}}function Ne(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var a=t.length;if("number"==typeof a&&t.window!==t){if(a)for(var n=0;n<a;n++)e[e.length++]=t[n]}else e[e.length++]=t}}function Oe(e,t){return Le(e,"$"+(t||"ngController")+"Controller")}function Le(e,t,a){e.nodeType==Fn&&(e=e.documentElement);for(var n=_n(t)?t:[t];e;){for(var i=0,s=n.length;i<s;i++)if(b(a=bn.data(e,n[i])))return a;e=e.parentNode||e.nodeType===Vn&&e.host}}function Ue(e){for(Ce(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Be(e,t){t||Ce(e);var a=e.parentNode;a&&a.removeChild(e)}function Re(t,a){"complete"===(a=a||e).document.readyState?a.setTimeout(t):bn(a).on("load",t)}function ze(e,t){var a=oi[t.toLowerCase()];return a&&ri[L(e)]&&a}function Fe(e){return li[e]}function Ve(e,t){var a=function(a,n){a.isDefaultPrevented=function(){return a.defaultPrevented};var i=t[n||a.type],s=i?i.length:0;if(s){if(v(a.immediatePropagationStopped)){var o=a.stopImmediatePropagation;a.stopImmediatePropagation=function(){a.immediatePropagationStopped=!0,a.stopPropagation&&a.stopPropagation(),o&&o.call(a)}}a.isImmediatePropagationStopped=function(){return!0===a.immediatePropagationStopped};var r=i.specialHandlerWrapper||qe;s>1&&(i=R(i));for(var l=0;l<s;l++)a.isImmediatePropagationStopped()||r(e,a,i[l])}};return a.elem=e,a}function qe(e,t,a){a.call(e,t)}function He(e,t,a){var n=t.relatedTarget;n&&(n===e||ii.call(e,n))||a.call(e,t)}function We(){this.$get=function(){return c(Se,{hasClass:function(e,t){return e.attr&&(e=e[0]),Ee(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),je(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Pe(e,t)}})}}function Ye(e,t){var a=e&&e.$$hashKey;if(a)return"function"==typeof a&&(a=e.$$hashKey()),a;var n=typeof e;return a="function"==n||"object"==n&&null!==e?e.$$hashKey=n+":"+(t||o)():n+":"+e}function Ge(e,t){if(t){var a=0;this.nextUid=function(){return++a}}n(e,this.put,this)}function Qe(e){return Function.prototype.toString.call(e)+" "}function Ke(e){var t=Qe(e).replace(gi,"");return t.match(ui)||t.match(di)}function Je(e){var t=Ke(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Ze(e,t){function a(e){return function(t,a){if(!y(t))return e(t,a);n(t,s(e))}}function i(e,t){if(de(e,"service"),(I(t)||_n(t))&&(t=h.instantiate(t)),!t.$get)throw fi("pget","Provider '{0}' must define $get factory method.",e);return g[e+d]=t}function o(e,t){return function(){var a=x.invoke(t,this);if(v(a))throw fi("undef","Provider '{0}' must return a value from $get factory method.",e);return a}}function r(e,t,a){return i(e,{$get:!1!==a?o(e,t):t})}function l(e){ce(v(e)||_n(e),"modulesToLoad","not an array");var t,a=[];return n(e,function(e){function n(e){var t,a;for(t=0,a=e.length;t<a;t++){var n=e[t],i=h.get(n[0]);i[n[1]].apply(i,n[2])}}if(!m.get(e)){m.put(e,!0);try{$(e)?(t=wn(e),a=a.concat(l(t.requires)).concat(t._runBlocks),n(t._invokeQueue),n(t._configBlocks)):I(e)?a.push(h.invoke(e)):_n(e)?a.push(h.invoke(e)):ue(e,"module")}catch(t){throw _n(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1==t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),fi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,t.stack||t.message||t)}}}),a}function c(e,a){function n(t,n){if(e.hasOwnProperty(t)){if(e[t]===u)throw fi("cdep","Circular dependency found: {0}",t+" <- "+p.join(" <- "));return e[t]}try{return p.unshift(t),e[t]=u,e[t]=a(t,n)}catch(a){throw e[t]===u&&delete e[t],a}finally{p.shift()}}function i(e,a,i){for(var s=[],o=Ze.$$annotate(e,t,i),r=0,l=o.length;r<l;r++){var c=o[r];if("string"!=typeof c)throw fi("itkn","Incorrect injection token! Expected service name as string, got {0}",c);s.push(a&&a.hasOwnProperty(c)?a[c]:n(c,i))}return s}function s(e){return!(vn<=11)&&("function"==typeof e&&/^(?:class\s|constructor\()/.test(Qe(e)))}return{invoke:function(e,t,a,n){"string"==typeof a&&(n=a,a=null);var o=i(e,a,n);return _n(e)&&(e=e[e.length-1]),s(e)?(o.unshift(null),new(Function.prototype.bind.apply(e,o))):e.apply(t,o)},instantiate:function(e,t,a){var n=_n(e)?e[e.length-1]:e,s=i(e,t,a);return s.unshift(null),new(Function.prototype.bind.apply(n,s))},get:n,annotate:Ze.$$annotate,has:function(t){return g.hasOwnProperty(t+d)||e.hasOwnProperty(t)}}}t=!0===t;var u={},d="Provider",p=[],m=new Ge([],!0),g={$provide:{provider:a(i),factory:a(r),service:a(function(e,t){return r(e,["$injector",function(e){return e.instantiate(t)}])}),value:a(function(e,t){return r(e,f(t),!1)}),constant:a(function(e,t){de(e,"constant"),g[e]=t,b[e]=t}),decorator:function(e,t){var a=h.get(e+d),n=a.$get;a.$get=function(){var e=x.invoke(n,a);return x.invoke(t,null,{$delegate:e})}}}},h=g.$injector=c(g,function(e,t){throw Cn.isString(t)&&p.push(t),fi("unpr","Unknown provider: {0}",p.join(" <- "))}),b={},w=c(b,function(e,t){var a=h.get(e+d,t);return x.invoke(a.$get,a,void 0,e)}),x=w;g["$injector"+d]={$get:f(w)};var k=l(e);return x=w.get("$injector"),x.strictDi=t,n(k,function(e){e&&x.invoke(e)}),x}function Xe(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,a,n){function i(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===L(e))return t=e,!0}),t}function s(){var e=r.yOffset;if(I(e))e=e();else if(N(e)){var a=e[0];e="fixed"!==t.getComputedStyle(a).position?0:a.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function o(e){if(e){e.scrollIntoView();var a=s();if(a){var n=e.getBoundingClientRect().top;t.scrollBy(0,n-a)}}else t.scrollTo(0,0)}function r(e){var t;(e=$(e)?e:a.hash())?(t=l.getElementById(e))?o(t):(t=i(l.getElementsByName(e)))?o(t):"top"===e&&o(null):o(null)}var l=t.document;return e&&n.$watch(function(){return a.hash()},function(e,t){e===t&&""===e||Re(function(){n.$evalAsync(r)})}),r}]}function et(e,t){return e||t?e?t?(_n(e)&&(e=e.join(" ")),_n(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function tt(e){for(var t=0;t<e.length;t++){var a=e[t];if(a.nodeType===vi)return a}}function at(e){$(e)&&(e=e.split(" "));var t=ge();return n(e,function(e){e.length&&(t[e]=!0)}),t}function nt(e){return y(e)?e:{}}function it(e,t,a,i){function s(e){try{e.apply(null,V(arguments,1))}finally{if(0==--b)for(;y.length;)try{y.pop()()}catch(e){a.error(e)}}}function o(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}function r(){I=null,l(),c()}function l(){w=S(),z(w=v(w)?null:w,M)&&(w=M),M=w}function c(){x===u.url()&&$===w||(x=u.url(),$=w,n(A,function(e){e(u.url(),w)}))}var u=this,d=e.location,p=e.history,g=e.setTimeout,f=e.clearTimeout,h={};u.isMock=!1;var b=0,y=[];u.$$completeOutstandingRequest=s,u.$$incOutstandingRequestCount=function(){b++},u.notifyWhenNoOutstandingRequests=function(e){0===b?e():y.push(e)};var w,$,x=d.href,k=t.find("base"),I=null,S=i.history?function(){try{return p.state}catch(e){}}:m;l(),$=w,u.url=function(t,a,n){if(v(n)&&(n=null),d!==e.location&&(d=e.location),p!==e.history&&(p=e.history),t){var s=$===n;if(x===t&&(!i.history||s))return u;var r=x&&Lt(x)===Lt(t);return x=t,$=n,!i.history||r&&s?(r||(I=t),a?d.replace(t):r?d.hash=o(t):d.href=t,d.href!==t&&(I=t)):(p[a?"replaceState":"pushState"](n,"",t),l(),$=w),I&&(I=t),u}return I||d.href.replace(/%27/g,"'")},u.state=function(){return w};var A=[],C=!1,M=null;u.onUrlChange=function(t){return C||(i.history&&bn(e).on("popstate",r),bn(e).on("hashchange",r),C=!0),A.push(t),t},u.$$applicationDestroyed=function(){bn(e).off("hashchange popstate",r)},u.$$checkUrlChange=c,u.baseHref=function(){var e=k.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},u.defer=function(e,t){var a;return b++,a=g(function(){delete h[a],s(e)},t||0),h[a]=!0,a},u.defer.cancel=function(e){return!!h[e]&&(delete h[e],f(e),s(m),!0)}}function st(){this.$get=["$window","$log","$sniffer","$document",function(e,t,a,n){return new it(e,n,t,a)}]}function ot(){this.$get=function(){function e(e,n){function i(e){e!=p&&(m?m==e&&(m=e.n):m=e,s(e.n,e.p),s(e,p),(p=e).n=null)}function s(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in a)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var o=0,r=c({},n,{id:e}),l=ge(),u=n&&n.capacity||Number.MAX_VALUE,d=ge(),p=null,m=null;return a[e]={put:function(e,t){if(!v(t))return u<Number.MAX_VALUE&&i(d[e]||(d[e]={key:e})),e in l||o++,l[e]=t,o>u&&this.remove(m.key),t},get:function(e){if(u<Number.MAX_VALUE){var t=d[e];if(!t)return;i(t)}return l[e]},remove:function(e){if(u<Number.MAX_VALUE){var t=d[e];if(!t)return;t==p&&(p=t.p),t==m&&(m=t.n),s(t.n,t.p),delete d[e]}e in l&&(delete l[e],o--)},removeAll:function(){l=ge(),o=0,d=ge(),p=m=null},destroy:function(){l=null,r=null,d=null,delete a[e]},info:function(){return c({},r,{size:o})}}}var a={};return e.info=function(){var e={};return n(a,function(t,a){e[a]=t.info()}),e},e.get=function(e){return a[e]},e}}function rt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function lt(t,a){function i(e,t,a){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,s=ge();return n(e,function(e,n){if(e in A)s[n]=A[e];else{var o=e.match(i);if(!o)throw Ii("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,n,e,a?"controller bindings definition":"isolate scope definition");s[n]={mode:o[1][0],collection:"*"===o[2],optional:"?"===o[3],attrName:o[4]||n},o[4]&&(A[e]=s[n])}}),s}function o(e,t){var a={isolateScope:null,bindToController:null};if(y(e.scope)&&(!0===e.bindToController?(a.bindToController=i(e.scope,t,!0),a.isolateScope={}):a.isolateScope=i(e.scope,t,!1)),y(e.bindToController)&&(a.bindToController=i(e.bindToController,t,!0)),y(a.bindToController)){var n=e.controller,s=e.controllerAs;if(!n)throw Ii("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!mt(n,s))throw Ii("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return a}function r(e){var t=e.charAt(0);if(!t||t!==fn(t))throw Ii("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Ii("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}function l(e){var t=e.require||e.controller&&e.name;return!_n(t)&&y(t)&&n(t,function(e,a){var n=e.match(k);e.substring(n[0].length)||(t[a]=n[0]+a)}),t}var u={},d="Directive",h=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,w=/(([\w\-]+)(?:\:([^;]+))?;?)/,x=O("ngSrc,ngSrcset,src,srcset"),k=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/,A=ge();this.directive=function e(a,i){return de(a,"directive"),$(a)?(r(a),ce(i,"directiveFactory"),u.hasOwnProperty(a)||(u[a]=[],t.factory(a+d,["$injector","$exceptionHandler",function(e,t){var i=[];return n(u[a],function(n,s){try{var o=e.invoke(n);I(o)?o={compile:f(o)}:!o.compile&&o.link&&(o.compile=f(o.link)),o.priority=o.priority||0,o.index=s,o.name=o.name||a,o.require=l(o),o.restrict=o.restrict||"EA",o.$$moduleName=n.$$moduleName,i.push(o)}catch(e){t(e)}}),i}])),u[a].push(i)):n(a,s(e)),this},this.component=function(e,t){function a(e){function a(t){return I(t)||_n(t)?function(a,n){return e.invoke(t,this,{$element:a,$attrs:n})}:t}var s=t.template||t.templateUrl?t.template:"",o={controller:i,controllerAs:mt(t.controller)||t.controllerAs||"$ctrl",template:a(s),templateUrl:a(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return n(t,function(e,t){"$"===t.charAt(0)&&(o[t]=e)}),o}var i=t.controller||function(){};return n(t,function(e,t){"$"===t.charAt(0)&&(a[t]=e,I(i)&&(i[t]=e))}),a.$inject=["$injector"],this.directive(e,a)},this.aHrefSanitizationWhitelist=function(e){return b(e)?(a.aHrefSanitizationWhitelist(e),this):a.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(a.imgSrcSanitizationWhitelist(e),this):a.imgSrcSanitizationWhitelist()};var M=!0;this.debugInfoEnabled=function(e){return b(e)?(M=e,this):M};var _=10;this.onChangesTtl=function(e){return arguments.length?(_=e,this):_},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,a,i,s,r,l,f,A,D,E){function P(){try{if(!--xe)throw be=void 0,Ii("infchng","{0} $onChanges() iterations reached. Aborting!\n",_);f.$apply(function(){for(var e=0,t=be.length;e<t;++e)be[e]();be=void 0})}finally{xe++}}function j(e,t){if(t){var a,n,i,s=Object.keys(t);for(a=0,n=s.length;a<n;a++)this[i=s[a]]=t[i]}else this.$attr={};this.$$element=e}function N(e,t,a){$e.innerHTML="<span "+t+">";var n=$e.firstChild.attributes,i=n[0];n.removeNamedItem(i.name),i.value=a,e.attributes.setNamedItem(i)}function O(e,t){try{e.addClass(t)}catch(e){}}function B(t,a,n,i,s){t instanceof bn||(t=bn(t));for(var o=/\S+/,r=0,l=t.length;r<l;r++){var c=t[r];c.nodeType===Rn&&c.nodeValue.match(o)&&Ie(c,t[r]=e.document.createElement("span"))}var u=F(t,a,t,n,i,s);B.$$addScopeClass(t);var d=null;return function(e,a,n){ce(e,"scope"),s&&s.needsNewScope&&(e=e.$parent.$new());var i=(n=n||{}).parentBoundTranscludeFn,o=n.transcludeControllers,r=n.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),d||(d=R(r));var l;if(l="html"!==d?bn(ue(d,bn("<div>").append(t).html())):a?si.clone.call(t):t,o)for(var c in o)l.data("$"+c+"Controller",o[c].instance);return B.$$addScopeInfo(l,e),a&&a(l,e),u&&u(e,l,l,i),l}}function R(e){var t=e&&e[0];return t&&"foreignobject"!==L(t)&&In.call(t).match(/SVG/)?"svg":"html"}function F(e,t,a,n,i,s){for(var o,r,l,c,u,d,p,m=[],g=0;g<e.length;g++)o=new j,(l=(r=W(e[g],[],o,0===g?n:void 0,i)).length?K(r,e[g],o,t,a,null,[],[],s):null)&&l.scope&&B.$$addScopeClass(o.$$element),u=l&&l.terminal||!(c=e[g].childNodes)||!c.length?null:F(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||u)&&(m.push(g,l,u),d=!0,p=p||l),s=null;return d?function(e,a,n,i){var s,o,r,l,c,u,d,g;if(p){var f=a.length;for(g=new Array(f),c=0;c<m.length;c+=3)g[d=m[c]]=a[d]}else g=a;for(c=0,u=m.length;c<u;)r=g[m[c++]],s=m[c++],o=m[c++],s?(s.scope?(l=e.$new(),B.$$addScopeInfo(bn(r),l)):l=e,s(o,l,r,n,s.transcludeOnThisElement?H(e,s.transclude,i):!s.templateOnThisElement&&i?i:!i&&t?H(e,t):null)):o&&o(e,r.childNodes,void 0,i)}:null}function H(e,t,a){function n(n,i,s,o,r){return n||((n=e.$new(!1,r)).$$transcluded=!0),t(n,i,{parentBoundTranscludeFn:a,transcludeControllers:s,futureParentElement:o})}var i=n.$$slots=ge();for(var s in t.$$slots)t.$$slots[s]?i[s]=H(e,t.$$slots[s],a):i[s]=null;return n}function W(e,t,a,n,i){var s,o,r=e.nodeType,l=a.$attr;switch(r){case Bn:te(t,ut(L(e)),"E",n,i);for(var c,u,d,p,m,g,f=e.attributes,v=0,b=f&&f.length;v<b;v++){var x=!1,k=!1;u=(c=f[v]).name,m=Tn(c.value),p=ut(u),(g=Me.test(p))&&(u=u.replace(Ai,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var I=p.match(_e);I&&ae(I[1])&&(x=u,k=u.substr(0,u.length-5)+"end",u=u.substr(0,u.length-6)),l[d=ut(u.toLowerCase())]=u,!g&&a.hasOwnProperty(d)||(a[d]=m,ze(e,d)&&(a[d]=!0)),pe(e,t,m,d,g),te(t,d,"A",n,i,x,k)}if(o=e.className,y(o)&&(o=o.animVal),$(o)&&""!==o)for(;s=w.exec(o);)te(t,d=ut(s[2]),"C",n,i)&&(a[d]=Tn(s[3])),o=o.substr(s.index+s[0].length);break;case Rn:if(11===vn)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Rn;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);re(t,e.nodeValue);break;case zn:try{(s=h.exec(e.nodeValue))&&te(t,d=ut(s[1]),"M",n,i)&&(a[d]=Tn(s[2]))}catch(e){}}return t.sort(se),t}function Y(e,t,a){var n=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw Ii("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,a);e.nodeType==Bn&&(e.hasAttribute(t)&&i++,e.hasAttribute(a)&&i--),n.push(e),e=e.nextSibling}while(i>0);else n.push(e);return bn(n)}function G(e,t,a){return function(n,i,s,o,r){return i=Y(i[0],t,a),e(n,i,s,o,r)}}function Q(e,t,a,n,i,s){var o;return e?B(t,a,n,i,s):function(){return o||(o=B(t,a,n,i,s),t=a=s=null),o.apply(this,arguments)}}function K(e,t,a,s,o,r,l,u,d){function p(e,t,a,n){e&&(a&&(e=G(e,a,n)),e.require=g.require,e.directiveName=f,(S===g||g.$$isolateScope)&&(e=fe(e,{isolateScope:!0})),l.push(e)),t&&(a&&(t=G(t,a,n)),t.require=g.require,t.directiveName=f,(S===g||g.$$isolateScope)&&(t=fe(t,{isolateScope:!0})),u.push(t))}function m(e,i,s,o,r){var d,p,m,g,f,h,b,w,$,M;t===s?($=a,w=a.$$element):$=new j(w=bn(s),a),f=i,S?g=i.$new(!0):x&&(f=i.$parent),r&&((b=function(e,t,a,n){var i;if(C(e)||(n=a,a=t,t=e,e=void 0),T&&(i=h),a||(a=T?w.parent():w),!n)return r(e,t,i,a,O);var s=r.$$slots[n];if(s)return s(e,t,i,a,O);if(v(s))throw Ii("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',n,J(w))}).$$boundTransclude=r,b.isSlotFilled=function(e){return!!r.$$slots[e]}),k&&(h=X(w,$,b,k,g,i,S)),S&&(B.$$addScopeInfo(w,g,!0,!(A&&(A===S||A===S.$$originalDirective))),B.$$addScopeClass(w,!0),g.$$isolateBindings=S.$$isolateBindings,(M=ve(i,$,g,g.$$isolateBindings,S)).removeWatches&&g.$on("$destroy",M.removeWatches));for(var _ in h){var D=k[_],E=h[_],P=D.$$bindings.bindToController;E.identifier&&P?E.bindingInfo=ve(f,$,E.instance,P,D):E.bindingInfo={};var N=E();N!==E.instance&&(E.instance=N,w.data("$"+D.name+"Controller",N),E.bindingInfo.removeWatches&&E.bindingInfo.removeWatches(),E.bindingInfo=ve(f,$,E.instance,P,D))}for(n(k,function(e,t){var a=e.require;e.bindToController&&!_n(a)&&y(a)&&c(h[t].instance,Z(t,a,w,h))}),n(h,function(e){var t=e.instance;I(t.$onChanges)&&t.$onChanges(e.bindingInfo.initialChanges),I(t.$onInit)&&t.$onInit(),I(t.$onDestroy)&&f.$on("$destroy",function(){t.$onDestroy()})}),d=0,p=l.length;d<p;d++)he(m=l[d],m.isolateScope?g:i,w,$,m.require&&Z(m.directiveName,m.require,w,h),b);var O=i;for(S&&(S.template||null===S.templateUrl)&&(O=g),e&&e(O,s.childNodes,void 0,r),d=u.length-1;d>=0;d--)he(m=u[d],m.isolateScope?g:i,w,$,m.require&&Z(m.directiveName,m.require,w,h),b);n(h,function(e){var t=e.instance;I(t.$postLink)&&t.$postLink()})}d=d||{};for(var g,f,h,b,w,$=-Number.MAX_VALUE,x=d.newScopeDirective,k=d.controllerDirectives,S=d.newIsolateScopeDirective,A=d.templateDirective,M=d.nonTlbTranscludeDirective,_=!1,D=!1,T=d.hasElementTranscludeDirective,E=a.$$element=bn(t),P=r,N=s,O=!1,U=!1,R=0,z=e.length;R<z;R++){var F=(g=e[R]).$$start,H=g.$$end;if(F&&(E=Y(t,F,H)),h=void 0,$>g.priority)break;if((w=g.scope)&&(g.templateUrl||(y(w)?(oe("new/isolated scope",S||x,g,E),S=g):oe("new/isolated scope",S,g,E)),x=x||g),f=g.name,!O&&(g.replace&&(g.templateUrl||g.template)||g.transclude&&!g.$$tlb)){for(var K,te=R+1;K=e[te++];)if(K.transclude&&!K.$$tlb||K.replace&&(K.templateUrl||K.template)){U=!0;break}O=!0}if(!g.templateUrl&&g.controller&&(w=g.controller,k=k||ge(),oe("'"+f+"' controller",k[f],g,E),k[f]=g),w=g.transclude)if(_=!0,g.$$tlb||(oe("transclusion",M,g,E),M=g),"element"==w)T=!0,$=g.priority,h=E,E=a.$$element=bn(B.$$createComment(f,a[f])),t=E[0],me(o,V(h),t),h[0].$$parentNode=h[0].parentNode,N=Q(U,h,s,$,P&&P.name,{nonTlbTranscludeDirective:M});else{var ae=ge();if(h=bn(Ae(t)).contents(),y(w)){h=[];var se=ge(),re=ge();n(w,function(e,t){var a="?"===e.charAt(0);e=a?e.substring(1):e,se[e]=t,ae[t]=null,re[t]=a}),n(E.contents(),function(e){var t=se[ut(L(e))];t?(re[t]=!0,ae[t]=ae[t]||[],ae[t].push(e)):h.push(e)}),n(re,function(e,t){if(!e)throw Ii("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var le in ae)ae[le]&&(ae[le]=Q(U,ae[le],s))}E.empty(),(N=Q(U,h,s,void 0,void 0,{needsNewScope:g.$$isolateScope||g.$$newScope})).$$slots=ae}if(g.template)if(D=!0,oe("template",A,g,E),A=g,w=I(g.template)?g.template(E,a):g.template,w=Ce(w),g.replace){if(P=g,h=we(w)?[]:pt(ue(g.templateNamespace,Tn(w))),t=h[0],1!=h.length||t.nodeType!==Bn)throw Ii("tplrt","Template for directive '{0}' must have exactly one root element. {1}",f,"");me(o,E,t);var ce={$attr:{}},de=W(t,[],ce),pe=e.splice(R+1,e.length-(R+1));(S||x)&&ee(de,S,x),e=e.concat(de).concat(pe),ne(a,ce),z=e.length}else E.html(w);if(g.templateUrl)D=!0,oe("template",A,g,E),A=g,g.replace&&(P=g),m=ie(e.splice(R,e.length-R),E,a,o,_&&N,l,u,{controllerDirectives:k,newScopeDirective:x!==g&&x,newIsolateScopeDirective:S,templateDirective:A,nonTlbTranscludeDirective:M}),z=e.length;else if(g.compile)try{b=g.compile(E,a,N);var be=g.$$originalDirective||g;I(b)?p(null,q(be,b),F,H):b&&p(q(be,b.pre),q(be,b.post),F,H)}catch(e){i(e,J(E))}g.terminal&&(m.terminal=!0,$=Math.max($,g.priority))}return m.scope=x&&!0===x.scope,m.transcludeOnThisElement=_,m.templateOnThisElement=D,m.transclude=N,d.hasElementTranscludeDirective=T,m}function Z(e,t,a,i){var s;if($(t)){var o=t.match(k),r=t.substring(o[0].length),l=o[1]||o[3],c="?"===o[2];if("^^"===l?a=a.parent():(s=i&&i[r],s=s&&s.instance),!s){var u="$"+r+"Controller";s=l?a.inheritedData(u):a.data(u)}if(!s&&!c)throw Ii("ctreq","Controller '{0}', required by directive '{1}', can't be found!",r,e)}else if(_n(t)){s=[];for(var d=0,p=t.length;d<p;d++)s[d]=Z(e,t[d],a,i)}else y(t)&&(s={},n(t,function(t,n){s[n]=Z(e,t,a,i)}));return s||null}function X(e,t,a,n,i,s,o){var r=ge();for(var c in n){var u=n[c],d={$scope:u===o||u.$$isolateScope?i:s,$element:e,$attrs:t,$transclude:a},p=u.controller;"@"==p&&(p=t[u.name]);var m=l(p,d,!0,u.controllerAs);r[u.name]=m,e.data("$"+u.name+"Controller",m.instance)}return r}function ee(e,t,a){for(var n=0,i=e.length;n<i;n++)e[n]=p(e[n],{$$isolateScope:t,$$newScope:a})}function te(e,a,n,s,r,l,c){if(a===r)return null;var m=null;if(u.hasOwnProperty(a))for(var g,f=t.get(a+d),h=0,b=f.length;h<b;h++)try{if(g=f[h],(v(s)||s>g.priority)&&-1!=g.restrict.indexOf(n)){if(l&&(g=p(g,{$$start:l,$$end:c})),!g.$$bindings){var w=g.$$bindings=o(g,g.name);y(w.isolateScope)&&(g.$$isolateBindings=w.isolateScope)}e.push(g),m=g}}catch(e){i(e)}return m}function ae(e){if(u.hasOwnProperty(e))for(var a=t.get(e+d),n=0,i=a.length;n<i;n++)if(a[n].multiElement)return!0;return!1}function ne(e,t){var a=t.$attr,i=e.$attr,s=e.$$element;n(e,function(n,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==n&&(n+=("style"===i?";":" ")+t[i]),e.$set(i,n,!0,a[i]))}),n(t,function(t,n){"class"==n?(O(s,t),e.class=(e.class?e.class+" ":"")+t):"style"==n?(s.attr("style",s.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==n.charAt(0)||e.hasOwnProperty(n)||(e[n]=t,i[n]=a[n])})}function ie(e,t,a,i,o,r,l,c){var u,d,m=[],g=t[0],f=e.shift(),h=p(f,{templateUrl:null,transclude:null,replace:null,$$originalDirective:f}),v=I(f.templateUrl)?f.templateUrl(t,a):f.templateUrl,b=f.templateNamespace;return t.empty(),s(v).then(function(s){var p,w,$,x;if(s=Ce(s),f.replace){if($=we(s)?[]:pt(ue(b,Tn(s))),p=$[0],1!=$.length||p.nodeType!==Bn)throw Ii("tplrt","Template for directive '{0}' must have exactly one root element. {1}",f.name,v);w={$attr:{}},me(i,t,p);var k=W(p,[],w);y(f.scope)&&ee(k,!0),e=k.concat(e),ne(a,w)}else p=g,t.html(s);for(e.unshift(h),u=K(e,p,a,o,t,f,r,l,c),n(i,function(e,a){e==p&&(i[a]=t[0])}),d=F(t[0].childNodes,o);m.length;){var I=m.shift(),S=m.shift(),A=m.shift(),C=m.shift(),M=t[0];if(!I.$$destroyed){if(S!==g){var _=S.className;c.hasElementTranscludeDirective&&f.replace||(M=Ae(p)),me(A,bn(S),M),O(bn(M),_)}x=u.transcludeOnThisElement?H(I,u.transclude,C):C,u(d,I,M,i,x)}}m=null}),function(e,t,a,n,i){var s=i;t.$$destroyed||(m?m.push(t,a,n,s):(u.transcludeOnThisElement&&(s=H(t,u.transclude,i)),u(d,t,a,n,s)))}}function se(e,t){var a=t.priority-e.priority;return 0!==a?a:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function oe(e,t,a,n){function i(e){return e?" (module: "+e+")":""}if(t)throw Ii("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),a.name,i(a.$$moduleName),e,J(n))}function re(e,t){var n=a(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),a=!!t.length;return a&&B.$$addBindingClass(t),function(e,t){var i=t.parent();a||B.$$addBindingClass(i),B.$$addBindingInfo(i,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}function ue(t,a){switch(t=fn(t||"html")){case"svg":case"math":var n=e.document.createElement("div");return n.innerHTML="<"+t+">"+a+"</"+t+">",n.childNodes[0].childNodes;default:return a}}function de(e,t){if("srcdoc"==t)return A.HTML;var a=L(e);return"xlinkHref"==t||"form"==a&&"action"==t||"img"!=a&&("src"==t||"ngSrc"==t)?A.RESOURCE_URL:void 0}function pe(e,t,n,i,s){var o=de(e,i);s=x[i]||s;var r=a(n,!0,o,s);if(r){if("multiple"===i&&"select"===L(e))throw Ii("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",J(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var c=l.$$observers||(l.$$observers=ge());if(S.test(i))throw Ii("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var u=l[i];u!==n&&(r=u&&a(u,!0,o,s),n=u),r&&(l[i]=r(e),(c[i]||(c[i]=[])).$$inter=!0,(l.$$observers&&l.$$observers[i].$$scope||e).$watch(r,function(e,t){"class"===i&&e!=t?l.$updateClass(e,t):l.$set(i,e)}))}}}})}}function me(t,a,n){var i,s,o=a[0],r=a.length,l=o.parentNode;if(t)for(i=0,s=t.length;i<s;i++)if(t[i]==o){t[i++]=n;for(var c=i,u=c+r-1,d=t.length;c<d;c++,u++)u<d?t[c]=t[u]:delete t[c];t.length-=r-1,t.context===o&&(t.context=n);break}l&&l.replaceChild(n,o);var p=e.document.createDocumentFragment();for(i=0;i<r;i++)p.appendChild(a[i]);for(bn.hasData(o)&&(bn.data(n,bn.data(o)),bn(o).off("$destroy")),bn.cleanData(p.querySelectorAll("*")),i=1;i<r;i++)delete a[i];a[0]=n,a.length=1}function fe(e,t){return c(function(){return e.apply(null,arguments)},e,t)}function he(e,t,a,n,s,o){try{e(t,a,n,s,o)}catch(e){i(e,J(a))}}function ve(e,t,i,s,o){function l(t,a,n){I(i.$onChanges)&&a!==n&&(be||(e.$$postDigest(P),be=[]),u||(u={},be.push(c)),u[t]&&(n=u[t].previousValue),u[t]=new ct(n,a))}function c(){i.$onChanges(u),u=void 0}var u,d=[],p={};return n(s,function(n,s){var c,u,g,f,h,v=n.attrName,b=n.optional;switch(n.mode){case"@":b||gn.call(t,v)||(i[s]=t[v]=void 0),t.$observe(v,function(e){if($(e)||T(e)){var t=i[s];l(s,e,t),i[s]=e}}),t.$$observers[v].$$scope=e,$(c=t[v])?i[s]=a(c)(e):T(c)&&(i[s]=c),p[s]=new ct(Si,i[s]);break;case"=":if(!gn.call(t,v)){if(b)break;t[v]=void 0}if(b&&!t[v])break;u=r(t[v]),f=u.literal?z:function(e,t){return e===t||e!==e&&t!==t},g=u.assign||function(){throw c=i[s]=u(e),Ii("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[v],v,o.name)},c=i[s]=u(e);var y=function(t){return f(t,i[s])||(f(t,c)?g(e,t=i[s]):i[s]=t),c=t};y.$stateful=!0,h=n.collection?e.$watchCollection(t[v],y):e.$watch(r(t[v],y),null,u.literal),d.push(h);break;case"<":if(!gn.call(t,v)){if(b)break;t[v]=void 0}if(b&&!t[v])break;u=r(t[v]);var w=i[s]=u(e);p[s]=new ct(Si,i[s]),h=e.$watch(u,function(e,t){if(t===e){if(t===w)return;t=w}l(s,e,t),i[s]=e},u.literal),d.push(h);break;case"&":if((u=t.hasOwnProperty(v)?r(t[v]):m)===m&&b)break;i[s]=function(t){return u(e,t)}}}),{initialChanges:p,removeWatches:d.length&&function(){for(var e=0,t=d.length;e<t;++e)d[e]()}}}var be,ye=/^\w/,$e=e.document.createElement("div"),xe=_;j.prototype={$normalize:ut,$addClass:function(e){e&&e.length>0&&D.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&D.removeClass(this.$$element,e)},$updateClass:function(e,t){var a=dt(e,t);a&&a.length&&D.addClass(this.$$element,a);var n=dt(t,e);n&&n.length&&D.removeClass(this.$$element,n)},$set:function(e,t,a,s){var o,r=ze(this.$$element[0],e),l=Fe(e),c=e;if(r?(this.$$element.prop(e,t),s=r):l&&(this[l]=t,c=l),this[e]=t,s?this.$attr[e]=s:(s=this.$attr[e])||(this.$attr[e]=s=le(e,"-")),"a"===(o=L(this.$$element))&&("href"===e||"xlinkHref"===e)||"img"===o&&"src"===e)this[e]=t=E(t,"src"===e);else if("img"===o&&"srcset"===e&&b(t)){for(var u="",d=Tn(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,m=/\s/.test(d)?p:/(,)/,g=d.split(m),f=Math.floor(g.length/2),h=0;h<f;h++){var y=2*h;u+=E(Tn(g[y]),!0),u+=" "+Tn(g[y+1])}var w=Tn(g[2*h]).split(/\s/);u+=E(Tn(w[0]),!0),2===w.length&&(u+=" "+Tn(w[1])),this[e]=t=u}!1!==a&&(null===t||v(t)?this.$$element.removeAttr(s):ye.test(s)?this.$$element.attr(s,t):N(this.$$element[0],s,t));var $=this.$$observers;$&&n($[c],function(e){try{e(t)}catch(e){i(e)}})},$observe:function(e,t){var a=this,n=a.$$observers||(a.$$observers=ge()),i=n[e]||(n[e]=[]);return i.push(t),f.$evalAsync(function(){i.$$inter||!a.hasOwnProperty(e)||v(a[e])||t(a[e])}),function(){U(i,t)}}};var ke=a.startSymbol(),Se=a.endSymbol(),Ce="{{"==ke&&"}}"==Se?g:function(e){return e.replace(/\{\{/g,ke).replace(/}}/g,Se)},Me=/^ngAttr[A-Z]/,_e=/^(.+)Start$/;return B.$$addBindingInfo=M?function(e,t){var a=e.data("$binding")||[];_n(t)?a=a.concat(t):a.push(t),e.data("$binding",a)}:m,B.$$addBindingClass=M?function(e){O(e,"ng-binding")}:m,B.$$addScopeInfo=M?function(e,t,a,n){var i=a?n?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:m,B.$$addScopeClass=M?function(e,t){O(e,t?"ng-isolate-scope":"ng-scope")}:m,B.$$createComment=function(t,a){var n="";return M&&(n=" "+(t||"")+": ",a&&(n+=a+" ")),e.document.createComment(n)},B}]}function ct(e,t){this.previousValue=e,this.currentValue=t}function ut(e){return ye(e.replace(Ai,""))}function dt(e,t){var a="",n=e.split(/\s+/),i=t.split(/\s+/);e:for(var s=0;s<n.length;s++){for(var o=n[s],r=0;r<i.length;r++)if(o==i[r])continue e;a+=(a.length>0?" ":"")+o}return a}function pt(e){var t=(e=bn(e)).length;if(t<=1)return e;for(;t--;)e[t].nodeType===zn&&xn.call(e,t,1);return e}function mt(e,t){if(t&&$(t))return t;if($(e)){var a=Mi.exec(e);if(a)return a[3]}}function gt(){var e={},a=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,a){de(t,"controller"),y(t)?c(e,t):e[t]=a},this.allowGlobals=function(){a=!0},this.$get=["$injector","$window",function(n,i){function s(e,a,n,i){if(!e||!y(e.$scope))throw t("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,a);e.$scope[a]=n}return function(t,o,r,l){var u,d,p,m;if(r=!0===r,l&&$(l)&&(m=l),$(t)){if(!(d=t.match(Mi)))throw Ci("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);p=d[1],m=m||d[3],ue(t=e.hasOwnProperty(p)?e[p]:pe(o.$scope,p,!0)||(a?pe(i,p,!0):void 0),p,!0)}if(r){var g=(_n(t)?t[t.length-1]:t).prototype;u=Object.create(g||null),m&&s(o,m,u,p||t.name);return c(function(){var e=n.invoke(t,u,o,p);return e!==u&&(y(e)||I(e))&&(u=e,m&&s(o,m,u,p||t.name)),u},{instance:u,identifier:m})}return u=n.instantiate(t,o,p),m&&s(o,m,u,p||t.name),u}}]}function ft(){this.$get=["$window",function(e){return bn(e.document)}]}function ht(){this.$get=["$log",function(e){return function(t,a){e.error.apply(e,arguments)}}]}function vt(e){return y(e)?k(e)?e.toISOString():W(e):e}function bt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,a){null===e||v(e)||(_n(e)?n(e,function(e){t.push(ae(a)+"="+ae(vt(e)))}):t.push(ae(a)+"="+ae(vt(e))))}),t.join("&")}}}function yt(){this.$get=function(){return function(e){function t(e,s,o){null===e||v(e)||(_n(e)?n(e,function(e,a){t(e,s+"["+(y(e)?a:"")+"]")}):y(e)&&!k(e)?i(e,function(e,a){t(e,s+(o?"":"[")+a+(o?"":"]"))}):a.push(ae(s)+"="+ae(vt(e))))}if(!e)return"";var a=[];return t(e,"",!0),a.join("&")}}}function wt(e,t){if($(e)){var a=e.replace(ji,"").trim();if(a){var n=t("Content-Type");(n&&0===n.indexOf(Di)||$t(a))&&(e=Y(a))}}return e}function $t(e){var t=e.match(Ei);return t&&Pi[t[0]].test(e)}function xt(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var a,i=ge();return $(e)?n(e.split("\n"),function(e){a=e.indexOf(":"),t(fn(Tn(e.substr(0,a))),Tn(e.substr(a+1)))}):y(e)&&n(e,function(e,a){t(fn(a),Tn(e))}),i}function kt(e){var t;return function(a){if(t||(t=xt(e)),a){var n=t[fn(a)];return void 0===n&&(n=null),n}return t}}function It(e,t,a,i){return I(i)?i(e,t,a):(n(i,function(n){e=n(e,t,a)}),e)}function St(e){return 200<=e&&e<300}function At(){var e=this.defaults={transformResponse:[wt],transformRequest:[function(e){return!y(e)||M(e)||D(e)||_(e)?e:W(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:R(Ti),put:R(Ti),patch:R(Ti)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},a=!1;this.useApplyAsync=function(e){return b(e)?(a=!!e,this):a};var i=!0;this.useLegacyPromiseExtensions=function(e){return b(e)?(i=!!e,this):i};var s=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(o,r,l,u,d,p){function m(a){function s(e){var t=c({},e);return t.data=It(e.data,e.headers,e.status,r.transformResponse),St(e.status)?t:d.reject(t)}function o(e,t){var a,i={};return n(e,function(e,n){I(e)?null!=(a=e(t))&&(i[n]=a):i[n]=e}),i}if(!y(a))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",a);if(!$(a.url))throw t("$http")("badreq","Http request configuration url must be a string. Received: {0}",a.url);var r=c({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},a);r.headers=function(t){var a,n,i,s=e.headers,r=c({},t.headers);s=c({},s.common,s[fn(t.method)]);e:for(a in s){n=fn(a);for(i in r)if(fn(i)===n)continue e;r[a]=s[a]}return o(r,R(t))}(a),r.method=hn(r.method),r.paramSerializer=$(r.paramSerializer)?p.get(r.paramSerializer):r.paramSerializer;var l=[function(t){var a=t.headers,i=It(t.data,kt(a),void 0,t.transformRequest);return v(i)&&n(a,function(e,t){"content-type"===fn(t)&&delete a[t]}),v(t.withCredentials)&&!v(e.withCredentials)&&(t.withCredentials=e.withCredentials),g(t,i).then(s,s)},void 0],u=d.when(r);for(n(w,function(e){(e.request||e.requestError)&&l.unshift(e.request,e.requestError),(e.response||e.responseError)&&l.push(e.response,e.responseError)});l.length;){var m=l.shift(),f=l.shift();u=u.then(m,f)}return i?(u.success=function(e){return ue(e,"fn"),u.then(function(t){e(t.data,t.status,t.headers,r)}),u},u.error=function(e){return ue(e,"fn"),u.then(null,function(t){e(t.data,t.status,t.headers,r)}),u}):(u.success=Oi("success"),u.error=Oi("error")),u}function g(t,i){function s(e){if(e){var t={};return n(e,function(e,n){t[n]=function(t){function n(){e(t)}a?u.$applyAsync(n):u.$$phase?n():u.$apply(n)}}),t}}function l(e,a,n,i){(St(a=a>=-1?a:0)?$.resolve:$.reject)({data:e,status:a,headers:kt(n),config:t,statusText:i})}function c(e){l(e.data,e.status,R(e.headers()),e.statusText)}function p(){var e=m.pendingRequests.indexOf(t);-1!==e&&m.pendingRequests.splice(e,1)}var g,w,$=d.defer(),x=$.promise,k=t.headers,I=f(t.url,t.paramSerializer(t.params));if(m.pendingRequests.push(t),x.then(p,p),!t.cache&&!e.cache||!1===t.cache||"GET"!==t.method&&"JSONP"!==t.method||(g=y(t.cache)?t.cache:y(e.cache)?e.cache:h),g&&(b(w=g.get(I))?E(w)?w.then(c,c):_n(w)?l(w[1],w[0],R(w[2]),w[3]):l(w,200,{},"OK"):g.put(I,x)),v(w)){var S=Ma(t.url)?r()[t.xsrfCookieName||e.xsrfCookieName]:void 0;S&&(k[t.xsrfHeaderName||e.xsrfHeaderName]=S),o(t.method,I,i,function(e,t,n,i){function s(){l(t,e,n,i)}g&&(St(e)?g.put(I,[e,t,xt(n),i]):g.remove(I)),a?u.$applyAsync(s):(s(),u.$$phase||u.$apply())},k,t.timeout,t.withCredentials,t.responseType,s(t.eventHandlers),s(t.uploadEventHandlers))}return x}function f(e,t){return t.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+t),e}var h=l("$http");e.paramSerializer=$(e.paramSerializer)?p.get(e.paramSerializer):e.paramSerializer;var w=[];return n(s,function(e){w.unshift($(e)?p.get(e):p.invoke(e))}),m.pendingRequests=[],function(e){n(arguments,function(e){m[e]=function(t,a){return m(c({},a||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){n(arguments,function(e){m[e]=function(t,a,n){return m(c({},n||{},{method:e,url:t,data:a}))}})}("post","put","patch"),m.defaults=e,m}]}function Ct(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Mt(){this.$get=["$browser","$window","$document","$xhrFactory",function(e,t,a,n){return _t(e,n,e.defer,t.angular.callbacks,a[0])}]}function _t(e,t,a,i,s){function o(e,t,a){var n=s.createElement("script"),o=null;return n.type="text/javascript",n.src=e,n.async=!0,o=function(e){Gn(n,"load",o),Gn(n,"error",o),s.body.removeChild(n),n=null;var r=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,r="error"===e.type?404:200),a&&a(r,l)},Yn(n,"load",o),Yn(n,"error",o),s.body.appendChild(n),o}return function(s,r,l,c,u,d,p,g,f,h){function y(){x&&x(),k&&k.abort()}function w(t,n,i,s,o){b(S)&&a.cancel(S),x=k=null,t(n,i,s,o),e.$$completeOutstandingRequest(m)}if(e.$$incOutstandingRequestCount(),r=r||e.url(),"jsonp"==fn(s)){var $="_"+(i.counter++).toString(36);i[$]=function(e){i[$].data=e,i[$].called=!0};var x=o(r.replace("JSON_CALLBACK","angular.callbacks."+$),$,function(e,t){w(c,e,i[$].data,"",t),i[$]=m})}else{var k=t(s,r);k.open(s,r,!0),n(u,function(e,t){b(e)&&k.setRequestHeader(t,e)}),k.onload=function(){var e=k.statusText||"",t="response"in k?k.response:k.responseText,a=1223===k.status?204:k.status;0===a&&(a=t?200:"file"==Ca(r).protocol?404:0),w(c,a,t,k.getAllResponseHeaders(),e)};var I=function(){w(c,-1,null,null,"")};if(k.onerror=I,k.onabort=I,n(f,function(e,t){k.addEventListener(t,e)}),n(h,function(e,t){k.upload.addEventListener(t,e)}),p&&(k.withCredentials=!0),g)try{k.responseType=g}catch(e){if("json"!==g)throw e}k.send(v(l)?null:l)}if(d>0)var S=a(y,d);else E(d)&&d.then(y)}}function Dt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(a,n,i){function s(e){return"\\\\\\"+e}function o(a){return a.replace(m,e).replace(g,t)}function r(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=W(e)}return e}function l(e,t,a,n){var i;return i=e.$watch(function(e){return i(),n(e)},t,a)}function u(s,u,m,g){if(!s.length||-1===s.indexOf(e)){var h;return u||((h=f(o(s))).exp=s,h.expressions=[],h.$$watchDelegate=l),h}g=!!g;for(var y,w,$,x=0,k=[],S=[],A=s.length,C=[],M=[];x<A;){if(-1==(y=s.indexOf(e,x))||-1==(w=s.indexOf(t,y+d))){x!==A&&C.push(o(s.substring(x)));break}x!==y&&C.push(o(s.substring(x,y))),$=s.substring(y+d,w),k.push($),S.push(a($,function(e){try{return e=D(e),g&&!b(e)?e:r(e)}catch(e){n(Li.interr(s,e))}})),x=w+p,M.push(C.length),C.push("")}if(m&&C.length>1&&Li.throwNoconcat(s),!u||k.length){var _=function(e){for(var t=0,a=k.length;t<a;t++){if(g&&v(e[t]))return;C[M[t]]=e[t]}return C.join("")},D=function(e){return m?i.getTrusted(m,e):i.valueOf(e)};return c(function(e){var t=0,a=k.length,i=new Array(a);try{for(;t<a;t++)i[t]=S[t](e);return _(i)}catch(e){n(Li.interr(s,e))}},{exp:s,expressions:k,$$watchDelegate:function(e,t){var a;return e.$watchGroup(S,function(n,i){var s=_(n);I(t)&&t.call(this,s,n!==i?a:s,e),a=s})}})}}var d=e.length,p=t.length,m=new RegExp(e.replace(/./g,s),"g"),g=new RegExp(t.replace(/./g,s),"g");return u.startSymbol=function(){return e},u.endSymbol=function(){return t},u}]}function Tt(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,a,n,i){function s(s,r,l,c){function u(){d?s.apply(null,p):s(f)}var d=arguments.length>4,p=d?V(arguments,4):[],m=t.setInterval,g=t.clearInterval,f=0,h=b(c)&&!c,v=(h?n:a).defer(),y=v.promise;return l=b(l)?l:0,y.$$intervalId=m(function(){h?i.defer(u):e.$evalAsync(u),v.notify(f++),l>0&&f>=l&&(v.resolve(f),g(y.$$intervalId),delete o[y.$$intervalId]),h||e.$apply()},r),o[y.$$intervalId]=v,y}var o={};return s.cancel=function(e){return!!(e&&e.$$intervalId in o)&&(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0)},s}]}function Et(e){for(var t=e.split("/"),a=t.length;a--;)t[a]=te(t[a]);return t.join("/")}function Pt(e,t){var a=Ca(e);t.$$protocol=a.protocol,t.$$host=a.hostname,t.$$port=d(a.port)||Bi[a.protocol]||null}function jt(e,t){var a="/"!==e.charAt(0);a&&(e="/"+e);var n=Ca(e);t.$$path=decodeURIComponent(a&&"/"===n.pathname.charAt(0)?n.pathname.substring(1):n.pathname),t.$$search=X(n.search),t.$$hash=decodeURIComponent(n.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Nt(e,t){return 0===e.lastIndexOf(t,0)}function Ot(e,t){if(Nt(t,e))return t.substr(e.length)}function Lt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Ut(e){return e.replace(/(#.+)|#$/,"$1")}function Bt(e){return e.substr(0,Lt(e).lastIndexOf("/")+1)}function Rt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function zt(e,t,a){this.$$html5=!0,a=a||"",Pt(e,this),this.$$parse=function(e){var a=Ot(t,e);if(!$(a))throw Ri("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);jt(a,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=ee(this.$$search),a=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Et(this.$$path)+(e?"?"+e:"")+a,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(n,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var s,o,r;return b(s=Ot(e,n))?(o=s,r=b(s=Ot(a,s))?t+(Ot("/",s)||s):e+o):b(s=Ot(t,n))?r=t+s:t==n+"/"&&(r=t),r&&this.$$parse(r),!!r}}function Ft(e,t,a){Pt(e,this),this.$$parse=function(n){var i,s=Ot(e,n)||Ot(t,n);v(s)||"#"!==s.charAt(0)?this.$$html5?i=s:(i="",v(s)&&(e=n,this.replace())):v(i=Ot(a,s))&&(i=s),jt(i,this),this.$$path=function(e,t,a){var n,i=/^\/[A-Z]:(\/.*)/;return Nt(t,a)&&(t=t.replace(a,"")),i.exec(t)?e:(n=i.exec(e))?n[1]:e}(this.$$path,i,e),this.$$compose()},this.$$compose=function(){var t=ee(this.$$search),n=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Et(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+(this.$$url?a+this.$$url:"")},this.$$parseLinkUrl=function(t,a){return Lt(e)==Lt(t)&&(this.$$parse(t),!0)}}function Vt(e,t,a){this.$$html5=!0,Ft.apply(this,arguments),this.$$parseLinkUrl=function(n,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var s,o;return e==Lt(n)?s=n:(o=Ot(t,n))?s=e+a+o:t===n+"/"&&(s=t),s&&this.$$parse(s),!!s},this.$$compose=function(){var t=ee(this.$$search),n=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Et(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+a+this.$$url}}function qt(e){return function(){return this[e]}}function Ht(e,t){return function(a){return v(a)?this[e]:(this[e]=t(a),this.$$compose(),this)}}function Wt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return b(t)?(e=t,this):e},this.html5Mode=function(e){return T(e)?(t.enabled=e,this):y(e)?(T(e.enabled)&&(t.enabled=e.enabled),T(e.requireBase)&&(t.requireBase=e.requireBase),T(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(a,n,i,s,o){function r(e,t,a){var i=c.url(),s=c.$$state;try{n.url(e,t,a),c.$$state=n.state()}catch(e){throw c.url(i),c.$$state=s,e}}function l(e,t){a.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}var c,u,d,p=n.baseHref(),m=n.url();if(t.enabled){if(!p&&t.requireBase)throw Ri("nobase","$location in HTML5 mode requires a <base> tag to be present!");d=Rt(m)+(p||"/"),u=i.history?zt:Vt}else d=Lt(m),u=Ft;var g=Bt(d);(c=new u(d,g,"#"+e)).$$parseLinkUrl(m,m),c.$$state=n.state();var f=/^\s*(javascript|mailto):/i;s.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=bn(e.target);"a"!==L(i[0]);)if(i[0]===s[0]||!(i=i.parent())[0])return;var r=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");y(r)&&"[object SVGAnimatedString]"===r.toString()&&(r=Ca(r.animVal).href),f.test(r)||!r||i.attr("target")||e.isDefaultPrevented()||c.$$parseLinkUrl(r,l)&&(e.preventDefault(),c.absUrl()!=n.url()&&(a.$apply(),o.angular["ff-684208-preventDefault"]=!0))}}),Ut(c.absUrl())!=Ut(m)&&n.url(c.absUrl(),!0);var h=!0;return n.onUrlChange(function(e,t){v(Ot(g,e))?o.location.href=e:(a.$evalAsync(function(){var n,i=c.absUrl(),s=c.$$state;e=Ut(e),c.$$parse(e),c.$$state=t,n=a.$broadcast("$locationChangeStart",e,i,t,s).defaultPrevented,c.absUrl()===e&&(n?(c.$$parse(i),c.$$state=s,r(i,!1,s)):(h=!1,l(i,s)))}),a.$$phase||a.$digest())}),a.$watch(function(){var e=Ut(n.url()),t=Ut(c.absUrl()),s=n.state(),o=c.$$replace,u=e!==t||c.$$html5&&i.history&&s!==c.$$state;(h||u)&&(h=!1,a.$evalAsync(function(){var t=c.absUrl(),n=a.$broadcast("$locationChangeStart",t,e,c.$$state,s).defaultPrevented;c.absUrl()===t&&(n?(c.$$parse(e),c.$$state=s):(u&&r(t,o,s===c.$$state?null:c.$$state),l(e,s)))})),c.$$replace=!1}),c}]}function Yt(){var e=!0,t=this;this.debugEnabled=function(t){return b(t)?(e=t,this):e},this.$get=["$window",function(a){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function s(e){var t=a.console||{},s=t[e]||t.log||m,o=!1;try{o=!!s.apply}catch(e){}return o?function(){var e=[];return n(arguments,function(t){e.push(i(t))}),s.apply(t,e)}:function(e,t){s(e,null==t?"":t)}}return{log:s("log"),info:s("info"),warn:s("warn"),error:s("error"),debug:function(){var a=s("debug");return function(){e&&a.apply(t,arguments)}}()}}]}function Gt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Fi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Qt(e){return e+""}function Kt(e,t){if(e){if(e.constructor===e)throw Fi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Fi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Fi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Fi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Jt(e,t){if(e){if(e.constructor===e)throw Fi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Vi||e===qi||e===Hi)throw Fi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Zt(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw Fi("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function Xt(e,t){return void 0!==e?e:t}function ea(e,t){return void 0===e?t:void 0===t?e:e+t}function ta(e,t){return!e(t).$stateful}function aa(e,t){var a,i;switch(e.type){case Qi.Program:a=!0,n(e.body,function(e){aa(e.expression,t),a=a&&e.expression.constant}),e.constant=a;break;case Qi.Literal:e.constant=!0,e.toWatch=[];break;case Qi.UnaryExpression:aa(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case Qi.BinaryExpression:aa(e.left,t),aa(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case Qi.LogicalExpression:aa(e.left,t),aa(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case Qi.ConditionalExpression:aa(e.test,t),aa(e.alternate,t),aa(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case Qi.Identifier:e.constant=!1,e.toWatch=[e];break;case Qi.MemberExpression:aa(e.object,t),e.computed&&aa(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case Qi.CallExpression:a=!!e.filter&&ta(t,e.callee.name),i=[],n(e.arguments,function(e){aa(e,t),a=a&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=a,e.toWatch=e.filter&&ta(t,e.callee.name)?i:[e];break;case Qi.AssignmentExpression:aa(e.left,t),aa(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case Qi.ArrayExpression:a=!0,i=[],n(e.elements,function(e){aa(e,t),a=a&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=a,e.toWatch=i;break;case Qi.ObjectExpression:a=!0,i=[],n(e.properties,function(e){aa(e.value,t),a=a&&e.value.constant&&!e.computed,e.value.constant||i.push.apply(i,e.value.toWatch)}),e.constant=a,e.toWatch=i;break;case Qi.ThisExpression:case Qi.LocalsExpression:e.constant=!1,e.toWatch=[]}}function na(e){if(1==e.length){var t=e[0].expression,a=t.toWatch;return 1!==a.length?a:a[0]!==t?a:void 0}}function ia(e){return e.type===Qi.Identifier||e.type===Qi.MemberExpression}function sa(e){if(1===e.body.length&&ia(e.body[0].expression))return{type:Qi.AssignmentExpression,left:e.body[0].expression,right:{type:Qi.NGValueParameter},operator:"="}}function oa(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===Qi.Literal||e.body[0].expression.type===Qi.ArrayExpression||e.body[0].expression.type===Qi.ObjectExpression)}function ra(e){return e.constant}function la(e,t){this.astBuilder=e,this.$filter=t}function ca(e,t){this.astBuilder=e,this.$filter=t}function ua(e){return"constructor"==e}function da(e){return I(e.valueOf)?e.valueOf():Ji.call(e)}function pa(){var e,t,a=ge(),i=ge(),s={true:!0,false:!1,null:null,undefined:void 0};this.addLiteral=function(e,t){s[e]=t},this.setIdentifierFns=function(a,n){return e=a,t=n,this},this.$get=["$filter",function(o){function r(e,t,n){var s,r,c;switch(n=n||w,typeof e){case"string":c=e=e.trim();var h=n?i:a;if(!(s=h[c])){":"===e.charAt(0)&&":"===e.charAt(1)&&(r=!0,e=e.substring(2));var b=n?y:v,$=new Gi(b);(s=new Ki($,o,b).parse(e)).constant?s.$$watchDelegate=g:r?s.$$watchDelegate=s.literal?p:d:s.inputs&&(s.$$watchDelegate=u),n&&(s=l(s)),h[c]=s}return f(s,t);case"function":return f(e,t);default:return f(m,t)}}function l(e){function t(t,a,n,i){var s=w;w=!0;try{return e(t,a,n,i)}finally{w=s}}if(!e)return e;t.$$watchDelegate=e.$$watchDelegate,t.assign=l(e.assign),t.constant=e.constant,t.literal=e.literal;for(var a=0;e.inputs&&a<e.inputs.length;++a)e.inputs[a]=l(e.inputs[a]);return t.inputs=e.inputs,t}function c(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=da(e)))&&(e===t||e!==e&&t!==t)}function u(e,t,a,n,i){var s,o=n.inputs;if(1===o.length){var r=c;return o=o[0],e.$watch(function(e){var t=o(e);return c(t,r)||(s=n(e,void 0,void 0,[t]),r=t&&da(t)),s},t,a,i)}for(var l=[],u=[],d=0,p=o.length;d<p;d++)l[d]=c,u[d]=null;return e.$watch(function(e){for(var t=!1,a=0,i=o.length;a<i;a++){var r=o[a](e);(t||(t=!c(r,l[a])))&&(u[a]=r,l[a]=r&&da(r))}return t&&(s=n(e,void 0,void 0,u)),s},t,a,i)}function d(e,t,a,n){var i,s;return i=e.$watch(function(e){return n(e)},function(e,a,n){s=e,I(t)&&t.apply(this,arguments),b(e)&&n.$$postDigest(function(){b(s)&&i()})},a)}function p(e,t,a,i){function s(e){var t=!0;return n(e,function(e){b(e)||(t=!1)}),t}var o,r;return o=e.$watch(function(e){return i(e)},function(e,a,n){r=e,I(t)&&t.call(this,e,a,n),s(e)&&n.$$postDigest(function(){s(r)&&o()})},a)}function g(e,t,a,n){var i;return i=e.$watch(function(e){return i(),n(e)},t,a)}function f(e,t){if(!t)return e;var a=e.$$watchDelegate,n=!1,i=a!==p&&a!==d?function(a,i,s,o){var r=n&&o?o[0]:e(a,i,s,o);return t(r,a,i)}:function(a,n,i,s){var o=e(a,n,i,s),r=t(o,a,n);return b(o)?r:o};return e.$$watchDelegate&&e.$$watchDelegate!==u?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=u,n=!e.inputs,i.inputs=e.inputs?e.inputs:[e]),i}var h=Pn().noUnsafeEval,v={csp:h,expensiveChecks:!1,literals:B(s),isIdentifierStart:I(e)&&e,isIdentifierContinue:I(t)&&t},y={csp:h,expensiveChecks:!0,literals:B(s),isIdentifierStart:I(e)&&e,isIdentifierContinue:I(t)&&t},w=!1;return r.$$runningExpensiveChecks=function(){return w},r}]}function ma(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return fa(function(t){e.$evalAsync(t)},t)}]}function ga(){this.$get=["$browser","$exceptionHandler",function(e,t){return fa(function(t){e.defer(t)},t)}]}function fa(e,a){function i(){this.$$state={status:0}}function s(e,t){return function(a){t.call(e,a)}}function o(e){var t,n,i;i=e.pending,e.processScheduled=!1,e.pending=void 0;for(var s=0,o=i.length;s<o;++s){n=i[s][0],t=i[s][e.status];try{I(t)?n.resolve(t(e.value)):1===e.status?n.resolve(e.value):n.reject(e.value)}catch(e){n.reject(e),a(e)}}}function r(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){o(t)}))}function l(){this.promise=new i}var u=t("$q",TypeError);c(i.prototype,{then:function(e,t,a){if(v(e)&&v(t)&&v(a))return this;var n=new l;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([n,e,t,a]),this.$$state.status>0&&r(this.$$state),n.promise},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then(function(t){return p(t,!0,e)},function(t){return p(t,!1,e)},t)}}),c(l.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(u("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){o||(o=!0,i.$$reject(e))}var n,i=this,o=!1;try{(y(e)||I(e))&&(n=e&&e.then),I(n)?(this.promise.$$state.status=-1,n.call(e,function(e){o||(o=!0,i.$$resolve(e))},t,s(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,r(this.promise.$$state))}catch(e){t(e),a(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,r(this.promise.$$state)},notify:function(t){var n=this.promise.$$state.pending;this.promise.$$state.status<=0&&n&&n.length&&e(function(){for(var e,i,s=0,o=n.length;s<o;s++){i=n[s][0],e=n[s][3];try{i.notify(I(e)?e(t):t)}catch(e){a(e)}}})}});var d=function(e,t){var a=new l;return t?a.resolve(e):a.reject(e),a.promise},p=function(e,t,a){var n=null;try{I(a)&&(n=a())}catch(e){return d(e,!1)}return E(n)?n.then(function(){return d(e,t)},function(e){return d(e,!1)}):d(e,t)},m=function(e,t,a,n){var i=new l;return i.resolve(e),i.promise.then(t,a,n)},g=m,f=function(e){if(!I(e))throw u("norslvr","Expected resolverFn, got '{0}'",e);var t=new l;return e(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise};return f.prototype=i.prototype,f.defer=function(){var e=new l;return e.resolve=s(e,e.resolve),e.reject=s(e,e.reject),e.notify=s(e,e.notify),e},f.reject=function(e){var t=new l;return t.reject(e),t.promise},f.when=m,f.resolve=g,f.all=function(e){var t=new l,a=0,i=_n(e)?[]:{};return n(e,function(e,n){a++,m(e).then(function(e){i.hasOwnProperty(n)||(i[n]=e,--a||t.resolve(i))},function(e){i.hasOwnProperty(n)||t.reject(e)})}),0===a&&t.resolve(i),t.promise},f}function ha(){this.$get=["$window","$timeout",function(e,t){var a=e.requestAnimationFrame||e.webkitRequestAnimationFrame,n=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!a,s=i?function(e){var t=a(e);return function(){n(t)}}:function(e){var a=t(e,16.66,!1);return function(){t.cancel(a)}};return s.supported=i,s}]}function va(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=o(),this.$$ChildScope=null}return t.prototype=e,t}var i=10,s=t("$rootScope"),r=null,l=null;this.digestTtl=function(e){return arguments.length&&(i=e),i},this.$get=["$exceptionHandler","$parse","$browser",function(t,c,u){function d(e){e.currentScope.$$destroyed=!0}function p(e){9===vn&&(e.$$childHead&&p(e.$$childHead),e.$$nextSibling&&p(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function g(){this.$id=o(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function f(e){if(S.$$phase)throw s("inprog","{0} already in progress",S.$$phase);S.$$phase=e}function h(){S.$$phase=null}function b(e,t){do{e.$$watchersCount+=t}while(e=e.$parent)}function w(e,t,a){do{e.$$listenerCount[a]-=t,0===e.$$listenerCount[a]&&delete e.$$listenerCount[a]}while(e=e.$parent)}function $(){}function x(){for(;M.length;)try{M.shift()()}catch(e){t(e)}l=null}function k(){null===l&&(l=u.defer(function(){S.$apply(x)}))}g.prototype={constructor:g,$new:function(t,a){var n;return a=a||this,t?(n=new g).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=e(this)),n=new this.$$ChildScope),n.$parent=a,n.$$prevSibling=a.$$childTail,a.$$childHead?(a.$$childTail.$$nextSibling=n,a.$$childTail=n):a.$$childHead=a.$$childTail=n,(t||a!=this)&&n.$on("$destroy",d),n},$watch:function(e,t,a,n){var i=c(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,a,i,e);var s=this,o=s.$$watchers,l={fn:t,last:$,get:i,exp:n||e,eq:!!a};return r=null,I(t)||(l.fn=m),o||(o=s.$$watchers=[]),o.unshift(l),b(this,1),function(){U(o,l)>=0&&b(s,-1),r=null}},$watchGroup:function(e,t){function a(){l=!1,c?(c=!1,t(s,s,r)):t(s,i,r)}var i=new Array(e.length),s=new Array(e.length),o=[],r=this,l=!1,c=!0;if(!e.length){var u=!0;return r.$evalAsync(function(){u&&t(s,s,r)}),function(){u=!1}}return 1===e.length?this.$watch(e[0],function(e,a,n){s[0]=e,i[0]=a,t(s,e===a?s:i,n)}):(n(e,function(e,t){var n=r.$watch(e,function(e,n){s[t]=e,i[t]=n,l||(l=!0,r.$evalAsync(a))});o.push(n)}),function(){for(;o.length;)o.shift()()})},$watchCollection:function(e,t){function n(e){var t,n,o,r;if(!v(i=e)){if(y(i))if(a(i)){s!==p&&(f=(s=p).length=0,u++),t=i.length,f!==t&&(u++,s.length=f=t);for(var l=0;l<t;l++)r=s[l],o=i[l],r!==r&&o!==o||r===o||(u++,s[l]=o)}else{s!==m&&(s=m={},f=0,u++),t=0;for(n in i)gn.call(i,n)&&(t++,o=i[n],r=s[n],n in s?r!==r&&o!==o||r===o||(u++,s[n]=o):(f++,s[n]=o,u++));if(f>t){u++;for(n in s)gn.call(i,n)||(f--,delete s[n])}}else s!==i&&(s=i,u++);return u}}n.$stateful=!0;var i,s,o,r=this,l=t.length>1,u=0,d=c(e,n),p=[],m={},g=!0,f=0;return this.$watch(d,function(){if(g?(g=!1,t(i,i,r)):t(i,o,r),l)if(y(i))if(a(i)){o=new Array(i.length);for(var e=0;e<i.length;e++)o[e]=i[e]}else{o={};for(var n in i)gn.call(i,n)&&(o[n]=i[n])}else o=i})},$digest:function(){var e,a,n,o,c,d,p,m,g,v,b,y=i,w=this,k=[];f("$digest"),u.$$checkUrlChange(),this===S&&null!==l&&(u.defer.cancel(l),x()),r=null;do{p=!1,g=w;for(var M=0;M<A.length;M++){try{(b=A[M]).scope.$eval(b.expression,b.locals)}catch(e){t(e)}r=null}A.length=0;e:do{if(c=g.$$watchers)for(d=c.length;d--;)try{if(e=c[d])if(o=e.get,(a=o(g))===(n=e.last)||(e.eq?z(a,n):"number"==typeof a&&"number"==typeof n&&isNaN(a)&&isNaN(n))){if(e===r){p=!1;break e}}else p=!0,r=e,e.last=e.eq?B(a,null):a,(0,e.fn)(a,n===$?a:n,g),y<5&&(k[v=4-y]||(k[v]=[]),k[v].push({msg:I(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:a,oldVal:n}))}catch(e){t(e)}if(!(m=g.$$watchersCount&&g.$$childHead||g!==w&&g.$$nextSibling))for(;g!==w&&!(m=g.$$nextSibling);)g=g.$parent}while(g=m);if((p||A.length)&&!y--)throw h(),s("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,k)}while(p||A.length);for(h();_<C.length;)try{C[_++]()}catch(e){t(e)}C.length=_=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===S&&u.$$applicationDestroyed(),b(this,-this.$$watchersCount);for(var t in this.$$listenerCount)w(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=m,this.$on=this.$watch=this.$watchGroup=function(){return m},this.$$listeners={},this.$$nextSibling=null,p(this)}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){S.$$phase||A.length||u.defer(function(){A.length&&S.$digest()}),A.push({scope:this,expression:c(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{f("$apply");try{return this.$eval(e)}finally{h()}}catch(e){t(e)}finally{try{S.$digest()}catch(e){throw t(e),e}}},$applyAsync:function(e){var t=this;e&&M.push(function(){t.$eval(e)}),e=c(e),k()},$on:function(e,t){var a=this.$$listeners[e];a||(this.$$listeners[e]=a=[]),a.push(t);var n=this;do{n.$$listenerCount[e]||(n.$$listenerCount[e]=0),n.$$listenerCount[e]++}while(n=n.$parent);var i=this;return function(){var n=a.indexOf(t);-1!==n&&(a[n]=null,w(i,1,e))}},$emit:function(e,a){var n,i,s,o=[],r=this,l=!1,c={name:e,targetScope:r,stopPropagation:function(){l=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},u=F([c],arguments,1);do{for(n=r.$$listeners[e]||o,c.currentScope=r,i=0,s=n.length;i<s;i++)if(n[i])try{n[i].apply(null,u)}catch(e){t(e)}else n.splice(i,1),i--,s--;if(l)return c.currentScope=null,c;r=r.$parent}while(r);return c.currentScope=null,c},$broadcast:function(e,a){var n=this,i=n,s=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var r,l,c,u=F([o],arguments,1);i=s;){for(o.currentScope=i,l=0,c=(r=i.$$listeners[e]||[]).length;l<c;l++)if(r[l])try{r[l].apply(null,u)}catch(e){t(e)}else r.splice(l,1),l--,c--;if(!(s=i.$$listenerCount[e]&&i.$$childHead||i!==n&&i.$$nextSibling))for(;i!==n&&!(s=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var S=new g,A=S.$$asyncQueue=[],C=S.$$postDigestQueue=[],M=S.$$applyAsyncQueue=[],_=0;return S}]}function ba(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return b(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(t=e,this):t},this.$get=function(){return function(a,n){var i,s=n?t:e;return""===(i=Ca(a).href)||i.match(s)?a:"unsafe:"+i}}}function ya(e){if("self"===e)return e;if($(e)){if(e.indexOf("***")>-1)throw Zi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=En(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(S(e))return new RegExp("^"+e.source+"$");throw Zi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function wa(e){var t=[];return b(e)&&n(e,function(e){t.push(ya(e))}),t}function $a(){this.SCE_CONTEXTS=Xi;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=wa(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=wa(e)),t},this.$get=["$injector",function(a){function n(e,t){return"self"===e?Ma(t):!!e.exec(t.href)}function i(a){var i,s,o=Ca(a.toString()),r=!1;for(i=0,s=e.length;i<s;i++)if(n(e[i],o)){r=!0;break}if(r)for(i=0,s=t.length;i<s;i++)if(n(t[i],o)){r=!1;break}return r}function s(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}var o=function(e){throw Zi("unsafe","Attempting to use an unsafe value in a safe context.")};a.has("$sanitize")&&(o=a.get("$sanitize"));var r=s(),l={};return l[Xi.HTML]=s(r),l[Xi.CSS]=s(r),l[Xi.URL]=s(r),l[Xi.JS]=s(r),l[Xi.RESOURCE_URL]=s(l[Xi.URL]),{trustAs:function(e,t){var a=l.hasOwnProperty(e)?l[e]:null;if(!a)throw Zi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||v(t)||""===t)return t;if("string"!=typeof t)throw Zi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new a(t)},getTrusted:function(e,t){if(null===t||v(t)||""===t)return t;var a=l.hasOwnProperty(e)?l[e]:null;if(a&&t instanceof a)return t.$$unwrapTrustedValue();if(e===Xi.RESOURCE_URL){if(i(t))return t;throw Zi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===Xi.HTML)return o(t);throw Zi("unsafe","Attempting to use an unsafe value in a safe context.")},valueOf:function(e){return e instanceof r?e.$$unwrapTrustedValue():e}}}]}function xa(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,a){if(e&&vn<8)throw Zi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=R(Xi);i.isEnabled=function(){return e},i.trustAs=a.trustAs,i.getTrusted=a.getTrusted,i.valueOf=a.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=g),i.parseAs=function(e,a){var n=t(a);return n.literal&&n.constant?n:t(a,function(t){return i.getTrusted(e,t)})};var s=i.parseAs,o=i.getTrusted,r=i.trustAs;return n(Xi,function(e,t){var a=fn(t);i[ye("parse_as_"+a)]=function(t){return s(e,t)},i[ye("get_trusted_"+a)]=function(t){return o(e,t)},i[ye("trust_as_"+a)]=function(t){return r(e,t)}}),i}]}function ka(){this.$get=["$window","$document",function(e,t){var a,n,i={},s=!(e.chrome&&e.chrome.app&&e.chrome.app.runtime)&&e.history&&e.history.pushState,o=d((/android (\d+)/.exec(fn((e.navigator||{}).userAgent))||[])[1]),r=/Boxee/i.test((e.navigator||{}).userAgent),l=t[0]||{},c=/^(Moz|webkit|ms)(?=[A-Z])/,u=l.body&&l.body.style,p=!1,m=!1;if(u){for(var g in u)if(n=c.exec(g)){a=(a=n[0])[0].toUpperCase()+a.substr(1);break}a||(a="WebkitOpacity"in u&&"webkit"),p=!!("transition"in u||a+"Transition"in u),m=!!("animation"in u||a+"Animation"in u),!o||p&&m||(p=$(u.webkitTransition),m=$(u.webkitAnimation))}return{history:!(!s||o<4||r),hasEvent:function(e){if("input"===e&&vn<=11)return!1;if(v(i[e])){var t=l.createElement("div");i[e]="on"+e in t}return i[e]},csp:Pn(),vendorPrefix:a,transitions:p,animations:m,android:o}}]}function Ia(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,a,n,i){function s(o,r){s.totalPendingRequests++,$(o)&&!v(t.get(o))||(o=i.getTrustedResourceUrl(o));var l=a.defaults&&a.defaults.transformResponse;return _n(l)?l=l.filter(function(e){return e!==wt}):l===wt&&(l=null),a.get(o,c({cache:t,transformResponse:l},e)).finally(function(){s.totalPendingRequests--}).then(function(e){return t.put(o,e.data),e.data},function(e){if(!r)throw es("tpload","Failed to load template: {0} (HTTP status: {1} {2})",o,e.status,e.statusText);return n.reject(e)})}return s.totalPendingRequests=0,s}]}function Sa(){this.$get=["$rootScope","$browser","$location",function(e,t,a){var i={};return i.findBindings=function(e,t,a){var i=[];return n(e.getElementsByClassName("ng-binding"),function(e){var s=Cn.element(e).data("$binding");s&&n(s,function(n){a?new RegExp("(^|\\s)"+En(t)+"(\\s|\\||$)").test(n)&&i.push(e):-1!=n.indexOf(t)&&i.push(e)})}),i},i.findModels=function(e,t,a){for(var n=["ng-","data-ng-","ng\\:"],i=0;i<n.length;++i){var s=a?"=":"*=",o="["+n[i]+"model"+s+'"'+t+'"]',r=e.querySelectorAll(o);if(r.length)return r}},i.getLocation=function(){return a.url()},i.setLocation=function(t){t!==a.url()&&(a.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Aa(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,a,n,i){function s(s,r,l){I(s)||(l=r,r=s,s=m);var c,u=V(arguments,3),d=b(l)&&!l,p=(d?n:a).defer(),g=p.promise;return c=t.defer(function(){try{p.resolve(s.apply(null,u))}catch(e){p.reject(e),i(e)}finally{delete o[g.$$timeoutId]}d||e.$apply()},r),g.$$timeoutId=c,o[c]=p,g}var o={};return s.cancel=function(e){return!!(e&&e.$$timeoutId in o)&&(o[e.$$timeoutId].reject("canceled"),delete o[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},s}]}function Ca(e){var t=e;return vn&&(ts.setAttribute("href",t),t=ts.href),ts.setAttribute("href",t),{href:ts.href,protocol:ts.protocol?ts.protocol.replace(/:$/,""):"",host:ts.host,search:ts.search?ts.search.replace(/^\?/,""):"",hash:ts.hash?ts.hash.replace(/^#/,""):"",hostname:ts.hostname,port:ts.port,pathname:"/"===ts.pathname.charAt(0)?ts.pathname:"/"+ts.pathname}}function Ma(e){var t=$(e)?Ca(e):e;return t.protocol===as.protocol&&t.host===as.host}function _a(){this.$get=f(e)}function Da(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var a=e[0]||{},n={},i="";return function(){var e,s,o,r,l,c=a.cookie||"";if(c!==i)for(e=(i=c).split("; "),n={},o=0;o<e.length;o++)(r=(s=e[o]).indexOf("="))>0&&(l=t(s.substring(0,r)),v(n[l])&&(n[l]=t(s.substring(r+1))));return n}}function Ta(){this.$get=Da}function Ea(e){function t(i,s){if(y(i)){var o={};return n(i,function(e,a){o[a]=t(a,e)}),o}return e.factory(i+a,s)}var a="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+a)}}],t("currency",La),t("date",Qa),t("filter",Pa),t("json",Ka),t("limitTo",Ja),t("lowercase",cs),t("number",Ua),t("orderBy",Za),t("uppercase",us)}function Pa(){return function(e,n,i){if(!a(e)){if(null==e)return e;throw t("filter")("notarray","Expected array but received: {0}",e)}var s,o;switch(Oa(n)){case"function":s=n;break;case"boolean":case"null":case"number":case"string":o=!0;case"object":s=ja(n,i,o);break;default:return e}return Array.prototype.filter.call(e,s)}}function ja(e,t,a){var n=y(e)&&"$"in e;return!0===t?t=z:I(t)||(t=function(e,t){return!v(e)&&(null===e||null===t?e===t:!(y(t)||y(e)&&!h(e))&&(e=fn(""+e),t=fn(""+t),-1!==e.indexOf(t)))}),function(i){return n&&!y(i)?Na(i,e.$,t,!1):Na(i,e,t,a)}}function Na(e,t,a,n,i){var s=Oa(e),o=Oa(t);if("string"===o&&"!"===t.charAt(0))return!Na(e,t.substring(1),a,n);if(_n(e))return e.some(function(e){return Na(e,t,a,n)});switch(s){case"object":var r;if(n){for(r in e)if("$"!==r.charAt(0)&&Na(e[r],t,a,!0))return!0;return!i&&Na(e,t,a,!1)}if("object"===o){for(r in t){var l=t[r];if(!I(l)&&!v(l)){var c="$"===r;if(!Na(c?e:e[r],l,a,c,c))return!1}}return!0}return a(e,t);case"function":return!1;default:return a(e,t)}}function Oa(e){return null===e?"null":typeof e}function La(e){var t=e.NUMBER_FORMATS;return function(e,a,n){return v(a)&&(a=t.CURRENCY_SYM),v(n)&&(n=t.PATTERNS[1].maxFrac),null==e?e:za(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,n).replace(/\u00A4/g,a)}}function Ua(e){var t=e.NUMBER_FORMATS;return function(e,a){return null==e?e:za(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,a)}}function Ba(e){var t,a,n,i,s,o=0;for((a=e.indexOf(is))>-1&&(e=e.replace(is,"")),(n=e.search(/e/i))>0?(a<0&&(a=n),a+=+e.slice(n+1),e=e.substring(0,n)):a<0&&(a=e.length),n=0;e.charAt(n)==ss;n++);if(n==(s=e.length))t=[0],a=1;else{for(s--;e.charAt(s)==ss;)s--;for(a-=n,t=[],i=0;n<=s;n++,i++)t[i]=+e.charAt(n)}return a>ns&&(t=t.splice(0,ns-1),o=a-1,a=1),{d:t,e:o,i:a}}function Ra(e,t,a,n){var i=e.d,s=i.length-e.i,o=(t=v(t)?Math.min(Math.max(a,s),n):+t)+e.i,r=i[o];if(o>0){i.splice(Math.max(e.i,o));for(var l=o;l<i.length;l++)i[l]=0}else{s=Math.max(0,s),e.i=1,i.length=Math.max(1,o=t+1),i[0]=0;for(var c=1;c<o;c++)i[c]=0}if(r>=5)if(o-1<0){for(var u=0;u>o;u--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[o-1]++;for(;s<Math.max(0,t);s++)i.push(0);var d=i.reduceRight(function(e,t,a,n){return t+=e,n[a]=t%10,Math.floor(t/10)},0);d&&(i.unshift(d),e.i++)}function za(e,t,a,n,i){if(!$(e)&&!x(e)||isNaN(e))return"";var s,o=!isFinite(e),r=!1,l=Math.abs(e)+"",c="";if(o)c="∞";else{Ra(s=Ba(l),i,t.minFrac,t.maxFrac);var u=s.d,d=s.i,p=s.e,m=[];for(r=u.reduce(function(e,t){return e&&!t},!0);d<0;)u.unshift(0),d++;d>0?m=u.splice(d,u.length):(m=u,u=[0]);var g=[];for(u.length>=t.lgSize&&g.unshift(u.splice(-t.lgSize,u.length).join(""));u.length>t.gSize;)g.unshift(u.splice(-t.gSize,u.length).join(""));u.length&&g.unshift(u.join("")),c=g.join(a),m.length&&(c+=n+m.join("")),p&&(c+="e+"+p)}return e<0&&!r?t.negPre+c+t.negSuf:t.posPre+c+t.posSuf}function Fa(e,t,a,n){var i="";for((e<0||n&&e<=0)&&(n?e=1-e:(e=-e,i="-")),e=""+e;e.length<t;)e=ss+e;return a&&(e=e.substr(e.length-t)),i+e}function Va(e,t,a,n,i){return a=a||0,function(s){var o=s["get"+e]();return(a>0||o>-a)&&(o+=a),0===o&&-12==a&&(o=12),Fa(o,t,n,i)}}function qa(e,t,a){return function(n,i){var s=n["get"+e]();return i[hn((a?"STANDALONE":"")+(t?"SHORT":"")+e)][s]}}function Ha(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function Wa(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Ya(e){return function(t){var a=Ha(t.getFullYear()),n=+Wa(t)-+a;return Fa(1+Math.round(n/6048e5),e)}}function Ga(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Qa(e){function t(e){var t;if(t=e.match(a)){var n=new Date(0),i=0,s=0,o=t[8]?n.setUTCFullYear:n.setFullYear,r=t[8]?n.setUTCHours:n.setHours;t[9]&&(i=d(t[9]+t[10]),s=d(t[9]+t[11])),o.call(n,d(t[1]),d(t[2])-1,d(t[3]));var l=d(t[4]||0)-i,c=d(t[5]||0)-s,u=d(t[6]||0),p=Math.round(1e3*parseFloat("0."+(t[7]||0)));return r.call(n,l,c,u,p),n}return e}var a=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(a,i,s){var o,r,l="",c=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,$(a)&&(a=ls.test(a)?d(a):t(a)),x(a)&&(a=new Date(a)),!k(a)||!isFinite(a.getTime()))return a;for(;i;)(r=rs.exec(i))?i=(c=F(c,r,1)).pop():(c.push(i),i=null);var u=a.getTimezoneOffset();return s&&(u=G(s,u),a=K(a,s,!0)),n(c,function(t){o=os[t],l+=o?o(a,e.DATETIME_FORMATS,u):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Ka(){return function(e,t){return v(t)&&(t=2),W(e,t)}}function Ja(){return function(e,t,a){return t=Math.abs(Number(t))===1/0?Number(t):d(t),isNaN(t)?e:(x(e)&&(e=e.toString()),_n(e)||$(e)?(a=!a||isNaN(a)?0:d(a),a=a<0?Math.max(0,e.length+a):a,t>=0?e.slice(a,a+t):0===a?e.slice(t,e.length):e.slice(Math.max(0,a+t),a)):e)}}function Za(e){function n(t,a){return a=a?-1:1,t.map(function(t){var n=1,i=g;if(I(t))i=t;else if($(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(i=e(t)).constant)){var s=i();i=function(e){return e[s]}}return{get:i,descending:n*a}})}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function s(e,t){return"function"==typeof e.valueOf&&(e=e.valueOf(),i(e))?e:h(e)&&(e=e.toString(),i(e))?e:t}function o(e,t){var a=typeof e;return null===e?(a="string",e="null"):"string"===a?e=e.toLowerCase():"object"===a&&(e=s(e,t)),{value:e,type:a}}function r(e,t){var a=0;return e.type===t.type?e.value!==t.value&&(a=e.value<t.value?-1:1):a=e.type<t.type?-1:1,a}return function(e,i,s){if(null==e)return e;if(!a(e))throw t("orderBy")("notarray","Expected array but received: {0}",e);_n(i)||(i=[i]),0===i.length&&(i=["+"]);var l=n(i,s);l.push({get:function(){return{}},descending:s?-1:1});var c=Array.prototype.map.call(e,function(e,t){return{value:e,predicateValues:l.map(function(a){return o(a.get(e),t)})}});return c.sort(function(e,t){for(var a=0,n=0,i=l.length;n<i&&!(a=r(e.predicateValues[n],t.predicateValues[n])*l[n].descending);++n);return a}),e=c.map(function(e){return e.value})}}function Xa(e){return I(e)&&(e={link:e}),e.restrict=e.restrict||"AC",f(e)}function en(e,t,a,i,s){var o=this,r=[];o.$error={},o.$$success={},o.$pending=void 0,o.$name=s(t.name||t.ngForm||"")(a),o.$dirty=!1,o.$pristine=!0,o.$valid=!0,o.$invalid=!1,o.$submitted=!1,o.$$parentForm=ms,o.$rollbackViewValue=function(){n(r,function(e){e.$rollbackViewValue()})},o.$commitViewValue=function(){n(r,function(e){e.$commitViewValue()})},o.$addControl=function(e){de(e.$name,"input"),r.push(e),e.$name&&(o[e.$name]=e),e.$$parentForm=o},o.$$renameControl=function(e,t){var a=e.$name;o[a]===e&&delete o[a],o[t]=e,e.$name=t},o.$removeControl=function(e){e.$name&&o[e.$name]===e&&delete o[e.$name],n(o.$pending,function(t,a){o.$setValidity(a,null,e)}),n(o.$error,function(t,a){o.$setValidity(a,null,e)}),n(o.$$success,function(t,a){o.$setValidity(a,null,e)}),U(r,e),e.$$parentForm=ms},cn({ctrl:this,$element:e,set:function(e,t,a){var n=e[t];n?-1===n.indexOf(a)&&n.push(a):e[t]=[a]},unset:function(e,t,a){var n=e[t];n&&(U(n,a),0===n.length&&delete e[t])},$animate:i}),o.$setDirty=function(){i.removeClass(e,Js),i.addClass(e,Zs),o.$dirty=!0,o.$pristine=!1,o.$$parentForm.$setDirty()},o.$setPristine=function(){i.setClass(e,Js,Zs+" "+gs),o.$dirty=!1,o.$pristine=!0,o.$submitted=!1,n(r,function(e){e.$setPristine()})},o.$setUntouched=function(){n(r,function(e){e.$setUntouched()})},o.$setSubmitted=function(){i.addClass(e,gs),o.$submitted=!0,o.$$parentForm.$setSubmitted()}}function tn(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function an(e,t,a,n,i,s){var o=fn(t[0].type);if(!i.android){var r=!1;t.on("compositionstart",function(){r=!0}),t.on("compositionend",function(){r=!1,c()})}var l,c=function(e){if(l&&(s.defer.cancel(l),l=null),!r){var i=t.val(),c=e&&e.type;"password"===o||a.ngTrim&&"false"===a.ngTrim||(i=Tn(i)),(n.$viewValue!==i||""===i&&n.$$hasNativeValidators)&&n.$setViewValue(i,c)}};if(i.hasEvent("input"))t.on("input",c);else{var u=function(e,t,a){l||(l=s.defer(function(){l=null,t&&t.value===a||c(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||u(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",u)}t.on("change",c),Ms[o]&&n.$$hasNativeValidators&&o===a.type&&t.on(Cs,function(e){if(!l){var t=this[mn],a=t.badInput,n=t.typeMismatch;l=s.defer(function(){l=null,t.badInput===a&&t.typeMismatch===n||c(e)})}}),n.$render=function(){var e=n.$isEmpty(n.$viewValue)?"":n.$viewValue;t.val()!==e&&t.val(e)}}function nn(e,t){return function(a,i){var s,o;if(k(a))return a;if($(a)){if('"'==a.charAt(0)&&'"'==a.charAt(a.length-1)&&(a=a.substring(1,a.length-1)),bs.test(a))return new Date(a);if(e.lastIndex=0,s=e.exec(a))return s.shift(),o=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},n(s,function(e,a){a<t.length&&(o[t[a]]=+e)}),new Date(o.yyyy,o.MM-1,o.dd,o.HH,o.mm,o.ss||0,1e3*o.sss||0)}return NaN}}function sn(e,t,a,n){return function(i,s,o,r,l,c,u){function d(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function p(e){return b(e)&&!k(e)?a(e)||void 0:e}on(i,s,o,r),an(i,s,o,r,l,c);var m,g=r&&r.$options&&r.$options.timezone;if(r.$$parserName=e,r.$parsers.push(function(e){if(r.$isEmpty(e))return null;if(t.test(e)){var n=a(e,m);return g&&(n=K(n,g)),n}}),r.$formatters.push(function(e){if(e&&!k(e))throw eo("datefmt","Expected `{0}` to be a date",e);return d(e)?((m=e)&&g&&(m=K(m,g,!0)),u("date")(e,n,g)):(m=null,"")}),b(o.min)||o.ngMin){var f;r.$validators.min=function(e){return!d(e)||v(f)||a(e)>=f},o.$observe("min",function(e){f=p(e),r.$validate()})}if(b(o.max)||o.ngMax){var h;r.$validators.max=function(e){return!d(e)||v(h)||a(e)<=h},o.$observe("max",function(e){h=p(e),r.$validate()})}}}function on(e,t,a,n){var i=t[0];(n.$$hasNativeValidators=y(i.validity))&&n.$parsers.push(function(e){var a=t.prop(mn)||{};return a.badInput||a.typeMismatch?void 0:e})}function rn(e,t,a,n,i){var s;if(b(n)){if(!(s=e(n)).constant)throw eo("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",a,n);return s(t)}return i}function ln(e,t){return e="ngClass"+e,["$animate",function(a){function i(e,t){var a=[];e:for(var n=0;n<e.length;n++){for(var i=e[n],s=0;s<t.length;s++)if(i==t[s])continue e;a.push(i)}return a}function s(e){var t=[];return _n(e)?(n(e,function(e){t=t.concat(s(e))}),t):$(e)?e.split(" "):y(e)?(n(e,function(e,a){e&&(t=t.concat(a.split(" ")))}),t):e}return{restrict:"AC",link:function(o,r,l){function c(e){var t=d(e,1);l.$addClass(t)}function u(e){var t=d(e,-1);l.$removeClass(t)}function d(e,t){var a=r.data("$classCounts")||ge(),i=[];return n(e,function(e){(t>0||a[e])&&(a[e]=(a[e]||0)+t,a[e]===+(t>0)&&i.push(e))}),r.data("$classCounts",a),i.join(" ")}function p(e,t){var n=i(t,e),s=i(e,t);n=d(n,1),s=d(s,-1),n&&n.length&&a.addClass(r,n),s&&s.length&&a.removeClass(r,s)}function m(e){if(!0===t||(1&o.$index)===t){var a=s(e||[]);g?z(e,g)||p(s(g),a):c(a)}g=_n(e)?e.map(function(e){return R(e)}):R(e)}var g;o.$watch(l[e],m,!0),l.$observe("class",function(t){m(o.$eval(l[e]))}),"ngClass"!==e&&o.$watch("$index",function(a,n){var i=1&a;if(i!==(1&n)){var r=s(o.$eval(l[e]));i===t?c(r):u(r)}})}}}]}function cn(e){function t(e,t,a){s[e]||(s[e]={}),l(s[e],t,a)}function a(e,t,a){s[e]&&c(s[e],t,a),un(s[e])&&(s[e]=void 0)}function n(e,t){t&&!r[e]?(u.addClass(o,e),r[e]=!0):!t&&r[e]&&(u.removeClass(o,e),r[e]=!1)}function i(e,t){e=e?"-"+le(e,"-"):"",n(Qs+e,!0===t),n(Ks+e,!1===t)}var s=e.ctrl,o=e.$element,r={},l=e.set,c=e.unset,u=e.$animate;r[Ks]=!(r[Qs]=o.hasClass(Qs)),s.$setValidity=function(e,o,r){v(o)?t("$pending",e,r):a("$pending",e,r),T(o)?o?(c(s.$error,e,r),l(s.$$success,e,r)):(l(s.$error,e,r),c(s.$$success,e,r)):(c(s.$error,e,r),c(s.$$success,e,r)),s.$pending?(n(Xs,!0),s.$valid=s.$invalid=void 0,i("",null)):(n(Xs,!1),s.$valid=un(s.$error),s.$invalid=!s.$valid,i("",s.$valid));var u;i(e,u=s.$pending&&s.$pending[e]?void 0:!s.$error[e]&&(!!s.$$success[e]||null)),s.$$parentForm.$setValidity(e,u,s)}}function un(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function dn(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var pn=/^\/(.+)\/([a-z]*)$/,mn="validity",gn=Object.prototype.hasOwnProperty,fn=function(e){return $(e)?e.toLowerCase():e},hn=function(e){return $(e)?e.toUpperCase():e};"i"!=="I".toLowerCase()&&(fn=function(e){return $(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},hn=function(e){return $(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e});var vn,bn,yn,wn,$n=[].slice,xn=[].splice,kn=[].push,In=Object.prototype.toString,Sn=Object.getPrototypeOf,An=t("ng"),Cn=e.angular||(e.angular={}),Mn=0;vn=e.document.documentMode,m.$inject=[],g.$inject=[];var _n=Array.isArray,Dn=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Tn=function(e){return $(e)?e.trim():e},En=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Pn=function(){if(!b(Pn.rules)){var t=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(t){var a=t.getAttribute("ng-csp")||t.getAttribute("data-ng-csp");Pn.rules={noUnsafeEval:!a||-1!==a.indexOf("no-unsafe-eval"),noInlineStyle:!a||-1!==a.indexOf("no-inline-style")}}else Pn.rules={noUnsafeEval:function(){try{return new Function(""),!1}catch(e){return!0}}(),noInlineStyle:!1}}return Pn.rules},jn=function(){if(b(jn.name_))return jn.name_;var t,a,n,i,s=On.length;for(a=0;a<s;++a)if(n=On[a],t=e.document.querySelector("["+n.replace(":","\\:")+"jq]")){i=t.getAttribute(n+"jq");break}return jn.name_=i},Nn=/:/g,On=["ng-","data-ng-","ng:","x-ng-"],Ln=/[A-Z]/g,Un=!1,Bn=1,Rn=3,zn=8,Fn=9,Vn=11,qn={full:"1.5.6",major:1,minor:5,dot:6,codeName:"arrow-stringification"};Se.expando="ng339";var Hn=Se.cache={},Wn=1,Yn=function(e,t,a){e.addEventListener(t,a,!1)},Gn=function(e,t,a){e.removeEventListener(t,a,!1)};Se._data=function(e){return this.cache[e[this.expando]]||{}};var Qn=/([\:\-\_]+(.))/g,Kn=/^moz([A-Z])/,Jn={mouseleave:"mouseout",mouseenter:"mouseover"},Zn=t("jqLite"),Xn=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ei=/<|&#?\w+;/,ti=/<([\w:-]+)/,ai=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ni={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ni.optgroup=ni.option,ni.tbody=ni.tfoot=ni.colgroup=ni.caption=ni.thead,ni.th=ni.td;var ii=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},si=Se.prototype={ready:function(t){function a(){n||(n=!0,t())}var n=!1;"complete"===e.document.readyState?e.setTimeout(a):(this.on("DOMContentLoaded",a),Se(e).on("load",a))},toString:function(){var e=[];return n(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return bn(e>=0?this[e]:this[this.length+e])},length:0,push:kn,sort:[].sort,splice:[].splice},oi={};n("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){oi[fn(e)]=e});var ri={};n("input,select,option,textarea,button,form,details".split(","),function(e){ri[e]=!0});var li={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Te,removeData:_e,hasData:function(e){for(var t in Hn[e.ng339])return!0;return!1},cleanData:function(e){for(var t=0,a=e.length;t<a;t++)_e(e[t])}},function(e,t){Se[t]=e}),n({data:Te,inheritedData:Le,scope:function(e){return bn.data(e,"$scope")||Le(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return bn.data(e,"$isolateScope")||bn.data(e,"$isolateScopeNoTemplate")},controller:Oe,injector:function(e){return Le(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ee,css:function(e,t,a){if(t=ye(t),!b(a))return e.style[t];e.style[t]=a},attr:function(e,t,a){var n=e.nodeType;if(n!==Rn&&2!==n&&n!==zn){var i=fn(t);if(oi[i]){if(!b(a))return e[t]||(e.attributes.getNamedItem(t)||m).specified?i:void 0;a?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(b(a))e.setAttribute(t,a);else if(e.getAttribute){var s=e.getAttribute(t,2);return null===s?void 0:s}}},prop:function(e,t,a){if(!b(a))return e[t];e[t]=a},text:function(){function e(e,t){if(v(t)){var a=e.nodeType;return a===Bn||a===Rn?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===L(e)){var a=[];return n(e.options,function(e){e.selected&&a.push(e.value||e.text)}),0===a.length?null:a}return e.value}e.value=t},html:function(e,t){if(v(t))return e.innerHTML;Ce(e,!0),e.innerHTML=t},empty:Ue},function(e,t){Se.prototype[t]=function(t,a){var n,i,s=this.length;if(e!==Ue&&v(2==e.length&&e!==Ee&&e!==Oe?t:a)){if(y(t)){for(n=0;n<s;n++)if(e===Te)e(this[n],t);else for(i in t)e(this[n],i,t[i]);return this}for(var o=e.$dv,r=v(o)?Math.min(s,1):s,l=0;l<r;l++){var c=e(this[l],t,a);o=o?o+c:c}return o}for(n=0;n<s;n++)e(this[n],t,a);return this}}),n({removeData:_e,on:function(e,t,a,n){if(b(n))throw Zn("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if($e(e)){var i=De(e,!0),s=i.events,o=i.handle;o||(o=i.handle=Ve(e,s));for(var r=t.indexOf(" ")>=0?t.split(" "):[t],l=r.length,c=function(t,n,i){var r=s[t];r||((r=s[t]=[]).specialHandlerWrapper=n,"$destroy"===t||i||Yn(e,t,o)),r.push(a)};l--;)t=r[l],Jn[t]?(c(Jn[t],He),c(t,void 0,!0)):c(t)}},off:Me,one:function(e,t,a){(e=bn(e)).on(t,function n(){e.off(t,a),e.off(t,n)}),e.on(t,a)},replaceWith:function(e,t){var a,i=e.parentNode;Ce(e),n(new Se(t),function(t){a?i.insertBefore(t,a.nextSibling):i.replaceChild(t,e),a=t})},children:function(e){var t=[];return n(e.childNodes,function(e){e.nodeType===Bn&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var a=e.nodeType;if(a===Bn||a===Vn)for(var n=0,i=(t=new Se(t)).length;n<i;n++){var s=t[n];e.appendChild(s)}},prepend:function(e,t){if(e.nodeType===Bn){var a=e.firstChild;n(new Se(t),function(t){e.insertBefore(t,a)})}},wrap:function(e,t){Ie(e,bn(t).eq(0).clone()[0])},remove:Be,detach:function(e){Be(e,!0)},after:function(e,t){for(var a=e,n=e.parentNode,i=0,s=(t=new Se(t)).length;i<s;i++){var o=t[i];n.insertBefore(o,a.nextSibling),a=o}},addClass:je,removeClass:Pe,toggleClass:function(e,t,a){t&&n(t.split(" "),function(t){var n=a;v(n)&&(n=!Ee(e,t)),(n?je:Pe)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Vn?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Ae,triggerHandler:function(e,t,a){var i,s,o,r=t.type||t,l=De(e),u=l&&l.events,d=u&&u[r];d&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:m,type:r,target:e},t.type&&(i=c(i,t)),s=R(d),o=a?[i].concat(a):[i],n(s,function(t){i.isImmediatePropagationStopped()||t.apply(e,o)}))}},function(e,t){Se.prototype[t]=function(t,a,n){for(var i,s=0,o=this.length;s<o;s++)v(i)?b(i=e(this[s],t,a,n))&&(i=bn(i)):Ne(i,e(this[s],t,a,n));return b(i)?i:this},Se.prototype.bind=Se.prototype.on,Se.prototype.unbind=Se.prototype.off}),Ge.prototype={put:function(e,t){this[Ye(e,this.nextUid)]=t},get:function(e){return this[Ye(e,this.nextUid)]},remove:function(e){var t=this[e=Ye(e,this.nextUid)];return delete this[e],t}};var ci=[function(){this.$get=[function(){return Ge}]}],ui=/^([^\(]+?)=>/,di=/^[^\(]*\(\s*([^\)]*)\)/m,pi=/,/,mi=/^\s*(_?)(\S+?)\1\s*$/,gi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,fi=t("$injector");Ze.$$annotate=function(e,t,a){var i,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw $(a)&&a||(a=e.name||Je(e)),fi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",a);n(Ke(e)[1].split(pi),function(e){e.replace(mi,function(e,t,a){i.push(a)})})}e.$inject=i}}else _n(e)?(ue(e[s=e.length-1],"fn"),i=e.slice(0,s)):ue(e,"fn",!0);return i};var hi=t("$animate"),vi=1,bi=function(){this.$get=m},yi=function(){var e=new Ge,t=[];this.$get=["$$AnimateRunner","$rootScope",function(a,i){function s(e,t,a){var i=!1;return t&&n(t=$(t)?t.split(" "):_n(t)?t:[],function(t){t&&(i=!0,e[t]=a)}),i}function o(){n(t,function(t){var a=e.get(t);if(a){var i=at(t.attr("class")),s="",o="";n(a,function(e,t){e!==!!i[t]&&(e?s+=(s.length?" ":"")+t:o+=(o.length?" ":"")+t)}),n(t,function(e){s&&je(e,s),o&&Pe(e,o)}),e.remove(t)}}),t.length=0}function r(a,n,r){var l=e.get(a)||{},c=s(l,n,!0),u=s(l,r,!1);(c||u)&&(e.put(a,l),t.push(a),1===t.length&&i.$$postDigest(o))}return{enabled:m,on:m,off:m,pin:m,push:function(e,t,n,i){i&&i(),(n=n||{}).from&&e.css(n.from),n.to&&e.css(n.to),(n.addClass||n.removeClass)&&r(e,n.addClass,n.removeClass);var s=new a;return s.complete(),s}}}]},wi=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(a,n){if(a&&"."!==a.charAt(0))throw hi("notcsel","Expecting class selector starting with '.' got '{0}'.",a);var i=a+"-animation";t.$$registeredAnimations[a.substr(1)]=i,e.factory(i,n)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter&&new RegExp("(\\s+|\\/)ng-animate(\\s+|\\/)").test(this.$$classNameFilter.toString())))throw hi("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',"ng-animate");return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,a){if(a){var n=tt(a);!n||n.parentNode||n.previousElementSibling||(a=null)}a?a.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(a,n,i,s){return n=n&&bn(n),i=i&&bn(i),n=n||i.parent(),t(a,n,i),e.push(a,"enter",nt(s))},move:function(a,n,i,s){return n=n&&bn(n),i=i&&bn(i),n=n||i.parent(),t(a,n,i),e.push(a,"move",nt(s))},leave:function(t,a){return e.push(t,"leave",nt(a),function(){t.remove()})},addClass:function(t,a,n){return n=nt(n),n.addClass=et(n.addclass,a),e.push(t,"addClass",n)},removeClass:function(t,a,n){return n=nt(n),n.removeClass=et(n.removeClass,a),e.push(t,"removeClass",n)},setClass:function(t,a,n,i){return i=nt(i),i.addClass=et(i.addClass,a),i.removeClass=et(i.removeClass,n),e.push(t,"setClass",i)},animate:function(t,a,n,i,s){return s=nt(s),s.from=s.from?c(s.from,a):a,s.to=s.to?c(s.to,n):n,i=i||"ng-inline-animate",s.tempClasses=et(s.tempClasses,i),e.push(t,"animate",s)}}}]}],$i=function(){this.$get=["$$rAF",function(e){function t(t){a.push(t),a.length>1||e(function(){for(var e=0;e<a.length;e++)a[e]();a=[]})}var a=[];return function(){var e=!1;return t(function(){e=!0}),function(a){e?a():t(a)}}}]},xi=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,a,i,s){function o(e){this.setHost(e);var t=a(),n=function(e){s(e,0,!1)};this._doneCallbacks=[],this._tick=function(e){var a=i[0];a&&a.hidden?n(e):t(e)},this._state=0}return o.chain=function(e,t){function a(){n!==e.length?e[n](function(e){!1!==e?(n++,a()):t(!1)}):t(!0)}var n=0;a()},o.all=function(e,t){function a(a){s=s&&a,++i===e.length&&t(s)}var i=0,s=!0;n(e,function(e){e.done(a)})},o.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:m,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,a){t.done(function(t){!1===t?a():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._tick(function(){t._resolve(e)}))},_resolve:function(e){2!==this._state&&(n(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=2)}},o}]},ki=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,a){return function(t,n){function i(){return e(function(){s(),r||l.complete(),r=!0}),l}function s(){o.addClass&&(t.addClass(o.addClass),o.addClass=null),o.removeClass&&(t.removeClass(o.removeClass),o.removeClass=null),o.to&&(t.css(o.to),o.to=null)}var o=n||{};o.$$prepared||(o=B(o)),o.cleanupStyles&&(o.from=o.to=null),o.from&&(t.css(o.from),o.from=null);var r,l=new a;return{start:i,end:i}}}]},Ii=t("$compile"),Si=new function(){};lt.$inject=["$provide","$$sanitizeUriProvider"],ct.prototype.isFirstChange=function(){return this.previousValue===Si};var Ai=/^((?:x|data)[\:\-_])/i,Ci=t("$controller"),Mi=/^(\S+)(\s+as\s+([\w$]+))?$/,_i=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof bn&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Di="application/json",Ti={"Content-Type":Di+";charset=utf-8"},Ei=/^\[|^\{(?!\{)/,Pi={"[":/]$/,"{":/}$/},ji=/^\)\]\}',?\n/,Ni=t("$http"),Oi=function(e){return function(){throw Ni("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},Li=Cn.$interpolateMinErr=t("$interpolate");Li.throwNoconcat=function(e){throw Li("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},Li.interr=function(e,t){return Li("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Ui=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Bi={http:80,https:443,ftp:21},Ri=t("$location"),zi={$$html5:!1,$$replace:!1,absUrl:qt("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=Ui.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:qt("$$protocol"),host:qt("$$host"),port:qt("$$port"),path:Ht("$$path",function(e){return"/"==(e=null!==e?e.toString():"").charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if($(e)||x(e))e=e.toString(),this.$$search=X(e);else{if(!y(e))throw Ri("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");n(e=B(e,{}),function(t,a){null==t&&delete e[a]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Ht("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};n([Vt,Ft,zt],function(e){e.prototype=Object.create(zi),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==zt||!this.$$html5)throw Ri("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var Fi=t("$parse"),Vi=Function.prototype.call,qi=Function.prototype.apply,Hi=Function.prototype.bind,Wi=ge();n("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Wi[e]=!0});var Yi={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Gi=function(e){this.options=e};Gi.prototype={constructor:Gi,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var a=t+this.peek(),n=a+this.peek(2),i=Wi[t],s=Wi[a],o=Wi[n];if(i||s||o){var r=o?n:s?a:t;this.tokens.push({index:this.index,text:r,operator:!0}),this.index+=r.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var a=e.charCodeAt(0),n=t.charCodeAt(0);return a>=55296&&a<=56319&&n>=56320&&n<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,a){a=a||this.index;var n=b(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,a)+"]":" "+a;throw Fi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,n,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var a=fn(this.text.charAt(this.index));if("."==a||this.isNumber(a))e+=a;else{var n=this.peek();if("e"==a&&this.isExpOperator(n))e+=a;else if(this.isExpOperator(a)&&n&&this.isNumber(n)&&"e"==e.charAt(e.length-1))e+=a;else{if(!this.isExpOperator(a)||n&&this.isNumber(n)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var a="",n=e,i=!1;this.index<this.text.length;){var s=this.text.charAt(this.index);if(n+=s,i){if("u"===s){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,a+=String.fromCharCode(parseInt(o,16))}else a+=Yi[s]||s;i=!1}else if("\\"===s)i=!0;else{if(s===e)return this.index++,void this.tokens.push({index:t,text:n,constant:!0,value:a});a+=s}this.index++}this.throwError("Unterminated quote",t)}};var Qi=function(e,t){this.lexer=e,this.options=t};Qi.Program="Program",Qi.ExpressionStatement="ExpressionStatement",Qi.AssignmentExpression="AssignmentExpression",Qi.ConditionalExpression="ConditionalExpression",Qi.LogicalExpression="LogicalExpression",Qi.BinaryExpression="BinaryExpression",Qi.UnaryExpression="UnaryExpression",Qi.CallExpression="CallExpression",Qi.MemberExpression="MemberExpression",Qi.Identifier="Identifier",Qi.Literal="Literal",Qi.ArrayExpression="ArrayExpression",Qi.Property="Property",Qi.ObjectExpression="ObjectExpression",Qi.ThisExpression="ThisExpression",Qi.LocalsExpression="LocalsExpression",Qi.NGValueParameter="NGValueParameter",Qi.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:Qi.Program,body:e}},expressionStatement:function(){return{type:Qi.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:Qi.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,a=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:Qi.ConditionalExpression,test:a,alternate:e,consequent:t}):a},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:Qi.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:Qi.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:Qi.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=B(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:Qi.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:Qi.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:Qi.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:Qi.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],a={type:Qi.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return a},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do{e.push(this.expression())}while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:Qi.Identifier,name:e.text}},constant:function(){return{type:Qi.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:Qi.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:Qi.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:Qi.ObjectExpression,properties:t}},throwError:function(e,t){throw Fi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw Fi("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw Fi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,a,n){return this.peekAhead(0,e,t,a,n)},peekAhead:function(e,t,a,n,i){if(this.tokens.length>e){var s=this.tokens[e],o=s.text;if(o===t||o===a||o===n||o===i||!t&&!a&&!n&&!i)return s}return!1},expect:function(e,t,a,n){var i=this.peek(e,t,a,n);return!!i&&(this.tokens.shift(),i)},selfReferential:{this:{type:Qi.ThisExpression},$locals:{type:Qi.LocalsExpression}}},la.prototype={compile:function(e,t){var a=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},aa(i,a.$filter);var s,o="";if(this.stage="assign",s=sa(i)){this.state.computing="assign";var r=this.nextId();this.recurse(s,r),this.return_(r),o="fn.assign="+this.generateFunction("assign","s,v,l")}var l=na(i.body);a.stage="inputs",n(l,function(e,t){var n="fn"+t;a.state[n]={vars:[],body:[],own:{}},a.state.computing=n;var i=a.nextId();a.recurse(e,i),a.return_(i),a.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+o+this.watchFns()+"return fn;",u=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,Gt,Kt,Jt,Qt,Zt,Xt,ea,e);return this.state=this.stage=void 0,u.literal=oa(i),u.constant=ra(i),u},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,a=this;return n(t,function(t){e.push("var "+t+"="+a.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return n(this.state.filters,function(a,n){e.push(a+"=$filter("+t.escape(n)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,a,i,s,o){var r,l,c,u,d,p=this;if(i=i||m,!o&&b(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,a,i,s,!0));switch(e.type){case Qi.Program:n(e.body,function(t,a){p.recurse(t.expression,void 0,void 0,function(e){l=e}),a!==e.body.length-1?p.current().body.push(l,";"):p.return_(l)});break;case Qi.Literal:u=this.escape(e.value),this.assign(t,u),i(u);break;case Qi.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){l=e}),u=e.operator+"("+this.ifDefined(l,0)+")",this.assign(t,u),i(u);break;case Qi.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){r=e}),this.recurse(e.right,void 0,void 0,function(e){l=e}),u="+"===e.operator?this.plus(r,l):"-"===e.operator?this.ifDefined(r,0)+e.operator+this.ifDefined(l,0):"("+r+")"+e.operator+"("+l+")",this.assign(t,u),i(u);break;case Qi.LogicalExpression:t=t||this.nextId(),p.recurse(e.left,t),p.if_("&&"===e.operator?t:p.not(t),p.lazyRecurse(e.right,t)),i(t);break;case Qi.ConditionalExpression:t=t||this.nextId(),p.recurse(e.test,t),p.if_(t,p.lazyRecurse(e.alternate,t),p.lazyRecurse(e.consequent,t)),i(t);break;case Qi.Identifier:t=t||this.nextId(),a&&(a.context="inputs"===p.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),a.computed=!1,a.name=e.name),Gt(e.name),p.if_("inputs"===p.stage||p.not(p.getHasOwnProperty("l",e.name)),function(){p.if_("inputs"===p.stage||"s",function(){s&&1!==s&&p.if_(p.not(p.nonComputedMember("s",e.name)),p.lazyAssign(p.nonComputedMember("s",e.name),"{}")),p.assign(t,p.nonComputedMember("s",e.name))})},t&&p.lazyAssign(t,p.nonComputedMember("l",e.name))),(p.state.expensiveChecks||ua(e.name))&&p.addEnsureSafeObject(t),i(t);break;case Qi.MemberExpression:r=a&&(a.context=this.nextId())||this.nextId(),t=t||this.nextId(),p.recurse(e.object,r,void 0,function(){p.if_(p.notNull(r),function(){s&&1!==s&&p.addEnsureSafeAssignContext(r),e.computed?(l=p.nextId(),p.recurse(e.property,l),p.getStringValue(l),p.addEnsureSafeMemberName(l),s&&1!==s&&p.if_(p.not(p.computedMember(r,l)),p.lazyAssign(p.computedMember(r,l),"{}")),u=p.ensureSafeObject(p.computedMember(r,l)),p.assign(t,u),a&&(a.computed=!0,a.name=l)):(Gt(e.property.name),s&&1!==s&&p.if_(p.not(p.nonComputedMember(r,e.property.name)),p.lazyAssign(p.nonComputedMember(r,e.property.name),"{}")),u=p.nonComputedMember(r,e.property.name),(p.state.expensiveChecks||ua(e.property.name))&&(u=p.ensureSafeObject(u)),p.assign(t,u),a&&(a.computed=!1,a.name=e.property.name))},function(){p.assign(t,"undefined")}),i(t)},!!s);break;case Qi.CallExpression:t=t||this.nextId(),e.filter?(l=p.filter(e.callee.name),c=[],n(e.arguments,function(e){var t=p.nextId();p.recurse(e,t),c.push(t)}),u=l+"("+c.join(",")+")",p.assign(t,u),i(t)):(l=p.nextId(),r={},c=[],p.recurse(e.callee,l,r,function(){p.if_(p.notNull(l),function(){p.addEnsureSafeFunction(l),n(e.arguments,function(e){p.recurse(e,p.nextId(),void 0,function(e){c.push(p.ensureSafeObject(e))})}),r.name?(p.state.expensiveChecks||p.addEnsureSafeObject(r.context),u=p.member(r.context,r.name,r.computed)+"("+c.join(",")+")"):u=l+"("+c.join(",")+")",u=p.ensureSafeObject(u),p.assign(t,u)},function(){p.assign(t,"undefined")}),i(t)}));break;case Qi.AssignmentExpression:if(l=this.nextId(),r={},!ia(e.left))throw Fi("lval","Trying to assign a value to a non l-value");this.recurse(e.left,void 0,r,function(){p.if_(p.notNull(r.context),function(){p.recurse(e.right,l),p.addEnsureSafeObject(p.member(r.context,r.name,r.computed)),p.addEnsureSafeAssignContext(r.context),u=p.member(r.context,r.name,r.computed)+e.operator+l,p.assign(t,u),i(t||u)})},1);break;case Qi.ArrayExpression:c=[],n(e.elements,function(e){p.recurse(e,p.nextId(),void 0,function(e){c.push(e)})}),u="["+c.join(",")+"]",this.assign(t,u),i(u);break;case Qi.ObjectExpression:c=[],d=!1,n(e.properties,function(e){e.computed&&(d=!0)}),d?(t=t||this.nextId(),this.assign(t,"{}"),n(e.properties,function(e){e.computed?(r=p.nextId(),p.recurse(e.key,r)):r=e.key.type===Qi.Identifier?e.key.name:""+e.key.value,l=p.nextId(),p.recurse(e.value,l),p.assign(p.member(t,r,e.computed),l)})):(n(e.properties,function(t){p.recurse(t.value,e.constant?void 0:p.nextId(),void 0,function(e){c.push(p.escape(t.key.type===Qi.Identifier?t.key.name:""+t.key.value)+":"+e)})}),u="{"+c.join(",")+"}",this.assign(t,u)),i(t||u);break;case Qi.ThisExpression:this.assign(t,"s"),i("s");break;case Qi.LocalsExpression:this.assign(t,"l"),i("l");break;case Qi.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var a=e+"."+t,n=this.current().own;return n.hasOwnProperty(a)||(n[a]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),n[a]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,a){if(!0===e)t();else{var n=this.current().body;n.push("if(",e,"){"),t(),n.push("}"),a&&(n.push("else{"),a(),n.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var a=/[^$_a-zA-Z0-9]/g;return/[$_a-zA-Z][$_a-zA-Z0-9]*/.test(t)?e+"."+t:e+'["'+t.replace(a,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,a){return a?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,a,n,i,s){var o=this;return function(){o.recurse(e,t,a,n,i,s)}},lazyAssign:function(e,t){var a=this;return function(){a.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if($(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(e))return e.toString();if(!0===e)return"true";if(!1===e)return"false";if(null===e)return"null";if(void 0===e)return"undefined";throw Fi("esc","IMPOSSIBLE")},nextId:function(e,t){var a="v"+this.state.nextId++;return e||this.current().vars.push(a+(t?"="+t:"")),a},current:function(){return this.state[this.state.computing]}},ca.prototype={compile:function(e,t){var a=this,i=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,aa(i,a.$filter);var s,o;(s=sa(i))&&(o=this.recurse(s));var r,l=na(i.body);l&&(r=[],n(l,function(e,t){var n=a.recurse(e);e.input=n,r.push(n),e.watchId=t}));var c=[];n(i.body,function(e){c.push(a.recurse(e.expression))});var u=0===i.body.length?m:1===i.body.length?c[0]:function(e,t){var a;return n(c,function(n){a=n(e,t)}),a};return o&&(u.assign=function(e,t,a){return o(e,a,t)}),r&&(u.inputs=r),u.literal=oa(i),u.constant=ra(i),u},recurse:function(e,t,a){var i,s,o,r=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case Qi.Literal:return this.value(e.value,t);case Qi.UnaryExpression:return s=this.recurse(e.argument),this["unary"+e.operator](s,t);case Qi.BinaryExpression:case Qi.LogicalExpression:return i=this.recurse(e.left),s=this.recurse(e.right),this["binary"+e.operator](i,s,t);case Qi.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case Qi.Identifier:return Gt(e.name,r.expression),r.identifier(e.name,r.expensiveChecks||ua(e.name),t,a,r.expression);case Qi.MemberExpression:return i=this.recurse(e.object,!1,!!a),e.computed||(Gt(e.property.name,r.expression),s=e.property.name),e.computed&&(s=this.recurse(e.property)),e.computed?this.computedMember(i,s,t,a,r.expression):this.nonComputedMember(i,s,r.expensiveChecks,t,a,r.expression);case Qi.CallExpression:return o=[],n(e.arguments,function(e){o.push(r.recurse(e))}),e.filter&&(s=this.$filter(e.callee.name)),e.filter||(s=this.recurse(e.callee,!0)),e.filter?function(e,a,n,i){for(var r=[],l=0;l<o.length;++l)r.push(o[l](e,a,n,i));var c=s.apply(void 0,r,i);return t?{context:void 0,name:void 0,value:c}:c}:function(e,a,n,i){var l,c=s(e,a,n,i);if(null!=c.value){Kt(c.context,r.expression),Jt(c.value,r.expression);for(var u=[],d=0;d<o.length;++d)u.push(Kt(o[d](e,a,n,i),r.expression));l=Kt(c.value.apply(c.context,u),r.expression)}return t?{value:l}:l};case Qi.AssignmentExpression:return i=this.recurse(e.left,!0,1),s=this.recurse(e.right),function(e,a,n,o){var l=i(e,a,n,o),c=s(e,a,n,o);return Kt(l.value,r.expression),Zt(l.context),l.context[l.name]=c,t?{value:c}:c};case Qi.ArrayExpression:return o=[],n(e.elements,function(e){o.push(r.recurse(e))}),function(e,a,n,i){for(var s=[],r=0;r<o.length;++r)s.push(o[r](e,a,n,i));return t?{value:s}:s};case Qi.ObjectExpression:return o=[],n(e.properties,function(e){e.computed?o.push({key:r.recurse(e.key),computed:!0,value:r.recurse(e.value)}):o.push({key:e.key.type===Qi.Identifier?e.key.name:""+e.key.value,computed:!1,value:r.recurse(e.value)})}),function(e,a,n,i){for(var s={},r=0;r<o.length;++r)o[r].computed?s[o[r].key(e,a,n,i)]=o[r].value(e,a,n,i):s[o[r].key]=o[r].value(e,a,n,i);return t?{value:s}:s};case Qi.ThisExpression:return function(e){return t?{value:e}:e};case Qi.LocalsExpression:return function(e,a){return t?{value:a}:a};case Qi.NGValueParameter:return function(e,a,n){return t?{value:n}:n}}},"unary+":function(e,t){return function(a,n,i,s){var o=e(a,n,i,s);return o=b(o)?+o:0,t?{value:o}:o}},"unary-":function(e,t){return function(a,n,i,s){var o=e(a,n,i,s);return o=b(o)?-o:0,t?{value:o}:o}},"unary!":function(e,t){return function(a,n,i,s){var o=!e(a,n,i,s);return t?{value:o}:o}},"binary+":function(e,t,a){return function(n,i,s,o){var r=ea(e(n,i,s,o),t(n,i,s,o));return a?{value:r}:r}},"binary-":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o),l=t(n,i,s,o),c=(b(r)?r:0)-(b(l)?l:0);return a?{value:c}:c}},"binary*":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)*t(n,i,s,o);return a?{value:r}:r}},"binary/":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)/t(n,i,s,o);return a?{value:r}:r}},"binary%":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)%t(n,i,s,o);return a?{value:r}:r}},"binary===":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)===t(n,i,s,o);return a?{value:r}:r}},"binary!==":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)!==t(n,i,s,o);return a?{value:r}:r}},"binary==":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)==t(n,i,s,o);return a?{value:r}:r}},"binary!=":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)!=t(n,i,s,o);return a?{value:r}:r}},"binary<":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)<t(n,i,s,o);return a?{value:r}:r}},"binary>":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)>t(n,i,s,o);return a?{value:r}:r}},"binary<=":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)<=t(n,i,s,o);return a?{value:r}:r}},"binary>=":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)>=t(n,i,s,o);return a?{value:r}:r}},"binary&&":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)&&t(n,i,s,o);return a?{value:r}:r}},"binary||":function(e,t,a){return function(n,i,s,o){var r=e(n,i,s,o)||t(n,i,s,o);return a?{value:r}:r}},"ternary?:":function(e,t,a,n){return function(i,s,o,r){var l=e(i,s,o,r)?t(i,s,o,r):a(i,s,o,r);return n?{value:l}:l}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,a,n,i){return function(s,o,r,l){var c=o&&e in o?o:s;n&&1!==n&&c&&!c[e]&&(c[e]={});var u=c?c[e]:void 0;return t&&Kt(u,i),a?{context:c,name:e,value:u}:u}},computedMember:function(e,t,a,n,i){return function(s,o,r,l){var c,u,d=e(s,o,r,l);return null!=d&&(Gt(c=Qt(c=t(s,o,r,l)),i),n&&1!==n&&(Zt(d),d&&!d[c]&&(d[c]={})),Kt(u=d[c],i)),a?{context:d,name:c,value:u}:u}},nonComputedMember:function(e,t,a,n,i,s){return function(o,r,l,c){var u=e(o,r,l,c);i&&1!==i&&(Zt(u),u&&!u[t]&&(u[t]={}));var d=null!=u?u[t]:void 0;return(a||ua(t))&&Kt(d,s),n?{context:u,name:t,value:d}:d}},inputs:function(e,t){return function(a,n,i,s){return s?s[t]:e(a,n,i)}}};var Ki=function(e,t,a){this.lexer=e,this.$filter=t,this.options=a,this.ast=new Qi(e,a),this.astCompiler=a.csp?new ca(this.ast,t):new la(this.ast,t)};Ki.prototype={constructor:Ki,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Ji=Object.prototype.valueOf,Zi=t("$sce"),Xi={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},es=t("$compile"),ts=e.document.createElement("a"),as=Ca(e.location.href);Da.$inject=["$document"],Ea.$inject=["$provide"];var ns=22,is=".",ss="0";La.$inject=["$locale"],Ua.$inject=["$locale"];var os={yyyy:Va("FullYear",4,0,!1,!0),yy:Va("FullYear",2,0,!0,!0),y:Va("FullYear",1,0,!1,!0),MMMM:qa("Month"),MMM:qa("Month",!0),MM:Va("Month",2,1),M:Va("Month",1,1),LLLL:qa("Month",!1,!0),dd:Va("Date",2),d:Va("Date",1),HH:Va("Hours",2),H:Va("Hours",1),hh:Va("Hours",2,-12),h:Va("Hours",1,-12),mm:Va("Minutes",2),m:Va("Minutes",1),ss:Va("Seconds",2),s:Va("Seconds",1),sss:Va("Milliseconds",3),EEEE:qa("Day"),EEE:qa("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e,t,a){var n=-1*a,i=n>=0?"+":"";return i+=Fa(Math[n>0?"floor":"ceil"](n/60),2)+Fa(Math.abs(n%60),2)},ww:Ya(2),w:Ya(1),G:Ga,GG:Ga,GGG:Ga,GGGG:function(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}},rs=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,ls=/^\-?\d+$/;Qa.$inject=["$locale"];var cs=f(fn),us=f(hn);Za.$inject=["$parse"];var ds=f({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var a="[object SVGAnimatedString]"===In.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(a)||e.preventDefault()})}}}}),ps={};n(oi,function(e,t){function a(e,a,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}if("multiple"!=e){var n=ut("ng-"+t),i=a;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[n]&&a(e,0,i)}),ps[n]=function(){return{restrict:"A",priority:100,link:i}}}}),n(li,function(e,t){ps[t]=function(){return{priority:100,link:function(e,a,n){if("ngPattern"===t&&"/"==n.ngPattern.charAt(0)){var i=n.ngPattern.match(pn);if(i)return void n.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(n[t],function(e){n.$set(t,e)})}}}}),n(["src","srcset","href"],function(e){var t=ut("ng-"+e);ps[t]=function(){return{priority:99,link:function(a,n,i){var s=e,o=e;"href"===e&&"[object SVGAnimatedString]"===In.call(n.prop("href"))&&(o="xlinkHref",i.$attr[o]="xlink:href",s=null),i.$observe(t,function(t){t?(i.$set(o,t),vn&&s&&n.prop(s,i[o])):"href"===e&&i.$set(o,null)})}}}});var ms={$addControl:m,$$renameControl:function(e,t){e.$name=t},$removeControl:m,$setValidity:m,$setDirty:m,$setPristine:m,$setSubmitted:m},gs="ng-submitted";en.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var fs=function(e){return["$timeout","$parse",function(t,a){function n(e){return""===e?a('this[""]').assign:a(e).assign||m}return{name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:en,compile:function(a,i){a.addClass(Js).addClass(Qs);var s=i.name?"name":!(!e||!i.ngForm)&&"ngForm";return{pre:function(e,a,i,o){var r=o[0];if(!("action"in i)){var l=function(t){e.$apply(function(){r.$commitViewValue(),r.$setSubmitted()}),t.preventDefault()};Yn(a[0],"submit",l),a.on("$destroy",function(){t(function(){Gn(a[0],"submit",l)},0,!1)})}(o[1]||r.$$parentForm).$addControl(r);var u=s?n(r.$name):m;s&&(u(e,r),i.$observe(s,function(t){r.$name!==t&&(u(e,void 0),r.$$parentForm.$$renameControl(r,t),(u=n(r.$name))(e,r))})),a.on("$destroy",function(){r.$$parentForm.$removeControl(r),u(e,void 0),c(r,ms)})}}}}}]},hs=fs(),vs=fs(!0),bs=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,ys=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,ws=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,$s=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,xs=/^(\d{4,})-(\d{2})-(\d{2})$/,ks=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Is=/^(\d{4,})-W(\d\d)$/,Ss=/^(\d{4,})-(\d\d)$/,As=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Cs="keydown wheel mousedown",Ms=ge();n("date,datetime-local,month,time,week".split(","),function(e){Ms[e]=!0});var _s={text:function(e,t,a,n,i,s){an(e,t,a,n,i,s),tn(n)},date:sn("date",xs,nn(xs,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":sn("datetimelocal",ks,nn(ks,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:sn("time",As,nn(As,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:sn("week",Is,function(e,t){if(k(e))return e;if($(e)){Is.lastIndex=0;var a=Is.exec(e);if(a){var n=+a[1],i=+a[2],s=0,o=0,r=0,l=0,c=Ha(n),u=7*(i-1);return t&&(s=t.getHours(),o=t.getMinutes(),r=t.getSeconds(),l=t.getMilliseconds()),new Date(n,0,c.getDate()+u,s,o,r,l)}}return NaN},"yyyy-Www"),month:sn("month",Ss,nn(Ss,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,a,n,i,s){if(on(e,t,a,n),an(e,t,a,n,i,s),n.$$parserName="number",n.$parsers.push(function(e){return n.$isEmpty(e)?null:$s.test(e)?parseFloat(e):void 0}),n.$formatters.push(function(e){if(!n.$isEmpty(e)){if(!x(e))throw eo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),b(a.min)||a.ngMin){var o;n.$validators.min=function(e){return n.$isEmpty(e)||v(o)||e>=o},a.$observe("min",function(e){b(e)&&!x(e)&&(e=parseFloat(e,10)),o=x(e)&&!isNaN(e)?e:void 0,n.$validate()})}if(b(a.max)||a.ngMax){var r;n.$validators.max=function(e){return n.$isEmpty(e)||v(r)||e<=r},a.$observe("max",function(e){b(e)&&!x(e)&&(e=parseFloat(e,10)),r=x(e)&&!isNaN(e)?e:void 0,n.$validate()})}},url:function(e,t,a,n,i,s){an(e,t,a,n,i,s),tn(n),n.$$parserName="url",n.$validators.url=function(e,t){var a=e||t;return n.$isEmpty(a)||ys.test(a)}},email:function(e,t,a,n,i,s){an(e,t,a,n,i,s),tn(n),n.$$parserName="email",n.$validators.email=function(e,t){var a=e||t;return n.$isEmpty(a)||ws.test(a)}},radio:function(e,t,a,n){v(a.name)&&t.attr("name",o());t.on("click",function(e){t[0].checked&&n.$setViewValue(a.value,e&&e.type)}),n.$render=function(){var e=a.value;t[0].checked=e==n.$viewValue},a.$observe("value",n.$render)},checkbox:function(e,t,a,n,i,s,o,r){var l=rn(r,e,"ngTrueValue",a.ngTrueValue,!0),c=rn(r,e,"ngFalseValue",a.ngFalseValue,!1);t.on("click",function(e){n.$setViewValue(t[0].checked,e&&e.type)}),n.$render=function(){t[0].checked=n.$viewValue},n.$isEmpty=function(e){return!1===e},n.$formatters.push(function(e){return z(e,l)}),n.$parsers.push(function(e){return e?l:c})},hidden:m,button:m,submit:m,reset:m,file:m},Ds=["$browser","$sniffer","$filter","$parse",function(e,t,a,n){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,s,o,r){r[0]&&(_s[fn(o.type)]||_s.text)(i,s,o,r[0],t,e,a,n)}}}}],Ts=/^(true|false|\d+)$/,Es=function(){return{restrict:"A",priority:100,compile:function(e,t){return Ts.test(t.ngValue)?function(e,t,a){a.$set("value",e.$eval(a.ngValue))}:function(e,t,a){e.$watch(a.ngValue,function(e){a.$set("value",e)})}}}},Ps=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,a,n){e.$$addBindingInfo(a,n.ngBind),a=a[0],t.$watch(n.ngBind,function(e){a.textContent=v(e)?"":e})}}}}],js=["$interpolate","$compile",function(e,t){return{compile:function(a){return t.$$addBindingClass(a),function(a,n,i){var s=e(n.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(n,s.expressions),n=n[0],i.$observe("ngBindTemplate",function(e){n.textContent=v(e)?"":e})}}}}],Ns=["$sce","$parse","$compile",function(e,t,a){return{restrict:"A",compile:function(n,i){var s=t(i.ngBindHtml),o=t(i.ngBindHtml,function(t){return e.valueOf(t)});return a.$$addBindingClass(n),function(t,n,i){a.$$addBindingInfo(n,i.ngBindHtml),t.$watch(o,function(){var a=s(t);n.html(e.getTrustedHtml(a)||"")})}}}}],Os=f({restrict:"A",require:"ngModel",link:function(e,t,a,n){n.$viewChangeListeners.push(function(){e.$eval(a.ngChange)})}}),Ls=ln("",!0),Us=ln("Odd",0),Bs=ln("Even",1),Rs=Xa({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),zs=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Fs={},Vs={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=ut("ng-"+e);Fs[t]=["$parse","$rootScope",function(a,n){return{restrict:"A",compile:function(i,s){var o=a(s[t],null,!0);return function(t,a){a.on(e,function(a){var i=function(){o(t,{$event:a})};Vs[e]&&n.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var qs=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(a,n,i,s,o){var r,l,c;a.$watch(i.ngIf,function(a){a?l||o(function(a,s){l=s,a[a.length++]=t.$$createComment("end ngIf",i.ngIf),r={clone:a},e.enter(a,n.parent(),n)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),r&&(c=me(r.clone),e.leave(c).then(function(){c=null}),r=null))})}}}],Hs=["$templateRequest","$anchorScroll","$animate",function(e,t,a){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Cn.noop,compile:function(n,i){var s=i.ngInclude||i.src,o=i.onload||"",r=i.autoscroll;return function(n,i,l,c,u){var d,p,m,g=0,f=function(){p&&(p.remove(),p=null),d&&(d.$destroy(),d=null),m&&(a.leave(m).then(function(){p=null}),p=m,m=null)};n.$watch(s,function(s){var l=function(){!b(r)||r&&!n.$eval(r)||t()},p=++g;s?(e(s,!0).then(function(e){if(!n.$$destroyed&&p===g){var t=n.$new();c.template=e;var r=u(t,function(e){f(),a.enter(e,null,i).then(l)});m=r,(d=t).$emit("$includeContentLoaded",s),n.$eval(o)}},function(){n.$$destroyed||p===g&&(f(),n.$emit("$includeContentError",s))}),n.$emit("$includeContentRequested",s)):(f(),c.template=null)})}}}}],Ws=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(a,n,i,s){if(In.call(n[0]).match(/SVG/))return n.empty(),void t(xe(s.template,e.document).childNodes)(a,function(e){n.append(e)},{futureParentElement:n});n.html(s.template),t(n.contents())(a)}}}],Ys=Xa({priority:450,compile:function(){return{pre:function(e,t,a){e.$eval(a.ngInit)}}}}),Gs=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,a,i){var s=t.attr(a.$attr.ngList)||", ",o="false"!==a.ngTrim,r=o?Tn(s):s;i.$parsers.push(function(e){if(!v(e)){var t=[];return e&&n(e.split(r),function(e){e&&t.push(o?Tn(e):e)}),t}}),i.$formatters.push(function(e){if(_n(e))return e.join(s)}),i.$isEmpty=function(e){return!e||!e.length}}}},Qs="ng-valid",Ks="ng-invalid",Js="ng-pristine",Zs="ng-dirty",Xs="ng-pending",eo=t("ngModel"),to=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,a,i,s,o,r,l,c,u){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=u(a.name||"",!1)(e),this.$$parentForm=ms;var d,p=s(a.ngModel),g=p.assign,f=p,h=g,y=null,w=this;this.$$setOptions=function(e){if(w.$options=e,e&&e.getterSetter){var t=s(a.ngModel+"()"),n=s(a.ngModel+"($$$p)");f=function(e){var a=p(e);return I(a)&&(a=t(e)),a},h=function(e,t){I(p(e))?n(e,{$$$p:t}):g(e,t)}}else if(!p.assign)throw eo("nonassign","Expression '{0}' is non-assignable. Element: {1}",a.ngModel,J(i))},this.$render=m,this.$isEmpty=function(e){return v(e)||""===e||null===e||e!==e},this.$$updateEmptyClasses=function(e){w.$isEmpty(e)?(o.removeClass(i,"ng-not-empty"),o.addClass(i,"ng-empty")):(o.removeClass(i,"ng-empty"),o.addClass(i,"ng-not-empty"))};var $=0;cn({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:o}),this.$setPristine=function(){w.$dirty=!1,w.$pristine=!0,o.removeClass(i,Zs),o.addClass(i,Js)},this.$setDirty=function(){w.$dirty=!0,w.$pristine=!1,o.removeClass(i,Js),o.addClass(i,Zs),w.$$parentForm.$setDirty()},this.$setUntouched=function(){w.$touched=!1,w.$untouched=!0,o.setClass(i,"ng-untouched","ng-touched")},this.$setTouched=function(){w.$touched=!0,w.$untouched=!1,o.setClass(i,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){r.cancel(y),w.$viewValue=w.$$lastCommittedViewValue,w.$render()},this.$validate=function(){if(!x(w.$modelValue)||!isNaN(w.$modelValue)){var e=w.$$lastCommittedViewValue,t=w.$$rawModelValue,a=w.$valid,n=w.$modelValue,i=w.$options&&w.$options.allowInvalid;w.$$runValidators(t,e,function(e){i||a===e||(w.$modelValue=e?t:void 0,w.$modelValue!==n&&w.$$writeModelToScope())})}},this.$$runValidators=function(e,t,a){function i(e,t){o===$&&w.$setValidity(e,t)}function s(e){o===$&&a(e)}var o=++$;!function(){var e=w.$$parserName||"parse";return v(d)?(i(e,null),!0):(d||(n(w.$validators,function(e,t){i(t,null)}),n(w.$asyncValidators,function(e,t){i(t,null)})),i(e,d),d)}()?s(!1):function(){var a=!0;return n(w.$validators,function(n,s){var o=n(e,t);a=a&&o,i(s,o)}),!!a||(n(w.$asyncValidators,function(e,t){i(t,null)}),!1)}()?function(){var a=[],o=!0;n(w.$asyncValidators,function(n,s){var r=n(e,t);if(!E(r))throw eo("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",r);i(s,void 0),a.push(r.then(function(){i(s,!0)},function(){o=!1,i(s,!1)}))}),a.length?c.all(a).then(function(){s(o)},m):s(!0)}():s(!1)},this.$commitViewValue=function(){var e=w.$viewValue;r.cancel(y),(w.$$lastCommittedViewValue!==e||""===e&&w.$$hasNativeValidators)&&(w.$$updateEmptyClasses(e),w.$$lastCommittedViewValue=e,w.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){w.$modelValue!==i&&w.$$writeModelToScope()}var a=w.$$lastCommittedViewValue;if(d=!v(a)||void 0)for(var n=0;n<w.$parsers.length;n++)if(a=w.$parsers[n](a),v(a)){d=!1;break}x(w.$modelValue)&&isNaN(w.$modelValue)&&(w.$modelValue=f(e));var i=w.$modelValue,s=w.$options&&w.$options.allowInvalid;w.$$rawModelValue=a,s&&(w.$modelValue=a,t()),w.$$runValidators(a,w.$$lastCommittedViewValue,function(e){s||(w.$modelValue=e?a:void 0,t())})},this.$$writeModelToScope=function(){h(e,w.$modelValue),n(w.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){w.$viewValue=e,w.$options&&!w.$options.updateOnDefault||w.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var a,n=0,i=w.$options;i&&b(i.debounce)&&(x(a=i.debounce)?n=a:x(a[t])?n=a[t]:x(a.default)&&(n=a.default)),r.cancel(y),n?y=r(function(){w.$commitViewValue()},n):l.$$phase?w.$commitViewValue():e.$apply(function(){w.$commitViewValue()})},e.$watch(function(){var t=f(e);if(t!==w.$modelValue&&(w.$modelValue===w.$modelValue||t===t)){w.$modelValue=w.$$rawModelValue=t,d=void 0;for(var a=w.$formatters,n=a.length,i=t;n--;)i=a[n](i);w.$viewValue!==i&&(w.$$updateEmptyClasses(i),w.$viewValue=w.$$lastCommittedViewValue=i,w.$render(),w.$$runValidators(t,i,m))}return t})}],ao=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:to,priority:1,compile:function(t){return t.addClass(Js).addClass("ng-untouched").addClass(Qs),{pre:function(e,t,a,n){var i=n[0],s=n[1]||i.$$parentForm;i.$$setOptions(n[2]&&n[2].$options),s.$addControl(i),a.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,a,n,i){var s=i[0];s.$options&&s.$options.updateOn&&a.on(s.$options.updateOn,function(e){s.$$debounceViewValueCommit(e&&e.type)}),a.on("blur",function(){s.$touched||(e.$$phase?t.$evalAsync(s.$setTouched):t.$apply(s.$setTouched))})}}}}}],no=/(\s+|^)default(\s+|$)/,io=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var a=this;this.$options=B(e.$eval(t.ngModelOptions)),b(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Tn(this.$options.updateOn.replace(no,function(){return a.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},so=Xa({terminal:!0,priority:1e3}),oo=t("ngOptions"),ro=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,lo=["$compile","$document","$parse",function(t,i,s){function o(e,t,n){function i(e,t,a,n,i){this.selectValue=e,this.viewValue=t,this.label=a,this.group=n,this.disabled=i}function o(e){var t;if(!c&&a(e))t=e;else{t=[];for(var n in e)e.hasOwnProperty(n)&&"$"!==n.charAt(0)&&t.push(n)}return t}var r=e.match(ro);if(!r)throw oo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,J(t));var l=r[5]||r[7],c=r[6],u=/ as /.test(r[0])&&r[1],d=r[9],p=s(r[2]?r[1]:l),m=u&&s(u)||p,g=d&&s(d),f=d?function(e,t){return g(n,t)}:function(e){return Ye(e)},h=function(e,t){return f(e,x(e,t))},v=s(r[2]||r[1]),b=s(r[3]||""),y=s(r[4]||""),w=s(r[8]),$={},x=c?function(e,t){return $[c]=t,$[l]=e,$}:function(e){return $[l]=e,$};return{trackBy:d,getTrackByValue:h,getWatchables:s(w,function(e){for(var t=[],a=o(e=e||[]),i=a.length,s=0;s<i;s++){var l=e===a?s:a[s],c=e[l],u=x(c,l),d=f(c,u);if(t.push(d),r[2]||r[1]){var p=v(n,u);t.push(p)}if(r[4]){var m=y(n,u);t.push(m)}}return t}),getOptions:function(){for(var e=[],t={},a=w(n)||[],s=o(a),r=s.length,l=0;l<r;l++){var c=a===s?l:s[l],u=x(a[c],c),p=m(n,u),g=f(p,u),$=new i(g,p,v(n,u),b(n,u),y(n,u));e.push($),t[g]=$}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[h(e)]},getViewValueFromOption:function(e){return d?Cn.copy(e.viewValue):e.viewValue}}}}}var r=e.document.createElement("option"),l=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,a,n){n[0].registerOption=m},post:function(e,a,s,c){function u(e,t){var a=r.cloneNode(!1);t.appendChild(a),d(e,a)}function d(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function p(){var e=k&&g.readValue();if(k)for(var t=k.items.length-1;t>=0;t--){var n=k.items[t];Be(n.group?n.element.parentNode:n.element)}k=I.getOptions();var i={};if($&&a.prepend(m),k.items.forEach(function(e){var t;b(e.group)?((t=i[e.group])||(t=l.cloneNode(!1),S.appendChild(t),t.label=e.group,i[e.group]=t),u(e,t)):u(e,S)}),a[0].appendChild(S),f.$render(),!f.$isEmpty(e)){var s=g.readValue();(I.trackBy||h?z(e,s):e===s)||(f.$setViewValue(s),f.$render())}}for(var m,g=c[0],f=c[1],h=s.multiple,v=0,y=a.children(),w=y.length;v<w;v++)if(""===y[v].value){m=y.eq(v);break}var $=!!m,x=bn(r.cloneNode(!1));x.val("?");var k,I=o(s.ngOptions,a,e),S=i[0].createDocumentFragment(),A=function(){$||a.prepend(m),a.val(""),m.prop("selected",!0),m.attr("selected",!0)},C=function(){$||m.remove()},M=function(){a.prepend(x),a.val("?"),x.prop("selected",!0),x.attr("selected",!0)},_=function(){x.remove()};h?(f.$isEmpty=function(e){return!e||0===e.length},g.writeValue=function(e){k.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=k.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},g.readValue=function(){var e=[];return n(a.val()||[],function(t){var a=k.selectValueMap[t];a&&!a.disabled&&e.push(k.getViewValueFromOption(a))}),e},I.trackBy&&e.$watchCollection(function(){if(_n(f.$viewValue))return f.$viewValue.map(function(e){return I.getTrackByValue(e)})},function(){f.$render()})):(g.writeValue=function(e){var t=k.getOptionFromViewValue(e);t?(a[0].value!==t.selectValue&&(_(),C(),a[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):null===e||$?(_(),A()):(C(),M())},g.readValue=function(){var e=k.selectValueMap[a.val()];return e&&!e.disabled?(C(),_(),k.getViewValueFromOption(e)):null},I.trackBy&&e.$watch(function(){return I.getTrackByValue(f.$viewValue)},function(){f.$render()})),$?(m.remove(),t(m)(e),m.removeClass("ng-scope")):m=bn(r.cloneNode(!1)),a.empty(),p(),e.$watchCollection(I.getWatchables,p)}}}}],co=["$locale","$interpolate","$log",function(e,t,a){var i=/{}/g,s=/^when(Minus)?(.+)$/;return{link:function(o,r,l){function c(e){r.text(e||"")}var u,d=l.count,p=l.$attr.when&&r.attr(l.$attr.when),g=l.offset||0,f=o.$eval(p)||{},h={},b=t.startSymbol(),y=t.endSymbol(),w=b+d+"-"+g+y,$=Cn.noop;n(l,function(e,t){var a=s.exec(t);if(a){var n=(a[1]?"-":"")+fn(a[2]);f[n]=r.attr(l.$attr[t])}}),n(f,function(e,a){h[a]=t(e.replace(i,w))}),o.$watch(d,function(t){var n=parseFloat(t),i=isNaN(n);if(i||n in f||(n=e.pluralCat(n-g)),n!==u&&!(i&&x(u)&&isNaN(u))){$();var s=h[n];v(s)?(null!=t&&a.debug("ngPluralize: no rule defined for '"+n+"' in "+p),$=m,c()):$=o.$watch(s,c),u=n}})}}}],uo=["$parse","$animate","$compile",function(e,i,s){var o=t("ngRepeat"),r=function(e,t,a,n,i,s,o){e[a]=n,i&&(e[i]=s),e.$index=t,e.$first=0===t,e.$last=t===o-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))},l=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,u){var d=u.ngRepeat,p=s.$$createComment("end ngRepeat",d),m=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw o("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=m[1],f=m[2],h=m[3],v=m[4];if(!(m=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/)))throw o("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=m[3]||m[1],y=m[2];if(h&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(h)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(h)))throw o("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",h);var w,$,x,k,I={$id:Ye};return v?w=e(v):(x=function(e,t){return Ye(t)},k=function(e){return e}),function(e,t,s,u,m){w&&($=function(t,a,n){return y&&(I[y]=t),I[b]=a,I.$index=n,w(e,I)});var g=ge();e.$watchCollection(f,function(s){var u,f,v,w,I,S,A,C,M,_,D,T,E=t[0],P=ge();if(h&&(e[h]=s),a(s))M=s,C=$||x;else{C=$||k,M=[];for(var j in s)gn.call(s,j)&&"$"!==j.charAt(0)&&M.push(j)}for(w=M.length,D=new Array(w),u=0;u<w;u++)if(I=s===M?u:M[u],S=s[I],A=C(I,S,u),g[A])_=g[A],delete g[A],P[A]=_,D[u]=_;else{if(P[A])throw n(D,function(e){e&&e.scope&&(g[e.id]=e)}),o("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,A,S);D[u]={id:A,scope:void 0,clone:void 0},P[A]=!0}for(var N in g){if(_=g[N],T=me(_.clone),i.leave(T),T[0].parentNode)for(u=0,f=T.length;u<f;u++)T[u].$$NG_REMOVED=!0;_.scope.$destroy()}for(u=0;u<w;u++)if(I=s===M?u:M[u],S=s[I],(_=D[u]).scope){v=E;do{v=v.nextSibling}while(v&&v.$$NG_REMOVED);l(_)!=v&&i.move(me(_.clone),null,E),E=c(_),r(_.scope,u,b,S,y,I,w)}else m(function(e,t){_.scope=t;var a=p.cloneNode(!1);e[e.length++]=a,i.enter(e,null,E),E=a,_.clone=e,P[_.id]=_,r(_.scope,u,b,S,y,I,w)});g=P})}}}}],po=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,a,n){t.$watch(n.ngShow,function(t){e[t?"removeClass":"addClass"](a,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],mo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,a,n){t.$watch(n.ngHide,function(t){e[t?"addClass":"removeClass"](a,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],go=Xa(function(e,t,a){e.$watch(a.ngStyle,function(e,a){a&&e!==a&&n(a,function(e,a){t.css(a,"")}),e&&t.css(e)},!0)}),fo=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,i,s,o){var r=s.ngSwitch||s.on,l=[],c=[],u=[],d=[],p=function(e,t){return function(){e.splice(t,1)}};a.$watch(r,function(a){var i,s;for(i=0,s=u.length;i<s;++i)e.cancel(u[i]);for(u.length=0,i=0,s=d.length;i<s;++i){var r=me(c[i].clone);d[i].$destroy(),(u[i]=e.leave(r)).then(p(u,i))}c.length=0,d.length=0,(l=o.cases["!"+a]||o.cases["?"])&&n(l,function(a){a.transclude(function(n,i){d.push(i);var s=a.element;n[n.length++]=t.$$createComment("end ngSwitchWhen");var o={clone:n};c.push(o),e.enter(n,s.parent(),s)})})})}}}],ho=Xa({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,a,n,i){n.cases["!"+a.ngSwitchWhen]=n.cases["!"+a.ngSwitchWhen]||[],n.cases["!"+a.ngSwitchWhen].push({transclude:i,element:t})}}),vo=Xa({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,a,n,i){n.cases["?"]=n.cases["?"]||[],n.cases["?"].push({transclude:i,element:t})}}),bo=t("ngTransclude"),yo=Xa({restrict:"EAC",link:function(e,t,a,n,i){if(a.ngTransclude===a.$attr.ngTransclude&&(a.ngTransclude=""),!i)throw bo("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",J(t));i(function(e){e.length&&(t.empty(),t.append(e))},null,a.ngTransclude||a.ngTranscludeSlot)}}),wo=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,a){if("text/ng-template"==a.type){var n=a.id,i=t[0].text;e.put(n,i)}}}}],$o={$setViewValue:m,$render:m},xo=["$element","$scope",function(t,a){var n=this,i=new Ge;n.ngModelCtrl=$o,n.unknownOption=bn(e.document.createElement("option")),n.renderUnknownOption=function(e){var a="? "+Ye(e)+" ?";n.unknownOption.val(a),t.prepend(n.unknownOption),t.val(a)},a.$on("$destroy",function(){n.renderUnknownOption=m}),n.removeUnknownOption=function(){n.unknownOption.parent()&&n.unknownOption.remove()},n.readValue=function(){return n.removeUnknownOption(),t.val()},n.writeValue=function(e){n.hasOption(e)?(n.removeUnknownOption(),t.val(e),""===e&&n.emptyOption.prop("selected",!0)):null==e&&n.emptyOption?(n.removeUnknownOption(),t.val("")):n.renderUnknownOption(e)},n.addOption=function(e,t){if(t[0].nodeType!==zn){de(e,'"option value"'),""===e&&(n.emptyOption=t);var a=i.get(e)||0;i.put(e,a+1),n.ngModelCtrl.$render(),dn(t)}},n.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(n.emptyOption=void 0)):i.put(e,t-1))},n.hasOption=function(e){return!!i.get(e)},n.registerOption=function(e,t,a,i,s){if(i){var o;a.$observe("value",function(e){b(o)&&n.removeOption(o),o=e,n.addOption(e,t)})}else s?e.$watch(s,function(e,i){a.$set("value",e),i!==e&&n.removeOption(i),n.addOption(e,t)}):n.addOption(a.value,t);t.on("$destroy",function(){n.removeOption(a.value),n.ngModelCtrl.$render()})}}],ko=function(){return{restrict:"E",require:["select","?ngModel"],controller:xo,priority:1,link:{pre:function(e,t,a,i){var s=i[1];if(s){var o=i[0];if(o.ngModelCtrl=s,t.on("change",function(){e.$apply(function(){s.$setViewValue(o.readValue())})}),a.multiple){o.readValue=function(){var e=[];return n(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},o.writeValue=function(e){var a=new Ge(e);n(t.find("option"),function(e){e.selected=b(a.get(e.value))})};var r,l=NaN;e.$watch(function(){l!==s.$viewValue||z(r,s.$viewValue)||(r=R(s.$viewValue),s.$render()),l=s.$viewValue}),s.$isEmpty=function(e){return!e||0===e.length}}}},post:function(e,t,a,n){var i=n[1];if(i){var s=n[0];i.$render=function(){s.writeValue(i.$viewValue)}}}}}},Io=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,a){if(b(a.value))var n=e(a.value,!0);else{var i=e(t.text(),!0);i||a.$set("value",t.text())}return function(e,t,a){var s=t.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.registerOption(e,t,a,n,i)}}}}],So=f({restrict:"E",terminal:!1}),Ao=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,a,n){n&&(a.required=!0,n.$validators.required=function(e,t){return!a.required||!n.$isEmpty(t)},a.$observe("required",function(){n.$validate()}))}}},Co=function(){return{restrict:"A",require:"?ngModel",link:function(e,a,n,i){if(i){var s,o=n.ngPattern||n.pattern;n.$observe("pattern",function(e){if($(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",o,e,J(a));s=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||v(s)||s.test(t)}}}}},Mo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,a,n){if(n){var i=-1;a.$observe("maxlength",function(e){var t=d(e);i=isNaN(t)?-1:t,n.$validate()}),n.$validators.maxlength=function(e,t){return i<0||n.$isEmpty(t)||t.length<=i}}}}},_o=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,a,n){if(n){var i=0;a.$observe("minlength",function(e){i=d(e)||0,n.$validate()}),n.$validators.minlength=function(e,t){return n.$isEmpty(t)||t.length>=i}}}}};e.angular.bootstrap?e.console&&console.log("WARNING: Tried to load angular more than once."):(!function(){var t;if(!Un){var a=jn();(yn=v(a)?e.jQuery:a?e[a]:void 0)&&yn.fn.on?(bn=yn,c(yn.fn,{scope:si.scope,isolateScope:si.isolateScope,controller:si.controller,injector:si.injector,inheritedData:si.inheritedData}),t=yn.cleanData,yn.cleanData=function(e){for(var a,n,i=0;null!=(n=e[i]);i++)(a=yn._data(n,"events"))&&a.$destroy&&yn(n).triggerHandler("$destroy");t(e)}):bn=Se,Cn.element=bn,Un=!0}}(),function(a){c(a,{bootstrap:se,copy:B,extend:c,merge:u,equals:z,element:bn,forEach:n,injector:Ze,noop:m,bind:q,toJson:W,fromJson:Y,identity:g,isUndefined:v,isDefined:b,isString:$,isFunction:I,isObject:y,isNumber:x,isElement:N,isArray:_n,version:qn,isDate:k,lowercase:fn,uppercase:hn,callbacks:{counter:0},getTestability:re,$$minErr:t,$$csp:Pn,reloadWithDebugInfo:oe}),(wn=fe(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:ba}),e.provider("$compile",lt).directive({a:ds,input:Ds,textarea:Ds,form:hs,script:wo,select:ko,style:So,option:Io,ngBind:Ps,ngBindHtml:Ns,ngBindTemplate:js,ngClass:Ls,ngClassEven:Bs,ngClassOdd:Us,ngCloak:Rs,ngController:zs,ngForm:vs,ngHide:mo,ngIf:qs,ngInclude:Hs,ngInit:Ys,ngNonBindable:so,ngPluralize:co,ngRepeat:uo,ngShow:po,ngStyle:go,ngSwitch:fo,ngSwitchWhen:ho,ngSwitchDefault:vo,ngOptions:lo,ngTransclude:yo,ngModel:ao,ngList:Gs,ngChange:Os,pattern:Co,ngPattern:Co,required:Ao,ngRequired:Ao,minlength:_o,ngMinlength:_o,maxlength:Mo,ngMaxlength:Mo,ngValue:Es,ngModelOptions:io}).directive({ngInclude:Ws}).directive(ps).directive(Fs),e.provider({$anchorScroll:Xe,$animate:wi,$animateCss:ki,$$animateJs:bi,$$animateQueue:yi,$$AnimateRunner:xi,$$animateAsyncRun:$i,$browser:st,$cacheFactory:ot,$controller:gt,$document:ft,$exceptionHandler:ht,$filter:Ea,$$forceReflow:_i,$interpolate:Dt,$interval:Tt,$http:At,$httpParamSerializer:bt,$httpParamSerializerJQLike:yt,$httpBackend:Mt,$xhrFactory:Ct,$location:Wt,$log:Yt,$parse:pa,$rootScope:va,$q:ma,$$q:ga,$sce:xa,$sceDelegate:$a,$sniffer:ka,$templateCache:rt,$templateRequest:Ia,$$testability:Sa,$timeout:Aa,$window:_a,$$rAF:ha,$$jqLite:We,$$HashMap:ci,$$cookieReader:Ta})}])}(Cn),Cn.module("ngLocale",[],["$provide",function(e){function t(e){var t=(e+="").indexOf(".");return-1==t?0:e.length-t-1}function a(e,a){var n=a;void 0===n&&(n=Math.min(t(e),3));var i=Math.pow(10,n);return{v:n,f:(e*i|0)%i}}var n={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var i=0|e,s=a(e,t);return 1==i&&0==s.v?n.ONE:n.OTHER}})}]),bn(e.document).ready(function(){ie(e.document,se)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),function(e,t){"use strict";function a(e,t,a){if(!e)throw le("areq","Argument '{0}' is {1}",t||"?",a||"required");return e}function n(e,t){return e||t?e?t?(F(e)&&(e=e.join(" ")),F(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function i(e){var t={};return e&&(e.to||e.from)&&(t.to=e.to,t.from=e.from),t}function s(e,t,a){var n="";return e=F(e)?e:e&&V(e)&&e.length?e.split(/\s+/):[],z(e,function(e,i){e&&e.length>0&&(n+=i>0?" ":"",n+=a?t+e:e+t)}),n}function o(e,t){var a=e.indexOf(t);t>=0&&e.splice(a,1)}function r(e){if(e instanceof R)switch(e.length){case 0:return e;case 1:if(e[0].nodeType===Q)return e;break;default:return R(l(e))}if(e.nodeType===Q)return R(e)}function l(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var a=e[t];if(a.nodeType==Q)return a}}function c(e,t,a){z(t,function(t){e.addClass(t,a)})}function u(e,t,a){z(t,function(t){e.removeClass(t,a)})}function d(e){return function(t,a){a.addClass&&(c(e,t,a.addClass),a.addClass=null),a.removeClass&&(u(e,t,a.removeClass),a.removeClass=null)}}function p(e){if(!(e=e||{}).$$prepared){var t=e.domOperation||L;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=L},e.$$prepared=!0}return e}function m(e,t){g(e,t),f(e,t)}function g(e,t){t.from&&(e.css(t.from),t.from=null)}function f(e,t){t.to&&(e.css(t.to),t.to=null)}function h(e,t,a){var n=t.options||{},i=a.options||{},s=(n.addClass||"")+" "+(i.addClass||""),o=(n.removeClass||"")+" "+(i.removeClass||""),r=v(e.attr("class"),s,o);i.preparationClasses&&(n.preparationClasses=I(i.preparationClasses,n.preparationClasses),delete i.preparationClasses);var l=n.domOperation!==L?n.domOperation:null;return B(n,i),l&&(n.domOperation=l),r.addClass?n.addClass=r.addClass:n.addClass=null,r.removeClass?n.removeClass=r.removeClass:n.removeClass=null,t.addClass=n.addClass,t.removeClass=n.removeClass,n}function v(e,t,a){function n(e){V(e)&&(e=e.split(" "));var t={};return z(e,function(e){e.length&&(t[e]=!0)}),t}var i={};e=n(e),t=n(t),z(t,function(e,t){i[t]=1}),a=n(a),z(a,function(e,t){i[t]=1===i[t]?null:-1});var s={addClass:"",removeClass:""};return z(i,function(t,a){var n,i;1===t?(n="addClass",i=!e[a]):-1===t&&(n="removeClass",i=e[a]),i&&(s[n].length&&(s[n]+=" "),s[n]+=a)}),s}function b(e){return e instanceof t.element?e[0]:e}function y(e,t,a){var n="";t&&(n=s(t,Z,!0)),a.addClass&&(n=I(n,s(a.addClass,K))),a.removeClass&&(n=I(n,s(a.removeClass,J))),n.length&&(a.preparationClasses=n,e.addClass(n))}function w(e,t){t.preparationClasses&&(e.removeClass(t.preparationClasses),t.preparationClasses=null),t.activeClasses&&(e.removeClass(t.activeClasses),t.activeClasses=null)}function $(e,t){var a=t?"-"+t+"s":"";return k(e,[oe,a]),[oe,a]}function x(e,t){var a=t?"paused":"",n=N+ne;return k(e,[n,a]),[n,a]}function k(e,t){var a=t[0],n=t[1];e.style[a]=n}function I(e,t){return e?t?e+" "+t:e:t}function S(e){return[se,e+"s"]}function A(e,t){return[t?ie:oe,e+"s"]}function C(e,t,a){var n=Object.create(null),i=e.getComputedStyle(t)||{};return z(a,function(e,t){var a=i[e];if(a){var s=a.charAt(0);("-"===s||"+"===s||s>=0)&&(a=M(a)),0===a&&(a=null),n[t]=a}}),n}function M(e){var t=0,a=e.split(/\s*,\s*/);return z(a,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function _(e){return 0===e||null!=e}function D(e,t){var a=P,n=e+"s";return t?a+=te:n+=" linear all",[a,n]}function T(){var e=Object.create(null);return{flush:function(){e=Object.create(null)},count:function(t){var a=e[t];return a?a.total:0},get:function(t){var a=e[t];return a&&a.value},put:function(t,a){e[t]?e[t].total++:e[t]={total:1,value:a}}}}function E(e,t,a){z(a,function(a){e[a]=W(e[a])?e[a]:t.style.getPropertyValue(a)})}var P,j,N,O,L=t.noop,U=t.copy,B=t.extend,R=t.element,z=t.forEach,F=t.isArray,V=t.isString,q=t.isObject,H=t.isUndefined,W=t.isDefined,Y=t.isFunction,G=t.isElement,Q=1,K="-add",J="-remove",Z="ng-",X="ng-animate",ee="$$ngAnimateChildren";H(e.ontransitionend)&&W(e.onwebkittransitionend)?("-webkit-",P="WebkitTransition",j="webkitTransitionEnd transitionend"):(P="transition",j="transitionend"),H(e.onanimationend)&&W(e.onwebkitanimationend)?("-webkit-",N="WebkitAnimation",O="webkitAnimationEnd animationend"):(N="animation",O="animationend");var te="Duration",ae="TimingFunction",ne="PlayState",ie=N+"Delay",se=N+te,oe=P+"Delay",re=P+te,le=t.$$minErr("ng"),ce=["$$rAF",function(e){function t(e){n=n.concat(e),a()}function a(){if(n.length){for(var t=n.shift(),s=0;s<t.length;s++)t[s]();i||e(function(){i||a()})}}var n,i;return n=t.queue=[],t.waitUntilQuiet=function(t){i&&i(),i=e(function(){i=null,t(),a()})},t}],ue=["$interpolate",function(e){return{link:function(a,n,i){function s(e){e="on"===e||"true"===e,n.data(ee,e)}var o=i.ngAnimateChildren;t.isString(o)&&0===o.length?n.data(ee,!0):(s(e(o)(a)),i.$observe("ngAnimateChildren",s))}}}],de="$$animateCss",pe=1e3,me=3,ge=1.5,fe={transitionDuration:re,transitionDelay:oe,transitionProperty:P+"Property",animationDuration:se,animationDelay:ie,animationIterationCount:N+"IterationCount"},he={transitionDuration:re,transitionDelay:oe,animationDuration:se,animationDelay:ie},ve=["$animateProvider",function(e){var t=T(),a=T();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(e,n,r,l,c,u,h,v){function y(e,t){var a="$$ngAnimateParentKey",n=e.parentNode;return(n[a]||(n[a]=++R))+"-"+e.getAttribute("class")+"-"+t}function w(a,n,i,s){var o=t.get(i);return o||"infinite"===(o=C(e,a,s)).animationIterationCount&&(o.animationIterationCount=1),t.put(i,o),o}function I(i,o,r,l){var c;if(t.count(r)>0&&!(c=a.get(r))){var u=s(o,"-stagger");n.addClass(i,u),(c=C(e,i,l)).animationDuration=Math.max(c.animationDuration,0),c.transitionDuration=Math.max(c.transitionDuration,0),n.removeClass(i,u),a.put(r,c)}return c||{}}function M(e){V.push(e),h.waitUntilQuiet(function(){t.flush(),a.flush();for(var e=c(),n=0;n<V.length;n++)V[n](e);V.length=0})}function T(e,t,a){var n=w(e,t,a,fe),i=n.animationDelay,s=n.transitionDelay;return n.maxDelay=i&&s?Math.max(i,s):i||s,n.maxDuration=Math.max(n.animationDuration*n.animationIterationCount,n.transitionDuration),n}var B=d(n),R=0,V=[];return function(e,a){function c(){h()}function d(){h(!0)}function h(t){if(!(Y||Q&&G)){Y=!0,G=!1,q.$$skipPreparationClasses||n.removeClass(e,ye),n.removeClass(e,$e),x(W,!1),$(W,!1),z(re,function(e){W.style[e[0]]=""}),B(e,q),m(e,q),Object.keys(H).length&&z(H,function(e,t){e?W.style.setProperty(t,e):W.style.removeProperty(t)}),q.onDone&&q.onDone(),ue&&ue.length&&e.off(ue.join(" "),R);var a=e.data(de);a&&(l.cancel(a[0].timer),e.removeData(de)),X&&X.complete(!t)}}function w(e){je.blockTransition&&$(W,e),je.blockKeyframeAnimation&&x(W,!!e)}function C(){return X=new r({end:c,cancel:d}),M(L),h(),{$$willAnimate:!1,start:function(){return X},end:c}}function R(e){e.stopPropagation();var t=e.originalEvent||e,a=t.$manualTimeStamp||Date.now(),n=parseFloat(t.elapsedTime.toFixed(me));Math.max(a-oe,0)>=ne&&n>=ie&&(Q=!0,h())}function V(){function t(){if(!Y){if(w(!1),z(re,function(e){var t=e[0],a=e[1];W.style[t]=a}),B(e,q),n.addClass(e,$e),je.recalculateTimingStyles){if(we=W.className+" "+ye,ke=y(W,we),Ee=T(W,we,ke),Pe=Ee.maxDelay,te=Math.max(Pe,0),0===(ie=Ee.maxDuration))return void h();je.hasTransitions=Ee.transitionDuration>0,je.hasAnimations=Ee.animationDuration>0}if(je.applyAnimationDelay&&(Pe="boolean"!=typeof q.delay&&_(q.delay)?parseFloat(q.delay):Pe,te=Math.max(Pe,0),Ee.animationDelay=Pe,Ne=A(Pe,!0),re.push(Ne),W.style[Ne[0]]=Ne[1]),ne=te*pe,se=ie*pe,q.easing){var t,i=q.easing;je.hasTransitions&&(t=P+ae,re.push([t,i]),W.style[t]=i),je.hasAnimations&&(t=N+ae,re.push([t,i]),W.style[t]=i)}Ee.transitionDuration&&ue.push(j),Ee.animationDuration&&ue.push(O),oe=Date.now();var s=ne+ge*se,o=oe+s,r=e.data(de)||[],c=!0;if(r.length){var u=r[0];(c=o>u.expectedEndTime)?l.cancel(u.timer):r.push(h)}if(c){var d=l(a,s,!1);r[0]={timer:d,expectedEndTime:o},r.push(h),e.data(de,r)}ue.length&&e.on(ue.join(" "),R),q.to&&(q.cleanupStyles&&E(H,W,Object.keys(q.to)),f(e,q))}}function a(){var t=e.data(de);if(t){for(var a=1;a<t.length;a++)t[a]();e.removeData(de)}}if(!Y)if(W.parentNode){var i=function(e){if(Q)G&&e&&(G=!1,h());else if(G=!e,Ee.animationDuration){var t=x(W,G);G?re.push(t):o(re,t)}},s=De>0&&(Ee.transitionDuration&&0===Ie.transitionDuration||Ee.animationDuration&&0===Ie.animationDuration)&&Math.max(Ie.animationDelay,Ie.transitionDelay);s?l(t,Math.floor(s*De*pe),!1):t(),ee.resume=function(){i(!0)},ee.pause=function(){i(!1)}}else h()}var q=a||{};q.$$prepared||(q=p(U(q)));var H={},W=b(e);if(!W||!W.parentNode||!v.enabled())return C();var Y,G,Q,X,ee,te,ne,ie,se,oe,re=[],le=e.attr("class"),ce=i(q),ue=[];if(0===q.duration||!u.animations&&!u.transitions)return C();var fe=q.event&&F(q.event)?q.event.join(" "):q.event,ve="",be="";fe&&q.structural?ve=s(fe,Z,!0):fe&&(ve=fe),q.addClass&&(be+=s(q.addClass,K)),q.removeClass&&(be.length&&(be+=" "),be+=s(q.removeClass,J)),q.applyClassesEarly&&be.length&&B(e,q);var ye=[ve,be].join(" ").trim(),we=le+" "+ye,$e=s(ye,"-active"),xe=ce.to&&Object.keys(ce.to).length>0;if(!((q.keyframeStyle||"").length>0)&&!xe&&!ye)return C();var ke,Ie;if(q.stagger>0){var Se=parseFloat(q.stagger);Ie={transitionDelay:Se,animationDelay:Se,transitionDuration:0,animationDuration:0}}else ke=y(W,we),Ie=I(W,ye,ke,he);q.$$skipPreparationClasses||n.addClass(e,ye);var Ae;if(q.transitionStyle){var Ce=[P,q.transitionStyle];k(W,Ce),re.push(Ce)}if(q.duration>=0){Ae=W.style[P].length>0;var Me=D(q.duration,Ae);k(W,Me),re.push(Me)}if(q.keyframeStyle){var _e=[N,q.keyframeStyle];k(W,_e),re.push(_e)}var De=Ie?q.staggerIndex>=0?q.staggerIndex:t.count(ke):0,Te=0===De;Te&&!q.skipBlocking&&$(W,9999);var Ee=T(W,we,ke),Pe=Ee.maxDelay;te=Math.max(Pe,0),ie=Ee.maxDuration;var je={};if(je.hasTransitions=Ee.transitionDuration>0,je.hasAnimations=Ee.animationDuration>0,je.hasTransitionAll=je.hasTransitions&&"all"==Ee.transitionProperty,je.applyTransitionDuration=xe&&(je.hasTransitions&&!je.hasTransitionAll||je.hasAnimations&&!je.hasTransitions),je.applyAnimationDuration=q.duration&&je.hasAnimations,je.applyTransitionDelay=_(q.delay)&&(je.applyTransitionDuration||je.hasTransitions),je.applyAnimationDelay=_(q.delay)&&je.hasAnimations,je.recalculateTimingStyles=be.length>0,(je.applyTransitionDuration||je.applyAnimationDuration)&&(ie=q.duration?parseFloat(q.duration):ie,je.applyTransitionDuration&&(je.hasTransitions=!0,Ee.transitionDuration=ie,Ae=W.style[P+"Property"].length>0,re.push(D(ie,Ae))),je.applyAnimationDuration&&(je.hasAnimations=!0,Ee.animationDuration=ie,re.push(S(ie)))),0===ie&&!je.recalculateTimingStyles)return C();if(null!=q.delay){var Ne;"boolean"!=typeof q.delay&&(Ne=parseFloat(q.delay),te=Math.max(Ne,0)),je.applyTransitionDelay&&re.push(A(Ne)),je.applyAnimationDelay&&re.push(A(Ne,!0))}return null==q.duration&&Ee.transitionDuration>0&&(je.recalculateTimingStyles=je.recalculateTimingStyles||Te),ne=te*pe,se=ie*pe,q.skipBlocking||(je.blockTransition=Ee.transitionDuration>0,je.blockKeyframeAnimation=Ee.animationDuration>0&&Ie.animationDelay>0&&0===Ie.animationDuration),q.from&&(q.cleanupStyles&&E(H,W,Object.keys(q.from)),g(e,q)),je.blockTransition||je.blockKeyframeAnimation?w(ie):q.skipBlocking||$(W,!1),{$$willAnimate:!0,end:c,start:function(){if(!Y)return ee={end:c,cancel:d,resume:null,pause:null},X=new r(ee),M(V),X}}}}]}],be=["$$animationProvider",function(e){function t(e){return e.parentNode&&11===e.parentNode.nodeType}e.drivers.push("$$animateCssDriver");var a="ng-animate-shim",n="ng-anchor",i="ng-anchor-out",s="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(e,o,r,l,c,u,p){function m(e){return e.replace(/\bng-\S+\b/g,"")}function g(e,t){return V(e)&&(e=e.split(" ")),V(t)&&(t=t.split(" ")),e.filter(function(e){return-1===t.indexOf(e)}).join(" ")}function f(t,o,l){function c(e){var t={},a=b(e).getBoundingClientRect();return z(["width","height","top","left"],function(e){var n=a[e];switch(e){case"top":n+=y.scrollTop;break;case"left":n+=y.scrollLeft}t[e]=Math.floor(n)+"px"}),t}function u(e){return e.attr("class")||""}function d(){var t=m(u(l)),a=g(t,h),n=g(h,t),o=e(f,{to:c(l),addClass:s+" "+a,removeClass:i+" "+n,delay:!0});return o.$$willAnimate?o:null}function p(){f.remove(),o.removeClass(a),l.removeClass(a)}var f=R(b(o).cloneNode(!0)),h=m(u(f));o.addClass(a),l.addClass(a),f.addClass(n),$.append(f);var v,w=function(){var t=e(f,{addClass:i,delay:!0,from:c(o)});return t.$$willAnimate?t:null}();if(!w&&!(v=d()))return p();var x=w||v;return{start:function(){function e(){a&&a.end()}var t,a=x.start();return a.done(function(){if(a=null,!v&&(v=d()))return(a=v.start()).done(function(){a=null,p(),t.complete()}),a;p(),t.complete()}),t=new r({end:e,cancel:e})}}}function h(e,t,a,n){var i=v(e),s=v(t),o=[];if(z(n,function(e){var t=e.out,n=e.in,i=f(a,t,n);i&&o.push(i)}),i||s||0!==o.length)return{start:function(){function e(){z(t,function(e){e.end()})}var t=[];i&&t.push(i.start()),s&&t.push(s.start()),z(o,function(e){t.push(e.start())});var a=new r({end:e,cancel:e});return r.all(t,function(e){a.complete(e)}),a}}}function v(t){var a=t.element,n=t.options||{};t.structural&&(n.event=t.event,n.structural=!0,n.applyClassesEarly=!0,"leave"===t.event&&(n.onDone=n.domOperation)),n.preparationClasses&&(n.event=I(n.event,n.preparationClasses));var i=e(a,n);return i.$$willAnimate?i:null}if(!c.animations&&!c.transitions)return L;var y=p[0].body,w=b(l),$=R(t(w)||y.contains(w)?w:y);d(u);return function(e){return e.from&&e.to?h(e.from,e.to,e.classes,e.anchors):v(e)}}]}],ye=["$animateProvider",function(e){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,a,n){function i(a){a=F(a)?a:a.split(" ");for(var n=[],i={},s=0;s<a.length;s++){var o=a[s],r=e.$$registeredAnimations[o];r&&!i[o]&&(n.push(t.get(r)),i[o]=!0)}return n}var s=d(n);return function(e,t,n,o){function r(){o.domOperation(),s(e,o)}function l(){g=!0,r(),m(e,o)}function c(e,t,n,i,s){var o;switch(n){case"animate":o=[t,i.from,i.to,s];break;case"setClass":o=[t,v,b,s];break;case"addClass":o=[t,v,s];break;case"removeClass":o=[t,b,s];break;default:o=[t,s]}o.push(i);var r=e.apply(e,o);if(r)if(Y(r.start)&&(r=r.start()),r instanceof a)r.done(s);else if(Y(r))return r;return L}function u(e,t,n,i,s){var o=[];return z(i,function(i){var r=i[s];r&&o.push(function(){var i,s,o=!1,l=function(e){o||(o=!0,(s||L)(e),i.complete(!e))};return i=new a({end:function(){l()},cancel:function(){l(!0)}}),s=c(r,e,t,n,function(e){l(!1===e)}),i})}),o}function d(e,t,n,i,s){var o=u(e,t,n,i,s);if(0===o.length){var r,l;"beforeSetClass"===s?(r=u(e,"removeClass",n,i,"beforeRemoveClass"),l=u(e,"addClass",n,i,"beforeAddClass")):"setClass"===s&&(r=u(e,"removeClass",n,i,"removeClass"),l=u(e,"addClass",n,i,"addClass")),r&&(o=o.concat(r)),l&&(o=o.concat(l))}if(0!==o.length)return function(e){var t=[];return o.length&&z(o,function(e){t.push(e())}),t.length?a.all(t,e):e(),function(e){z(t,function(t){e?t.cancel():t.end()})}}}var g=!1;3===arguments.length&&q(n)&&(o=n,n=null),o=p(o),n||(n=e.attr("class")||"",o.addClass&&(n+=" "+o.addClass),o.removeClass&&(n+=" "+o.removeClass));var f,h,v=o.addClass,b=o.removeClass,y=i(n);if(y.length){var w,$;"leave"==t?($="leave",w="afterLeave"):($="before"+t.charAt(0).toUpperCase()+t.substr(1),w=t),"enter"!==t&&"move"!==t&&(f=d(e,t,o,y,$)),h=d(e,t,o,y,w)}if(f||h){var x;return{$$willAnimate:!0,end:function(){return x?x.end():(l(),(x=new a).complete(!0)),x},start:function(){function e(e){l(e),x.complete(e)}function t(t){g||((n||L)(t),e(t))}if(x)return x;x=new a;var n,i=[];return f&&i.push(function(e){n=f(e)}),i.length?i.push(function(e){r(),e(!0)}):r(),h&&i.push(function(e){n=h(e)}),x.setHost({end:function(){t()},cancel:function(){t(!0)}}),a.chain(i,e),x}}}}}]}],we=["$$animationProvider",function(e){e.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(e,t){function a(t){var a=t.element,n=t.event,i=t.options,s=t.classes;return e(a,n,s,i)}return function(e){if(e.from&&e.to){var n=a(e.from),i=a(e.to);if(!n&&!i)return;return{start:function(){function e(){return function(){z(a,function(e){e.end()})}}var a=[];n&&a.push(n.start()),i&&a.push(i.start()),t.all(a,function(e){s.complete(e)});var s=new t({end:e(),cancel:e()});return s}}}return a(e)}}]}],$e="data-ng-animate",xe="$ngAnimatePin",ke=["$animateProvider",function(n){function i(e){if(!e)return null;var t=e.split(f),a=Object.create(null);return z(t,function(e){a[e]=!0}),a}function s(e,t){if(e&&t){var a=i(t);return e.split(f).some(function(e){return a[e]})}}function o(e,t,a,n){return v[e].some(function(e){return e(t,a,n)})}function c(e,t){var a=(e.addClass||"").length>0,n=(e.removeClass||"").length>0;return t?a&&n:a||n}var u=1,g=2,f=" ",v=this.rules={skip:[],cancel:[],join:[]};v.join.push(function(e,t,a){return!t.structural&&c(t)}),v.skip.push(function(e,t,a){return!t.structural&&!c(t)}),v.skip.push(function(e,t,a){return"leave"==a.event&&t.structural}),v.skip.push(function(e,t,a){return a.structural&&a.state===g&&!t.structural}),v.cancel.push(function(e,t,a){return a.structural&&t.structural}),v.cancel.push(function(e,t,a){return a.state===g&&t.structural}),v.cancel.push(function(e,t,a){if(a.structural)return!1;var n=t.addClass,i=t.removeClass,o=a.addClass,r=a.removeClass;return!(H(n)&&H(i)||H(o)&&H(r))&&(s(n,r)||s(i,o))}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(i,s,f,v,$,x,k,I,S,A){function C(){var e=!1;return function(t){e?t():s.$$postDigest(function(){e=!0,t()})}}function M(e,t){return h(e,t,{})}function _(e,t,a){var n=b(t),i=b(e),s=[],o=X[a];return o&&z(o,function(e){ie.call(e.node,n)?s.push(e.callback):"leave"===a&&ie.call(e.node,i)&&s.push(e.callback)}),s}function D(e,t,a){var n=l(t);return e.filter(function(e){return!(e.node===n&&(!a||e.callback===a))})}function T(e,t){"close"!==e||t[0].parentNode||se.off(t)}function E(e,t,a){function n(t,a,n,s){S(function(){var t=_(f,e,a);t.length?i(function(){z(t,function(t){t(e,n,s)}),T(n,e)}):T(n,e)}),t.progress(a,n,s)}function l(t){w(e,$),ne(e,$),m(e,$),$.domOperation(),I.complete(!t)}var d,f,$=U(a);(e=r(e))&&(d=b(e),f=e.parent()),$=p($);var I=new k,S=C();if(F($.addClass)&&($.addClass=$.addClass.join(" ")),$.addClass&&!V($.addClass)&&($.addClass=null),F($.removeClass)&&($.removeClass=$.removeClass.join(" ")),$.removeClass&&!V($.removeClass)&&($.removeClass=null),$.from&&!q($.from)&&($.from=null),$.to&&!q($.to)&&($.to=null),!d)return l(),I;var A=[d.className,$.addClass,$.removeClass].join(" ");if(!ae(A))return l(),I;var D=["enter","move","leave"].indexOf(t)>=0,E=v[0].hidden,N=!J||E||K.get(d),B=!N&&Y.get(d)||{},R=!!B.state;if(N||R&&B.state==u||(N=!O(e,f,t)),N)return E&&n(I,t,"start"),l(),E&&n(I,t,"close"),I;D&&P(e);var H={structural:D,element:e,event:t,addClass:$.addClass,removeClass:$.removeClass,close:l,options:$,runner:I};if(R){if(o("skip",e,H,B))return B.state===g?(l(),I):(h(e,B,H),B.runner);if(o("cancel",e,H,B))if(B.state===g)B.runner.end();else{if(!B.structural)return h(e,B,H),B.runner;B.close()}else if(o("join",e,H,B)){if(B.state!==g)return y(e,D?t:null,$),t=H.event=B.event,$=h(e,B,H),B.runner;M(e,H)}}else M(e,H);var W=H.structural;if(W||(W="animate"===H.event&&Object.keys(H.options.to||{}).length>0||c(H)),!W)return l(),j(e),I;var G=(B.counter||0)+1;return H.counter=G,L(e,u,H),s.$$postDigest(function(){var a=Y.get(d),i=!a;a=a||{};var s=(e.parent()||[]).length>0&&("animate"===a.event||a.structural||c(a));if(i||a.counter!==G||!s)return i&&(ne(e,$),m(e,$)),(i||D&&a.event!==t)&&($.domOperation(),I.end()),void(s||j(e));t=!a.structural&&c(a,!0)?"setClass":a.event,L(e,g);var o=x(e,t,a.options);I.setHost(o),n(I,t,"start",{}),o.done(function(a){l(!a);var i=Y.get(d);i&&i.counter===G&&j(b(e)),n(I,t,"close",{})})}),I}function P(e){var t=b(e).querySelectorAll("["+$e+"]");z(t,function(e){var t=parseInt(e.getAttribute($e)),a=Y.get(e);if(a)switch(t){case g:a.runner.end();case u:Y.remove(e)}})}function j(e){var t=b(e);t.removeAttribute($e),Y.remove(t)}function N(e,t){return b(e)===b(t)}function O(e,t,a){var n,i=R(v[0].body),s=N(e,i)||"HTML"===e[0].nodeName,o=N(e,f),r=!1,l=K.get(b(e)),c=R.data(e[0],xe);for(c&&(t=c),t=b(t);t&&(o||(o=N(t,f)),t.nodeType===Q);){var u=Y.get(t)||{};if(!r){var d=K.get(t);if(!0===d&&!1!==l){l=!0;break}!1===d&&(l=!1),r=u.structural}if(H(n)||!0===n){var p=R.data(t,ee);W(p)&&(n=p)}if(r&&!1===n)break;if(s||(s=N(t,i)),s&&o)break;t=o||!(c=R.data(t,xe))?t.parentNode:b(c)}return(!r||n)&&!0!==l&&o&&s}function L(e,t,a){(a=a||{}).state=t;var n=b(e);n.setAttribute($e,t);var i=Y.get(n),s=i?B(i,a):a;Y.put(n,s)}var Y=new $,K=new $,J=null,Z=s.$watch(function(){return 0===I.totalPendingRequests},function(e){e&&(Z(),s.$$postDigest(function(){s.$$postDigest(function(){null===J&&(J=!0)})}))}),X={},te=n.classNameFilter(),ae=te?function(e){return te.test(e)}:function(){return!0},ne=d(S),ie=e.Node.prototype.contains||function(e){return this===e||!!(16&this.compareDocumentPosition(e))},se={on:function(e,t,a){var n=l(t);X[e]=X[e]||[],X[e].push({node:n,callback:a}),R(t).on("$destroy",function(){Y.get(n)||se.off(e,t,a)})},off:function(e,a,n){if(1!==arguments.length||t.isString(arguments[0])){var i=X[e];i&&(X[e]=1===arguments.length?null:D(i,a,n))}else{a=arguments[0];for(var s in X)X[s]=D(X[s],a)}},pin:function(e,t){a(G(e),"element","not an element"),a(G(t),"parentElement","not an element"),e.data(xe,t)},push:function(e,t,a,n){return a=a||{},a.domOperation=n,E(e,t,a)},enabled:function(e,t){var a=arguments.length;if(0===a)t=!!J;else if(G(e)){var n=b(e),i=K.get(n);1===a?t=!i:K.put(n,!t)}else t=J=!!e;return t}};return se}]}],Ie=["$animateProvider",function(e){function t(e,t){e.data(r,t)}function a(e){e.removeData(r)}function i(e){return e.data(r)}var s="ng-animate-ref",o=this.drivers=[],r="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(e,r,l,c,u,g){function f(e){function t(e){if(e.processed)return e;e.processed=!0;var a=e.domNode,s=a.parentNode;i.put(a,e);for(var o;s;){if(o=i.get(s)){o.processed||(o=t(o));break}s=s.parentNode}return(o||n).children.push(e),e}var a,n={children:[]},i=new u;for(a=0;a<e.length;a++){var s=e[a];i.put(s.domNode,e[a]={domNode:s.domNode,fn:s.fn,children:[]})}for(a=0;a<e.length;a++)t(e[a]);return function(e){var t,a=[],n=[];for(t=0;t<e.children.length;t++)n.push(e.children[t]);var i=n.length,s=0,o=[];for(t=0;t<n.length;t++){var r=n[t];i<=0&&(i=s,s=0,a.push(o),o=[]),o.push(r.fn),r.children.forEach(function(e){s++,n.push(e)}),i--}return o.length&&a.push(o),a}(n)}var h=[],v=d(e);return function(u,d,y){function w(e){var t="["+s+"]",a=e.hasAttribute(s)?[e]:e.querySelectorAll(t),n=[];return z(a,function(e){var t=e.getAttribute(s);t&&t.length&&n.push(e)}),n}function $(e){var t=[],a={};z(e,function(e,n){var i=b(e.element),o=e.event,r=["enter","move"].indexOf(o)>=0,l=e.structural?w(i):[];if(l.length){var c=r?"to":"from";z(l,function(e){var t=e.getAttribute(s);a[t]=a[t]||{},a[t][c]={animationID:n,element:R(e)}})}else t.push(e)});var n={},i={};return z(a,function(a,s){var o=a.from,r=a.to;if(o&&r){var l=e[o.animationID],c=e[r.animationID],u=o.animationID.toString();if(!i[u]){var d=i[u]={structural:!0,beforeStart:function(){l.beforeStart(),c.beforeStart()},close:function(){l.close(),c.close()},classes:x(l.classes,c.classes),from:l,to:c,anchors:[]};d.classes.length?t.push(d):(t.push(l),t.push(c))}i[u].anchors.push({out:o.element,in:r.element})}else{var p=o?o.animationID:r.animationID,m=p.toString();n[m]||(n[m]=!0,t.push(e[p]))}}),t}function x(e,t){e=e.split(" "),t=t.split(" ");for(var a=[],n=0;n<e.length;n++){var i=e[n];if("ng-"!==i.substring(0,3))for(var s=0;s<t.length;s++)if(i===t[s]){a.push(i);break}}return a.join(" ")}function k(e){for(var t=o.length-1;t>=0;t--){var a=o[t];if(l.has(a)){var n=l.get(a)(e);if(n)return n}}}function I(e,t){function a(e){var a=i(e);a&&a.setHost(t)}e.from&&e.to?(a(e.from.element),a(e.to.element)):a(e.element)}function S(){var e=i(u);!e||"leave"===d&&y.$$domOperationFired||e.end()}function A(t){u.off("$destroy",S),a(u),v(u,y),m(u,y),y.domOperation(),D&&e.removeClass(u,D),u.removeClass(X),M.complete(!t)}y=p(y);var C=["enter","move","leave"].indexOf(d)>=0,M=new c({end:function(){A()},cancel:function(){A(!0)}});if(!o.length)return A(),M;t(u,M);var _=n(u.attr("class"),n(y.addClass,y.removeClass)),D=y.tempClasses;D&&(_+=" "+D,y.tempClasses=null);var T;return C&&(T="ng-"+d+"-prepare",e.addClass(u,T)),h.push({element:u,classes:_,event:d,structural:C,options:y,beforeStart:function(){u.addClass(X),D&&e.addClass(u,D),T&&(e.removeClass(u,T),T=null)},close:A}),u.on("$destroy",S),h.length>1?M:(r.$$postDigest(function(){var e=[];z(h,function(t){i(t.element)?e.push(t):t.close()}),h.length=0;var t=$(e),a=[];z(t,function(e){a.push({domNode:b(e.from?e.from.element:e.element),fn:function(){e.beforeStart();var t,a=e.close;if(i(e.anchors?e.from.element||e.to.element:e.element)){var n=k(e);n&&(t=n.start)}if(t){var s=t();s.done(function(e){a(!e)}),I(e,s)}else a()}})}),g(f(a))}),M)}}]}],Se=["$animate","$rootScope",function(e,t){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,a,n,i,s){var o,r;t.$watchCollection(n.ngAnimateSwap||n.for,function(n){o&&e.leave(o),r&&(r.$destroy(),r=null),(n||0===n)&&(r=t.$new(),s(r,function(t){o=t,e.enter(t,null,a)}))})}}}];t.module("ngAnimate",[]).directive("ngAnimateSwap",Se).directive("ngAnimateChildren",ue).factory("$$rAFScheduler",ce).provider("$$animateQueue",ke).provider("$$animation",Ie).provider("$animateCss",ve).provider("$$animateCssDriver",be).provider("$$animateJs",ye).provider("$$animateJsDriver",we)}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(e,t,a,n){var i=n.has("$animateCss")?n.get("$animateCss"):null;return{link:function(n,s,o){function r(e){return h?{width:e.scrollWidth+"px"}:{height:e.scrollHeight+"px"}}function l(){s.hasClass("collapse")&&s.hasClass("in")||t.resolve(p(n)).then(function(){s.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),i?i(s,{addClass:"in",easing:"ease",to:r(s[0])}).start().finally(c):e.addClass(s,"in",{to:r(s[0])}).then(c)})}function c(){s.removeClass("collapsing").addClass("collapse").css(v),m(n)}function u(){if(!s.hasClass("collapse")&&!s.hasClass("in"))return d();t.resolve(g(n)).then(function(){s.css(r(s[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),i?i(s,{removeClass:"in",to:b}).start().finally(d):e.removeClass(s,"in",{to:b}).then(d)})}function d(){s.css(b),s.removeClass("collapsing").addClass("collapse"),f(n)}var p=a(o.expanding),m=a(o.expanded),g=a(o.collapsing),f=a(o.collapsed),h=!1,v={},b={};(h=!!("horizontal"in o))?(v={width:"auto",height:"inherit"},b={width:"0"}):(v={width:"inherit",height:"auto"},b={height:"0"}),n.$eval(o.uibCollapse)||s.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(v),n.$watch(o.uibCollapse,function(e){e?u():l()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(e,t,a){a.$observe("disabled",function(e){a.$set("tabindex",e?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(e,t,a){this.groups=[],this.closeOthers=function(n){(angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):a.closeOthers)&&angular.forEach(this.groups,function(e){e!==n&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(a){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,a,n){t.addClass("panel"),n.addGroup(e),e.openClass=a.openClass||"panel-open",e.panelClass=a.panelClass||"panel-default",e.$watch("isOpen",function(a){t.toggleClass(e.openClass,!!a),a&&n.closeOthers(e)}),e.toggleOpen=function(t){e.isDisabled||t&&32!==t.which||(e.isOpen=!e.isOpen)};var i="accordiongroup-"+e.$id+"-"+Math.floor(1e4*Math.random());e.headingId=i+"-tab",e.panelId=i+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(e,t,a,n,i){n.setHeading(i(e,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(e,t,a,n){e.$watch(function(){return n[a.uibAccordionTransclude]},function(e){if(e){var a=angular.element(t[0].querySelector("uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"));a.html(""),a.append(e)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(e,t,a,n,i){e.closeable=!!a.close,t.addClass("alert"),a.$set("role","alert"),e.closeable&&t.addClass("alert-dismissible");var s=angular.isDefined(a.dismissOnTimeout)?n(a.dismissOnTimeout)(e.$parent):null;s&&i(function(){e.close()},parseInt(s,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(e){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(t,a,n,i){var s=i[0],o=i[1],r=e(n.uibUncheckable);a.find("input").css({display:"none"}),o.$render=function(){a.toggleClass(s.activeClass,angular.equals(o.$modelValue,t.$eval(n.uibBtnRadio)))},a.on(s.toggleEvent,function(){if(!n.disabled){var e=a.hasClass(s.activeClass);e&&!angular.isDefined(n.uncheckable)||t.$apply(function(){o.$setViewValue(e?null:t.$eval(n.uibBtnRadio)),o.$render()})}}),n.uibUncheckable&&t.$watch(r,function(e){n.$set("uncheckable",e?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(e,t,a,n){function i(){return o(a.btnCheckboxTrue,!0)}function s(){return o(a.btnCheckboxFalse,!1)}function o(t,a){return angular.isDefined(t)?e.$eval(t):a}var r=n[0],l=n[1];t.find("input").css({display:"none"}),l.$render=function(){t.toggleClass(r.activeClass,angular.equals(l.$modelValue,i()))},t.on(r.toggleEvent,function(){a.disabled||e.$apply(function(){l.$setViewValue(t.hasClass(r.activeClass)?s():i()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(e,t,a,n,i){function s(){for(;b.length;)b.shift()}function o(e){for(var t=0;t<f.length;t++)f[t].slide.active=t===e}function r(a,n,l){if(!y){if(angular.extend(a,{direction:l}),angular.extend(f[v].slide||{},{direction:l}),i.enabled(t)&&!e.$currentTransition&&f[n].element&&g.slides.length>1){f[n].element.data(h,a.direction);var c=g.getCurrentIndex();angular.isNumber(c)&&f[c].element&&f[c].element.data(h,a.direction),e.$currentTransition=!0,i.on("addClass",f[n].element,function(t,a){if("close"===a&&(e.$currentTransition=null,i.off("addClass",t),b.length)){var n=b.pop().slide,o=n.index,l=o>g.getCurrentIndex()?"next":"prev";s(),r(n,o,l)}})}e.active=a.index,v=a.index,o(n),u()}}function l(e){for(var t=0;t<f.length;t++)if(f[t].slide===e)return t}function c(){p&&(a.cancel(p),p=null)}function u(){c();var t=+e.interval;!isNaN(t)&&t>0&&(p=a(d,t))}function d(){var t=+e.interval;m&&!isNaN(t)&&t>0&&f.length?e.next():e.pause()}var p,m,g=this,f=g.slides=e.slides=[],h="uib-slideDirection",v=e.active,b=[],y=!1;t.addClass("carousel"),g.addSlide=function(t,a){f.push({slide:t,element:a}),f.sort(function(e,t){return+e.slide.index-+t.slide.index}),(t.index===e.active||1===f.length&&!angular.isNumber(e.active))&&(e.$currentTransition&&(e.$currentTransition=null),v=t.index,e.active=t.index,o(v),g.select(f[l(t)]),1===f.length&&e.play())},g.getCurrentIndex=function(){for(var e=0;e<f.length;e++)if(f[e].slide.index===v)return e},g.next=e.next=function(){var t=(g.getCurrentIndex()+1)%f.length;{if(0!==t||!e.noWrap())return g.select(f[t],"next");e.pause()}},g.prev=e.prev=function(){var t=g.getCurrentIndex()-1<0?f.length-1:g.getCurrentIndex()-1;{if(!e.noWrap()||t!==f.length-1)return g.select(f[t],"prev");e.pause()}},g.removeSlide=function(t){var a=l(t),n=b.indexOf(f[a]);-1!==n&&b.splice(n,1),f.splice(a,1),f.length>0&&v===a?a>=f.length?(v=f.length-1,e.active=v,o(v),g.select(f[f.length-1])):(v=a,e.active=v,o(v),g.select(f[a])):v>a&&(v--,e.active=v),0===f.length&&(v=null,e.active=null,s())},g.select=e.select=function(t,a){var n=l(t.slide);void 0===a&&(a=n>g.getCurrentIndex()?"next":"prev"),t.slide.index===v||e.$currentTransition?t&&t.slide.index!==v&&e.$currentTransition&&b.push(f[n]):r(t.slide,n,a)},e.indexOfSlide=function(e){return+e.slide.index},e.isActive=function(t){return e.active===t.slide.index},e.isPrevDisabled=function(){return 0===e.active&&e.noWrap()},e.isNextDisabled=function(){return e.active===f.length-1&&e.noWrap()},e.pause=function(){e.noPause||(m=!1,c())},e.play=function(){m||(m=!0,u())},t.on("mouseenter",e.pause),t.on("mouseleave",e.play),e.$on("$destroy",function(){y=!0,c()}),e.$watch("noTransition",function(e){i.enabled(t,!e)}),e.$watch("interval",u),e.$watchCollection("slides",function(t){t.length||(e.$currentTransition=null,s())}),e.$watch("active",function(e){if(angular.isNumber(e)&&v!==e){for(var t=0;t<f.length;t++)if(f[t].slide.index===e){e=t;break}f[e]&&(o(e),g.select(f[e]),v=e)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(e){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(t,a,n,i){a.addClass("item"),i.addSlide(t,a),t.$on("$destroy",function(){i.removeSlide(t)}),t.$watch("active",function(t){e[t?"addClass":"removeClass"](a,"active")})}}}]).animation(".item",["$animateCss",function(e){function t(e,t,a){e.removeClass(t),a&&a()}return{beforeAddClass:function(a,n,i){if("active"===n){var s=!1,o=a.data("uib-slideDirection"),r="next"===o?"left":"right",l=t.bind(this,a,r+" "+o,i);return a.addClass(o),e(a,{addClass:r}).start().done(l),function(){s=!0}}i()},beforeRemoveClass:function(a,n,i){if("active"===n){var s=!1,o="next"===a.data("uib-slideDirection")?"left":"right",r=t.bind(this,a,o,i);return e(a,{addClass:o}).start().done(r),function(){s=!0}}i()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(e,t,a,n){function i(e){var t=[],a=e.split(""),i=e.indexOf("'");if(i>-1){var s=!1;e=e.split("");for(var o=i;o<e.length;o++)s?("'"===e[o]&&(o+1<e.length&&"'"===e[o+1]?(e[o+1]="$",a[o+1]=""):(a[o]="",s=!1)),e[o]="$"):"'"===e[o]&&(e[o]="$",a[o]="",s=!0);e=e.join("")}return angular.forEach(g,function(n){var i=e.indexOf(n.key);if(i>-1){e=e.split(""),a[i]="("+n.regex+")",e[i]="$";for(var s=i+1,o=i+n.key.length;s<o;s++)a[s]="",e[s]="$";e=e.join(""),t.push({index:i,key:n.key,apply:n.apply,matcher:n.regex})}}),{regex:new RegExp("^"+a.join("")+"$"),map:n(t,"index")}}function s(e){for(var t,a,n=[],i=0;i<e.length;)if(angular.isNumber(a)){if("'"===e.charAt(i))(i+1>=e.length||"'"!==e.charAt(i+1))&&(n.push(o(e,a,i)),a=null);else if(i===e.length)for(;a<e.length;)t=r(e,a),n.push(t),a=t.endIdx;i++}else"'"!==e.charAt(i)?(t=r(e,i),n.push(t.parser),i=t.endIdx):(a=i,i++);return n}function o(e,t,a){return function(){return e.substr(t+1,a-t-1)}}function r(e,t){for(var a=e.substr(t),n=0;n<g.length;n++)if(new RegExp("^"+g[n].key).test(a)){var i=g[n];return{endIdx:t+i.key.length,parser:i.formatter}}return{endIdx:t+1,parser:function(){return a.charAt(0)}}}function l(e,t,a){return!(a<1)&&(1===t&&a>28?29===a&&(e%4==0&&e%100!=0||e%400==0):3!==t&&5!==t&&8!==t&&10!==t||a<31)}function c(e){return parseInt(e,10)}function u(e,t){e=e.replace(/:/g,"");var a=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(a)?t:a}function d(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}function p(e,t,a){a=a?-1:1;var n=e.getTimezoneOffset();return d(e,a*(u(t,n)-n))}var m,g,f=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=t.id,this.parsers={},this.formatters={},g=[{key:"yyyy",regex:"\\d{4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),a(t,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(e){e=+e,this.year=e<69?e+2e3:e+1900},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),a(t,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),a(t,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){var t=e.getMonth();return/^[0-9]$/.test(t)?a(e,"MM"):a(e,"M")}},{key:"MMMM",regex:t.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.MONTH.indexOf(e)},formatter:function(e){return a(e,"MMMM")}},{key:"MMM",regex:t.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=t.DATETIME_FORMATS.SHORTMONTH.indexOf(e)},formatter:function(e){return a(e,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return a(e,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return a(e,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){var t=e.getDate();return/^[1-9]$/.test(t)?a(e,"dd"):a(e,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return a(e,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return a(e,"d")}},{key:"EEEE",regex:t.DATETIME_FORMATS.DAY.join("|"),formatter:function(e){return a(e,"EEEE")}},{key:"EEE",regex:t.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(e){return a(e,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return a(e,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return a(e,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return a(e,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return a(e,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return a(e,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return a(e,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(e){this.milliseconds=+e},formatter:function(e){return a(e,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return a(e,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return a(e,"s")}},{key:"a",regex:t.DATETIME_FORMATS.AMPMS.join("|"),apply:function(e){12===this.hours&&(this.hours=0),"PM"===e&&(this.hours+=12)},formatter:function(e){return a(e,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(e){var t=e.match(/([+-])(\d{2})(\d{2})/),a=t[1],n=t[2],i=t[3];this.hours+=c(a+n),this.minutes+=c(a+i)},formatter:function(e){return a(e,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(e){return a(e,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(e){return a(e,"w")}},{key:"GGGG",regex:t.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(e){return a(e,"GGGG")}},{key:"GGG",regex:t.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return a(e,"GGG")}},{key:"GG",regex:t.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return a(e,"GG")}},{key:"G",regex:t.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return a(e,"G")}}]},this.init(),this.filter=function(e,a){return angular.isDate(e)&&!isNaN(e)&&a?(a=t.DATETIME_FORMATS[a]||a,t.id!==m&&this.init(),this.formatters[a]||(this.formatters[a]=s(a)),this.formatters[a].reduce(function(t,a){return t+a(e)},"")):""},this.parse=function(a,n,s){if(!angular.isString(a)||!n)return a;n=(n=t.DATETIME_FORMATS[n]||n).replace(f,"\\$&"),t.id!==m&&this.init(),this.parsers[n]||(this.parsers[n]=i(n));var o=this.parsers[n],r=o.regex,c=o.map,u=a.match(r),d=!1;if(u&&u.length){var p,g;angular.isDate(s)&&!isNaN(s.getTime())?p={year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hours:s.getHours(),minutes:s.getMinutes(),seconds:s.getSeconds(),milliseconds:s.getMilliseconds()}:(s&&e.warn("dateparser:","baseDate is not a valid date"),p={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var h=1,v=u.length;h<v;h++){var b=c[h-1];"Z"===b.matcher&&(d=!0),b.apply&&b.apply.call(p,u[h])}var y=d?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,w=d?Date.prototype.setUTCHours:Date.prototype.setHours;return l(p.year,p.month,p.date)&&(!angular.isDate(s)||isNaN(s.getTime())||d?(g=new Date(0),y.call(g,p.year,p.month,p.date),w.call(g,p.hours||0,p.minutes||0,p.seconds||0,p.milliseconds||0)):(g=new Date(s),y.call(g,p.year,p.month,p.date),w.call(g,p.hours,p.minutes,p.seconds,p.milliseconds))),g}},this.toTimezone=function(e,t){return e&&t?p(e,t):e},this.fromTimezone=function(e,t){return e&&t?p(e,t,!0):e},this.timezoneToOffset=u,this.addDateMinutes=d,this.convertTimezoneToLocal=p}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(e){var t=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,a=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(n,i){function s(t,n){var i=t.match(a),s=n.$eval(i[1]),o=i[2],r=c[t];if(!r){var u=function(t){var a=null;l.some(function(e){if(e.scope.$eval(d)===t)return a=e,!0}),r.lastActivated!==a&&(r.lastActivated&&e.removeClass(r.lastActivated.element,s),a&&e.addClass(a.element,s),r.lastActivated=a)};c[t]=r={lastActivated:null,scope:n,watchFn:u,compareWithExp:o,watcher:n.$watch(o,u)}}r.watchFn(n.$eval(o))}function o(e){var t=e.targetScope,a=r.indexOf(t);if(r.splice(a,1),l.splice(a,1),r.length){var n=r[0];angular.forEach(c,function(e){e.scope===t&&(e.watcher=n.$watch(e.compareWithExp,e.watchFn),e.scope=n)})}else c={}}var r=[],l=[],c={},u=i.uibIsClass.match(t),d=u[2],p=u[1].split(",");return function(e,t,a){r.push(e),l.push({scope:e,element:t}),p.forEach(function(t,a){s(t,e)}),e.$on("$destroy",o)}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(e,t,a,n,i,s,o,r,l,c,u,d){function p(t){e.datepickerMode=t,e.datepickerOptions.datepickerMode=t}var m=this,g={$setViewValue:angular.noop},f={},h=[];t.addClass("uib-datepicker"),a.$set("role","application"),e.datepickerOptions||(e.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(t){switch(t){case"customClass":case"dateDisabled":e[t]=e.datepickerOptions[t]||angular.noop;break;case"datepickerMode":e.datepickerMode=angular.isDefined(e.datepickerOptions.datepickerMode)?e.datepickerOptions.datepickerMode:l.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[t]=angular.isDefined(e.datepickerOptions[t])?i(e.datepickerOptions[t])(e.$parent):l[t];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[t]=angular.isDefined(e.datepickerOptions[t])?e.datepickerOptions[t]:l[t];break;case"startingDay":angular.isDefined(e.datepickerOptions.startingDay)?m.startingDay=e.datepickerOptions.startingDay:angular.isNumber(l.startingDay)?m.startingDay=l.startingDay:m.startingDay=(s.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":e.$watch("datepickerOptions."+t,function(e){e?angular.isDate(e)?m[t]=d.fromTimezone(new Date(e),f.timezone):(c&&o.warn("Literal date support has been deprecated, please switch to date object usage"),m[t]=new Date(r(e,"medium"))):m[t]=l[t]?d.fromTimezone(new Date(l[t]),f.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":e.datepickerOptions[t]?e.$watch(function(){return e.datepickerOptions[t]},function(a){m[t]=e[t]=angular.isDefined(a)?a:datepickerOptions[t],("minMode"===t&&m.modes.indexOf(e.datepickerOptions.datepickerMode)<m.modes.indexOf(m[t])||"maxMode"===t&&m.modes.indexOf(e.datepickerOptions.datepickerMode)>m.modes.indexOf(m[t]))&&(e.datepickerMode=m[t],e.datepickerOptions.datepickerMode=m[t])}):m[t]=e[t]=l[t]||null}}),e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),e.disabled=angular.isDefined(a.disabled)||!1,angular.isDefined(a.ngDisabled)&&h.push(e.$parent.$watch(a.ngDisabled,function(t){e.disabled=t,m.refreshView()})),e.isActive=function(t){return 0===m.compare(t.date,m.activeDate)&&(e.activeDateId=t.uid,!0)},this.init=function(t){g=t,f=t.$options||e.datepickerOptions.ngModelOptions||l.ngModelOptions,e.datepickerOptions.initDate?(m.activeDate=d.fromTimezone(e.datepickerOptions.initDate,f.timezone)||new Date,e.$watch("datepickerOptions.initDate",function(e){e&&(g.$isEmpty(g.$modelValue)||g.$invalid)&&(m.activeDate=d.fromTimezone(e,f.timezone),m.refreshView())})):m.activeDate=new Date;var a=g.$modelValue?new Date(g.$modelValue):new Date;this.activeDate=isNaN(a)?d.fromTimezone(new Date,f.timezone):d.fromTimezone(a,f.timezone),g.$render=function(){m.render()}},this.render=function(){if(g.$viewValue){var e=new Date(g.$viewValue);!isNaN(e)?this.activeDate=d.fromTimezone(e,f.timezone):u||o.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){e.selectedDt=null,this._refreshView(),e.activeDt&&(e.activeDateId=e.activeDt.uid);var t=g.$viewValue?new Date(g.$viewValue):null;t=d.fromTimezone(t,f.timezone),g.$setValidity("dateDisabled",!t||this.element&&!this.isDisabled(t))}},this.createDateObject=function(t,a){var n=g.$viewValue?new Date(g.$viewValue):null;n=d.fromTimezone(n,f.timezone);var i=new Date;i=d.fromTimezone(i,f.timezone);var s=this.compare(t,i),o={date:t,label:d.filter(t,a),selected:n&&0===this.compare(t,n),disabled:this.isDisabled(t),past:s<0,current:0===s,future:s>0,customClass:this.customClass(t)||null};return n&&0===this.compare(t,n)&&(e.selectedDt=o),m.activeDate&&0===this.compare(o.date,m.activeDate)&&(e.activeDt=o),o},this.isDisabled=function(t){return e.disabled||this.minDate&&this.compare(t,this.minDate)<0||this.maxDate&&this.compare(t,this.maxDate)>0||e.dateDisabled&&e.dateDisabled({date:t,mode:e.datepickerMode})},this.customClass=function(t){return e.customClass({date:t,mode:e.datepickerMode})},this.split=function(e,t){for(var a=[];e.length>0;)a.push(e.splice(0,t));return a},e.select=function(t){if(e.datepickerMode===m.minMode){var a=g.$viewValue?d.fromTimezone(new Date(g.$viewValue),f.timezone):new Date(0,0,0,0,0,0,0);a.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),a=d.toTimezone(a,f.timezone),g.$setViewValue(a),g.$render()}else m.activeDate=t,p(m.modes[m.modes.indexOf(e.datepickerMode)-1]),e.$emit("uib:datepicker.mode");e.$broadcast("uib:datepicker.focus")},e.move=function(e){var t=m.activeDate.getFullYear()+e*(m.step.years||0),a=m.activeDate.getMonth()+e*(m.step.months||0);m.activeDate.setFullYear(t,a,1),m.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===m.maxMode&&1===t||e.datepickerMode===m.minMode&&-1===t||(p(m.modes[m.modes.indexOf(e.datepickerMode)+t]),e.$emit("uib:datepicker.mode"))},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};e.$on("uib:datepicker.focus",function(){m.element[0].focus()}),e.keydown=function(t){var a=e.keys[t.which];if(a&&!t.shiftKey&&!t.altKey&&!e.disabled)if(t.preventDefault(),m.shortcutPropagation||t.stopPropagation(),"enter"===a||"space"===a){if(m.isDisabled(m.activeDate))return;e.select(m.activeDate)}else!t.ctrlKey||"up"!==a&&"down"!==a?(m.handleKeyDown(a,t),m.refreshView()):e.toggleMode("up"===a?1:-1)},t.on("keydown",function(t){e.$apply(function(){e.keydown(t)})}),e.$on("$destroy",function(){for(;h.length;)h.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(e,t,a){function n(e,t){return 1!==t||e%4!=0||e%100==0&&e%400!=0?s[t]:29}function i(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var a=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((a-t)/864e5)/7)+1}var s=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=t,this.init=function(t){angular.extend(t,this),e.showWeeks=t.showWeeks,t.refreshView()},this.getDates=function(e,t){for(var a,n=new Array(t),i=new Date(e),s=0;s<t;)a=new Date(i),n[s++]=a,i.setDate(i.getDate()+1);return n},this._refreshView=function(){var t=this.activeDate.getFullYear(),n=this.activeDate.getMonth(),s=new Date(this.activeDate);s.setFullYear(t,n,1);var o=this.startingDay-s.getDay(),r=o>0?7-o:-o,l=new Date(s);r>0&&l.setDate(1-r);for(var c=this.getDates(l,42),u=0;u<42;u++)c[u]=angular.extend(this.createDateObject(c[u],this.formatDay),{secondary:c[u].getMonth()!==n,uid:e.uniqueId+"-"+u});e.labels=new Array(7);for(var d=0;d<7;d++)e.labels[d]={abbr:a(c[d].date,this.formatDayHeader),full:a(c[d].date,"EEEE")};if(e.title=a(this.activeDate,this.formatDayTitle),e.rows=this.split(c,7),e.showWeeks){e.weekNumbers=[];for(var p=(11-this.startingDay)%7,m=e.rows.length,g=0;g<m;g++)e.weekNumbers.push(i(e.rows[g][p].date))}},this.compare=function(e,t){var a=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return a.setFullYear(e.getFullYear()),n.setFullYear(t.getFullYear()),a-n},this.handleKeyDown=function(e,t){var a=this.activeDate.getDate();if("left"===e)a-=1;else if("up"===e)a-=7;else if("right"===e)a+=1;else if("down"===e)a+=7;else if("pageup"===e||"pagedown"===e){var i=this.activeDate.getMonth()+("pageup"===e?-1:1);this.activeDate.setMonth(i,1),a=Math.min(n(this.activeDate.getFullYear(),this.activeDate.getMonth()),a)}else"home"===e?a=1:"end"===e&&(a=n(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(a)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(e,t,a){this.step={years:1},this.element=t,this.init=function(e){angular.extend(e,this),e.refreshView()},this._refreshView=function(){for(var t,n=new Array(12),i=this.activeDate.getFullYear(),s=0;s<12;s++)(t=new Date(this.activeDate)).setFullYear(i,s,1),n[s]=angular.extend(this.createDateObject(t,this.formatMonth),{uid:e.uniqueId+"-"+s});e.title=a(this.activeDate,this.formatMonthTitle),e.rows=this.split(n,this.monthColumns),e.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(e,t){var a=new Date(e.getFullYear(),e.getMonth()),n=new Date(t.getFullYear(),t.getMonth());return a.setFullYear(e.getFullYear()),n.setFullYear(t.getFullYear()),a-n},this.handleKeyDown=function(e,t){var a=this.activeDate.getMonth();if("left"===e)a-=1;else if("up"===e)a-=this.monthColumns;else if("right"===e)a+=1;else if("down"===e)a+=this.monthColumns;else if("pageup"===e||"pagedown"===e){var n=this.activeDate.getFullYear()+("pageup"===e?-1:1);this.activeDate.setFullYear(n)}else"home"===e?a=0:"end"===e&&(a=11);this.activeDate.setMonth(a)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(e,t,a){function n(e){return parseInt((e-1)/s,10)*s+1}var i,s;this.element=t,this.yearpickerInit=function(){i=this.yearColumns,s=this.yearRows*i,this.step={years:s}},this._refreshView=function(){for(var t,a=new Array(s),o=0,r=n(this.activeDate.getFullYear());o<s;o++)(t=new Date(this.activeDate)).setFullYear(r+o,0,1),a[o]=angular.extend(this.createDateObject(t,this.formatYear),{uid:e.uniqueId+"-"+o});e.title=[a[0].label,a[s-1].label].join(" - "),e.rows=this.split(a,i),e.columns=i},this.compare=function(e,t){return e.getFullYear()-t.getFullYear()},this.handleKeyDown=function(e,t){var a=this.activeDate.getFullYear();"left"===e?a-=1:"up"===e?a-=i:"right"===e?a+=1:"down"===e?a+=i:"pageup"===e||"pagedown"===e?a+=("pageup"===e?-1:1)*s:"home"===e?a=n(this.activeDate.getFullYear()):"end"===e&&(a=n(this.activeDate.getFullYear())+s-1),this.activeDate.setFullYear(a)}}]).directive("uibDatepicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(e,t,a,n){var i=n[0],s=n[1];i.init(s)}}}).directive("uibDaypicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(e,t,a,n){var i=n[0];n[1].init(i)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(e,t,a,n){var i=n[0];n[1].init(i)}}}).directive("uibYearpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(e,t,a,n){var i=n[0];angular.extend(i,n[1]),i.yearpickerInit(),i.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(e,t){var a,n,i={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},s={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},o=/(HTML|BODY)/;return{getRawNode:function(e){return e.nodeName?e:e[0]||e},parseStyle:function(e){return e=parseFloat(e),isFinite(e)?e:0},offsetParent:function(a){for(var n=(a=this.getRawNode(a)).offsetParent||e[0].documentElement;n&&n!==e[0].documentElement&&function(e){return"static"===(t.getComputedStyle(e).position||"static")}(n);)n=n.offsetParent;return n||e[0].documentElement},scrollbarWidth:function(i){if(i){if(angular.isUndefined(n)){var s=e.find("body");s.addClass("uib-position-body-scrollbar-measure"),n=t.innerWidth-s[0].clientWidth,n=isFinite(n)?n:0,s.removeClass("uib-position-body-scrollbar-measure")}return n}if(angular.isUndefined(a)){var o=angular.element('<div class="uib-position-scrollbar-measure"></div>');e.find("body").append(o),a=o[0].offsetWidth-o[0].clientWidth,a=isFinite(a)?a:0,o.remove()}return a},scrollbarPadding:function(e){e=this.getRawNode(e);var a=t.getComputedStyle(e),n=this.parseStyle(a.paddingRight),i=this.parseStyle(a.paddingBottom),s=this.scrollParent(e,!1,!0),r=this.scrollbarWidth(s,o.test(s.tagName));return{scrollbarWidth:r,widthOverflow:s.scrollWidth>s.clientWidth,right:n+r,originalRight:n,heightOverflow:s.scrollHeight>s.clientHeight,bottom:i+r,originalBottom:i}},isScrollable:function(e,a){e=this.getRawNode(e);var n=a?i.hidden:i.normal,s=t.getComputedStyle(e);return n.test(s.overflow+s.overflowY+s.overflowX)},scrollParent:function(a,n,s){a=this.getRawNode(a);var o=n?i.hidden:i.normal,r=e[0].documentElement,l=t.getComputedStyle(a);if(s&&o.test(l.overflow+l.overflowY+l.overflowX))return a;var c="absolute"===l.position,u=a.parentElement||r;if(u===r||"fixed"===l.position)return r;for(;u.parentElement&&u!==r;){var d=t.getComputedStyle(u);if(c&&"static"!==d.position&&(c=!1),!c&&o.test(d.overflow+d.overflowY+d.overflowX))break;u=u.parentElement}return u},position:function(a,n){a=this.getRawNode(a);var i=this.offset(a);if(n){var s=t.getComputedStyle(a);i.top-=this.parseStyle(s.marginTop),i.left-=this.parseStyle(s.marginLeft)}var o=this.offsetParent(a),r={top:0,left:0};return o!==e[0].documentElement&&((r=this.offset(o)).top+=o.clientTop-o.scrollTop,r.left+=o.clientLeft-o.scrollLeft),{width:Math.round(angular.isNumber(i.width)?i.width:a.offsetWidth),height:Math.round(angular.isNumber(i.height)?i.height:a.offsetHeight),top:Math.round(i.top-r.top),left:Math.round(i.left-r.left)}},offset:function(a){var n=(a=this.getRawNode(a)).getBoundingClientRect();return{width:Math.round(angular.isNumber(n.width)?n.width:a.offsetWidth),height:Math.round(angular.isNumber(n.height)?n.height:a.offsetHeight),top:Math.round(n.top+(t.pageYOffset||e[0].documentElement.scrollTop)),left:Math.round(n.left+(t.pageXOffset||e[0].documentElement.scrollLeft))}},viewportOffset:function(a,n,i){i=!1!==i;var s=(a=this.getRawNode(a)).getBoundingClientRect(),o={top:0,left:0,bottom:0,right:0},r=n?e[0].documentElement:this.scrollParent(a),l=r.getBoundingClientRect();if(o.top=l.top+r.clientTop,o.left=l.left+r.clientLeft,r===e[0].documentElement&&(o.top+=t.pageYOffset,o.left+=t.pageXOffset),o.bottom=o.top+r.clientHeight,o.right=o.left+r.clientWidth,i){var c=t.getComputedStyle(r);o.top+=this.parseStyle(c.paddingTop),o.bottom-=this.parseStyle(c.paddingBottom),o.left+=this.parseStyle(c.paddingLeft),o.right-=this.parseStyle(c.paddingRight)}return{top:Math.round(s.top-o.top),bottom:Math.round(o.bottom-s.bottom),left:Math.round(s.left-o.left),right:Math.round(o.right-s.right)}},parsePlacement:function(e){var t=s.auto.test(e);return t&&(e=e.replace(s.auto,"")),e=e.split("-"),e[0]=e[0]||"top",s.primary.test(e[0])||(e[0]="top"),e[1]=e[1]||"center",s.secondary.test(e[1])||(e[1]="center"),e[2]=!!t,e},positionElements:function(e,a,n,i){e=this.getRawNode(e),a=this.getRawNode(a);var o=angular.isDefined(a.offsetWidth)?a.offsetWidth:a.prop("offsetWidth"),r=angular.isDefined(a.offsetHeight)?a.offsetHeight:a.prop("offsetHeight");n=this.parsePlacement(n);var l=i?this.offset(e):this.position(e),c={top:0,left:0,placement:""};if(n[2]){var u=this.viewportOffset(e,i),d=t.getComputedStyle(a),p={width:o+Math.round(Math.abs(this.parseStyle(d.marginLeft)+this.parseStyle(d.marginRight))),height:r+Math.round(Math.abs(this.parseStyle(d.marginTop)+this.parseStyle(d.marginBottom)))};if(n[0]="top"===n[0]&&p.height>u.top&&p.height<=u.bottom?"bottom":"bottom"===n[0]&&p.height>u.bottom&&p.height<=u.top?"top":"left"===n[0]&&p.width>u.left&&p.width<=u.right?"right":"right"===n[0]&&p.width>u.right&&p.width<=u.left?"left":n[0],n[1]="top"===n[1]&&p.height-l.height>u.bottom&&p.height-l.height<=u.top?"bottom":"bottom"===n[1]&&p.height-l.height>u.top&&p.height-l.height<=u.bottom?"top":"left"===n[1]&&p.width-l.width>u.right&&p.width-l.width<=u.left?"right":"right"===n[1]&&p.width-l.width>u.left&&p.width-l.width<=u.right?"left":n[1],"center"===n[1])if(s.vertical.test(n[0])){var m=l.width/2-o/2;u.left+m<0&&p.width-l.width<=u.right?n[1]="left":u.right+m<0&&p.width-l.width<=u.left&&(n[1]="right")}else{var g=l.height/2-p.height/2;u.top+g<0&&p.height-l.height<=u.bottom?n[1]="top":u.bottom+g<0&&p.height-l.height<=u.top&&(n[1]="bottom")}}switch(n[0]){case"top":c.top=l.top-r;break;case"bottom":c.top=l.top+l.height;break;case"left":c.left=l.left-o;break;case"right":c.left=l.left+l.width}switch(n[1]){case"top":c.top=l.top;break;case"bottom":c.top=l.top+l.height-r;break;case"left":c.left=l.left;break;case"right":c.left=l.left+l.width-o;break;case"center":s.vertical.test(n[0])?c.left=l.left+l.width/2-o/2:c.top=l.top+l.height/2-r/2}return c.top=Math.round(c.top),c.left=Math.round(c.left),c.placement="center"===n[1]?n[0]:n[0]+"-"+n[1],c},adjustTop:function(e,t,a,n){if(-1!==e.indexOf("top")&&a!==n)return{top:t.top-n+"px"}},positionArrow:function(e,a){var n=(e=this.getRawNode(e)).querySelector(".tooltip-inner, .popover-inner");if(n){var i=angular.element(n).hasClass("tooltip-inner"),o=i?e.querySelector(".tooltip-arrow"):e.querySelector(".arrow");if(o){var r={top:"",bottom:"",left:"",right:""};if("center"!==(a=this.parsePlacement(a))[1]){var l="border-"+a[0]+"-width",c=t.getComputedStyle(o)[l],u="border-";s.vertical.test(a[0])?u+=a[0]+"-"+a[1]:u+=a[1]+"-"+a[0],u+="-radius";var d=t.getComputedStyle(i?n:e)[u];switch(a[0]){case"top":r.bottom=i?"0":"-"+c;break;case"bottom":r.top=i?"0":"-"+c;break;case"left":r.right=i?"0":"-"+c;break;case"right":r.left=i?"0":"-"+c}r[a[1]]=d,angular.element(o).css(r)}else angular.element(o).css(r)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(e,t,a,n,i,s,o,r,l,c,u,d,p,m,g,f){function h(t){var a=d.parse(t,x,e.date);if(isNaN(a))for(var n=0;n<j.length;n++)if(a=d.parse(t,j[n],e.date),!isNaN(a))return a;return a}function v(e){if(angular.isNumber(e)&&(e=new Date(e)),!e)return null;if(angular.isDate(e)&&!isNaN(e))return e;if(angular.isString(e)){var t=h(e);if(!isNaN(t))return t}return T.$options&&T.$options.allowInvalid?e:void 0}function b(e,t){var n=e||t;return!a.ngRequired&&!n||(angular.isNumber(n)&&(n=new Date(n)),!n||(!(!angular.isDate(n)||isNaN(n))||!!angular.isString(n)&&!isNaN(h(n))))}function y(a){if(e.isOpen||!e.disabled){var n=P[0],i=t[0].contains(a.target),s=void 0!==n.contains&&n.contains(a.target);!e.isOpen||i||s||e.$apply(function(){e.isOpen=!1})}}function w(a){27===a.which&&e.isOpen?(a.preventDefault(),a.stopPropagation(),e.$apply(function(){e.isOpen=!1}),t[0].focus()):40!==a.which||e.isOpen||(a.preventDefault(),a.stopPropagation(),e.$apply(function(){e.isOpen=!0}))}function $(){if(e.isOpen){var n=angular.element(P[0].querySelector(".uib-datepicker-popup")),i=a.popupPlacement?a.popupPlacement:p.placement,s=c.positionElements(t,n,i,I);n.css({top:s.top+"px",left:s.left+"px"}),n.hasClass("uib-position-measure")&&n.removeClass("uib-position-measure")}}var x,k,I,S,A,C,M,_,D,T,E,P,j,N=!1,O=[];this.init=function(i){if(T=i,E=i.$options,k=angular.isDefined(a.closeOnDateSelection)?e.$parent.$eval(a.closeOnDateSelection):p.closeOnDateSelection,I=angular.isDefined(a.datepickerAppendToBody)?e.$parent.$eval(a.datepickerAppendToBody):p.appendToBody,S=angular.isDefined(a.onOpenFocus)?e.$parent.$eval(a.onOpenFocus):p.onOpenFocus,A=angular.isDefined(a.datepickerPopupTemplateUrl)?a.datepickerPopupTemplateUrl:p.datepickerPopupTemplateUrl,C=angular.isDefined(a.datepickerTemplateUrl)?a.datepickerTemplateUrl:p.datepickerTemplateUrl,j=angular.isDefined(a.altInputFormats)?e.$parent.$eval(a.altInputFormats):p.altInputFormats,e.showButtonBar=angular.isDefined(a.showButtonBar)?e.$parent.$eval(a.showButtonBar):p.showButtonBar,p.html5Types[a.type]?(x=p.html5Types[a.type],N=!0):(x=a.uibDatepickerPopup||p.datepickerPopup,a.$observe("uibDatepickerPopup",function(e,t){var a=e||p.datepickerPopup;if(a!==x&&(x=a,T.$modelValue=null,!x))throw new Error("uibDatepickerPopup must have a date format specified.")})),!x)throw new Error("uibDatepickerPopup must have a date format specified.");if(N&&a.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");(M=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>")).attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),(_=angular.element(M.children()[0])).attr("template-url",C),e.datepickerOptions||(e.datepickerOptions={}),N&&"month"===a.type&&(e.datepickerOptions.datepickerMode="month",e.datepickerOptions.minMode="month"),_.attr("datepicker-options","datepickerOptions"),N?T.$formatters.push(function(t){return e.date=t,t}):(T.$$parserName="date",T.$validators.date=b,T.$parsers.unshift(v),T.$formatters.push(function(t){return T.$isEmpty(t)?(e.date=t,t):(angular.isNumber(t)&&(t=new Date(t)),e.date=t,d.filter(e.date,x))})),T.$viewChangeListeners.push(function(){e.date=h(T.$viewValue)}),t.on("keydown",w),P=n(M)(e),M.remove(),I?r.find("body").append(P):t.after(P),e.$on("$destroy",function(){for(!0===e.isOpen&&(l.$$phase||e.$apply(function(){e.isOpen=!1})),P.remove(),t.off("keydown",w),r.off("click",y),D&&D.off("scroll",$),angular.element(o).off("resize",$);O.length;)O.shift()()})},e.getText=function(t){return e[t+"Text"]||p[t+"Text"]},e.isDisabled=function(t){"today"===t&&(t=new Date);var a={};return angular.forEach(["minDate","maxDate"],function(t){e.datepickerOptions[t]?angular.isDate(e.datepickerOptions[t])?a[t]=new Date(e.datepickerOptions[t]):(f&&i.warn("Literal date support has been deprecated, please switch to date object usage"),a[t]=new Date(u(e.datepickerOptions[t],"medium"))):a[t]=null}),e.datepickerOptions&&a.minDate&&e.compare(t,a.minDate)<0||a.maxDate&&e.compare(t,a.maxDate)>0},e.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},e.dateSelection=function(a){e.date=a;var n=e.date?d.filter(e.date,x):null;t.val(n),T.$setViewValue(n),k&&(e.isOpen=!1,t[0].focus())},e.keydown=function(a){27===a.which&&(a.stopPropagation(),e.isOpen=!1,t[0].focus())},e.select=function(t,a){if(a.stopPropagation(),"today"===t){var n=new Date;angular.isDate(e.date)?(t=new Date(e.date)).setFullYear(n.getFullYear(),n.getMonth(),n.getDate()):t=new Date(n.setHours(0,0,0,0))}e.dateSelection(t)},e.close=function(a){a.stopPropagation(),e.isOpen=!1,t[0].focus()},e.disabled=angular.isDefined(a.disabled)||!1,a.ngDisabled&&O.push(e.$parent.$watch(s(a.ngDisabled),function(t){e.disabled=t})),e.$watch("isOpen",function(n){n?e.disabled?e.isOpen=!1:m(function(){$(),S&&e.$broadcast("uib:datepicker.focus"),r.on("click",y);var n=a.popupPlacement?a.popupPlacement:p.placement;I||c.parsePlacement(n)[2]?(D=D||angular.element(c.scrollParent(t)))&&D.on("scroll",$):D=null,angular.element(o).on("resize",$)},0,!1):(r.off("click",y),D&&D.off("scroll",$),angular.element(o).off("resize",$))}),e.$on("uib:datepicker.mode",function(){m($,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(e,t,a,n){var i=n[0];n[1].init(i)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(e){return function(t,a){var n;return function(){var i=this,s=Array.prototype.slice.call(arguments);n&&e.cancel(n),n=e(function(){t.apply(i,s)},a)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(e,t){var a=null;this.open=function(t,i){a||e.on("click",n),a&&a!==t&&(a.isOpen=!1),a=t},this.close=function(t,i){if(a===t){a=null,e.off("click",n);var s=t.getDropdownElement();s&&s.off("keydown",this.keybindFilter)}};var n=function(e){if(a&&!(e&&"disabled"===a.getAutoClose()||e&&3===e.which)){var n=a.getToggleElement();if(!(e&&n&&n[0].contains(e.target))){var i=a.getDropdownElement();e&&"outsideClick"===a.getAutoClose()&&i&&i[0].contains(e.target)||(a.isOpen=!1,a.focusToggleElement(),t.$$phase||a.$apply())}}};this.keybindFilter=function(e){27===e.which?(e.stopPropagation(),a.focusToggleElement(),n()):a.isKeynavEnabled()&&-1!==[38,40].indexOf(e.which)&&a.isOpen&&(e.preventDefault(),e.stopPropagation(),a.focusDropdownEntry(e.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(e,t,a,n,i,s,o,r,l,c,u){var d,p,m=this,g=e.$new(),f=i.appendToOpenClass,h=i.openClass,v=angular.noop,b=a.onToggle?n(a.onToggle):angular.noop,y=!1,w=null,$=!1,x=l.find("body");t.addClass("dropdown"),this.init=function(){if(a.isOpen&&(p=n(a.isOpen),v=p.assign,e.$watch(p,function(e){g.isOpen=!!e})),angular.isDefined(a.dropdownAppendTo)){var i=n(a.dropdownAppendTo)(g);i&&(w=angular.element(i))}y=angular.isDefined(a.dropdownAppendToBody),$=angular.isDefined(a.keyboardNav),y&&!w&&(w=x),w&&m.dropdownMenu&&(w.append(m.dropdownMenu),t.on("$destroy",function(){m.dropdownMenu.remove()}))},this.toggle=function(e){return g.isOpen=arguments.length?!!e:!g.isOpen,angular.isFunction(v)&&v(g,g.isOpen),g.isOpen},this.isOpen=function(){return g.isOpen},g.getToggleElement=function(){return m.toggleElement},g.getAutoClose=function(){return a.autoClose||"always"},g.getElement=function(){return t},g.isKeynavEnabled=function(){return $},g.focusDropdownEntry=function(e){var a=m.dropdownMenu?angular.element(m.dropdownMenu).find("a"):t.find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(m.selectedOption)?m.selectedOption=m.selectedOption===a.length-1?m.selectedOption:m.selectedOption+1:m.selectedOption=0;break;case 38:angular.isNumber(m.selectedOption)?m.selectedOption=0===m.selectedOption?0:m.selectedOption-1:m.selectedOption=a.length-1}a[m.selectedOption].focus()},g.getDropdownElement=function(){return m.dropdownMenu},g.focusToggleElement=function(){m.toggleElement&&m.toggleElement[0].focus()},g.$watch("isOpen",function(a,n){if(w&&m.dropdownMenu){var i,l,p,$=r.positionElements(t,m.dropdownMenu,"bottom-left",!0),x=0;if(i={top:$.top+"px",display:a?"block":"none"},(l=m.dropdownMenu.hasClass("dropdown-menu-right"))?(i.left="auto",(p=r.scrollbarPadding(w)).heightOverflow&&p.scrollbarWidth&&(x=p.scrollbarWidth),i.right=window.innerWidth-x-($.left+t.prop("offsetWidth"))+"px"):(i.left=$.left+"px",i.right="auto"),!y){var k=r.offset(w);i.top=$.top-k.top+"px",l?i.right=window.innerWidth-($.left-k.left+t.prop("offsetWidth"))+"px":i.left=$.left-k.left+"px"}m.dropdownMenu.css(i)}var I=w||t;if(I.hasClass(w?f:h)===!a&&o[a?"addClass":"removeClass"](I,w?f:h).then(function(){angular.isDefined(a)&&a!==n&&b(e,{open:!!a})}),a)m.dropdownMenuTemplateUrl?u(m.dropdownMenuTemplateUrl).then(function(e){d=g.$new(),c(e.trim())(d,function(e){var t=e;m.dropdownMenu.replaceWith(t),m.dropdownMenu=t,m.dropdownMenu.on("keydown",s.keybindFilter)})}):m.dropdownMenu&&m.dropdownMenu.on("keydown",s.keybindFilter),g.focusToggleElement(),s.open(g,t);else{if(s.close(g,t),m.dropdownMenuTemplateUrl){d&&d.$destroy();var S=angular.element('<ul class="dropdown-menu"></ul>');m.dropdownMenu.replaceWith(S),m.dropdownMenu=S}m.selectedOption=null}angular.isFunction(v)&&v(e,a)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(e,t,a,n){n.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(e,t,a,n){if(n&&!angular.isDefined(a.dropdownNested)){t.addClass("dropdown-menu");var i=a.templateUrl;i&&(n.dropdownMenuTemplateUrl=i),n.dropdownMenu||(n.dropdownMenu=t)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(e,t,a,n){if(n){t.addClass("dropdown-toggle"),n.toggleElement=t;var i=function(i){i.preventDefault(),t.hasClass("disabled")||a.disabled||e.$apply(function(){n.toggle()})};t.bind("click",i),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(n.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",i)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,a){e.push({key:t,value:a})},get:function(t){for(var a=0;a<e.length;a++)if(t===e[a].key)return e[a]},keys:function(){for(var t=[],a=0;a<e.length;a++)t.push(e[a].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var a=-1,n=0;n<e.length;n++)if(t===e[n].key){a=n;break}return e.splice(a,1)[0]},removeTop:function(){return e.pop()},length:function(){return e.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap","ui.bootstrap.position"]).factory("$$multiMap",function(){return{createNew:function(){var e={};return{entries:function(){return Object.keys(e).map(function(t){return{key:t,value:e[t]}})},get:function(t){return e[t]},hasKey:function(t){return!!e[t]},keys:function(){return Object.keys(e)},put:function(t,a){e[t]||(e[t]=[]),e[t].push(a)},remove:function(t,a){var n=e[t];if(n){var i=n.indexOf(a);-1!==i&&n.splice(i,1),n.length||delete e[t]}}}}}}).provider("$uibResolve",function(){var e=this;this.resolver=null,this.setResolver=function(e){this.resolver=e},this.$get=["$injector","$q",function(t,a){var n=e.resolver?t.get(e.resolver):null;return{resolve:function(e,i,s,o){if(n)return n.resolve(e,i,s,o);var r=[];return angular.forEach(e,function(e){angular.isFunction(e)||angular.isArray(e)?r.push(a.resolve(t.invoke(e))):angular.isString(e)?r.push(a.resolve(t.get(e))):r.push(a.resolve(e))}),a.all(r).then(function(t){var a={},n=0;return angular.forEach(e,function(e,i){a[i]=t[n++]}),a})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(e,t,a){function n(t,n,i){i.modalInClass&&(e.addClass(n,i.modalInClass),t.$on(a.NOW_CLOSING_EVENT,function(a,s){var o=s();t.modalOptions.animation?e.removeClass(n,i.modalInClass).then(o):o()}))}return{restrict:"A",compile:function(e,t){return e.addClass(t.backdropClass),n}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(e,t,a,n){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/modal/window.html"},link:function(i,s,o){s.addClass(o.windowTopClass||""),i.size=o.size,i.close=function(t){var a=e.getTop();a&&a.value.backdrop&&"static"!==a.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(a.key,"backdrop click"))},s.on("click",i.close),i.$isRendered=!0;var r=t.defer();i.$$postDigest(function(){r.resolve()}),r.promise.then(function(){var r=null;o.modalInClass&&(r=a(s,{addClass:o.modalInClass}).start(),i.$on(e.NOW_CLOSING_EVENT,function(e,t){var n=t();a(s,{removeClass:o.modalInClass}).start().then(n)})),t.when(r).then(function(){var t=e.getTop();if(t&&e.modalRendered(t.key),!n[0].activeElement||!s[0].contains(n[0].activeElement)){var a=s[0].querySelector("[autofocus]");a?a.focus():s[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(e,t){t.modalAnimation&&e.addClass(t.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(e){return{link:function(t,a,n,i,s){s(t.$parent,function(t){a.empty(),e.enter(t,a)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(e,t,a,n,i,s,o,r,l){function c(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function u(){for(var e=-1,t=$.keys(),a=0;a<t.length;a++)$.get(t[a]).value.backdrop&&(e=a);return e>-1&&e<I&&(e=I),e}function d(e,t){var a=$.get(e).value,n=a.appendTo;$.remove(e),(S=$.top())&&(I=parseInt(S.value.modalDomEl.attr("index"),10)),g(a.modalDomEl,a.modalScope,function(){var t=a.openedClass||w;x.remove(t,e);var i=x.hasKey(t);n.toggleClass(t,i),!i&&y&&y.heightOverflow&&y.scrollbarWidth&&(y.originalRight?n.css({paddingRight:y.originalRight+"px"}):n.css({paddingRight:""}),y=null),p(!0)},a.closedDeferred),m(),t&&t.focus?t.focus():n.focus&&n.focus()}function p(e){var t;$.length()>0&&(t=$.top().value).modalDomEl.toggleClass(t.windowTopClass||"",e)}function m(){if(v&&-1===u()){var e=b;g(v,b,function(){e=null}),v=void 0,b=void 0}}function g(t,a,n,i){function o(){o.done||(o.done=!0,e.leave(t).then(function(){n&&n(),t.remove(),i&&i.resolve()}),a.$destroy())}var r,l=null;return a.$broadcast(k.NOW_CLOSING_EVENT,function(){return r||(r=s.defer(),l=r.promise),function(){r.resolve()}}),s.when(l).then(o)}function f(e){if(e.isDefaultPrevented())return e;var t=$.top();if(t)switch(e.which){case 27:t.value.keyboard&&(e.preventDefault(),i.$apply(function(){k.dismiss(t.key,"escape key press")}));break;case 9:var a=k.loadFocusElementList(t),n=!1;e.shiftKey?(k.isFocusInFirstItem(e,a)||k.isModalFocused(e,t))&&(n=k.focusLastFocusableElement(a)):k.isFocusInLastItem(e,a)&&(n=k.focusFirstFocusableElement(a)),n&&(e.preventDefault(),e.stopPropagation())}}function h(e,t,a){return!e.value.modalScope.$broadcast("modal.closing",t,a).defaultPrevented}var v,b,y,w="modal-open",$=r.createNew(),x=o.createNew(),k={NOW_CLOSING_EVENT:"modal.stack.now-closing"},I=0,S=null;return i.$watch(u,function(e){b&&(b.index=e)}),a.on("keydown",f),i.$on("$destroy",function(){a.off("keydown",f)}),k.open=function(t,s){var o=a[0].activeElement,r=s.openedClass||w;p(!1),S=$.top(),$.add(t,{deferred:s.deferred,renderDeferred:s.renderDeferred,closedDeferred:s.closedDeferred,modalScope:s.scope,backdrop:s.backdrop,keyboard:s.keyboard,openedClass:s.openedClass,windowTopClass:s.windowTopClass,animation:s.animation,appendTo:s.appendTo}),x.put(r,t);var c=s.appendTo,d=u();if(!c.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");d>=0&&!v&&((b=i.$new(!0)).modalOptions=s,b.index=d,(v=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>')).attr({class:"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),s.backdropClass&&v.addClass(s.backdropClass),s.animation&&v.attr("modal-animation","true"),n(v)(b),e.enter(v,c),l.isScrollable(c)&&(y=l.scrollbarPadding(c)).heightOverflow&&y.scrollbarWidth&&c.css({paddingRight:y.right+"px"})),I=S?parseInt(S.value.modalDomEl.attr("index"),10)+1:0;var m=angular.element('<div uib-modal-window="modal-window"></div>');m.attr({class:"modal","template-url":s.windowTemplateUrl,"window-top-class":s.windowTopClass,role:"dialog",size:s.size,index:I,animate:"animate","ng-style":"{'z-index': 1050 + index*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).html(s.content),s.windowClass&&m.addClass(s.windowClass),s.animation&&m.attr("modal-animation","true"),c.addClass(r),e.enter(n(m)(s.scope),c),$.top().value.modalDomEl=m,$.top().value.modalOpener=o},k.close=function(e,t){var a=$.get(e);return a&&h(a,t,!0)?(a.value.modalScope.$$uibDestructionScheduled=!0,a.value.deferred.resolve(t),d(e,a.value.modalOpener),!0):!a},k.dismiss=function(e,t){var a=$.get(e);return a&&h(a,t,!1)?(a.value.modalScope.$$uibDestructionScheduled=!0,a.value.deferred.reject(t),d(e,a.value.modalOpener),!0):!a},k.dismissAll=function(e){for(var t=this.getTop();t&&this.dismiss(t.key,e);)t=this.getTop()},k.getTop=function(){return $.top()},k.modalRendered=function(e){var t=$.get(e);t&&t.value.renderDeferred.resolve()},k.focusFirstFocusableElement=function(e){return e.length>0&&(e[0].focus(),!0)},k.focusLastFocusableElement=function(e){return e.length>0&&(e[e.length-1].focus(),!0)},k.isModalFocused=function(e,t){if(e&&t){var a=t.value.modalDomEl;if(a&&a.length)return(e.target||e.srcElement)===a[0]}return!1},k.isFocusInFirstItem=function(e,t){return t.length>0&&(e.target||e.srcElement)===t[0]},k.isFocusInLastItem=function(e,t){return t.length>0&&(e.target||e.srcElement)===t[t.length-1]},k.loadFocusElementList=function(e){if(e){var t=e.value.modalDomEl;if(t&&t.length){var a=t[0].querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]");return a?Array.prototype.filter.call(a,function(e){return c(e)}):a}}},k}]).provider("$uibModal",function(){var e={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(t,a,n,i,s,o,r){function l(e){return e.template?a.when(e.template):i(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl)}var c={},u=null;return c.getPromiseChain=function(){return u},c.open=function(i){function c(){return v}var d=a.defer(),p=a.defer(),m=a.defer(),g=a.defer(),f={result:d.promise,opened:p.promise,closed:m.promise,rendered:g.promise,close:function(e){return r.close(f,e)},dismiss:function(e){return r.dismiss(f,e)}};if(i=angular.extend({},e.options,i),i.resolve=i.resolve||{},i.appendTo=i.appendTo||n.find("body").eq(0),!i.template&&!i.templateUrl)throw new Error("One of template or templateUrl options is required.");var h,v=a.all([l(i),o.resolve(i.resolve,{},null,null)]);return h=u=a.all([u]).then(c,c).then(function(e){var a=i.scope||t,n=a.$new();n.$close=f.close,n.$dismiss=f.dismiss,n.$on("$destroy",function(){n.$$uibDestructionScheduled||n.$dismiss("$uibUnscheduledDestruction")});var o,l,c={};i.controller&&(c.$scope=n,c.$scope.$resolve={},c.$uibModalInstance=f,angular.forEach(e[1],function(e,t){c[t]=e,c.$scope.$resolve[t]=e}),l=s(i.controller,c,!0,i.controllerAs),i.controllerAs&&i.bindToController&&((o=l.instance).$close=n.$close,o.$dismiss=n.$dismiss,angular.extend(o,{$resolve:c.$scope.$resolve},a)),o=l(),angular.isFunction(o.$onInit)&&o.$onInit()),r.open(f,{scope:n,deferred:d,renderDeferred:g,closedDeferred:m,content:e[0],animation:i.animation,backdrop:i.backdrop,keyboard:i.keyboard,backdropClass:i.backdropClass,windowTopClass:i.windowTopClass,windowClass:i.windowClass,windowTemplateUrl:i.windowTemplateUrl,size:i.size,openedClass:i.openedClass,appendTo:i.appendTo}),p.resolve(!0)},function(e){p.reject(e),d.reject(e)}).finally(function(){u===h&&(u=null)}),f},c}]};return e}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(e){return{create:function(t,a,n){t.setNumPages=n.numPages?e(n.numPages).assign:angular.noop,t.ngModelCtrl={$setViewValue:angular.noop},t._watchers=[],t.init=function(e,i){t.ngModelCtrl=e,t.config=i,e.$render=function(){t.render()},n.itemsPerPage?t._watchers.push(a.$parent.$watch(n.itemsPerPage,function(e){t.itemsPerPage=parseInt(e,10),a.totalPages=t.calculateTotalPages(),t.updatePage()})):t.itemsPerPage=i.itemsPerPage,a.$watch("totalItems",function(e,n){(angular.isDefined(e)||e!==n)&&(a.totalPages=t.calculateTotalPages(),t.updatePage())})},t.calculateTotalPages=function(){var e=t.itemsPerPage<1?1:Math.ceil(a.totalItems/t.itemsPerPage);return Math.max(e||0,1)},t.render=function(){a.page=parseInt(t.ngModelCtrl.$viewValue,10)||1},a.selectPage=function(e,n){n&&n.preventDefault(),(!a.ngDisabled||!n)&&a.page!==e&&e>0&&e<=a.totalPages&&(n&&n.target&&n.target.blur(),t.ngModelCtrl.$setViewValue(e),t.ngModelCtrl.$render())},a.getText=function(e){return a[e+"Text"]||t.config[e+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages},t.updatePage=function(){t.setNumPages(a.$parent,a.totalPages),a.page>a.totalPages?a.selectPage(a.totalPages):t.ngModelCtrl.$render()},a.$on("$destroy",function(){for(;t._watchers.length;)t._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(e,t,a,n){e.align=angular.isDefined(t.align)?e.$parent.$eval(t.align):n.align,a.create(this,e,t)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(e){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(e,t){return t.templateUrl||"uib/template/pager/pager.html"},link:function(t,a,n,i){a.addClass("pager");var s=i[0],o=i[1];o&&s.init(o,e)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(e,t,a,n,i){function s(e,t,a){return{number:e,text:t,active:a}}function o(e,t){var a=[],n=1,i=t,o=angular.isDefined(l)&&l<t;o&&(c?(i=(n=Math.max(e-Math.floor(l/2),1))+l-1)>t&&(n=(i=t)-l+1):(n=(Math.ceil(e/l)-1)*l+1,i=Math.min(n+l-1,t)));for(var r=n;r<=i;r++){var m=s(r,p(r),r===e);a.push(m)}if(o&&l>0&&(!c||u||d)){if(n>1){if(!d||n>3){var g=s(n-1,"...",!1);a.unshift(g)}if(d){if(3===n){var f=s(2,"2",!1);a.unshift(f)}var h=s(1,"1",!1);a.unshift(h)}}if(i<t){if(!d||i<t-2){var v=s(i+1,"...",!1);a.push(v)}if(d){if(i===t-2){var b=s(t-1,t-1,!1);a.push(b)}var y=s(t,t,!1);a.push(y)}}}return a}var r=this,l=angular.isDefined(t.maxSize)?e.$parent.$eval(t.maxSize):i.maxSize,c=angular.isDefined(t.rotate)?e.$parent.$eval(t.rotate):i.rotate,u=angular.isDefined(t.forceEllipses)?e.$parent.$eval(t.forceEllipses):i.forceEllipses,d=angular.isDefined(t.boundaryLinkNumbers)?e.$parent.$eval(t.boundaryLinkNumbers):i.boundaryLinkNumbers,p=angular.isDefined(t.pageLabel)?function(a){return e.$parent.$eval(t.pageLabel,{$page:a})}:angular.identity;e.boundaryLinks=angular.isDefined(t.boundaryLinks)?e.$parent.$eval(t.boundaryLinks):i.boundaryLinks,e.directionLinks=angular.isDefined(t.directionLinks)?e.$parent.$eval(t.directionLinks):i.directionLinks,n.create(this,e,t),t.maxSize&&r._watchers.push(e.$parent.$watch(a(t.maxSize),function(e){l=parseInt(e,10),r.render()}));var m=this.render;this.render=function(){m(),e.page>0&&e.page<=e.totalPages&&(e.pages=o(e.page,e.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(e,t){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"uib/template/pagination/pagination.html"},link:function(e,a,n,i){a.addClass("pagination");var s=i[0],o=i[1];o&&s.init(o,t)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function e(e){var t=/[A-Z]/g;return e.replace(t,function(e,t){return(t?"-":"")+e.toLowerCase()})}var t={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},a={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},n={};this.options=function(e){angular.extend(n,e)},this.setTriggers=function(e){angular.extend(a,e)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(i,s,o,r,l,c,u,d,p){function m(e){if(27===e.which){var t=g.top();t&&(t.value.close(),g.removeTop(),t=null)}}var g=p.createNew();return r.on("keypress",m),u.$on("$destroy",function(){r.off("keypress",m)}),function(i,u,p,m){function f(e){var t=(e||m.trigger||p).split(" ");return{show:t,hide:t.map(function(e){return a[e]||e})}}m=angular.extend({},t,n,m);var h=e(i),v=c.startSymbol(),b=c.endSymbol(),y="<div "+h+'-popup uib-title="'+v+"title"+b+'" '+(m.useContentExp?'content-exp="contentExp()" ':'content="'+v+"content"+b+'" ')+'origin-scope="origScope" class="uib-position-measure '+u+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(e,t){var a=s(y);return function(e,t,n,s){function c(){U.isOpen?h():p()}function p(){L&&!e.$eval(n[u+"Enable"])||(w(),k(),U.popupDelay?T||(T=o(v,U.popupDelay,!1)):v())}function h(){b(),U.popupCloseDelay?E||(E=o(y,U.popupCloseDelay,!1)):y()}function v(){if(b(),w(),!U.content)return angular.noop;$(),U.$evalAsync(function(){U.isOpen=!0,I(!0),V()})}function b(){T&&(o.cancel(T),T=null),P&&(o.cancel(P),P=null)}function y(){U&&U.$evalAsync(function(){U&&(U.isOpen=!1,I(!1),U.animation?D||(D=o(x,150,!1)):x())})}function w(){E&&(o.cancel(E),E=null),D&&(o.cancel(D),D=null)}function $(){M||(_=U.$new(),M=a(_,function(e){N?r.find("body").append(e):t.after(e)}),S())}function x(){b(),w(),A(),M&&(M.remove(),M=null),_&&(_.$destroy(),_=null)}function k(){U.title=n[u+"Title"],U.content=z?z(e):n[i],U.popupClass=n[u+"Class"],U.placement=angular.isDefined(n[u+"Placement"])?n[u+"Placement"]:m.placement;var t=l.parsePlacement(U.placement);j=t[1]?t[0]+"-"+t[1]:t[0];var a=parseInt(n[u+"PopupDelay"],10),s=parseInt(n[u+"PopupCloseDelay"],10);U.popupDelay=isNaN(a)?m.popupDelay:a,U.popupCloseDelay=isNaN(s)?m.popupCloseDelay:s}function I(t){R&&angular.isFunction(R.assign)&&R.assign(e,t)}function S(){F.length=0,z?(F.push(e.$watch(z,function(e){U.content=e,!e&&U.isOpen&&y()})),F.push(_.$watch(function(){B||(B=!0,_.$$postDigest(function(){B=!1,U&&U.isOpen&&V()}))}))):F.push(n.$observe(i,function(e){U.content=e,!e&&U.isOpen?y():V()})),F.push(n.$observe(u+"Title",function(e){U.title=e,U.isOpen&&V()})),F.push(n.$observe(u+"Placement",function(e){U.placement=e||m.placement,U.isOpen&&V()}))}function A(){F.length&&(angular.forEach(F,function(e){e()}),F.length=0)}function C(e){U&&U.isOpen&&M&&(t[0].contains(e.target)||M[0].contains(e.target)||h())}var M,_,D,T,E,P,j,N=!!angular.isDefined(m.appendToBody)&&m.appendToBody,O=f(void 0),L=angular.isDefined(n[u+"Enable"]),U=e.$new(!0),B=!1,R=!!angular.isDefined(n[u+"IsOpen"])&&d(n[u+"IsOpen"]),z=!!m.useContentExp&&d(n[i]),F=[],V=function(){M&&M.html()&&(P||(P=o(function(){var e=l.positionElements(t,M,U.placement,N),a=angular.isDefined(M.offsetHeight)?M.offsetHeight:M.prop("offsetHeight"),n=N?l.offset(t):l.position(t);M.css({top:e.top+"px",left:e.left+"px"});var i=e.placement.split("-");M.hasClass(i[0])||(M.removeClass(j.split("-")[0]),M.addClass(i[0])),M.hasClass(m.placementClassPrefix+e.placement)||(M.removeClass(m.placementClassPrefix+j),M.addClass(m.placementClassPrefix+e.placement)),o(function(){var e=angular.isDefined(M.offsetHeight)?M.offsetHeight:M.prop("offsetHeight"),t=l.adjustTop(i,n,a,e);t&&M.css(t)},0,!1),M.hasClass("uib-position-measure")?(l.positionArrow(M,e.placement),M.removeClass("uib-position-measure")):j!==e.placement&&l.positionArrow(M,e.placement),j=e.placement,P=null},0,!1)))};U.origScope=e,U.isOpen=!1,g.add(U,{close:y}),U.contentExp=function(){return U.content},n.$observe("disabled",function(e){e&&b(),e&&U.isOpen&&y()}),R&&e.$watch(R,function(e){U&&!e===U.isOpen&&c()});var q=function(){O.show.forEach(function(e){"outsideClick"===e?t.off("click",c):(t.off(e,p),t.off(e,c))}),O.hide.forEach(function(e){"outsideClick"===e?r.off("click",C):t.off(e,h)})};!function(){var a=[],i=[],s=e.$eval(n[u+"Trigger"]);q(),angular.isObject(s)?(Object.keys(s).forEach(function(e){a.push(e),i.push(s[e])}),O={show:a,hide:i}):O=f(s),"none"!==O.show&&O.show.forEach(function(e,a){"outsideClick"===e?(t.on("click",c),r.on("click",C)):e===O.hide[a]?t.on(e,c):e&&(t.on(e,p),t.on(O.hide[a],h)),t.on("keypress",function(e){27===e.which&&h()})})}();var H=e.$eval(n[u+"Animation"]);U.animation=angular.isDefined(H)?!!H:m.animation;var W,Y=u+"AppendToBody";W=Y in n&&void 0===n[Y]||e.$eval(n[Y]),N=angular.isDefined(W)?W:N,e.$on("$destroy",function(){q(),x(),g.remove(U),U=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(e,t,a,n){return{link:function(i,s,o){var r,l,c,u=i.$eval(o.tooltipTemplateTranscludeScope),d=0,p=function(){l&&(l.remove(),l=null),r&&(r.$destroy(),r=null),c&&(e.leave(c).then(function(){l=null}),l=c,c=null)};i.$watch(t.parseAsResourceUrl(o.uibTooltipTemplateTransclude),function(t){var o=++d;t?(n(t,!0).then(function(n){if(o===d){var i=u.$new(),l=a(n)(i,function(t){p(),e.enter(t,s)});c=l,(r=i).$emit("$includeContentLoaded",t)}},function(){o===d&&(p(),i.$emit("$includeContentError",t))}),i.$emit("$includeContentRequested",t)):p()}),i.$on("$destroy",p)}}}]).directive("uibTooltipClasses",["$uibPosition",function(e){return{restrict:"A",link:function(t,a,n){if(t.placement){var i=e.parsePlacement(t.placement);a.addClass(i[0])}t.popupClass&&a.addClass(t.popupClass),t.animation&&a.addClass(n.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(e){return e("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(e){return e("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(e){return e("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(e){return e("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(e){return e("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(e){return e("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(e,t,a){function n(){return angular.isDefined(e.maxParam)?e.maxParam:a.max}var i=this,s=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):a.animate;this.bars=[],e.max=n(),this.addBar=function(e,t,a){s||t.css({transition:"none"}),this.bars.push(e),e.max=n(),e.title=a&&angular.isDefined(a.title)?a.title:"progressbar",e.$watch("value",function(t){e.recalculatePercentage()}),e.recalculatePercentage=function(){var t=i.bars.reduce(function(e,t){return t.percent=+(100*t.value/t.max).toFixed(2),e+t.percent},0);t>100&&(e.percent-=t-100)},e.$on("$destroy",function(){t=null,i.removeBar(e)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1),this.bars.forEach(function(e){e.recalculatePercentage()})},e.$watch("maxParam",function(e){i.bars.forEach(function(e){e.max=n(),e.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(e,t,a,n){n.addBar(e,t,a)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(e,t,a,n){n.addBar(e,angular.element(t.children()[0]),{title:a.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(e,t,a){var n={$setViewValue:angular.noop},i=this;this.init=function(i){(n=i).$render=this.render,n.$formatters.push(function(e){return angular.isNumber(e)&&e<<0!==e&&(e=Math.round(e)),e}),this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):a.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):a.stateOff,this.enableReset=angular.isDefined(t.enableReset)?e.$parent.$eval(t.enableReset):a.enableReset;var s=angular.isDefined(t.titles)?e.$parent.$eval(t.titles):a.titles;this.titles=angular.isArray(s)&&s.length>0?s:a.titles;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):a.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,a=e.length;t<a;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(t)},e[t]);return e},this.getTitle=function(e){return e>=this.titles.length?e+1:this.titles[e]},e.rate=function(t){if(!e.readonly&&t>=0&&t<=e.range.length){var a=i.enableReset&&n.$viewValue===t?0:t;n.$setViewValue(a),n.$render()}},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=n.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=n.$viewValue,e.title=i.getTitle(e.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(e,t,a,n){var i=n[0],s=n[1];i.init(s)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(e){function t(e){for(var t=0;t<n.tabs.length;t++)if(n.tabs[t].index===e)return t}var a,n=this;n.tabs=[],n.select=function(e,s){if(!i){var o=t(a),r=n.tabs[o];if(r){if(r.tab.onDeselect({$event:s,$selectedIndex:e}),s&&s.isDefaultPrevented())return;r.tab.active=!1}var l=n.tabs[e];l?(l.tab.onSelect({$event:s}),l.tab.active=!0,n.active=l.index,a=l.index):!l&&angular.isDefined(a)&&(n.active=null,a=null)}},n.addTab=function(e){if(n.tabs.push({tab:e,index:e.index}),n.tabs.sort(function(e,t){return e.index>t.index?1:e.index<t.index?-1:0}),e.index===n.active||!angular.isDefined(n.active)&&1===n.tabs.length){var a=t(e.index);n.select(a)}},n.removeTab=function(e){for(var t,a=0;a<n.tabs.length;a++)if(n.tabs[a].tab===e){t=a;break}if(n.tabs[t].index===n.active){var i=t===n.tabs.length-1?t-1:t+1%n.tabs.length;n.select(i)}n.tabs.splice(t,1)},e.$watch("tabset.active",function(e){angular.isDefined(e)&&e!==a&&n.select(t(e))});var i;e.$on("$destroy",function(){i=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tabset.html"},link:function(e,t,a){e.vertical=!!angular.isDefined(a.vertical)&&e.$parent.$eval(a.vertical),e.justified=!!angular.isDefined(a.justified)&&e.$parent.$eval(a.justified)}}}).directive("uibTab",["$parse",function(e){return{require:"^uibTabset",replace:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(t,a,n,i,s){t.disabled=!1,n.disable&&t.$parent.$watch(e(n.disable),function(e){t.disabled=!!e}),angular.isUndefined(n.index)&&(i.tabs&&i.tabs.length?t.index=Math.max.apply(null,i.tabs.map(function(e){return e.index}))+1:t.index=0),angular.isUndefined(n.classes)&&(t.classes=""),t.select=function(e){if(!t.disabled){for(var a,n=0;n<i.tabs.length;n++)if(i.tabs[n].tab===t){a=n;break}i.select(a,e)}},i.addTab(t),t.$on("$destroy",function(){i.removeTab(t)}),t.$transcludeFn=s}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}).directive("uibTabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("uib-tab-heading")||e.hasAttribute("data-uib-tab-heading")||e.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===e.tagName.toLowerCase()||"data-uib-tab-heading"===e.tagName.toLowerCase()||"x-uib-tab-heading"===e.tagName.toLowerCase()||"uib:tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(t,a,n){var i=t.$eval(n.uibTabContentTransclude).tab;i.$transcludeFn(i.$parent,function(t){angular.forEach(t,function(t){e(t)?i.headingElement=t:a.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(e,t,a,n,i,s,o){function r(){var t=+e.hours;if((e.showMeridian?t>0&&t<13:t>=0&&t<24)&&""!==e.hours)return e.showMeridian&&(12===t&&(t=0),e.meridian===$[1]&&(t+=12)),t}function l(){var t=+e.minutes;if(t>=0&&t<60&&""!==e.minutes)return t}function c(){var t=+e.seconds;return t>=0&&t<60?t:void 0}function u(e,t){return null===e?"":angular.isDefined(e)&&e.toString().length<2&&!t?"0"+e:e.toString()}function d(e){p(),w.$setViewValue(new Date(b)),m(e)}function p(){w.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1,e.invalidSeconds=!1}function m(t){if(w.$modelValue){var a=b.getHours(),n=b.getMinutes(),i=b.getSeconds();e.showMeridian&&(a=0===a||12===a?12:a%12),e.hours="h"===t?a:u(a,!x),"m"!==t&&(e.minutes=u(n)),e.meridian=b.getHours()<12?$[0]:$[1],"s"!==t&&(e.seconds=u(i)),e.meridian=b.getHours()<12?$[0]:$[1]}else e.hours=null,e.minutes=null,e.seconds=null,e.meridian=$[0]}function g(e){b=h(b,e),d()}function f(e,t){return h(e,60*t)}function h(e,t){var a=new Date(e.getTime()+1e3*t),n=new Date(e);return n.setHours(a.getHours(),a.getMinutes(),a.getSeconds()),n}function v(){return(null===e.hours||""===e.hours)&&(null===e.minutes||""===e.minutes)&&(!e.showSeconds||e.showSeconds&&(null===e.seconds||""===e.seconds))}var b=new Date,y=[],w={$setViewValue:angular.noop},$=angular.isDefined(a.meridians)?e.$parent.$eval(a.meridians):o.meridians||s.DATETIME_FORMATS.AMPMS,x=!angular.isDefined(a.padHours)||e.$parent.$eval(a.padHours);e.tabindex=angular.isDefined(a.tabindex)?a.tabindex:0,t.removeAttr("tabindex"),this.init=function(t,n){(w=t).$render=this.render,w.$formatters.unshift(function(e){return e?new Date(e):null});var i=n.eq(0),s=n.eq(1),r=n.eq(2);(angular.isDefined(a.mousewheel)?e.$parent.$eval(a.mousewheel):o.mousewheel)&&this.setupMousewheelEvents(i,s,r),(angular.isDefined(a.arrowkeys)?e.$parent.$eval(a.arrowkeys):o.arrowkeys)&&this.setupArrowkeyEvents(i,s,r),e.readonlyInput=angular.isDefined(a.readonlyInput)?e.$parent.$eval(a.readonlyInput):o.readonlyInput,this.setupInputEvents(i,s,r)};var k=o.hourStep;a.hourStep&&y.push(e.$parent.$watch(n(a.hourStep),function(e){k=+e}));var I=o.minuteStep;a.minuteStep&&y.push(e.$parent.$watch(n(a.minuteStep),function(e){I=+e}));var S;y.push(e.$parent.$watch(n(a.min),function(e){var t=new Date(e);S=isNaN(t)?void 0:t}));var A;y.push(e.$parent.$watch(n(a.max),function(e){var t=new Date(e);A=isNaN(t)?void 0:t}));var C=!1;a.ngDisabled&&y.push(e.$parent.$watch(n(a.ngDisabled),function(e){C=e})),e.noIncrementHours=function(){var e=f(b,60*k);return C||e>A||e<b&&e<S},e.noDecrementHours=function(){var e=f(b,60*-k);return C||e<S||e>b&&e>A},e.noIncrementMinutes=function(){var e=f(b,I);return C||e>A||e<b&&e<S},e.noDecrementMinutes=function(){var e=f(b,-I);return C||e<S||e>b&&e>A},e.noIncrementSeconds=function(){var e=h(b,M);return C||e>A||e<b&&e<S},e.noDecrementSeconds=function(){var e=h(b,-M);return C||e<S||e>b&&e>A},e.noToggleMeridian=function(){return b.getHours()<12?C||f(b,720)>A:C||f(b,-720)<S};var M=o.secondStep;a.secondStep&&y.push(e.$parent.$watch(n(a.secondStep),function(e){M=+e})),e.showSeconds=o.showSeconds,a.showSeconds&&y.push(e.$parent.$watch(n(a.showSeconds),function(t){e.showSeconds=!!t})),e.showMeridian=o.showMeridian,a.showMeridian&&y.push(e.$parent.$watch(n(a.showMeridian),function(t){if(e.showMeridian=!!t,w.$error.time){var a=r(),n=l();angular.isDefined(a)&&angular.isDefined(n)&&(b.setHours(a),d())}else m()})),this.setupMousewheelEvents=function(t,a,n){var i=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){C||e.$apply(i(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),a.bind("mousewheel wheel",function(t){C||e.$apply(i(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){C||e.$apply(i(t)?e.incrementSeconds():e.decrementSeconds()),t.preventDefault()})},this.setupArrowkeyEvents=function(t,a,n){t.bind("keydown",function(t){C||(38===t.which?(t.preventDefault(),e.incrementHours(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementHours(),e.$apply()))}),a.bind("keydown",function(t){C||(38===t.which?(t.preventDefault(),e.incrementMinutes(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementMinutes(),e.$apply()))}),n.bind("keydown",function(t){C||(38===t.which?(t.preventDefault(),e.incrementSeconds(),e.$apply()):40===t.which&&(t.preventDefault(),e.decrementSeconds(),e.$apply()))})},this.setupInputEvents=function(t,a,n){if(e.readonlyInput)return e.updateHours=angular.noop,e.updateMinutes=angular.noop,void(e.updateSeconds=angular.noop);var i=function(t,a,n){w.$setViewValue(null),w.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(a)&&(e.invalidMinutes=a),angular.isDefined(n)&&(e.invalidSeconds=n)};e.updateHours=function(){var e=r(),t=l();w.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(b.setHours(e),b.setMinutes(t),b<S||b>A?i(!0):d("h")):i(!0)},t.bind("blur",function(t){w.$setTouched(),v()?p():null===e.hours||""===e.hours?i(!0):!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=u(e.hours,!x)})}),e.updateMinutes=function(){var e=l(),t=r();w.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(b.setHours(t),b.setMinutes(e),b<S||b>A?i(void 0,!0):d("m")):i(void 0,!0)},a.bind("blur",function(t){w.$setTouched(),v()?p():null===e.minutes?i(void 0,!0):!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=u(e.minutes)})}),e.updateSeconds=function(){var e=c();w.$setDirty(),angular.isDefined(e)?(b.setSeconds(e),d("s")):i(void 0,void 0,!0)},n.bind("blur",function(t){v()?p():!e.invalidSeconds&&e.seconds<10&&e.$apply(function(){e.seconds=u(e.seconds)})})},this.render=function(){var t=w.$viewValue;isNaN(t)?(w.$setValidity("time",!1),i.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(t&&(b=t),b<S||b>A?(w.$setValidity("time",!1),e.invalidHours=!0,e.invalidMinutes=!0):p(),m())},e.showSpinners=angular.isDefined(a.showSpinners)?e.$parent.$eval(a.showSpinners):o.showSpinners,e.incrementHours=function(){e.noIncrementHours()||g(60*k*60)},e.decrementHours=function(){e.noDecrementHours()||g(60*-k*60)},e.incrementMinutes=function(){e.noIncrementMinutes()||g(60*I)},e.decrementMinutes=function(){e.noDecrementMinutes()||g(60*-I)},e.incrementSeconds=function(){e.noIncrementSeconds()||g(M)},e.decrementSeconds=function(){e.noDecrementSeconds()||g(-M)},e.toggleMeridian=function(){var t=l(),a=r();e.noToggleMeridian()||(angular.isDefined(t)&&angular.isDefined(a)?g(720*(b.getHours()<12?60:-60)):e.meridian=e.meridian===$[0]?$[1]:$[0])},e.blur=function(){w.$setTouched()},e.$on("$destroy",function(){for(;y.length;)y.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(e){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(t,a){return a.templateUrl||e.templateUrl},link:function(e,t,a,n){var i=n[0],s=n[1];s&&i.init(s,t.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(a){var n=a.match(t);if(!n)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+a+'".');return{itemName:n[3],source:e(n[4]),viewMapper:e(n[2]||n[1]),modelMapper:e(n[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(e,t,a,n,i,s,o,r,l,c,u,d,p){function m(){B.moveInProgress||(B.moveInProgress=!0,B.$digest()),K()}function g(){B.position=_?d.offset(t):d.position(t),B.position.top+=t.prop("offsetHeight")}var f,h,v=[9,13,27,38,40],b=e.$eval(a.typeaheadMinLength);b||0===b||(b=1),e.$watch(a.typeaheadMinLength,function(e){b=e||0===e?e:1});var y=e.$eval(a.typeaheadWaitMs)||0,w=!1!==e.$eval(a.typeaheadEditable);e.$watch(a.typeaheadEditable,function(e){w=!1!==e});var $,x,k=i(a.typeaheadLoading).assign||angular.noop,I=a.typeaheadShouldSelect?i(a.typeaheadShouldSelect):function(e,t){var a=t.$event;return 13===a.which||9===a.which},S=i(a.typeaheadOnSelect),A=!!angular.isDefined(a.typeaheadSelectOnBlur)&&e.$eval(a.typeaheadSelectOnBlur),C=i(a.typeaheadNoResults).assign||angular.noop,M=a.typeaheadInputFormatter?i(a.typeaheadInputFormatter):void 0,_=!!a.typeaheadAppendToBody&&e.$eval(a.typeaheadAppendToBody),D=a.typeaheadAppendTo?e.$eval(a.typeaheadAppendTo):null,T=!1!==e.$eval(a.typeaheadFocusFirst),E=!!a.typeaheadSelectOnExact&&e.$eval(a.typeaheadSelectOnExact),P=i(a.typeaheadIsOpen).assign||angular.noop,j=e.$eval(a.typeaheadShowHint)||!1,N=i(a.ngModel),O=i(a.ngModel+"($$$p)"),L=function(t,a){return angular.isFunction(N(e))&&h&&h.$options&&h.$options.getterSetter?O(t,{$$$p:a}):N.assign(t,a)},U=p.parse(a.uibTypeahead),B=e.$new(),R=e.$on("$destroy",function(){B.$destroy()});B.$on("$destroy",R);var z="typeahead-"+B.$id+"-"+Math.floor(1e4*Math.random());t.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":z});var F,V;j&&((F=angular.element("<div></div>")).css("position","relative"),t.after(F),(V=t.clone()).attr("placeholder",""),V.attr("tabindex","-1"),V.val(""),V.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),t.css({position:"relative","vertical-align":"top","background-color":"transparent"}),V.attr("id")&&V.removeAttr("id"),F.append(V),V.after(t));var q=angular.element("<div uib-typeahead-popup></div>");q.attr({id:z,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(a.typeaheadTemplateUrl)&&q.attr("template-url",a.typeaheadTemplateUrl),angular.isDefined(a.typeaheadPopupTemplateUrl)&&q.attr("popup-template-url",a.typeaheadPopupTemplateUrl);var H=function(){j&&V.val("")},W=function(){B.matches=[],B.activeIdx=-1,t.attr("aria-expanded",!1),H()},Y=function(e){return z+"-option-"+e};B.$watch("activeIdx",function(e){e<0?t.removeAttr("aria-activedescendant"):t.attr("aria-activedescendant",Y(e))});var G=function(e,t){return!!(B.matches.length>t&&e)&&e.toUpperCase()===B.matches[t].label.toUpperCase()},Q=function(a,n){var i={$viewValue:a};k(e,!0),C(e,!1),s.when(U.source(e,i)).then(function(s){var o=a===f.$viewValue;if(o&&$)if(s&&s.length>0){B.activeIdx=T?0:-1,C(e,!1),B.matches.length=0;for(var r=0;r<s.length;r++)i[U.itemName]=s[r],B.matches.push({id:Y(r),label:U.viewMapper(B,i),model:s[r]});if(B.query=a,g(),t.attr("aria-expanded",!0),E&&1===B.matches.length&&G(a,0)&&(angular.isNumber(B.debounceUpdate)||angular.isObject(B.debounceUpdate)?u(function(){B.select(0,n)},angular.isNumber(B.debounceUpdate)?B.debounceUpdate:B.debounceUpdate.default):B.select(0,n)),j){var l=B.matches[0].label;angular.isString(a)&&a.length>0&&l.slice(0,a.length).toUpperCase()===a.toUpperCase()?V.val(a+l.slice(a.length)):V.val("")}}else W(),C(e,!0);o&&k(e,!1)},function(){W(),k(e,!1),C(e,!0)})};_&&(angular.element(l).on("resize",m),r.find("body").on("scroll",m));var K=u(function(){B.matches.length&&g(),B.moveInProgress=!1},200);B.moveInProgress=!1,B.query=void 0;var J,Z=function(e){J=o(function(){Q(e)},y)},X=function(){J&&o.cancel(J)};W(),B.assignIsOpen=function(t){P(e,t)},B.select=function(n,i){var s,r,l={};x=!0,l[U.itemName]=r=B.matches[n].model,s=U.modelMapper(e,l),L(e,s),f.$setValidity("editable",!0),f.$setValidity("parse",!0),S(e,{$item:r,$model:s,$label:U.viewMapper(e,l),$event:i}),W(),!1!==B.$eval(a.typeaheadFocusOnSelect)&&o(function(){t[0].focus()},0,!1)},t.on("keydown",function(t){if(0!==B.matches.length&&-1!==v.indexOf(t.which)){var a=I(e,{$event:t});if(-1===B.activeIdx&&a||9===t.which&&t.shiftKey)return W(),void B.$digest();t.preventDefault();var n;switch(t.which){case 27:t.stopPropagation(),W(),e.$digest();break;case 38:B.activeIdx=(B.activeIdx>0?B.activeIdx:B.matches.length)-1,B.$digest(),(n=q[0].querySelectorAll(".uib-typeahead-match")[B.activeIdx]).parentNode.scrollTop=n.offsetTop;break;case 40:B.activeIdx=(B.activeIdx+1)%B.matches.length,B.$digest(),(n=q[0].querySelectorAll(".uib-typeahead-match")[B.activeIdx]).parentNode.scrollTop=n.offsetTop;break;default:a&&B.$apply(function(){angular.isNumber(B.debounceUpdate)||angular.isObject(B.debounceUpdate)?u(function(){B.select(B.activeIdx,t)},angular.isNumber(B.debounceUpdate)?B.debounceUpdate:B.debounceUpdate.default):B.select(B.activeIdx,t)})}}}),t.bind("focus",function(e){$=!0,0!==b||f.$viewValue||o(function(){Q(f.$viewValue,e)},0)}),t.bind("blur",function(e){A&&B.matches.length&&-1!==B.activeIdx&&!x&&(x=!0,B.$apply(function(){angular.isObject(B.debounceUpdate)&&angular.isNumber(B.debounceUpdate.blur)?u(function(){B.select(B.activeIdx,e)},B.debounceUpdate.blur):B.select(B.activeIdx,e)})),!w&&f.$error.editable&&(f.$setViewValue(),B.$apply(function(){f.$setValidity("editable",!0),f.$setValidity("parse",!0)}),t.val("")),$=!1,x=!1});var ee=function(a){t[0]!==a.target&&3!==a.which&&0!==B.matches.length&&(W(),c.$$phase||e.$digest())};r.on("click",ee),e.$on("$destroy",function(){r.off("click",ee),(_||D)&&te.remove(),_&&(angular.element(l).off("resize",m),r.find("body").off("scroll",m)),q.remove(),j&&F.remove()});var te=n(q)(B);_?r.find("body").append(te):D?angular.element(D).eq(0).append(te):t.after(te),this.init=function(t,a){f=t,h=a,B.debounceUpdate=f.$options&&i(f.$options.debounce)(e),f.$parsers.unshift(function(t){return $=!0,0===b||t&&t.length>=b?y>0?(X(),Z(t)):Q(t):(k(e,!1),X(),W()),w?t:t?void f.$setValidity("editable",!1):(f.$setValidity("editable",!0),null)}),f.$formatters.push(function(t){var a,n,i={};return w||f.$setValidity("editable",!0),M?(i.$model=t,M(e,i)):(i[U.itemName]=t,a=U.viewMapper(e,i),i[U.itemName]=void 0,n=U.viewMapper(e,i),a!==n?a:t)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(e,t,a,n){n[2].init(n[0],n[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(e){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(e,t){return t.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(t,a,n){t.templateUrl=n.templateUrl,t.isOpen=function(){var e=t.matches.length>0;return t.assignIsOpen({isOpen:e}),e},t.isActive=function(e){return t.active===e},t.selectActive=function(e){t.active=e},t.selectMatch=function(a,n){var i=t.debounce();angular.isNumber(i)||angular.isObject(i)?e(function(){t.select({activeIdx:a,evt:n})},angular.isNumber(i)?i:i.default):t.select({activeIdx:a,evt:n})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(e,t,a){return{scope:{index:"=",match:"=",query:"="},link:function(n,i,s){var o=a(s.templateUrl)(n.$parent)||"uib/template/typeahead/typeahead-match.html";e(o).then(function(e){var a=angular.element(e.trim());i.replaceWith(a),t(a)(n)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(e,t,a){function n(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function i(e){return/<.*>/g.test(e)}var s;return s=t.has("$sanitize"),function(t,o){return!s&&i(t)&&a.warn("Unsafe use of typeahead please use ngSanitize"),t=o?(""+t).replace(new RegExp(n(o),"gi"),"<strong>$&</strong>"):t,s||(t=e.trustAsHtml(t)),t}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("uib/template/alert/alert.html",'<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepickerPopup/popup.html",'<ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(e){e.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(e){e.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("uib/template/pagination/pagination.html",'<li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-html.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-template.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}),function(e,t){"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof module&&module.exports?module.exports=t(require("angular")):e.angularClipboard=t(e.angular)}(this,function(e){return e.module("angular-clipboard",[]).factory("clipboard",["$document","$window",function(e,t){function a(a,n){var i=e[0].createElement("textarea");return i.style.position="absolute",i.textContent=a,i.style.left="-10000px",i.style.top=(t.pageYOffset||e[0].documentElement.scrollTop)+"px",i}function n(t){try{e[0].body.style.webkitUserSelect="initial";var a=e[0].getSelection();if(a.removeAllRanges(),t.select(),!e[0].execCommand("copy"))throw"failure copy";a.removeAllRanges()}finally{e[0].body.style.webkitUserSelect=""}}return{copyText:function(t,i){var s=a(t,i);e[0].body.appendChild(s),n(s),e[0].body.removeChild(s)},supported:"queryCommandSupported"in e[0]&&e[0].queryCommandSupported("copy")}}]).directive("clipboard",["clipboard",function(t){return{restrict:"A",scope:{onCopied:"&",onError:"&",text:"=",supported:"=?"},link:function(a,n){a.supported=t.supported,n.on("click",function(i){try{t.copyText(a.text,n[0]),e.isFunction(a.onCopied)&&a.$evalAsync(a.onCopied())}catch(t){e.isFunction(a.onError)&&a.$evalAsync(a.onError({err:t}))}})}}}])}),function(){"use strict";angular.module("cfp.hotkeys",[]).provider("hotkeys",["$injector",function(e){this.includeCheatSheet=!0,this.useNgRoute=e.has("ngViewDirective"),this.templateTitle="Keyboard Shortcuts:",this.templateHeader=null,this.templateFooter=null,this.template='<div class="cfp-hotkeys-container fade" ng-class="{in: helpVisible}" style="display: none;"><div class="cfp-hotkeys"><h4 class="cfp-hotkeys-title" ng-if="!header">{{ title }}</h4><div ng-bind-html="header" ng-if="header"></div><table><tbody><tr ng-repeat="hotkey in hotkeys | filter:{ description: \'!$$undefined$$\' }"><td class="cfp-hotkeys-keys"><span ng-repeat="key in hotkey.format() track by $index" class="cfp-hotkeys-key">{{ key }}</span></td><td class="cfp-hotkeys-text">{{ hotkey.description }}</td></tr></tbody></table><div ng-bind-html="footer" ng-if="footer"></div><div class="cfp-hotkeys-close" ng-click="toggleCheatSheet()">&#215;</div></div></div>',this.cheatSheetHotkey="?",this.cheatSheetDescription="Show / hide this help menu",this.$get=["$rootElement","$rootScope","$compile","$window","$document",function(e,t,a,n,i){function s(e){var t={command:"⌘",shift:"⇧",left:"←",right:"→",up:"↑",down:"↓",return:"⏎",backspace:"⌫"};e=e.split("+");for(var a=0;a<e.length;a++)"mod"===e[a]&&(n.navigator&&n.navigator.platform.indexOf("Mac")>=0?e[a]="command":e[a]="ctrl"),e[a]=t[e[a]]||e[a];return e.join(" + ")}function o(e,t,a,n,i,s){this.combo=e instanceof Array?e:[e],this.description=t,this.callback=a,this.action=n,this.allowIn=i,this.persistent=s,this._formated=null}function r(){for(var e=g.hotkeys.length;e--;){var t=g.hotkeys[e];t&&!t.persistent&&u(t)}}function l(){g.helpVisible=!g.helpVisible,g.helpVisible?(y=d("esc"),u("esc"),c("esc",y.description,l,null,["INPUT","SELECT","TEXTAREA"])):(u("esc"),!1!==y&&c(y))}function c(e,t,a,n,i,s){var r,l=["INPUT","SELECT","TEXTAREA"];if("[object Object]"===Object.prototype.toString.call(e)&&(t=e.description,a=e.callback,n=e.action,s=e.persistent,i=e.allowIn,e=e.combo),u(e),t instanceof Function?(n=a,a=t,t="$$undefined$$"):angular.isUndefined(t)&&(t="$$undefined$$"),void 0===s&&(s=!0),"function"==typeof a){r=a,i instanceof Array||(i=[]);for(var c,d=0;d<i.length;d++)i[d]=i[d].toUpperCase(),-1!==(c=l.indexOf(i[d]))&&l.splice(c,1);a=function(e){var t=!0;if(e){var a=e.target||e.srcElement,n=a.nodeName.toUpperCase();if((" "+a.className+" ").indexOf(" mousetrap ")>-1)t=!0;else for(var i=0;i<l.length;i++)if(l[i]===n){t=!1;break}}t&&p(r.apply(this,arguments))}}"string"==typeof n?Mousetrap.bind(e,p(a),n):Mousetrap.bind(e,p(a));var m=new o(e,t,a,n,i,s);return g.hotkeys.push(m),m}function u(e){var t=e instanceof o?e.combo:e;if(Mousetrap.unbind(t),angular.isArray(t)){for(var a=!0,n=t.length;n--;)a=u(t[n])&&a;return a}var i=g.hotkeys.indexOf(d(t));return i>-1&&(g.hotkeys[i].combo.length>1?g.hotkeys[i].combo.splice(g.hotkeys[i].combo.indexOf(t),1):(angular.forEach(f,function(e){var t=e.indexOf(g.hotkeys[i]);-1!==t&&e.splice(t,1)}),g.hotkeys.splice(i,1)),!0)}function d(e){if(!e)return g.hotkeys;for(var t,a=0;a<g.hotkeys.length;a++)if((t=g.hotkeys[a]).combo.indexOf(e)>-1)return t;return!1}function p(e){return function(a,n){if(e instanceof Array){var i=e[0],s=e[1];e=function(e){s.scope.$eval(i)}}t.$apply(function(){e(a,d(n))})}}var m=!0;Mousetrap.prototype.stopCallback=function(e,t){return!m||!((" "+t.className+" ").indexOf(" mousetrap ")>-1)&&(t.contentEditable&&"true"==t.contentEditable)},o.prototype.format=function(){if(null===this._formated){for(var e=this.combo[0].split(/[\s]/),t=0;t<e.length;t++)e[t]=s(e[t]);this._formated=e}return this._formated};var g=t.$new();g.hotkeys=[],g.helpVisible=!1,g.title=this.templateTitle,g.header=this.templateHeader,g.footer=this.templateFooter,g.toggleCheatSheet=l;var f={};if(this.useNgRoute&&t.$on("$routeChangeSuccess",function(e,t){r(),t&&t.hotkeys&&angular.forEach(t.hotkeys,function(e){var a=e[2];("string"==typeof a||a instanceof String)&&(e[2]=[a,t]),e[5]=!1,c.apply(this,e)})}),this.includeCheatSheet){var h=i[0],v=e[0],b=angular.element(this.template);c(this.cheatSheetHotkey,this.cheatSheetDescription,l),v!==h&&v!==h.documentElement||(v=h.body),angular.element(v).append(a(b)(g))}var y=!1;return{add:c,del:u,get:d,bindTo:function(e){return e.$id in f||(f[e.$id]=[],e.$on("$destroy",function(){for(var t=f[e.$id].length;t--;)u(f[e.$id].pop())})),{add:function(t){var a;return a=arguments.length>1?c.apply(this,arguments):c(t),f[e.$id].push(a),this}}},template:this.template,toggleCheatSheet:l,includeCheatSheet:this.includeCheatSheet,cheatSheetHotkey:this.cheatSheetHotkey,cheatSheetDescription:this.cheatSheetDescription,useNgRoute:this.useNgRoute,purgeHotkeys:r,templateTitle:this.templateTitle,pause:function(){m=!1},unpause:function(){m=!0}}}]}]).directive("hotkey",["hotkeys",function(e){return{restrict:"A",link:function(t,a,n){var i,s=[];angular.forEach(t.$eval(n.hotkey),function(t,a){i="string"==typeof n.hotkeyAllowIn?n.hotkeyAllowIn.split(/[\s,]+/):[],s.push(a),e.add({combo:a,description:n.hotkeyDescription,callback:t,action:n.hotkeyAction,allowIn:i})}),a.bind("$destroy",function(){angular.forEach(s,e.del)})}}}]).run(["hotkeys",function(e){}])}(),function(e,t,a){function n(e,t,a){e.addEventListener?e.addEventListener(t,a,!1):e.attachEvent("on"+t,a)}function i(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return v[e.which]?v[e.which]:b[e.which]?b[e.which]:String.fromCharCode(e.which).toLowerCase()}function s(e,t){return e.sort().join(",")===t.sort().join(",")}function o(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function r(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function l(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function c(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function u(){if(!h){h={};for(var e in v)e>95&&e<112||v.hasOwnProperty(e)&&(h[v[e]]=e)}return h}function d(e,t,a){return a||(a=u()[e]?"keydown":"keypress"),"keypress"==a&&t.length&&(a="keydown"),a}function p(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}function m(e,t){var a,n,i,s=[];for(a=p(e),i=0;i<a.length;++i)n=a[i],w[n]&&(n=w[n]),t&&"keypress"!=t&&y[n]&&(n=y[n],s.push("shift")),c(n)&&s.push(n);return t=d(n,s,t),{key:n,modifiers:s,action:t}}function g(e,a){return e!==t&&(e===a||g(e.parentNode,a))}function f(e){function a(e){e=e||{};var t,a=!1;for(t in w)e[t]?a=!0:w[t]=0;a||(k=!1)}function u(e,t,a,n,i,o){var r,l,u=[],d=a.type;if(!b._callbacks[e])return[];for("keyup"==d&&c(e)&&(t=[e]),r=0;r<b._callbacks[e].length;++r)if(l=b._callbacks[e][r],(n||!l.seq||w[l.seq]==l.level)&&d==l.action&&("keypress"==d&&!a.metaKey&&!a.ctrlKey||s(t,l.modifiers))){var p=!n&&l.combo==i,m=n&&l.seq==n&&l.level==o;(p||m)&&b._callbacks[e].splice(r,1),u.push(l)}return u}function d(e,t,a,n){b.stopCallback(t,t.target||t.srcElement,a,n)||!1===e(t,a)&&(r(t),l(t))}function p(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=i(e);t&&("keyup"!=e.type||$!==t?b.handleKey(t,o(e),e):$=!1)}function g(){clearTimeout(y),y=setTimeout(a,1e3)}function h(e,t,n,s){w[e]=0;for(var o=0;o<t.length;++o){var r=o+1===t.length?function(t){d(n,t,e),"keyup"!==s&&($=i(t)),setTimeout(a,10)}:function(t){return function(){k=t,++w[e],g()}}(s||m(t[o+1]).action);v(t[o],r,s,e,o)}}function v(e,t,a,n,i){b._directMap[e+":"+a]=t;var s,o=(e=e.replace(/\s+/g," ")).split(" ");o.length>1?h(e,o,t,a):(s=m(e,a),b._callbacks[s.key]=b._callbacks[s.key]||[],u(s.key,s.modifiers,{type:s.action},n,e,i),b._callbacks[s.key][n?"unshift":"push"]({callback:t,modifiers:s.modifiers,action:s.action,seq:n,level:i,combo:e}))}var b=this;if(e=e||t,!(b instanceof f))return new f(e);b.target=e,b._callbacks={},b._directMap={};var y,w={},$=!1,x=!1,k=!1;b._handleKey=function(e,t,n){var i,s=u(e,t,n),o={},r=0,l=!1;for(i=0;i<s.length;++i)s[i].seq&&(r=Math.max(r,s[i].level));for(i=0;i<s.length;++i)if(s[i].seq){if(s[i].level!=r)continue;l=!0,o[s[i].seq]=1,d(s[i].callback,n,s[i].combo,s[i].seq)}else l||d(s[i].callback,n,s[i].combo);var p="keypress"==n.type&&x;n.type!=k||c(e)||p||a(o),x=l&&"keydown"==n.type},b._bindMultiple=function(e,t,a){for(var n=0;n<e.length;++n)v(e[n],t,a)},n(e,"keypress",p),n(e,"keydown",p),n(e,"keyup",p)}for(var h,v={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},b={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},y={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},w={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},$=1;$<20;++$)v[111+$]="f"+$;for($=0;$<=9;++$)v[$+96]=$;f.prototype.bind=function(e,t,a){var n=this;return e=e instanceof Array?e:[e],n._bindMultiple.call(n,e,t,a),n},f.prototype.unbind=function(e,t){var a=this;return a.bind.call(a,e,function(){},t)},f.prototype.trigger=function(e,t){var a=this;return a._directMap[e+":"+t]&&a._directMap[e+":"+t]({},e),a},f.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},f.prototype.stopCallback=function(e,t){var a=this;return!((" "+t.className+" ").indexOf(" mousetrap ")>-1)&&(!g(t,a.target)&&("INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable))},f.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},f.init=function(){var e=f(t);for(var a in e)"_"!==a.charAt(0)&&(f[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a))},f.init(),e.Mousetrap=f,"undefined"!=typeof module&&module.exports&&(module.exports=f),"function"==typeof define&&define.amd&&define(function(){return f})}(window,document),function(e,t){"use strict";function a(e){var a=[];return r(a,t.noop).chars(e),a.join("")}function n(e,a){var n,i={},s=e.split(",");for(n=0;n<s.length;n++)i[a?t.lowercase(s[n]):s[n]]=!0;return i}function i(t,a){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t),c.innerHTML=t;var n=5;do{if(0===n)throw u("uinput","Failed to sanitize html because the input is unstable");n--,e.document.documentMode&&l(c),t=c.innerHTML,c.innerHTML=t}while(t!==c.innerHTML);for(var i=c.firstChild;i;){switch(i.nodeType){case 1:a.start(i.nodeName.toLowerCase(),s(i.attributes));break;case 3:a.chars(i.textContent)}var o;if(!((o=i.firstChild)||(1==i.nodeType&&a.end(i.nodeName.toLowerCase()),o=i.nextSibling)))for(;null==o&&(i=i.parentNode)!==c;)o=i.nextSibling,1==i.nodeType&&a.end(i.nodeName.toLowerCase());i=o}for(;i=c.firstChild;)c.removeChild(i)}function s(e){for(var t={},a=0,n=e.length;a<n;a++){var i=e[a];t[i.name]=i.value}return t}function o(e){return e.replace(/&/g,"&amp;").replace(d,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(p,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(e,a){var n=!1,i=t.bind(e,e.push);return{start:function(e,s){e=t.lowercase(e),!n&&w[e]&&(n=e),n||!0!==$[e]||(i("<"),i(e),t.forEach(s,function(n,s){var r=t.lowercase(s),l="img"===e&&"src"===r||"background"===r;!0!==S[r]||!0===x[r]&&!a(n,l)||(i(" "),i(s),i('="'),i(o(n)),i('"'))}),i(">"))},end:function(e){e=t.lowercase(e),n||!0!==$[e]||!0===m[e]||(i("</"),i(e),i(">")),e==n&&(n=!1)},chars:function(e){n||i(o(e))}}}function l(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var a=t.attributes,n=0,i=a.length;n<i;n++){var s=a[n],o=s.name.toLowerCase();"xmlns:ns1"!==o&&0!==o.lastIndexOf("ns1:",0)||(t.removeAttributeNode(s),n--,i--)}var r=t.firstChild;r&&l(r),(r=t.nextSibling)&&l(r)}var c,u=t.$$minErr("$sanitize"),d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=/([^\#-~ |!])/g,m=n("area,br,col,hr,img,wbr"),g=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),f=n("rp,rt"),h=t.extend({},f,g),v=t.extend({},g,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),b=t.extend({},f,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),y=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=n("script,style"),$=t.extend({},m,v,b,h),x=n("background,cite,href,longdesc,src,xlink:href"),k=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),I=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),S=t.extend({},x,I,k);!function(e){var t;if(!e.document||!e.document.implementation)throw u("noinert","Can't create an inert html document");var a=((t=e.document.implementation.createHTMLDocument("inert")).documentElement||t.getDocumentElement()).getElementsByTagName("body");if(1===a.length)c=a[0];else{var n=t.createElement("html");c=t.createElement("body"),n.appendChild(c),t.appendChild(n)}}(e),t.module("ngSanitize",[]).provider("$sanitize",function(){var e=!1;this.$get=["$$sanitizeUri",function(a){return e&&t.extend($,y),function(e){var t=[];return i(e,r(t,function(e,t){return!/^unsafe:/.test(a(e,t))})),t.join("")}}],this.enableSvg=function(a){return t.isDefined(a)?(e=a,this):e}}),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,s=t.$$minErr("linky"),o=t.isString;return function(r,l,c){function u(e){e&&f.push(a(e))}if(null==r||""===r)return r;if(!o(r))throw s("notstring","Expected string but received: {0}",r);for(var d,p,m,g=r,f=[];d=g.match(n);)p=d[0],d[2]||d[4]||(p=(d[3]?"http://":"mailto:")+p),m=d.index,u(g.substr(0,m)),function(e,a){var n;if(f.push("<a "),t.isFunction(c)&&(c=c(e)),t.isObject(c))for(n in c)f.push(n+'="'+c[n]+'" ');else c={};!t.isDefined(l)||"target"in c||f.push('target="',l,'" '),f.push('href="',e.replace(/"/g,"&quot;"),'">'),u(a),f.push("</a>")}(p,d[0].replace(i,"")),g=g.substring(m+d[0].length);return u(g),e(f.join(""))}}])}(window,window.angular);var mod;(mod=angular.module("infinite-scroll",[])).directive("infiniteScroll",["$rootScope","$window","$timeout",function(e,t,a){return{link:function(n,i,s){var o,r,l,c;return t=angular.element(t),l=0,null!=s.infiniteScrollDistance&&n.$watch(s.infiniteScrollDistance,function(e){return l=parseInt(e,10)}),c=!0,o=!1,null!=s.infiniteScrollDisabled&&n.$watch(s.infiniteScrollDisabled,function(e){if((c=!e)&&o)return o=!1,r()}),r=function(){var a,r,u,d;return d=t.height()+t.scrollTop(),a=i.offset().top+i.height(),r=a-d,(u=r<=t.height()*l)&&c?e.$$phase?n.$eval(s.infiniteScroll):n.$apply(s.infiniteScroll):u?o=!0:void 0},t.on("scroll",r),n.$on("$destroy",function(){return t.off("scroll",r)}),a(function(){return s.infiniteScrollImmediateCheck?n.$eval(s.infiniteScrollImmediateCheck)?r():void 0:r()},0)}}}]),function(e,t){"use strict";function a(e){return t.lowercase(e.nodeName||e[0]&&e[0].nodeName)}function n(e,a){var n=!1,i=!1;this.ngClickOverrideEnabled=function(s){return t.isDefined(s)?(s&&!i&&(i=!0,o.$$moduleName="ngTouch",a.directive("ngClick",o),e.decorator("ngClickDirective",["$delegate",function(e){if(n)e.shift();else for(var t=e.length-1;t>=0;){if("ngTouch"===e[t].$$moduleName){e.splice(t,1);break}t--}return e}])),n=s,this):n},this.$get=function(){return{ngClickOverrideEnabled:function(){return n}}}}function i(e,a,n){s.directive(e,["$parse","$swipe",function(i,s){var o=75,r=.3,l=30;return function(c,u,d){function p(e){if(!m)return!1;var t=Math.abs(e.y-m.y),n=(e.x-m.x)*a;return g&&t<o&&n>0&&n>l&&t/n<r}var m,g,f=i(d[e]),h=["touch"];t.isDefined(d.ngSwipeDisableMouse)||h.push("mouse"),s.bind(u,{start:function(e,t){m=e,g=!0},cancel:function(e){g=!1},end:function(e,t){p(e)&&c.$apply(function(){u.triggerHandler(n),f(c,{$event:t})})}},h)}}])}var s=t.module("ngTouch",[]);s.provider("$touch",n),n.$inject=["$provide","$compileProvider"],s.factory("$swipe",[function(){function e(e){var t=e.originalEvent||e,a=t.touches&&t.touches.length?t.touches:[t],n=t.changedTouches&&t.changedTouches[0]||a[0];return{x:n.clientX,y:n.clientY}}function a(e,a){var i=[];return t.forEach(e,function(e){var t=n[e][a];t&&i.push(t)}),i.join(" ")}var n={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(t,n,i){var s,o,r,l,c=!1;i=i||["mouse","touch"],t.on(a(i,"start"),function(t){r=e(t),c=!0,s=0,o=0,l=r,n.start&&n.start(r,t)});var u=a(i,"cancel");u&&t.on(u,function(e){c=!1,n.cancel&&n.cancel(e)}),t.on(a(i,"move"),function(t){if(c&&r){var a=e(t);if(s+=Math.abs(a.x-l.x),o+=Math.abs(a.y-l.y),l=a,!(s<10&&o<10))return o>s?(c=!1,void(n.cancel&&n.cancel(t))):(t.preventDefault(),void(n.move&&n.move(a,t)))}}),t.on(a(i,"end"),function(t){c&&(c=!1,n.end&&n.end(e(t),t))})}}}]);var o=["$parse","$timeout","$rootElement",function(e,n,i){function s(e,t,a,n){return Math.abs(e-a)<g&&Math.abs(t-n)<g}function o(e,t,a){for(var n=0;n<e.length;n+=2)if(s(e[n],e[n+1],t,a))return e.splice(n,n+2),!0;return!1}function r(e){if(!(Date.now()-u>m)){var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].clientX,i=t[0].clientY;n<1&&i<1||p&&p[0]===n&&p[1]===i||(p&&(p=null),"label"===a(e.target)&&(p=[n,i]),o(d,n,i)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur&&e.target.blur()))}}function l(e){var t=e.touches&&e.touches.length?e.touches:[e],a=t[0].clientX,i=t[0].clientY;d.push(a,i),n(function(){for(var e=0;e<d.length;e+=2)if(d[e]==a&&d[e+1]==i)return void d.splice(e,e+2)},m,!1)}function c(e,t){d||(i[0].addEventListener("click",r,!0),i[0].addEventListener("touchstart",l,!0),d=[]),u=Date.now(),o(d,e,t)}var u,d,p,m=2500,g=25,f="ng-click-active";return function(a,n,i){function s(){p=!1,n.removeClass(f)}var o,r,l,u,d=e(i.ngClick),p=!1;n.on("touchstart",function(e){p=!0,3==(o=e.target?e.target:e.srcElement).nodeType&&(o=o.parentNode),n.addClass(f),r=Date.now();var t=e.originalEvent||e,a=(t.touches&&t.touches.length?t.touches:[t])[0];l=a.clientX,u=a.clientY}),n.on("touchcancel",function(e){s()}),n.on("touchend",function(e){var a=Date.now()-r,d=e.originalEvent||e,m=(d.changedTouches&&d.changedTouches.length?d.changedTouches:d.touches&&d.touches.length?d.touches:[d])[0],g=m.clientX,f=m.clientY,h=Math.sqrt(Math.pow(g-l,2)+Math.pow(f-u,2));p&&a<750&&h<12&&(c(g,f),o&&o.blur(),t.isDefined(i.disabled)&&!1!==i.disabled||n.triggerHandler("click",[e])),s()}),n.onclick=function(e){},n.on("click",function(e,t){a.$apply(function(){d(a,{$event:t||e})})}),n.on("mousedown",function(e){n.addClass(f)}),n.on("mousemove mouseup",function(e){n.removeClass(f)})}}];i("ngSwipeLeft",-1,"swipeleft"),i("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("we7app",["ngAnimate","ngSanitize","ui.bootstrap","angular-clipboard"]),angular.module("we7app").run(["$rootScope",function(e){e.URL="test"}]),angular.module("we7app").factory("interceptors",[function(){return{request:function(e){return e.beforeSend&&e.beforeSend(),e},response:function(e){return e.config.complete&&e.config.complete(e),e}}}]),angular.module("we7app").config(["$httpProvider",function(e){e.interceptors.push("interceptors"),e.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=utf-8",e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var t=function(e){var a,n,i,s,o,r,l="";for(a in e)if((n=e[a])instanceof Array)for(r=0;r<n.length;++r)s=n[r],(o={})[a+"["+r+"]"]=s,l+=t(o)+"&";else if(n instanceof Object)for(i in n)s=n[i],(o={})[a+"["+i+"]"]=s,l+=t(o)+"&";else void 0!==n&&null!==n&&(l+=encodeURIComponent(a)+"="+encodeURIComponent(n)+"&");return l.length?l.substr(0,l.length-1):l};e.defaults.transformRequest=[function(e){return angular.isObject(e)&&"[object File]"!==String(e)?t(e):e}]}]),$(function(){function e(){1==util.cookie.get("main-lg")?($(".skin-default").addClass("main-lg-body"),$(".js-big-main").text("正常")):($(".skin-default").removeClass("main-lg-body"),$(".js-big-main").text("宽屏"))}if(util.cookie_message(),window.sysinfo.uid&&util.cookie.set("__lastvisit_"+window.sysinfo.uid,[window.sysinfo.uniacid,window.sysinfo.siteurl],604800),$(".js-clip").each(function(){util.clip(this,$(this).attr("data-url"))}),$.fn.tooltip&&($('[data-toggle="tooltip"]').tooltip(),$('[data-toggle="dropdown"]').dropdown(),$('[data-toggle="popover"]').popover()),$("img").error(function(){if(!$(this).attr("onerror")){var e="Common/resource/images/nopic-107.png";$(this).width()==$(this).height()?e="Common/resource/images/nopic-107.png":$(this).width()<$(this).height()&&(e="Common/resource/images/nopic-203.png"),$(this).attr("src",e)}}),window.sysinfo.module&&window.sysinfo.module.name&&(null===util.cookie.get("module_status:"+window.sysinfo.module.name)||null===util.cookie.get("module_status:"+window.sysinfo.module.name)?$.getJSON("./index.php?c=module&a=manage-account&do=check_status&module="+window.sysinfo.module.name,function(e){(1==e.message.errno||2==e.message.errno&&1==window.sysinfo.isfounder)&&$(".head").after('<div class="system-tips we7-body-alert"><div class="container text-right"> <span class="alert-info"><a href="javascript:;">'+e.message.message+"</a></span></div></div>")}):(module_status=util.cookie.get("module_status:"+window.sysinfo.module.name),module_status=$.parseJSON(module_status),1==module_status.ban?$(".head").after('<div class="system-tips we7-body-alert"><div class="container text-right"> <span class="alert-info"><a href="javascript:;">您的站点存在盗版模块, 请删除文件后联系客服</a></span></div></div>'):1==module_status.upgrade.upgrade&&1==window.sysinfo.isfounder&&$(".head").after('<div class="system-tips we7-body-alert"><div class="container text-right"> <span class="alert-info"><a href="javascript:;">【'+module_status.upgrade.name+"】检测最新版为"+module_status.upgrade.version+",请尽快更新!</a></span></div></div>"))),window.sysinfo.isfounder,$(".js-big-main").click(function(){var t=$(".skin-default").hasClass("main-lg-body")?"0":"1";util.cookie.set("main-lg",t),e()}),window.sysinfo.uid){var t=new Date;$.getJSON("./index.php?c=message&a=notice&do=event_notice",function(e){var a="";0==e.message.errno&&e.message.message.total&&(a+='<a href="javascript:;" class="dropdown-toogle" data-toggle="dropdown"><span class="wi wi-bell"><span class="badge">'+e.message.message.total+"</span></span> </a>",a+='<div class="dropdown-menu"><div class="clearfix top">消息<a href="./index.php?c=message&a=notice" class="pull-right">查看更多</a><a href="./index.php?c=message&a=notice&do=all_read" class="pull-right" style="margin-right: 5px">全部已读</a></div><div class="msg-list-container"><div class="msg-list">',$.each(e.message.message.lists,function(e,t){a+='<div class="item"><div class="info clearifx"><div class="pull-right date">'+t.create_time+"</div>",1==t.type&&(a+="来自 <span>订单消息</span>"),2!=t.type&&5!=t.type||(a+="来自 <span>过期消息</span>"),4==t.type&&(a+="来自 <span>注册消息</span>"),3==t.type&&(a+="来自 <span>工单消息</span>"),8==t.type&&(a+="来自 <span>小程序升级模块消息</span>"),10==t.type&&(a+="来自 <span>系统更新通知消息</span>"),11==t.type&&(a+="来自 <span>官方动态消息</span>"),a+='</div><div class="msg-content">',a+="<a href="+t.url+">"+t.message+"</a>",a+="</div></div>"}),a+="</div></div></div>",$(".header-notice").html(a));var n=parseInt(t.getTime()/1e3),i=21600+Math.ceil(1800*Math.random()),s=n+i;util.cookie.set("__notice",s,i)})}}),window.UEDITOR_HOME_URL="./resource/components/ueditor/",$(function(){if(1==$("[data-skin='black']").length&&resizeView(),3==$(".menu-fixed, .left-menu, .right-content").length){require(["slimscroll"],function(){$(".plugin-menu-sub").slimscroll({width:"210px",height:"100%",opacity:.4,color:"#aaa"})});var e=document.documentElement.clientHeight,t=$(".left-menu"),a=t.offset().top,n=t.css("position"),i=$(".footer").length>0?$(".footer").css("height"):0;"default"==$(".skin-default").attr("data-skin")&&$(".left-menu, .skin-default .right-content").css("min-height",e-174-parseInt(i)+"px"),"black"==$(".skin-black").attr("data-skin")&&$(".left-menu, .skin-default .right-content").css("min-height",e-51+"px"),$(window).scroll(function(){var i=$(".footer").length>0&&!$(".footer").is(":hidden")?$(".footer").offset().top:0,s=$(document).scrollTop(),o=i?i-s:e;"default"==$(".skin-default").attr("data-skin")?(s>a?t.css({position:"fixed",height:"auto",top:0,bottom:e>o?e-o+31+"px":"0"}):t.css({position:n,height:e}),s>a?$(".right-content").css({marginLeft:t.css("width")}):$(".right-content").css({marginLeft:0,minHeight:t.height()})):"black"==$(".skin-black").attr("data-skin")&&(s>a?t.css({position:"fixed",top:0,bottom:0}):t.css({position:n,top:s}),s>a?$(".right-content").css({marginLeft:t.css("width")}):$(".right-content").css({marginLeft:0,minHeight:t.height()}))})}if(1==$("[data-skin='classical']").length){var e=document.documentElement.clientHeight,i=$(".footer").length>0?$(".footer").css("height"):0;2==$(".left-menu, .right-content").length&&$(".right-content>.content").css("min-height",e-parseInt(i)-71),$(".panel-cut").length>0&&$(".panel-cut").css("min-height",e-parseInt(i)-71)}var s=document.createElement("script");s.src="";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(s,o)}),angular.module("we7app").directive("we7Colorpicker",[function(){return{templateUrl:"directive-colorpicker-colorpicker.html",scope:{colorValue:"=we7MyColor",colorDefault:"=we7MyDefaultColor",colorFormName:"=we7FormName"},link:function(e,t,a){$(t).data("data-colorpicker-init")||(util.colorpicker(t,function(a){$(t).parent().parent().find(":text").val(a.toHexString()),e.colorValue=a.toHexString(),e.$apply("colorValue"),e.$watch("colorValue",function(a){$(t).spectrum("get")!=a&&($(t).spectrum("set",a||e.colorDefault),$(t).parent().parent().find(":text").val(a||e.colorDefault),$(t).parent().parent().find(".input-group-addon").css("background-color",a||e.colorDefault))})}),$(t).find(".colorclean").click(function(){return $(t).find(":text").val("rgba(0,0,0,0)"),$(t).find(".input-group-addon").css("background-color","rgba(0,0,0,0)"),e.colorValue=e.colorDefault="rgba(0,0,0,0)",$(t).spectrum("set",e.colorDefault),e.$apply("colorValue"),!1}),$(t).data("data-colorpicker-init",!0))}}}]),angular.module("we7app").directive("we7DatePicker",["$http","$parse",function(){return{transclude:!0,template:"<span ng-transclude></span>",scope:{dateValue:"=we7DateValue"},link:function(e,t,a){var n={lang:"zh",step:"1",format:"Y-m-d H:i:s",closeOnDateSelect:!0,onSelectDate:function(t,a){e.dateValue=t.dateFormat("Y-m-d H:i:s"),e.$apply("dateValue")},onSelectTime:function(t,a){e.dateValue=t.dateFormat("Y-m-d H:i:s"),e.$apply("dateValue")}};$(t).datetimepicker(n)}}}]),angular.module("we7app").directive("we7DateRangePicker",["$compile","$parse","$filter",function(e,t,a){return{restrict:"A",require:"?ngModel",link:function(e,n,i,s){require(["daterangepicker"],function(){function o(e){return moment.isMoment(e)?e.toDate():e}function r(e){return moment.isMoment(e)?e:moment(e)}function l(e){return a("date")(o(e),u.format.replace(/Y/g,"y").replace(/D/g,"d"))}function c(e){return[l(e.startDate),l(e.endDate)].join(u.separator)}var u={};u.format=i.format||"YYYY-MM-DD",u.separator=i.separator||" - ",u.minDate=i.minDate&&moment(i.minDate),u.maxDate=i.maxDate&&moment(i.maxDate),u.dateLimit=i.limit&&moment.duration.apply(this,i.limit.split(" ").map(function(e,t){return 0===t&&parseInt(e,10)||e})),u.ranges=i.ranges&&t(i.ranges)(e),u.locale=i.locale&&t(i.locale)(e),u.opens=i.opens||t(i.opens)(e),i.enabletimepicker&&(u.timePicker=!0,angular.extend(u,t(i.enabletimepicker)(e))),s.$render=function(){s.$viewValue&&s.$viewValue.startDate&&n.val(c(s.$viewValue))},e.$watch(function(){return i.ngModel},function(t,a){e[t]&&e[t].startDate?a===t&&(n.data("daterangepicker").startDate=r(e[t].startDate),n.data("daterangepicker").endDate=r(e[t].endDate),n.data("daterangepicker").updateView(),n.data("daterangepicker").updateCalendars(),n.data("daterangepicker").updateInputText()):s.$setViewValue({startDate:moment().startOf("day"),endDate:moment().startOf("day")})}),n.daterangepicker(u,function(t,a,n){var i=s.$viewValue;angular.equals(t,i.startDate)&&angular.equals(a,i.endDate)||e.$apply(function(){s.$setViewValue({startDate:moment.isMoment(i.startDate)?t:t.toDate(),endDate:moment.isMoment(i.endDate)?a:a.toDate()}),s.$render()})})})}}}]),angular.module("we7app").directive("we7Editor",function(){var e={scope:{value:"=?we7MyValue",params:"=?we7MyParams"},template:'<textarea id="" rows="10" style="height:600px;width:100%"></textarea>',link:function(t,a,n){if(!a.data("editor")){a.find("textarea").attr("id","editor"+(new Date).getTime());var i={autoClearinitialContent:!1,toolbars:[["fullscreen","source","preview","|","bold","italic","underline","strikethrough","forecolor","backcolor","|","justifyleft","justifycenter","justifyright","|","insertorderedlist","insertunorderedlist","blockquote","emotion","link","removeformat","|","rowspacingtop","rowspacingbottom","lineheight","indent","paragraph","fontfamily","fontsize","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","|","anchor","map","print","drafts"]],elementPathEnabled:!1,initialFrameHeight:200,focus:!1,maximumWords:9999999999999,autoFloatEnabled:!1};e=UE.getEditor(a.find("textarea").attr("id"),i),a.data("editor",e),e.addListener("contentChange",function(){t.value=e.getContent(),t.value&&(t.params=t.value.replace(/\&quot;/g,"#quot;")),t.$root.$$phase||t.$apply("value")}),e.addListener("ready",function(){!t.value&&t.params&&(t.value=t.params.replace(/\#quot;/g,"&quot;")),t.value&&e&&e.getContent()!=t.value&&e.setContent(t.value),t.$watch("value",function(t){e&&e.getContent()!=t&&e.setContent(t||"")})})}}};return e}),angular.module("we7app").directive("we7Iconer",["$templateCache",function(e){e.get("directive-iconer-nav-pills-inline.html"),e.get("directive-iconer-tab-content-inline.html");return{scope:{image:"=we7MyImage",icon:"=we7MyIcon",iconcolor:"=we7MyIconColor"},transclude:!0,templateUrl:"directive-iconer-iconer.html",link:function(e,t,a){e.selectIcon=function(){require(["fileUploader"],function(t){t.show(function(t){e.icon={},e.icon.name=t.name,e.icon.color=t.color,e.$apply("image"),e.$apply("icon")},{direct:!0,multiple:!1,type:"icon",otherVal:e.iconcolor})})},e.removeIcon=function(){e.image="",e.icon={}}}}}]),angular.module("we7app").directive("we7InitialSearchbar",function(){return{templateUrl:"directive-initialsearchbar-searchbar.html",scope:{doSearch:"&we7SearchCallback"},link:function(e,t,a){e.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],e.searchResult=function(t){e.activeLetter=t,e.doSearch({letter:t})}}}}),angular.module("we7app").directive("we7Linker",["$http","$templateCache",function(e,t){var a=t.get("directive-linker-cms-header-inline.html"),n=t.get("directive-linker-cms-content-inline.html"),s=t.get("directive-linker-cms-article-item-inline.html"),o=t.get("directive-linker-cms-cate-item-inline.html"),r=t.get("directive-linker-news-content-inline.html"),l=t.get("directive-linker-news-item-inline.html"),c=t.get("directive-linker-page-content-inline.html"),u=t.get("directive-linker-page-item-inline.html"),d=t.get("directive-linker-map-content-inline.html"),p=t.get("directive-linker-tel-content-inline.html");return{templateUrl:"directive-linker-linker.html",scope:{url:"=we7MyUrl",title:"=we7MyTitle"},link:function(t,m,g){m.find(".input-group-btn").mouseover(function(e){clearTimeout(t.timer),m.find(".dropdown-menu").show()}).mouseout(function(){t.timer=setTimeout(function(){m.find(".dropdown-menu").hide()},500)}),m.find(".dropdown-menu").mouseover(function(){clearTimeout(t.timer),m.find(".dropdown-menu").show()}).mouseout(function(){t.timer=setTimeout(function(){m.find(".dropdown-menu").hide()},500)}),t.addLink=function(e,a){t.url=e,a&&(t.title=a)},t.searchSystemLinker=function(){t.modalobj=util.dialog("请选择链接",["./index.php?c=utility&a=link&callback=selectLinkComplete"],"",{containerName:"link-search-system"}),t.modalobj.modal({keyboard:!1}),t.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),t.modalobj.modal("show"),window.selectLinkComplete=function(e,a){t.addLink(e,a),t.$apply("url","title"),t.modalobj.modal("hide")}},t.searchCmsLinker=function(r){var l={};l.header=a,l.content=n,l.footer="",l.articleitem=s,l.cateitem=o,$("#link-search-cms")[0]?t.modalobj=$("#link-search-cms").data("modal"):(t.modalobj=util.dialog(l.header,l.content,l.footer,{containerName:"link-search-cms"}),t.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),t.modalobj.modal("show"),t.modalobj.on("hidden.bs.modal",function(){t.modalobj.remove()}),$("#link-search-cms").data("modal",t.modalobj)),r=r||1;var c=$("#articlelist .article-list-input").val();e.get("./index.php?c=utility&a=link&do=articlelist&page="+r+"&keyword="+c).success(function(e,a,n,s){var o={items:[]};if(e.message=e.message.message,e.message.list){for(i in e.message.list)o.items.push({title:e.message.list[i].title,id:e.message.list[i].id,uniacid:e.message.list[i].uniacid,attachment:e.message.list[i].thumb_url,createtime:e.message.list[i].createtime});t.modalobj.find("#articlelist tbody").html(_.template(l.articleitem)(o)),t.modalobj.find("#pager").html(e.message.pager),t.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return t.searchCmsLinker($(this).attr("page")),!1}),t.modalobj.find("#articlelist .input-group-btn").click(function(){return t.searchCmsLinker(),!1}),t.modalobj.find(".js-btn-select").click(function(){t.addLink($(this).attr("js-url"),$(this).attr("js-title")),t.$apply("url","title"),t.modalobj.modal("hide")})}});var u=$("#category .category-list-input").val();e.get("./index.php?c=utility&a=link&do=catelist&page="+r+"&keyword="+u).success(function(e,a,n,s){var o={items:[]};if(e.message=e.message.message,e.message){for(i in e.message)o.items.push({id:e.message[i].id,uniacid:e.message[i].uniacid,name:e.message[i].name,children:e.message[i].children});t.modalobj.find("#category tbody").html(_.template(l.cateitem)(o)),t.modalobj.find("#category .input-group-btn").click(function(){return t.searchCmsLinker(),!1}),t.modalobj.find(".js-btn-select").click(function(){t.addLink($(this).attr("js-url"),$(this).attr("js-title")),t.$apply("url","title"),t.modalobj.modal("hide")})}})},t.searchNewsLinker=function(a){var n={};n.content=r,n.footer="",n.newsitem=l,$("#link-search-news")[0]?t.modalobj=$("#link-search-news").data("modal"):(t.modalobj=util.dialog(n.header,n.content,n.footer,{containerName:"link-search-news"}),t.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),t.modalobj.modal("show"),t.modalobj.on("hidden.bs.modal",function(){t.modalobj.remove()}),$("#link-search-news").data("modal",t.modalobj)),a=a||1;var s=$("#newslist .news-list-input").val();e.get("./index.php?c=utility&a=link&do=newslist&page="+a+"&keyword="+s).success(function(e,a,s,o){var r={items:[]};if(e.message=e.message.message,e.message.list){for(i in e.message.list)r.items.push({title:e.message.list[i].title,id:e.message.list[i].id,uniacid:window.sysinfo.uniacid,attachment:e.message.list[i].thumb_url,createtime:e.message.list[i].createtime,url:e.message.list[i].url});t.modalobj.find("#newslist tbody").html(_.template(n.newsitem)(r)),t.modalobj.find("#pager").html(e.message.pager),t.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return t.searchNewsLinker($(this).attr("page")),!1}),t.modalobj.find("#newslist .input-group-btn").click(function(){return t.searchNewsLinker(),!1}),t.modalobj.find(".js-btn-select").click(function(){t.addLink($(this).attr("js-url"),$(this).attr("js-title")),t.$apply("url","title"),t.modalobj.modal("hide")})}})},t.searchPageLinker=function(a){var n={};n.content=c,n.footer="",n.pageItem=u,$("#link-search-page")[0]?t.modalobj=$("#link-search-page").data("modal"):(t.modalobj=util.dialog(n.header,n.content,n.footer,{containerName:"link-search-page"}),t.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),t.modalobj.modal("show"),t.modalobj.on("hidden.bs.modal",function(){t.modalobj.remove()}),$("#link-search-page").data("modal",t.modalobj)),a=a||1;var s=$("#pageList .page-list-input").val();e.get("./index.php?c=utility&a=link&do=pagelist&&page="+a+"&keyword="+s).success(function(e,a,s,o){var r={items:[]};if(e.message=e.message.message,e.message.list){for(i in e.message.list)r.items.push({title:e.message.list[i].title,id:e.message.list[i].id,uniacid:window.sysinfo.uniacid,createtime:e.message.list[i].createtime});t.modalobj.find("#pageList tbody").html(_.template(n.pageItem)(r)),t.modalobj.find("#pager").html(e.message.pager),t.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return t.searchPageLinker($(this).attr("page")),!1}),t.modalobj.find("#pageList .input-group-btn").click(function(){return t.searchPageLinker(),!1}),t.modalobj.find(".js-btn-select").click(function(){t.addLink($(this).attr("js-url"),$(this).attr("js-title")),t.$apply("url","title"),t.modalobj.modal("hide")})}})},t.searchMapPosLinker=function(){var e={};e.content=d,t.modalobj=util.dialog(e.content),t.modalobj.modal("show"),t.modalobj.find("#getnav").click(function(){t.addLink("https://api.map.baidu.com/marker?location="+$("#navlat").val()+","+$("#navlng").val()+"&title="+$("#navtitle").val()+"&name="+$("#navtitle").val()+"&output=html&src=we7",$("#navtitle").val()),t.$apply("url","title"),t.modalobj.modal("hide")})},t.addTelLinker=function(){var e={};e.content=p,t.modalobj=util.dialog("一键拨号",e.content),t.modalobj.modal("show"),t.modalobj.find(".btn-primary").click(function(){t.addLink("tel:"+t.modalobj.find("#telphone").val(),""),t.$apply("url","title"),t.modalobj.modal("hide")})}}}}]),angular.module("we7app").directive("we7ResourcePicker",function(){return{scope:{type:"@type",isWechat:"@isWechat",multiple:"@mutiple",showType:"@showType",needType:"@needType",global:"@global",dest_dir:"@dest_dir",onSelect:"&onSelect"},link:function(e,t,a){$(t).unbind("click").on("click",function(){e.show()}),$(window).unbind("resource_selected").on("resource_selected",function(t,a){e.finish(a.type,a.items)})},controller:function(e){var t=function(e){return"<div "+("we7-resource-"+e+"-dialog")+' class="uploader-modal modal fade '+e+'" id="material-Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"></div>'};e.show=function(){var a={type:e.type,isWechat:"true"===e.isWechat,multiple:"true"===e.multiple,needType:e.needType<=3?e.needType:3,global:"true"===e.global,dest_dir:e.dest_dir};$("#material-Modal").remove();var n=t(e.type);$(document.body).prepend(n);var i=$("#material-Modal");i.modal("show"),angular.module("we7resource").value("config",a),angular.bootstrap(i,["we7resource"])},e.finish=function(t,a){e.onSelect({type:t,items:a}),$("#material-Modal").modal("hide")}}}}),angular.module("we7app").run(["$templateCache",function(e){"use strict";e.put("directive-colorpicker-colorpicker.html",'<div class="input-group"><input type="text" name="{{colorFormName}}" value="" ng-model="colorValue" class="form-control"> <span class="input-group-addon" style="width:35px; border-left:none" ng-style="{\'background-color\' : colorValue}"></span> <span class="input-group-btn"><button class="btn btn-default colorpicker" type="button">选择颜色 <i class="fa fa-caret-down"></i></button> <button class="btn btn-default colorclean" type="button"><span><i class="fa fa-remove"></i></span></button></span></div>'),e.put("directive-iconer-iconer.html",'<div class="nav-img-box" style="background-color: #2B2D30"><div class="btns"><a style="height:19px" ng-click="removeIcon()" href="javascript:;"><i class="fa fa-times"></i></a></div><div class="nav-img" ng-style="{\'background-image\': image ? \'url(\'+image+\')\' : \'\'}"><i ng-hide="menu.image" class="fa" ng-style="{\'color\' : icon.color}" ng-class="icon.name"></i></div><a href="javascript:;" ng-click="selectIcon()"><span ng-transclude></span></a></div>'),e.put("directive-iconer-nav-pills-inline.html",'<li id="li_icon" role="presentation"><a href="#icon" aria-controls="icon" role="tab" data-toggle="tab">图标</a></li>'),e.put("directive-iconer-tab-content-inline.html",'<div id="icon" class="tab-pane icon form-horizontal" role="tabpanel"><div class="form-group" style="border-bottom:1px solid #e5e5e5; padding:0 0 15px 0; margin:10px 0 0 0"><label class="col-xs-3 control-label">图标颜色</label><div class="col-xs-9"><input type="color" value="" class="form-control" id="iconcolor" onchange="$(this).parents(\'#icon\').attr(\'color\', this.value);$(this).parents(\'#icon\').find(\'i\').css(\'color\', this.value)"></div></div></div>'),e.put("directive-initialsearchbar-searchbar.html",'<ul class="letters-list cut-wechat-letters"><li ng-click="searchResult(\'\')"><a href="javascript:;">不限</a></li><li ng-repeat="letter in alphabet" ng-style="{\'background-color\': letter == activeLetter ? \'#ddd\' : \'none\'}" ng-class="{\'active\': letter == activeLetter}" ng-click="searchResult(letter)"><a href="javascript:;" ng-bind="letter"></a></li></ul>'),e.put("directive-linker-cms-article-item-inline.html",'<%_.each(items, function(item) {%><tr><td><a href="#" data-cover-attachment-url="<%=item.attachment%>" title="<%=item.title%>"><%=item.title%></a></td><td><%=item.createtime%></td><td class="text-right"><button class="btn btn-default js-btn-select" js-url="./index.php?c=site&a=site&do=detail&id=<%=item.id%>&i=<%=item.uniacid%>" js-title="<%=item.title%>">选取</button></td></tr><%});%>'),e.put("directive-linker-cms-cate-item-inline.html",'<%_.each(items, function(item) {%><tr><td colspan="2"><a href="#"><%=item.name%></a></td><td class="text-right"><a class="btn btn-default js-btn-select" js-url="./index.php?c=site&a=site&cid=<%=item.id%>&i=<%=item.uniacid%>" js-title="<%=item.name%>">选取</a></td></tr><%_.each(item.children, function(child) {%><tr><td colspan="2" style="padding-left:50px;height:30px;line-height:30px;background-image:url(\\\'./Common/resource/images/bg_repno.gif\\\'); background-repeat:no-repeat; background-position: -245px -540px"><a href="#"><%=child.name%></a></td><td class="text-right"><a class="btn btn-default js-btn-select" js-url="./index.php?c=site&a=site&cid=<%=child.id%>&i=<%=child.uniacid%>" js-title="<%=child.name%>">选取</a></td></tr><%});%><%});%>'),e.put("directive-linker-cms-content-inline.html",'<div class="tab-content"><div id="articlelist" class="tab-pane active" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">标题</th><th style="width:30%">创建时间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control article-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div><div id="category" class="tab-pane" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">标题</th><th style="width:30%">创建时间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control category-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div></div>'),e.put("directive-linker-cms-header-inline.html",'<ul role="tablist" class="nav nav-pills" style="font-size:14px; margin-top:-20px"><li role="presentation" class="active" id="li_goodslist"><a data-toggle="tab" role="tab" aria-controls="articlelist" href="#articlelist">文章</a></li><li role="presentation" class="" id="li_category"><a data-toggle="tab" role="tab" aria-controls="category" href="#category">分类</a></li></ul>'),e.put("directive-linker-linker.html",'<div class="dropdown link"><div class="input-group"><input type="text" value="" placeholder="链接地址:http://example.com" ng-model="url" class="form-control"> <span class="input-group-btn"><button class="btn btn-default" type="button" onclick="">选择链接 <i class="fa fa-caret-down"></i></button></span></div><ul class="dropdown-menu" role="menu" style="left: 0; right:0"><li><a href="javascript:;" ng-click="searchSystemLinker()">系统菜单</a></li><li><a href="javascript:;" ng-click="searchPageLinker()">微页面</a></li><li><a href="javascript:;" ng-click="searchCmsLinker()">文章及分类</a></li><li><a href="javascript:;" ng-click="searchNewsLinker()">图文回复</a></li><li><a href="javascript:;" ng-click="searchMapPosLinker()">一键导航</a></li><li><a href="javascript:;" ng-click="addTelLinker()">一键拨号</a></li></ul></div>'),e.put("directive-linker-map-content-inline.html",'<div class="model-dialog"><div class="model-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel">一键导航</h4></div><div class="modal-body"><form action="" class="form-horizontal" role="form" enctype="multipart/form-data"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"><span style="font-size:16px">标题</span></label><div class="col-sm-9 col-xs-12"><input type="text" id="navtitle" class="form-control" name="navtitle" value=""></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"><span style="font-size:16px">地理位置</span></label><div class="col-sm-9 col-xs-12"><div class="row row-fix"><div class="col-xs-4 col-sm-4"><input type="text" name="navtitle[lng]" id="navlng" value="" placeholder="地理经度" class="form-control"></div><div class="col-xs-4 col-sm-4"><input type="text" name="navtitle[lat]" id="navlat" value="" placeholder="地理纬度" class="form-control"></div><div class="col-xs-4 col-sm-4"><button onclick="showCoordinate(this)" class="btn btn-default" type="button">选择坐标</button></div></div><script type="text/javascript">function showCoordinate(elm) {\r\n\t\t\t\t\tvar val = {};\r\n\t\t\t\t\tval.lng = parseFloat($(elm).parent().prev().prev().find(":text").val());\r\n\t\t\t\t\tval.lat = parseFloat($(elm).parent().prev().find(":text").val());\r\n\t\t\t\t\tutil.qqmap(val, function(r){\r\n\t\t\t\t\t\t$(elm).parent().prev().prev().find(":text").val(r.lng);\r\n\t\t\t\t\t\t$(elm).parent().prev().find(":text").val(r.lat);\r\n\t\t\t\t\t});\r\n\t\t\t\t};<\/script></div></div></form></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal" id="getnav">确定</button></div></div>'),e.put("directive-linker-news-content-inline.html",'<div id="newslist" class="tab-pane active" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">标题</th><th style="width:30%">创建时间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control news-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div>'),e.put("directive-linker-news-item-inline.html",'<%_.each(items, function(item) {%><tr><td><a href="#" data-cover-attachment-url="<%=item.attachment%>" title="<%=item.title%>"><%=item.title%></a></td><td><%=item.createtime%></td><td class="text-right"><button class="btn btn-default js-btn-select" js-url="<%=item.url%>" js-title="<%=item.title%>">选取</button></td></tr><%});%>'),e.put("directive-linker-page-content-inline.html",'<div id="pageList" class="tab-pane active" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">名称</th><th style="width:30%">创建间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control page-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div>'),e.put("directive-linker-page-item-inline.html",'<%_.each(items, function(item) {%><tr><td><a href="#" title="<%=item.title%>"><%=item.title%></a></td><td><%=item.createtime%></td><td class="text-right"><button class="btn btn-default js-btn-select" js-url="./index.php?i=<%=item.uniacid%>&c=home&a=page&id=<%=item.id%>" js-title="<%=item.title%>">选取</button></td></tr><%});%>'),e.put("directive-linker-tel-content-inline.html",'<div class="" id="telphone-modal"><div class="form-group list-group-item clearfix"><label style="margin-top:5px" class="col-xs-12 col-sm-2 col-md-2 control-label">号码</label><div class="col-sm-6"><input type="text" value="" id="telphone" name="telphone" class="form-control"></div><div class="col-sm-4"><a class="btn btn-primary" href="javascript:;">确定</a></div></div></div>'),e.put("fans-tag-selector.html",'<div style="text-align:left" class="modal fade {{modalClass}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">勾选粉丝标签(每个粉丝最多3个标签)</h4></div><div class="modal-body row"><label class="checkbox-inline col-md-3" style="margin-left:0px" ng-repeat="tag in tags" ng-click="checkMaxNumb($event)"><input type="checkbox" value="{{tag.id}}" ng-model="selectTags[tag.id]"> {{tag.name}}</label></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button type="button" class="btn btn-primary" ng-click="tagSubmit($event)" data-dismiss="modal">确定</button></div></div></div></div>'),e.put("directive-basic-basic.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-basic-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">文字</h4></div><div class="modal-body material-content clearfix"><div id="basic" class="material-body we7-form"><div class="color-gray">您还可以使用表情和链接 <a href="javascript:;" class="emoji-triggers" ng-click="emoji()"><span class="fa fa-github-alt"></span>表情</a> <a href="javascript:;" class="emotion-triggers" title="添加表情" ng-click="emotion()"><span class="fa fa-github-alt"></span>Emoji</a></div><textarea id="basictext" rows="10" class="form-control"></textarea></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-icon-icon.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-icon-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel2">图标</h4></div><div class="modal-body material-content clearfix"><div class="material-nav"><a href="javascript:;" ng-click="setIndex(0)" ng-class="{true:\'active\',false:\'\'}[index==0]">Web Icons</a> <a href="javascript:;" ng-click="setIndex(1)" ng-class="{true:\'active\',false:\'\'}[index==1]">File Type Icons</a> <a href="javascript:;" ng-click="setIndex(2)" ng-class="{true:\'active\',false:\'\'}[index==2]">Spinner Icons</a> <a href="javascript:;" ng-click="setIndex(3)" ng-class="{true:\'active\',false:\'\'}[index==3]">Form Control Icons</a> <a href="javascript:;" ng-click="setIndex(4)" ng-class="{true:\'active\',false:\'\'}[index==4]">Currency Icons</a> <a href="javascript:;" ng-click="setIndex(5)" ng-class="{true:\'active\',false:\'\'}[index==5]">Text Editor Icons</a> <a href="javascript:;" ng-click="setIndex(6)" ng-class="{true:\'active\',false:\'\'}[index==6]">Directional Icons</a> <a href="javascript:;" ng-click="setIndex(7)" ng-class="{true:\'active\',false:\'\'}[index==7]">Video Player Icons</a> <a href="javascript:;" ng-click="setIndex(8)" ng-class="{true:\'active\',false:\'\'}[index==8]">Brand Icons</a> <a href="javascript:;" ng-click="setIndex(9)" ng-class="{true:\'active\',false:\'\'}[index==9]">Medical Icons</a> <a href="javascript:;" id="we7colorpicker">颜色选择</a></div><div class="material-body"><div class="row"><div class="col-sm-2" ng-repeat="(index, value) in icons()" ng-click="itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[index == selectIndex]"><i class="fa {{value}}" style="color: {{color}};font-size: 48px;position:relative; top:-15px; margin: 0"></i><div class="name">{{value}}</div><div class="mask"><span class="wi wi-right"></span></div></div></div></div></div><div class="material-pager text-right"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-images-images.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-image-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel1">图片</h4></div><div class="modal-body material-content clearfix"><div class="material-nav"> <a href="javascript:;" ng-click="setIndex(1)" ng-show="showLocal()" ng-class="{true:\'active\',false:\'\'}[index==1]">本地服务器</a> </div><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form"><div class="input-group filter"><select name="" id="" class="we7-select pull-left" ng-show="index==1" ng-model="year"><option value="0" ng-selected="true">不限年份</option><option ng-repeat="(key, year) in years" value="{{year}}">{{year}}</option></select><select name="" id="" class="we7-select pull-left" ng-show="index==1" ng-model="month"><option value="0" ng-selected="true">不限月份</option><option ng-repeat="(key, month) in months" value="{{month}}">{{month}}</option></select><span class="input-group-btn pull-left" ng-show="index==1" ng-click="search()"><button class="btn btn-default" type="button"><span class="wi wi-search"></span></button></span></div><div class="pull-right btn-uploader form-inline" style="z-index: 10" ng-show="index<2"><a ng-click="delSel()" class="btn btn-danger">删除</a><div class="btn-group we7-margin-horizontal-sm"><button type="button" class="btn btn-primary">移动</button> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> <span class="sr-only">Toggle Dropdown</span></button><ul class="dropdown-menu dropdown-menu-right"><li ng-repeat="(key, value) in groups | filter : {deleted : false}" ng-click="moveToGroup(value)"><a>{{value.name}}</a></li></ul></div><we7-uploader-btn upload-url="uploadurl" on-uploaded="uploaded()" on-upload-error="uploaderror(mes)" multiple name="uploadname" accept="accept"></we7-uploader-btn></div></form></div><div id="image" class="material-body" ng-show="index!=2"><div class="clearfix"><div class="category"><div class="add"><a ng-click="doAddGroup();" class="color-default"><i class="wi wi-registersite"></i>添加分组</a></div><div class="category-menu panel-group" id="category-menu" role="tablist" aria-multiselectable="true"><ul><li ng-click="loadAll()" ng-class="{true : \'active\', false : \'\'}[groupid == -1]"><div class="name"><i class="wi wi-file"></i>全部</div><a class="edit"></a></li><li ng-click="loadNoGroup()" ng-class="{true : \'active\', false : \'\'}[groupid == 0]"><div class="name"><i class="wi wi-file"></i>未分组</div><a href="javascript:;" class="edit"></a></li><li ng-repeat="(key, value) in groups | filter : {deleted : false}" ng-click="loadImages(value)" ng-class="{true : \'active\', false : \'\'}[groupid == value.id]"><div class="name"><i class="wi wi-file"></i> <input type="text" class="form-control" ng-model="value.name" ng-if="value.editing"> {{!value.editing ? value.name :\'\'}} <span class="setting" v-show="!value.editable && !value.editing" ng-click="doEditGroup(value)"><i class="wi wi-appsetting"></i></span></div><div class="edit" ng-class="{true : \'show\', false : \'\'}[value.editable]"><a class="color-default" ng-show="!value.editing" ng-click="editing(value)"><i class="wi wi-text"></i>编辑</a> <a class="color-red" ng-show="!value.editing" ng-click="delGroup(value)"><i class="wi wi-delete2"></i>删除</a> <a class="color-default" ng-show="value.editing" ng-click="edited(value)"><i class="wi wi-right-sign">确定</i></a> <a class="color-default" ng-show="value.editing" ng-click="cancelEditing(value)"><i class="wi wi-error-sign"></i>取消</a></div></li></ul></div></div><div class="we7-form form-inline selected-all"><input type="checkbox" id="selected-all" ng-model="selectedAllImage" ng-change="selectedAll(selectedAllImage)"><label for="selected-all">全选</label></div><div class="img-container we7-flex"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]" ng-repeat="(key, value) in images" ng-click="itemClick(value)" style="background-image: {{getImage(value)}}"><div class="name">{{value.filename}}</div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="img-net text-center" ng-show="index==2"><form action="" method="get" class="we7-form"><img class="img" src="{{localurl}}" alt=""><div class="color-gray">输入图片链接</div><input type="text" class="form-control text-center" placeholder="图片链接" ng-model="netWorkurl"><div><button class="btn btn-default" type="button" ng-click="fetchNetwork()">转化</button></div></form></div><div class="material-pager text-right" ng-bind-html="pager" ng-show="index!=2"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-keyword-keyword.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-keyword-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">关键字</h4></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form" onsubmit="return false"><div class="input-group pull-left col-sm-4"><input type="text" name="keyword" id="" ng-model="keyword" class="form-control" placeholder="搜索关键字"> <span class="input-group-btn" ng-click="search()"><button type="button" class="btn btn-default"><i class="wi wi-search"></i></button></span></div><div class="pull-right"><a href="./index.php?c=platform&a=reply&do=post&m=keyword" target="_blank" class="btn btn-primary">新建关键字</a></div></form></div><div id="keyword" class="material-body"><div class="row"><div class="col-sm-2" ng-repeat="(key, value) in keywords" ng-click="itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><a><span>{{value.content}}</span></a><div class="mask"><span class="wi wi-right"></span></div></div></div></div></div><div class="material-pager text-right" ng-bind-html="pager"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-module-module.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-module-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel2">应用</h4></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form" onsubmit="return false"><div class="input-group pull-left col-sm-4"><input type="text" name="keyword" id="" ng-model="keyword" class="form-control" placeholder="搜索关键字"> <span class="input-group-btn"><button type="button" class="btn btn-default"><i class="wi wi-search"></i></button></span></div></form></div><div id="module" class="material-body"><div class="row"><div class="col-sm-2" ng-repeat="(key, value) in modules | filter:keyword" ng-click="itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><img ng-src="{{value.logo}}" alt="" class="icon" onerror="this.src=\'./Common/resource/images/nopic-107.png\'"><div class="name">{{value.title}}</div><div class="mask"><span class="wi wi-right"></span></div></div></div></div></div><div class="material-pager text-right"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple" ng-click="ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-music-music.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-music-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel4">音乐</h4></div><we7-resource-musicform ng-show="showMusicForm" doselect="selectVoice()" musicurl="musicurl"></we7-resource-musicform><we7-resource-voice ng-show="!showMusicForm" is-wechat="false" show-type="2" doselect="selectVoice()"></we7-resource-voice></div></div>'),e.put("directive-news-news.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-news-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel5">图文</h4></div><div class="modal-body material-content clearfix"><div class="material-nav"><a href="javascript:;" ng-show="showLocal()" ng-class="{true:\'active\',false:\'\'}[index==1]" ng-click="setIndex(1)">本地服务器</a></div><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form" onsubmit="return false"><div class="input-group pull-left col-sm-4" ng-show="index == 1"><input type="text" name="keyword" ng-model="keyword" class="form-control" placeholder="标题/作者/摘要"> <span class="input-group-btn" ng-click="search()"><button type="button" href="javascript:;" class="btn btn-default"><i class="wi wi-search"></i></button></span></div><div class="pull-right"><a href="./index.php?c=platform&a=material-post&&new_type=link" class="btn btn-primary">新建图文链接</a> <a href="./index.php?c=platform&a=material-post&&new_type=reply" class="btn btn-primary">新建图文</a></div></form></div><div id="news" class="material-body"><div class="row"><div class="col-sm-4" ng-repeat="(key, value) in news" ng-click="itemClick(value)"><div class="material-appmsg-item multi item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><div class="appmsg-content"><div class="appmsg-info"><em class="appmsg-date">{{ timeToDate(value.createtime) | date:\'yyyy-MM-dd\' }}</em></div><div ng-repeat="(childkey, child) in value.items"><div class="cover-appmsg-item" ng-if="$index==0"><h4 class="appmsg-title"><a href="#" target="_blank">{{child.title}}</a></h4><div class="appmsg-thumb" style="background-image: url(\'{{child.thumb_url}}\')"></div><p class="appmsg-desc">{{child.content}}</p></div><div class="appmsg-item" ng-if="$index>0"><div class="appmsg-thumb" style="background-image: url(\'{{child.thumb_url}}\')"></div><h4 class="appmsg-title"><a href="#" target="_blank">{{child.title}}</a></h4></div></div></div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="material-pager text-right" ng-bind-html="pager"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-video-video.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-video-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel3">视频</h4></div><div class="modal-body material-content clearfix"><div class="material-nav"> <a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index == 1]" ng-show="showLocal()" ng-click="setIndex(1)">本地服务器</a> </div><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form"><div class="pull-right btn-uploader"><we7-uploader-btn upload-url="uploadurl" on-uploaded="uploaded()" on-upload-error="uploaderror(mes)" multiple name="uploadname" accept="accept"></we7-uploader-btn></div></form></div><div id="video" class="material-body" ng-show="index!=2"><div class="row"><div class="col-sm-3" ng-repeat="(key, value) in videos" ng-click="itemClick(value)"><div class="item"><img src="/web/Common/resource/images/icon-video.png" alt="" class="icon"><div class="time">创建于:{{ timeToDate(value.createtime) | date:\'yyyy-MM-dd HH:mm\' }}</div><div class="name">{{getTitle(value)}}</div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="img-net text-center" ng-show="index==2"><form action="" method="get" class="we7-form"><img class="img" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCADxAecDASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAIEAQMFBgf/xAAaAQEAAwEBAQAAAAAAAAAAAAAAAgMEAQUG/9oADAMBAAIQAxAAAAHu9rmdvkq6w4rrArrArrArrArrArrArrArrAr7NjvNULDna6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wKiwOP2+J25RAAFCULmri7b8ncz57s13WBVoQp8rFo7m/zk6p+hV7HoZRwk+vW8VjP6P0KfgPX25egLcjTyPMZqva3Pnm6uH0Bz+hrvCXQBgyAAoUoVdxQvymavL8t9Vq+a4zbPqMvlvdnX7VCejIABAHH7fE7YABDz/b4mrz+l0dezPs42vocrVg9FCdfB6nD26ul43obuX0NOmqv3vOejshp8D7Xx9uzp79+lxyujxIX/AEPTuoa/D8V2eJ1/Oy9Hm4hZLV7n539EtmGq4BjODIHE7fla6Nr0GiMfI9yHLqz1ebv05/qMy36Y2Rlrsc56Xu+X63ofP9gXXAQBx+3xO2AAY8/6GvbnqWObquy2sOtGc8ZZd/nt3T5Pk7t+jVZhJ2oT9PHDwX0Dnyv85KvVzenO89ZOjdCbX5Hz+76Py3n5r1Ol0oxey0b9ugLZgMZwZA8V7XiVZ91nyNmun1vkrfGWVfT+R9Zn9yr3vOegnT523zexyflvQ8/sT76QbPPAgDj9vidsAAAAAAAAAAAAAAAAAAYzgyAChS7iFVDHQds+Vdj1Pnsu/twu8i3Le8p7TytWnu9GFi/NvFtYEAcft8TtgiYw1mxpG5DJJpybWvJNDWb0JhDJJATRmZSolxUyWmiRtaBvVRaSBjIxnBkDn9D5afQrPzbsHrbfze+e15nmeTHvuXK4rnunjelyXoseFtd5661887MuewBAHH7dS2IyGvVtwVYXRSlbGnRdFGVwUd1gUtlkUdtkVY3Br3RybOV0xzNHaFOv1Bz3QHKh2BDbEZyDGcGQPmf0zhHkbs+YdKt3OaUZWdRo3c7vnM7PI7Zu5UKRv7XQ7QBAGZRkAEcE0BNATQE0BNATQE0BNATQE0RJESREkRJESRyZAxnBkD5Z9T+WljreU9ueN6G2yVOhpsFPjdDJZjGY31LBX+i/LvqIBAGZRkMZiRIE1PWX88vYdDFDeWXN3lvVDBYUInSc7aWZ16h086N5Ovv4J2pcaR2NVC2WJcO4W1CJ0tnO6RjMZDGcGQPmH0/5wXur5ysQ9HS1HZoYqFmhPYQ4fu+SbeJmJZ9hzvWAEAZlGQxka2yJFIRSEUhFIRSEcTEcTEMyEc5EtchjISREkQxkYykAMZwZA+efQ/Fnnbui0bLWjeXvK9ORX6vE7Jw72j0R511OSb/dfPvpBMEAZlGQMGYxEkRJESREkRJESREkRJESRq87caDu9oG9oG9oG9oG+VbRzvQEoMZwZA8D77yh4z2Pmdh0tdvkm+n2KBvn0vLHbt6hZpU+kVfXfNvpJeBAGZRkIywQhMVtNvJUntmaNdrJXbpFTO/JqjYwVd2zYV424EYWK/JXOT1q/Y8zHTkcrV1sHMtdDBQrdWRmG7RyViWM9ixnBkD579C+YnrvL6uoba2jvHH5mvtnnO7o9GcvRxPSlShbFX6B8w+mnQBAGZRkARxMQTEExBMQTEExBMQTEExDTZc7WWTtZZFZZFZZFZZFaFw6HYMZwZA+W/UvPnjvfU+2eHu3+seW5P0nmnj8e60HkqfvqJ4/H0blHjPcLBcBAGZRkAU1TYbd9aRszogW1fJY11pFiGnJZlTmWNuiJYlV1FyGvJv11thYlWybZVslnFPcbqeapelSsF4DGcGQANeznFtRydBW1FrPM3F9ztJ1Z822WgAQBmUMkkRJESREkRJESREkRJESREkRJESREkRJESREkRJESREkRJESREohmORiWAxkRngZYEkRJEYRGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkH//xAAvEAABBAEDAwMEAgICAwAAAAABAAIDBBEFEhMQICEUMkEVIjE1M1AjNDBABkJD/9oACAEBAAEFAtKijdp3BEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJNY1idFG88ES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcESdBFjSP1v92726R+t7y9rVzRoEHtL2tXPGgQe18sca9bXTXNeOx8sca9bXTXNeP+k57WLnhKDmu/4He3SP1vdNNtXknieA1xaYpeQdJptvVri0xS8g6XbvGSSSmSPhdVsiwzpdu8ZJJKjkfE6rZFhnd89kluKNfUVFbik6OkYxXNScScuOEMg1tSkiLHtkZ2u9ukfre152sVZvhWG7ZInbZE921iETynw/4TG8KJ22RSv44ScmrRMwkoPbYkJIqycVhSv44ScmrvdF96uF4VWTisd3z1u2CFHRe8SUXsCq2HuFmWQOQWQspjOR7WPhijkEsfY726R+t7Zv4Uxu1istywflT/AMKglysB7p5DkflXf9OIB0zpt005kqy6gxsUg9yu/wCmqex8bY6rn3HNLx7u756wnku7P8h/mmpv3McWSTTGxNgoxu4+N46Qycbze+3T/ui7He3SP1vaRkObtdBK1rfUR5nc17oGbpERkObtdC8Rn1L90rg98DN0ic0PZIwxSNtkH1YDpJHSvow8thOaHskjMUkU8EaFuBssskL20YeWx3fPVwMcrbsYbGGS19jS+2Rz1cGzLI1gq3WSSp12B8npIpFJ/Jo0nnsd7dI/W90kQkDont6Mge5NaGN6SxCQOie1YTIHuTWhjelmq2w2SrNEsFQ0ZZTFE2FnSzVbYbJVmiWCoaMspiibCzu+et2uT0inkhXrpSpncaDtr2x8kFbT3RTHY9rdOmbPKfTmlXE7q0MdSfsd7dI/W/03z2SVIpF9OUVSKNXa/qa3sNbUuNsc8U7Y4GRvkniiVuxHYlqRcVdoyex3t0j9b/TfP/BaoQ2lLoxa6JjK8DLsrn267LEEOlyNkUfa726R+t65XleV5XleV5XleV5XleV5XleV5XleV5QWFhYWFhYWFhYWO756+upr11RSTRQgWq5YjIxrzaq5FqsXGpHEWTwzF7GxtPExptVYj66mo5Y5m9He3SP1vQ/hOeGoysBErCt7du4LeuRi3sxvaAHNcjKxbmgIPaUHBy3N3b2kAhwH5T7LWSCy0j1A4xLkslY8GdgTp2NLbMbj6lmzoPx0+esboK2kPdBZ0nWqU8sOjOgZp9sTaerjpLktJtFmpWqbmST2RHp0L6wllOa9iCy/UJBELVOetdk/8c/X9He3SP1vQ9HDLg1zU7IaWuRzj8yNjOw/45Iw5iLJHO8uOxy2u4vLiwlbXbSxzi0YI/KlD3TNYXMEJaxkXkMmTI37uN+G5Tw9R7dqH46fPWHb9Pl2ihqLn2LtNj4RqLo5XS14rNZum1hqM9SDgkgrULsjfRalR1B7mV77tkp47sPp6x0CN8VDo721oG1oev4WQshZCyFkLIWQshZCyFkLIWQshZCyFkLIQIzkLIWQshZCyFkLIWQshZC/PZ89dO1Jl9hfK+Si06pIyzFTdWjoT2I9XqVWQi3qc88Wp7tUbDXZNXdZtvoVoTp0diw67qdirrFo2ZqfV3tH9P8APW3JYrGhIa1fmrRMhEsMkz36q+2yWqaNm7ZFOk6AV2uL5KkmsTXGwm9DTq2G2rXqWtdHal6u9o7MrJWSslZKyVkrJWSslZKyVkrJWSslZKyVkrJXleV5XleV5XleV5Xlee3563TWo6pFBJ66Kg50E0T6kIgb9OijfJeuUdRbDBXdWg2S3468GqQ1b0tcXKdnTm2X6UHihTtN1Xq72jqfx2E4HQHPYJGnt3DHQflc8WeWPaXNB3Bc0RW9uAQVyswZWtc2Rrj2fPV2jvsqGGCPTas0l7R9PNyOwNOpMU1e3Jp83PbgdBFPp8lWmIbO3T5Z2TSWWxxxR2f9LS5IzqGl2LFmt0d7R1PR27BJ4x5TvEWfGfEX8TfuLTktEm57Ru8Z+1rS7xn7f/duSyND8n8eWGWP/E0KPdj/AO7WO4o3jiDPsc7EkW9sqH46fPW3emsXKk0s8B5qd+pHMLVmXTmC9HYmowVrFay9jg6zWOoXbFWrBYtWKE1nZ6SCxpMUMVIV4bvV3tH/AESM9CMrGD0H5QjY0BjQ3a3d2YG3Y0LY0O7PnrBTbYq0pmsLpOTUmWpYLWn0YTHyPgnbasV9Rke9zoDusPnsWK5rVqupy6ffnVi66Z8YsyapBYitM6O9o7cBbQtoW0LaFtC2hbQtoW0LaFtC2hbQtoW0LaFtCwsLCwsLCwsLCwsLHb89abnubZqcGpwvhsWrFOvJrUEEXHdrGgJ9Sle2BsmpXKcDq0FmWG3PrFNslaprDmV7nNqVjTasc1prGsHR3tHbkLIWQshZCyFkLIWQshZCyFkLIWQshZCyFlZWVlZWVlZWVlZWe3566nDGLdO/Z3C7VNF9Q16zJYbNBjIp7TXwaU7T9YtSN1GxWmVaG7SkhsXHajXuF1DT4XaVA97r2s1YpoYujvaP+vK0Of6eFenhXp4V6eFenhXp4V6eFenhXp4V6eFenhUsMbG9fnrHGIqJoS0dUp6c17LuOSGjx2JmR15RplsRunFahTgoW1XhFiK5UDJ/qjm1Y3yMZemFnUqtYVY+jvaOp6OdtBc7ZFuC5XLe8KORzzJnkc9zTvkK5nLc4O5HIPeRyFrN7kDyAt+6M5jf/KrX2yMLio3vy7/Xrt2JrW7oy4lgc2H7GiIgxTewfjp89XN1OXUrdRrq2ouimeLF+OTUo69vUPqPpxE+96yFtjSxXiil0B8TKcl21PqdVznaTRvP1N09AahftVY5ooujvaOp/HTY1bGhCJgW0IMa0loKMbSdoXG0rjbu2N3GNpHG0gADo5od0f8Ayp0Qc4QgLiGfTtXpwnMyWxhqMLS4RbWMaGMn/j6/PWHjGny8TqEsrYdZrvtx39WZVMMLY7AsTsqarLNDJFM1mmw2bD7TA6fT2ag62RZ1CtPBXtGpYqPnfF0d7R2YWCsFYKwVgrBWCsFYKwVgrBWCsFYKwVgrBT43E4mWJliZYmWJliZYmWJliZYmWJkY5Hdnz1jFezpDxXraVZZF6axru2VptXoG6fZpu1PUJZzVl1WxabB6exUdZN/UbkEF76ZarR0AKd988dHV6DajYOjvaP6f56/RNPX0TT0+Nskf0TT1BXiqxKWhWmscEYsWaNe4m1oWzy6VSnl2N44tKpQS2NOq25K9WGpH0d7R2STOjXP/AIxYyTJhc2W73ZMwCMzQOUb+ZcuGmZ24ykOMu1vKt7du9gBc0Ivw4SgkPaRyjYZA129u4yND+RmN4CY7e1rt0ZskAT/aJmud1+e0vaFysxyNReGouAQlC5W55GoPaU6VjU17XdrvaOxzNyY042kHhBEmZAYyA5oLsDZwDeYyvJbsKc3w9u9hi8FrtzYzkxuxguayMhbJCvJc6NzjsKDXZDXNAje0sOxkWxrOJ2NpDGgiTr89rfscXeMyAAOEn5gj/lO4TYIQDCXfaoDlvY72j+tADVgLa0rY0jAwAGgNa1bG4wFgdzvbnC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcESCD/e//8QALBEAAgEEAQMDAwMFAAAAAAAAAQIAAxESUSEEIjEgMkEQE0AFFGEjMGBwgf/aAAgBAwEBPwHNtzNtzNtzNtzNtzNtzNtzNtzNtzNtwsTMm3M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M236HcILmfuXPtEpVw/Hz9KdDLkw9MPgwgg2Mp02qNisH6eluTK/SGl3DkfRqlvEFXcBv6jVQfMDBvEpoahss/Z/zH6Rh7f7HVnuAlJcUAlUYVeIouY5Ki4lMsDjOpHInQABC0zqs/n/AJKKhqX8GHxE8wniUfTWY8KPmfYS0XKk0pIqLwLQGMbKTLuamVjz669LMcQV6idtpTptUfNvorrUFjLInMqPmZ0lf7Rs3gwU6TcidT1KouCfQqVMuTxEXEenqEJFxF6jnuh/rEKglXmxjWvxPB7J1FRbFPyjSQ/EQYe2Curixj9WKXafmUqijujg+4/mA2j2f3QMR4hYn/Rai5nbudu527nbudu4FUm1/wAlPPqp+4fkg2mZmZmZmZmZmZ/yv//EACoRAAIBBAECBQMFAAAAAAAAAAABAgMREiExBCAQEyJAQRQyYTBRYHDB/9oACAECAQE/AcUYoxRijFGKMUYoxRiiyMUYoxRijFGKMUYoxRijFGKMUYoxRijFGKMUYrsjFydkeTFcsnScd+Fbq1B4xI9c7+pEZKSuiUlFXZ57IVVLXhUrqOkLqX8oTTV13OcUJ34JyUFdn1P4I9Qnz+hQWibvK5TeUCbtFsoxjOVpFeMGszoXpor8pFopE3aRJ2iyn9xJ+k6V6a7aj+Dy4m4Mbb5dyxZ/B06lGGEvj8r/ADvpTxezy4y2TmoxxXhOjOjLKJlVq+nkoUvLjYqwyWjKSKdNt3fhKnKm7ovOeilTwjbtqxuhVP3Kkk1ohyI+NlGD+73ThFmKtYlScdkemc9onT3YhJfaveSipckI4cEoRlyKKXH9GbNmzZs37l9z491YsWLFi38r/8QARxAAAQMBBAcEBwUFBgYDAAAAAQACAxEEEiExEyIzQVFhkRAgMnEUIzBCgZLhBVJysdE0UKHB8EBDRFOTohUkYmNzgmCDwv/aAAgBAQAGPwKMuYCcd3NbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRarQPJVcwE+S2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2beij+P5/v2P4/n7DErxLA93E0XiWB7uu8BbRVaQRy7uu8BbRVa4Ecv7HrOA8ytqz5lqkHy9jH8fz791ua4lVulVBXPtutz7agrn26OPxbzwVSansq0lpXB4zHbo4/FvPBVJqey8x1CuDxmPaU8R5LZ/xVPCefZrPA+KLIDQfeVSann2VBoVdm12cd4Qc01B78fx/PvE9hd2eaB7CezwlXRmFi0oHsc/gFU5q/Jqt3c0DB4c6kpzJDfwd4hi0hNduyPY5/AKpzRutgo3fIF/gk1jmw461Ywmu3ZH2eiZ8VVxuqrTe7NFUXvdvItcwNcc+3LsomvZgK5IOHej+P5953YB2V3jtd2XHYrWbQcLquDAdsiYDkXBSB73RxR4au9M0b3kO9xxqg5ho59aodknZJA6tX8EGgzVPIJjG11G3cUPZgu3mqv3jlSivNJ4YnBFzbuON1A8CnSHeskyjTzwXgd07Kq7XDgnPB1Scu9H8fz71EQUbxxW9VaVXcOyiIKJKru4K8FXcOwtORwRYcwquFXfeBoVfEVX/ee6qvPNSgfdbj2FpyOCLHZhNOgJeN95aQWfW43lqQlruN6qB91uPsyN7Sm3zrUxomVx3/ABQfTWCkIyUYOSeXVDGYUbmSrl1zK5Vde7KOv3fvCn5JzaUcPebvCfTipY//AG70fx/Pv81iOzHAKg7eaxHZjgFQdvB4yK1mGnELJYi43iVcZl28HjIrWYacQsliLjeJVxmXs9Kz49mqfgsQ2iAcM0HN3GoTyx5rLjrCtEJJXNo3gi2+014Fe4W8T+ifLfwuhobROLxVoWk1m3tW6ce9H8fz/dlfCeS2v8FXxHmiweLNvmi12BCDJW4DeFqOqr1VrvAQ0daBNG84nvx/H8/3hV2q/wC8FqTC7zGKuRNy3VzQ9U014ItePI8Exz3x3a5A9le9H8fz7mCzWazWazWazWazWazWazWazWazWazWazWazWazWazWazWax9h+1Qf6gX7VB/qBAySMYDvcaIvE8RYM3XxQdgYXtDnZCuJWNrg/1ArotMJJ/wC4EJXShjWGuOAV2O0RvPBr6oufIGtG8ppdK0A5EnNXHWiJrhmC8L9qg/1Ar0UjXji017kfx/Puiu9AXhivEOqreFONVnkm4eJeIdVW8KcarFwx5rBwKGsOqreFOPZg4Yc1gQfJXbwrwVbwp5qoNUey7T41ARN04cKFXrp6I0Y7DM4IawvEeGqGs0itCa5JoqNbmqVRIIJFcAfZQzOsscrnvI1lPM2yRxOY5oBahMx7nMaKlm4YZq1G0gGK82tRVQTG3TOjMgqDwUckLiyX/DXffG/yRZK7Ssc2gvN96qIsv2dCRTCStCCp7PaLS99pdSrHe78VpbAdfRXXtApdG9ysspldLYwDpnO97hgorPFM+WOglAJyC+05pIWS6O7QOUkfoELKRl1QpP8Ayn8h3I/j+fdZyKabtc0QW+9X+KLrprWopTBXS0CtBUb07kKKhGNQr5y8003a6tPJGvAhM1KUQz35UWjA93Oqdq08OCdq+8nspnXWVbtMsE7mUeyrbw3UFcfyTmubrVGY/VO1Ty1c8+CeTXPDW5Jgc00b5UyTKg3WnC9SuSa25vdmU2gfUUwuogtOTvC0nNajbo/DT2MdmtNhtbrjidVqks9msNrbfIOs1ejPeBFGA+77zuQUkNlGMxvC8K6Pk7moJxWK0aQNLZN3OitEsYe+1RkVLDgTyT4i2QtbBpKA41UEjGTx35gwiQ40Wna1zWwnWDzjJ+FOdZXsjvQ3/W7+SabSWOY/7gwj/Ejpoy6TSXWtaMbvHyVuZLZbRJHNdxjanOhsFtDi0txCeJGOYdIcHCm4dwRMJLW8e9ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1muXsPuyjNqtkklvlhjilu4CquvcWzR6+n3lOA1mNwtE2+8pZpLT6VRlTfZkFaPR4WNxFwD31JbIqwal0XTmeChFre8NMgAN6tCrO60SaaSMGjXDaKKe2x+jwkNa2mtXkpbNpbnpfhaG5URxI0brvpG+g91SUe50bT4K4ZKF1mqHktcaHd3T+63y6ezPMwuO0S0Ilh0s+uHOOq3zT/s+yte9zxTSNxArzU9kljfLDe9ZoxU1WjguwQjIyClTwVjEDWyyQtIfdbexU8U8eiZojQ3LuKtDnWmGX1LsGvrRWaSFr2uFb0k3gTbRG8CNuo4E8OCsljcJGRR3hfcaV+KvWOUseyTWD37gvtCEaN1KaK7mVDMdJdjaIjE061Rvpw7p7uSyWSyWSyWSyWSyWSyWSyWSyWSyWXs8vYyN9EZIy6KNrkmP9CDmyguZFewog6NnoM1cbmNQrTNB9oPc9rhpBdpirM6CTSxxz6R7qUoN6lcy1ugFodeioK3wvVWuSe9gW4DBCK5dtIdem/wDErWyyTO0DCAyIZFNszITH6y8ZA4KyQ2ibS6K8JS4J85LYRQx6MAmo4o237Pl5xtaKK5I90MhbfJzrj3T7Cp7cO5ge6OeXaewjSNw5qt8U5KhKGIxyW0Z8yBvChyxWCrXBUxryaVQVrzaR7Ezwu0cX/fOspWuZO66QHFm/8PJSOcWte4ObXKikssGjfV2s9wq1eqtPrfdbpcKqVlofZ2PwuObgAmwOdedEb7nxZFvAc1dh0jLj77xKde6ofR3yxvtAqwvfQDzTYLO+QzyNAJeatoUywyuiDo8L/wCpWkmMcs5bogIcQBxKbAyZodZBrUd4q8Feg0hIgNb+OKc+0suvv08NMO4e7q5p1Cb2+uFEBewvbncl4jvGafccSMMarF+pezDv5rqmi8c8SHZo62vjhVaxw8/omDLHd5Jhc47xWqOuQb33ua8erXCrs/inULrxAFDuVNzQq3nZgZpw4FFGqIxa33caf/pMzrdPi/opp3Vph8VZqkU8uSk/CP5qL7mqR5pzA9ofV2/moXOe67SnCiAY7ClGjj1TQ77tMvr7GQ2ZxlsrW1e3IEb1LN6a6ywRuoGgVoo7Bpy+BxF4UzqrZZrMNFHpNqPc+CaLHEyS0F1BSooeKggdMfSHNxh++n2RttdGxkelJuqK1MtxnErxC7VpUIWSKLRw2bVLhimWu1SC61oYARv4pvo9lZapZM8SFo6aC1ySU/8ArKncy1X3w+JtxRRR2drXugvmSvdP9hx7PJHn2nsIaxorwCuhoA4UV6grx7t2mHBeEK8GivH2Mlril9Eie0h7AL2CmsTIPS2vdUY3a0UxtEOin0Y0La11tygZA3STkH0iOtKuTo5mBltFXc28CmOtdnq2HD0on+Sf6REZXytuBpNMCo7K2w6ARPEztatArVdm0RtRBgfTOijinaZI/SaaUnPkr9mlDpmnVswH80LXI1zpg/CLDw+ansjbDctE2DtdRh9bK6ODzqAr8L77QaV7h/dbJyYo3PN2WN+Au8gjK8P0MlXAwZqOe1R2hs94YtbRvJRBkrvXXnOLHZLT2WVwEh0chndjd5c0y0wTaRgzbK+9X4Jtos0UL25ULKvB/RSy2tsjKRf3YpVSyRuYL9NBpziFC6Fk18SNDqDUTrQ0OE0eVzeqWqCW8Pus3KF8FwNeTcI8Q/EjFaHTi0t54UVGtDRy7h/ddqmtDdV0VIifvJkJtuhiAzu1onwS/aDZHuBF+6oXfZ8GklLf2hp/kjE6x6NmOiN6tZF9n2SUXjGxzZGcCpJLPaBM94LLoFLvNaLQG0SZ1vUwUUs9NLFW9Zjv+KuQtdJZ5G1FMLhKZZgS5kBpM/73BWg2iTEyOjbX+ARc/WtE/hhyyTfRp9E8Q6xpWmOSLZp9M6vipTuH+zxhwBF7f5FbGP5VsY/lWxj+VbGP5VsY/lWxj+VbGP5VsY/lWxj+VbGP5VsY/lQc2NoN5uQ5+wZY7b6yR5Lat1qVTWs0RvVLNLlTmoJy5oeJddrzTBevMrY/7r0XhzUURlpLG8SODnat39VaTOHkWh15j4RUgJsYFmo12k1jrfFPdKyLTOq3/lwmCV9o0x8Tty0bJ5BZA7xF9H3uHkrHA2SRrDevyA4/Eoxx2dr5GyYerqKcfNR2+QA6TGRpzb+AJjrMySOoANBdOaLA976mtXmvcPdqVXDEiib4dYVJosKHKhpRY3cHUyWWBHBF2ButqKhDEHldQ8OJIWAxHLNOOFLyrhdJom+GpFck0NHug5VTjhQbkWubQU5/ortTTEppOZCi/F/I9jCXYbv6qE8h+Tfv/Uoip8Qz8xyQF0eEY/FPw9139ZJuq3w/5BUQDRgyoqaIvdQi7QspwVDHHUDln8U2mVEPxt/MewM0UL7PpKNccDRMfNB6XMwUzpVQOdZqWovAdFexIUWisEjIGChjvZoQOIhloPWHG9yX/Db+iMerp/opxJC6aV8N3hhxUr5rO67Iwx9VKyyi9O4C+BxqmiZl2yNZfAP+aoxYwSCPWsG7go4I5q2h0gcW03FelGJ8bI8W5aq0+mLaNu6W6OiInn0zq+KlO4e9lzWW6iy/ivjVVH5o134KpCHJZfxVf5qtEBwQw5Zo8+zHsi/F/I9lakeSOLqHMIkEgnehRzsEdY454D9FW8QaUwTc9UURNT5K61zhzQaNyH4m/n7CO02m12sX3EajlLaLNa7WSwga7k8uZee+NrYqjC8pbVaS7Rxuo9rSd/AKOWfSN1sHRjFWizRhzpJnAxPkG4c0/TXw10AZVg3qz2eP0iT14cTKFap7NQyOobibZob72F968/O9+islkgZAZ31D6qN9ojs9GvGMWLlahCbQ98wGBGATfQi91W6zZMryJtGjv1/uzhTuHu5rNZrNZrNZrNZrNZrNZrNZrNZrNNIcAQa5LaR/J9VtI/k+q2kfyfVbSP5PqtpH8n1W0j+T6raR/J9VtI/k+q2kfyfVbSP5Pqtoz5PqhekbSoPh+vsIYX2tkTmPJxU8LLWyV73NOCE0jL+hGkGO8KzyRmrC31kY4owMtFWnOe7gf+lRTmT0jQCjI2toooPRnxTNeHCpRs8loMLg29rMCtElqnEdor6qZwz44L0eEmzR00hBFb/P4qbR2cttTThLe/kvSYp6mXx0bkDmoY4LY2Vsp1w0JznWV0bXtLSC7OpzR9Dpo72NDv7h/df7P/vd+q/Z/wDe79UY3CrSKEL9n/3u/VaOFt1nCvYJ5I6yDI1KM931pbdrXcm6eO9dyxIWmDfWXbla7k6SSGr3Zm8Vo6atKUTZI4aPbkbxV+eK86lPEUWQMutJrnXuHueCvxV4tANaUJXuZ0wencAaKrQDjTxLwtzpmhg75SuGO/BXaHoUaDGu/BEluI4HlVUuKmjdhniFVzSOixBGWavXhTjVVLh1QqQKqnKqyI5qocKDmnuGNP4prTmVdvCvBBtRXzVb7aeaxNFeQdTMVoq6PqmktNTuoVTHOmXssXAearWo5Yr3vlKx4VW/4Cqyf8pVNav4Ss1gUbzgFquB8u8e4dUtzpqq6KjWrl9EdZ51uCkF3GuBKHq3Ybk3OvAAolkVa8WpjG38+CaOf3R+icBeqTv8l4Ku/wCpu+i8OHIKUG+ScqA8FRgd/wC1eHNb3GorVXqV160+CqRx+CGDvBSgopab9UKpzqaBEuBrhwVCKVdVPdUg7gjhm8FAXciTVR6taNpRNNK3aKjga45CqbqEOpncQutd/RVLrhmcFW6bm7z9k/GKPFE6RtL+Y8le3Vrl9UQ1zeZIX4t25bM4b7v0WLgMa4u+ioeVeiHGuRXixvH+s0ca4/1v7x/duAoskNUYZKl0U8lTcqAUWAAVLop5LJZd8/8Azr//xAAqEAACAQIFAwQCAwEAAAAAAAABEQAhMUFRYXGRECChgbHB8dHwMFDhQP/aAAgBAQABPyFqyVnU/wCX3ve973ve973ve973h5Ak3SagEP8ATPe973ve973ve973ve973ve973ve973vAmRF5fvf3l6eX738FpxK9vECsBGnbaeKtvECsBGnbxpk1gKUvBmqGifbxpk1gKUvBmqEif8AxhmP2ILQ+wTzqH/Benl+93vP1HKaokLwqMyBgMsbjq8/UcoSSWSzEU1SNyBgssbjqQh4xEQS5PT5rxDtr7B1IQ8YiIJcno0DSxh219g78O3adLEOEo8v7yhUMcnpuxZGFVmhG52hGFExJ9CIoFiDAwh/YawAYJgjuvTy/e7tGxCSSSbmDZFbDoBoCAOZPNHpoWISSSTcyxccERC6o1gFhDNTL5o9N+obwhyMiyYEEJbBeGKAAElDClAK0IncYQr6o+gemvURCHIyLJhi2+pjrrP1rAINYuIV9UfQPfh27CrEcY9oOjicCGYaiCMAEehKBRFWLSElQWBZgpCWD6JMopw4w3JBszGCuMj23p5fvfwQQnDoCMqBdiIJAUDGMDc4rCTO5h1g+ZUC6ASjIe8tngdnDGVAtJKF/wDCqQp4RIN4JIBcmnQCUZD36YFIRjpWEzjICAQBUeOkEkAuTTvw7dgsbP4SzY3NIxZEHoP+YcWI2HxLCy6DrTUGQwgJYjsIWxmpAWV/yG6BuUNLwTQoby90qQalNEGB7b08v3u4RysQoS8hAcUEcYDIwGagSQaVirUnoI5WIUJeQgZiSkBBUkYFICHnFWpPS0MkpR9LLcYqq3znr6QsJDSwxEYo64dLQySgpKi3gk1RqYrHThyYHjCW5wYiMUdcO/Dt2AQVQGBJhMmgh1BQoEgUCBgdnHzjBBoJGxh8g4KgVg8IH5UHA+pqOh8+1hB6hX1hMOCJFgliv20XKOuZUZpQPY/Hbenl+935SGxhmqsxESUjCtGsYudOuShsYdqrMRiUjCtGsYvdOr8/2LhksbgQHKBE5KBhNkNeILgQeer8/wBi4ZLG4EBygROSgYTZDXiD4EHnvw7dhVDKpHv0IYZuVoaTACAFAG2VkZZPzFHtMgaMwSBiStlSX6ODGWwhKrB5KnPChQgDznDXvF3hZpmYBRQXEg0I27b08v3v6fDt2nShLjKPJ+84VCHNmjRaxgsOJVQcIF8iQmfJHERMkTg8IP8ATyamFAlFWx2jNC5gxCO29PL97+nw7fw0GPqfrnAQkYhIfFUMXC3gDBxoC6mUwETxDiowxKJI46DQ9q9PL97sP+03JuTcm5Nybk3JuTcm5Nybk3JuTcm5NybkYkho2fxGz+I2fxGz+I2fxGz+I2fxGz+I2fxGz+IjmjLXLsw7dn7T8z95+ZQLkAQPMo/RF6gYCCGLS9eLD0BHNTj9kAioQAqeZWTAkAM5wzWzIBL0l0Jx0BHbOAAAI2UM7bCET9p+YeAcohg/Trenl+9183QzSAJMlKEVQMFhR+qZxCfheSiaCjNYKcapO1IKFEnBJnf2IQhDFhN0KEGBcAwIoUEonBCJMBWI06AySxcRZBTGZk57wVYEg9jhYQZgzxB0LTZCt09SIPRQlzCcAiY8qmtCQsCbnaJhTKwFHnFrVFwiGlMUDgcc7wURbUURvg65Rj8Coa6EMKE+rDt2H/8AMjlA6ugrUiORgJACKggIxVQ0pvDgha2F8XwRqb4nRBZRBD3hT/ZhJluZDaAf8ABIIGwsigDabwQ4kUpDGt3AM1xrKDBtg7DYQ/8AGi5iGikQmWOxDenl+91tByPQ5CYYeDCDCFwCMTAKEhQNKxRASUJqFjSDVB72RPaTc/og6mr9ApXhDEqgYCtdoEIbDQnylRAojRVssYnBCdWRlCMGBQXFap1hqCBS2LKELjIAnIqjGzBs1gkUCEuSzIUIuMRVLLAw7IVUcCeIOiMEFhSzbDzHyCuJQebhp2hGXQiiyQYGqi8KFclkIA0YOV0E0dCjduD0EEoA2UJkBAIUJF/mCBMi9mBQIskb4wUFzUEF11NeFm8en5uuHbsAyIAkwFYB2B8mIoZeAvVRrmEwTECUYI4YqvnFABiyQShZscakRgoEWa65Y/ldEAAiWLAV106xBe0zqLTWD87cAR4PCCmIz2Hr7oYkMAyAzhtaceKw+wmYJdS9CVIKN9a/PYjqE1BNBNBNBNBNBNBNBNBNBNBNBNBNBNBNBNBNBGFFppOZpOZpOZpOZpOZpOZpOZpOZpOZpOZpJw93Zh27D+gqBsoOlYoqwFKmktKuCtag9ILgEtggMDGL0h1ZHCQKxjIAVgFzNKQ0Q3KMqgMoPQamkOezD5NnBQHQAyQ3SjMOCs1RSLtI+20AIdFuWMBAT1oUISWUW17L0u3f0+HbspPniaC8RoZLEAXGuAk5aAzGQwBhk/UzoWR3gcJFWNuoXvaU8Z1Bq/2A3EakAsvLB9HpZwNkkrffKESeCAEm4pvSExaW+A6QGPTud4oelYAwTFAL7rONRoRdmF6XbuwgKXM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nMBCk5mwczYOZsHM2DmbBzNg5mwczYOZsHM2DmPI5gL37MO3ZeWKoCV4Y004Akz0j00QvciC/3XoyqmPMwrhWjSYGOBoX09YqnifFQN5YkgBrnZstLx5wKiCd7Wg+WaggDQhRE6ZJxFHCZUpR2PXKHjgngq5O8fm0BEP5dl6XbupKBTsAciAv1ALJi3YTAuWpo4w06nCAg2L6vK6SBBDBYPTxB0rgZJEFJYS5icCgATRfuxlEqWZeAwAGJwSNrURWGAGQI0iNSLWRRgodazD4Eouo/wAgIQ98ICw+uHbsFlk2MAV3S0Pw68iWZwOOAtYATMSzgcBnKxSFkB8LGTmKpBCutcIkZh5WCZjpg2VomGAqtI3igIleSwkOVGmrhbqkSoC6wJXICENAe5hEnYHouY1whvBLHTpFsIgDWhnuet6XbuuHfoYUgdUei6Mghk608UdjjsayZtQP8QmFzGIWddoKaLBIKCt6oQrBo6r4mGWIKCZFB4gmyDoarKkHCrsH4RZBDoYpYIBWGMaSg4jqoIQao3gIvlCKt0AQikMnufqVe7HcQJRWJCQy8BPEEWsQVYTV0JIMw2T2hFEVBIFXUVVzlMadVCphQHtAfPwgKb8XBPAMFB3wj/eYTQZhcKsIimEQBRhmK3UscwdZqR8Im6BQCAoNi7bDt2BkuHsNFaxNgF2JsIAbbOgN4hh5L0GjBruM/u2MOrVQVLbgrBBNbBRCNqErOkOky7zcRn7ElQwxT0j7S821FEBpDN1Y3hq9jhUjAyTi7JBok7VcGsCATrcLsvS7d1IYU0N/5QCgxfQCMXMQAQBW7r4g6CQFwAHC4u4KITARhoEqO3DFKoooEkFWQtAUAncBUwl0HOUt1w7dlHOiJL1gmeWkxQVBOKwZZhCJcBi8T+IiKSTUD2JfOWt0aZ2h9UsbGpaIuUxSbmWFGLLcQPzB8wBgaKIc1ixDKt7oQHDBLArFCz0MSRUaWiFOs0dfPxD0JhAG/wCnrel27sIBvN7mbnM3OZuczc5m5zNzmbnM3OZuczc5m5zNzmbnM3OZuczc5m5zF15i68mLryYuvJi68mLryYuvJi68mLryYuvJi68mLrzLdmHbsZ1uSwPLGpTVqAwgd5UggGovzLLMJZLBWhz2CrmfBBIxSUx6BYrx3kilBihAIec1KWFbyszAaTi8vSJHkcEakLGCpAzoJEgVxMGbTgnSDFm8W21D3AtakILgkEKQkZ1vMbKIF1vS7d2EgXm9xN7ib3E3uJvcTe4m9xN7ib3E3uJvcTe4m9xN7ib3E3uJvcTe4i68RdeDF14MXXgxdeDF14MXXgxdeDF14MXXgxdeDF14l+zDt2B1gDFhGCjVlAMAACgj1w+QvpDA2AQXqzEBKMhDwSGsDIKBkNGBm8CK9brpQ9R2Yh7EoZhYFkVRMryr8IQMRqoRRihuDYYRxUmhioUCAMcSRo9jLEMgrBVVvCAiOCpBCnW9Lt3UlBzU3/4yfVWAYn9In0ifSJ9In0ifSJ9In0ifSJ9In0iCkesEYZfrh27C+G/gwizbeALGDh/kR9Bg8FOAhCIrzKPzRhyRGthFKjFSa4Q9inNQPhBeoBVkCKE4wjollO5hsaoBwGlVqIpx5SWX+kdSMXEIHELA2igyNYGR5pQzSB7121h+Ot6XbuuHfoKuLSKKVgLxiAAiy8++scwWcIVKjxqABoqv11gS7heF64xGCgZAoTqMCxObpAQiAZQ0T10hssAyjNxGFrQAiqIIN6qBguEQqhP8QHMKu1BzA0wi8tpS0wZlBC8P20K6D9KhAARAQOiq+m8JbQJ6jkU4TANI/ZMUMxFayENr4j2PvKinFQFkhBZa6wRAEBqEZFXSIPPcud4WeFsBNNMjEkYhHZorXTKMd2QnXQjZDGJFAA9uaw7dgkm0BLOH4A6W5zSGxGTLIj1ghONAdFY9M2pUoF9YKJi3UBVe60eVfCQO0Arg0kpH6QKVr9TY+YjKJah3XfiGaqpzfcfQwGwAqFFuRHj7Vauh3i1PI4gzo9Y3MuLIIU9+t6XbuoOBXpeSM2ZwIKxG0sBYXI2tL9L8kWAj1Ieko5Y20dw6YnCAdAuJEOOY2IXmClt3J7QCK9vCABQIIkUhGGQFhCkogXM9E6GmIKgAAQoB1HKa8mEqtU/MJVw0Qt+t/MXh2htsLYRAQkAAWDQaELWVzNOqEn1EUICqJ87QkQNjeVPxFoQWwNGQnBGZC6mfMaAgVYe5S4wBBdcO3YB9AENtAJYeEipgyJAPsquEZ58mB0DMDgcCIQ+E3OUrWHFGoXshMWa4dkoLjR0teMgtlIVVAN4F4WIJQqEPdB0RMzCoZG8KWkzhD8S5ZAy8soFwIQ0hXKHpMLmitQHm/W9Lt3YQOhmk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4iEYjcWIz1n3mPvMfeY+8x95j7zH3mPvMfeY+8x97hMJaIwSi/Z2Yduw87mBd4HtsAqxEwg00UIB3aSgxgDUFKCJABGaUZh3iJMzoINL+YuBLASThSXrB6o1G5cSsGYLNIh4K69XRBIxgNFXwWhGLZalEYp1/KRT3mqVIYNsApmyqNgz0XW9Lt39Ph27kELlppcdEBhULqH36UdvoyVqNQDW4HehWhonWwR7GBSYDVemPjxo3wZ5p2Fo+PGzXJgopIKKehlZJkNV67db0u3dnrNbBnaArAhEBb0lAyrgnakBYoiLzl2sMEWxsCR/iZ0yv0EFiTUApPugPlN/8obVEl9CJdtITq0JMcAiogXJJpugRCigBlY8xgLDM1eYRALQFgljjPwjIRAMGxN00Uhm8FSWIi4OAjEkAkioXE7hFkcgA0EYdV7M90asCchGouFHE4gTSFpAAAskQKVmcdegIBJgBdSPwDAERlsJTiLjIF6+OzDt3N6QVUoQLrEx+ErAIHSoPiGiCszaDQSwOZ7IThb/ilTaX+iUSVQVd4RACSaQuBQYGMaDdn23pdu7BoSt13SsCrbxYBlYKgtQHiEILAlKjbSA6BgXQV5hMCPVLlGExsRFB8oQKXGIhX1/dYTqAAMOMc1DQp1BSRxhupGtmB+Yk64PJoY0wiSUuOkrWGNoqsk1RRlKqqb3AjOEsJYGBEChgKiiCjgKdRtE5gIGX5fEJtUQ4P9cGNKEIkGTAyhKTciyKQB128nAAfKlrAWqqo8xoOk+gUgbxFHFW/wAwqY4FUNJZcqAb0P5iYORJFxaQKRaEDb3UJqgILb+QgrxA0hZOFn7wRQso2NZdmDbuQxgpUaDGkMcwFuxZxAtQOQqbfpTOHDJL1rEkIkE0BRHCh4igSQg7PwEwQwEKUVw+kFDJIWUBApgCLC7uf0wlIJNUadtEy+Jd/LtvS7d/WjkINAo64Z2hMIkORaFrOzRjABQlFxBkAo8rl0E4BmD1VBNcDRWwii0e0AAJQvftvQATZzU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8Q5A/vYn//aAAwDAQACAAMAAAAQkPPPPPPPPPdOPPPPPPPPPPPPPPPPPP8A1PPPHHPJqdODdPIm/vPOPPN9eGndfPPFPPGdur9+tVik6Dl3PPKPOPqzQU2vPPFPPHOwrhldvWWvCj//ADyjz6/4NXELTzxTzzzzzzzzzzzzzzzzzyjzx89NHyHzzxTyggAwgwwQhjzDDjDjSjzzQgkiD3TzxSjDDACDCDBCCxzwxxhyjyxCxjBQyTzzzzjDDDDDDDDTzzzzzzyjzzhAAzRhTzzyhzxyThDTCSCBRhiATyjyhCgzTDwzzzzxDDDDDCCBCSwzzyzhyjyjAxihCyjzzzwQwwwwwwwxv33332vSjziyjjARTzzzyjSjxSxxRDjXjjCxjXyjyxjRTAjxzzzzywwwwwwwwx733333zyjyxCxjgjAzzzzyzhhhzAgSDTBCBShzyjzzzgixzjzzzDDDDDDDDDDDDDDDDDDDDDDBADCBDDDxzzzzzzzzzzzzzzzzzzzzzzzzzzzzzwD/xAApEQACAQMDAwQCAwEAAAAAAAAAAREhYZExUdEQIEFAcaGxgeFgcMHw/9oACAEDAQE/EEhQmyXGS4yXGS4yXGS4yXGS4yXGRNDbEpQmyXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGe3vNbo/lj2SjoYksIiE9agtIqKVc2j9iqT/DotoqGzQISV3PYYVS8j34tbCWK/ESS0jTTh97thHRl83uQpKe5HWTzhNXbkQmHkfP0haYTaoyppOu8Ds/B7bp0/7ceGa6MzjOGu1RMQ2gaINV3kZNtU+0QpUquNxLWo9SphNwvImjQapTSn84jvep6kIVQizIwwtfcTipOaH5JniV3wJbwFxHSas3H3pYZWS3SmiXSfLQVGXwUDz2oeoh1CyhqpVlitPCxU2SqUw67qvVPZYQyaRAhUWP3Il8hRIYb1H6x+kWGEwa+NQf9Fpib3+FJG9hckb2FyRvYXJG9hckb2FyKyNW379Tqez+n3fKX36lzyiwsLgsLC4LCwuCwsLgsLC4EtyowuP5X//EACkRAQACAQMDAgUFAAAAAAAAAAEAEWEhMUEQIFFAcWCRsdHwcIGhwfH/2gAIAQIBAT8QVdphJhJhJhJhJhJhJhJhIE2EV1SYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSPYA2mpCaanRQFp8oXRViH3segBv0IzbR6KU2y9xYhrY7lKWALU8odsxV6QlQqDfY9Suy2gKH2jGbgy2aXLO0rQrn3K0jrtiv5/yJZON255iU8kZBwR/V+fOOt/u4j2hABzEiqhuYw2ZNv1jrixW9iDhFajk1OnJe2p2PUatjFzfeWZtiCUyplhs/eAN+q/x4mvt3eLduI6JnAv6xL0YzCz2uGkl/sfaak357UsOI9+PRSlrgUtjS6QqDbsfTKWk4DSWg2h941FNS4/Q27H1AFRqL7ytrNfH6FrRL8JfhL8JfhL8IoLr1Ozu3PUpcpKSkpKSnxX/AP/EACoQAQABAwIEBwEBAQEBAAAAAAERACExQWFRkdHwECBxgaGx8cHhMFBA/9oACAEBAAE/EE44EytX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNIAiQBPrVo7RCWPWvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNCxJGnj/7rL6f3/xZFe1rflQ0CTdH8reOSk8pXty35UJAk3R/K3vkpPKPLMSDl6GWoXn3M5pFH2zQj48o8uxIOXoZah+fczmkVt+Yj4/4STGv/Msjal9qmLRxf9ohRzKP0/4fT+/+DJEB3wb1uQ9VatQHAl5UL2S19eNNVDBvs28XYHfBvSpSZVlaQCUmBizQPZLX140lUMG+zbxDfbAX9Bvvp64dsEplXdoFQCVwFBTHhYHBNT1pIECHjYbPx4hvtgL+g3309cO2CVyru+AsUzK2xMJ60mCBDxsNn4+/M/I/nlMtoN4HdxXHd1SlYsWhdnHg8hbRDyqVNoa79DfLpGudvjE+74G9omGT3qfxIVi4z/V96kHuayeb6f352Qo6yTx0pGlSVdWtYhO6Gvgp0RcTr3vTEML2D4AjrJPHSmaVJV1aRC61WHzUBQScWvOmAJmWD3pJiF7B7nwJuJUHXQc4p9ySMq3WrlWsC43wb60EuJQa2NXA41q1U4i+5kQlGaAd9oeWfbwJuFEOroc4p9zSMq3WowEXgkxZbbl4QXOBYQuBLpryozQDvtDyz7ed+R/PIiapLrg4H9oKCScwlo50bNJbA2Lzz8J6AJyAy0v6N6QkFIjN/S9TGXnQTUh41Y4vSrVoUmLV2aBmnregLPjJi8Z4lWpw/YHl+n9+dkVMzA/J4P3MLvFy+AWQKRfRYoIMlA8AomYH5PAqK6BKDSNalUWfWAB8FMyYcmHoNqCDJQPAnnMlibBX4ot5I1i4D8UCk4SooXCYs40ihlBqQybsyYvm9EkiZsbL7ykYtWJOkDWfAnzmxoFfjwSRMKCQ5RNtKNKWKXWPaoGBkF0jRSsSdIGs+d+R/PJBSkY8YUc4plmjqN5mONNto5DynEK+jnSewZKO92aBoiIbNm5RIMb08OXzNAqUWlGjp+OKqQTbgGvjOX8oKgI8EoGZKFqa/YUZBBWNvQpcn3ElIzw0+PL9P787LKOl70VULHrvUmONikRpFKWBrteV/iscppEM2zSoFwbfQ74eGVdL3ouoWPXelaOK1vx0xR0LeGANnM0GIJJoYincLg2+h3w8DFn0ISKOFhZxJomyXoo8g2jMSJIWyTQxbMDn0EAe1ZBirocA0KWZKaaGHO/oPgas+hCRUHxUow0TZL1F0G6w1jHtT9puVu5Yxq6Vf9enXGzxpZk5Gs6HO/oPnfkfzyNodA0Rs0joRZU4Zz6UeoGVLcttZmjtqpbYc08JIZOA/qajhVRkWGPmK1oZozCLgIWEb5tcKImIrC8Uta6PCYpQFUAyrAU1b4QGlIhHudjFYKnlFnSaIxxRA2jJSZW0qbMAXg3Tvp5fp/f/AAZHFYn+LtS4UNOSiMM8AogrqDf2KNQBlcrxfEIrE/xdqTChpyUQhngFEldYb+xRiALq5Xi+IBQEATbgNT6+zoVpr+5j3itl+kta0NQEbZc4Ky2QrdWqvHxBKAgCbcBqfX2dCtNf3Me8Vsv0lrWhqAjbJ94rJZCt1aq8fO/I/nkRJGBroYHtnwdWmkMr26VnQCiSJGZYanU1l3LocWFGYJ1oXYgF9xmHlVtiPoAIOECWbTPEVJYkSmFUIDPtVg87IoSGKnVhTPuyXbE660ZxDAWbDOJTAfV2TRUlJ3L2B5lX4J4gSDors8dKGQePHyfT+/8AyGT8j+eUy3g2hdzFcY2Z0UpFy8DsYqzYpYAEwOyKe9BpqBwoyNIECMuBYk19SmduREiDxG5SIamKIlUreSSwNjLTpa0mLmR+aVb4G/wPYg9q4WZfTy/T+/8AyGT8j+f8beSQQiOAwPW/BKbHkkAGsRI/FRKyNkvKrXHK1Ma6WiYLct4fQ51F5gAB40fh2pUU4wF4hGWD0Wlu0PFTHl+n9+VkipCDV/Knog6VP+I6VP8AiOlT/iOlT/iOlT/iOlT/AIjpU/4jpU/4jpU/4jpU/wCI6VP+I6VP+I6VP+I6VP8AiOlT/iOlT/iOlT/iOlS5EA4N9tq/B6K/B6K/B6K/B6K/B6K/B6K/B6K/B6K/B6K/B6Kjx7wdKCAAuBh8j8j+eao0eukrCJgUTamdCIiOCSCdJoAgokRs0IglHCXZGWNYpUamwRR4RQHSHVSwAZO1XvDSG4KYCYKn1OG2Coli5zoplSUWYJVA01p4KMfAJYV0jNK7GF2zcUS0eFREFSCgMKkmEY3PH6f35GTSBlRQQQYqRqRREBZ+KKnmZaes66ejRLBMJoGJzh/tJhyGCCTwnFXkxgDBEjSLsSlobn+HvSiRCZzYnR4UgWKQISeE1f2cQHo41jqUanrFATdGYtW/KsdahF6NCJIycaG8kkIN+FIzNiAJ9qTkHKzonGaemDIhB4TWjD4Scyu0b+EIzPqQkBMwyjZtUSKTcRa5nL7UAIiIRXBBo8TE0o/kBDI1BwmlGhQMGUTEZt6VJVQEEVdyjSkseajFCicZSDdpuEQgkE2EWRDl0ahswrQcTIWkh99aLk0DLDTAucPr4vyP55IhfPEEpeNoqdhdKEq8WtahSKdnrhuvA41PWAFHYFcKt6XYuFYZbERFSkP2K0SkTA2Ymk0KXWhhHqaL1DDxC7NhcqEaBaiVaoJUl5nSlMA1BULgSsGaKRAcSoLSOAYije4TTsILiANb0nt5UCw3005VaRLEARk38mr6f35GR94fz++AtKckWsDzSiTAksCQboacdabpiCgoYJZm+tt6XIOwIbhSm8w8Kn5h0GjQXABzRCLgl7j8Uu8iBRkJ8oaatRyuvZSOI40VzgkEFURFmfik0qsGORgwgvNF4qwkLy0LrHChWYirEw6ce9/WkzAgEpCJR9lHOAwBFJFNKtbCCm8NpH0Kx2ADkEm8zeMaUgmSjKSVbKRDBrTfA9SIJ5jXaN/ByEZiRSiNrNjibzYVIux6BZHCsSetOaBCuyFgQuWW4Uc54QAC4g3EuU5twCcGtxicPWmIl4EQZtSUjXNFRyZGpC0qwGIjcqC6EmWVAJBhhMZpmQkQSAJguS2IzegYOO6OMg50sEuKwvGeZnxfkfzyTrFbpPG+GgvfHCTpfBUj/wBN0ArRKBxp9RyhlUtQkC96eNBDk8aWYM6lO/J4dXFqcKESoVcEhu3A40dnvYKZQ0nR2oAugTZjgFz2VhTT4um4gg2ank6CDKZtpo9jQ3DHgcTSly4KUyIBEmeZMcGgN3UgHh7FDHipEOYTEjy8fp/dTNAIKlKUAytPFBESRzTYI6CXfetq9Wv2K/Yr9iv2K/Yr9iv2K/Yr9iv2K/Yr9iv2K/Yr9iv2K/YozoENfWvz1fnq/PV+er89X56vz1fnq/PV+erhp6M1e1HUnP8AjyPyP55CKMsWWykAzamtGeAQCC+YKVpGAjgHGIJCelaI7oAuFWmJkE1Ou8vIYLmC0HGob7hnJCmgLZq7tFZ4ilEFS8Rap2fTobAWQlomKy0TBFOQd4ofmQ72YUglyQRSjmMrlCFtdYqEsbEuBTkc3cag1jRQi2OLNRHHjgpGWJLnk+n913Gx/wCO/I/nkzCTuPICNGeNOIZ9kJl3GTBDeiG5ITIlJEE2tU5jCzKzcEBZyTReOsSrxMJu9FSUW6WgghIwsWNKwwbdAVaAq+m1F+YmoQSKWiM70nRJ+UIIpCEl9UpBLNA5IEhLk1DQ+WISfMNl3ioQeD3gnJIzBWzSXYYwwZhVkaYoHIJAsMw4zCt58n0/uu42PI7Y8Ar/AEP8V2HpXYeldh6V2HpXYeldh6V2HpXYeldh6V2HpXYeldh6V2HpXYeldh6V2HpXYelKhIA942qf9/pU/wC/0qf9/pU/7/Sp/wB/pU/7/Sp/3+lT/v8ASp/3+lT/AL/Socp6f4oUlwZHPkfkfzyTeQmmgos3aAy9iFJErAveG1A4ILCMJkIWH2o7CxsBcN27iogmJyxFXfRK0rFxRkFzwNIN6keILZkst2hG9MIQpFLSMrMH0Ulio9VMSxApvQjsL4RcbhnOlQemFLAwBfTE4ojZdpAyBZFrNKC/8dAl4CjCuVcctuIkYYhDy8n0/uu42PF2TLY9aEPt4+SPY5UTB45/BlEXGH5PFQFcFMoVhcJmDJwvSRYAUldjNCqQFGGYTJ4LBLigx4xDe0/RQMwJEZE8O0b+F0DTaEzmpspyDKMxGad6YNUop6cR4UOdsqMWzbjYmmr1AEV4ZoIGIESrADq1cRSSpJGE50muKAkiATGBS/vipx4zAfQoVASYBMBAxBOTnUaSwuqi8JMeL8j+eRkAgYaleCQpfFWA/F2hqJvxV1mmDAoSxGrUN80/lIx0YtJdowFcS5IHKgJqWqaJCwEUKJlAEVD3SYKIs5MrUNkmbtjCWQ2m01dryUUuGLSETdrPiMzyYokAjFiaQTOawDUJcASU2l7j3EpCPBEotfMfHSTTrIRTes9gKLY6og9ayHCcBxi7Nzbx+n913Gx44vQ/h8Ebw0votLtJ60AomGSkJgCxE3Jxlir2YmNJMrVvfb2rKVNsQRs20XzS1dJMJW26MG2KeAK1rbJQ6OcTRGuKilRmvdpyqC5UmGysSGLUGnSRgvZikQzDxpkzMn1D7qTIpmc7QXL4IoGmbRLaUS8D6xSiwoFmUXhbWc71M5Ezha8BLkxximSJJ1kIHGbq+lCkxhtLByFzqItcRAEm28tSUuMsgkiW7da7RvSLIKkKQa3L0URiynVgzZtBLEgsU5gDbFgrCBQ0NrtMDRippu2SLjMM0NjongwSkPIrv3Gi+E8yYVI2vq5cEozEmUxco5Vi6AYskIC65KBvAGATHUsgslgvFK93MkOTLuTPA8NTRVOfi/I/nkU1+QAJoEG4xe9IAM5xrbMFjFByWQOiYuwimdagayYBmguWIzaaDARpZMMIUxVekRmVAzsBc3ioJnrCUhdpxnTFMKLF8S8uIOGuaOQTqDMTRzCy5pkVr4FgKWYG0RTvUXBARhDIPKggMybGbiVB62q7Z+kzINi5e01L/PkWEi10mZ8n0/uu42PE3WtSjh+3p/1OSAAvqMngu5nIYYT+1HEQVOYI/nj2jekEhJGigNBJ6gL02CJRCfQtQPbklDgOTL5EEhJGuUZMERGIjSiCYQAkBkjhDRHTg0Ddy4q5e+o7XoAAWCx4vyP55CGuLBONSKMLYqUPJtEkglsTmgeLBsYEFpWIm3GjLLGCUrESXdFqfYssasoZQohtSyQyKWGrJJIXialJpgE5hIS2mahtrjMQu0OitsU5HmUZFY4FsM0PuUgQtmSWVmlOGWFIpahAstopoWUyQlgxAqYmjhyOJgkI+QzRTgky3xtYLvSj3aggEFLhoOfj9P7ruNjyAwBN62vYq7D612H1rsPrXYfWuw+tdh9a7D612H1rsPrXYfWuw+tdh9a7D612H1rsPrXYfWuw+tBskH19a3O9vW53t63O9vW53t63O9vW53t63O9vW53t63O9vW53t64svVNACAA4HkfkfzyYUZGmS2GGWzNKQPapzGQgyWHFGzNgWpNwQEp404qCPRSCFjvNKBhzAOcxYSX2q/HKWQxQEuzaBp+4s8BWRaUQzTcvE+Gca4W2tqSB2KjUJYmj8JoGc4ZOxpZJd0pMURJCLCwb8aZFfBWArgGWiylCMUBZmS9FQTpSPIkSGWyUheGQyvGDWx4/T+67jY8gEoDet72Ku4+ldx9K7j6V3H0ruPpXcfSu4+ldx9K7j6V3H0ruPpXcfSu4+ldx9K7j6V3H0ruPpQ7BJN/StjvbVsd7atjvbVsd7atjvbVsd7atjvbVsd7atjvbVsd7auLD1RQgkROJ5H5H88igmCYJtJm2tqWqvjkgiXAZpCYiChQsNJ43oQj5kVhZUuJtNL6YkFEEQiVza1ITiZEmENZJs6U4EKZJCUiQEazV4f0MkERZZfmrRxpxIkUFhqmKsYohrNcsIW1ockVCT0gmCRZagcqwSoBB65ozUEhdYLxsulIdovNycgKIvtTi2EbUIm4s7+P0/uu42PEnWlQrl+np/wDHYkERIS4712H/ACuw/wCV2H/K7D/ldh/yuw/5XYf8rsP+V2H/ACuw/wCV2H/KhnjrMNkLUIBGRueL8j+eSXRNL8y3IjotRbPWdImgLMb1le+obdJVjWyUb7QEr326Ii0TSYxj8SMy+MnrQRuHkl99kLTJNBGG01AOL8Z80px7GUqBgCXdLVHHt9tq3JQQ11qzs2cpDJNIZmrHggOAoiFmw+ylwpKQ+BI3aCu9T8YelUkunN16L0NKs2DIuXeFM7woGoQMFuDd8fp/ddxseOJ0f4fBeSHB9uA3UKagjQSAi6iTnBbdpLIV1KEy5N16JWMzFDQKybjFCNwYBsXLoiFrztUw84plSBVpDk4VjyNJBlwzZkLxUuK41INQ9xeKnFMEzqHVs+aQIVRlxAOJK7OdmrTw6cRkZgiS0NSuMUKbIs3ytGtSNCUggLRky5+KeA2EqZYOw3aGSYF4GFdJ46KnyNCgG9tJ9077ydsjWDBK1X0EDiweLcQUGY4vM1yEzBYi8t5ycKBTdAtiYYzFmosOUIKQLLIwg2WcVCAWqJKGW5KGEaE0hEkrm0LmxklvdBtUoLdMzGbkm7k50FBclAlSE2gxq8KEZsAGQkwUyYW9Cs46fipuRnH8oMKEBIFtFNOPhy0NBQ5vi/I/nkEkYoDAqS4RNquAyVMSAUGrFKYTwORMWMAS96H5JcLCmSR80+LlWVYSgMynaogWnfHScFk2moVMUTCEAQm29CFxeRSOs2VqnzpwknIWCxhUsFuQhMF0gNuSrsOHNhCBmQjhR9V7rEb5MBNTJOMiQXIyTU1ptHXlAmiOKanmBG2oQNxTv4/T+67jY8XYM5PWlDg6nDwhAIFCQgyMGs89aIIQwKt0SfBX1IBKRdwOlL3Yju3EQ/BSFRCBJIywmD2KeUrlW91vlqVRmghlJIMMb1hzlTZZl+WjoQwZhFKMNyXDWbbFUsRN0TGsUMFNXOBcoTAvEKCyulDCJGUsU0QhpjYo3PWkVE5DLAfQeAl0lCUTkkRjagZAIAwHi2/YkENyTQewjJeoSiL0MRdi8+iiTb8mLEyDdC8TRiKthAxIyCUTJZKJAlFCqyiBv61Cu4JECi4JRXRWYX1G2bKWoVCXhRizD6axNaSr4bbUvDWkXUQqV3agESUZri+AjxfkfzyNi9mBTo7HGk6bHRIwZs8aie/nmSqwnKXKRIdYyZJgEelCBkElGJCQF9kKL/Q68LkFDjNAMzSBRla9mParrdvpbIeC+I40uV10YsQ0ITFMS1ylgyQEIIkrWdHBnAOFmmeDYiJQyrq94ohIBNKMBsYZ40fpzZIBKWIub5ohiHKYhKrk+yPH6f3XcbHkdmXiFf6H+q7D1rsPWuw9a7D1rsPWuw9a7D1rsPWuw9a7D1rsPWuw9a7D1rsPWuw9a7D1rsPWpd3xmxkBo9dP+YMGDBgwYMGDBrlj9KYwksWGQVBfg8j8j+eRsjH0iQsJxmns4fYSrKza9MRKBpiEuemslDAmsSLjkJM24UDIHo0jbHENKeYCKbmEnE5Tis/6O0EYaqcqsSSkmAWA4/FabdpwhDIhLsTQoA56IhKSBi9ooc4boQpkHIkUWY0hkdyUgi8BSlvReBmSy3ViMU4QIdqXWYQYOFLfbIXMulnxfp/ddxsf+O/I/nlcBZKyQ68gSkJIyW8HJo0nIuWUvz4T6W8uZsCx2qOKDNAzk1GYmoPtDtEJxTgzUCcWTAZILGmYnetZpCCIwIY0K+dU02TnGua1mkIIjCjnUqCa1qwqEAZWp6k3OYCy1wOXj9P7ruNjyGEzKoRtibVASTMbTmsHRSZg3JjOgm9YG8W6EJGZf4acUVUwJRPIRolGpx5YIQZn2+KCMATSRYWBMwM5pMCQuTjfi9KQJuGWFIExm1ADdkW0zHs3xR8TQhcUS1WigQCBAQ1EItbFKiQCCtiBCNxym9IO8YING8Is5TFEE4sIYCsQpxUPrzxCwSFIzrpXt9tbM4o1PyAA4jN6YDygmezjU6zIWEAgZte+UxV1gz4lJZUw5DFXL2GJ6nSgZy4NFAkPqxQGXMJc9TvgpAKYwQ7sZpgngBCKSe3zTMwyMUxMTOYpufYOLzGu2tGhJARIQRM7xNOUpABFuTEsU9o0sUjESDRc6Oy20gPUgc7X9KYFfglRLwEXmeHkfkfzzateoCYGL5slRW3xxHeDGaJpIARJbF2BUEFQAWBqx3nhQcYh+sNC3fKRxWbUFIJABanF9G9IqmQjHBDrM6UtAEBtM+1m9B0MVIb8DX2r0NQw9Y8v0/uu42PIcsSgRwLiCnAtxpUUx2u9YKc1PUjpAjNUt5mPWmaU2VZUuzujeoOwZRCSWbIWhmGaCiORJWFUmRmQ1pnuIimWQirfYbWRQhn9z2KuCLsiFFRNNUcIoJMwQz9NTLTUExZGtpJWMxEQSDTRclLCAiF5K20JaHdzS0JvnuDXaZsNXc8ipOA0oNoZ+6eaNlA3BDuTFJeIdOAYgAgu41peMBDJhIliR4xii8gvcMjTknFqn4B4okyKcM54PShQYwXIUy7qT63elQGxNx1WJaWZiKicI4OEvq0YxCxdchTChgIgVuUVFLnUpezCckwv5Q0scRiAjaZmwxQtctwKF10NEb606GRorgWJTEMxS2AigFpcJrQTCoGIQvFpoe8kG+qYlA44PWmCJiKki5LjqMS00VlC1ICWQgt6q5PIjNpL+eYLSEEskyEplxiMzV+5FsJEBKMhl0pRGJoZAyJRqeik/CIk1gUdJYtBFr02BwHrpYRjBdJwimpHaZYSI1TDFRdNIFTYTJta73pECk6jpsHFuTwm5Qjyeq5GbPMZNlPf8Tvo4D9CWhjJTlegbO7o+3l+n913Gx/5ql+ZQgvG1KlWrKRdiJ5WrPCklfTwrTiJEnjHG9BRloNo4RwqFP3hDkUi33KP3IzQZKSIBcTFSN6SkM8HpRCxksgm+fo5UoAKlBliL+weX6f3Qw0mRZ4Fb7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mpiFWLQ8ay/9zKv/9k=" alt="示例"><div class="color-gray">输入通用代码(暂只支持腾讯视频)</div><input type="text" class="form-control text-center" placeholder="通用代码" ng-model="netWorkurl"><div><button class="btn btn-default" type="button" ng-click="fetchNetwork()">提取</button></div></form></div><div class="material-pager text-right" ng-bind-html="pager" ng-show="index!=2"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" data-dismiss="modal">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'),e.put("directive-voice-voice.html",'<div class="modal-dialog modal-lg" ng-controller="we7resource-voice-controller as vctrl"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel4">语音</h4></div><we7-resource-voice is-wechat="isWechat" show-type="3"></we7-resource-voice></div></div>'),e.put("widget-musicform-musicform.html",'<div class="modal-body material-content clearfix"><div id="music" class="material-body we7-form"><form action="" method="post" class="form-horizontal"><div class="form-group"><label class="col-sm-2 control-label">音乐标题</label><div class="col-sm-10"><input type="text" class="form-control" placeholder="添加音乐消息的标题" ng-model="$ctrl.music.title"></div></div><div class="form-group"><label class="col-sm-2 control-label">选择音乐</label><div class="col-sm-10"><div class="input-group"><input type="text" class="form-control" readonly ng-model="$ctrl.music.url"> <span class="input-group-btn"><button class="btn btn-default" type="button" ng-click="$ctrl.selectVoice()">选择媒体文件</button></span></div><div class="help-block">选择上传的音频文件或直接输入URL地址,常用格式:mp3</div></div></div><div class="form-group"><label class="col-sm-2 control-label">高品质链接</label><div class="col-sm-10"><input type="text" class="form-control" ng-model="$ctrl.music.HQUrl"><div class="help-block">没有高品质音乐链接,请留空。高质量音乐链接,WIFI环境优先使用该链接播放音乐</div></div></div><div class="form-group"><label class="col-sm-2 control-label">描述</label><div class="col-sm-10"><input type="text" class="form-control" ng-model="$ctrl.music.description"><div class="help-block">描述内容将出现在音乐名称下方,建议控制在20个汉字以内最佳</div></div></div></form></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="$ctrl.ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div>'),e.put("widget-upload-upload.html",'<label for="we7resourceFile" class="btn btn-primary">{{$ctrl.name}}</label><input type="file" id="we7resourceFile" multiple name="file" accept="{{$ctrl.accept}}" style="display: none"><div class="progress-uploader row" ng-repeat="(key, value) in $ctrl.files" ng-show="uploading" style="z-index: 9900"><div class="col-sm-3 text-over">{{value.name}}</div><div class="col-sm-2 color-gray">({{value.filesize}}KB)</div><div class="col-sm-7"><div class="progress"><div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{value.progress}}%"></div></div></div></div>'),e.put("widget-voice-voice.html",'<div class="modal-body material-content clearfix"><div class="material-nav"> <a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index == 1]" ng-show="showLocal()" ng-click="setIndex(1)">本地服务器</a></div><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form"><div class="pull-right btn-uploader" style="z-index: 10"><we7-uploader-btn upload-url="uploadurl" on-uploaded="uploaded()" on-upload-error="uploaderror(mes)" name="uploadname" accept="accept"></we7-uploader-btn></div></form></div><div id="voice" class="material-body voice-content"><div class="row"><div class="col-sm-3" ng-repeat="(key, value) in $ctrl.voices" ng-click="$ctrl.itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><img src="/web/Common/resource/images/icon-voice.png" alt="" class="icon"><div class="time">创建于:{{ $ctrl.timeToDate(value.createtime) | date:\'yyyy-MM-dd HH:mm\' }}</div><div class="name">{{$ctrl.getTitle(value)}}</div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="material-pager text-right" ng-bind-html="$ctrl.pager"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="$ctrl.multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div>'),e.put("directive-multipage-multipage.html",'<div class="page-navigator"><div class="top-title">页面</div><div class="page-list"><ul><li class="page-menu" ng-repeat="page in allPages track by $index" ng-click="navToPage($index)" ng-init="" ng-class="{\'current\' : page.num-1 == $index}"><div class="page-thumb-block" ng-class="{active : page.active}"><div class="page-thumb"><div class="page-thumb-con"></div></div><div class="page-menu-title" ng-bind="{{$index+1}}"></div><div class="icon icon-remove" ng-click="removePage($index);"><span class="fa fa-trash"></span></div><div class="icon icon-copy" ng-click="copyPage($index, $event);" ng-if="isMultiPage"><span class="fa fa-copy"></span></div></div></li></ul></div><div class="add-blank-page" ng-click="insertPage();" ng-if="isMultiPage">+</div><div class="template hidden"><ul class="nav nav-tabs nav-justified"><li class="active"><a href="#">普通版式</a></li><li><a href="#">统计版式</a></li><li><a href="#">特效版式</a></li></ul><div class="template-area"><div class="template-item"><div class="add-icon"><span class="fa fa-plus-circle"></span></div><div class="text">空白页</div></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div></div></div></div>'),e.put("widget-cardactivity-display.html",'<div ng-controller="CardActivityCtrl"><div class="nav-container" ng-if="module.params.discount_type != 0 && module.params.discount_style == 1"><div class="list-group"><div class="list-group-item"><a href="#">优惠说明 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div></div><div class="app-richText" ng-if="module.params.discount_type != 0 && module.params.discount_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'),e.put("widget-cardactivity-editor.html",'<div ng-controller="CardActivityCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">付款返积分比率</label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">每消费 1 元赠送</span> <input type="text" ng-model="activeItem.params.grant_rate" class="form-control"> <span class="input-group-addon">积分</span></div><div class="help-block">设置消费返积分的比率.如果开启了充值优惠设置,请到充值优惠设置中->设置消费是否返还积分的开关.</div><div class="help-block"><strong class="text-danger">例:兑换比率:1元返10积分,那用户每消费1元,将得到10积分.</strong></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="0" ng-model="activeItem.params.discount_type" id="discount_type1"><label class="radio-inline" for="discount_type1">不开启</label><input type="radio" value="1" ng-model="activeItem.params.discount_type" id="discount_type2"><label class="radio-inline" for="discount_type2">使用满减功能</label><input type="radio" value="2" ng-model="activeItem.params.discount_type" id="discount_type3"><label class="radio-inline" for="discount_type3">使用折扣功能</label></div></div><div class="form-group" ng-show="activeItem.params.discount_type == 1" ng-repeat="discount in activeItem.params.discounts"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">{{discount.title}}</span> <span class="input-group-addon">满</span> <input type="hidden" ng-model="discount.groupid"> <input type="text" class="form-control" ng-model="discount.condition_1"> <span class="input-group-addon">元</span> <span class="input-group-addon">减</span> <input type="text" class="form-control" ng-model="discount.discount_1"> <span class="input-group-addon">元</span></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type == 2" ng-repeat="discount in activeItem.params.discounts"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">{{discount.title}}</span> <span class="input-group-addon">满</span> <input type="hidden" ng-model="discount.groupid"> <input type="text" class="form-control" ng-model="discount.condition_2"> <span class="input-group-addon">元</span> <span class="input-group-addon">打</span> <input type="text" class="form-control" ng-model="discount.discount_2"> <span class="input-group-addon">折</span></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label">样式设置</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.discount_style"> 系统默认</label><label class="radio-inline"><input type="radio" value="2" ng-model="activeItem.params.discount_style"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'),e.put("widget-cardbasic-display.html",'<div ng-controller="CardBasicCtrl"><div class="title"><h1><span>会员卡</span></h1></div><div class="card"><div class="card-panel"><div class="card-logo"><img src="" ng-if="module.params.logo" ng-src="{{module.params.logo}}"></div><img class="card-bg" src="" ng-if="module.params.background.image" ng-src="{{module.params.background.image}}"><div class="card-grade" ng-if="module.params.card_level.type == \'1\'" ng-style="{\'color\' : module.params.color.rank}">默认会员组</div><div class="card-info"><div class="text-center" ng-if="module.params.card_label.type == \'1\'"><span class="card-rank" ng-style="{\'color\' : module.params.color.title}" ng-bind="module.params.card_label.title"></span></div><div class="card-no text-right" ng-if="!module.params.format_type" ng-style="{\'color\' : module.params.color.number}" ng-bind="module.params.format">会员卡号:<span>{$setting[\'format\']}</span></div></div></div></div><div class="btn-manage clearfix"><a href="javascript:;" class="recharge"><img ng-src="{{recharge_src}}" alt=""> <span>充值</span></a> <a href="javascript:;" class="payment"><img ng-src="{{scanpay_src}}" alt=""> <span>付款</span></a></div><div class="list-group"><div class="list-group-item"><a href="#">我的余额 <span class="pull-right">0.00 <i class="fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a href="#">我的积分 <span class="pull-right">0.00 <i class="fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a href="#">我的卡券 <span class="pull-right">0张 <i class="fa fa-angle-right"></i></span></a></div></div><div class="list-group"><div class="list-group-item"><a href="#">消息 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div><div class="list-group"><div class="list-group-item"><a href="#">个人信息 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a href="#">账单 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div></div>'),e.put("widget-cardbasic-editor.html",'<div ng-controller="CardBasicCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">名称<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.title"></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">商户名称<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.brand_name"></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">背景图案<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="system" ng-init="activeItem.params.background && activeItem.params.background == 0 ? activeItem.params.background = {} : \'\'" ng-model="activeItem.params.background.type"> 系统</label><label class="radio-inline"><input type="radio" value="user" ng-init="activeItem.params.background && activeItem.params.background == 0 ? activeItem.params.background = {} : \'\'" ng-model="activeItem.params.background.type"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.background.type == \'user\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-xs-9"><span ng-click="addBgThumb()" class="form-control-static"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.background.image"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.background.image}}"> <em ng-click="activeItem.params.background.image = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div></div></div><div class="form-group" ng-show="activeItem.params.background.type == \'system\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><select class="form-control" ng-model="activeItem.params.background.image"><option value="{{tomedia(\'images/global/card/1.png\')}}">背景1</option><option value="{{tomedia(\'images/global/card/2.png\')}}">背景2</option><option value="{{tomedia(\'images/global/card/3.png\')}}">背景3</option><option value="{{tomedia(\'images/global/card/4.png\')}}">背景4</option><option value="{{tomedia(\'images/global/card/5.png\')}}">背景5</option><option value="{{tomedia(\'images/global/card/6.png\')}}">背景6</option><option value="{{tomedia(\'images/global/card/7.png\')}}">背景7</option><option value="{{tomedia(\'images/global/card/8.png\')}}">背景8</option><option value="{{tomedia(\'images/global/card/9.png\')}}">背景9</option><option value="{{tomedia(\'images/global/card/10.png\')}}">背景10</option><option value="{{tomedia(\'images/global/card/11.png\')}}">背景11</option><option value="{{tomedia(\'images/global/card/12.png\')}}">背景12</option><option value="{{tomedia(\'images/global/card/13.png\')}}">背景13</option><option value="{{tomedia(\'images/global/card/14.png\')}}">背景14</option><option value="{{tomedia(\'images/global/card/15.png\')}}">背景15</option><option value="{{tomedia(\'images/global/card/16.png\')}}">背景16</option><option value="{{tomedia(\'images/global/card/17.png\')}}">背景17</option><option value="{{tomedia(\'images/global/card/18.png\')}}">背景18</option><option value="{{tomedia(\'images/global/card/19.png\')}}">背景19</option><option value="{{tomedia(\'images/global/card/20.png\')}}">背景20</option><option value="{{tomedia(\'images/global/card/21.png\')}}">背景21</option><option value="{{tomedia(\'images/global/card/22.png\')}}">背景22</option><option value="{{tomedia(\'images/global/card/23.png\')}}">背景23</option></select></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">LOGO<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><span ng-click="addThumb(\'logo\')" class="form-control-static"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.logo"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.logo}}"> <em ng-click="activeItem.params.logo = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">会员卡等级</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.card_level.type" id="card-label-type1"><label class="radio-inline" for="card-level-type1">开启</label><input type="radio" value="2" ng-model="activeItem.params.card_level.type" id="card-label-type2"><label class="radio-inline" for="card-level-type2">关闭</label></div></div><div class="form-group" ng-show="activeItem.params.card_level.type == \'1\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-colorpicker we7-my-color="activeItem.params.color.rank" we7-my-default-color="\'#fff\'"></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">会员卡标题</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.card_label.type" id="card-label-type1"><label class="radio-inline" for="card-label-type1">开启</label><input type="radio" value="2" ng-model="activeItem.params.card_label.type" id="card-label-type2"><label class="radio-inline" for="card-label-type2">关闭</label></div></div><div class="form-group" ng-show="activeItem.params.card_label.type == \'1\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.card_label.title" class="form-control"><br><span><span><div we7-colorpicker we7-my-color="activeItem.params.color.title" we7-my-default-color="\'Color010\'"></div></span></span></div></div><div class="form-group" style="display:none"><label class="col-xs-12 col-sm-3 col-md-2 control-label">卡号设置<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="checkbox-inline"><input type="checkbox" value="1" ng-model="activeItem.params.format_type" ng-init="activeItem.params.format_type = (activeItem.params.format_type == 1 ? true : false)"> 使用手机号作为卡号</label><span class="help-block">强烈推荐使用手机号作为卡号</span><div ng-show="activeItem.params.format_type != 1"><input name="format" type="text" ng-model="activeItem.params.format" ng-init="activeItem.params.format = \'\'" class="form-control"> <span class="help-block"><p>"*"代表任意随机数字,<span style="color:red">"#"代表流水号码, "#"必须连续出现,且只能存在一组.</span></p><p>卡号规则样本:"WQ2015*****#####***"</p>注意:规则位数过小会造成卡号生成重复概率增大,过多的重复卡密会造成卡密生成终止 卡密规则中不能带有中文及其他特殊符号 为了避免卡密重复,随机位数最好不要少于8位</span></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">使用说明<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><textarea class="form-control" rows="6" ng-model="activeItem.params.description"></textarea><span class="help-block">请填写会员卡的使用说明。</span></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">会员卡资料</label><div class="col-sm-10 col-xs-9"><div ng-repeat="field in activeItem.params.fields" style="margin-left:-15px"><div class="col-sm-10" style="margin-bottom:10px"><div class="input-group"><input type="text" class="form-control" ng-model="field.title" ng-disabled="(field.bind == \'realname\' || field.bind == \'mobile\') && $index <= \'1\'"> <span class="input-group-addon"><label><input type="checkbox" ng-init="field.require = field.require == 1 ? true : false;" ng-model="field.require" ng-disabled="(field.bind == \'realname\' || field.bind == \'mobile\') && $index <= \'1\'"> 必填</label></span><select ng-model="field.bind" class="form-control" ng-disabled="(field.bind == \'realname\' || field.bind == \'mobile\') && $index <= \'1\'"><option value="{{fansfield.bind}}" ng-repeat="fansfield in fansFields" ng-model="field.bind" ng-selected="{{field.bind == fansfield.bind}}">{{fansfield.title}}</option></select></div></div><div class="col-sm-1" style="margin-top:5px" ng-show="field.bind != \'mobile\' && field.bind != \'realname\'"><a href="javascript:;" ng-click="removeFields(field);"><i class="fa fa-times-circle"></i></a></div></div><span class="help-block col-sm-9" style="margin-left:-15px">系统会自动绑定:真实姓名和手机号码</span> <span class="help-block col-sm-9" style="margin-left:-15px"><a href="javascript:;" ng-click="addFields();"><i class="fa fa-plus-circle" title="添加填写项目"></i> 添加填写项目</a></span></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">领卡赠送<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon" ng-init="activeItem.params.grant && activeItem.params.grant == 0 ? activeItem.params.grant = {} : \'\'">赠送</span> <input type="text" ng-model="activeItem.params.grant.credit1" class="form-control"> <span class="input-group-addon">积分</span></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">赠送</span> <input type="text" ng-model="activeItem.params.grant.credit2" class="form-control"> <span class="input-group-addon">余额</span></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><input type="hidden" ng-model="activeItem.params.grant.coupon"> <span class="input-group-addon">已选:<span ng-repeat="grant in activeItem.params.grant.coupon"><span ng-bind="grant.couponTitle">{{grant.couponTitle}}</span>|</span></span> <span class="input-group-btn"><button class="btn btn-primary" type="button" ng-click="selectCoupon();">搜索优惠券</button> <button class="btn btn-default" type="button" ng-click="clearCoupon();"><span><i class="fa fa-remove"></i></span></button></span></div><div class="help-block"><a href="{{url(\'activity/coupon\');}}" target="_blank">添加优惠券</a>.注意:赠送的优惠券应该各个会员组都可以领取.否则会造成赠送失败的问题</div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">单次积分<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.bonus_rule.max_increase_bonus" class="form-control"> <span class="help-block">单次最多可获取积分数量</span></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">抵扣条件<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.bonus_rule.least_money_to_use_bonus" class="form-control"> <span class="help-block">满足xx元,可使用积分抵扣</span></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">抵现比率<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><div class="input-group"><input type="text" ng-model="activeItem.params.offset_rate" class="form-control"> <span class="input-group-addon">积分抵 1 元</span></div><br><div class="input-group"><span class="input-group-addon">单次最多可抵现</span> <input type="text" ng-model="activeItem.params.offset_max" class="form-control"> <span class="input-group-addon">元</span></div><div class="help-block"><strong class="text-danger">例:积分抵现金比率:100积分抵1元,那用户在消费的时候,将可用账户积分抵消部分金额.</strong></div><div class="help-block"><strong class="text-danger">目前仅支持后台交易抵现,暂不支持手机交易抵现.</strong></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">库存<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.quantity" class="form-control"> <span class="help-block">卡券库存的数量,不支持填写0,上限为100000000.</span></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">使用提醒<span style="color:red">*</span></label><div class="radio"><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.notice" class="form-control"> <span class="help-block">卡券使用提醒,字数上限为16个汉字。</span></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">刷卡支付<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" ng-model="activeItem.params.swipe_card" value="1">开启</label><label class="radio-inline"><input type="radio" ng-checked="activeItem.params.swipe_card == null || activeItem.params.swipe_card == 2" ng-model="activeItem.params.swipe_card" value="2">关闭</label><span class="help-block">选择是否开启刷卡支付</span></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">有效日期<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" ng-model="activeItem.params.date_info.type" value="DATE_TYPE_PERMANENT"> 永久有效</label></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="radio"><div class="col-sm-3"><label class="radio-inline"><input type="radio" ng-model="activeItem.params.date_info.type" value="DATE_TYPE_FIX_TIME_RANGE"> 固定日期</label></div><div class="input-group" style="width: 240px"><input we7-date-picker we7-date-value="activeItem.params.date_info.begin_timestamp" ng-model="activeItem.params.date_info.begin_timestamp" class="form-control" style="width: 100px"><div class="input-group-addon">到</div><input we7-date-picker we7-date-value="activeItem.params.date_info.end_timestamp" ng-model="activeItem.params.date_info.end_timestamp" class="form-control" style="width: 100px"></div></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input ng-model="activeItem.params.date_info.type" type="radio" value="DATE_TYPE_FIX_TERM">领取后</label><div class="input-group" style="width: 240px"><input ng-model="activeItem.params.date_info.fixed_begin_term" class="form-control" style="width: 100px"> <span class="input-group-addon">天生效,有效期</span> <input ng-model="activeItem.params.date_info.fixed_term" class="form-control" style="width: 100px"></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">可用门店</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><a href="#" class="location_list">选择适用门店</a></label></div></div></div></div></div></div></div>'),e.put("widget-cardnums-display.html",'<div ng-controller="CardNumsCtrl"><div class="nav-container" ng-if="module.params.nums_status == 1 && module.params.nums_style == 1"><ul><li class="collapse-link"><a class="nav-container-list" href="javascript:;"><span class="nav-title"><i class="fa fa-eye"></i>{{module.params.nums_text}}充值</span> <span class="pull-right"><i class="fa fa-angle-right"></i></span></a><div class="collapse-con padding-b-0"><a href="./index.php?i={$_W[\'uniacid\']}&j={$_W[\'acid\']}&c=entry&m=recharge&do=pay&type=card_nums&fee={{num.recharge}}" class="btn btn-warning btn-recharge" ng-repeat="num in module.params.nums">充{{num.recharge}}返{{num.num}}次</a></div></li></ul></div><div class="app-richText" ng-if="module.params.nums_status == 1 && module.params.nums_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'),e.put("widget-cardnums-editor.html",'<div ng-controller="CardNumsCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计次设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.nums_status" id="nums_status1"><label class="radio-inline" for="nums_status1">开启</label><input type="radio" value="0" ng-model="activeItem.params.nums_status" id="nums_status2"><label class="radio-inline" for="nums_status2">关闭</label><span class="help-block">如你的业务有需要次数限制,可开启进行设置。</span></div></div><div class="form-group" ng-show="activeItem.params.nums_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计次设置</label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.nums_text"> <span class="help-block">例如:设置为”洗发剩余次数“,前台将显示为:”洗发剩余次数:n次“,请根据自己的业务需求设置。</span></div></div><div class="form-group" ng-show="activeItem.params.nums_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">充值返次数</label><div class="col-sm-9 col-xs-12"><div ng-repeat="num in activeItem.params.nums" style="margin-left:-15px"><div class="col-sm-8" style="margin-bottom:10px"><div class="input-group"><span class="input-group-addon">充</span> <input type="text" class="form-control" ng-model="num.recharge"> <span class="input-group-addon">元</span> <input type="text" class="form-control" ng-model="num.num"> <span class="input-group-addon">次</span></div></div><div class="col-sm-1" style="margin-top:5px"><a href="javascript:;" ng-click="removeNums(num);"><i class="fa fa-times-circle"></i></a></div></div><div class="help-block col-sm-9" style="margin-left:-15px"><a href="javascript:;" ng-click="addNums();"><i class="fa fa-plus-circle" title="添加充值设置"></i> 添加充值设置</a></div></div></div><div class="form-group" ng-show="activeItem.params.nums_status != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label">样式设置</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.nums_style"> 系统默认</label><label class="radio-inline"><input type="radio" value="2" ng-model="activeItem.params.nums_style"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.nums_status != 0 && activeItem.params.nums_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.nums_status != 0 && activeItem.params.nums_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'),e.put("widget-cardrecharge-display.html",'<div ng-controller="CardRechargeCtrl"><div class="nav-container" ng-if="module.params.recharge_type != 0 && module.params.recharge_style == 1"><div class="list-group"><div class="list-group-item"><a href="#">充值优惠说明 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div></div><div class="app-richText" ng-if="module.params.discount_type != 0 && module.params.discount_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'),e.put("widget-cardrecharge-editor.html",'<div ng-controller="CardRechargeCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.recharge_type" id="recharge_type1"><label class="radio-inline" for="recharge_type1">开启</label><input type="radio" value="0" ng-model="activeItem.params.recharge_type" id="recharge_type2"><label class="radio-inline" for="recharge_type2">不开启</label></div></div><div class="form-group" ng-show="activeItem.params.recharge_type == 1" ng-repeat="recharge in activeItem.params.recharges"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">充</span> <input type="text" class="form-control" ng-model="recharge.condition"> <span class="input-group-addon">元</span> <span class="input-group-addon" ng-if="recharge.backtype == \'0\'">送</span> <span class="input-group-addon" ng-if="recharge.backtype == \'1\'">送</span> <input type="text" class="form-control" ng-model="recharge.back"><div class="input-group-btn"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="width:88px"><span ng-switch on="recharge.backtype"><span ng-switch-when="0">元</span> <span ng-switch-when="1">积分</span></span> <i class="fa fa-angle-down"></i></button><ul class="dropdown-menu dropdown-menu-right select-back"><li><a href="#" ng-click="recharge.backtype=\'0\';recharge.backunit=\'元\'">元</a></li><li><a href="#" ng-click="recharge.backtype=\'1\';recharge.backunit=\'积分\'">积分</a></li></ul></div></div></div><div class="col-sm-1" style="margin-top:5px"><a href="javascript:;" ng-click="removeRecharges(recharge);"><i class="fa fa-times-circle"></i></a></div></div><div class="form-group" ng-show="activeItem.params.recharge_type != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="help-block col-sm-9 col-xs-12" style="margin-left:-15px"><a href="javascript:;" ng-click="addRecharges();"><i class="fa fa-plus-circle" title="添加充值设置"></i> 添加充值设置</a></div></div><div class="form-group" ng-show="activeItem.params.recharge_type == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">消费返积分</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.grant_rate_switch"> 是</label><label class="radio-inline"><input type="radio" value="0" ng-model="activeItem.params.grant_rate_switch"> 否</label><div class="help-block"><strong class="text-danger">开启充值优惠设置后,用户是否继续享受消费返积分的优惠</strong></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'),e.put("widget-cardtimes-display.html",'<div ng-controller="CardTimesCtrl"><div class="nav-container" ng-if="module.params.times_status == 1 && module.params.times_style == 1"><ul><li class="collapse-link"><a class="nav-container-list" href="javascript:;"><span class="nav-title"><i class="fa fa-eye"></i>{{module.params.times_text}}充值</span> <span class="pull-right"><i class="fa fa-angle-right"></i></span></a><div class="collapse-con padding-b-0"><a href="./index.php?i={$_W[\'uniacid\']}&j={$_W[\'acid\']}&c=entry&m=recharge&do=pay&type=card_times&fee={{time.recharge}}" class="btn btn-warning btn-recharge" ng-repeat="time in module.params.times">充{{time.recharge}}返{{time.time}}天</a></div></li></ul></div><div class="app-richText" ng-if="module.params.times_status == 1 && module.params.times_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'),e.put("widget-cardtimes-editor.html",'<div ng-controller="CardTimesCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计时设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.times_status" id="times_status1"><label class="radio-inline" for="times_status1">开启</label><input type="radio" value="0" ng-model="activeItem.params.times_status" id="times_status2"><label class="radio-inline" for="times_status2">关闭</label><span class="help-block">如你的业务有需要时长限制,可开启进行设置。</span></div></div><div class="form-group" ng-show="activeItem.params.times_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计时设置</label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.times_text"> <span class="help-block">例如:设置为”到期时间“,系统将根据用户的领卡时间,加上用户的可用时长,计算到期时间,前台将显示为:”到期时间:x年x月x日“,请根据自己的业务需求设置。</span></div></div><div class="form-group" ng-show="activeItem.params.times_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">充值返时长</label><div class="col-sm-9 col-xs-12"><div ng-repeat="time in activeItem.params.times" style="margin-left:-15px"><div class="col-sm-8" style="margin-bottom:10px"><div class="input-group"><span class="input-group-addon">充</span> <input type="text" class="form-control" ng-model="time.recharge"> <span class="input-group-addon">元</span> <input type="text" class="form-control" ng-model="time.time"> <span class="input-group-addon">天</span></div></div><div class="col-sm-1" style="margin-top:5px"><a href="javascript:;" ng-click="removeTimes(time);"><i class="fa fa-times-circle"></i></a></div></div><div class="help-block col-sm-9" style="margin-left:-15px"><a href="javascript:;" ng-click="addTimes();"><i class="fa fa-plus-circle" title="添加充值设置"></i> 添加充值设置</a></div></div></div><div class="form-group" ng-show="activeItem.params.times_status != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label">样式设置</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.times_style"> 系统默认</label><label class="radio-inline"><input type="radio" value="2" ng-model="activeItem.params.times_style"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.times_status != 0 && activeItem.params.times_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.times_status != 0 && activeItem.params.times_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'),e.put("widget-ucheader-display.html",'<div ng-controller="HeaderCtrl"><div class="title"><h1><span>{{module.params.title}}</span></h1></div><div class="head" style="background-repeat:no-repeat; background-position: center center" ng-style="{\'background-image\' : module.params.bgImage ? \'url(\' + module.params.bgImage + \')\' : \'url(\\\'./Common/resource/images/app/head-bg.png\\\')\'}"><a class="ptool" href="{{url(\'mc/profile\')}}">设置</a><div class="logo-img"><img ng-src="{{logo_url}}" class="img-circle"></div><div class="banner-info"><div class="name">设置昵称</div><div class="tel">1884512367</div></div><div class="head-nav"><a class="head-nav-list" href="{{url(\'mc/bond/credits\')}}&credittype=credit1"><span class="fa fa-rmb"></span>余额: <span>4000.00</span></a> <a class="head-nav-list" href="{{url(\'mc/bond/credits\')}}&credittype=credit2"><span class="fa fa-database"></span>积分: <span>900.00</span></a></div></div></div>'),e.put("widget-ucheader-editor.html",'<div ng-controller="HeaderCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 页面名称</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.title" placeholder="微页面标题" class="form-control"></div></div><div class="form-group"><label class="control-label col-xs-3">背景图片</label><div class="col-xs-9"><span ng-click="addThumb(\'bgImage\')"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.bgImage"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.bgImage}}"> <em ng-click="activeItem.params.bgImage = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div></div></div><div class="form-group"><label class="col-xs-3 control-label">触发关键字</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.keyword" class="form-control"> <span class="help-block">用户触发关键字,系统回复此页面的图文链接</span></div></div><div class="form-group"><label class="control-label col-xs-3">封面</label><div class="col-xs-9"><span ng-click="addThumb(\'cover\')"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.cover"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.cover}}"> <em ng-click="activeItem.params.cover = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div><span class="help-block">用于用户触发关键字后,系统回复时的封面图片</span></div></div><div class="form-group"><label class="col-xs-3 control-label">页面描述</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.description" class="form-control"></div></div><div class="form-group"><label class="col-xs-3 control-label">联系方式</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.contact" class="form-control"> <span class="help-block">用于用户点击会员中心->设置->联系我们时拨打的电话</span></div></div><div class="shopNav-edit-header clearfix">个人中心扩展菜单</div><div class="shopNav-wx"><div class="card" ng-repeat="menu in activeMenus"><div class="btns"><a href="javascript:;" ng-click="removeMenu(menu)"><i class="fa fa-times"></i></a></div><div class="nav-region"><div class="first-nav"><div class="alert"><div class="form-group"><label class="control-label col-xs-3">标题</label><div class="col-xs-9"><input type="text" class="form-control" name="" value="" ng-model="menu.name"></div></div><div class="form-group"><label class="control-label col-xs-3">链接到</label><div class="col-xs-9"><input ng-if="menu.module_info" type="text" ng-model="menu.url" class="form-control" disabled><div ng-if="!menu.module_info" we7-linker we7-my-url="menu.url" we7-my-title="menu.name"></div></div></div><div class="form-group" ng-if="menu.module_info"><label class="control-label col-xs-3">是否显示</label><div class="col-xs-9"><label class="radio-inline"><input type="radio" value="1" ng-model="menu.status">显示</label><label class="radio-inline"><input type="radio" value="0" ng-model="menu.status">隐藏</label><span class="help-block"><strong class="text-danger">该菜单来源于{{menu.module_info.title}}模块,仅可设置标题和是否显示</strong></span></div></div></div></div></div></div><div class="add-shopNav text-center" ng-click="addMenu();">+添加一级导航</div></div></div></div></div></div></div>'),e.put("directive-pagelength-pagelength.html",'<div class="app-plength" ng-if="isLongPage"><div class="btn btn-default col-sm-3 app-plength-change" ng-class="{\'disabled\' : pageLength <= 1}" ng-style="{\'cursor\' : pageLength <= 1 ? \'not-allowed\' : \'pointer\'}" ng-click="changePageLength(\'minus\');"><span>-</span></div><div class="col-sm-6 app-plength-info"><div>页面长度(页):<span ng-bind="pageLength"></span></div></div><div class="btn btn-default col-sm-3 app-plength-change" ng-class="{\'disabled\' : pageLength >= 5}" ng-style="{\'cursor\' : pageLength >= 5 ? \'not-allowed\' : \'pointer\'}" ng-click="changePageLength(\'plus\');"><span>+</span></div></div>'),e.put("directive-style-style.html",'<div class="app-text-edit" ng-if="activeItem.id != \'header\' && activeItem.id != \'UCheader\'"><div class="inner"><div class="panel panel-default"><div class="panel-body"><ul class="nav nav-tabs"><li class="active"><a href="#attribute" role="tab" data-toggle="tab">属性</a></li><li><a href="#action" role="tab" data-toggle="tab">动作</a></li></ul><div class="tab-content"><div class="tab-pane active" id="attribute"><div class="panel-group" id="accordion"><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading-basic"><h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-basic" aria-expanded="true" aria-controls="collapse-basic">基础样式</a></h4></div><div id="collapse-basic" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-basic"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">背景颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.baseStyle.backgroundColor" we7-my-default-color="activeItem.params.baseStyle.backgroundColor"></div></div></div></div><div class="form-group" ng-show="activeItem.id == \'onlyText\' || activeItem.id == \'countDown\' || activeItem.id == \'line\'"><label class="col-xs-3 control-label" ng-show="activeItem.id == \'line\'">辅助线颜色</label><label class="col-xs-3 control-label" ng-show="activeItem.id != \'line\'">文字颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.baseStyle.color" we7-my-default-color="activeItem.params.baseStyle.color"></div></div></div></div><div class="form-group"><label class="col-xs-3 control-label">透明度</label><div class="col-xs-9"><input type="number" class="form-control" max="100" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.baseStyle.opacity"></div></div><div class="form-group" ng-show="activeItem.id == \'onlyText\' || activeItem.id == \'pureLink\' || activeItem.id == \'dial\' || activeItem.id == \'good\' || activeItem.id == \'countDown\' || activeItem.id == \'line\'"><label class="col-xs-3 control-label">上偏移</label><div class="col-xs-9"><input type="number" class="form-control" max="100" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.baseStyle.paddingTop"></div></div><div class="form-group" ng-if="activeItem.id == \'onlyText\'"><label class="control-label col-xs-3">行距</label><div class="col-xs-8"><div class="input-group"><select class="form-control" id="lineheight" ng-model="activeItem.params.baseStyle.lineHeight" ng-options="lhKey for (lhKey, lhVal) in lineHeights"></select><span class="input-group-addon">倍</span></div></div></div><div class="form-group" ng-show="activeItem.id == \'onlyText\' || activeItem.id == \'pureLink\' || activeItem.id == \'dial\' || activeItem.id == \'good\' || activeItem.id == \'countDown\'"><label class="control-label col-xs-3">字体大小</label><div class="col-xs-8"><div class="input-group"><select class="form-control" id="fontsize" ng-model="activeItem.params.baseStyle.fontSize" ng-options="fzKey for (fzKey, fzVal) in fontSizes"></select><span class="input-group-addon">px</span></div></div></div><div class="form-group" ng-show="isLongPage"><label class="col-xs-3 control-label">固定组件</label><div class="col-xs-9"><label class="checkbox-inline"><input type="checkbox" ng-click="changeLock()" ng-checked="activeItem.params.baseStyle.lock"> 固定组件只能在长页面中使用</label></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading-border"><h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-border" aria-expanded="true" aria-controls="collapse-border">边框样式</a></h4></div><div id="collapse-border" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-border"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">尺寸</label><div class="col-xs-9"><input type="number" class="form-control" max="20" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.borderStyle.borderWidth" ng-change="changeBorderWidth()"></div></div><div class="form-group"><label class="col-xs-3 control-label">弧度</label><div class="col-xs-9"><input type="number" class="form-control" max="29" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.borderStyle.borderRadius"></div></div><div class="form-group"><label class="col-xs-3 control-label">样式</label><div class="col-xs-9"><select name="" class="form-control" ng-model="activeItem.params.borderStyle.borderStyle"><option value="solid">直线</option><option value="dashed">破折线</option><option value="dotted">点状线</option><option value="double">双划线</option><option value="groove">3D凹槽</option><option value="ridge">3D垄状</option><option value="inset">3D内嵌</option><option value="outset">3D外嵌</option></select></div></div><div class="form-group"><label class="col-xs-3 control-label">颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.borderStyle.borderColor" we7-my-default-color="activeItem.params.borderStyle.borderColor"></div></div></div></div><div class="form-group"><label class="col-xs-3 control-label">旋转度</label><div class="col-xs-9"><input type="number" class="form-control" max="360" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.borderStyle.transform"></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading-shadow"><h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-shadow" aria-expanded="true" aria-controls="collapse-shadow">阴影样式</a></h4></div><div id="collapse-shadow" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-shadow"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">大小</label><div class="col-xs-9"><input type="number" class="form-control" max="20" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.shadowStyle.shadowSize"></div></div><div class="form-group"><label class="col-xs-3 control-label">模糊</label><div class="col-xs-9"><input type="number" class="form-control" max="20" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.shadowStyle.shadowBlur"></div></div><div class="form-group"><label class="col-xs-3 control-label">颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.shadowStyle.shadowColor" we7-my-default-color="activeItem.params.shadowStyle.shadowColor"></div></div></div></div><div class="form-group"><label class="col-xs-3 control-label">方向</label><div class="col-xs-9"><input type="number" class="form-control" max="359" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.shadowStyle.shadowDirection"></div></div></div></div></div></div><div><a class="btn btn-primary" ng-click="clearModuleStyle()">重置属性</a></div></div><div class="tab-pane" id="action"><div class="form-group"><label class="col-xs-3 control-label">速度</label><div class="col-xs-9"><div class="input-group"><input type="number" ng-model="activeItem.params.animationStyle.animationDuration" max="30" min="0" step="0.1" class="form-control"> <span class="input-group-btn"><button class="btn btn-default" type="reset">秒(S)</button></span></div></div></div><div class="form-group"><label class="col-xs-3 control-label">延迟</label><div class="col-xs-9"><div class="input-group"><input type="number" ng-model="activeItem.params.animationStyle.animationDelay" max="10" min="0" step="0.1" class="form-control"> <span class="input-group-btn"><button class="btn btn-default" type="reset">秒(S)</button></span></div></div></div><div class="clearfix icons"><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'noEffect\'}" ng-click="eleAnimationIns(\'noEffect\', $event)"><div class="icon no-effect"></div><div class="name">无效果</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInNormal\'}" ng-click="eleAnimationIns(\'fadeInNormal\', $event);"><div class="icon fade-in-normal"></div><div class="name">淡入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'rotateInDownLeft\'}" ng-click="eleAnimationIns(\'rotateInDownLeft\', $event);"><div class="icon rotate-in-down-left"></div><div class="name">从左滚入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'rotateInDownRight\'}" ng-click="eleAnimationIns(\'rotateInDownRight\', $event);"><div class="icon rotate-in-down-right"></div><div class="name">从右滚入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'zoomIn\'}" ng-click="eleAnimationIns(\'zoomIn\', $event);"><div class="icon zoom-in"></div><div class="name">放大</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'zoomInDown\'}" ng-click="eleAnimationIns(\'zoomInDown\', $event);"><div class="icon zoom-in-down"></div><div class="name">下落放大</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeIn\'}" ng-click="eleAnimationIns(\'fadeIn\', $event);"><div class="icon fade-in"></div><div class="name">弹性放大</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'expandOpen\'}" ng-click="eleAnimationIns(\'expandOpen\', $event);"><div class="icon expand-open"></div><div class="name">弹性缩小</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInRight\'}" ng-click="eleAnimationIns(\'fadeInRight\', $event);"><div class="icon fade-in-right"></div><div class="name">向右飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInLeft\'}" ng-click="eleAnimationIns(\'fadeInLeft\', $event);"><div class="icon fade-in-left"></div><div class="name">向左飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInUp\'}" ng-click="eleAnimationIns(\'fadeInUp\', $event);"><div class="icon fade-in-up"></div><div class="name">向上飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInDown\'}" ng-click="eleAnimationIns(\'fadeInDown\', $event);"><div class="icon fade-in-down"></div><div class="name">向下飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'rotateIn\'}" ng-click="eleAnimationIns(\'rotateIn\', $event);"><div class="icon rotate-in"></div><div class="name">旋转出现</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'flipInY\'}" ng-click="eleAnimationIns(\'flipInY\', $event);"><div class="icon flip-in-y"></div><div class="name">左右翻转</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'flipInX\'}" ng-click="eleAnimationIns(\'flipInX\', $event);"><div class="icon flip-in-x"></div><div class="name">上下翻转</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'lightSpeedIn\'}" ng-click="eleAnimationIns(\'lightSpeedIn\', $event);"><div class="icon light-speed-in"></div><div class="name">刹车</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideRight\'}" ng-click="eleAnimationIns(\'slideRight\', $event);"><div class="icon slide-right"></div><div class="name">向右滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideLeft\'}" ng-click="eleAnimationIns(\'slideLeft\', $event);"><div class="icon slide-left"></div><div class="name">向左滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideUp\'}" ng-click="eleAnimationIns(\'slideUp\', $event);"><div class="icon slide-up"></div><div class="name">向上滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideDown\'}" ng-click="eleAnimationIns(\'slideDown\', $event);"><div class="icon slide-down"></div><div class="name">向下滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'stretchRight\'}" ng-click="eleAnimationIns(\'stretchRight\', $event);"><div class="icon stretch-right"></div><div class="name">向右展开</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'stretchLeft\'}" ng-click="eleAnimationIns(\'stretchLeft\', $event);"><div class="icon stretch-left"></div><div class="name">向左展开</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'pullUp\'}" ng-click="eleAnimationIns(\'pullUp\', $event);"><div class="icon pull-up"></div><div class="name">向上展开</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'pullDown\'}" ng-click="eleAnimationIns(\'pullDown\', $event);"><div class="icon pull-down"></div><div class="name">向下展开</div></div></div></div></div></div></div></div></div>'),e.put("widget-adimg-display.html",'<div ng-controller="AdImgCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><link href="./resource/components/swiper/swiper.min.css" rel="stylesheet"><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-adImg" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="appstyle js-default-content" ng-if="module.params.items.length == 0"><img ng-show="module.params.listStyle == 1" src="./Common/resource/images/app/adImg-lg.jpg" width="100%"> <img ng-show="module.params.listStyle == 2" src="./Common/resource/images/app/adImg-separate.jpg" width="100%"></div><div class="swiper-container swiper-container-horizontal" ng-if="module.params.items.length != 0 && module.params.listStyle == 1"><div class="swiper-wrapper"><div class="swiper-slide" ng-class="{\'swiper-slide-active\' : $index == 0}" style="width: 100%" ng-repeat="item in module.params.items"><a href="{{item.url}}" style="display:block; width:100%; text-align:center"><img ng-src="{{item.imgurl}}" title="{{item.title}}" style="display:block; height:auto; max-width:100%; margin:0 auto"></a></div></div><div class="swiper-pagination swiper-pagination-clickable"><span class="swiper-pagination-bullet" ng-class="{\'swiper-pagination-bullet-active\': $index == 0}" ng-repeat="item in module.params.items"></span></div><div class="swiper-button-next hidden"></div><div class="swiper-button-prev hidden"></div></div><div class="show-separate" ng-if="module.params.items.length != 0 && module.params.listStyle == 2"><div class="ad-list lg" ng-if="module.params.sizeType == 1"><div class="ad-list-item" ng-repeat="item in module.params.items"><a href="{{item.url}}"><h3 ng-bind="item.title">广告标题</h3><img ng-src="{{item.imgurl}}"></a></div></div><div class="ad-list clearfix sm" ng-if="module.params.sizeType == 2"><div class="ad-list-item col-xs-6 col-sm-6" ng-repeat="item in module.params.items"><a href="{{item.url}}"><h3 ng-bind="item.title">广告标题</h3><img ng-src="{{item.imgurl}}"></a></div></div></div></div></div><div we7-drag></div></div></div>'),e.put("widget-adimg-editor.html",'<div ng-controller="AdImgCtrl"><div class="app-adImg-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="control-label col-xs-3">显示方式</label><div class="col-xs-9"><input type="radio" class="carousel-style" ng-model="activeItem.params.listStyle" value="1" ng-click="activeItem.params.sizeType=1;changeInnerHeight()" name="ad-show-style" id="list-style1"><label class="radio-inline" for="list-style1">折叠轮播</label><input type="radio" class="separate-style" ng-model="activeItem.params.listStyle" value="2" name="ad-show-style" ng-click="changeInnerHeight()" id="list-style2"><label class="radio-inline" for="list-style2">分开显示</label></div></div><div class="form-group"><label class="control-label col-xs-3">显示大小</label><div class="col-xs-9"><input type="radio" class="size-lg-style" ng-model="activeItem.params.sizeType" value="1" name="ad-size" ng-click="changeInnerHeight()" id="size-type1"><label class="radio-inline" for="size-type1">大图</label><input type="radio" class="size-sm-style" ng-model="activeItem.params.sizeType" value="2" name="ad-size" ng-click="changeInnerHeight()" id="size-type2"><label class="radio-inline" for="size-type2" ng-show="activeItem.params.listStyle == 2">小图</label></div></div><div class="add-adImg-item card clearfix" ng-repeat="item in activeItem.params.items"><div class="btns"><a href="#" ng-click="addEmpty()"><i class="fa fa-plus"></i></a> <a href="#" ng-click="removeItem(item)"><i class="fa fa-times"></i></a></div><div class="col-xs-3 img"><h3 ng-click="changeItem(item)">重新上传</h3><img src="" ng-src="{{ item.imgurl }}" width="100%"></div><div class="col-xs-9"><div class="form-group"><label class="control-label col-xs-3">标题</label><div class="col-xs-9"><input class="form-control" name="title" ng-model="item.title" value="" type="text"></div></div><div class="form-group"><label class="control-label col-xs-3">链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div></div></div><div class="add-adImg card" ng-click="addItem()"><a href="#"><i class="fa fa-plus-circle green"></i>添加一个广告</a></div></div></div></div></div></div>'),e.put("widget-audio-display.html",'<div ng-controller="AudioCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-audio" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div ng-if="module.params.style == \'1\'" id="audio-music-{{$index+0}}" data-reload="{{module.params.reload}}" class="wx audioLeft clearfix" data-src="{{module.params.audio.url}}" ng-class="{\'audioLeft\': module.params.align == \'left\', \'audioRight\': module.params.align == \'right\'}" style="width:100%;height:100%"><img ng-init="module.params.headimg = module.params.headimg ? module.params.headimg : \'./Common/resource/images/app/shop.png!80x80.jpg\'" ng-src="{{module.params.headimg}}" alt="语音头像" class="audioLogo" width="40" height="40"> <span class="audioBar js-play"><img style="display:none" ng-if="module.params.align == \'left\'" src="./Common/resource/images/app/player.gif" class="audioAnimation"> <img style="display:none" ng-if="module.params.align == \'right\'" src="./Common/resource/images/app/green_player.gif" class="audioAnimation"> <i class="audioStatic"></i> <span style="display:none" class="audioLoading"><i class="fa fa-spinner fa-pulse"></i></span></span> <span class="audioBar js-pause" style="display:none"><img ng-if="module.params.align == \'left\'" src="./Common/resource/images/app/player.gif" class="audioAnimation"> <img ng-if="module.params.align == \'right\'" src="./Common/resource/images/app/green_player.gif" class="audioAnimation"> <i class="audioStatic"></i></span> <span class="audio-time"></span><div class="js-audio-wx" data-id="audio-music-{{$index+0}}"></div></div><div class="music music-play" id="audio-music-{{$index+0}}" data-src="{{module.params.audio.url}}" data-reload="{{module.params.reload}}" data-loop="{{module.params.isloop}}" ng-if="module.params.style == \'2\'"><span class="audioStatic js-play"><a href="javascript:;"><i class="fa fa-play-circle-o"></i></a></span> <span class="audioAnimation js-pause" style="display:none"><a href="javascript:;"><i class="fa fa-pause"></i></a></span> <span class="musicTitle" ng-if="module.params.title == \'\'">歌名儿</span> <span class="musicTitle" ng-if="module.params.title != \'\'">{{module.params.title}}</span> <span class="audioLoading" style="display:none"><i class="fa fa-spinner fa-pulse"></i></span> <span class="audio-time" style="display:none"><span class="audio-current-time">00:00</span>/<span class="audio-duration">00:00</span></span><div class="slider-bar"><div class="slider-fill"></div></div><div class="js-audio-music" data-id="audio-music-{{$index+0}}"></div></div></div></div><div we7-drag></div></div></div>'),e.put("widget-audio-editor.html",'<div ng-controller="AudioCtrl"><div class="app-audio-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-2 control-label">音频</label><div class="col-xs-10"><span class="input-group-btn"><button type="button" class="btn btn-default audio-player-play" style="display:none"><i class="fa fa-play"></i></button> <button ng-click="addAudioItem()" type="button" class="btn btn-default">选择媒体文件</button></span></div></div><div class="form-group"><label class="col-xs-2 control-label">样式</label><div class="col-xs-10"><div class=""><input id="wx-music-type" type="radio" name="wx-music" value="1" ng-model="activeItem.params.style" ng-click="changeInnerHeight()"><label class="radio-inline" for="wx-music-type">模仿微信对话样式</label><div class="form-group" ng-show="activeItem.params.style == \'1\'"><label class="control-label col-xs-3">头像:</label><div class="col-xs-3" style="padding-top:10px"><img ng-init="activeItem.params.headimg = activeItem.params.headimg ? activeItem.params.headimg : \'./Common/resource/images/app/shop.png!80x80.jpg\'" ng-src="{{activeItem.params.headimg}}" alt="语音头像" width="62" height="62"></div><div class="help-block col-xs-6" style="padding-left:0;padding-top:10px"><a href="#" ng-click="addImgItem()">上传头像</a><br>建议尺寸80*80像素<br>如果不设置,默认将使用店铺logo</div></div><div class="form-group" ng-show="activeItem.params.style == \'1\'"><label class="control-label col-xs-3">气泡:</label><div class="col-xs-9"><input id="bubble-left" type="radio" name="bubble" value="left" ng-model="activeItem.params.align"><label class="radio-inline" for="bubble-left">居左</label><input id="bubble-right" type="radio" name="bubble" value="right" ng-model="activeItem.params.align"><label class="radio-inline" for="bubble-right">居右</label></div></div></div><div class=""><input id="simple-music-type" type="radio" name="wx-music" value="2" ng-model="activeItem.params.style" ng-click="changeInnerHeight()"><label class="radio-inline" for="simple-music-type">简易音乐播放器</label><div><div class="form-group" ng-show="activeItem.params.style == \'2\'"><label class="control-label col-xs-3">标题:</label><div class="col-xs-9"><input class="form-control" type="text" ng-model="activeItem.params.title"></div></div><div class="form-group" ng-show="activeItem.params.style == \'2\'"><label class="control-label col-xs-3">循环:</label><div class="col-xs-9"><label class="checkbox-inline"><input type="checkbox" ng-model="activeItem.params.isloop">开启循环播放</label></div></div></div></div></div></div><div class="form-group"><label class="col-xs-2 control-label">播放</label><div class="col-xs-10"><div><input id="play-type1" type="radio" name="play" ng-model="activeItem.params.reload" value="true"><label class="radio-inline" for="play-type1">暂停后再回复播放时,从头开始</label></div><div><input id="play-type2" type="radio" name="play" ng-model="activeItem.params.reload" value="false"><label class="radio-inline" for="play-type2">暂停后再回复播放时,从暂停位置开始</label></div></div></div></div></div></div></div></div>'),e.put("widget-countdown-display.html",'<div ng-controller="CountDownCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-countDown" style="width:100%;height:100%;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="timer" data="{{module.params.deadtime}}"><span class="day" ng-bind="module.params.leftTimeText.day"></span> <small style="vertical-align:middle;margin:3px">天</small> <span class="hours" ng-bind="module.params.leftTimeText.hour"></span> <small style="vertical-align:middle;margin:3px">时</small> <span class="minutes" ng-bind="module.params.leftTimeText.min"></span> <small style="vertical-align:middle;margin:3px">分</small> <span class="seconds" ng-bind="module.params.leftTimeText.sec"></span> <small style="vertical-align:middle;margin:3px">秒</small></div><script type="text/javascript">$(document).ready(function(){\r\n\t\t\t\t\tsetInterval(function(){\r\n\t\t\t\t\t\tvar timer = $(\'.timer\');\r\n\t\t\t\t\t\tfor (var i = 0; i < timer.length; i++) {\r\n\t\t\t\t\t\t\tvar dead = $(timer.get(i)).attr(\'data\');\r\n\t\t\t\t\t\t\tvar deadtime = dead.replace(/-/g,\'/\');\r\n\t\t\t\t\t\t\tdeadtime = new Date(deadtime).getTime();\r\n\t\t\t\t\t\t\tvar nowtime = Date.parse(Date());\r\n\t\t\t\t\t\t\tvar diff = deadtime - nowtime > 0 ? deadtime - nowtime : 0;\r\n\t\t\t\t\t\t\tvar res = {};\r\n\t\t\t\t\t\t\tres.day = parseInt(diff / (24 * 60 * 60 * 1000));\r\n\t\t\t\t\t\t\tres.hour = parseInt(diff / (60 * 60 * 1000) % 24);\r\n\t\t\t\t\t\t\tres.min = parseInt(diff / (60 * 1000) % 60);\r\n\t\t\t\t\t\t\tres.sec = parseInt(diff / 1000 % 60);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .day\').text(res.day);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .hours\').text(res.hour);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .minutes\').text(res.min);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .seconds\').text(res.sec);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}, 1000);\r\n\t\t\t\t});<\/script></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-countdown-editor.html",'<div ng-controller="CountDownCtrl"><div class="app-countDown-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">倒计时截止时</label><div class="col-xs-6"><input type="text" class="form-control" ng-model="activeItem.params.deadtimeToMin" disabled></div><div class="col-xs-3 form-control-static"><span class="date"><a href="javascript:;" we7-date-picker we7-date-value="activeItem.params.deadtime">日期</a></span></div></div></div></div></div></div></div>'),e.put("widget-cube-display.html",'<div ng-controller="CubeCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-cube" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><table><tr ng-repeat="row in module.params.layout" ng-init="rowindex=$index"><td ng-init="colindex=$index" ng-repeat="col in row" class="{{col.classname}} rows-{{col.rows}} cols-{{col.cols}}" ng-class="{\'empty\' : col.isempty, \'not-empty\' : !col.isempty}" rowspan="{{col.rows}}" colspan="{{col.cols}}"><div ng-if="!col.isempty && col.imgurl"><a href="{{col.url}}"><img ng-src="{{col.imgurl}}" width="{{col.cols * 60}}" height="{{col.rows * 60}}"></a></div></td></tr></table></div></div><div we7-drag></div></div></div>'),e.put("widget-cube-editor.html",'<div ng-controller="CubeCtrl"><div class="app-cube-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label">布局</label><div class="col-xs-9"><table id="cube-editor"><tr ng-repeat="(x, row) in activeItem.params.layout"><td ng-repeat="(y, col) in row" class="{{col.classname}} rows-{{col.rows}} cols-{{col.cols}}" ng-click="col[\'isempty\'] ? showSelection(x, y) : changeItem(x, y)" ng-class="{\'empty\' : col.isempty, \'not-empty\' : !col.isempty}" rowspan="{{col.rows}}" colspan="{{col.cols}}" x="{{x}}" y="{{y}}"><div ng-if="col.isempty">+</div><div ng-if="!col.imgurl && !col.isempty">{{col.cols * 160}} * {{col.rows * 160}}</div><div ng-if="!col.isempty && col.imgurl"><img ng-src="{{col.imgurl}}" width="{{col.cols * 60}}" height="{{col.rows * 60}}"></div></td></tr></table><span class="help-block">点击"+",添加内容</span><img ng-src="{{col.imgurl}}" width="{{col.cols * 60}}" height="{{col.cols * 60}}"></div></div><div ng-show="activeItem.params.currentLayout.isempty == false" class="add-cube-item card clearfix"><div class="btns"><a href="#" ng-click="removeItem()"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span>选择图片</label><div class="col-xs-9"><div style="width:50px; height:50px; overflow:hidden; float:left; margin-right:10px"><img ng-src="{{activeItem.params.currentLayout.imgurl}}" id="thumb" width="100%"></div><span ng-click="addItem()"><i class="fa fa-plus-circle green"></i>&nbsp;添加图片</span> <span class="help-block">建议尺寸:{{activeItem.params.currentLayout.cols * 160}} * {{activeItem.params.currentLayout.rows * 160}} 像素</span></div></div><div class="form-group"><label class="control-label col-xs-3">链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="activeItem.params.currentLayout.url" we7-my-title="activeItem.params.currentLayout.title"></div></div></div></div></div></div></div></div><div id="modal-cube-layout" class="modal fade in" role="dialog" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h3>选择布局</h3></div><div class="modal-body text-center"><div class="layout-table"><ul class="layout-cols layout-rows-{{col.rows}} clearfix" ng-repeat="row in activeItem.params.selection"><li data-cols="{{col.cols}}" data-rows="{{col.rows}}" ng-click="selectLayout(activeItem.params.currentPos.row, activeItem.params.currentPos.col, col.rows, col.cols)" ng-repeat="col in row"></li></ul></div></div></div></div></div></div>'),e.put("widget-dial-display.html",'<div ng-controller="DialCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-dial" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div ng-repeat="item in module.params.items" ng-if="item.active" style="width:100%;height:100%"><div class="app-dialphone animated" ng-if="item.type==\'text\'" style="width:100%;height:100%"><a ng-href="tel:{{item.tel}}" class="element-link"><div class="element-box" ng-bind="item.title" ng-style="{\'line-height\' : module.params.baseStyle.lineHeight, \'color\' : item.color}"></div></a></div><div ng-if="item.type==\'img\'" style="width:100%;height:100%"><a ng-href="tel:{{item.tel}}" class="element-link" style="width:100%"><img ng-src="{{item.imgurl}}" style="width:100%;height:100%" alt=""></a></div></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-dial-editor.html",'<div ng-controller="DialCtrl"><div class="app-dial-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><ul class="nav nav-pills nav-justified"><li ng-class="{active : item.active}" ng-repeat="item in activeItem.params.items"><a ng-href="#{{item.id}}" role="tab" data-toggle="tab" ng-click="changeItem(item);"><button ng-class="{\'btn\' : 1,\'btn-danger\' : item.editcolor==\'danger\', \'btn-warning\' : item.editcolor==\'warning\', \'btn-success\' : item.editcolor==\'success\', \'btn-default\' : item.editcolor==\'default\', \'btn-primary\' : item.editcolor==\'primary\'}"><span ng-if="item.type==\'img\'" class="fa fa-picture-o"></span> <span ng-if="item.id==\'1\'">一键拨号</span> <span ng-if="item.id==\'2\'">热线电话</span> <span ng-if="item.id==\'3\'">拨打电话</span> <span ng-if="item.id==\'4\'">销售专线</span> <span ng-if="item.id==\'5\'">自定义</span></button></a></li></ul><hr><div class="tab-content"><div class="tab-pane active" id="{{item.id}}" ng-repeat="item in activeItem.params.items" ng-if="item.active"><div class="form-group" ng-if="item.type==\'text\'"><label class="col-xs-3 control-label">按钮名称</label><div class="col-xs-9"><input type="text" class="form-control" ng-model="item.title"></div></div><div class="form-group" ng-if="item.type==\'img\'"><label class="col-xs-3 control-label">按钮图片</label><div class="col-xs-9"><div class="img-container"><img ng-src="{{item.imgurl}}" alt=""> <span class="change-img" ng-click="addImage(item);"><span ng-show="item.imgurl">更换</span><span ng-show="!item.imgurl">添加</span>图片</span></div></div></div><div class="form-group"><label class="col-xs-3 control-label">手机/电话</label><div class="col-xs-9"><input type="text" class="form-control" ng-model="item.tel" placeholder="010-8888888"></div></div></div></div></div></div></div></div></div>'),e.put("widget-good-display.html",'<div ng-controller="GoodCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-good" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="element app-good-up" ng-if="module.params.layoutstyle==\'1\'"><div class="counter-container" ng-style="{\'width\': \'100%\', \'height\': \'100%\', \'line-height\' : module.params.baseStyle.lineHeight, \'overflow\' : \'hidden\'}"><i class="fa fa-thumbs-o-up"></i> <span class="counter-num">0</span></div></div><div class="element app-good-up" ng-if="module.params.layoutstyle==\'2\'"><div class="counter-container counter-vertical" style="width:100%; height:100%; line-height:normal;overflow:hidden"><i class="fa fa-thumbs-o-up"></i> <span class="counter-num">0</span></div></div><script type="text/javascript">$(document).ready(function() {\r\n\t\t\t\t\tvar patt = new RegExp(\'c=home&a=page\');\r\n\t\t\t\t\tif (patt.exec(window.location.href)) {\r\n'+"\t\t\t\t\t\t$.post(window.location.href, {'do' : 'getnum'}, function(data) {\r\n\t\t\t\t\t\t\tif (data.message.errno == 0) {\r\n\t\t\t\t\t\t\t\t$('.counter-num').text(data.message.message.goodnum);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 'json');\r\n\t\t\t\t\t\t$(\".app-good .element\").click(function() {\r\n\t\t\t\t\t\t\tvar id=GetQueryString(\"id\");\r\n\t\t\t\t\t\t\tif(id !=null && id.toString().length>=1 && localStorage.havegood != id){\r\n\t\t\t\t\t\t\t\t$.post(window.location.href, {'do': 'addnum'}, function(data) {\r\n\t\t\t\t\t\t\t\t\tif (data.message.errno == 0) {\r\n\t\t\t\t\t\t\t\t\t\tvar now = $('.counter-num').text();\r\n\t\t\t\t\t\t\t\t\t\tnow = parseInt(now)+1;\r\n\t\t\t\t\t\t\t\t\t\t$('.counter-num').text(now);\r\n\t\t\t\t\t\t\t\t\t\tlocalStorage.havegood = id;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}, 'json');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tfunction GetQueryString(name){\r\n\t\t\t\t\t\t\tvar reg = new RegExp(\"(^|&)\"+ name +\"=([^&]*)(&|$)\");\r\n\t\t\t\t\t\t\tvar r = window.location.search.substr(1).match(reg);\r\n\t\t\t\t\t\t\tif(r!=null)return unescape(r[2]); return null;\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t};\r\n\t\t\t\t});<\/script></div><div we7-drag we7-resize we7-rotate></div></div></div>"),e.put("widget-good-editor.html",'<div ng-controller="GoodCtrl"><div class="app-good-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">颜色</label><div class="col-xs-9"><div we7-colorpicker we7-my-color="activeItem.params.baseStyle.color" we7-my-default-color="activeItem.params.baseStyle.color"></div></div></div><div class="form-group"><label class="col-xs-3 control-label">布局</label><div class="col-xs-9"><div class="btn-group"><div ng-class="{\'btn\' : \'1\', \'active\' : activeItem.params.layoutactive==\'lr\',\'btn-default\' : activeItem.params.layoutstyle != \'1\',\'btn-primary\' : activeItem.params.layoutstyle==\'1\'}" ng-click="changeLayout(\'lr\')">左右</div><div ng-class="{\'btn\' : \'1\', \'active\' : activeItem.params.layoutactive==\'ud\',\'btn-default\' : activeItem.params.layoutstyle != \'2\',\'btn-primary\' : activeItem.params.layoutstyle==\'2\'}" ng-click="changeLayout(\'ud\')">上下</div></div></div></div></div></div></div></div></div>'),e.put("widget-header-display.html",'<div ng-controller="HeaderCtrl" we7-nobar><div class="title js-default-content"><h1><span>{{module.params.title}}</span></h1></div></div>'),e.put("widget-header-editor.html",'<div ng-controller="HeaderCtrl" ng-if="activePageIndex == 0"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 页面名称</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.title" placeholder="微页面标题" class="form-control"></div></div><div class="form-group"><label class="col-xs-3 control-label">页面描述</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.description" placeholder="用户通过微信分享给朋友时,会自动显示页面描述" class="form-control"></div></div><div class="form-group"><label class="col-xs-3 control-label">触发关键字</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.keyword" class="form-control"> <span class="help-block">用户触发关键字,系统回复此页面的图文链接.不支持多关键字</span></div></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span>封面</label><div class="col-xs-9"><span ng-click="addThumb(\'thumb\')"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.thumb"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.thumb}}"> <em ng-click="activeItem.params.thumb = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div><span class="help-block">用于用户触发关键字后,系统回复时的封面图片</span></div></div><div class="form-group"><label class="control-label col-xs-3">快捷菜单</label><div class="col-xs-9" style="margin-top:7px"><input type="checkbox" class="from-control" ng-click="ifCheck()" ng-checked="activeItem.params.bottom_menu"> <span>是否在本专题页面中显示微站快捷菜单</span></div></div></div></div></div></div></div>'),e.put("widget-image-display.html",'<div ng-controller="ImageCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-image" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><img style="width:100%;height:100%" ng-src="{{module.params.items.imgurl}}" alt=""></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-image-editor.html",'<div ng-controller="ImageCtrl"><div class="app-image-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="add-image-item card clearfix" ng-show="activeItem.params.items.imgurl"><div class="col-xs-3 img"><h3 ng-click="changeItem(activeItem.params.items)">重新上传</h3><img ng-src="{{ activeItem.params.items.imgurl }}" width="100%"></div></div><div class="add-image-editor card" ng-click="addItem()" ng-hide="activeItem.params.items.imgurl"><a href="#"><i class="fa fa-plus-circle green"></i>添加一个图片</a></div></div></div></div></div></div>'),e.put("widget-line-display.html",'<div ng-controller="LineCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-line" style="width:100%;height:100%;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><hr style="border-top-color:{{module.params.baseStyle.color}}"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-line-editor.html",'<div ng-controller="LineCtrl"><div class="app-line-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body">辅助线(请于左侧拖动缩放调整)</div></div></div></div></div>'),e.put("widget-link-display.html",'<div ng-controller="LinkCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div class="container-link" style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-link js-default-content" ng-if="module.params.items.length == 0" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="list-group"><div class="list-group-item"><a class="clearfix" href="javascript:;"><span class="app-nav-title">点此编辑第1条『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a class="clearfix" href="javascript:;"><span class="app-nav-title">点此编辑第2条『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a class="clearfix" href="javascript:;"><span class="app-nav-title">点此编辑第n条『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div></div></div></div><div ng-if="module.params.items.length != 0"><div class="app-link" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.params.animate}}"><div class="inner"><div class="list-group"><div ng-repeat="item in module.params.items"><div ng-if="item.type == \'1\' && (item.selectCate.pid > 0 || item.selectCate.cid > 0)"><div class="list-group-item" ng-repeat="i in pageSize | limitTo:item.pageSize"><a class="clearfix" href="javascript:;"><span class="app-nav-title">第{{$index+1}}条 {{item.selectCate.name}} 的『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div></div><div class="list-group-item" ng-if="item.type == \'2\'"><a class="clearfix" href="{{item.url}}"><span class="app-nav-title">{{item.title}} <i class="pull-right fa fa-angle-right"></i></span></a></div></div></div></div></div></div><div we7-drag></div></div></div>'),e.put("widget-link-editor.html",'<div ng-controller="LinkCtrl"><div class="app-textNav-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="card add-textNav-con" ng-repeat="item in activeItem.params.items"><div class="btns"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus"></i></a> <a href="javascript:" ng-click="removeItem(item)"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span> 数据来源</label><div class="col-xs-9"><input id="source-type1" type="radio" value="1" ng-model="item.type" name="link-type-{{$index+0}}" ng-click="changeInnerHeight()"><label class="radio-inline" for="source-type1">分类</label><input id="source-type2" type="radio" value="2" ng-model="item.type" name="link-type-{{$index+0}}" ng-click="changeInnerHeight()"><label class="radio-inline" for="source-type2">自定义</label></div></div><div class="form-group" ng-show="item.type == 2"><label class="control-label col-xs-3"><span class="red">*</span> 导航名称</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-class="{\'red\': item.title == \'\'}" ng-model="item.title"></div></div><div class="form-group" ng-show="item.type == 2"><label class="control-label col-xs-3"><span class="red">*</span> 链接到</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div><div class="form-group" ng-show="item.type == 1"><label class="control-label col-xs-3"><span class="red">*</span>内容来源</label><div class="col-xs-9"><div class="input-group"><div class="form-control-static"><label ng-if="item.selectCate.id != 0" class="label label-success">{{item.selectCate.name}}</label><a href="javascript:;" ng-click="showSearchCateList(item)"><span ng-if="item.selectCate.id == 0">从分类中选择</span><span ng-if="item.selectCate.id != 0">修改</span></a></div></div></div></div><div class="form-group" ng-show="item.type == 1"><label class="control-label col-xs-3">文章属性</label><div class="col-xs-9"><input id="article-attr-type1" type="checkbox" ng-model="item.isnew" value="1" name="attribute"><label class="checkbox-inline" for="article-attr-type1">最新</label><input id="article-attr-type2" type="checkbox" ng-model="item.iscommend" value="1" name="attribute"><label class="checkbox-inline" for="article-attr-type2">推荐</label><input id="article-attr-type3" type="checkbox" ng-model="item.ishot" value="1" name="attribute"><label class="checkbox-inline" for="article-attr-type3">头条</label></div></div><div class="form-group" ng-show="item.type == 1"><label class="control-label col-xs-3">显示条数</label><div class="col-xs-9"><select class="form-control" ng-model="item.pageSize" ng-change="changePageSize(item)"><option value="1">1条</option><option value="2">2条</option><option value="3">3条</option><option value="4">4条</option><option value="5">5条</option><option value="10">10条</option><option value="15">15条</option><option value="20">20条</option><option value="30">30条</option></select></div></div></div><div class="add-textNav card"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus-circle green"></i> 添加一个导航</a></div></div></div></div></div><div id="modal-search-cate-link" class="modal fade in" role="dialog" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>选择分类</h3></div><div class="modal-body"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:60%">标题</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control js-search-cate-keyword"> <span class="input-group-btn"><button ng-click="showSearchCateList(currentItem)" class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody ng-repeat="pcate in searchCateList"><tr><td><a href="#">{{pcate.name}}</a></td><td class="text-right"><a class="btn btn-default btn-sm" ng-click="selectCateItem(pcate.id, 0, pcate.name)">选取</a></td></tr><tr ng-repeat="ccate in pcate.children track by $index"><td style="padding-left:50px;height:30px;line-height:30px;background-image:url(\'./Common/resource/images/bg_repno.gif\'); background-repeat:no-repeat; background-position: -245px -540px"><a href="#">{{ccate.name}}</a></td><td class="text-right"><a class="btn btn-default btn-sm" ng-click="selectCateItem(0, ccate.id, ccate.name)">选取</a></td></tr></tbody></table></div></div></div></div></div>'),e.put("widget-navimg-display.html",'<div ng-controller="NavImgCtrl" style="{{module.positionStyle}}min-height:90px;transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-navImg" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner" style="height:100%"><ul class="clearfix" style="height:100%"><li ng-repeat="item in module.params.items" style="height:100%"><a href="{{item.url}}" style="height:100%;width:100%"><span class="nav-img" style="height:80%;width:100%" ng-if="item.imgurl"><img ng-src="{{item.imgurl}}" style="height:100%;width:95%"></span> <span class="title" title="{{item.title}}" style="height:20%;width:100%;line-height:100%">{{item.title}}</span></a></li></ul></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-navimg-editor.html",'<div ng-controller="NavImgCtrl"><div class="app-nav-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div ng-repeat="item in activeItem.params.items"><div class="card nav-item clearfix"><div class="col-xs-3 img" ng-if="item.imgurl == \'\'"><span ng-click="changeItem(item)"><i class="fa fa-plus-circle green"></i>&nbsp;添加图片</span></div><div class="col-xs-3 img" ng-if="item.imgurl != \'\'"><h3 ng-click="changeItem(item)">重新上传</h3><img ng-src="{{ item.imgurl }}"></div><div class="col-xs-9"><div class="form-group"><label class="control-label col-xs-3">文字</label><div class="col-xs-9"><input name="title" ng-model="item.title" class="form-control" typel="text" placeholder="文字"></div></div><div class="form-group"><label class="control-label col-xs-3">链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div></div></div></div></div></div></div></div></div>'),e.put("widget-notice-display.html",'<div ng-controller="NoticeCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-notice" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="notice-box"><div class="scrollNotice"><span class="js-scroll-notice">公告: {{module.params.notice || \'请填写内容,如果过长,将会在手机上滚动显示!\'}}</span></div></div></div></div><div we7-drag></div></div></div>'),e.put("widget-notice-editor.html",'<div ng-controller="NoticeCtrl"><div class="app-notice-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group" style="margin-bottom:0"><label class="col-xs-2 control-label">公告</label><div class="col-xs-10"><input type="text" ng-model="activeItem.params.notice" value="" class="form-control" placeholder="请填写内容,如果过长,将会在手机上滚动显示"></div></div></div></div></div></div></div>'),e.put("widget-onlytext-display.html",'<div ng-controller="OnlyTextCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-onlyText" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="element" ng-bind="module.params.title" style="overflow:hidden"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-onlytext-editor.html","<div ng-controller=\"OnlyTextCtrl\"><div class=\"app-onlyText-edit\"><div class=\"arrow-left\"></div><div class=\"inner\"><div class=\"panel panel-default\"><div class=\"panel-body\"><div class=\"form-group\"><label class=\"control-label col-xs-3\">文字</label><div class=\"col-xs-6\"><input ng-model=\"activeItem.params.title\" class=\"form-control\"></div></div><div class=\"form-group\"><label class=\"col-xs-3 control-label\">位置</label><div class=\"col-xs-9\"><div class=\"btn-group\"><div ng-class=\"{'btn' : '1', 'btn-default' : '1', 'active' : activeItem.params.baseStyle.textAlign == 'left', 'btn-primary' : activeItem.params.baseStyle.textAlign == 'left'}\" ng-click=\"changeTextAlign('left')\">左</div><div ng-class=\"{'btn' : '1', 'btn-default' : '1', 'active' : activeItem.params.baseStyle.textAlign == 'center', 'btn-primary' : activeItem.params.baseStyle.textAlign == 'center'}\" ng-click=\"changeTextAlign('center')\">中</div><div ng-class=\"{'btn' : '1', 'btn-default' : '1', 'active' : activeItem.params.baseStyle.textAlign == 'right', 'btn-primary' : activeItem.params.baseStyle.textAlign == 'right'}\" ng-click=\"changeTextAlign('right')\">右</div></div></div></div></div></div></div></div></div>"),e.put("widget-purelink-display.html",'<div ng-controller="PureLinkCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-pureLink" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div ng-repeat="item in module.params.items" ng-if="item.active" style="width:100%;height:100%"><div class="app-pureLink-basic animated" ng-if="item.type==\'text\'" style="width:100%;height:100%"><a ng-href="{{item.url}}" class="element-link"><div class="element-box" ng-bind="item.title" ng-style="{\'line-height\' : module.params.baseStyle.lineHeight, \'color\' : item.color}"></div></a></div><div ng-if="item.type==\'img\'" style="width:100%;height:100%"><a ng-href="{{item.url}}" class="element-link"><img ng-src="{{item.imgurl}}" style="width:100%;height:100%" alt=""></a></div></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-purelink-editor.html",'<div ng-controller="PureLinkCtrl"><div class="app-pureLink-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><ul class="nav nav-pills nav-justified"><li ng-class="{active : item.active}" ng-repeat="item in activeItem.params.items"><a ng-href="#{{item.id}}" role="tab" data-toggle="tab" ng-click="changeItem(item);"><button ng-class="{\'btn\' : 1,\'btn-danger\' : item.editcolor==\'danger\', \'btn-warning\' : item.editcolor==\'warning\', \'btn-success\' : item.editcolor==\'success\', \'btn-default\' : item.editcolor==\'default\', \'btn-primary\' : item.editcolor==\'primary\'}"><span ng-if="item.type==\'img\'" class="fa fa-picture-o"></span><span ng-if="item.id==\'1\'">点我购买</span><span ng-if="item.id==\'2\'">点开链接</span><span ng-if="item.id==\'3\'">马上购买</span><span ng-if="item.id==\'4\'">关注我们</span><span ng-if="item.id==\'5\'">自定义</span></button></a></li></ul><hr><div class="tab-content"><div class="tab-pane active" id="{{item.id}}" ng-repeat="item in activeItem.params.items" ng-show="item.active"><div class="form-group" ng-show="item.type==\'text\'"><label class="col-xs-3 control-label">按钮名称</label><div class="col-xs-9"><input type="text" class="form-control" ng-model="item.title"></div></div><div class="form-group" ng-show="item.type==\'img\'"><label class="col-xs-3 control-label">按钮图片</label><div class="col-xs-9"><div class="img-container"><img ng-src="{{item.imgurl}}" alt=""> <span class="change-img" ng-click="addImage(item);"><span ng-show="item.imgurl">更换</span><span ng-show="!item.imgurl">添加</span>图片</span></div></div></div><div class="form-group"><label class="col-xs-3 control-label">网站地址</label><div class="col-xs-6"><input type="text" ng-model="item.url" class="form-control" placeholder="http://example.com"></div><div class="col-xs-3 form-control-static"><a href="http://dwz.cn/" target="_blank">生成短链接</a></div></div></div></div></div></div></div></div></div>'),e.put("widget-reward-display.html","<div ng-controller=\"RewardCtrl\" style=\"{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)\" we7-context-menu><div style=\"{{module.transform}}width:100%;height:100%\" ng-class=\"{'alock' : module.params.baseStyle.lock}\"><div class=\"app-reward\" style=\"width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}\"><div class=\"element\" ng-style=\"{'width': '100%', 'height': '100%', 'line-height' : module.params.baseStyle.lineHeight}\"><a style=\"width:100%;height:100%;display:block;color:inherit\" href=\"{:Url('home/page', array('do' => 'reward', 'id' => $id))}\">打赏</a></div></div><div we7-drag we7-resize we7-rotate></div></div></div>"),e.put("widget-reward-editor.html","<div ng-controller=\"RewardCtrl\"><div class=\"app-reward-edit\"><div class=\"arrow-left\"></div><div class=\"inner\"><div class=\"panel panel-default\"><div class=\"panel-body\"><div class=\"form-group\"><label class=\"col-xs-3 control-label\">文字颜色</label><div class=\"col-xs-9\" ng-my-colorpicker ng-my-color=\"activeItem.params.baseStyle.color\" ng-my-default-color=\"activeItem.params.baseStyle.color\"></div></div><div class=\"form-group\"><label class=\"col-xs-3 control-label\">字号</label><div class=\"col-xs-9\"><div class=\"btn-group\" data-toggle=\"buttons\"><div ng-class=\"{'btn' : '1', 'active' : activeItem.params.fontactive=='big','btn-default' : activeItem.params.fonttype != 'big','btn-primary' : activeItem.params.fonttype=='big'}\" ng-click=\"changeSize('big')\">大</div><div ng-class=\"{'btn' : '1', 'active' : activeItem.params.fontactive=='middle','btn-default' : activeItem.params.fonttype != 'middle','btn-primary' : activeItem.params.fonttype=='middle'}\" ng-click=\"changeSize('middle')\">中</div><div ng-class=\"{'btn' : '1', 'active' : activeItem.params.fontactive=='small','btn-default' : activeItem.params.fonttype != 'small','btn-primary' : activeItem.params.fonttype=='small'}\" ng-click=\"changeSize('small')\">小</div></div></div></div></div></div></div></div></div>"),e.put("widget-richtext-display.html",'<div ng-controller="RichTextCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-richText" style="width:100%;height:100%;word-break:break-all;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner" ng-style="{\'padding\' : module.params.isfull ? \'0\' : \'10px\'}" ng-bind-html="trustAsHtml(module.params.content, module.params.params)" ng-if="module.params.content || module.params.params"></div><div class="inner js-default-content" ng-if="!module.params.content && !module.params.params"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-richtext-editor.html",'<div ng-controller="RichTextCtrl"><div class="app-richText-edit"><div class="arrow-left"></div><div class="app-header-setting-new-inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label">是否全屏</label><div class="col-xs-9"><label for="fullScreen" class="checkbox-inline"><input id="fullScreen" name="fullScreen" type="checkbox" ng-model="activeItem.params.isfull">全屏显示</label></div></div><div class="form-group"><div class="col-xs-12"><div we7-editor we7-my-value="activeItem.params.content" we7-my-params="activeItem.params.params"></div></div></div></div></div></div></div></div>'),e.put("widget-shape-display.html",'<div ng-controller="ShapeCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-shape" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div style="width:100%;height:100%" class="element" we7-svger we7-svg="module.params.svgValue"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-shape-editor.html",'<div ng-controller="ShapeCtrl"><div class="app-shape-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="shape-editor"><a href="javascript:;" ng-click="addItem()" ng-if="!activeItem.params.svgValue"><i class="fa fa-plus-circle green"></i> &nbsp;填充形状</a> <a href="javascript:;" ng-click="addItem()" ng-if="activeItem.params.svgValue"><i class="fa fa-plus-circle green"></i> &nbsp;修改形状</a></div><div id="shapeModal" class="modal fade" role="dialog" aria-labelledby="gridSystemModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="gridSystemModalLabel">形状库<span class="action">矢量素材,可更换颜色,放大不失真</span></h4></div><div class="dialog-content bg_console sound-flex clearfix"><div class="cate-title"><ul class="nav tabs-left"><li><a href="javascript:;" data-toggle="tab">形状库</a></li></ul></div><div class="cate-list bg-rig"><div id="bg_contain"><div class="tab-pane tab-head"><div class="img_list"><div class="category_list clearfix"><ul class="category_list_container clearfix"><li class="category_item" ng-class="{\'active\' : sysCategory.active}" ng-repeat="sysCategory in sysCategoryList" ng-click="getSysCatAndList(sysCategory)" ng-bind="sysCategory.name"></li></ul></div><div class="cat_two_list"><ul ng-repeat="sysCategory in sysCategoryList" ng-if="sysCategory.active"><li class="cat_two_item" ng-class="{\'active\': sysTag.active}" ng-if="sysCategory.id == sysTag.parentid" ng-repeat="sysTag in sysImageTag" ng-click="getSysImgByTag(sysTag);" ng-bind="sysTag.name"></li></ul></div></div></div><div class="img_list"><div class="img_list_container photo_list"><ul class="img_box" style="height:348px"><li ng-if="img.parentid == activeItem.params.imgListActive" ng-repeat="img in currentImageList" style="width: 100px; height: 100px;cursor:pointer; position: relative; display: inline-block; background:50% 50% / contain no-repeat rgb(230, 235, 237)" ng-style="{backgroundImage: \'url(\' + img.imgurl + \')\'}" data-url="{{img.imgurl}}" ng-click="selectSvg($event,img)"></li></ul></div></div></div></div><div class="modal-footer bg-pagination"><div class="fl mr20" ng-show="page.numPages > 1"><ul class="pagination" style="float: left"><li><a href="" ng-click="selectPage(1)">首页</a></li><li><a href="" ng-click="selectPage(page.currentPage - 1)">‹</a></li><li ng-repeat="p in pages track by $index" ng-class="{active: p.active}"><a href="javascript:;" ng-click="selectPage(p.number)" ng-bind="p.number"></a></li><li><a href="" ng-click="selectPage(page.currentPage + 1)">›</a></li><li><a href="" ng-click="selectPage(page.numPages)">尾页</a></li></ul><div class="current_page"><span class="fl">到</span> <input type="text" ng-model="page.toPage" ng-keyup="$event.keyCode == 13 ? getImgByPage() : null"> <span class="fl">页</span> <a ng-click="getImgByPage()" class="go">确定</a></div></div><a class="modal-cancle" ng-click="cancel()">取消</a> <a class="btn btn-primary" ng-click="confirm();">确定</a></div></div></div></div></div></div></div></div></div></div>'),e.put("widget-textnav-display.html",'<div ng-controller="TextNavCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-textNav" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="list-group mnav-box"><div class="list-group-item" ng-repeat="item in module.params.items" ng-style="{\'background-color\': module.params.baseStyle.backgroundColor}"><a class="clearfix" href="{{item.url}}"><span class="app-nav-title">{{item.title}}<i class="pull-right fa fa-angle-right"></i></span></a></div></div></div></div><div we7-drag></div></div></div>'),e.put("widget-textnav-editor.html",'<div ng-controller="TextNavCtrl"><div class="app-textNav-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="card add-textNav-con" ng-repeat="item in activeItem.params.items"><div class="btns"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus"></i></a> <a href="javascript:" ng-click="removeItem(item)"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span> 导航名称</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-class="{\'red\': item.title == \'\'}" ng-model="item.title" value=""></div></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span> 链接到</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div></div><div class="add-textNav card"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus-circle green"></i> 添加一个文本导航</a></div></div></div></div></div></div>'),e.put("widget-title-display.html",'<div ng-controller="TitleCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-title" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner" style="height:96px"><div ng-if="module.params.template == 1" class="title-detail tradition" style="text-align: {{module.params.tradition.align}}"><h2 class="title-con">{{ module.params.title || "点击编辑『标题』"}}<span ng-if="module.params.tradition.nav.enable == 1" class="title-link">- <a href="{{module.params.tradition.nav.url}}" ng-bind="module.params.tradition.nav.title">文本导航</a></span></h2><p class="sub-title" ng-bind="module.params.tradition.subtitle">副标题</p></div><div ng-if="module.params.template == 2" class="title-detail text-left wx"><h2 class="title-con">{{ module.params.title || "点击编辑『标题』"}}</h2><p class="sub-title"><span class="date" ng-bind="module.params.news.date">2015-03-12</span>&nbsp;&nbsp;<span class="author" ng-bind="module.params.news.author">zhangsan</span>&nbsp;&nbsp;<span><a href="{{module.params.news.url}}" ng-bind="module.params.news.title">微擎团队</a></span></p></div></div></div><div we7-drag></div></div></div>'),e.put("widget-title-editor.html",'<div ng-controller="TitleCtrl"><div class="app-title-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 标题名</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.title" value=""></div></div><div class="form-group"><label class="control-label col-xs-3">标题模板</label><div class="col-xs-9"><input type="radio" name="title-style" ng-model="activeItem.params.template" value="1" class="tradition" id="template-type1"><label class="radio-inline" for="template-type1">传统样式</label><input type="radio" name="title-style" ng-model="activeItem.params.template" value="2" class="wx" id="template-type2"><label class="radio-inline" for="template-type2">模仿微信图文页样式</label></div></div><div class="form-group" ng-if="activeItem.params.template == 1"><label class="col-xs-3 control-label">副标题</label><div class="col-xs-6"><input type="text" class="form-control" ng-model="activeItem.params.tradition.subtitle" value=""></div><div class="col-xs-3 form-control-static"><span class="date"><a href="javascript:;" we7-date-picker we7-date-value="activeItem.params.tradition.subtitle">日期</a></span></div></div><div class="form-group" ng-if="activeItem.params.template == 1"><label class="control-label col-xs-3">显示</label><div class="col-xs-9"><input type="radio" name="tra-style" value="left" ng-model="activeItem.params.tradition.align" id="show-type1"><label class="radio-inline" for="show-type1">居左显示</label><input type="radio" name="tra-style" value="center" ng-model="activeItem.params.tradition.align" id="show-type2"><label class="radio-inline" for="show-type2">居中显示</label><input type="radio" name="tra-style" value="right" ng-model="activeItem.params.tradition.align" id="show-type3"><label class="radio-inline" for="show-type3">居右显示</label></div></div><div class="add-textNav card" ng-if="activeItem.params.template == 1 && activeItem.params.tradition.nav.enable == 0"><a href="javascript:" ng-click="changeNavEnable(1)"><i class="fa fa-plus-circle green"></i> 添加一个文本导航</a></div><div class="card" style="padding:20px" ng-if="activeItem.params.template == 1 && activeItem.params.tradition.nav.enable == 1"><div class="btns"><a href="javascript:" ng-click="changeNavEnable(0)"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 名称</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.tradition.nav.title" value=""></div></div><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="activeItem.params.tradition.nav.url" we7-my-title="activeItem.params.tradition.nav.title"></div></div></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="col-xs-3 control-label">日期</label><div class="col-xs-9"><input type="text" class="form-control" name="" we7-date-picker we7-date-value="activeItem.params.news.date" value=""></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="col-xs-3 control-label">作者</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.news.author" value=""></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="col-xs-3 control-label">链接标题</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.news.title" value=""></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="control-label col-xs-3">链接地址</label><div class="col-xs-9"><div we7-linker we7-my-url="activeItem.params.news.url" we7-my-title="activeItem.params.news.title"></div></div></div></div></div></div></div></div>'),e.put("widget-white-display.html",'<div ng-controller="WhiteCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-white" style="width:100%;height:100%;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'),e.put("widget-white-editor.html",'<div ng-controller="WhiteCtrl"><div class="app-white-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body">空白高度(请于左侧拖动缩放调整)</div></div></div></div></div>'),e.put("directive-selectmore-module-item.html",'<ul class="app-list"><li class="select" ng-repeat="module in selectModules"><div class="app-info"><img ng-src="{{module.icon}}"><p>{{module.title}}</p></div><div class="cover-dark"><a href="javascript:;" class="cover-delect" ng-click="delModule(module);"><i class="fa fa-minus-circle"></i>删除</a></div><input type="hidden" name="select_modules[]" value="{{module.module}}"> <input type="hidden" name="select_modules_version[]" value="{{module.version}}"></li><li class="select select-more" ng-click="selectMore()"></li></ul><div class="wxapp-modules"><div id="modules-Modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-default modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3><ul role="tablist" class="nav nav-pills" style="font-size:14px; margin-top:-20px"><li role="presentation" class="basic"><a data-toggle="tab" data-type="basic" role="tab" aria-controls="baisc" href="#basic">选择需要打包的应用</a></li></ul></h3></div><div class="modal-body modules-content"><div class="tab-content"><div class="info text-center" ng-show="$scope.apps.length == 0"><i class="fa fa-spinner fa-pulse fa-lg"></i> 数据加载中</div><ul class="app-allow-list"><li ng-repeat="module in wxappModuleList"><div class="app-info"><img ng-src="{{module.logo}}"><p>{{module.title}}</p></div><a href="javascript:;" ng-click="selectModule(module)" class="cover-dark"><i class="fa fa-check cover-selected"></i></a></li></ul></div></div><div class="modal-footer"></div></div></div></div></div>'),e.put("directive-multipage-multipage.html",'<div class="page-navigator"><div class="top-title">页面</div><div class="page-list"><ul><li class="page-menu" ng-repeat="page in allPages track by $index" ng-click="navToPage($index)" ng-init="" ng-class="{\'current\' : page.num-1 == $index}"><div class="page-thumb-block" ng-class="{active : page.active}"><div class="page-thumb"><div class="page-thumb-con"></div></div><div class="page-menu-title" ng-bind="{{$index+1}}"></div><div class="icon icon-remove" ng-click="removePage($index);"><span class="fa fa-trash"></span></div><div class="icon icon-copy" ng-click="copyPage($index, $event);" ng-if="isMultiPage"><span class="fa fa-copy"></span></div></div></li></ul></div><div class="add-blank-page" ng-click="insertPage();" ng-if="isMultiPage">+</div><div class="template hidden"><ul class="nav nav-tabs nav-justified"><li class="active"><a href="#">普通版式</a></li><li><a href="#">统计版式</a></li><li><a href="#">特效版式</a></li></ul><div class="template-area"><div class="template-item"><div class="add-icon"><span class="fa fa-plus-circle"></span></div><div class="text">空白页</div></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div></div></div></div>')}]),angular.module("wapeditorApp",["we7app"]),angular.module("wapeditorApp").controller("CommonCtrl",["$scope","$sanitize",function(e,t){}]),angular.module("wapeditorApp").directive("we7ContextMenu",["serviceBase","$timeout",function(e,t){return{link:function(a,n,i){function s(e,t){var a=$(".right-hand-menu"),n=a.parent().position();e-=n.left,t-=n.top,a.css({left:e+"px",top:t+"px"}),a.addClass("show-menu")}$(".right-hand-menu").length||($("body").append('<menu class="right-hand-menu"> <li class="menu-item menu-item-del"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">删除</span> </button> </li> <li class="menu-item menu-item-top"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">置顶</span> </button> </li> <li class="menu-item menu-item-up"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">上移一层</span> </button> </li> <li class="menu-item menu-item-down"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">下移一层</span> </button> </li> <li class="menu-item menu-item-bottom"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">置底</span> </button> </li> </menu>'),$(".modules").on("contextmenu",function(e){e.preventDefault()}),$(document).on("mouseup",function(){$(".right-hand-menu").removeClass("show-menu")}),$(".right-hand-menu").on("click",".menu-item-del",function(){var n=$(".right-hand-menu").data("item-index");e.deleteItem(n),t(function(){a.$apply()},100)}).on("click",".menu-item-top",function(){a.savePagePosition();var n,i=$(".right-hand-menu").data("item-index"),s=[];for(var o in a.activeModules)a.activeModules[o].index==i?n=angular.copy(a.activeModules[o]):s.push(a.activeModules[o]);s.push(n),e.setBaseData("activeModules",s),t(function(){a.$apply()},100)}).on("click",".menu-item-up",function(){a.savePagePosition();var n,i,s=$(".right-hand-menu").data("item-index"),o=a.activeModules.length;for(var r in a.activeModules)if(a.activeModules[r].index==s){if(parseInt(r)+1==o)break;n=angular.copy(a.activeModules[r]),i=angular.copy(a.activeModules[parseInt(r)+1]),a.activeModules[r]=i,a.activeModules[parseInt(r)+1]=n,e.setBaseData("activeModules",a.activeModules);break}t(function(){a.$apply()},100)}).on("click",".menu-item-down",function(){a.savePagePosition();var n,i,s=$(".right-hand-menu").data("item-index");for(var o in a.activeModules)if(a.activeModules[o].index==s){if(o<=1)break;n=angular.copy(a.activeModules[o]),i=angular.copy(a.activeModules[o-1]),a.activeModules[o]=i,a.activeModules[parseInt(o)-1]=n,e.setBaseData("activeModules",a.activeModules);break}t(function(){a.$apply()},100)}).on("click",".menu-item-bottom",function(){a.savePagePosition();var n,i=$(".right-hand-menu").data("item-index"),s=[];for(var o in a.activeModules)0!=o&&(a.activeModules[o].index==i?n=angular.copy(a.activeModules[o]):s.push(a.activeModules[o]));s.unshift(n),s.unshift(a.activeModules[0]),e.setBaseData("activeModules",s),t(function(){a.$apply()},100)})),n.on("contextmenu",function(e){s(e.pageX,e.pageY);var t=n.parents("div[id^='module-']").attr("index");$(".right-hand-menu").data("item-index",t)})}}}]),angular.module("wapeditorApp").directive("we7Nobar",function(){return{link:function(e,t,a){t.on("mousedown",function(e){$(".bar").hide()})}}}).directive("we7Drag",["serviceBase","$timeout",function(e,t){return{compile:function(t,a){var n=$('<div class="bar bar-n ui-resizable-handle ui-resizable-n we7-hide"></div>'),i=$('<div class="bar bar-s ui-resizable-handle ui-resizable-s we7-hide"></div>'),s=$('<div class="bar bar-e ui-resizable-handle ui-resizable-e we7-hide"></div>'),o=$('<div class="bar bar-w ui-resizable-handle ui-resizable-w we7-hide"></div>');return t.append(n).append(i).append(s).append(o),function(t,a,n){var i=a.parents("div[ng-controller$='Ctrl']").eq(0);i.on("mousedown",function(e){$(".bar").hide(),$(this).find(".bar").show(),$(this).find(".bar-radius").show(),$(this).draggable({containment:""})}),i.mousedown();var s=e.getBaseData("activeItem");if(s.id){var o=s.id.replace(/[a-z]/,function(e){return e.toLocaleUpperCase()}).replace(/^[a-z]/,function(e){return e.toLocaleUpperCase()})+"Ctrl";if("HeaderCtrl"!=o){var r=$("#module-"+s.index).find("div[ng-controller='"+o+"']");r.on("mousedown",function(e){$(".bar").hide(),$(this).find(".bar").show(),$(this).find(".bar-radius").show(),$(this).draggable({containment:""})}),r.mousedown()}else $(".bar").hide()}}}}}]).directive("we7Resize",function(){return{compile:function(e,t){var a=$('<div class="bar-radius radius-s we7-hide"></div>'),n=$('<div class="bar bar-nw bar-radius radius-s ui-resizable-handle ui-resizable-nw we7-hide"></div>'),i=$('<div class="bar bar-se bar-radius radius-s ui-resizable-handle ui-resizable-se we7-hide"></div>'),s=$('<div class="bar bar-sw bar-radius radius-s ui-resizable-handle ui-resizable-sw we7-hide"></div>'),o=$('<div class="bar bar-ne bar-radius radius-s ui-resizable-handle ui-resizable-ne we7-hide"></div>');return e.find(".bar-n,.bar-s,.bar-e,.bar-w").append(a),e.append(i).append(s).append(o).append(n),function(e,t,a){t.parents("div[ng-controller$='Ctrl']").eq(0).on("mousedown",function(e){var t={n:$(this).find(".bar-n"),s:$(this).find(".bar-s"),e:$(this).find(".bar-e"),w:$(this).find(".bar-w"),nw:$(this).find(".bar-nw"),se:$(this).find(".bar-se"),sw:$(this).find(".bar-sw"),ne:$(this).find(".bar-ne")};$(this).resizable({handles:t,aspectRatio:!0,onlyCorner:!0})})}}}}).directive("we7Rotate",function(){return{link:function(e,t,a){t.prepend('<div class="bar bar-rotate bar-radius radius-s ui-resizable-handle we7-hide"></div> <div class="bar bar-line ui-resizable-handle we7-hide"></div>');var n=t.parents("div[ng-controller$='Ctrl']").eq(0);n.on("mousedown",function(t){var a,i=n.find(".bar-rotate").get(0),s=n.children(),o=new Hammer(i),r={};o.get("pan").set({threhold:0}),o.on("panstart",function(e){$("body").css({"user-select":"none",cursor:'url("./Common/resource/images/mouserotate.ico"), default'}),r={x:s.offset().left+s.width()/2,y:s.offset().top+s.height()/2}}),o.on("panmove",function(t){var n=t.center,i=n.x-r.x,o=n.y-r.y+$(window).scrollTop(),l=Math.abs(i/o);a=Math.atan(l)/(2*Math.PI)*360,i>0&&0>o?a=360+a:i>0&&o>0?a=180-a:0>i&&o>0?a=180+a:0>i&&0>o&&(a=360-a),a>360&&(a-=360),a=parseInt(a),s.css({transform:"rotateZ("+a+"deg)"}),e.activeItem.params.borderStyle.transform=a,e.$apply()}),o.on("panend",function(){$("body").css({"user-select":"initial",cursor:"default"})})})}}}),angular.module("wapeditorApp").directive("we7EditKeyMap",["serviceBase","$timeout",function(e,t){return{restrict:"A",link:function(a,n,i){$(document).unbind("keydown").keydown(function(n){var i=e.getBaseData("activeModules"),s=e.getBaseData("activeItem"),o=_.findIndex(i,s);if(46==n.keyCode&&o>0&&(n.preventDefault(),confirm("删除后需要重新提交才会生效,确认吗?")&&(i.splice(o,1),e.setBaseData({activeModules:i,activeItem:i[0]}))),37==n.keyCode||38==n.keyCode||39==n.keyCode||40==n.keyCode){_.isEmpty(s)||n.preventDefault();37==n.keyCode&&(s.params.positionStyle.left-=1),38==n.keyCode&&(s.params.positionStyle.top-=1),39==n.keyCode&&(s.params.positionStyle.left+=1),40==n.keyCode&&(s.params.positionStyle.top+=1)}t(function(){a.$apply()})}).unbind("keyup").keyup(function(){a.$apply()})}}}]),angular.module("wapeditorApp").directive("we7Pagelength",function(){return{replace:!0,templateUrl:"directive-pagelength-pagelength.html",link:function(e,t,a){}}}),angular.module("wapeditorApp").directive("we7Style",["serviceSetStyle",function(e){return{templateUrl:"directive-style-style.html"}}]),angular.module("wapeditorApp").directive("we7Svger",function(){return{scope:{we7svg:"=we7Svg"},link:function(e,t,a){e.$watch("we7svg",function(){for(var a=$(e.we7svg),n=0;a.length>n;n++)if("svg"==a[n].tagName){var i=a[n];$(i).attr({width:"100%",height:"100%"}),$(i)[0].setAttribute("preserveAspectRatio","none"),t.html(i);break}})}}}),angular.module("wapeditorApp").factory("serviceBase",["$rootScope","widget","config","serviceCommon","serviceSetStyle","$timeout",function(e,t,a,n,s,o){var r={},l={modules:[],editors:[],activeModules:[],index:0,activeItem:{},activeIndex:0,pageLength:1,isNew:!0};return r.setModules=function(e,a){if(_.isNull(e)&&(l.modules=t),_.isArray(e))for(i in e){var n;(s=_.findIndex(t,{id:e[i]}))>-1&&(n=angular.copy(t[s]),l.modules.push(n))}if(_.isArray(a))for(i in a){var s=_.findIndex(l.modules,{id:a[i]});s>-1&&(l.modules[s].defaultshow=!0)}return l.modules},r.setEditors=function(e){l.editors.push(e)},r.updateActiveModules=function(e,t){t&&l.activeModules.push({id:e.id,name:e.name,params:angular.copy(e.params),originParams:angular.copy(e.params),issystem:e.issystem?1:0,index:l.index,displayorder:e.displayorder?e.displayorder:l.activeModules.length})},r.initActiveModules=function(e){return l.activeModules=e?angular.copy(e):[],l.activeModules},r.addItem=function(e,t){angular.forEach(l.modules,function(a,n){if(a.id==e){var i={};return i=angular.copy(a),-1==$.inArray(e,l.editors)&&(r.setEditors(a.id),r.broadcast("editors")),"header"!=e&&"UCheader"!=e&&(i.params="uc"===t?s.UcInitStyleParams(a.params):s.initStyleParams(a.params)),r.updateActiveModules(i,!0),l.activeIndex=_.findIndex(l.activeModules,{index:parseInt(l.index)}),l.activeItem="uc"===t?l.activeModules[l.index]:l.activeModules[l.activeIndex],l.index++,r.triggerActiveItem(l.activeIndex),$(".app-text-edit").find(".nav-tabs").find("a[href='#attribute']").click(),r.broadcast("activeItem"),r.broadcast("activeModules"),void("header"!=e&&"UCheader"!=e&&s.initSetStyle(i.params))}})},r.editItem=function(e){(e=_.findIndex(l.activeModules,{index:parseInt(e)}))>-1&&(l.activeIndex=e,l.activeItem=l.activeModules[e]),-1==$.inArray(l.activeItem.id,l.editors)&&(r.setEditors(l.activeItem.id),r.broadcast("editors")),r.triggerActiveItem(e),$(".app-text-edit").find(".nav-tabs").find("a[href='#attribute']").click(),r.broadcast("activeItem")},r.deleteItem=function(e){if(confirm("删除后需要重新提交才会生效,确认吗?")){var t=$("#module-"+e).prev().attr("index"),e=_.findIndex(l.activeModules,{index:parseInt(e)});l.activeModules=_.without(l.activeModules,l.activeModules[e]),l.activeIndex=_.findIndex(l.activeModules,{index:parseInt(t)}),l.activeItem=l.activeModules[l.activeIndex],r.broadcast("activeItem"),r.broadcast("activeModules")}},r.triggerActiveItem=function(e){$("#module-"+l.activeModules[e].index).size()&&$("#editor"+l.activeModules[e].id).size()?clearTimeout(timer):timer=o(function(){r.triggerActiveItem(e)},50)},r.getBaseData=function(e){return l[e]},r.setBaseData=function(e,t){angular.isObject(e)?angular.forEach(e,function(e,t){l[t]=e}):l[e]=t,r.broadcast(e)},r.broadcast=function(t){switch(t){case"activeItem":e.$broadcast("serviceBase.activeItem.update",l.activeItem);break;case"activeModules":e.$broadcast("serviceBase.activeModules.update",l.activeModules);break;case"editors":e.$broadcast("serviceBase.editors.update",l.editors);break;case"modules":case"index":case"activeIndex":case"pageLength":case"isNew":break;default:angular.isObject(t)&&angular.forEach(t,function(t,a){switch(a){case"activeItem":e.$broadcast("serviceBase.activeItem.update",l.activeItem);break;case"activeModules":e.$broadcast("serviceBase.activeModules.update",l.activeModules);break;case"editors":e.$broadcast("serviceBase.editors.update",l.editors)}})}},r}]),angular.module("wapeditorApp").service("serviceCommon",["$window",function(e){var t={};return t.getCssname=function(e){for(var t="",a=0,n=parseInt(e.length);a<n;a++)-1!=e[a].search(/[A-Z]/)?t+="-"+e[a].toLowerCase():t+=e[a];return t},t.getMaxScopeIndex=function(e){var t=e[e.length-1].property,a=0;for(var n in t)a=a<t[n].index?parseInt(t[n].index):a;return a},t.getHeaderIndex=function(e){var t=0;return angular.forEach(e,function(e,a){"header"==e.id&&(t=a)}),t},t.url=function(t){t=t.split("/");var a="./index.php?i="+e.sysinfo.uniacid+"&j="+e.sysinfo.acid+"&c="+t[0];return t[1]&&(a+="&a="+t[1]),t[2]&&(a+="&do="+t[2]),a},t.tomedia=function(t){return e.sysinfo.attachurl+t},t.buildDataTagBegin=function(t,a){var n={params:a,uniacid:e.sysinfo.uniacid,acid:e.sysinfo.acid};return"{data func='site_widget_"+t+"' module='widget' widgetdata="+encodeURIComponent(JSON.stringify(n))+" }"},t.buildDataTagEnd=function(){return"{/data}"},t.stripHaskey=function(e){for(var a in e)"$$hashKey"==a?delete e[a]:"object"==typeof e[a]&&t.stripHaskey(e[a]);return e},t.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},t}]),angular.module("wapeditorApp").value("widget",[{id:"header",name:"微页面标题",issystem:!0,params:{title:"微页面标题",description:"",pageHeight:568,thumb:"",bgColor:"",bottom_menu:!1,baseStyle:{},borderStyle:{},shadowStyle:{},positionStyle:{},animationStyle:{}}},{id:"UCheader",name:"会员主页",issystem:!0,params:{title:"会员主页",cover:"",bgImage:""}},{id:"cardBasic",name:"会员卡基本设置",issystem:!0,params:{title:"会员卡",color:{title:"#333",rank:"#333",name:"#333",number:"#333"},card_level:{type:1},card_label:{type:1,title:"会员卡标题"},description:"1、本卡采取记名消费方式\n2、持卡人可享受会员专属优惠\n3、本卡不能与其他优惠活动同时使用\n4、持卡人可用卡内余额进行消费",background:{type:"system",image:util.tomedia("images/global/card/6.png")},logo:util.tomedia("http://www.baidu.com/img/bdlogo.gif"),format_type:1,format:"WQ2015*****#####***",fields:[{title:"姓名",require:1,bind:"realname"},{title:"手机",require:1,bind:"mobile"}],grant:{credit1:0,credit2:0,coupon:[]},grant_rate:0,offset_rate:0,offset_max:0}},{id:"cardActivity",name:"消费优惠设置",issystem:!0,params:{discount_type:0,discount_style:1,discounts:[],content:"",bgColor:""}},{id:"cardNums",name:"会员卡次数设置",issystem:!0,params:{nums_status:0,nums_style:1,nums_text:"可用次数",nums:[{recharge:100,num:5},{recharge:200,num:10}]}},{id:"cardTimes",name:"会员卡计时设置",issystem:!0,params:{times_status:0,times_style:1,times_text:"截至日期",times:[{recharge:100,time:5},{recharge:200,time:10}]}},{id:"cardRecharge",name:"充值优惠设置",issystem:!0,params:{recharge_type:0,recharge_style:1,grant_rate_switch:1,recharges:[{condition:"",back:"",backtype:"0",backunit:"元"},{condition:"",back:"",backtype:"0",backunit:"元"},{condition:"",back:"",backtype:"0",backunit:"元"},{condition:"",back:"",backtype:"0",backunit:"元"}],content:"",bgColor:""}},{id:"onlyText",name:"文字",isbase:!0,params:{title:"请输入文字",baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{top:100,left:60,width:200,height:30}}},{id:"image",name:"图片",isbase:!0,params:{items:{id:"",imgurl:""},baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{top:169,left:0,width:100,height:100}}},{id:"shape",name:"形状",isbase:!0,params:{svgValue:"",baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{top:64,left:0,width:100,height:100}}},{id:"pureLink",name:"链接",isbase:!0,params:{items:[{id:"1",type:"text",title:"点我购买",url:"",color:"#fff",editcolor:"danger",discolor:"#d9534f",active:1},{id:"2",type:"text",title:"点开链接",url:"",color:"#fff",editcolor:"warning",discolor:"#ec971f",active:0},{id:"3",type:"text",title:"马上购买",url:"",color:"#fff",editcolor:"success",discolor:"#449d44",active:0},{id:"4",type:"text",title:"关注我们",url:"",color:"#000",editcolor:"default",discolor:"#fff",active:0},{id:"5",type:"img",title:"自定义",url:"",imgurl:"",editcolor:"primary",discolor:"",active:0}],baseStyle:{backgroundColor:"#d9534f",color:"#fff",textAlign:"center",fontSize:"14",lineHeight:"33px"},borderStyle:{borderWidth:1,borderRadius:4,borderStyle:"solid",borderColor:"#ADADAD"},shadowStyle:{},animationStyle:{},positionStyle:{top:244,left:0,width:85,height:35}}},{id:"dial",name:"拨号",isbase:!0,params:{items:[{id:"1",type:"text",title:"一键拨号",tel:"",color:"#fff",editcolor:"danger",discolor:"#d9534f",active:1},{id:"2",type:"text",title:"热线电话",tel:"",color:"#fff",editcolor:"warning",discolor:"#ec971f",active:0},{id:"3",type:"text",title:"拨打电话",tel:"",color:"#fff",editcolor:"success",discolor:"#449d44",active:0},{id:"4",type:"text",title:"销售专线",tel:"",color:"#000",editcolor:"default",discolor:"#fff",active:0},{id:"5",type:"img",title:"自定义",tel:"",imgurl:"",editcolor:"primary",discolor:"",active:0}],baseStyle:{backgroundColor:"#d9534f",color:"#fff",textAlign:"center",fontSize:"14",lineHeight:"33px"},borderStyle:{borderWidth:1,borderRadius:4,borderStyle:"solid",borderColor:"#ADADAD"},shadowStyle:{},animationStyle:{},positionStyle:{top:274,left:100,width:85,height:35}}},{id:"good",name:"点赞",isbase:!0,params:{bgcolor:"#d15d82",color:"#fff",layoutstyle:1,layoutactive:"lr",baseStyle:{color:"#fff",backgroundColor:"#d15d82",fontSize:"14px",textAlign:"center",lineHeight:"48px"},borderStyle:{borderWidth:1,borderRadius:4,borderStyle:"solid",borderColor:"#ADADAD"},shadowStyle:{},animationStyle:{},positionStyle:{width:150,height:50,top:174,left:70}}},{id:"countDown",name:"倒计时",isbase:!0,params:{leftTimeText:{day:0,hour:0,min:0,sec:0},deadtime:"",textalign:"center",baseStyle:{fontSize:"13px",textAlign:"center",lineHeight:"48px"},borderStyle:{borderWidth:1,borderRadius:4,borderStyle:"solid",borderColor:"#ccc"},shadowStyle:{},animationStyle:{},positionStyle:{top:315,left:50}}},{id:"richText",name:"富文本",params:{bgColor:"",content:"",isfull:!1,baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,top:10,width:320,height:410}}},{id:"adImg",name:"幻灯片",params:{listStyle:1,sizeType:1,items:[],baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:80}}},{id:"cube",name:"图片魔方",params:{layout:{},showIndex:0,selection:{},currentPos:{},currentLayout:{isempty:!0},baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:30}}},{id:"title",name:"标题",params:{title:"",template:1,tradition:{subtitle:"",align:"left",nav:{title:"",url:"",enable:0}},news:{date:"",author:"",title:"",urlType:1,url:""},baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:96}}},{id:"textNav",name:"文本导航",params:{items:[],borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:30}}},{id:"navImg",name:"图片导航",params:{items:[{imgurl:"",title:"",url:""},{imgurl:"",title:"",url:""},{imgurl:"",title:"",url:""},{imgurl:"",title:"",url:""}],borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:100}}},{id:"link",name:"关联链接",params:{items:[],baseStyle:{lineHeight:"inherit"},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:100}}},{id:"line",name:"辅助线",params:{baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{height:30}}},{id:"white",name:"辅助空白",params:{baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:20}}},{id:"audio",name:"语音",params:{style:"1",headimg:"",align:"left",title:"",isloop:!1,reload:"false",audio:{id:"",url:""},baseStyle:{},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:60}}},{id:"notice",name:"公告",params:{notice:"",baseStyle:{backgroundColor:"#ffc"},borderStyle:{},shadowStyle:{},animationStyle:{},positionStyle:{left:0,width:320,height:40}}}]),angular.module("wapeditorApp").service("serviceDrag",function(){console.log("serviceDrag")}),angular.module("wapeditorApp").service("serviceSetStyle",["$rootScope","$timeout","serviceCommon","config",function(e,t,a,n){var i={},s=1;return i.defBaseStyle={backgroundColor:"rgba(0,0,0,0)",color:"#000",opacity:0,paddingTop:0,lineHeight:2,fontSize:14,textAlign:"left",lock:!1},i.defBorderStyle={borderWidth:0,borderRadius:2,borderStyle:"solid",borderColor:"rgba(0,0,0,1)",transform:0},i.defShadowStyle={shadowSize:0,shadowBlur:0,shadowColor:"rgba(0,0,0,0.5)",shadowDirection:1},i.defAnimationStyle={animationName:"noEffect",animationDuration:1,animationTimingFunction:"ease",animationDelay:.6,animationFillMode:"both"},i.defPositionStyle={top:259,left:40,width:240,height:50},i.initStyleParams=function(e){var t={};return(t=angular.copy(e)).baseStyle=$.extend(!1,i.defBaseStyle,e.baseStyle),t.borderStyle=$.extend(!1,i.defBorderStyle,e.borderStyle),t.shadowStyle=$.extend(!1,i.defShadowStyle,e.shadowStyle),t.animationStyle=$.extend(!1,i.defAnimationStyle,e.animationStyle),t.positionStyle=$.extend(!1,i.defPositionStyle,e.positionStyle),$(".app-preview").scrollTop()>0&&(t.positionStyle.top+=parseInt($(".app-preview").scrollTop())),t.positionStyle.left>200?t.positionStyle.left=10:t.positionStyle.left+=5*s,t.positionStyle.top+=5*s,s>20?s=1:s++,t},i.UcInitStyleParams=function(e){var t={};return(t=angular.copy(e)).baseStyle=$.extend(!1,i.defBaseStyle,e.baseStyle),t.borderStyle=$.extend(!1,i.defBorderStyle,e.borderStyle),t.shadowStyle=$.extend(!1,i.defShadowStyle,e.shadowStyle),t.animationStyle=$.extend(!1,i.defAnimationStyle,e.animationStyle),t.positionStyle=$.extend(!1,i.defPositionStyle,e.positionStyle),$(".app-preview").scrollTop()>0&&(t.positionStyle.top+=parseInt($(".app-preview").scrollTop())),t.positionStyle.left>200?t.positionStyle.left=10:t.positionStyle.left+=5*s,t.positionStyle.top+=5*s-$(".app-usercenter").height(),s>10?s=1:s++,t},i.initSetStyle=function(e){i.setModuleBaseStyle(e.baseStyle),i.setModuleBorderStyle(e.borderStyle),i.setModuleShadowStyle(e.shadowStyle),i.setModulePositionStyle(e.positionStyle),i.setModuleAnimationStyle(e.animationStyle)},i.setModuleBaseStyle=function(t){t=$.extend(!1,i.defBaseStyle,t);var n="";for(var s in t)switch(s){case"fontSize":"number"==typeof t[s]?n+=a.getCssname(s)+":"+parseInt(t[s])+"px;":t[s].search(/rem/)?n+=a.getCssname(s)+":14px;":n+=a.getCssname(s)+":"+parseInt(t[s])+"px;";case"paddingTop":case"paddingBottom":n+=a.getCssname(s)+":"+parseInt(t[s])+"px;";break;case"backgroundColor":case"color":case"textAlign":case"lineHeight":n+=a.getCssname(s)+":"+t[s]+";";break;case"opacity":n+=a.getCssname(s)+":"+(100-parseInt(t[s]))/100+";"}e.$broadcast("serviceBase.activeItem.style.update","baseStyle",t,n)},i.setModuleBorderStyle=function(t){t=$.extend(!1,i.defBorderStyle,t);var n=newTransformStyle="";for(var s in t)switch(s){case"borderWidth":case"borderRadius":n+=a.getCssname(s)+":"+parseInt(t[s])+"px;";break;case"borderStyle":case"borderColor":n+=a.getCssname(s)+":"+t[s]+";";break;case"transform":newTransformStyle+="transform: rotateZ("+parseInt(t[s])+"deg);"}e.$broadcast("serviceBase.activeItem.style.update","borderStyle",t,n,newTransformStyle)},i.setModuleShadowStyle=function(t){t=$.extend(!1,i.defShadowStyle,t);var a="",n=shadowY=0;n=-Math.sin(t.shadowDirection*Math.PI/180)*t.shadowSize,shadowY=Math.cos(t.shadowDirection*Math.PI/180)*t.shadowSize,a="box-shadow: "+n+"px "+shadowY+"px "+t.shadowBlur+"px "+t.shadowColor+";",e.$broadcast("serviceBase.activeItem.style.update","shadowStyle",t,a)},i.setModuleAnimationStyle=function(t){var a="",n=(t=$.extend(!1,i.defAnimationStyle,t)).animationName+" "+t.animationDuration+"s "+t.animationTimingFunction+" "+t.animationDelay+"s "+t.animationFillMode;a=i.cssCompatible("animation",n),e.$broadcast("serviceBase.activeItem.style.update","animationStyle",t,a)},i.setModulePositionStyle=function(t){t=$.extend(!1,i.defPositionStyle,t);var a="position:absolute;";for(var n in t)switch(n){case"top":case"left":case"width":case"height":a+=" "+n+": "+t[n]+"px;"}e.$broadcast("serviceBase.activeItem.style.update","positionStyle",t,a)},i.clearModuleStyle=function(t){t.params.baseStyle=t.originParams.baseStyle,t.params.borderStyle=t.originParams.borderStyle,t.params.shadowStyle=t.originParams.shadowStyle,t.params.animationStyle=t.originParams.animationStyle,e.$broadcast("serviceBase.activeItem.update",t)},i.eleAnimationIns=function(n){var i=a.getCssname(n);t(function(){$("."+i).parent().addClass("select").siblings(".select").removeClass("select")},100),e.$broadcast("serviceBase.activeItem.animationName.update",n)},i.savePagePosition=function(t){$(".modules").find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var e=$(this).parent().parent(),a=_.findIndex(t,{index:parseInt(e.attr("index"))}),n=$(this).css("top"),i=$(this).css("left"),s=$(this).css("width"),o=$(this).css("height"),r="position:absolute;top:"+n+";left:"+i+";width:"+s+";height:"+o+";";t[a].params.positionStyle.top=parseInt(n),t[a].params.positionStyle.left=parseInt(i),t[a].params.positionStyle.width=parseInt(s),t[a].params.positionStyle.height=parseInt(o),t[a].positionStyle=r}),e.$broadcast("serviceBase.activeModules.update",t)},i.saveModulePosition=function(t){var a="#module-"+t.index,n=$(a).find("div.ng-scope[ng-controller$='Ctrl']"),i=n.css("top"),s=n.css("left"),o=n.css("width"),r=n.css("height"),l="position:absolute;top:"+i+";left:"+s+";width:"+o+";height:"+r+";";return t.params.positionStyle.top=parseInt(i),t.params.positionStyle.left=parseInt(s),t.params.positionStyle.width=parseInt(o),t.params.positionStyle.height=parseInt(r),t.positionStyle=l,e.$broadcast("serviceBase.activeItem.update",t),t},i.changeTextAlign=function(t,a){t.params.baseStyle.textAlign=a,e.$broadcast("serviceBase.activeItem.update",t)},i.changeBorderWidth=function(e){"adImg"!=e.id&&"cube"!=e.id&&"title"!=e.id&&"textNav"!=e.id&&"link"!=e.id&&"audio"!=e.id||t(function(){var t=i.saveModulePosition(e);t.positionStyle.height+=2*t.borderStyle.borderWidth,"audio"==e.id&&(t.positionStyle.height+=20),i.setModulePositionStyle(t.params.positionStyle)},100)},i.changeInnerHeight=function(e){t(function(){var t=i.saveModulePosition(e),a=t.index,n=$("#module-"+a).find(".inner"),s=parseInt(n.css("height"));s+=2*t.params.borderStyle.borderWidth,t.params.positionStyle.height=s,i.setModulePositionStyle(t.params.positionStyle)},100)},i.changePageLength=function(n,i){var s=!((n=parseInt(n))>1),o=n;return t(function(){$(".app-content").css("height",568*n+"px")},100),i[a.getHeaderIndex(i)].params.pageLength=n,e.$broadcast("updateScope",{isMultiPage:s,pageLength:o,activeModules:i}),i},i.cssCompatible=function(e,t){if(angular.isString(e)&&angular.isString(t))return e+": "+t+";-webkit-"+e+": "+t+";-moz-"+e+": "+t+";-o-"+e+": "+t+";-ms-"+e+": "+t+";"},i}]),angular.module("wapeditorApp").service("serviceSubmit",["serviceBase","serviceCommon",function(e,t){var a={};return a.submit=function(){var a="",n={params:{},html:""},i=$($(".modules").html()),s=e.getBaseData("activeModules");i.find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var e=_.findIndex(s,{index:parseInt($(this).parent().parent().attr("index"))}),n=$(this).find("div[class^='app-']").get(0),i=$(n).attr("style");s[e].params.animate=s[e].params.animateTemp,i+="animation:"+s[e].params.animate+";",$(n).attr("style",i);var o="",r=angular.copy(s[e].params);$(this).find(".js-default-content").remove();var l=$(this).parent().parent().attr("name").toLowerCase();if("UCheader"!=l&&"cardBasic"!=l&&"cardActivity"!=l&&"cardNums"!=l&&"cardTimes"!=l&&"cardRecharge"!=l){var c=$(this).css("top"),u=$(this).css("left"),d=$(this).css("width"),p=$(this).css("height"),m="position:absolute;top:"+c+";left:"+u+";width:"+d+";height:"+p+";";s[e].params.positionStyle.top=parseInt(c),s[e].params.positionStyle.left=parseInt(u),s[e].params.positionStyle.width=parseInt(d),s[e].params.positionStyle.height=parseInt(p),s[e].positionStyle=m}switch(l){case"link":var g=this;angular.forEach(r.items,function(e,a){(e.selectCate.pid||e.selectCate.cid)&&$(g).find(".list-group").children().eq(a).replaceWith("<div>"+t.buildDataTagBegin("link",e)+'<div class="list-group-item ng-scope"><a href="{$row[url]}" class="clearfix"><span class="app-nav-title"> {$row[title]}<i class="pull-right fa fa-angle-right"></i></span></a></div>'+t.buildDataTagEnd()+"</div>")});break;case"richtext":s[e]&&(s[e].params.content="")}if(o=$(this).html(),"header"!=l){m=$(this).attr("style");a+='<div type="'+l+'" style="'+m+'">'+o+"</div>"}e++});var o=s[0].params.bgColor;return a='<div class="js-design-page" style="background-color:'+o+'">'+a+"</div>",a=a.replace(/<\!\-\-([^-]*?)\-\->/g,""),a=a.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),a=a.replace(/ ng\-[a-zA-Z]+/g,""),n.html=a,n.params=angular.copy(s),t.stripHaskey(n.params),n},a}]),angular.module("wapeditorApp").service("serviceUpwardCompatible",["$rootScope","$timeout","orderByFilter",function(e,t,a){var n={};return n.compatibility=function(e){void 0!==e[0].params.pageHeight&&(e[0].params.pageLength=Math.ceil(e[0].params.pageHeight/568)),e=a(e,"displayorder");for(var t in e){e[t].params.baseStyle instanceof Array&&(e[t].params.baseStyle={}),e[t].params.borderStyle instanceof Array&&(e[t].params.borderStyle={}),e[t].params.shadowStyle instanceof Array&&(e[t].params.shadowStyle={}),e[t].params.positionStyle instanceof Array&&(e[t].params.positionStyle={});var n=angular.copy(e[t].params);if(e[t].animationStyle="",e[t].params.animationStyle={},e[t].params.animate){var i=e[t].params.animate.match(/(\w+)\s1/);i=i?i[1]:"noEffect",e[t].params.animationStyle.name=i}else e[t].params.animationStyle.name="noEffect";switch(e[t].params.animationStyle={name:e[t].params.animationStyle.name,speed:1,delay:.6},e[t].animationStyle="animation: "+e[t].params.animate+";",e[t].params.positionStyle=_.isEmpty(e[t].params.positionStyle)?{}:e[t].params.positionStyle,e[t].params.baseStyle=_.isEmpty(e[t].params.baseStyle)?{}:e[t].params.baseStyle,e[t].params.borderStyle=_.isEmpty(e[t].params.borderStyle)?{}:e[t].params.borderStyle,e[t].params.shadowStyle=_.isEmpty(e[t].params.shadowStyle)?{}:e[t].params.shadowStyle,e[t].baseStyle="",e[t].borderStyle="",e[t].shadowStyle="",e[t].positionStyle="",e[t].id){case"onlyText":e[t].params.baseStyle.textAlign=n.postype,e[t].params.baseStyle.fontSize=n.baseStyle.fontsize,e[t].params.baseStyle.lineHeight=n.baseStyle.lineheight,e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0,e[t].params.positionStyle.width=n.positionStyle.width?n.positionStyle.width:290,e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:0,e[t].baseStyle="font-size:"+n.baseStyle.fontsize+"px;text-align:"+n.postype+";line-height:"+n.baseStyle.lineheight+";";break;case"image":e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0,e[t].params.positionStyle.width=n.positionStyle.width?n.positionStyle.width:0,e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:0;break;case"shape":e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0,e[t].params.positionStyle.width=n.positionStyle.width?n.positionStyle.width:100,e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:0;break;case"pureLink":case"dial":e[t].params.baseStyle.fontSize=n.baseStyle.fontsize?n.baseStyle.fontsize+"px":"14px",e[t].params.baseStyle.textAlign="center";for(var s in n.items)if(1==n.items[s].active){e[t].params.baseStyle.backgroundColor=n.items[s].discolor,e[t].params.baseStyle.color=n.items[s].color;break}e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0,e[t].params.positionStyle.width=n.positionStyle.width?n.positionStyle.width:320-n.positionStyle.marginleft,e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:35,e[t].params.baseStyle.lineHeight=e[t].params.positionStyle.height+"px",e[t].params.borderStyle.borderWidth=1,e[t].params.borderStyle.borderRadius=8,e[t].params.borderStyle.borderStyle="solid",e[t].params.borderStyle.borderColor="#ADADAD",e[t].baseStyle="font-size:"+e[t].params.baseStyle.fontSize+";text-align:center;background-color:"+n.items[s].discolor+";color:"+n.items[s].color+";line-height:"+e[t].params.baseStyle.lineHeight+";",e[t].borderStyle="border-radius:8px; border-width: 1px;border-style: solid;border-color: #ADADAD;";break;case"good":e[t].params.baseStyle.fontSize=n.baseStyle.fontsize+"px",e[t].params.baseStyle.textAlign="center",e[t].params.baseStyle.color=n.color,e[t].params.baseStyle.backgroundColor="#d15d82",e[t].params.borderStyle.borderRadius=5,e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0,e[t].params.positionStyle.width=n.positionStyle.width?n.positionStyle.width:320-n.positionStyle.marginleft,1==n.layoutstyle?e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:35:e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:54,e[t].params.baseStyle.lineHeight=e[t].params.positionStyle.height+"px",e[t].baseStyle="font-size:"+e[t].params.baseStyle.fontSize+";text-align:center;background-color:#d15d82;color:"+n.color+";line-height:"+e[t].params.baseStyle.lineHeight+";",e[t].borderStyle="border-radius:5px;";break;case"countDown":e[t].params.baseStyle.fontSize=n.baseStyle.fontsize+"px",e[t].params.baseStyle.textAlign="center",e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0,e[t].params.positionStyle.width=n.positionStyle.width?n.positionStyle.width:320,e[t].params.positionStyle.height=n.positionStyle.height?n.positionStyle.height:35,e[t].params.baseStyle.lineHeight=e[t].params.positionStyle.height+"px",e[t].params.borderStyle.borderWidth=1,e[t].params.borderStyle.borderStyle="solid",e[t].params.borderStyle.borderColor="#ccc",e[t].baseStyle="font-size:"+e[t].params.baseStyle.fontSize+";text-align:center;line-height:"+e[t].params.baseStyle.lineHeight+";",e[t].borderStyle="border-width: 1px;border-style: solid;border-color: #ccc;";break;case"title":e[t].params.baseStyle.backgroundColor=n.tradition.bgcolor,e[t].baseStyle="background-color:"+n.tradition.bgcolor+";";case"white":e[t].params.positionStyle.height=e[t].params.height;case"richText":case"adImg":case"cube":case"textNav":case"navImg":case"link":case"line":case"audio":case"notice":void 0!==n.positionStyle?e[t].params.positionStyle.left=n.positionStyle.marginleft?n.positionStyle.marginleft:0:e[t].params.positionStyle.left=0,e[t].params.positionStyle.width=320}var o="";heightStyle="",e[t].params.positionStyle.width&&(o="width:"+e[t].params.positionStyle.width+"px;"),e[t].params.positionStyle.height&&(heightStyle="height:"+e[t].params.positionStyle.height+"px;"),e[t].positionStyle="position:relative;left:"+e[t].params.positionStyle.left+"px;"+o+heightStyle,void 0!==n.positionStyle?e[t].marginTop=n.positionStyle.margintop?n.positionStyle.margintop:0:e[t].marginTop=0}return e},n}]),angular.module("wapeditorApp").controller("AdImgCtrl",["$scope",function(e){e.addItem=function(){require(["fileUploader"],function(t){t.show(function(t){e.activeItem.params.items.push({id:t.id,imgurl:t.url,title:"",url:"",isactive:!1}),$.each(e.activeItem.params.items,function(t,a){e.activeItem.params.items[0].isactive=0==t}),e.$apply("activeItem"),e.changeInnerHeight()},{direct:!0,multiple:!1})})},e.removeItem=function(t){index=$.inArray(t,e.activeItem.params.items),items=_.clone(e.activeItem.params.items),e.activeItem.params.items=[];for(i in items)i!=index&&e.activeItem.params.items.push(items[i]);e.changeInnerHeight()},e.addEmpty=function(){e.activeItem.params.items.push({imgurl:"",title:"",url:""}),e.changeInnerHeight()},e.changeItem=function(t){require(["fileUploader"],function(a){a.init(function(a){var n=$.inArray(t,e.activeItem.params.items);n>-1&&(e.activeItem.params.items[n].id=a.id,e.activeItem.params.items[n].imgurl=a.url,e.$apply())},{direct:!0,multiple:!1})}),e.changeInnerHeight()}}]),angular.module("wapeditorApp").controller("AudioCtrl",["$scope",function(e){e.addAudioItem=function(){require(["fileUploader"],function(t){t.init(function(t){t&&(e.activeItem.params.audio.id=t.id,e.activeItem.params.audio.url=t.attachment,e.$apply(),$(".audio-player-play").click(function(){var t=e.activeItem.params.audio.url;if(t){$("#player").remove();var a=$('<div id="player"></div>');$(document.body).append(a),a.data("control",$(this)),a.jPlayer({playing:function(){$(this).data("control").find("i").removeClass("fa-play").addClass("fa-stop")},pause:function(e){$(this).data("control").find("i").removeClass("fa-stop").addClass("fa-play")},swfPath:"resource/components/jplayer",supplied:"mp3,wma,wav,amr",solution:"html, flash"}),a.jPlayer("setMedia",{mp3:t}).jPlayer("play"),$(this).find("i").hasClass("fa-stop")?a.jPlayer("stop"):a.jPlayer("setMedia",{mp3:t}).jPlayer("play")}}).show())},{direct:!0,multiple:!1,type:"audio"})})},e.addImgItem=function(){require(["fileUploader"],function(t){t.init(function(t){e.activeItem.params.headimg=t.url,e.$apply()},{direct:!0,multiple:!1})})},e.changeInnerHeight=function(){e.changeInnerHeight()}}]),angular.module("wapeditorApp").controller("CountDownCtrl",["$scope","$timeout",function(e,t){e.$watch("activeItem.params.deadtime",function(t,n){if(e.activeItem.params.leftTimeText={day:0,hour:0,min:0,sec:0},t&&void 0!==t&&0!=t){var i=t.replace(/:/g,"-"),s=(i=i.replace(/ /g,"-")).split("-");dtime=new Date(Date.UTC(s[0],s[1]-1,s[2],s[3]-8,s[4],s[5])),dtime=parseInt(dtime.getTime()),d=new Date(dtime)}else{var o=Date.parse(new Date);dtime=parseInt(2592e6+o),d=new Date(dtime)}e.activeItem.params.deadtime=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" "+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds(),e.activeItem.params.deadtimeToMin=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" "+d.getHours()+":"+d.getMinutes(),a()});var a=function(){var n=Date.parse(new Date),i=dtime-n>0?dtime-n:0;e.activeItem.params.leftTimeText.day=parseInt(i/864e5),e.activeItem.params.leftTimeText.hour=parseInt(i/36e5%24),e.activeItem.params.leftTimeText.min=parseInt(i/6e4%60),e.activeItem.params.leftTimeText.sec=parseInt(i/1e3%60),t(a,1e3)}}]),angular.module("wapeditorApp").controller("CubeCtrl",["$scope",function(e){if(e.activeItem.params&&e.activeItem.params.layout&&_.isEmpty(e.activeItem.params.layout))for(row=0;row<4;row++)for(e.activeItem.params.layout[row]={},col=0;col<4;col++)e.activeItem.params.layout[row][col]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""};$(".layout-table").bind("mouseover",function(e){if("LI"==e.target.tagName){$(".layout-table li").removeClass("selected");var t=$(e.target).attr("data-rows"),a=$(e.target).attr("data-cols");$(".layout-table li").filter(function(e,n){return $(n).attr("data-rows")<=t&&$(n).attr("data-cols")<=a}).addClass("selected")}}),e.activeItem.params.currentLayout={},e.showSelection=function(t,a){e.activeItem.params.currentPos={row:t,col:a},e.activeItem.params.selection={};var n=-1,s=1;for(i=t;i<4;i++){for(y=1,e.activeItem.params.selection[s]={},j=a;j<4;j++)n>=0&&n<j||(!_.isUndefined(e.activeItem.params.layout[i][j])&&e.activeItem.params.layout[i][j].isempty?(e.activeItem.params.selection[s][y]={rows:s,cols:y},y++):n=j-1);s++}return $(".layout-table li").removeClass("selected"),e.modalobj=$("#modal-cube-layout").modal({show:!0}),!0},e.selectLayout=function(t,a,n,s){for(_.isUndefined(n)&&(n=0),_.isUndefined(s)&&(s=0),e.activeItem.params.layout[t][a]={cols:s,rows:n,isempty:!1,imgurl:"",classname:"index-"+e.activeItem.params.showIndex},i=t;i<parseInt(t)+parseInt(n);i++)for(j=a;j<parseInt(a)+parseInt(s);j++)t==i&&a==j||delete e.activeItem.params.layout[i][j];return e.activeItem.params.showIndex++,e.modalobj.modal("hide"),e.changeItem(t,a),!0},e.addItem=function(t,a){require(["fileUploader"],function(t){t.show(function(t){e.activeItem.params.currentLayout.id=t.id,e.activeItem.params.currentLayout.imgurl=t.url,e.$apply(),e.changeInnerHeight()},{direct:!0,multiple:!1})})},e.changeItem=function(t,a){$("#cube-editor td").removeClass("current").filter(function(e,n){return $(n).attr("x")==t&&$(n).attr("y")==a}).addClass("current"),$("#thumb").attr("src",""),e.activeItem.params.currentLayout=e.activeItem.params.layout[t][a]},e.removeItem=function(){for(var t=0;t<4;t++)for(var a=0;a<4;a++)if(!_.isEmpty(e.activeItem.params.layout[t][a])&&e.activeItem.params.currentLayout.classname==e.activeItem.params.layout[t][a].classname){if(e.activeItem.params.currentLayout.rows>1)for(var n=0;n<e.activeItem.params.currentLayout.rows;n++){var i=t+n;if(e.activeItem.params.layout[i][a]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""},e.activeItem.params.currentLayout.cols>1)for(s=0;s<e.activeItem.params.currentLayout.cols;s++){o=a+s;e.activeItem.params.layout[i][o]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""}}}else if(e.activeItem.params.layout[t][a]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""},e.activeItem.params.currentLayout.cols>1)for(var s=0;s<e.activeItem.params.currentLayout.cols;s++){var o=a+s;e.activeItem.params.layout[t][o]={cols:1,rows:1,isempty:!0,imgurl:"",classname:""}}e.activeItem.params.currentLayout={}}}}]),angular.module("wapeditorApp").controller("DialCtrl",["$scope",function(e){e.changeItem=function(t){5==t.id?(e.activeItem.paddingTop=angular.copy(e.activeItem.params.baseStyle.paddingTop),e.activeItem.params.baseStyle.paddingTop=0):e.activeItem.params.baseStyle.paddingTop=e.activeItem.params.baseStyle.paddingTop?e.activeItem.params.baseStyle.paddingTop:e.activeItem.paddingTop,index=$.inArray(t,e.activeItem.params.items);for(i in e.activeItem.params.items)i==index?(e.activeItem.params.items[i].active=1,e.activeItem.params.baseStyle.color=e.activeItem.params.items[i].color,e.activeItem.params.baseStyle.backgroundColor=e.activeItem.params.items[i].discolor):e.activeItem.params.items[i].active=0},e.addImage=function(t){index=$.inArray(t,e.activeItem.params.items);for(i in e.activeItem.params.items)i==index&&require(["fileUploader"],function(t){t.show(function(t){e.saveModulePosition(),e.resetPosition(t),e.activeItem.params.items[i].imgurl=t.url,e.$apply()},{direct:!0,multiple:!1})})},e.resetPosition=function(t){t.width&&t.height&&(e.activeItem.params.positionStyle.width=t.width,e.activeItem.params.positionStyle.height=t.height,e.setModulePositionStyle(e.activeItem.params.positionStyle))}}]),angular.module("wapeditorApp").controller("GoodCtrl",["$scope",function(e){e.changeLayout=function(t){switch(t){case"lr":e.activeItem.params.layoutstyle=1;break;case"ud":e.activeItem.params.layoutstyle=2}}}]),angular.module("wapeditorApp").controller("HeaderCtrl",["$scope",function(e){e.addThumb=function(t){require(["fileUploader"],function(a){a.show(function(a){e.activeItem.params[t]=a.url,e.$apply("activeItem")},{direct:!0,multiple:!1})})},e.ifCheck=function(){e.activeItem.params.bottom_menu=!e.activeItem.params.bottom_menu}}]),angular.module("wapeditorApp").controller("ImageCtrl",["$scope",function(e){e.addItem=function(){require(["fileUploader"],function(t){t.show(function(t){e.saveModulePosition(),e.resetPosition(t),e.activeItem.params.items={id:t.id,imgurl:t.url},e.$apply()},{direct:!0,multiple:!1})})},e.changeItem=function(t){require(["fileUploader"],function(t){t.init(function(t){e.saveModulePosition(),e.resetPosition(t),e.activeItem.params.items.id=t.id,e.activeItem.params.items.imgurl=t.url,e.$apply()},{direct:!0,multiple:!1})})},e.resetPosition=function(t){t.width&&t.height&&(w=t.width,h=t.height,w>=h?(e.activeItem.params.positionStyle.width=100,e.activeItem.params.positionStyle.height=e.activeItem.params.positionStyle.width*h/w):(e.activeItem.params.positionStyle.height=100,e.activeItem.params.positionStyle.width=e.activeItem.params.positionStyle.height*w/h),e.setModulePositionStyle(e.activeItem.params.positionStyle))}}]),angular.module("wapeditorApp").controller("LineCtrl",["$scope",function(e){}]),angular.module("wapeditorApp").controller("LinkCtrl",["$scope","$http",function(e,t){e.pageSize=_.range(0,30),e.addItem=function(){e.activeItem.params.items.push({title:"",url:"",type:1,selectCate:{name:"",id:0},pageSize:3})},e.removeItem=function(t){index=$.inArray(t,e.activeItem.params.items),items=_.clone(e.activeItem.params.items),e.activeItem.params.items=[];for(i in items)i!=index&&e.activeItem.params.items.push(items[i]);e.changeInnerHeight()},e.showSearchCateList=function(a){e.currentItem=a;var n=$(".js-search-cate-keyword").val();return n=void 0===n?"":n,t.get("./index.php?c=utility&a=link&do=catelist&keyword="+n).success(function(t,a,n,s){e.searchCateList=[];var o=t.message.message;for(i in o)e.searchCateList.push({id:o[i].id,name:o[i].name,children:o[i].children});e.modalobj=$("#modal-search-cate-link").modal({show:!0})}),!0},e.selectCateItem=function(t,a,n){return e.currentItem.selectCate={pid:t,cid:a,name:n},e.modalobj.modal("hide"),!0}}]),angular.module("wapeditorApp").controller("NavImgCtrl",["$scope",function(e){e.changeItem=function(t){require(["fileUploader"],function(a){a.show(function(a){t.id=a.id,t.imgurl=a.url,e.$apply()},{direct:!0,multiple:!1})})}}]),angular.module("wapeditorApp").controller("NoticeCtrl",["$scope",function(e){}]),angular.module("wapeditorApp").controller("OnlyTextCtrl",["$scope",function(e){}]),angular.module("wapeditorApp").controller("PureLinkCtrl",["$scope",function(e){e.changeItem=function(t){5==t.id?(e.activeItem.paddingTop=angular.copy(e.activeItem.params.baseStyle.paddingTop),e.activeItem.params.baseStyle.paddingTop=0):e.activeItem.params.baseStyle.paddingTop=e.activeItem.params.baseStyle.paddingTop?e.activeItem.params.baseStyle.paddingTop:e.activeItem.paddingTop,index=$.inArray(t,e.activeItem.params.items);for(i in e.activeItem.params.items)i==index?(e.activeItem.params.items[i].active=1,e.activeItem.params.baseStyle.color=e.activeItem.params.items[i].color,e.activeItem.params.baseStyle.backgroundColor=e.activeItem.params.items[i].discolor):e.activeItem.params.items[i].active=0},e.addImage=function(t){index=$.inArray(t,e.activeItem.params.items);for(i in e.activeItem.params.items)i==index&&require(["fileUploader"],function(t){t.show(function(t){e.saveModulePosition(),e.resetPosition(t),e.activeItem.params.items[i].imgurl=t.url,e.$apply()},{direct:!0,multiple:!1})})},e.resetPosition=function(t){t.width&&t.height&&(e.activeItem.params.positionStyle.width=t.width,e.activeItem.params.positionStyle.height=t.height,e.setModulePositionStyle(e.activeItem.params.positionStyle))}}]),angular.module("wapeditorApp").controller("RewardCtrl",["$scope",function(e){e.changeSize=function(t){switch(e.activeItem.params.fontactive=t,e.activeItem.params.fonttype=t,t){case"big":e.activeItem.params.baseStyle.fontSize="36px";break;case"middle":e.activeItem.params.baseStyle.fontSize="26px";break;case"small":e.activeItem.params.baseStyle.fontSize="16px"}}}]),angular.module("wapeditorApp").controller("RichTextCtrl",["$scope","$sce",function(e,t){e.trustAsHtml=function(e,a){return!e&&a&&(e=a.replace(/\#quot;/g,"&quot;")),t.trustAsHtml(e)}}]),angular.module("wapeditorApp").controller("ShapeCtrl",["$scope","$http",function(e,t){e.page={currentPage:1,numPages:1,toPage:"",totalItems:0,pageSize:18},e.addItem=function(){t({method:"GET",url:window.sysinfo.siteroot+"web/Common/resource/images/app/shape/shape.json",cache:!0}).success(function(t){e.sysCategoryList=t.sysCategoryList,e.sysImageTag=t.sysImageTag,e.sysImageList=t.sysImageList,e.activeItem.params.catlistActive=1,e.activeItem.params.imgListActive=4,e.page.numPages=a(),e.pages=i(),n(1),e.currentImageList=o(e.activeItem.params.imgListActive,1),$("#shapeModal").modal("show")})},e.getSysCatAndList=function(t){var s=$.inArray(t,e.sysCategoryList);for(var r in e.sysCategoryList)if(r==s){e.sysCategoryList[r].active=!0,e.activeItem.params.catlistActive=e.sysCategoryList[r].id;var l=1;for(var c in e.sysImageTag)e.sysImageTag[c].parentid==e.sysCategoryList[r].id&&1==l?(e.activeItem.params.imgListActive=e.sysImageTag[c].id,e.sysImageTag[c].active=!0,e.page.numPages=a(),e.pages=i(),n(1),e.currentImageList=o(e.activeItem.params.imgListActive,1),l++):e.sysImageTag[c].active=!1}else e.sysCategoryList[r].active=!1},e.getSysImgByTag=function(t){var s=$.inArray(t,e.sysImageTag);for(var r in e.sysImageTag)r==s?(e.sysImageTag[r].active=!0,e.activeItem.params.imgListActive=e.sysImageTag[r].id,e.page.numPages=a(),e.pages=i(),n(1),e.currentImageList=o(e.activeItem.params.imgListActive,1)):e.sysImageTag[r].active=!1},e.selectSvg=function(a,n){var i=a.target.dataset.url;i=i.split("../"),t({method:"GET",url:window.sysinfo.siteroot+i[1]}).success(function(t){for(var a,n=$(t),i=n.length,s=0;i>s;s++)if("svg"==n[s].tagName){a=n[s];break}e.saveModulePosition();var o=parseFloat($(a).attr("width")),r=parseFloat($(a).attr("height"));o>=r?e.activeItem.params.positionStyle.height=e.activeItem.params.positionStyle.width*r/o:e.activeItem.params.positionStyle.width=e.activeItem.params.positionStyle.height*o/r,e.setModulePositionStyle(e.activeItem.params.positionStyle),e.activeItem.params.svgValue=t,$("#shapeModal").modal("hide")})},e.selectPage=function(t){(t=parseInt(t))>0&&t<=e.page.numPages&&(e.page.currentPage=t,e.pages=i(),n(t),e.currentImageList=o(e.activeItem.params.imgListActive,t))},e.getImgByPage=function(){var t=parseInt(e.page.toPage);t>0&&t<=e.page.numPages&&(e.page.currentPage=t,e.pages=i(),n(t),e.currentImageList=o(e.activeItem.params.imgListActive,t))};var a=function(){var t=s(e.activeItem.params.imgListActive);return Math.ceil(t/e.page.pageSize)},n=function(t){for(var a in e.pages)t==e.pages[a].number?e.pages[a].active=!0:e.pages[a].active=!1},i=function(){var t=[];if(e.page.numPages<=5)for(i=1;i<=e.page.numPages;i++)e.page.currentPage==i?t.push({number:i,active:!0}):t.push({number:i,active:!1});else{var a=e.page.currentPage-2,n=e.page.currentPage+2;if(a>0)if(n<=e.page.numPages)t=[{number:a,active:!1},{number:e.page.currentPage-1,active:!1},{number:e.page.currentPage,active:!0},{number:e.page.currentPage+1,active:!1},{number:n,active:!1}];else for(i=e.page.numPages-4;i<=e.page.numPages;i++)i==e.page.currentPage?t.push({number:i,active:!0}):t.push({number:i,active:!1});else for(var i=1;i<=5;i++)e.page.currentPage==i?t.push({number:i,active:!0}):t.push({number:i,active:!1})}return t},s=function(t){var a=0;for(var n in e.sysImageList)t==e.sysImageList[n].parentid&&a++;return a},o=function(t,a){var n=[],i=0,s=((a=parseInt(a)>0?parseInt(a):1)-1)*e.page.pageSize,o=a*e.page.pageSize;for(var r in e.sysImageList)t==e.sysImageList[r].parentid&&(i>=s&&i<o&&n.push(e.sysImageList[r]),i++);return n}}]),angular.module("wapeditorApp").controller("TextNavCtrl",["$scope",function(e){e.addItem=function(){e.activeItem.params.items.push({title:"",url:""}),e.changeInnerHeight()},e.removeItem=function(t){index=$.inArray(t,e.activeItem.params.items),items=_.clone(e.activeItem.params.items),e.activeItem.params.items=[];for(i in items)i!=index&&e.activeItem.params.items.push(items[i]);e.changeInnerHeight()}}]),angular.module("wapeditorApp").controller("TitleCtrl",["$scope",function(e){e.changeNavEnable=function(t){e.activeItem.params.tradition.nav.enable=t}}]),angular.module("wapeditorApp").controller("WhiteCtrl",["$scope",function(e){}]),angular.module("accountApp",["we7app","infinite-scroll"]),angular.module("accountApp").controller("SystemAccountDisplay",["$scope","config",function(e,t){e.lists=t.lists,e.links=t.links}]),angular.module("accountApp").controller("SystemAccountRecycle",["$scope","$http","config",function(e,t,a){e.del_accounts=a.del_accounts,e.links=a.links,e.delete=function(e,n){if(!confirm("此为永久删除,删除后不可找回, 进入后台任务删除!确认吗?"))return!1;t.post(a.links.postDel,{acid:e,uniacid:n}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message,e.redirect,"error")})}}]),angular.module("accountApp").controller("AccountPostStepOne",["$scope","config",function(e,t){}]),angular.module("accountApp").controller("AccountPostStepTwo",["$scope","config",function(e,t){e.account={},e.uploadMultiImage=function(t){require(["fileUploader"],function(a){a.init(function(a){e.account[t]=a.url,e.$apply(e.account)},{direct:!0,multiple:!1})})},e.delMultiImage=function(t){e.account[t]=""}}]),angular.module("accountApp").controller("AccountPostStepThree",["$scope","$http","config","AccountAppCommon",function(e,t,a,n){e.notify=a.notify,e.owner=a.owner,e.links=a.links,e.selectOwner=function(e){e.preventDefault(),n.selectOwner()},e.changeGroup=function(){if(!$('input[name="uid"]').val())return $("#groupid").val(0),util.message("请先选择管理员"),!1;n.update_package_list($("#groupid").find("option:selected").data("package"))},e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"},e.addPermission=n.addPermission}]),angular.module("accountApp").controller("AccountPostStepFour",["$scope","config","AccountAppCommon",function(e,t,a){e.account=t.account,e.links=t.links,e.url=t.links.siteroot+"api.php?id="+e.account.acid,e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');a.copySuccess(e,t)}}]),angular.module("accountApp").controller("AccountManageBase",["$scope","$http","config","AccountAppCommon",function(e,t,a,n){e.account=a.account,e.uniaccount=a.uniaccount,e.authstate=a.authstate,e.authurl=a.authurl,e.founder=a.founder,e.owner=a.owner,e.other={headimgsrc:a.headimgsrc+"?nocache="+Math.random(),qrcodeimgsrc:a.qrcodeimgsrc+"?nocache="+Math.random(),serviceUrl:a.links.siteroot+"api.php?id="+e.account.acid,siteurl:a.links.siteroot},e.changeImage=function(t,a){"headimgsrc"!=t&&"qrcodeimgsrc"!=t||require(["fileUploader"],function(n){n.init(function(a){e.other[t]=a.url,e.$apply(e.other),e.httpChange(t)},{direct:!0,multiple:!1,uniacid:a})})},e.success=function(e){var e=parseInt(e),t=$('<a href="javascript:;" class="btn btn-success btn-sm we7-margin-left-sm"><i class="fa fa-check-circle"></i> 复制成功</a>');n.copySuccess(e,t)},e.editInfo=function(t,a){e.middleAccount={},e.middleAccount[t]=a},e.httpChange=function(i,s){switch(i){case"headimgsrc":case"qrcodeimgsrc":t.post(a.links.basePost,{type:i,imgsrc:e.other[i]}).success(function(t){0==t.message.errno?($(".wechat-img").attr("src",e.other[i]),util.message("修改成功!","","success")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"name":case"account":case"original":case"level":case"key":case"secret":case"attachment_limit":if($("#"+i).modal("hide"),0==e.middleAccount[i].length&&"attachment_limit"!=i)return util.message("不可为空!","","error"),!1;t.post(a.links.basePost,{type:i,request_data:e.middleAccount[i]}).success(function(t){0==t.message.errno?(e.account[i]=e.middleAccount[i],util.message("修改成功!","","success")):(1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"jointype":if($("#jointype").modal("hide"),1==e.middleAccount.type&&t.post(a.links.basePost,{type:"jointype",request_data:1}).success(function(t){0==t.message.errno?(e.account[i]=e.middleAccount[i],e.account.type=1,util.message("修改成功!","","success")):(1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))}),3==e.middleAccount.type)if(1==a.authurl.errno)util.message(a.authurl.url);else{if(!confirm("必须通过公众号授权登录页面进行授权接入,是否跳转至授权页面..."))return!1;location.href=a.authurl.url}break;case"token":if($("#token").modal("hide"),void 0===s){if(!confirm("确定要生成新的吗?"))return!1;var o=n.tokenGen()}else{if(0==(o=$("#newtoken").val()).length)return util.message("不可为空!"),!1;if(!(l=new RegExp(/^[A-Za-z0-9]{3,32}$/)).test(o))return util.message("必须为英文或者数字,长度为3到32个字符!"),!1}t.post(a.links.basePost,{type:i,request_data:o}).success(function(t){0==t.message.errno?(e.account[i]=o,util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"encodingaeskey":if($("#encodingaeskey").modal("hide"),void 0===s){if(!confirm("确定要生成新的吗?"))return!1;var r=n.encodingAESKeyGen()}else{if(0==(r=$("#newencodingaeskey").val()).length)return util.message("不可为空!"),!1;var l=new RegExp(/^[A-Za-z0-9]{43}$/);if(!l.test(r))return util.message("必须为英文或者数字,长度为43个字符!"),!1}t.post(a.links.basePost,{type:i,request_data:r}).success(function(t){0==t.message.errno?(e.account[i]=r,util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"highest_visit":"number"==typeof e.middleAccount.highest_visit&&t.post(a.links.basePost,{type:i,request_data:e.middleAccount.highest_visit}).success(function(t){0==t.message.errno?(e.account[i]=e.middleAccount.highest_visit,util.message("修改成功!")):util.message(t.message.message,"","error")});break;case"endtime":var c=$('[name="endtime"]').val();t.post(a.links.basePost,{type:"endtime",endtype:e.middleAccount.endtype,endtime:c}).success(function(t){1==t.message.errno?util.message(t.message.message,"","info"):(e.account.endtype=e.middleAccount.endtype,e.account.end=2==e.account.endtype?c:"永久",util.message("修改成功!"))})}}}]),angular.module("accountApp").controller("AccountMangeModulesTpl",["$scope","$http","config",function(e,t,a){function n(){var t="#content-templates";0==e.jurindex&&(t="#content-modules"),$("#jurisdiction-add "+t+" .item").size()!=$("#jurisdiction-add "+t+" .item.active").size()?e.allmodule=!1:e.allmodule=!0}e.owner=a.owner,e.modules_tpl=a.modules_tpl,e.packagelist=a.packagelist,e.extend=a.extend,e.allmodule=!1,e.jurindex=0,e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"},e.changeGroup=function(){for(var e=$('input[name="package[]"]'),n=[],i=0;i<e.length;i++)$(e[i]).is(":checked")&&n.push($(e[i]).val());t.post(a.links.postModulesTpl,{type:"group",groupdata:n}).success(function(e){0==e.message.errno?location.reload():40035==e.message.errno&&util.message("参数错误!")})},e.tabChange=function(t){e.jurindex=t,n()},e.itemclick=function(){n()},e.allmodulechange=function(t){var a="#content-templates";0==e.jurindex&&(a="#content-modules"),t?$("#jurisdiction-add "+a+" .item").addClass("active"):$("#jurisdiction-add "+a+" .item").removeClass("active")},e.addExtend=function(){var e="",n="",i=[],s=[];$("#jurisdiction-add #content-modules").find(".active").each(function(){e+='<div class="col-sm-3 text-left we7-margin-bottom"><a href="javascript:;" class="label label-info">'+$(this).attr("data-title")+"</a></div>",i.push($(this).attr("data-name"))}),$("#jurisdiction-add #content-templates").find(".active").each(function(){n+='<div class="col-sm-3 text-left we7-margin-bottom"><a href="javascript:;" class="label label-info">'+$(this).attr("data-title")+"</a></div>",s.push($(this).attr("data-id"))}),e||n?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").append(e),$(".account-package-extra .js-extra-templates").append(n),$("#jurisdiction-add").modal("hide"),t.post(a.links.postModulesTpl,{type:"extend",module:i,tpl:s}).success(function(e){0==e.message.errno?location.reload():40035==e.message.errno&&util.message("参数错误!")})},e.editEndTime=function(t,a){e.middleTime=t,e.middleGoodsId=parseInt(a),$("#endtime").modal("show"),$('input[name="endtime"]').val(t)},e.httpChange=function(){var n=$('input[name="endtime"]').val();t.post(a.links.postModulesTpl,{type:"store_endtime",new_time:n,order_id:e.middleGoodsId}).success(function(e){0==e.message.errno&&util.message(e.message.message,e.redirect)})}}]),angular.module("accountApp").controller("AccountManageUsers",["$scope","$http","config",function(e,t,a){e.vice_founder=a.vice_founder,e.owner=a.owner,e.manager=a.manager,e.operator=a.operator,e.state=a.state,e.setPermission=function(e){var e=parseInt(e);location.href=a.links.setPermission+"&uid="+e},e.delPermission=function(e){var e=parseInt(e);if(!confirm("确认删除当前选择的用户?"))return!1;t.post(a.links.delete,{uid:e}).success(function(e){util.message(e.message,e.redirect)})},e.addOwner=function(){$("#owner-modal").modal("hide");var t=$.trim($("#add-owner-username").val());e.requestPost(3,t)},e.changeOwner=function(e){$("#owner-modal").modal("show"),$("#add-owner-username").val(e)},e.changeVice=function(e){$("#user-modal").modal("show"),$("#addtype-4").prop("checked",!0),$("#add-username").val(e)},e.addUsername=function(){$("#user-modal").modal("hide");var t=$.trim($("#add-username").val()),a=$(".addtype");$.each(a,function(n,i){$(a[n]).is(":checked")&&e.requestPost($(a[n]).val(),t)})},e.requestPost=function(e,n){if(!n)return util.message("请输入用户名."),!1;var e=parseInt(e);t.post(a.links.addUser,{username:n,addtype:e,account_type:a.accountType,token:a.token}).success(function(e){0==e.message.errno?location.reload():(-1==e.message.errno&&util.message(e.message.message),1==e.message.errno&&util.message("添加失败,请稍候重试!"),2==e.message.errno&&util.message(n+"已经是该公众号的操作员或管理员,请勿重复添加!"),3==e.message.errno&&util.message("用户未通过审核,请联系网站管理员审核通过后再行添加!"),4==e.message.errno&&util.message("管理员不可操作其他管理员!"),5!=e.message.errno&&6!=e.message.errno||util.message(e.message.message))})}}]),angular.module("accountApp").controller("AccountManageSms",["$scope","$http","config",function(e,t,a){e.notify=a.notify,e.signatures=a.signatures,e.editSms=function(t,a){e.middleSms={},e.middleSms[t]=a},e.httpChange=function(n){switch(n){case"balance":$("#balance").modal("hide"),t.post(a.links.postSms,{type:n,balance:e.middleSms[n]}).success(function(t){0==t.message.errno?(e.notify.sms[n]=t.message.message.num,util.message("修改成功!")):(-1==t.message.errno&&util.message("您现有短信数量为0,请联系服务商购买短信!"),1==t.message.errno&&util.message("修改失败!请稍候重试!"))});break;case"signature":$("#signature").modal("hide"),t.post(a.links.postSms,{type:n,signature:e.middleSms[n]}).success(function(t){0==t.message.errno?(e.notify.sms[n]=e.middleSms[n],util.message("设置成功!")):(40035==t.message.errno&&util.message("参数错误!"),1==t.message.errno&&util.message("修改失败!请稍候重试!"))})}}}]),angular.module("accountApp").controller("SystemPlatform",["$scope","$http","config","AccountAppCommon",function(e,t,a,n){e.platform=a.platform,e.url=a.url,e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="btn btn-success we7-margin-left-sm"><i class="fa fa-check-circle"></i> 复制成功</span>');n.copySuccess(e,t)},e.httpChange=function(i,s){switch(i){case"authstate":var o=1==e.platform.authstate?0:1;t.post(a.links.platformPost,{authstate:o}).success(function(t){0==t.message.errno?(e.platform.authstate=o,util.message("修改成功!","","success")):1==t.message.errno&&util.message("修改失败,请稍后重试!")});break;case"appid":$("#AppID").modal("hide");var r=$("#newappid").val();t.post(a.links.platformPost,{appid:r}).success(function(t){0==t.message.errno?(e.platform.appid=r,util.message("修改成功!")):1==t.message.errno&&util.message("修改失败,请稍后重试!")});break;case"appsecret":$("#AppSecret").modal("hide");var l=$("#newappsecret").val();t.post(a.links.platformPost,{appsecret:l}).success(function(t){0==t.message.errno?(e.platform.appsecret=l,util.message("修改成功!")):1==t.message.errno&&util.message("修改失败,请稍后重试!")});break;case"token":if(void 0===s){if(!confirm("确定要生成新的吗?"))return!1;var c=n.tokenGen()}else{if(0==(c=$("#newtoken").val()).length)return util.message("不可为空!"),!1;if(!(d=new RegExp(/^[A-Za-z0-9]{3,32}$/)).test(c))return util.message("必须为英文或者数字,长度为3到32个字符!"),!1}t.post(a.links.platformPost,{token:c}).success(function(t){0==t.message.errno?(e.platform.token=c,util.message("修改成功!")):1==t.message.errno&&util.message("修改失败,请稍后重试!")});break;case"encodingaeskey":if(void 0===s){if(!confirm("确定要生成新的吗?"))return!1;var u=n.encodingAESKeyGen()}else{if(0==(u=$("#newencodingaeskey").val()).length)return util.message("不可为空!"),!1;var d=new RegExp(/^[A-Za-z0-9]{43}$/);if(!d.test(u))return util.message("必须为英文或者数字,长度为43个字符!"),!1}t.post(a.links.platformPost,{encodingaeskey:u}).success(function(t){0==t.message.errno?(e.platform.encodingaeskey=u,util.message("修改成功!")):1==t.message.errno&&util.message("修改失败,请稍后重试!")})}}}]),angular.module("accountApp").controller("AccountManageWxappCtrl",["$scope","$http","config",function(e,t,a){e.wxapp_modules=a.wxapp_modules,e.current_module_info=a.current_module_info,e.showWxModules=function(){$("#module_wxapp").modal("show")},e.selectedWxModule=function(t,a){var n=$(a.target).parents(".select-module-wxapp");n.find("span").removeClass("hide"),n.siblings().find("span").addClass("hide"),e.newWxModule=t},e.addWxModules=function(){t.post(a.links.editmodule,{module:e.newWxModule,account_type:4}).success(function(e){$("#module_wxapp").modal("hide"),0==e.message.errno?location.reload():util.message(e.message.message)})},e.delWxModule=function(){t.post(a.links.delmodule,{module:e.current_module_info,account_type:4}).success(function(e){0==e.message.errno?location.reload():util.message(e.message.message)})}}]),angular.module("accountApp").controller("AccountDisplay",["$scope","$http","$timeout","config",function(e,t,a,n){e.account_type_phoneapp=n.account_type_phoneapp,e.list=n.list,e.type=n.type,e.title=n.title,e.links=n.links,e.types=n.types,e.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","#","全部"],e.activeLetter="",e.keyword=n.keyword,e.letter=n.letter,e.searchShow=n.total>0,e.currentPage=1,e.busy=!1,e.loadMore=function(){if(e.busy)return!1;e.currentPage++,e.busy=!0,t.post(n.scrollUrl,{page:e.currentPage,keyword:n.keyword,letter:n.letter,founder_id:n.founder_id}).success(function(t){if(e.busy=!1,0==t.message.errno){e.searchShow=!0,0==t.message.message.length&&2==e.currentPage&&(e.searchShow=!1);for(var a in t.message.message)e.list.push(t.message.message[a])}e.busy=!1})},e.searchModule=function(t){e.activeLetter=t,a(function(){$(".button").click()},500)},e.stick=function(a,n){var a=parseInt(a);t.post(e.links.rank,{uniacid:a,type:n}).success(function(e){0==e.message.errno?location.reload():util.message(e.message.message)})},e.showVersions=function(e){var t=$(e.target).parents(".mask").next(".cut-select");"none"==t.css("display")?(t.css("display","block"),t.parent(".wxapp-list-item").siblings().find(".cut-select").css("display","none")):t.css("display","none")},e.hideSelect=function(e){$(e.target).css("display","none")}}]),angular.module("accountApp").service("AccountAppCommon",["$rootScope","$http","config",function(e,t,a){var n={};return n.addPermission=function(){var e="",t="";$("#jurisdiction-add #content-modules").find(".btn-primary").each(function(){e+='<span class="label label-info" style="margin-right:3px;">'+$(this).attr("data-title")+'</span><input type="hidden" name="extra[modules][]" value="'+$(this).attr("data-name")+'" />'}),$("#jurisdiction-add #content-templates").find(".btn-primary").each(function(){t+='<span class="label label-info" style="margin-right:3px;">'+$(this).attr("data-title")+'</span><input type="hidden" name="extra[templates][]" value="'+$(this).attr("data-name")+'" />'}),e||t?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").html(e),$(".account-package-extra .js-extra-templates").html(t),$("#jurisdiction-add").modal("hide")},n.update_package_list=function(e){$('input[name="package[]"]').prop("checked",!1),$('input[name="package[]"]').prop("disabled",!1);for(i in e)$('input[name="package[]"][value="'+e[i]+'"]').prop("checked",!0),$('input[name="package[]"][value="'+e[i]+'"]').prop("disabled",!0)},n.selectOwner=function(){var e=[];require(["biz"],function(i){i.user.browser(e,function(e){t.post(a.links.userinfo,{uid:e}).success(function(e){e.message.errno&&util.message(e.message.message),$("#manager").val(e.message.message.uid),$("#showname").val(e.message.message.username),$("#groupid").val(e.message.message.group.id),$(".account-package-extra").show(),n.update_package_list(e.message.message.package)})},{mode:"invisible",direct:!0})})},n.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},n.tokenGen=function(){for(var e="",t=0;t<32;t++)e+="abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32*Math.random())];return e},n.encodingAESKeyGen=function(){for(var e="",t=0;t<43;t++)e+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[parseInt(61*Math.random()+1)];return e},n}]),angular.module("we7codeAppjsonApp",["we7app"]),angular.module("we7codeAppjsonApp").controller("code_appjson_ctrl",["$scope","$q","config","$http",function(e,t,a,n){var i=a.default_appjson,s=a.save_url,o=a.default_url,r=a.convert_img_url;angular.isString(i)&&(i=JSON.parse(i)),i||(i={pages:{},windows:{}});var l=i.hasOwnProperty("tabBar")?i.tabBar:{list:[]};l&&!l.list&&(l.list=[]),l&&!l.isSystemTabBar&&(l.isSystemTabBar=1),i&&i.windows&&i.windows.navigationBarTitleText&&i.windows.navigationBarTitleText.indexOf("微擎")&&(i.windows.navigationBarTitleText="小程序"),e.pages=i.pages,e.window=i.window,e.tabBar=l,$("body").on("click",".js-image",function(){var t=$(this).data("index"),i="0"==$(this).data("selected")?"iconPath":"selectedIconPath";util.image({},function(s){n.post(r,{version_id:a.version_id,att_id:s.id}).then(function(a){0==a.data.message.errno&&(e.tabBar.list[t][i]=a.data.message.message)})})}),e.toJson=function(){return{pages:e.pages,window:e.window,tabBar:e.tabBar}},e.iconPath=function(e){return e.iconPath},e.save=function(t){var i=e.toJson();n.post(s,{json:i,version_id:a.version_id}).then(function(e){0==e.data.message.errno?util.message(e.data.message.message,e.data.redirect,"success"):util.message(e.data.message.message,"","error")})},e.add=function(){e.tabBar.list.push({iconSelectedPath:"",iconPath:"",pagePath:e.pages[0],text:""})},e.del=function(t){e.tabBar.list.splice(t,1)},e.default=function(){n.post(o,{version_id:a.version_id}).then(function(e){0==e.data.message.errno?util.message(e.data.message.message,e.data.redirect,"success"):util.message(e.data.message.message,"","error")})},util.colorpicker(".js-color",function(){})}]),angular.module("articleApp",["we7app"]),angular.module("articleApp").controller("commentsCtr",["$scope","$compile","config","$http",function(e,t,a,n){e.do=a.do,e.changePage=function(a,i){n.get(a+"&page="+i).success(function(a){e.comment_list=a.message.message.list,e.pager=a.message.message.pager,(!e.comment_list||e.comment_list.length<1)&&$(".js-list").html("暂无评论"),$(".js-pager").html(t(e.pager)(e))})},e.changePage(a.get_comments_url,1),e.likeComment=function(t){if("comments"==e.do)return!1;n.post(a.like_comment_url,t).success(function(e){if(0!=e.message.errno)return util.message(e.message.message),!1;t.like_num=1*t.like_num+1})},e.replyarticle=function(e){e.replying=!0},e.cancel=function(e){e.replying=!1},e.send=function(e){n.post(a.reply_url,e).success(function(t){if(0!=t.message.errno)return util.message(t.message.message),!1;e.replys.push(t.message.message),e.replying=!1,e.replycontent=""})}}]),angular.module("replyFormApp",["we7app"]),angular.module("replyFormApp").controller("KeywordReply",["$scope","$http","config",function(e,t,a){e.reply={advanceTrigger:!1,status:!0,showAdvance:!1,keyword:{exact:"",indistinct:"",contain:"",regexp:""},entry:a.replydata},e.reply.entry?(e.reply.entry.istop=e.reply.entry.displayorder>=255?1:0,e.reply.status=1==e.reply.entry.status,e.reply.entry.keywords||(e.reply.entry.keywords=[])):e.reply.entry={istop:0,displayorder:"",id:"",keywords:[],module:"",name:"",status:1,uniacid:a.uniacid},e.changeStatus=function(){e.reply.status=!e.reply.status},e.changeKeywordType=function(t){var t=parseInt(t);e.newKeyword={type:t,content:""},$("#keyword-indistinct").next().text(""),$("#keyword-exact").next().text(""),$("#keyword-regexp").next().text("")},e.showAddkeywordModal=function(){$("#addkeywordModal").modal("show"),e.newKeyword={type:1,content:""}},e.addNewKeyword=function(){t.post("./index.php?c=platform&a=reply&do=post",{keyword:e.newKeyword.content}).success(function(t){if(-2==t.message.errno)return util.message(t.message.message),!1;if(0==t.message.errno){$("#addkeywordModal").modal("hide");var a=parseInt(e.newKeyword.type);switch(a){case 1:case 2:var n=e.newKeyword.content.replace(/,/g,",").split(",");angular.forEach(n,function(t){""!=t&&e.reply.entry.keywords.push({type:a,content:t})});break;case 3:e.reply.entry.keywords.push(e.newKeyword)}}})},e.delKeyword=function(t){var a=_.findIndex(e.reply.entry.keywords,t);e.reply.entry.keywords=_.without(e.reply.entry.keywords,e.reply.entry.keywords[a])},e.changeTriggerType=function(){"exact"==e.reply.advanceTrigger&&(e.reply.advanceTrigger=!1),"indistinct"==e.reply.advanceTrigger&&(e.reply.advanceTrigger=!0)},e.changeShowAdvance=function(){e.reply.showAdvance=!e.reply.showAdvance},$.isFunction(window.initReplyController)&&window.initReplyController(e,t),e.submitForm=function(){var a=angular.toJson(e.reply.entry.keywords);if($(':hidden[name="keywords"]').val(a),$.isFunction(window.validateReplyForm)){if(!window.validateReplyForm($("#reply-form"),$,_,util,e,t))return!1;$(".reply-form-submit").click()}else $(".reply-form-submit").click()},e.initEmotion=function(t){util.emotion($("#emoji-exact"),$("#keyword-exact"),function(t,a,n){e.newKeyword.content+=t,e.$apply(e.newKeyword)}),util.emotion($("#emoji-indistinct"),$("#keyword-indistinct"),function(t,a,n){e.newKeyword.content+=t,e.$apply(e.newKeyword)})},e.checkKeyWord=function(e){var n=$(e.target),i=n.val().trim();if(""==i)return n.next().text(""),!1;t.post("./index.php?c=platform&a=reply&do=post",{keyword:i}).success(function(e){if(0!=e.message.errno){if(-2==e.message.errno)return n.next().html(e.message.message),!1;var t=$('input[name="rid"]').val(),i=e.message.message,s="";for(rule in i)if(t!=i[rule].id){var o=i[rule].name?i[rule].name:i[rule].id;s+="<a href='"+a.links.postUrl+"&rid="+i[rule].id+"' target='_blank'><strong class='text-danger'>"+o+"</strong></a>&nbsp;"}""!=s&&n.next().html("该关键字已存在于 "+s+" 规则中.")}else n.next().text("")})}}]),angular.module("replyFormApp").controller("ApplyReply",["$scope",function(e){e.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],e.activeLetter="",e.searchModule=function(t){e.activeLetter=t}}]),angular.module("replyFormApp").controller("KeywordDisplay",["$scope","$http",function(e,t){e.changeStatus=function(e){var a=$("#key-"+e).attr("class");t.post("./index.php?c=platform&a=reply&do=change_keyword_status",{id:e}).success(function(t){0==t.message.errno?(a.match("switchOn")?$("#key-"+e).removeClass("switchOn"):$("#key-"+e).addClass("switchOn"),util.message("修改成功!")):util.message("网络错误,请稍候重试")}).error(function(e){util.message("网络错误,请稍候重试")})}}]),angular.module("replyFormApp").controller("serviceDisplay",["$scope","config","$http",function(e,t,a){e.changeStatusUrl=t.url,e.service=t.service,e.changeStatus=function(t){var t=file=t;a.post(e.changeStatusUrl,{rid:t,file:file,m:"service"}).success(function(a){0==a.message.errno?(e.service[t].switch=""==e.service[t].switch?"checked":"",location.reload()):util.message("网络错误,请稍候重试")})}}]),angular.module("replyFormApp").controller("SpecialDisplay",["$scope","config","$http",function(e,t,a){e.config=t,e.url=t.url,e.msgtypes={image:e.config.image,voice:e.config.voice,video:e.config.video,shortvideo:e.config.shortvideo,location:e.config.location,trace:e.config.trace,link:e.config.link,merchant_order:e.config.merchant_order,ShakearoundUserShake:e.config.ShakearoundUserShake,ShakearoundLotteryBind:e.config.ShakearoundLotteryBind,WifiConnected:e.config.WifiConnected,qr:e.config.qr},e.switch_class=new Array,angular.forEach(e.msgtypes,function(t,a){e.switch_class[a]="module"==t||"keyword"==t?"switch switchOn special_switch":"switch special_switch"}),e.changestatus=function(t){a.post(e.url,{type:t}).success(function(a){0==a.message.errno?(e.switch_class[t]="switch switchOn special_switch"==e.switch_class[t]?"switch special_switch":"switch switchOn special_switch",util.message("修改成功!")):util.message(a.message.message)})}}]),angular.module("replyFormApp").controller("PostCtrl",["$scope","config","$http",function(e,t,a){require(["underscore","util"],function(t,a){window.initReplyController(e)}),e.switch_class=t.class,e.status="module"==t.status||"keyword"==t.status?t.status:"",e.change=function(t,a){e.status=0==a?1:0,e.switch_class=1==e.status?"switch switchOn special_switch":"switch special_switch"}}]),angular.module("replyFormApp").controller("WelcomeDisplay",["$scope",function(e){$.isFunction(window.initReplyController)&&window.initReplyController(e)}]),angular.module("replyFormApp").controller("DefaultDisplay",["$scope",function(e){$.isFunction(window.initReplyController)&&window.initReplyController(e)}]),angular.module("replyFormApp").directive("ngInvoker",["$parse",function(e){return function(e,t,a){e.$eval(a.ngInvoker)}}]),angular.module("replyFormApp").directive("ngMyEditor",function(){var e={scope:{value:"=ngMyValue"},template:'<textarea id="editor" style="height:600px;width:100%;"></textarea>',link:function(t,a,n){if(!a.data("editor")){var i={autoClearinitialContent:!1,toolbars:[["fullscreen","source","preview","|","bold","italic","underline","strikethrough","forecolor","backcolor","|","justifyleft","justifycenter","justifyright","|","insertorderedlist","insertunorderedlist","blockquote","emotion","link","removeformat","|","rowspacingtop","rowspacingbottom","lineheight","indent","paragraph","fontfamily","fontsize","|","inserttable","deletetable","insertparagraphbeforetable","insertrow","deleterow","insertcol","deletecol","mergecells","mergeright","mergedown","splittocells","splittorows","splittocols","|","anchor","map","print","drafts"]],elementPathEnabled:!1,initialFrameHeight:200,focus:!1,maximumWords:9999999999999,autoFloatEnabled:!1};e=UE.getEditor("editor",i),a.data("editor",e),e.addListener("contentChange",function(){t.value=e.getContent().replace(/\&quot\;/g,'"'),t.$root.$$phase||t.$apply("value")}),$(a).parents("form").submit(function(){e.queryCommandState("source")&&e.execCommand("source")}),e.addListener("ready",function(){e&&e.getContent()!=t.value&&e.setContent(t.value),t.$watch("value",function(t){e&&e.getContent()!=t&&e.setContent(t||"")})})}}};return e}),angular.module("replyFormApp").filter("nl2br",["$sce",function(e){return function(t){return t?e.trustAsHtml(t.replace(/\n/g,"<br/>")):""}}]),angular.module("cloudApp",["we7app"]),angular.module("cloudApp").controller("FileProcessorCtrl",["$scope","$http","config",function(e,t,a){e.files=a.files,e.fails=[];var n=e.files.length,i=1,s="",o=a.tasknum&&""!=a.type?a.tasknum:1;o>n&&(o=1);var r=function(){var o=e.files.pop();if(!o&&i>=n)return util.message("文件同步完成,正在处理数据同步......"),void("theme"==a.type?location.href="./index.php?c=cloud&a=process&step=schemas&t="+a.appname+"&is_upgrade="+a.is_upgrade:"webtheme"==a.type?location.href="./index.php?c=cloud&a=process&step=schemas&w="+a.appname+"&is_upgrade="+a.is_upgrade:location.href="./index.php?c=cloud&a=process&step=schemas&m="+a.appname+"&is_upgrade="+a.is_upgrade+"&batch=1&account_type="+a.account_type);e.file=o,e.pragress=i+"/"+n;var l={path:o,type:a.type};t.post(location.href,l).success(function(t){i++,"success"!=t&&(e.fails.push("["+t+"] "+o),s=t),r()}).error(function(){i++,e.fails.push(o),r()})};for(j=0;j<o;j++)r()}]).controller("SchemasProcessorCtrl",["$scope","$http","config",function(e,t,a){e.schemas=a.schemas,e.fails=[];a.is_module_install;var n=e.schemas.length,i=1,s=function(){util.message("未能成功执行处理数据库, 请联系开发商解决. ")},o=function(){var a=e.schemas.pop();if(!a)return e.fails.length>0?void s():void(location.href="");e.schema=a,e.pragress=i+"/"+n;var r={table:a};t.post(location.href,r).success(function(t){i++,"success"!=t&&e.fails.push(a),t.message?util.message(t.message):o()}).error(function(){i++,e.fails.push(a),o()})};o()}]).controller("CloudDiagnoseCtrl",["$scope","$http","config",function(e,t,a){e.showToken=function(){util.message("Token:"+$("#token").val(),"","info")},$(".js-checkip p").each(function(){var e=$(this);$.getJSON("./index.php?c=cloud&a=diagnose&do=testapi&ip="+e.find("#serverdnsip").html(),function(t){e.find("#checkresult").html(t.message.message)})}),$.ajax({type:"get",data:{date:a.date,version:a.version,siteurl:a.siteurl},url:"//s.we7.cc/index.php?c=site&a=diagnose&jsonpcallback=?",dataType:"jsonp",success:function(e){"0"==e.check_time.errno?$("#check-time").html('<i class="fa fa-check text-success"></i> 正常'):$("#check-time").html('<i class="fa fa-remove text-warning"></i> 异常,当前时间为:'+e.check_time.message.localtime+"; 服务器时间为:"+e.check_time.message.servertime),"0"==e.check_touch.errno?$("#check-touch").html('<i class="fa fa-check text-success"></i> 正常'):$("#check-touch").html('<i class="fa fa-remove text-warning"></i> 异常,'+e.check_touch.message)},error:function(){alert("fail")}})}]),angular.module("we7codeuploadApp",["we7app"]),angular.module("we7codeuploadApp").controller("code_upload_ctrl",["$scope","config","codeservice","$q","$http",function(e,t,a,n,i){e.qrcode_src="",e.preview_qrcode="",e.show_wait=!1,e.step=1,e.show_step1=!0,e.show_step2=!1,e.show_step3=!1,e.wait_sec=15,e.user_desc="",e.user_version=t.user_version;var s=null,o=null,r=15,l=setInterval(function(){--r<=0&&(r=0,clearInterval(l)),e.$apply(function(){e.wait_sec=r})},1e3);e.beginUpload=function(){if(!e.user_version||!/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(e.user_version))return util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"),!1;c()};var c=function(){e.show_wait=!0,e.show_step1=!1,a.codeuid(t.version_id,e.user_version).then(function(e){return a.retrycodegen(e)}).then(function(t){return s=t,e.show_wait=!1,a.get_code_token()}).then(function(a){e.qrcode_src=t.QRCODEURL+"&code_token="+a,clearInterval(l);var i=n.defer();return i.resolve(a),i.promise}).then(function(t){return e.show_wait=!1,e.step=2,e.show_step2=!0,a.retrychecksan(t,408)}).then(function(t){o=t,e.commit()},function(e){clearInterval(l),util.message(e)})};e.preview=function(){a.preview(o,s).then(function(t){e.preview_qrcode="data:image/jpg;base64,"+t,$("#qrCodeModal").modal("show")},function(e){util.message(e)})},e.commit=function(){if(!e.user_version||!/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(e.user_version))return util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"),!1;a.commit(o,s,e.user_version,e.user_desc).then(function(){e.step=3,e.show_step2=!1,e.show_step3=!0,i.post(t.upgrade_url,{version_id:t.version_id,version:e.user_version,description:e.user_desc}).success(function(e){})},function(e){util.message(e)})}}]),angular.module("we7codeuploadApp").service("codeservice",["$http","$q","config",function(e,t,a){return{ajax:function(a,n){return e.get(a).then(function(e){var a=e.data,n=t.defer();return n.resolve(a),n.promise},function(){var e=t.defer();return e.reject(),e.promise})},codeuid:function(e,n){var i=t.defer();return this.ajax(a.UUIDURL+"version_id="+e+"&user_version="+n).then(function(e){if("0"!=e.errno){var t="小程序应用数据异常,无法获取,请联系开发者";e.message&&(t=e.message),i.reject(t)}else i.resolve(e.data.code_uuid)}),i.promise},codegen:function(e){var n=t.defer();return this.ajax(a.CODE_GEN_CHECK_URL+"code_uuid="+e).then(function(t){if("0"!=t.errno)n.reject("no gen");else{t.data.is_gen;n.resolve(e)}},function(e){n.reject("no gen")}),n.promise},retrycodegen:function(e){var a=t.defer(),n=this;return setTimeout(function(){n.codegen(e).then(function(t){if(!t)return n.retrycodegen(e).then(function(){a.resolve()});a.resolve(e)},function(){return n.retrycodegen(e).then(function(){a.resolve()})})},5e3),a.promise},get_code_token:function(){var e=t.defer();return this.ajax(a.CODE_TOKEN_URL).then(function(t){if("0"!=t.errno)e.reject();else{var a=t.data.code_token;e.resolve(a)}}),e.promise},checkscan:function(e,n){var i=t.defer();n||(n=408);var s=a.CHECKSANURL+"&code_token="+e+"&last="+n;return this.ajax(s).then(function(t){if(t.errno>0)i.reject(e,n);else if(0!=t.errno);else{var a=parseInt(t.data.errcode);i.resolve({errcode:a,last:n,code_token:t.data.code_token})}},function(t){i.reject(e,n)}),i.promise},retrychecksan:function(e,a){var n=t.defer(),i=this;return i.checkscan(e,a).then(function(t){var a=t.errcode,s=(t.last,t.code_token);405!=a?403!=a?666!=a?i.retrychecksan(e,a).then(function(e){n.resolve(e)}):n.reject("二维码已过期"):n.reject("已取消扫码"):n.resolve(s)},function(e,t){console.log("error"),i.retrychecksan(e,t).then(function(e){n.resolve(e)})}),n.promise},preview:function(e,n){var i=t.defer(),s=a.PREVIEWURL+"code_token="+e+"&code_uuid="+n;return this.ajax(s).then(function(e){if("0"==e.errno){var t=e.data.qrcode_img;i.resolve(t)}var a=e.message;""==a&&(a="预览失败, 确保当前扫码用户有上传小程序的权限"),i.reject(a)}),i.promise},commit:function(e,n,i,s){var o=t.defer(),r=a.COMMITURL+"code_token="+e+"&user_version="+i+"&user_desc="+s+"&code_uuid="+n;return this.ajax(r).then(function(e){if("0"!=e.errno){var t=e.message;""==t&&(t="上传代码失败, 确保当前扫码用户有上传小程序的权限"),o.reject(t)}else o.resolve()}),o.promise}}}]),angular.module("fansApp",["we7app"]).value("config",{running:!1,syncState:"",downloadState:""}).controller("DisplayCtrl",["$scope","$http","config","$q",function(e,t,a,n){e.config=a,e.addTagUrl=a.addTagUrl,e.tag="",e.searchMod=a.searchMod,e.closeValue=0,e.registerUrl=a.registerUrl,e.register=[],e.sync_member=0,e.switchSearchMod=function(t){e.searchMod=t,e.$apply(e.searchMod)},e.addTag=function(){t.post(e.addTagUrl,{tag:e.tag}).success(function(e){})},e.registerMember=function(t){e.register.openid=t,e.register.password="",e.register.repassword=""},e.register=function(){return $(".modal").modal("hide"),""==e.register.password?(util.message("新密码不可为空!"),!1):""==e.register.repassword?(util.message("确认新密码不可为空!"),!1):e.register.password!=e.register.repassword?(util.message("两次密码不一致!"),!1):void t.post(e.registerUrl,{password:e.register.password,repassword:e.register.repassword,openid:e.register.openid}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"ajax"):util.message(e.message.message)})},e.syncMember=function(){t.get(a.syncMember+"&sync_member="+e.sync_member).success(function(t){0==t.message.errno?($("#sync-setting").modal("hide"),e.sync_member=1==t.message.message?1:0):(e.sync_member=0,util.message("设置失败, 请重试!"))})},e.downloadFans=function(n,i){var s,o=new RegExp("(^| )we7:sync_fans_pindex:"+window.sysinfo.uniacid+"=([^;]*)(;|$)");if(s=document.cookie.match(o))return e.sync("all",{pageindex:unescape(s[2])}),!1;i||(i=0),void 0==n&&(n="",util.message("正在下载粉丝数据...")),t.post(a.syncAllUrl,{next_openid:n}).success(function(t){if(0!=t.message.errno){var a="";return"string"==typeof t.message?a=t.message:"string"==typeof t.message.message&&(a=t.message.message),util.message("粉丝下载失败。具体原因:"+a),!1}if(i+=parseInt(t.message.message.count),t.message.message.total<=i||!t.message.message.count&&!t.message.message.next)return e.sync("all"),!1;e.downloadFans(t.message.message.next,i)})},e.sync=function(i,s){if("all"==i)s||((s={}).pageindex=0,s.total=0,util.message("粉丝数据下载完成。开始更新粉丝数据...","","success")),s.type="all",s.sync_member=e.sync_member;else{if(s={type:"check",openids:[],sync_member:e.sync_member},$(".openid:checked").each(function(){s.openids.push(this.value)}),0==s.openids.length)return util.message("请选择粉丝","","info"),!1;util.message("正在同步粉丝数据请不要关闭浏览器...")}s.pageindex>0&&0==e.closeValue&&($("#modal-message").modal("hide"),util.dialog("更新进度",'<div class="progress"> <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="'+s.pageindex/s.total*100+'" aria-valuemin="0" aria-valuemax="100" style="width: '+s.pageindex/s.total*100+'%"><span class="sr-only"></span></div></div>',"",{containerName:"link-container"}).modal("show")),$(".close").click(function(){e.closeValue=1});var o=n.defer();o.promise.then(function(){t.post(e.config.syncUrl,s).success(function(t){if(void 0==t.message)return util.message("更新失败!可能是由于你当前网络不稳定,请稍后再试。","","info"),!1;if(0==t.message.errno){if("success"==t.message.message||t.message.message.total==t.message.message.pageindex)return util.message("同步粉丝数据成功",a.msgUrl,"success"),!1;e.sync("all",{pageindex:t.message.message.pageindex,total:t.message.message.total})}else{if(++s.pageindex>s)return util.message("同步粉丝数据成功",a.msgUrl,"success"),!1;e.sync("all",{pageindex:++s.pageindex,total:s.total})}})},function(e){}),1==e.closeValue?e.closeValue=0:o.resolve()}}]).controller("chatsCtrl",["$scope","$http","config",function(e,t,a){send=function(){types=[],types.text=$('[name="reply[reply_basic]"]').val(),types.news=$('[name="reply[reply_news]"]').val(),types.image=$('[name="reply[reply_image]"]').val(),types.music=$('[name="reply[reply_music]"]').val(),types.voice=$('[name="reply[reply_voice]"]').val(),types.video=$('[name="reply[reply_video]"]').val(),types.wxcard=$('[name="reply[reply_wxcard]"]').val();for(type in types)if(msg_type=type,msg_content=types[type],""!=msg_content)break;if(!msg_content)return!1;$.post(a.sendurl,{type:msg_type,content:msg_content},function(t){-1==(t=$.parseJSON(t)).message.errno?util.message(t.message.message,"","info"):($(".keywords-list li").remove(),$('[name="reply[reply_basic]"]').val(""),$('[name="reply[reply_news]"]').val(""),$('[name="reply[reply_image]"]').val(""),$('[name="reply[reply_music]"]').val(""),$('[name="reply[reply_voice]"]').val(""),$('[name="reply[reply_video]"]').val(""),$('[name="reply[reply_wxcard]"]').val(""),e.chatLogs.unshift({flag:1,createtime:t.message.message.createtime,content:t.message.message.content,msgtype:t.message.message.msgtype}),e.$apply())})},e.chatLogs=a.chatLogs,window.onbeforeunload=function(){$.get(a.endurl,{},function(e){})}}]),angular.module("homeApp",["we7app"]),angular.module("homeApp").controller("WelcomeCtrl",["$scope","$http","config",function(e,t,a){e.notices=a.notices,e.loaderror=0,e.last_modules=null,e.fans_kpi=[],t({method:"POST",url:"./index.php?c=home&a=welcome&do=get_fans_kpi"}).success(function(t){0==t.message.errno&&(e.fans_kpi=t.message.message)}),e.get_last_modules=function(){t.post("./index.php?c=home&a=welcome&do=get_last_modules").success(function(t){if(0==t.message.errno){var a=[];angular.forEach(t.message.message,function(e,t){e.wxapp||a.push(e)}),e.last_modules=a}else e.last_modules=null,e.loaderror=1})},e.get_last_modules()}]),angular.module("homeApp").controller("systemWelcomeCtrl",["$scope","$http","config",function(e,t,a){e.account_num=a.account_num,e.last_accounts_modules=a.last_accounts_modules,e.message_list=a.message_list,e.links=a.links,e.user_info=a.user_info,e.setTop=function(a){t.post(e.links.setTop,{id:a}).success(function(e){0==e.message.errno&&location.reload()})}}]),angular.module("we7job",["we7app"]),angular.module("we7job").controller("we7job-base-controller",["$scope","$http","config",function(e,t,a){var n=a.list,i=a.jobid,s=new Worker("resource/js/app/job.js?"+Math.random());if(e.list=n,function(){var t=document.location.toString().split("//"),a=t[1].indexOf("/"),n=t[1].substring(a);-1!=n.indexOf("?")&&(n=n.split("?")[0]),e.relUrl=n}(),e.start=function(t){t.relUrl=e.relUrl,t.start=!t.start,s.postMessage(t)},s.onmessage=function(t){var a=t.data.id;e.list[a].progress=t.data.progress,e.$apply()},i>0){var o=n[i];o&&e.start(o)}}]),angular.module("massApp",["we7app"]),angular.module(["massApp"]).controller("MassSend",["$scope","$http","config",function(e,t,a){e.showLog=function(e){var n=parseInt(e),i=$("#"+n);t.post(a.logUrl,{tid:n,type:"mass",module:"task"}).success(function(e){var t="";(e=angular.toJson(e)).message&&0!=e.message.items.length?$.each(e.message.items,function(e,a){t+="<tr><td>"+a.createtime+" "+a.note+"</td></tr>"}):t='<tr><td class="text-center"><i class="fa fa-info-circle"></i> 暂无数据</td></tr>',i.popover({html:!0,placement:"left",trigger:"manual",title:"触发日志",content:'<table class="table-cron table">'+t+"</table>"}),i.popover("toggle")})},e.hideLog=function(e){var t=parseInt(e);$("#"+t).popover("toggle")}}]),angular.module("massApp").controller("MassPost",["$scope","config",function($scope,config){$scope.groups=config.groups,$scope.massdata=config.massdata,$scope.clock=config.massdata?config.massdata.clock:"08:00",$.isFunction(window.initReplyController)&&window.initReplyController($scope),1==$scope.massdata.type?$(".sendtime").show():$(".sendtime").hide(),$(".mass-type").change(function(){1==$("select[name='type']").val()?$(".sendtime").show():$(".sendtime").hide()}),$scope.checkSubmit=function(e){var selectedGroup=$(".mass-group").val();if(""==selectedGroup)return e.preventDefault(),util.message("请选择群发对象"),!1;if(-1==selectedGroup){var group_fans_all={id:-1,name:"全部粉丝",count:0};$(':hidden[name="group"]').val(angular.toJson(group_fans_all))}else angular.forEach($scope.groups,function(e,t){e.id==selectedGroup&&$(':hidden[name="group"]').val(angular.toJson(e))});if(""==$scope.clock)return e.preventDefault(),util.message("请选择群发具体时间"),!1;if("0"==config.day){var selectedTime=$scope.clock.split(":"),d=new Date,hours=d.getHours(),minutes=d.getMinutes();if(selectedTime[0]<hours||selectedTime[0]==hours&&selectedTime[1]<minutes)return e.preventDefault(),util.message("发送时间不能小于当前时间"),!1}var reply_news=$(':hidden[name="reply[reply_news]"]').val(),reply_image=$(':hidden[name="reply[reply_image]"]').val(),reply_music=$(':hidden[name="reply[reply_music]"]').val(),reply_voice=$(':hidden[name="reply[reply_voice]"]').val(),reply_video=$(':hidden[name="reply[reply_video]"]').val(),reply_basic=$(':hidden[name="reply[reply_basic]"]').val();if(""==reply_news&&""==reply_image&&""==reply_music&&""==reply_voice&&""==reply_video&&""==reply_basic)return e.preventDefault(),util.message("请选择群发素材"),!1;if(""!=reply_news){if("perm"!=(reply_news=eval("("+reply_news+")")).model)return e.preventDefault(),util.message("群发不支持本地/服务器素材,请选择微信素材"),!1;$(':hidden[name="reply[reply_news]"]').val(reply_news.mediaid)}""!=reply_image&&(reply_image=eval("("+reply_image+")"),$(':hidden[name="reply[reply_image]"]').val(reply_image)),""!=reply_music&&(reply_music=eval("("+reply_music+")"),$(':hidden[name="reply[reply_music]"]').val(reply_music)),""!=reply_voice&&(reply_voice=eval("("+reply_voice+")"),$(':hidden[name="reply[reply_voice]"]').val(reply_voice)),""!=reply_video&&(reply_video=eval("("+reply_video+")"),$(':hidden[name="reply[reply_video]"]').val(reply_video.mediaid))},$(".clockpicker").clockpicker({autoclose:!0})}]),angular.module("massApp").controller("MassDisplay",["$scope","$http","config",function(e,t,a){e.days=a.days,e.delMass=function(a,n){var a=parseInt(a),n=parseInt(n);return!!confirm("确认清空这条群发吗?")&&(t.post("./index.php?c=platform&a=mass&do=del",{id:a}).success(function(t,a){t.message.errno?util.message("清空群发失败:<br>"+t.message.message,"","error"):e.days[n].info=""}),!1)},e.toEdit=function(e){var e=parseInt(e);window.location.href="./index.php?c=platform&a=mass&do=post&day="+e},e.preview=function(a){var a=parseInt(a);if(!e.days[a].info)return util.message("群发内容错误!"),!1;var n=e.days[a].info.media_id,i=e.days[a].info.msgtype;$("#modal-view").modal("show"),$("#modal-view .btn-view").unbind().click(function(){var e=$.trim($("#modal-view #wxname").val());return e?($("#modal-view").modal("hide"),t.post("./index.php?c=platform&a=mass&do=preview",{media_id:n,wxname:e,type:i}).success(function(e){0!=e.message.errno?util.message(e.message.message):util.message("发送成功","","success")}),!1):(util.message("微信号不能为空","","error"),!1)})}}]),angular.module("materialApp",["we7app"]),angular.module("materialApp").directive("ngMyEditor",function(){return{scope:{value:"=ngMyValue",imguploadurl:"@ngMyUpurl"},template:'<textarea id="editor" style="height:600px;width:100%;"></textarea>',link:function(e,t,a){t.data("editor")||util.editor("editor",{allow_upload_video:0,callback:function(a,n){t.data("editor",n),n.addListener("contentChange",function(){e.value=n.getContent(),e.$root.$$phase||e.$apply("value")}),n.addListener("ready",function(){n&&n.getContent()!=e.value&&n.setContent(e.value),e.$watch("value",function(e){n&&n.getContent()!=e&&n.setContent(e||"")})}),n.setOpt("imageActionName","uploadimage"),n.setOpt("imageFieldName","file"),n.setOpt("imageUrlPrefix",""),UE.Editor.prototype._bkGetActionUrl=UE.Editor.prototype.getActionUrl,UE.Editor.prototype.getActionUrl=function(t){return"uploadimage"==t?e.imguploadurl:this._bkGetActionUrl.call(this,t)}}},!0)}}}).controller("materialDisplay",["$scope","$http","config",function(e,t,a){e.materialList=a.materialList,e.groups=a.group,e.config=a,e.group="",e.materialType="",e.materialId="",e.syncNews=a.syncNews,e.hidenbutton=0,e.typeName=a.typeName,e.sync=function(n,i,s,o,r){$(window).bind("beforeunload",function(){return"您输入的内容尚未保存,确定离开此页面吗?"}),void 0==i?util.message("正在同步素材,请勿关闭浏览器..."):util.message("已同步"+parseInt((i-1)/s*100)+"%,请勿关闭浏览器..."),t.post(a.sync_url,{type:n,pageindex:i,total:s,wechat_existid:o,original_newsid:r}).success(function(t){0==t.message.errno?($(window).unbind("beforeunload"),util.message("同步素材成功","./index.php?c=platform&a=material&type="+n,"success")):(sync_info=t.message.message,e.sync(sync_info.type,sync_info.pageindex,sync_info.total,sync_info.wechat_existid,sync_info.original_newsid))})},1==e.syncNews&&e.sync("news"),e.upload=function(t,a,n){require(["fileUploader"],function(i){i.init(function(){util.message("上传成功",location.href,"success")},{type:t,direct:!0,multiple:a,isWechat:n,typeName:e.typeName})})},e.del_material=function(e,n,i){if(!confirm("删除不可恢复确认删除吗?"))return!1;t.post(a.del_url,{material_id:n,type:e,server:i}).success(function(t){0!=t.message.errno?util.message("删除失败,具体原因:"+t.message.message,"","info"):util.message("删除成功","./index.php?c=platform&a=material&type="+e+("local"==i?"&islocal=true":""),"success")})},e.checkGroup=function(t,a){$("#check-group").modal("show"),e.materialType=t,e.materialId=a,e.group=""},e.transToWechat=function(n,i){util.message("素材转换将在后台运行,成功后后自动刷新页面,请勿关闭浏览器..."),t.post(a.trans_url,{material_id:i}).success(function(t){0!=t.message.errno?util.message("转换失败,具体原因:"+t.message.message,"","info"):e.sync(n)})},e.newsToWechat=function(a){util.message("素材转换将在后台运行,成功后后自动刷新页面,请勿关闭浏览器..."),t.post(e.config.postwechat_url,{material_id:a}).success(function(e){0==e.message.errno?util.message("已保存","./index.php?c=platform&a=material","success"):alert("创建图文失败"+e.message.message)})},e.sendMaterial=function(){t.post(e.config.send_url,{type:e.materialType,id:e.materialId,group:e.group}).success(function(t){1==t.message.errno?util.message(t.message.message,"","info"):util.message("群发成功","./index.php?c=platform&a=material&type="+e.materialType,"success")})},e.createNew=function(t){var a=e.config.create_new_url+"&new_type="+t;window.location=a},e.choiceSendType=function(e,t,a){$(".web-mobile-choice-type a[class = 'we7-margin-bottom']").attr("data-url",e),$(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-type",t),$(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-media-id",a)},e.wabPreview=function(){$("#modalWechatView").modal("hide"),window.open($(".web-mobile-choice-type a[class = 'we7-margin-bottom']").attr("data-url"),"_blank")},e.mobilePreview=function(){var e=$(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-media-id"),a=$(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-type");$(".material-wechat-view").addClass("hidden"),$("#weixin-dialog").removeClass("hidden"),$("#modalWechatView .btn-send").unbind().click(function(){var n=$.trim($("#modalWechatView #wxname").val());return n?($("#weixin-dialog").addClass("hidden"),$(".material-wechat-view").removeClass("hidden"),$("#modalWechatView #wxname").val(""),$("#modalWechatView").modal("hide"),t.post("./index.php?c=platform&a=mass&do=preview",{media_id:e,wxname:n,type:a}).success(function(e){0!=e.message.errno?util.message(e.message.message):util.message("发送成功","","success")}),!1):(util.message("微信号不能为空","","error"),!1)})},e.previewBack=function(){$("#weixin-dialog").addClass("hidden"),$(".material-wechat-view").removeClass("hidden")}}]).controller("materialAdd",["$scope","material","$http","$timeout",function(e,t,a,n){e.config=t,e.operate=t.operate,e.model=t.model,e.new_type=t.new_type,e.hidenbutton="reply"==t.new_type?0:1,e.typeName=t.typeName,e.changeClass=function(){angular.forEach(e.materialList,function(t,a){e.materialList[a].class="0"==a?e.activeIndex==a?"cover-appmsg-item active":"cover-appmsg-item":e.activeIndex==a?"appmsg-item active":"appmsg-item"})},e.tomedia=function(e){var a="";return $.ajax({url:t.url,async:!1,data:{url:e},success:function(e){var e=$.parseJSON(e);a=e.message.message}}),a},e.changeOrder=function(a,n){t={},"down"==a?(t=e.materialList[n],e.materialList[n]=e.materialList[n+1],e.materialList[n+1]=t):(t=e.materialList[n],e.materialList[n]=e.materialList[n-1],e.materialList[n-1]=t)},e.deleteMaterial=function(t){confirm("确定要删除吗?")&&(e.materialList.splice(t,1),e.activeIndex=e.activeIndex-1)},e.changeIndex=function(t){e.activeIndex=t,e.changeClass()},e.addMaterial=function(){void 0==e.materialList?(e.materialList=[],e.activeIndex=0):e.activeIndex=e.materialList.length,e.materialList.push({id:"",title:"",author:"",thumb:"",media_id:"",displayorder:"0",digest:"",content:"",content_source_url:"",show_cover_pic:0,class:""}),e.changeClass()},"add"==e.operate&&"reply"!=e.config.type?e.addMaterial():(e.activeIndex=0,e.materialList=[],angular.forEach(t.materialList,function(t,a){t.thumb_url=e.tomedia(t.thumb_url),e.materialList[a]={id:t.id,title:t.title,author:t.author,thumb:t.thumb_url,media_id:t.thumb_media_id,displayorder:a,digest:t.digest,content:t.content,content_source_url:t.content_source_url,url:t.url,show_cover_pic:isNaN(Number(t.show_cover_pic))?0:Number(t.show_cover_pic),class:""}}),e.changeClass()),e.pickPicture=function(t){isWechat="wechat"==t,require(["fileUploader"],function(t){t.init(function(t){e.materialList[e.activeIndex].thumb=t.url,e.materialList[e.activeIndex].media_id=t.media_id,e.$apply()},{type:"image",direct:!0,multiple:!1,isWechat:isWechat,typeName:e.typeName,image_limit:e.config.image_limit,voice_limit:e.config.voice_limit,video_limit:e.config.video_limit})})},e.updateSelection=function(){e.materialList[e.activeIndex].show_cover_pic=isNaN(Number(!e.materialList[e.activeIndex].show_cover_pic))?0:Number(!e.materialList[e.activeIndex].show_cover_pic)},e.saveNews=function(t){news=[];var n="",i="";if(angular.forEach(e.materialList,function(a,s){""==a.title?(n=s,i="请输入标题后,再点击保存按钮"):""!=a.content||"wechat"!=t&&"reply"!=e.new_type?""==a.content&&"wechat"==t?(n=s,i="图文内容中图片上传失败,请重新上传"):(a.displayorder=s+1,news[s]=a):(n=s,i="请输入一段正文,再点击保存按钮")}),""!==n)return e.activeIndex=n,e.changeClass(),alert(i),!1;util.message("正在生成图文消息,请勿关闭浏览器...");var s="add"==e.config.operate?"":e.config.materialList[0].attach_id;a.post(e.config.newsUpload_url,{news:news,operate:e.operate,attach_id:s,type:e.config.type,target:t,news_rid:e.config.news_rid}).success(function(t){0==t.message.errno?util.message("已保存",e.config.msg_url,"success"):alert("创建图文失败"+t.message.message)})},e.exportFromCms=function(){e.searchCms()},e.searchCms=function(t){var n={};n.header='<ul role="tablist" class="nav nav-pills" style="font-size:14px; margin-top:-20px;">\t<li role="presentation" class="active" id="li_goodslist"><a data-toggle="tab" role="tab" aria-controls="articlelist" href="#articlelist">文章列表</a></li></ul>',n.content='<div class="tab-content"><div id="articlelist" class="tab-pane active" role="tabpanel">\t<table class="table table-hover">\t\t<thead class="navbar-inner">\t\t\t<tr>\t\t\t\t<th style="width:40%;">标题</th>\t\t\t\t<th style="width:30%">创建时间</th>\t\t\t\t<th style="width:30%; text-align:right">\t\t\t\t\t<div class="input-group input-group-sm hide">\t\t\t\t\t\t<input type="text" class="form-control">\t\t\t\t\t\t<span class="input-group-btn">\t\t\t\t\t\t\t<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>\t\t\t\t\t\t</span>\t\t\t\t\t</div>\t\t\t\t</th>\t\t\t</tr>\t\t</thead>\t\t<tbody></tbody>\t</table>\t<div id="pager" style="text-align:center;"></div></div></div>',n.footer="",n.articleitem='<%_.each(list, function(item) {%> \n<tr>\n\t<td><a href="#" data-cover-attachment-url="<%=item.attachment%>" title="<%=item.title%>"><%=item.title%></a></td>\n\t<td><%=item.createtime%></td>\n\t<td class="text-right">\n\t\t<button class="btn btn-default js-btn-select" js-id="<%=item.id%>">选取</button>\n\t</td>\n</tr>\n<%});%>\n',$("#link-search-cms")[0]?e.modalobj=$("#link-search-cms").data("modal"):(e.modalobj=util.dialog(n.header,n.content,n.footer,{containerName:"link-search-cms"}),e.modalobj.find(".modal-body").css({height:"680px","overflow-y":"auto"}),e.modalobj.modal("show"),e.modalobj.on("hidden.bs.modal",function(){e.modalobj.remove()}),$("#link-search-cms").data("modal",e.modalobj)),t=t||1,a.get("./index.php?c=utility&a=link&do=articlelist&page="+t).success(function(t,a,i,s){t.message.message.list&&(e.modalobj.find("#articlelist").data("articles",t.message.message.list),e.modalobj.find("#articlelist tbody").html(_.template(n.articleitem)(t.message.message)),e.modalobj.find("#pager").html(t.message.message.pager),e.modalobj.find("#pager .pagination li[class!='active'] a").click(function(){return e.searchCms($(this).attr("page")),!1}),e.modalobj.find(".js-btn-select").click(function(){e.addCms($(this).attr("js-id")),e.$apply(),e.modalobj.modal("hide")}))})},e.addCms=function(t){var a=e.modalobj.find("#articlelist").data("articles")[t];e.materialList[e.activeIndex].title=a.title,e.materialList[e.activeIndex].thumb=a.thumb_url,e.materialList[e.activeIndex].author=a.author,e.materialList[e.activeIndex].incontent=1==a.incontent,e.materialList[e.activeIndex].description=a.description,e.materialList[e.activeIndex].content=a.content,e.materialList[e.activeIndex].content_source_url=a.linkurl,e.materialList[e.activeIndex].detail=""!=a.content}}]),angular.module("memberAPP",["we7app"]),angular.module("memberAPP").controller("group",["$scope","$http","config",function(e,t,a){e.config=a,e.group_level=e.config.group_level,e.group_person_count=e.config.group_person_count,e.group_list=e.config.group_list,e.default_group=e.config.default_group,e.set_group_detail_info=function(a){e.group_detail={},t.post(e.config.get_group_url,{group_id:a}).success(function(t){1==t.message.errno?util.message(t.message.message,"","error"):e.group_detail=t.message.message}),$("#group_detail").modal("show")},e.change_group_level=function(){t.post(e.config.change_group_level_url,{group_level:e.group_level}).success(function(e){0==e.message.errno?util.modal_message("","设置成功","","success"):util.message("设置失败","","error")})},e.save_group=function(){if(""==e.group_detail.title)return util.message("请填写会员组名称","","error"),!1;t.post(e.config.save_group_url,{group:e.group_detail}).success(function(t){1==t.message.errno&&util.message(t.message.message,"","error"),2==t.message.errno&&($("#group_detail").modal("hide"),e.group_list[e.group_detail.groupid]=e.group_detail,util.message(t.message.message,"","success")),3==t.message.errno&&(groupid=t.message.message.groupid,e.group_list[groupid]=t.message.message,$("#group_detail").modal("hide"),util.message("添加成功","","success"))})},e.set_default=function(a){t.post(e.config.set_default_url,{group_id:a}).success(function(t){0==t.message.errno?(e.group_list[a].isdefault=1,e.group_list[e.default_group.groupid].isdefault=0,e.default_group=e.group_list[a],e.apply(e),util.message("设置成功","","success")):util.message("设置失败","","error")})},e.del_group=function(a){if(!confirm("确定要删除吗?"))return!1;t.post(e.config.del_group_url,{group_id:a}).success(function(t){0==t.message.errno?(delete e.group_list[a],util.message("删除成功","","success")):util.message("删除失败","","error")})}}]),angular.module("memberAPP").controller("baseInformation",["$scope","$http","config",function(e,t,a){e.config=a,e.profile=e.config.profile,e.groups=e.config.groups,e.addresses=e.config.addresses,e.custom_fields=e.config.custom_fields,e.all_fields=e.config.all_fields,e.uniacid_fields=e.config.uniacid_fields,e.sexes=[{id:0,name:"保密"},{id:1,name:"男"},{id:2,name:"女"}],e.educations=["博士","硕士","本科","专科","中学","小学","其它"],e.constellations=["水瓶座","双鱼座","白羊座","金牛座","双子座","巨蟹座","狮子座","处女座","天秤座","天蝎座","射手座","摩羯座"],e.zodiacs=["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],e.bloodtypes=["A","B","AB","O","其它"],e.profile.births=e.profile.birthyear+"-"+e.profile.birthmonth+"-"+e.profile.birthday,e.profile.resides=e.profile.nationality+e.profile.resideprovince+e.profile.residecity+e.profile.residedist,e.other_field_name="",e.other_field_title="",e.addAddress={name:"",phone:"",code:"",province:"",city:"",district:"",detail:""},e.editAddress={},e.uid=e.config.uid,angular.forEach(e.addresses,function(e,t){e.pcda=e.province+"-"+e.city+"-"+e.district+"-"+e.address}),e.addAdd=function(){e.addAddress.province=$(".tpl-province").eq(1).val(),e.addAddress.city=$(".tpl-city").eq(1).val(),e.addAddress.district=$(".tpl-district").eq(1).val(),$("#address-add").modal("hide"),t.post(a.links.addAddressUrl,e.addAddress).success(function(t){if(0==t.message.errno){var a=t.message.message;a.pcda=a.province+"-"+a.city+"-"+a.district+"-"+a.address,e.addresses.push(a),util.message("收货地址添加成功","","success")}else 1==t.message.errno&&util.message(t.message.message,"","error")})},e.choseEditAdd=function(t){angular.forEach(e.addresses,function(a,n){a.id==t&&(e.editAddress={id:t,name:a.username,phone:a.mobile,code:a.zipcode,province:a.province,city:a.city,district:a.district,detail:a.address,uniacid:a.uniacid},$(".tpl-province").eq(2).attr("data-value",e.editAddress.province),$(".tpl-city").eq(2).attr("data-value",e.editAddress.city),$(".tpl-district").eq(2).attr("data-value",e.editAddress.district),require(["district"],function(e){$(".tpl-district-container").each(function(){var t={};t.province=$(this).find(".tpl-province")[0],t.city=$(this).find(".tpl-city")[0],t.district=$(this).find(".tpl-district")[0];var a={};a.province=$(t.province).attr("data-value"),a.city=$(t.city).attr("data-value"),a.district=$(t.district).attr("data-value"),e.render(t,a,{withTitle:!0})})}))})},e.editAdd=function(n){e.editAddress.province=$(".tpl-province").eq(2).val(),e.editAddress.city=$(".tpl-city").eq(2).val(),e.editAddress.district=$(".tpl-district").eq(2).val(),$("#address-edit").modal("hide"),t.post(a.links.editAddressUrl,e.editAddress).success(function(t){if(0==t.message.errno){var a=t.message.message;a.pcda=a.province+"-"+a.city+"-"+a.district+"-"+a.address,angular.forEach(e.addresses,function(e,t){a.id==e.id&&(e.pcda=a.pcda)}),util.message("收货地址修改成功","","success")}else 1==data.message.errno&&util.message(t.message.message,"","error")})},e.delAdd=function(n){t.post(a.links.delAddressUrl,{id:n}).success(function(t){0==t.message.errno?(angular.forEach(e.addresses,function(t,a){n==t.id&&e.addresses.splice(a,1)}),util.message("收货地址删除成功","","success")):1==data.message.errno&&util.message(t.message.message,"","error")})},e.setDefaultAdd=function(n){t.post(a.links.setDefaultAddressUrl,{id:n,uid:e.uid}).success(function(t){0==t.message.errno?(angular.forEach(e.addresses,function(e,t){n==e.id?e.isdefault=1:e.isdefault=0}),util.message("设置成功","","success")):util.message("设置失败","","success")})},e.changeImage=function(t){"avatar"==t&&require(["fileUploader"],function(a){a.init(function(a){e.profile.avatar=a.attachment,e.profile.avatarUrl=a.url,e.$apply(e.profile),e.httpChange(t)},{direct:!0,multiple:!1})})},e.editInfo=function(t,a){e.userOriginal={},"other_field"==t?(e.userOriginal[a]=e.profile[a],e.other_field_name=e.all_fields[a],e.other_field_title=a):e.userOriginal[t]=a},e.httpChange=function(n,i){switch(n){case"avatar":t.post(a.links.basePost,{type:n,imgsrc:e.profile.avatar}).success(function(e){0==e.message.errno?util.message("修改成功!","","success"):(-1==e.message.errno&&util.message(e.message.message,e.redirect,"error"),1==e.message.errno&&util.message(e.message.message,"","error"))});break;case"groupid":case"gender":case"education":case"nickname":case"realname":case"address":case"mobile":case"qq":case"email":case"telephone":case"msn":case"taobao":case"alipay":case"graduateschool":case"grade":case"studentid":case"revenue":case"position":case"occupation":case"company":case"nationality":case"height":case"weight":case"idcard":case"zipcode":case"site":case"affectivestatus":case"lookingfor":case"bio":case"interest":case"constellation":case"zodiac":case"bloodtype":if($("#"+n).modal("hide"),""==e.userOriginal[n])return util.message("不可为空!","","error"),!1;if("mobile"==n&&!/^\d{11}$/.test(e.userOriginal[n]))return util.message("手机号格式错误","","error"),!1;t.post(a.links.basePost,{type:n,request_data:e.userOriginal[n]}).success(function(t){0==t.message.errno?(e.profile[n]=e.userOriginal[n],util.message("修改成功!","","success")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"))});break;case"other_field":if($("#"+n).modal("hide"),""==e.userOriginal[e.other_field_title])return util.message("不可为空!","","error"),!1;t.post(a.links.basePost,{type:e.other_field_title,request_data:e.userOriginal[e.other_field_title]}).success(function(t){0==t.message.errno?(e.profile[e.other_field_title]=e.userOriginal[e.other_field_title],util.message("修改成功!","","success")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"))});break;case"births":$(".modal").modal("hide");var s=$(".tpl-year").val(),o=$(".tpl-month").val(),r=$(".tpl-day").val();t.post(a.links.basePost,{type:n,birthyear:s,birthmonth:o,birthday:r}).success(function(t){0==t.message.errno?(e.profile.births=s+"-"+o+"-"+r,util.message("修改成功!","","success")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"))});break;case"resides":$(".modal").modal("hide");var l=$(".tpl-province").eq(0).val(),c=$(".tpl-city").eq(0).val(),u=$(".tpl-district").eq(0).val();t.post(a.links.basePost,{type:n,resideprovince:l,residecity:c,residedist:u}).success(function(t){0==t.message.errno?(e.profile.resides=e.profile.nationality+l+c+u,util.message("修改成功!","","success")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"))});break;case"password":$(".modal").modal("hide");var d=$(".new-password").val(),p=$(".renew-password").val();if(""==d)return util.message("新密码不可为空!"),!1;if(""==p)return util.message("确认新密码不可为空!"),!1;if(d!=p)return util.message("两次密码不一致!"),!1;t.post(a.links.basePost,{type:n,password:d}).success(function(e){0==e.message.errno?util.message("密码修改成功!"):(-1==e.message.errno&&util.message(e.message.message,e.redirect,"error"),1==e.message.errno&&util.message(e.message.message,"","error"))})}}}]),angular.module("menuApp",["we7app"]),angular.module("menuApp").controller("menuDisplay",["$scope","config","$http",function(e,t,a){e.changeStatus=function(e,n,i){n=1==n?2:1,3==i&&(1==n?$(".js-switch-"+e).addClass("switchOn"):2==n&&$(".js-switch-"+e).removeClass("switchOn")),a.post(t.push_url,{id:e}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect):3==i?util.message(e.message.message,"error"):util.message(e.message.message,e.redirect,"error")})}}]),angular.module("menuApp").controller("conditionMenuDesigner",["$scope","config","$http",function(e,t,a){current_menu_url=t.current_menu_url,require(["underscore","jquery.ui","jquery.caret","district"],function(e,t,t,a){t(".tpl-district-container").each(function(){var e={};e.province=t(this).find(".tpl-province")[0],e.city=t(this).find(".tpl-city")[0];var n={};n.province=t(e.province).data("value"),n.city=t(e.city).data("value"),a.render(e,n,{withTitle:!0,wechat:!0})}),t(".sub-designer-y").sortable({items:".sub-js-sortable",axis:"y",cancel:".sub-js-not-sortable"}),t(".designer-x").sortable({items:".js-sortable",axis:"x"})}),e.context={},e.context.group=t.group,t.id>0&&1!=t.type&&1==t.status&&(e.context.group.disabled=1),e.initGroup=function(){e.context.group={title:"",type:t.type,button:[{name:"菜单名称",type:"click",url:"",key:"",media_id:"",appid:"",pagepath:"",sub_button:[]}],matchrule:{sex:0,client_platform_type:0,group_id:-1,country:"",province:"",city:"",language:""}}},e.context.group&&e.context.group.button||e.initGroup(),e.$watch("context.group.matchrule.province",function(e,t){""==e?$(".tpl-city").hide():$(".tpl-city").show()}),e.context.activeIndex=0,e.context.activeBut=e.context.group.button[e.context.activeIndex],e.context.activeItem=e.context.activeBut,e.context.activeType=1,e.context.remove=function(){return!!confirm("删除默认菜单会清空所有菜单记录,确定吗?")&&(location.href=t.delete_url,!1)},e.context.submit=function(n){var i=e.context.group;i.button=_.sortBy(i.button,function(e){return $(':hidden[data-role="parent"][data-hash="'+e.$$hashKey+'"]').parent().index()}),angular.forEach(i.button,function(e){e.sub_button=_.sortBy(e.sub_button,function(e){return $(':hidden[data-role="sub"][data-hash="'+e.$$hashKey+'"]').parent().index()})});$(':hidden[name="menu_media"]').val();if(!$.trim(i.title))return util.message("没有设置菜单组名称","","error"),!1;if(2==t.type&&!(i.matchrule.sex||i.matchrule.client_platform_type||-1!=i.matchrule.group_id||i.matchrule.province||i.matchrule.city))return util.message("没有设置个性化菜单的匹配规则","","error"),!1;if(i.button.length<1)return util.message("没有设置菜单","","error"),!1;var s={name:"",action:""};angular.forEach(i.button,function(e,t){""==$.trim(e.name)&&(this.name+="第"+(t+1)+"个一级菜单未设置菜单名称<br>"),e.sub_button.length>0?angular.forEach(e.sub_button,function(a,n){""==$.trim(a.name)&&(this.name+="第"+(t+1)+"个一级菜单中的第"+(n+1)+"个二级菜单未设置菜单名称<br>"),"view"==a.type&&a.url.indexOf("http")<0&&(this.action+="第"+(t+1)+"个一级菜单中的第"+(n+1)+"个二级菜单跳转链接缺少http标识<br>"),"miniprogram"==a.type&&(""==$.trim(a.appid)&&(this.action+="第"+(t+1)+"个一级菜单中的第"+(n+1)+"个二级菜单需设置APPID<br>"),""==$.trim(a.pagepath)&&(this.action+="第"+(t+1)+"个一级菜单中的第"+(n+1)+"个二级菜单需设置页面跳转地址<br>"),""==$.trim(a.url)&&(this.action+="第"+(t+1)+"个一级菜单中的第"+(n+1)+"个二级菜单需设置备用页跳转地址<br>")),("view"==a.type&&""==$.trim(a.url)||"click"==a.type&&""==a.media_id&&""==a.key||"view"!=a.type&&"click"!=a.type&&"miniprogram"!=a.type&&""==$.trim(a.key))&&(this.action+="菜单【"+e.name+"】的子菜单【"+a.name+"】未设置操作选项. <br />")},s):("view"==e.type&&e.url.indexOf("http")<0&&(this.action+="菜单【"+e.name+"】跳转链接缺少http标识. <br />"),"miniprogram"==e.type&&(""==$.trim(e.appid)&&(this.action+="菜单【"+e.name+"】需设置APPID. <br />"),""==$.trim(e.pagepath)&&(this.action+="菜单【"+e.name+"】需设置页面跳转地址. <br />"),""==$.trim(e.url)&&(this.action+="菜单【"+e.name+"】需设置备用页跳转地址. <br />")),("view"==e.type&&""==$.trim(e.url)||"click"==e.type&&""==e.media_id&&""==e.key||"view"!=e.type&&"click"!=e.type&&"miniprogram"!=e.type&&""==$.trim(e.key))&&(this.action+="菜单【"+e.name+"】不存在子菜单并且未设置操作选项. <br />"))},s),s.name?util.message(s.title,"","error"):s.action?util.message(s.action,"","error"):($("#btn-submit").attr("disabled",!0),a.post(location.href,{group:i,method:"post",submit_type:n}).success(function(e){0!=e.message.errno?($("#btn-submit").attr("disabled",!1),util.message(e.message.message,"","error")):util.message("创建菜单成功. ",e.redirect,"success")}))},e.context.triggerActiveBut=function(t){var a=$.inArray(t,e.context.group.button);if(-1==a)return!1;e.context.activeIndex=a,e.context.activeBut=e.context.group.button[e.context.activeIndex],e.context.activeItem=e.context.activeBut,e.context.activeType=1,e.context.activeItem.forceHide=0},e.context.editBut=function(t,n,i){e.context.triggerActiveBut(n),t?(e.context.activeItem=t,e.context.activeType=2):(e.context.activeItem=n,e.context.activeType=1),1==e.context.activeType&&e.context.activeItem.sub_button.length>0?e.context.activeItem.forceHide=1:e.context.activeItem.forceHide=0,i&&(e.context.activeItem.material=[],"view"!=e.context.activeItem.type&&"click"!=e.context.activeItem.type&&(e.context.activeItem.key?current_type=e.context.activeItem.key.substr(0,6):current_type="click","module"==current_type?e.context.activeItem.etype="module":e.context.activeItem.etype="click"),a.post(current_menu_url,{current_menu:e.context.activeItem}).success(function(t){0==t.message.errno&&e.context.activeItem.material.push(t.message.message)}))},e.context.addBut=function(){if(!(e.context.group.button.length>=3)){e.context.group.button.push({name:"菜单名称",type:"click",url:"",key:"",media_id:"",appid:"",pagepath:"",sub_button:[]});var t=e.context.group.button[e.context.group.button.length-1];e.context.triggerActiveBut(t),$(".designer-x").sortable({items:".js-sortable",axis:"x"})}},e.context.removeBut=function(t,a){if(1==a){if(!confirm("将同时删除所有子菜单,是否继续"))return!1;e.context.group.button=_.without(e.context.group.button,t),e.context.triggerActiveBut(e.context.group.button[0])}else e.context.activeBut.sub_button=_.without(e.context.activeBut.sub_button,t),e.context.triggerActiveBut(e.context.activeBut);e.context.activeItem.sub_button.length>0?e.context.activeItem.forceHide=1:e.context.activeItem.forceHide=0},e.context.addSubBut=function(t){if(1==e.context.group.disabled)return!1;e.context.triggerActiveBut(t),e.context.activeBut.sub_button.length>=5||(e.context.activeBut.sub_button.push({name:"子菜单名称",type:"click",url:"",key:"",appid:"",pagepath:"",media_id:""}),$(".sub-designer-y").sortable({items:".sub-js-sortable",axis:"y",cancel:".sub-js-not-sortable"}),e.context.activeItem=e.context.activeBut.sub_button[e.context.activeBut.sub_button.length-1],e.context.activeType=2,e.context.activeItem.forceHide=0)},e.context.selectEmoji=function(){util.emojiBrowser(function(t){var a="::"+t.find("span").text()+"::";$("#title").setCaret(),$("#title").insertAtCaret(a),e.context.activeItem.name=$("#title").val(),e.$digest()})},e.context.select_link=function(){$(this).parent().prev();util.linkBrowser(function(a){var n=t.site_url;"tel:"!=a.substring(0,4)?(-1==a.indexOf("http://")&&-1==a.indexOf("https://")&&(a=n+"app"+(a=a.replace("./index.php?","/index.php?"))),e.context.activeItem.url=a,e.$digest()):util.message("自定义菜单不能设置为一键拨号")})},e.context.search=function(){var a=$("#ipt-forward").val();$.post(t.search_key_url,{key_word:a},function(t){var a=(t=$.parseJSON(t)).length,n="";if(a>0)for(var i=0;i<a;i++)n+='<li><a href="javascript:;">'+t[i]+"</a></li>";else n+='<li><a href="javascript:;" id="no-result">没有找到您输入的关键字</a></li>';$("#key-result ul").html(n),$('#key-result ul li a[id!="no-result"]').click(function(){$("#ipt-forward").val($(this).html()),e.context.activeItem.key=$(this).html(),$("#key-result").hide()}),$("#key-result").show()})},e.context.select_mediaid=function(t,a){var n={type:t,isWechat:!0,needType:1};util.material(function(n){e.context.activeItem.key="",e.context.activeItem.media_id=n.media_id,e.context.activeItem.material=[],"keyword"==t?(e.context.activeItem.material.push(n),e.context.activeItem.material[0].type="keyword",e.context.activeItem.key="keyword:"+n.content,e.context.activeItem.media_id="","1"==a&&(e.context.activeItem.material[0].etype="click",e.context.activeItem.material[0].name=n.name,e.context.activeItem.material[0].content=n.content)):"image"==t?e.context.activeItem.material.push(n):"news"==t?e.context.activeItem.material.push(n):"voice"==t?e.context.activeItem.material.push(n):"video"==t?e.context.activeItem.material.push(n):"module"==t&&(e.context.activeItem.key="module:"+n.name,e.context.activeItem.material.push(n),e.context.activeItem.material[0].module_type=e.context.activeItem.material[0].type,e.context.activeItem.material[0].type="module",e.context.activeItem.material[0].etype="module"),e.$digest()},n)},e.context.editBut("",e.context.group.button[0],e.context.group.id)}]),angular.module("messageApp",["we7app"]),angular.module("messageApp").controller("messageNoticeCtrl",["$scope","$http","config",function(e,t,a){e.type=a.type,e.lists=a.lists,e.is_read=a.is_read,e.all_read_url=a.all_read_url,e.allRead=function(){t.post(e.all_read_url,{type:e.type}).success(function(e){util.message(e.message.message,e.redirect,"ajax")})},e.changeStatus=function(e,a){console.log(e),console.log(a);var n=$("#key-"+a).attr("class");t.post("./index.php?c=message&a=notice&do=setting",{property:e,type:a}).success(function(e){0==e.message.errno?(n.match("switchOn")?$("#key-"+a).removeClass("switchOn"):$("#key-"+a).addClass("switchOn"),util.message("修改成功!")):util.message("网络错误,请稍候重试")}).error(function(e){util.message("网络错误,请稍候重试")})},e.getOfficialMsg=function(e,n){t.get(a.mark_read_url+"&id="+e),window.open(n)}}]);var letterindex=["全部","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];angular.module("moduleApp",["we7app","infinite-scroll"]),angular.module("moduleApp").controller("ModuleMoreCtrl",["$scope","config",function(e,t){e.activeLetter="",e.searchModule=function(e){location.href=t.searchurl+"&letter="+e}}]).controller("moduleGroupCtrl",["$scope",function(e){e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"}}]).controller("moduleGroupPostCtrl",["$scope","$http","config",function(e,t,a){function n(t,a,n){if(e.selectedModules=[],!a)return e.selectedModules=[],void angular.forEach(t,function(e){e.selected=!1});angular.forEach(t,function(a){a.selected=!0,e.selectedModules.push(a),a.main_module&&""!=a.main_module&&void 0!=t[a.main_module]&&e.selectedModules.push(t[a.main_module])})}e.config=a,e.moduleGroup=null===a.moduleGroup?{title:""}:a.moduleGroup,e.groupHaveModuleApp=0==a.groupHaveModuleApp.length?{}:a.groupHaveModuleApp,e.groupHaveModuleWxapp=0==a.groupHaveModuleWxapp.length?{}:a.groupHaveModuleWxapp,e.groupHaveModuleWebapp=0==a.groupHaveModuleWebapp.length?{}:a.groupHaveModuleWebapp,e.groupHaveModulePhoneapp=0==a.groupHaveModulePhoneapp.length?{}:a.groupHaveModulePhoneapp,e.groupHaveModuleXzapp=0==a.groupHaveModuleXzapp.length?{}:a.groupHaveModuleXzapp,e.groupHaveModuleAliapp=0==a.groupHaveModuleAliapp.length?{}:a.groupHaveModuleAliapp,e.groupNotHaveModuleApp=a.groupNotHaveModuleApp,e.groupNotHaveModuleWxapp=a.groupNotHaveModuleWxapp,e.groupNotHaveModuleWebapp=a.groupNotHaveModuleWebapp,e.groupNotHaveModulePhoneapp=a.groupNotHaveModulePhoneapp,e.groupNotHaveModuleXzapp=a.groupNotHaveModuleXzapp,e.groupNotHaveModuleAliapp=a.groupNotHaveModuleAliapp,e.groupHaveTemplate=0==a.groupHaveTemplate.length?{}:a.groupHaveTemplate,e.groupNotHaveTemplate=a.groupNotHaveTemplate,e.selectedModules=[],e.allmodulesel=!1,e.allwxappsel=!1,e.alltemplatesel=!1,e.allwebsel=!1,e.allxzappsel=!1,e.keyword="",e.filterKeyword=function(t){angular.forEach(e.groupNotHaveModuleApp,function(e){e.hide=!1,""!=t&&-1==e.title.indexOf(t)&&(e.hide=!0)})},e.addModule=function(){$("#add_module").modal("show")},e.addModuleWxapp=function(){$("#add_module_wxapp").modal("show")},e.adTemplate=function(){$("#add_template").modal("show")},e.addModuleWebapp=function(){$("#add_module_webapp").modal("show")},e.addModulePhoneapp=function(){$("#add_module_phoneapp").modal("show")},e.addModuleXzapp=function(){$("#add_module_xzapp").modal("show")},e.addModuleAliapp=function(){$("#add_module_aliapp").modal("show")},e.selectOrCancelModule=function(t,a){t.selected=!t.selected,t.selected?e.selectModule(t,a):e.cancleModule(t,a)},e.selecteAllModule=function(t){n(e.groupNotHaveModuleApp,t)},e.selecteAllWxapp=function(t){n(e.groupNotHaveModuleWxapp,t)},e.selecteAllTemplate=function(t){n(e.groupNotHaveTemplate,t)},e.selecteAllWebapp=function(t){n(e.groupNotHaveModuleWebapp,t)},e.selecteAllXzapp=function(t){n(e.groupNotHaveModuleXzapp,t)},e.selecteAllAliapp=function(t){n(e.groupNotHaveModuleAliapp,t)},e.selecteAllPhoneapp=function(t){n(e.groupNotHaveModulePhoneapp,t)},e.selectModule=function(t,a){e.selectedModules.push(t),"module"==a&&""!=t.main_module&&void 0!=e.groupNotHaveModuleApp[t.main_module]&&e.selectedModules.push(e.groupNotHaveModuleApp[t.main_module]),"module"==a?e.selectedModules.length>=_.values(e.groupNotHaveModuleApp).length&&(e.allmodulesel=!0):"module_wxapp"==a?e.selectedModules.length==_.values(e.groupNotHaveModuleWxapp).length&&(e.allwxappsel=!0):"module_webapp"==a?e.selectedModules.length==_.values(e.groupNotHaveModuleWebapp).length&&(e.allwebappsel=!0):"module_phoneapp"==a?e.selectedModules.length==_.values(e.groupNotHaveModulePhoneapp).length&&(e.allphoneappsel=!0):"module_xzapp"==a?e.selectedModules.length==_.values(e.groupNotHaveModuleXzapp).length&&(e.allxzappsel=!0):"module_aliapp"==a?e.selectedModules.length==_.values(e.groupNotHaveModuleAliapp).length&&(e.allaliappsel=!0):e.selectedModules.length==_.values(e.groupNotHaveTemplate).length&&(e.alltemplatesel=!0)},e.cancleModule=function(t,a){if(have_plugin=!1,angular.forEach(e.selectedModules,function(e){e.main_module==t.name&&(have_plugin=!0)}),1==have_plugin)return!1;var n=_.indexOf(e.selectedModules,t);n>-1&&(e.selectedModules=_.without(e.selectedModules,e.selectedModules[n])),"module"==a?e.allmodulesel=!1:"module_wxapp"==a?e.allwxappsel=!1:"module_webapp"==a?e.allwebappsel=!1:"module_phoneapp"==a?e.allphoneappsel=!1:"module_xzapp"==a?e.allxzappsel=!1:"module_aliapp"==a?e.allaliappsel=!1:e.alltemplatesel=!1},e.addHaveModule=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveModuleApp[t.name],e.groupHaveModuleApp[t.name]=t}),e.selectedModules=[],$("#add_module").modal("hide"),e.allmodulesel=!1},e.addHaveModuleWxapp=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveModuleWxapp[t.name],e.groupHaveModuleWxapp[t.name]=t}),e.selectedModules=[],$("#add_module_wxapp").modal("hide"),e.allwxappsel=!1},e.addHaveTemplate=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveTemplate[t.name],e.groupHaveTemplate[t.name]=t}),e.selectedModules=[],$("#add_template").modal("hide")},e.addHaveModuleWebapp=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveModuleWebapp[t.name],e.groupHaveModuleWebapp[t.name]=t}),e.selectedModules=[],$("#add_module_webapp").modal("hide")},e.addHaveModuleXzapp=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveModuleXzapp[t.name],e.groupHaveModuleXzapp[t.name]=t}),e.selectedModules=[],$("#add_module_xzapp").modal("hide")},e.addHaveModuleAliapp=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveModuleAliapp[t.name],e.groupHaveModuleAliapp[t.name]=t}),e.selectedModules=[],$("#add_module_aliapp").modal("hide")},e.addHaveModulePhoneapp=function(){angular.forEach(e.selectedModules,function(t,a){delete e.groupNotHaveModulePhoneapp[t.name],e.groupHaveModulePhoneapp[t.name]=t}),e.selectedModules=[],$("#add_module_phoneapp").modal("hide")},e.delHaveModule=function(t){t.selected=!1,delete e.groupHaveModuleApp[t.name],e.groupNotHaveModuleApp[t.name]=t,""!=t.plugin&&angular.forEach(e.groupHaveModuleApp,function(a){a.main_module==t.name&&(delete e.groupHaveModuleApp[a.name],e.groupNotHaveModuleApp[a.name]=a)})},e.delHaveModuleWxapp=function(t){t.selected=!1,delete e.groupHaveModuleWxapp[t.name],e.groupNotHaveModuleWxapp[t.name]=t},e.delHaveModuleWebapp=function(t){t.selected=!1,delete e.groupHaveModuleWebapp[t.name],e.groupNotHaveModuleWebapp[t.name]=t},e.delHaveModulePhoneapp=function(t){t.selected=!1,delete e.groupHaveModulePhoneapp[t.name],e.groupNotHaveModulePhoneapp[t.name]=t},e.delHaveModuleXzapp=function(t){t.selected=!1,delete e.groupHaveModuleXzapp[t.name],e.groupNotHaveModuleXzapp[t.name]=t},e.delHaveModuleAliapp=function(t){t.selected=!1,delete e.groupHaveModuleAliapp[t.name],e.groupNotHaveModuleAliapp[t.name]=t},e.delHaveTemplate=function(t){t.selected=!1,delete e.groupHaveTemplate[t.name],e.groupNotHaveTemplate[t.name]=t},e.cancel=function(t){angular.forEach(e.selectedModules,function(e){e.selected=!1}),e.selectedModules=[],e.allmodulesel=!1,e.allwxappsel=!1,e.alltemplatesel=!1,e.allwebappsel=!1,e.allphoneappsel=!1,e.allxzappsel=!1,e.allaliappsel=!1,$("#"+t).modal("hide")},e.saveGroup=function(){var a=[];angular.forEach(e.groupHaveModuleApp,function(e,t){a.push(e.name)});var n=[];angular.forEach(e.groupHaveModuleWxapp,function(e,t){n.push(e.name)});var i={id:e.moduleGroup.id,name:e.moduleGroup.name,modules:a,wxapp:n,templates:e.groupHaveTemplate,webapp:e.groupHaveModuleWebapp,phoneapp:e.groupHaveModulePhoneapp,xzapp:e.groupHaveModuleXzapp,aliapp:e.groupHaveModuleAliapp};if(""===i.name||void 0===i.name)return util.message("请输入套餐名","","info"),!1;t({method:"POST",url:e.config.url,data:i,beforeSend:function(){$(".loader").show()},complete:function(){$(".loader").hide()}}).success(function(e){if(1==e.message.errno)return util.message(e.message.message),!1;util.message("提交成功",e.redirect,"success")})}}]).controller("installedCtrl",["$scope","$http","$compile","config","$sce",function(e,t,a,n,s){e.config=n,e.isFounder=n.isFounder,e.letters=letterindex,e.moduleList={},e.moduleinfo={},e.upgradeInfo={},e.checkUpgradeSuccess=!1,e.search={moduleName:"",letter:"全部",newVersion:"",newBranch:""};var o=1,r=0;e.welcome_module=n.welcome_module,e.moduleListSource=angular.copy(n.moduleList);for(i in e.moduleListSource)r++;e.addModuleList=function(t){var a=-1,n=15*(t-1),i=!1;for(modulename in e.moduleListSource)if("全部"==e.search.letter||e.moduleListSource[modulename].title_initial==e.search.letter)if(e.search.moduleName&&e.moduleListSource[modulename].title.indexOf(e.search.moduleName)<=-1)i=!0;else if(!e.search.newVersion||e.moduleListSource[modulename].new_version)if(!e.search.newBranch||e.moduleListSource[modulename].new_branch){if(!i){if(++a<n)continue;if(a>=n+15)break}e.moduleList[modulename]=e.moduleListSource[modulename]}else i=!0;else i=!0;else i=!0;return!1},e.addModuleList(1),t.post(e.config.checkUpgradeUrl).success(function(t){for(modulename in t.message.message)e.moduleListSource[modulename]&&(t.message.message[modulename].new_version&&(e.moduleListSource[modulename].new_version=!0),t.message.message[modulename].new_branch&&(e.moduleListSource[modulename].new_branch=!0));e.checkUpgradeSuccess=!0}),e.change_welcome_module=function(a){a==e.welcome_module&&(a=""),t.post(n.set_site_welcome_url,{name:a}).success(function(t){if(0!=t.message.errno)return util.message(t.message.message,"","error"),!1;e.welcome_module=a,util.message("设置成功","","success")})},e.loadMore=function(t,n,i){if(Math.ceil(r/15)<n)return!1;e.moduleList={},e.addModuleList(n);var s=Math.ceil(r/15);n*=1;var o=Math.max(1,n-4),l=Math.min(s,n+4);l-o<9&&(l=Math.min(s,o+8),o=Math.max(1,l-8));for(var c="<li>"+$(".js-pager li:first").html()+"</li>",u=o;u<=l;u++)c+='<li><a href="javascript:;" page="'+u+'" ng-click="loadMore(\''+t+"',"+u+')">'+u+"</a></li>";n!=s&&(c+='<li><a href="javascript:;" page="'+s+'" ng-click="loadMore(\''+t+"',"+s+')">尾页</a></li>'),$(".js-pager ul").html(a(c)(e)),$(".js-pager li").attr("class",""),$(".js-pager a[page='"+n+"']").parent().attr("class","active"),$(".js-pager .pager-nav").parent().attr("class","")},e.searchLetter=function(t){e.moduleList={},e.search.letter=t,e.search.moduleName="",o=1,e.addModuleList(o)},e.searchModuleName=function(t){if(void 0!==t&&13!=(window.event?t.keyCode:t.which))return!1;e.moduleList={},o=1,e.addModuleList(o)},e.filter=function(t){"new_version"==t&&(e.search.newVersion=!0),"new_version"==t&&(e.search.newVersion=!0),e.moduleList={},o=1,e.addModuleList(o)}}]).controller("notInstalledCtrl",["$scope","config",function(e,t){e.letters=letterindex,e.module_list=t.module_list,e.support=t.support,e.searchLetter=function(e){$(':hidden[name="letter"]').val(e),$("#search").click()}}]).controller("detailCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.isFounder=a.isFounder,e.receive_ban=a.receive_ban,e.moduleinfo=a.moduleInfo,e.subscribe=2,e.checkupgrade=0,e.show=a.show,e.editType="",t.post(e.config.checkReceiveUrl,{module_name:e.moduleinfo.name}).success(function(t){0==t.message.errno&&(e.subscribe=1)}),t.post(e.config.getUpgradeInfoUrl,{name:e.moduleinfo.name}).success(function(t){if(0!=t.message.errno&&util.message(t.message.message),(1==t.message.message.upgrade||1==t.message.message.new_branch)&&(e.checkupgrade=1,e.upgradeInfo=t.message.message,"cloud"==t.message.message.from)){var a=(new Date).getTime();a=a.toString().substr(0,10),e.upgradeInfo.service_expiretime>0&&a>e.upgradeInfo.service_expiretime?e.upgradeInfo.service_expire=!0:e.upgradeInfo.service_expire=!1}}),e.changeShow=function(t){e.show=t},e.changeSwitch=function(){t.post(e.config.receiveBanUrl,{modulename:e.moduleinfo.name}).success(function(t){0==t.message.errno&&util.message("更新成功!"),e.moduleinfo.is_receive_ban=!e.moduleinfo.is_receive_ban})},e.editModule=function(t,a){e.moduleOriginal={},e.moduleOriginal[t]=a,e.editType=t,"preview"==t||"logo"==t?e.changePicture(t):$("#module-info").modal("show")},e.changePicture=function(t){require(["fileUploader"],function(a){a.init(function(a){e.moduleOriginal[t]=a.url,e.moduleinfo[t]=a.url,e.$apply(e.moduleOriginal),e.save()},{type:"image",direct:!0,multiple:!1})})},e.delPicture=function(t){e.moduleOriginal[t]=""},e.upgrade=function(e,t,a){window.open("http://s.we7.cc/module-"+a+".html")},e.notice=function(e,t,a){var n=e?'升级服务已到期,请到商城<a class="color-default" target="_blank" href="http://s.we7.cc/module-'+t+'.html">续费。':"确认升级到本分支的最高版本吗";return e?(util.message(n,"","info","去续费","http://s.we7.cc/module-"+t+".html"),!1):!!confirm(n)&&void(location.href="./index.php?c=cloud&a=process&m="+a+"&is_upgrade=1")},e.save=function(){t.post(e.config.saveModuleUrl,{moduleinfo:e.moduleOriginal,modulename:e.moduleinfo.name}).success(function(t){0==t.message.errno?(util.message("修改成功","","success"),e.moduleinfo[e.editType]=e.moduleOriginal[e.editType],"logo"==e.editType&&(e.moduleinfo.logo=e.moduleOriginal.logo+"?v="+(new Date).getTime()),"preview"==e.editType&&(e.moduleinfo.preview=e.moduleOriginal.preview+"?v="+(new Date).getTime()),e.$apply(e.moduleinfo)):util.message("修改失败","","fail")})},change=function(e){branch=e.data("id"),$("#version-detail-"+branch).toggle(),clas="wi wi-angle-down"==e.find("i").prop("class")?"wi wi-angle-up":"wi wi-angle-down",text="wi wi-angle-down"==clas?"查看详情":"收起",e.html(text+'<i class="'+clas+'"></i>')}}]).controller("templateCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.templateList=a.templateList,e.upgradeInfo={},e.checkUpgrade=function(){t.post(e.config.url,{template:e.templateList}).success(function(t){0==t.message.errno&&(e.templateList=t.message.message)})},e.checkUpgrade(),e.setUpgradeInfo=function(a){t.post(e.config.get_upgrade_info_url,{name:a}).success(function(t){0==t.message.errno?(e.upgradeInfo=t.message.message,$("#upgradeInfo").modal("show")):1==t.message.errno&&util.message(t.message.message)})},e.upgrade=function(e){return confirm("本次升级需要花费"+e+"个交易币。确认升级?")}}]).controller("userModuleDisplayCtrl",["$scope","$http","$timeout","config",function(e,t,a,n){var i=n.userModule?Object.keys(n.userModule):{};e.account_types=n.account_types,console.log(e.account_types),e.userModule=[],e.alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","全部"],e.activeLetter=n.activeLetter,e.searchKeyword="",e.showAccounts=function(a,i){require(["underscore"],function(){var s=_.findIndex(e.userModule,{name:i});t.post(n.links.moduleAccounts,{module_name:i}).success(function(t){e.userModule[s].accounts=t.message.message});var o=$(a.target).parents(".mask").next(".cut-select");"none"==o.css("display")?(o.css("display","block"),o.parent(".module-list-item").siblings().find(".cut-select").css("display","none")):o.css("display","none")})},e.hideSelect=function(e){$(e.target).css("display","none")},e.searchKeywordModule=function(){e.searchKeyword?(e.keywordModule=[],angular.forEach(n.userModule,function(t,a){t.title.match(e.searchKeyword)&&e.keywordModule.push(t)}),e.userModule=e.keywordModule):e.userModule=n.userModule},e.searchLetterModule=function(t){e.activeLetter=t,"全部"==e.activeLetter?e.userModule=n.userModule:(e.letterModule=[],angular.forEach(n.userModule,function(t,a){t.title_initial==e.activeLetter&&e.letterModule.push(t)}),e.userModule=e.letterModule)},e.getall_last_switch=function(){t.post(n.links.getall_last_switch).success(function(e){var t=e.message.message;angular.forEach(n.userModule,function(e,a){n.userModule[a].last_switch=t[e.name]})})},e.addMoreModule=function(t){var a=15*(Math.max(1,parseInt(t))-1),s=0;return!(i.length<a)&&(angular.forEach(n.userModule,function(t,n){s>=a&&s<a+15&&e.userModule.push(t),s++}),!0)},e.currentPage=1,e.loadMore=function(){e.addMoreModule(e.currentPage),e.currentPage++},console.log(e.userModule)}]).controller("subscribeCtrl",["$scope","$http","config",function(e,t,a){e.subscribe_module=a.subscribe_module,e.types=a.types,e.change_ban_url=a.change_ban_url,e.check_receive_url=a.check_receive_url,e.change_ban=function(a){t.post(e.change_ban_url,{modulename:a}).success(function(t){0!=t.message.errno?util.message(t.message.message,"","error"):e.subscribe_module[a].receive_ban=1==e.subscribe_module[a].receive_ban?0:1})},angular.forEach(e.subscribe_module,function(a,n){t.post(e.check_receive_url,{module_name:n}).success(function(t){0==t.message.errno&&(e.subscribe_module[n].subscribe_success=1)})})}]),angular.module("paycenterApp",["cfp.hotkeys"]).controller("microPay",["$scope","$timeout","config","$http","hotkeys","servicePaycenterBase",function(e,t,a,n,i,s){card=$.parseJSON(a.card_set_str),i.add({combo:"return+up",description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.submit()}}),i.add({combo:"esc",description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.reset()}}),i.add({combo:"backspace",description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.counter_handler("backspace"),t.preventDefault()}}),i.add({combo:"-",description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){"0"!=e.micro.config.fee?e.micro.mcardPayManage():util.message("请输入金额","","error")}}),i.add({combo:"+",description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){"0"!=e.micro.config.fee?e.micro.wechatPayManage():util.message("请输入金额","","error")}}),nums=["7","8","9","4","5","6","1","2","3","0","."],e.micro=s.paycenterBaseData(card),angular.forEach(nums,function(t,a){i.add({combo:t,description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.counter_handler(t.key)}})}),e.micro.mcardPayManage=function(){$("#mcard-pay").on("shown.bs.modal",function(){$(".js-input").focus();var t=2;i.add({combo:"return",description:"Description goes here",allowIn:["INPUT"],callback:function(a,n){input_count=e.micro.input_count(),t>input_count&&e.micro.submit(),$('input[tabindex="'+t+'"]').focus(),t++}}),i.del("backspace"),angular.forEach(nums,function(e,t){i.del(e)})}),$("#mcard-pay").on("hidden.bs.modal",function(){i.del("return"),angular.forEach(nums,function(t,a){i.add({combo:t,description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.counter_handler(t.key)}})})}),$("#mcard-pay").modal("show")},e.micro.wechatPayManage=function(){$("#wechat-pay").on("shown.bs.modal",function(){$(".js-input").focus(),i.add({combo:"return",description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.submit()}}),i.del("backspace"),angular.forEach(nums,function(e,t){i.del(e)})}),$("#wechat-pay").on("hidden.bs.modal",function(){i.del("return"),angular.forEach(nums,function(t,a){i.add({combo:t,description:"Description goes here",allowIn:["INPUT"],callback:function(t,a){e.micro.counter_handler(t.key)}})})}),$("#wechat-pay").modal("show")},e.micro.num=function(t){e.micro.counter_handler(t)},e.$watch("micro.config.code",function(e,t){e&&e.length>0&&$(".js-pay-warning").html("")}),e.micro.counter_handler=function(t){if("backspace"==(t+=""))return current_fee_length=e.micro.config.fee.length,void("1"==current_fee_length?e.micro.config.fee="0":e.micro.config.fee=e.micro.config.fee.substr(0,current_fee_length-1));"clear"!=t?"0"!=e.micro.config.fee||"1"!=e.micro.config.fee.length||"."==t?e.micro.config.fee.length>=9||8==e.micro.config.fee.length&&"."==t||e.micro.config.fee.indexOf(".")>-1&&(float=e.micro.config.fee.split("."),float[1]&&float[1].length>=2||"."==t)||(e.micro.config.fee+=t):e.micro.config.fee=t:e.micro.config.fee="0"},e.micro.reset=function(){e.micro.config.fee="0"},e.$watch("micro.config.offset_money",function(t,a){var n=Math.floor(e.micro.config.member.credit1/e.micro.config.card.offset_rate);e.micro.config.offset_money=parseInt(t),t>=n&&(e.micro.config.offset_money=n),t||(e.micro.config.offset_money=0),e.micro.config.credit1=e.micro.config.card.offset_rate*e.micro.config.offset_money,e.micro.checkLast_money()}),e.$watch("micro.config.credit2",function(t,a){reg=/^\d*\.{0,1}\d{0,1}\d{0,1}$/,reg.test(t)||(e.micro.config.credit2=a),t>e.micro.config.member.credit2&&(e.micro.config.credit2=e.micro.config.member.credit2),e.micro.checkLast_money()}),e.$watch("micro.config.last_money",function(t,a){t<0&&(e.config.last_money=0),e.micro.checkLast_money()}),e.micro.checkBasic=function(){if(!$.trim(e.micro.config.body))return util.message("商品名称不能为空"),!1;var t=/^(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$/,a=$.trim(e.micro.config.fee);return t.test(a)?void 0:(util.message("支付金额不能少于0.01元"),!1)},e.micro.input_count=function(){return input_count=$("#mcard-pay input.js-input").length,input_count},e.$watch("micro.config.cardsn",function(t,a){11==t.length?e.micro.checkCard():(e.micro.config.member.uid=-1,e.micro.config.credit2=0,t.length>11&&(e.micro.config.card_error="会员卡卡号错误"))}),e.micro.mcardPay=function(t){"0"==e.micro.config.fee?util.message("请输入金额","","error"):(e.micro.config.cardsn="",e.micro.config.member.uid=-1),"1"==t?e.micro.mcardPayManage():"2"==t&&e.micro.wechatPayManage()},e.micro.is_showCode=function(){Math.floor(e.micro.config.member.credit1/e.micro.config.card.offset_rate);e.micro.config.fact_fee<=e.micro.config.member.credit2?e.micro.config.is_showCode=0:e.micro.config.card.offset_rate>0?(max=e.micro.config.fact_fee-e.micro.config.member.credit2-Math.floor(e.micro.config.member.credit1/e.micro.config.card.offset_rate),reg=/^-?[1-9]\d*$/,max>0?e.micro.config.is_showCode=1:0==max?e.micro.config.is_showCode=0:reg.test(max)?e.micro.config.is_showCode=0:e.micro.config.is_showCode=1):(max=e.micro.config.fact_fee-e.micro.config.member.credit2,max>0?e.micro.config.is_showCode=1:e.micro.config.is_showCode=0)},e.micro.checkCard=function(){e.micro.checkBasic();var t=$.trim(e.micro.config.cardsn);if(11!=t.length)return util.message("卡号不足11位","","error"),!1;e.micro.config.loading="加载中..",e.micro.config.card_error="",n.post(a.card_check_url,{cardsn:t}).success(function(t){if(e.micro.config.loading="",-1!=t.message.errno){e.micro.config.card_error="",e.micro.config.member=t.message.message,e.micro.config.fact_fee=e.micro.config.fee;var a=parseInt(e.micro.config.fee),n=parseInt(e.micro.config.member.discount.condition);return e.micro.config.member.discount_type>0&&e.micro.config.member.discount&&a>=n&&(1==e.micro.config.member.discount_type?(e.micro.config.fact_fee=e.micro.config.fee-e.micro.config.member.discount.discount,e.micro.config.fact_fee=e.micro.config.fact_fee.toFixed(2)):e.micro.config.fact_fee=e.micro.config.fee*e.micro.config.member.discount.discount,e.micro.config.fact_fee<0&&(e.micro.config.fact_fee=0)),e.micro.last_money=e.micro.config.fact_fee,e.micro.checkCredit2(),e.micro.is_showCode(),!1}e.micro.config.card_error=t.message.message})},e.micro.checkCredit2=function(){e.micro.checkLast_money(),e.micro.config.credit2=Math.min.apply(null,[e.micro.config.member.credit2,e.micro.last_money]),e.micro.checkLast_money()},e.micro.checkLast_money=function(){var t=e.micro.config.fact_fee-e.micro.config.credit2-e.micro.config.offset_money;t<0&&(e.config.last_money=0),e.micro.last_money=t.toFixed(2)},e.micro.query=function(){if(!e.micro.uniontid)return util.message("系统错误","","error"),!1;n.post("{:Url('paycenter/wxmicro/query');}",{uniontid:e.micro.uniontid}).success(function(e){0==e.message.errno?(util.message("支付成功","","success"),location.reload()):util.message("支付失败:"+e.message.message,"","error")})},e.micro.checkpay=function(){n.post(a.checkpay_url,{uniontid:e.micro.uniontid}).success(function(n){console.dir(n),"SUCCESS"==n.message.trade_state?util.message("支付成功",a.redirect_url,"error"):"NOTPAY"==n.message.trade_state?util.message("支付失败:用户取消支付",a.redirect_url,"error"):"USERPAYING"==n.message.trade_state?t(function(){e.micro.checkpay()},5e3):util.message(n.message.trade_state_desc,a.redirect_url,"error")})},e.micro.submit=function(){return!!confirm("确认支付吗?")&&((1==e.micro.config.is_showCode||e.micro.config.member.uid<=0)&&!$.trim(e.micro.config.code)?($(".js-pay-warning").html("支付授权码不能为空"),!1):(1==e.micro.config.is_showCode?e.micro.config.cash=e.micro.last_money:e.micro.config.cash=0,e.micro.config.member.uid>0&&(e.micro.checkLast_money(),e.micro.last_money-e.micro.config.cash!=0)?(util.message("支付方式设置的支付金额不等于实际支付金额","","error"),!1):void n.post(a.pay_url,e.micro.config).success(function(a){return 0==a.message.errno?util.message(a.message.message,a.redirect,"success"):-1==a.message.errno?(util.message("支付失败:"+a.message.message,"","error"),$('#form1 :text[name="code"]').val("")):-10==a.message.errno&&($(".js-userpaying").show(),e.micro.uniontid=a.message.uniontid,t(function(){e.micro.checkpay()},5e3)),!1})))}}]),angular.module("paycenterApp").filter("credit1_num",["$rootScope",function(e){return function(e){return e=Math.floor(e)}}]),angular.module("paycenterApp").service("servicePaycenterBase",["$rootScope",function(e){var t={},a={config:{body:"刷卡支付收款",fee:"0",cardsn:"",card:"",credit1:0,credit2:0,last_money:0,offset_money:0,is_showCode:0,loading:"",card_error:"",member:{uid:0,credit2:0},nums:[["7","7"],["8","8"],["9","9"],["4","4"],["5","5"],["6","6"],["1","1"],["2","2"],["3","3"],["0","0"],[".","."],["clear","清除"]]}};return t.paycenterBaseData=function(e){return a.config.card=e,a},t}]),angular.module("phoneApp",["we7app"]),angular.module("phoneApp").controller("phoneCreateCtrl",["$scope","$http","config",function(e,t,a){e.uniacid=a.uniacid,e.version_id=a.version_id,e.modules=a.modules,e.selectedModule=a.version_info.modules,e.phoneappinfo=a.version_info,e.selectOrCancelModule=function(t){if(t.selected=!t.selected,t.selected)return e.selectedModule=[],e.selectedModule.push(t),void $("#add_module").modal("hide")},e.savePhoneApp=function(){return e.phoneappinfo.name||e.uniacid?e.phoneappinfo.description?e.phoneappinfo.version&&/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(e.phoneappinfo.version)?void t.post(a.links.create_phone_url,{uniacid:e.uniacid,version_id:e.version_id,module:e.selectedModule,name:e.phoneappinfo.name,description:e.phoneappinfo.description,version:e.phoneappinfo.version}).success(function(e){if(0!=e.message.errno)return util.message(e.message.message,"","error"),!1;util.message("设置成功",e.redirect,"success")}):(util.message("版本号错误,只能是数字、点,数字最多两位,例如 1.1.1"),!1):(util.message("请填写描述"),!1):(util.message("APP名称不可为空!"),!1)}}]),angular.module("phoneApp").controller("PhoneappWelcomeCtrl",["$scope","$http","config",function(e,t,a){e.notices=a.notices}]),angular.module("phoneApp").controller("AccountManagePhoneappCtrl",["$scope","$http","config",function(e,t,a){e.phoneapp_version_lists=a.phoneapp_version_lists,e.phoneapp_modules=a.phoneapp_modules,e.version_exist=a.version_exist,e.delPhoneappVersion=function(e){var e=parseInt(e);t.post(a.links.del_version,{version_id:e}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})}}]),angular.module("profileApp",["we7app"]),angular.module("profileApp").controller("oauthCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.oauthHost=a.oauthHost,e.oauthAccount=a.oauthAccount,e.oauthtitle=a.oauthAccounts[a.oauthAccount],e.jsOauthAccount=a.jsOauth,e.jsOauthtitle=a.jsOauthAccounts[a.jsOauth],e.originalHost=e.oauthHost,e.recover=function(){e.oauthHost=e.originalHost},e.saveOauth=function(a){param={},"oauth"==a&&(param={type:"oauth",account:e.oauthAccount,host:e.oauthHost}),"jsoauth"==a&&(param={type:"jsoauth",account:e.jsOauthAccount}),t.post(e.config.oauth_url,param).success(function(e){0==e.message.errno?location.reload():util.message("域名不合法","","error")})}}]).controller("tplCtrl",["$scope","$http","config",function(e,t,a){e.tplList=a.tplList,e.active="",e.activetpl="",e.changeActive=function(t){e.active=t,e.activetpl=e.tplList[t].tpl},e.saveTpl=function(){original_tpl=e.tplList[e.active].tpl,e.tplList[e.active].tpl=e.activetpl,t.post(a.url,{tpl:e.tplList}).success(function(t){1==t.message.errno?(e.tplList[e.active].tpl=original_tpl,util.message("请填写正确的"+t.message.message+"模板id","","info")):$(".modal").modal("hide")})}}]).controller("emailCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.setting=e.config.setting,e.type=void 0==e.setting.smtp?"163":e.setting.smtp.type,e.changeType=function(e){var t=$(e)[0].target;$(t).attr("type","password")}}]).controller("paymentCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.paysetting=a.paysetting,e.aliaccounthelp=!1,e.alipartnerhelp=!1,e.alisecrethelp=!1,e.saveEdit=function(a){if("wechat_facilitator"==a&&(!0===e.paysetting.wechat_facilitator.pay_switch||!0===e.paysetting.wechat_facilitator.recharge_switch)){if(""==e.paysetting.wechat_facilitator.mchid)return util.message("请填写服务商商户号","","info"),!1;if(""==e.paysetting.wechat_facilitator.signkey)return util.message("请填写服务商商户支付密钥","","info"),!1}if("alipay"==a&&(!0===e.paysetting.alipay.pay_switch||!0===e.paysetting.alipay.recharge_switch)){if(""==e.paysetting.alipay.partner)return util.message("请填写合作者身份","","info"),!1;if(""==e.paysetting.alipay.account)return util.message("请填写收款支付宝账号","","info"),!1;if(""==e.paysetting.alipay.secret)return util.message("请填写校验密钥","","info"),!1}if("wechat"==a){if(1==e.paysetting.wechat.switch)if(1==e.paysetting.wechat.version){if(""==e.paysetting.wechat.partner)return util.message("请填写商户身份","","info"),!1;if(""==e.paysetting.wechat.key)return util.message("请填写商户秘钥","","info"),!1;if(""==e.paysetting.wechat.signkey)return util.message("请填写通信秘钥","","info"),!1}else{if(""==e.paysetting.wechat.mchid)return util.message("请填写商户号","","info"),!1;if(""==e.paysetting.wechat.apikey)return util.message("请填写支付秘钥","","info"),!1}if(3==e.paysetting.wechat.switch){if(""==e.paysetting.wechat.service)return util.message("请选择服务商公众号","","info"),!1;if(""==e.paysetting.wechat.sub_mch_id)return util.message("请填写子商户号","","info"),!1}}if("unionpay"==a&&(1==e.paysetting.unionpay.pay_switch||1==e.paysetting.unionpay.recharge_switch)){if(""==e.paysetting.unionpay.merid)return util.message("请填写商户号","","info"),!1;if(""==e.paysetting.unionpay.signcertpwd)return util.message("请填写商户私钥证书密码","","info"),!1}if("baifubao"==a&&(!0===e.paysetting.baifubao.pay_switch||!0===e.paysetting.baifubao.recharge_switch)){if(""==e.paysetting.baifubao.mchid)return util.message("请填写商户号","","info"),!1;if(""==e.paysetting.baifubao.signkey)return util.message("请填写商户支付密钥","","info"),!1}if("line"==a&&(!0===e.paysetting.line.pay_switch||!0===e.paysetting.line.recharge_switch)&&""==e.paysetting.line.message)return util.message("请填写账户信息","","info"),!1;if("jueqiymf"==a&&(!0===e.paysetting.jueqiymf.pay_switch||!0===e.paysetting.jueqiymf.recharge_switch)){if(""==e.paysetting.jueqiymf.url||void 0==e.paysetting.jueqiymf.url)return util.message("请填写一码付后台地址","","info"),!1;if(""==e.paysetting.jueqiymf.mchid||void 0==e.paysetting.jueqiymf.mchid)return util.message("请填写商户号","","info"),!1}t.post(e.config.saveurl,{type:a,param:e.paysetting[a]}).success(function(e){0==e.message.errno&&util.message(e.message.message,e.redirect,"success")})},e.switchStatus=function(n,i){n&&i||util.message("参数错误","","error"),e.paysetting[n][i]=!e.paysetting[n][i],"delivery"!=n&&"credit"!=n&&"mix"!=n&&"line"!=n||(e.paysetting[n].recharge_switch=!1),t.post(a.change_status,{type:n,param:e.paysetting[n]}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.check_wechat=function(){if(a.account_level<3||void 0!=a.services&&a.borrows.length<1&&a.services.length<1&&4!=a.account_level||void 0==a.services&&a.borrows.length<1&&4!=a.account_level)return util.message("您没有有效的微信支付方式","","error"),!1;$("#weixin").modal("show")},$(".modal").on("hide.bs.modal",function(){t.post(e.config.get_setting_url,{}).success(function(t){e.paysetting=t.message.message})}),e.test_alipay=function(){t.post(e.config.text_alipay_url,{param:e.paysetting.alipay}).success(function(e){if(null!==e.message.message)return location.href=e.message.message,!1;util.message("配置失败!")})},e.changeSwitch=function(t,a){e.paysetting[t].switch=a},e.changeVersion=function(t){e.paysetting.wechat.version=t},e.tokenGen=function(t){if(confirm("确定要修改密钥吗?")){for(var a="",n=0;n<32;n++)a+="abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32*Math.random())];"wechat_facilitator.signkey"==t&&(e.paysetting.wechat_facilitator.signkey=a),"wechat.apikey"==t&&(e.paysetting.wechat.apikey=a)}}}]).controller("creditCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.creditSetting=a.creditSetting,e.tactics={activity:a.activity,currency:a.currency},e.creditTitle="",e.activeCredit="",e.activeTacticsType="",e.enabledCredit=a.enabledCredit,e.activeTactics="",e.syncSetting=a.syncSetting,e.changeEnabled=function(a){e.creditSetting=null==e.creditSetting?{}:e.creditSetting,void 0==e.creditSetting[a]&&(e.creditSetting[a]={title:"",enabled:0}),e.creditSetting[a].enabled=1==e.creditSetting[a].enabled?0:1,t.post(e.config.saveCreditSetting,{credit_setting:e.creditSetting}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.editCreditTactics=function(t){$("#tactics").modal("show"),e.activeTacticsType=t,e.activeTactics=e.tactics[t]},e.editCreditName=function(t){e.activeCredit=t,$("#credit-name").modal("show"),void 0==e.creditSetting[t]&&(e.creditSetting[t]={title:"",enabled:0}),e.creditTitle=e.creditSetting[t].title},e.setCreditName=function(){e.creditSetting[e.activeCredit].title=e.creditTitle,t.post(e.config.saveCreditSetting,{credit_setting:e.creditSetting}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.setCreditTactics=function(){t.post(e.config.saveTacticsSetting,{setting:e.tactics}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})}}]).controller("syncCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.syncSetting=a.syncSetting,e.setSync=function(){e.syncSetting=1==e.syncSetting?0:1,t.post(e.config.saveSyncSetting,{setting:e.syncSetting}).success(function(e){})}}]).controller("ucCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.uc=a.uc,$("#submit").click(function(){var t=$("#textarea").val().split(";"),a=new Array;for(var n in t){var i=t[n].indexOf("UC"),s=t[n].indexOf("', '"),o=t[n].indexOf("')"),r=t[n].substring(i,s),l=t[n].substring(s+4,o);a[r]=l}e.uc.connect=a.UC_CONNECT,e.uc.appid=a.UC_APPID,e.uc.key=a.UC_KEY,e.uc.charset=a.UC_CHARSET,e.uc.dbhost=a.UC_DBHOST,e.uc.dbuser=a.UC_DBUSER,e.uc.dbname=a.UC_DBNAME,e.uc.dbpw=a.UC_DBPW,e.uc.dbcharset=a.UC_DBCHARSET,e.uc.dbtablepre=a.UC_DBTABLEPRE,e.uc.dbconnect=a.UC_DBCONNECT,e.uc.api=a.UC_API,e.uc.ip=a.UC_IP,e.$digest()}),$("#form1").submit(function(){if("1"==$(':radio[name="status"]:checked').val()){if(""==$.trim($(':text[name="title"]').val()))return util.message("必须输入通行证名称.","","error"),!1;var e=parseInt($(':text[name="appid"]').val());if(isNaN(e))return util.message("必须输入UCenter应用的ID.","","error"),!1;if(""==$.trim($(':text[name="key"]').val()))return util.message("必须输入与UCenter的通信密钥.","","error"),!1;if(""==$.trim($(':text[name="charset"]').val()))return util.message("必须输入UCenter的字符集.","","error"),!1;if("mysql"==$(':radio[name="connect"]:checked').val()){if(""==$.trim($(':text[name="dbhost"]').val()))return util.message("必须输入UCenter数据库主机地址.","","error"),!1;if(""==$.trim($(':text[name="dbuser"]').val()))return util.message("必须输入UCenter数据库用户名.","","error"),!1;if(""==$.trim($(':text[name="dbpw"]').val()))return util.message("必须输入UCenter数据库密码.","","error"),!1;if(""==$.trim($(':text[name="dbname"]').val()))return util.message("必须输入UCenter数据库名称.","","error"),!1;if(""==$.trim($(':text[name="dbcharset"]').val()))return util.message("必须输入UCenter数据库字符集.","","error"),!1;if(""==$.trim($(':text[name="dbtablepre"]').val()))return util.message("必须输入UCenter数据表前缀.","","error"),!1}else if("http"==$(':radio[name="connect"]:checked').val()){if(""==$.trim($(':text[name="api"]').val()))return util.message("必须输入UCenter 服务端的URL地址.","","error"),!1;if(""==$.trim($(':text[name="ip"]').val()))return util.message("必须输入UCenter的IP.","","error"),!1}}})}]).controller("refundCtrl",["$scope","$http","config",function(e,t,a){e.setting=a.setting,e.wechat_refund=e.setting.wechat_refund,e.ali_refund=e.setting.ali_refund,e.change_switch=function(t,a){"wechat_refund"==t&&(e.wechat_refund.switch=a),"ali_refund"==t&&(e.ali_refund.switch=a)},$("#key").change(function(){e.wechat_refund.key=$("#key").val(),e.$apply()}),$("#cert").change(function(){e.wechat_refund.cert=$("#cert").val(),e.$apply()}),$("#form_wechat").submit(function(){if(1==e.wechat_refund.switch){if(""==e.wechat_refund.cert)return util.message("请上传apiclient_cert.pem证书"),!1;if(""==e.wechat_refund.key)return util.message("请上传apiclient_key.pem证书"),!1}}),$("#private_key").change(function(){e.ali_refund.private_key=$("#private_key").val(),e.$apply()}),$("#form_ali").submit(function(){if(1==e.ali_refund.switch){if(""==e.ali_refund.app_id)return util.message("请填写app_id"),!1;if(""==e.ali_refund.private_key)return util.message("请上传rsa_private_key.pem证书"),!1}})}]).controller("bindDomainCtrl",["$scope","$http","config",function(e,t,a){e.account=a.account,e.middleAccount={bind_domain:""},e.httpChange=function(){t.post(a.links.post,{bind_domain:e.middleAccount.bind_domain,submit:!0,token:a.token}).success(function(e){0==e.message.errno?util.message("修改成功!",e.redirect,"success"):util.message(e.message.message)})}}]).controller("appModuleLinkUniacidCtrl",["$scope","$http","config",function(e,t,a){e.modules=a.modules,e.module="",e.linkWxappAccounts="",e.linkPcAccounts="",e.selectedAccount="",e.tabChange=function(t){e.jurindex=t,1!=t||e.linkPcAccounts||e.searchLinkAccount(e.module,"pc"),1==e.jurindex&&$("#account-wxapp .row").find(".item").removeClass("active"),0==e.jurindex&&$("#account-pc .row").find(".item").removeClass("active"),e.selectedAccount=""},e.searchLinkAccount=function(n,i){e.module=n,$("#show-account").modal("show"),"wxapp"==i?(e.tabChange(0),e.loadingWxappData=!0):e.loadingPcData=!0,t.post(a.links.search_link_account,{module_name:n,type:"wxapp"==i?a.wxapp:a.webapp}).success(function(t){"wxapp"==i?(e.loadingWxappData=!1,e.linkWxappAccounts=t.message.message,e.linkPcAccounts=""):(e.loadingPcData=!1,e.linkPcAccounts=t.message.message)})},e.selectLinkAccount=function(t,a){$(a.target).parentsUntil(".col-sm-2").addClass("active"),$(a.target).parentsUntil(".col-sm-2").parent().siblings().find(".item").removeClass("active"),e.selectedAccount=t},e.module_unlink_uniacid=function(e){t.post(a.links.module_unlink_uniacid,{module_name:e}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})},e.moduleLinkUniacid=function(){$("#show-account").modal("hide"),t.post(a.links.module_link_uniacid,{module_name:e.module,submit:"yes",token:a.token,uniacid:e.selectedAccount.uniacid}).success(function(e){0==e.message.errno?util.message("关联成功","refresh","success"):util.message(e.message.message)}),e.module=""}}]).controller("mcMessageListCtrl",["$scope","$http","config",function(e,t,a){e.lists=a.lists,e.getMessageInfo=function(e,t){window.location.href=a.getMessageInfoUrl+"&index="+e+"&msg_data_id="+t},e.switch=function(e){t.post(a.switchMessageUrl,{index:e.index,msg_data_id:e.msg_data_id,attach_id:e.attach_id,title:e.title,need_open_comment:e.need_open_comment}).success(function(t){0==t.message.errno?(e.need_open_comment=1==e.need_open_comment?0:1,util.message(t.message.message,"","success")):util.message(t.message.message,"","error")})}}]).controller("mcMessageInfoCtrl",["$scope","$http","config",function(e,t,a){e.comments=a.comments,e.selectedType=a.type,e.types=[{typeValue:0,typeName:"全部留言"},{typeValue:1,typeName:"普通留言"},{typeValue:2,typeName:"精选留言"}],e.searchComment=function(){$params="?index="+a.index+"&msg_data_id="+a.msg_data_id+"&type="+e.selectedType,window.location.href=a.getMessageInfoUrl+$params},e.replyarticle=function(e){e.replying=!e.replying},e.send=function(e){t.post(a.replyMessageUrl,{index:e.index,msg_data_id:e.msg_data_id,replycontent:e.replycontent,user_comment_id:e.user_comment_id}).success(function(t){0==t.message.errno?(e.replying=!1,util.message(t.message.message,"refresh","success")):util.message(t.message.message,"refresh","error")})},e.mark=function(e){t.post(a.markMessageUrl,{index:e.index,msg_data_id:e.msg_data_id,user_comment_id:e.user_comment_id,comment_type:e.comment_type}).success(function(t){0==t.message.errno?(e.comment_type=!e.comment_type,util.message(t.message.message,"","success")):util.message(t.message.message,"","error")})},e.del=function(e){t.post(a.delMessageUrl,{index:e.index,msg_data_id:e.msg_data_id,user_comment_id:e.user_comment_id}).success(function(t){0==t.message.errno?(e.reply="",util.message(t.message.message,"refresh","success")):util.message(t.message.message,"refresh","error")})},e.del_reply=function(e){t.post(a.delMessageReplyUrl,{index:e.index,msg_data_id:e.msg_data_id,user_comment_id:e.user_comment_id}).success(function(t){0==t.message.errno?(e.reply="",util.message(t.message.message,"refresh","success")):util.message(t.message.message,"refresh","error")})}}]),angular.module("qrApp",["we7app"]),angular.module("qrApp").controller("QrDisplay",["$scope",function(e){$(".js-clip").each(function(){util.clip(this,$(this).attr("data-url"))})}]),angular.module("qrApp").controller("QrPost",["$scope","$http","config",function(e,t,a){a.id>0?e.type=0:e.type=1,$(".we7-select").change(function(){var t=$(".we7-select").val();e.type=1==t?1:2,e.$apply(e.type)}),$.isFunction(window.initReplyController)&&window.initReplyController(e,t),$(".submit").on("click",function(){return!!e.checkSubmit()}),e.checkSubmit=function(){if(""==$(":text[name='scene-name']").val())return util.message("抱歉,二维码名称为必填项,请返回修改!"),!1;if(1==e.type){if(""==$(":text[name='expire-seconds']").val())return util.message("抱歉,临时二维码过期时间为必填项,请返回修改!"),!1;if(!/^\+?[1-9][0-9]*$/.test($(":text[name='expire-seconds']").val()))return util.message("抱歉,临时二维码过期时间必须为正整数,请返回修改!"),!1;if(parseInt($(":text[name='expire-seconds']").val())<30||parseInt($(":text[name='expire-seconds']").val())>2592e3)return util.message("抱歉,临时二维码过期时间必须在30-2592000秒之间,请返回修改!"),!1}if(2==e.type){var a=$.trim($("#scene_str").val());if(!a)return util.message("场景值不能为空!"),!1;if(/^\d+$/g.test(a))return util.message("场景值不能是数字!"),!1;t.post("{:Url('platform/qr/check_scene_str')}",{scene_str:a}).success(function(e){if(1==e.message.errno&&"repeat"==e.message.message)return util.message("场景值和现有二维码场景值重复,请修改场景值"),!1})}return""!=$(":hidden[name='reply[reply_keyword]']").val()||(util.message("抱歉,请选择二维码要触发的关键字!"),!1)}}]),angular.module("qrApp").controller("UrlToQr",["$scope","$http","config",function(e,t,a){e.copyLink="",e.selectUrl=function(){var e=$("#longurl");util.linkBrowser(function(t){var n=a.site_url;if("tel:"==t.substring(0,4))return util.message("长链接不能设置为一键拨号"),!1;-1==t.indexOf("http://")&&-1==t.indexOf("https://")&&(t=n+"app"+(t=t.replace("./index.php?","/index.php?"))),e.val(t)})},e.transformUrl=function(){var n=$("#longurl").val().trim();if(""==n)return util.message("请输入长链接"),!1;if(-1==n.indexOf("http://")&&-1==n.indexOf("https://")&&-1==n.indexOf("weixin://"))return util.message("请输入有效的长链接"),!1;var i=$("#change"),s=a.img_url;i.html('<i class="fa fa-spinner"></i> 转换中'),t.post(a.transform_url,{longurl:n}).success(function(t){if(-1==t.message.errno)return util.message(t.message.message),i.html("立即转换"),!1;$("#shorturl").val(t.message.message.short_url),e.copyLink=t.message.message.short_url,$(".url-short").next().attr({"data-url":t.message.message.short_url}).removeClass("disabled"),$("#qrsrc").attr("src",s+"url="+t.message.message.short_url),$(".qr-img").next().removeClass("disabled"),i.html("立即转换")})},e.downQr=function(){var e=$("#shorturl").val(),t=a.down_url;window.location.href=t+"qrlink="+e},e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;height:33px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>'),a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)}}]),angular.module("qrApp").controller("QrStatistics",["$scope","$http","config",function(e,t,a){e.link=a.link,e.changeStatus=function(){t.post(e.link.changeStatus,{}).success(function(e){0==e.message.errno?location.reload():util.message(e.message.message,e.redirect,"ajax")})}}]),angular.module("quickMenuApp",["wapeditorApp"]),angular.module("quickMenuApp").controller("MainCtrl",["$scope","config","serviceCommon","serviceQuickMenuBase","serviceQuickMenuSubmit",function(e,t,a,n,i){e.submit={},e.activeItem=t.activeItem?t.activeItem:n.initActiveItem(),n.initActiveItem(e.activeItem),e.selectNavStyle=function(){var t=$('input[name="nav_style"]:checked').val();e.activeItem.navStyle=n.selectNavStyle(t)},e.addMenu=function(){e.activeItem.menus=n.addMenu()},e.addSubMenu=function(t){var a=_.findIndex(e.activeItem.menus,t);e.activeItem.menus[a].submenus=n.addSubMenu(t)},e.submit=function(t){e.submit=i.submit(),e.$apply("submit"),$(t.target).parents("form").submit()},e.removeMenu=function(t){e.activeItem.menus=n.removeMenu(t)},e.removeSubMenu=function(t,a){n.removeSubMenu(t,a),e.activeItem.menus[t].submenus=_.without(e.activeItem.menus[t].submenus,a)},e.showSearchModules=function(){e.moduleDialog=$("#shop-modules-modal").modal(),$("#shop-modules-modal .modal-body .btn-primary").html("取消"),$("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function(){e.activeItem.ignoreModules={},$("#shop-modules-modal .modal-body .btn-primary").each(function(){e.hasIgnoreModules=!0,e.activeItem.ignoreModules[$(this).attr("js-name")]={name:$(this).attr("js-name"),title:$(this).attr("js-title")}}),e.$apply("activeItem"),e.$apply("hasIgnoreModules"),n.setQuickMenuData("ignoreModules",e.activeItem.ignoreModules)})},$(".js-editor-submit").click(function(t){e.submit(t)}),e.hasIgnoreModules=_.size(e.activeItem.ignoreModules),$(".nav-menu").show(),$(".app-shopNav-edit").show()}]),angular.module("quickMenuApp").service("serviceQuickMenuBase",["$rootScope",function(e){var t={},a={};return t.initActiveItem=function(e){return a=angular.isObject(e)?e:{navStyle:1,bgColor:"#2B2D30",menus:[],extend:[],position:{homepage:!0,usercenter:!0,page:!0,article:!0},ignoreModules:{}}},t.selectNavStyle=function(e){return a.navStyle=e,a.navStyle},t.addMenu=function(){return a.menus.push({title:"标题",url:"",submenus:[],icon:{name:"fa-home",color:"#00ffff"},image:"",hoverimage:"",hovericon:""}),a.menus},t.removeMenu=function(e){var t=$.inArray(e,a.menus),n=angular.copy(a.menus);a.menus=[];for(i in n)i!=t&&a.menus.push(n[i]);return a.menus},t.addSubMenu=function(e){var t=_.findIndex(a.menus,e);return a.menus[t].submenus.push({title:"标题",url:""}),a.menus[t].submenus},t.removeSubMenu=function(e,t){return a.menus[e].submenus=_.without(a.menus[e].submenus,t),a.menus[e].submenus},t.getQuickMenuData=function(e){return angular.isString(e)?a[e]:a},t.setQuickMenuData=function(e,t){angular.isObject(e)?angular.forEach(e,function(e,t){a[t]=e}):a[e]=t},t}]),angular.module("quickMenuApp").service("serviceQuickMenuSubmit",["serviceCommon","serviceQuickMenuBase",function(e,t){var a={};return a.submit=function(){var a={params:{},html:""};a.params=t.getQuickMenuData(),e.stripHaskey(a.params);var n=$(".nav-menu").html();return n=n.replace(/<\!\-\-([^-]*?)\-\->/g,""),n=n.replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),n=n.replace(/ng\-[a-zA-Z]+/g,""),n=n.replace(/[\t\n\n\r]/g,""),a.html=n,a},a}]),angular.module("we7resource",["we7app"]),angular.module("we7resource").controller("we7resource-base-controller",["$scope","$sce","serviceResource","$http","config",function(e,t,a,n,i){function s(t){e.converting=!0;var n=2==e.needType;a.convert(t.id,e.resourceType,n).then(function(t){util.loaded(),e.converting=!1,t&&r([t]),t.selected=!1},function(){e.converting=!1,o("资源转换失败"),t.selected=!1,util.loaded()})}function o(e){util.message(e)}function r(t){$(window).trigger("resource_selected",{type:e.resourceType,items:t})}function l(){$(window).trigger("resource_canceled")}e.currentPage=1,e.isWechat=i.isWechat,e.needType=i.needType,e.multiple=i.multiple,e.showType=i.showType,e.global=i.global?"global":"",e.dest_dir=i.dest_dir,e.uniacid=i.uniacid,e.netWorkVideo=i.netWorkVideo,i.others&&i.others[e.resourceType]&&(e.needType=i.others[e.resourceType].needType),e.selectedItems={},e.index=0,e.converting=!1,e.showWx=function(){return!0},e.showLocal=function(){return!0},e.showNetWork=function(){return!0},e.loadData=function(){},e.onIndexChange=function(t){e.loadData()},e.setIndex=function(t){e.index!==t&&(e.index=t,e.selectedItems={},e.onIndexChange(t))},e.isWechat||e.setIndex(1),e.setCurrentPage=function(t){e.currentPage!=t&&(e.currentPage=t,e.loadData())},e.itemClick=function(t){if(!e.converting)if(t.selected)t.selected=!1;else{if(!e.multiple||e.needConvert())return t.selected=!0,void e.convert(t);t.selected=!t.selected,delete e.selectedItems[t.id],t.selected&&(e.selectedItems[t.id]=t)}},e.delItem=function(t,n){if(n.stopPropagation(),!confirm("删除不可恢复确认删除吗?"))return!1;a.delItem(t.id,e.resourceType,1==e.index,e.uniacid).then(function(){e.loadData()},function(e){util.message(e.message)})},e.canConvert=function(e){return!0},e.needConvert=function(){return 3!==e.needType&&e.index+1!==e.needType},e.convert=function(t){var a=0==e.index?"本地":"微信";if(e.needConvert()){if(!e.canConvert(t))return t.selected=!1,void o("当前资源无法选择");confirm("当前资源转换为"+a+"素材方可使用,是否转换")?(util.loading("正在转换为"+a+"资源"),s(t)):t.selected=!1}else r([t])},e.ok=function(){var t=[];for(var a in e.selectedItems)t.push(e.selectedItems[a]);t.length>0?r(t):l()},e.uploaded=function(){e.loadData()},e.uploaderror=function(e){e&&""!=e||(e="上传失败"),o(e)},e.selectedItems=function(){return selectedItems}}]),angular.module("we7resource").directive("we7ResourceBasicDialog",["config",function(e){return{scope:{},restrict:"EA",templateUrl:"directive-basic-basic.html"}}]),angular.module("we7resource").controller("we7resource-basic-controller",["$scope","config",function(e,t){$("#basictext").val(t.otherVal),e.ok=function(){var e=$("#basictext").val();$(window).trigger("resource_selected",{type:"basic",items:[{content:e}]})},e.emotion=function(){a()},e.emoji=function(){n()};var a=function(){var e=$("#basictext")[0],t=$("#basictext").val();util.emotion($(".emotion-triggers"),$("#basictext"),function(a,n,i){if(e.selectionStart&&"0"!=e.selectionStart)$("#basictext").val(t+a),$("#basictext").focus();else{var s=e.selectionStart,o=e.selectionEnd,r=e.scrollTop;$("#basictext").val(e.value.substring(0,s)+a+e.value.substring(o,e.value.length)),$("#basictext").focus(),e.selectionStart=s+a.length,e.selectionEnd=s+a.length,e.scrollTop=r}})},n=function(){var e=$("#basictext").val();util.emojiBrowser(function(t){var a="[U+"+t.find("span").text()+"]";$("#basictext").val(e+a)})}}]),angular.module("we7resource").directive("we7ResourceIconDialog",function(){return{scope:{},restrict:"EA",templateUrl:"directive-icon-icon.html"}}),angular.module("we7resource").controller("we7resource-icon-controller",["$scope","config",function(e,t){var a={};a.c0=["fa-adjust","fa-anchor","fa-archive","fa-arrows","fa-arrows-h","fa-arrows-v","fa-asterisk","fa-automobile","fa-ban","fa-bank","fa-bar-chart-o","fa-barcode","fa-bars","fa-beer","fa-bell","fa-bell-o","fa-bolt","fa-bomb","fa-book","fa-bookmark","fa-bookmark-o","fa-briefcase","fa-bug","fa-building","fa-building-o","fa-bullhorn","fa-bullseye","fa-cab","fa-calendar","fa-calendar-o","fa-camera","fa-camera-retro","fa-car","fa-caret-square-o-down","fa-caret-square-o-left","fa-caret-square-o-right","fa-caret-square-o-up","fa-certificate","fa-check","fa-check-circle","fa-check-circle-o","fa-check-square","fa-check-square-o","fa-child","fa-circle","fa-circle-o","fa-circle-o-notch","fa-circle-thin","fa-clock-o","fa-cloud","fa-cloud-download","fa-cloud-upload","fa-code","fa-code-fork","fa-coffee","fa-cog","fa-cogs","fa-comment","fa-comment-o","fa-comments","fa-comments-o","fa-compass","fa-credit-card","fa-crop","fa-crosshairs","fa-cube","fa-cubes","fa-cutlery","fa-dashboard","fa-database","fa-desktop","fa-dot-circle-o","fa-download","fa-edit","fa-ellipsis-h","fa-ellipsis-v","fa-envelope","fa-envelope-o","fa-envelope-square","fa-eraser","fa-exchange","fa-exclamation","fa-exclamation-circle","fa-exclamation-triangle","fa-external-link","fa-external-link-square","fa-eye","fa-eye-slash","fa-fax","fa-female","fa-fighter-jet","fa-file-archive-o","fa-file-audio-o","fa-file-code-o","fa-file-excel-o","fa-file-image-o","fa-file-movie-o","fa-file-pdf-o","fa-file-photo-o","fa-file-picture-o","fa-file-powerpoint-o","fa-file-sound-o","fa-file-video-o","fa-file-word-o","fa-file-zip-o","fa-film","fa-filter","fa-fire","fa-fire-extinguisher","fa-flag","fa-flag-checkered","fa-flag-o","fa-flash","fa-flask","fa-folder","fa-folder-o","fa-folder-open","fa-folder-open-o","fa-frown-o","fa-gamepad","fa-gavel","fa-gear","fa-gears","fa-gift","fa-glass","fa-globe","fa-graduation-cap","fa-group","fa-hdd-o","fa-headphones","fa-heart","fa-heart-o","fa-history","fa-home","fa-image","fa-inbox","fa-info","fa-info-circle","fa-institution","fa-key","fa-keyboard-o","fa-language","fa-laptop","fa-leaf","fa-legal","fa-lemon-o","fa-level-down","fa-level-up","fa-life-bouy","fa-life-ring","fa-life-saver","fa-lightbulb-o","fa-location-arrow","fa-lock","fa-magic","fa-magnet","fa-mail-forward","fa-mail-reply","fa-mail-reply-all","fa-male","fa-map-marker","fa-meh-o","fa-microphone","fa-microphone-slash","fa-minus","fa-minus-circle","fa-minus-square","fa-minus-square-o","fa-mobile","fa-mobile-phone","fa-money","fa-moon-o","fa-mortar-board","fa-music","fa-navicon","fa-paper-plane","fa-paper-plane-o","fa-paw","fa-pencil","fa-pencil-square","fa-pencil-square-o","fa-phone","fa-phone-square","fa-photo","fa-picture-o","fa-plane","fa-plus","fa-plus-circle","fa-plus-square","fa-plus-square-o","fa-power-off","fa-print","fa-puzzle-piece","fa-qrcode","fa-question","fa-question-circle","fa-quote-left","fa-quote-right","fa-random","fa-recycle","fa-refresh","fa-reorder","fa-reply","fa-reply-all","fa-retweet","fa-road","fa-rocket","fa-rss","fa-rss-square","fa-search","fa-search-minus","fa-search-plus","fa-send","fa-send-o","fa-share","fa-share-alt","fa-share-alt-square","fa-share-square","fa-share-square-o","fa-shield","fa-shopping-cart","fa-sign-in","fa-sign-out","fa-signal","fa-sitemap","fa-sliders","fa-smile-o","fa-sort","fa-sort-alpha-asc","fa-sort-alpha-desc","fa-sort-amount-asc","fa-sort-amount-desc","fa-sort-asc","fa-sort-desc","fa-sort-down","fa-sort-numeric-asc","fa-sort-numeric-desc","fa-sort-up","fa-space-shuttle","fa-spinner","fa-spoon","fa-square","fa-square-o","fa-star","fa-star-half","fa-star-half-empty","fa-star-half-full","fa-star-half-o","fa-star-o","fa-suitcase","fa-sun-o","fa-support","fa-tablet","fa-tachometer","fa-tag","fa-tags","fa-tasks","fa-taxi","fa-terminal","fa-thumb-tack","fa-thumbs-down","fa-thumbs-o-down","fa-thumbs-o-up","fa-thumbs-up","fa-ticket","fa-times","fa-times-circle","fa-times-circle-o","fa-tint","fa-toggle-down","fa-toggle-left","fa-toggle-right","fa-toggle-up","fa-trash-o","fa-tree","fa-trophy","fa-truck","fa-umbrella","fa-university","fa-unlock","fa-unlock-alt","fa-unsorted","fa-upload","fa-user","fa-users","fa-video-camera","fa-volume-down","fa-volume-off","fa-volume-up","fa-warning","fa-wheelchair","fa-wrench"],a.c1=["fa-file","fa-file-archive-o","fa-file-audio-o","fa-file-code-o","fa-file-excel-o","fa-file-image-o","fa-file-movie-o","fa-file-o","fa-file-pdf-o","fa-file-photo-o","fa-file-picture-o","fa-file-powerpoint-o","fa-file-sound-o","fa-file-text","fa-file-text-o","fa-file-video-o","fa-file-word-o","fa-file-zip-o"],a.c2=["fa-circle-o-notch","fa-cog","fa-gear","fa-refresh","fa-spinner"],a.c3=["fa-check-square","fa-check-square-o","fa-circle","fa-circle-o","fa-dot-circle-o","fa-minus-square","fa-minus-square-o","fa-plus-square","fa-plus-square-o","fa-square","fa-square-o"],a.c4=["fa-bitcoin","fa-btc","fa-cny","fa-dollar","fa-eur","fa-euro","fa-gbp","fa-inr","fa-jpy","fa-krw","fa-money","fa-rmb","fa-rouble","fa-rub","fa-ruble","fa-rupee","fa-try","fa-turkish-lira","fa-usd","fa-won","fa-yen"],a.c5=["fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-bold","fa-chain","fa-chain-broken","fa-clipboard","fa-columns","fa-copy","fa-cut","fa-dedent","fa-eraser","fa-file","fa-file-o","fa-file-text","fa-file-text-o","fa-files-o","fa-floppy-o","fa-font","fa-header","fa-indent","fa-italic","fa-link","fa-list","fa-list-alt","fa-list-ol","fa-list-ul","fa-outdent","fa-paperclip","fa-paragraph","fa-paste","fa-repeat","fa-rotate-left","fa-rotate-right","fa-save","fa-scissors","fa-strikethrough","fa-subscript","fa-superscript","fa-table","fa-text-height","fa-text-width","fa-th","fa-th-large","fa-th-list","fa-underline","fa-undo","fa-unlink"],a.c6=["fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-o-down","fa-arrow-circle-o-left","fa-arrow-circle-o-right","fa-arrow-circle-o-up","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-h","fa-arrows-v","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-o-down","fa-caret-square-o-left","fa-caret-square-o-right","fa-caret-square-o-up","fa-caret-up","fa-chevron-circle-down","fa-chevron-circle-left","fa-chevron-circle-right","fa-chevron-circle-up","fa-chevron-down","fa-chevron-left","fa-chevron-right","fa-chevron-up","fa-hand-o-down","fa-hand-o-left","fa-hand-o-right","fa-hand-o-up","fa-long-arrow-down","fa-long-arrow-left","fa-long-arrow-right","fa-long-arrow-up","fa-toggle-down","fa-toggle-left","fa-toggle-right","fa-toggle-up"],a.c7=["fa-arrows-alt","fa-backward","fa-compress","fa-eject","fa-expand","fa-fast-backward","fa-fast-forward","fa-forward","fa-pause","fa-play","fa-play-circle","fa-play-circle-o","fa-step-backward","fa-step-forward","fa-stop","fa-youtube-play"],a.c8=["fa-adn","fa-android","fa-apple","fa-behance","fa-behance-square","fa-bitbucket","fa-bitbucket-square","fa-bitcoin","fa-btc","fa-codepen","fa-css3","fa-delicious","fa-deviantart","fa-digg","fa-dribbble","fa-dropbox","fa-drupal","fa-empire","fa-facebook","fa-facebook-square","fa-flickr","fa-foursquare","fa-ge","fa-git","fa-git-square","fa-github","fa-github-alt","fa-github-square","fa-gittip","fa-google","fa-google-plus","fa-google-plus-square","fa-hacker-news","fa-html5","fa-instagram","fa-joomla","fa-jsfiddle","fa-linkedin","fa-linkedin-square","fa-linux","fa-maxcdn","fa-openid","fa-pagelines","fa-pied-piper","fa-pied-piper-alt","fa-pied-piper-square","fa-pinterest","fa-pinterest-square","fa-qq","fa-ra","fa-rebel","fa-reddit","fa-reddit-square","fa-renren","fa-share-alt","fa-share-alt-square","fa-skype","fa-slack","fa-soundcloud","fa-spotify","fa-stack-exchange","fa-stack-overflow","fa-steam","fa-steam-square","fa-stumbleupon","fa-stumbleupon-circle","fa-tencent-weibo","fa-trello","fa-tumblr","fa-tumblr-square","fa-twitter","fa-twitter-square","fa-vimeo-square","fa-vine","fa-vk","fa-wechat","fa-weibo","fa-weixin","fa-windows","fa-wordpress","fa-xing","fa-xing-square","fa-yahoo","fa-youtube","fa-youtube-play","fa-youtube-square"],a.c9=["fa-ambulance","fa-h-square","fa-hospital-o","fa-medkit","fa-plus-square","fa-stethoscope","fa-user-md","fa-wheelchair"],e.index=0,e.color=t.otherVal?t.otherVal:"#ddd",e.setIndex=function(t){e.index=t,e.selectIndex=-1},e.icons=function(){return a["c"+e.index]},util.colorpicker("#we7colorpicker",function(t){e.color=t.toString(),e.$apply("color")}),e.selectIndex=-1,e.itemClick=function(t){$(window).trigger("resource_selected",{type:"icon",items:[{name:t,color:e.color}]})}}]),angular.module("we7resource").directive("we7ResourceImageDialog",function(){return{scope:{},restrict:"EA",templateUrl:"directive-images-images.html",link:function(e,t,a,n,i){t.bind("click","pagination li a",function(t){var a=$(t.target).attr("page");a&&e.$broadcast("image_page_change",a)})}}}),angular.module("we7resource").controller("we7resource-image-controller",["$scope","$sce","serviceResource","$http","$controller","config",function(e,t,a,n,i,s){function o(e){util.message(e,"")}function r(e){$(window).trigger("resource_selected",{type:"image",items:e})}function l(){for(var e=[],t=c(),a=0;a<t.length;a++)e.push(t[a].id);return e}function c(){for(var t=[],a=0;a<e.images.length;a++){var n=e.images[a];n.selected&&t.push(n)}return t}function u(){$(window).trigger("resource_canceled")}function d(){var t=e.groupid;e.uploadurl=0==e.index?"./index.php?c=utility&a=file&do=wechat_upload&upload_type=image&mode=perm&uniacid="+e.uniacid+"&dest_dir="+e.dest_dir+"&quality="+e.quality+"&group_id="+t:"./index.php?c=utility&a=file&do=upload&upload_type=image&global="+e.global+"&dest_dir="+e.dest_dir+"&uniacid="+e.uniacid+"&quality="+e.quality+"&group_id="+t}function p(e,t){util.loading("网络图片转化中..."),a.netWorkconvert(e,t,"image").then(function(e){util.loaded(),r([e])},function(e){o("网络图片转化失败"),util.loaded()})}function m(){g(e.groupid),f()}function g(n){e.selectedAllImage=!1,e.groupid=n,d();var i=1==e.index;a.getResources("image",e.currentPage,i,{year:e.year,month:e.month,uniacid:e.uniacid,dest_dir:e.dest_dir,global:e.global,groupid:n}).then(function(a){e.images=a.items,e.pager=t.trustAsHtml(a.pager)})}function f(){var t=1==e.index;a.imageGroup(t,[]).then(function(t){for(var a=[],n=0;n<t.length;n++){var i=t[n];i.editable=!1,i.deleted=!1,a.push(i)}e.groups=a})}e.resourceType="image",i("we7resource-base-controller",{$scope:e}),e.accept="image/gif, image/jpg, image/jpeg, image/bmp, image/png, image/x-ico",e.uploadname="上传图片",e.multipleupload=!0,e.quality=0,e.netWorkurl="",e.groups=[];new Date;e.year="0",e.month="0",e.years=function(){for(var e=(new Date).getFullYear(),t=[],a=0;a<10;a++)t.push(e-a);return t}(),e.months=function(){for(var e=[],t=1;t<=12;t++)e.push(t);return e}(),e.selectedAllImage=!1,e.groupid=-1,e.editable=!1,e.config=s,""!=e.config.typeName&&void 0!=e.config.typeName&&null!=e.config.typeName||(e.config.typeName="平台"),e.isLocal=function(){return 1==e.index},e.loadData=function(){m()},e.onIndexChange=function(e){2!=e&&(m(),d())},e.itemClick=function(t){if(!e.converting){t.selected=!t.selected;var a=c().length==e.images.length;e.selectedAllImage=a}},e.ok=function(){var t=c();if(t.length>0)return!e.multiple||e.needConvert()?(t[0].selected=!0,void e.convert(t[0])):void r(t);u()},d(),e.fetchNetwork=function(){p(e.netWorkurl,2==e.needType)},e.$on("image_page_change",function(t,a){e.setCurrentPage(a)}),e.updateUploadUrl=function(){d()},e.timeToDate=function(e){return new Date(1e3*e)},e.getTitle=function(t){return e.isLocal?t.filename:t.attachment},e.getImage=function(e){return"url("+e.url+")"},e.search=function(){e.currentPage=1,m()},e.delSel=function(){var t=l();0!=t.length?t.length>1&&!e.isLocal()?util.message("微信图片只支持单张删除"):e.isLocal()?a.delMuti(t,"image",e.isLocal(),{uniacid:e.uniacid}).then(function(e){util.message("删除成功"),m()},function(e){util.message(e.message)}):a.delItem(t[0],"image",e.isLocal(),e.uniacid).then(function(e){util.message("删除成功"),m()},function(e){util.message(e.message)}):util.message("请选择要删除的图片")},e.selectedAll=function(t){for(var a=0;a<e.images.length;a++)e.images[a].selected=t},e.loadAll=function(){g(-1)},e.loadNoGroup=function(){g(0)},e.loadImages=function(e){g(e.id)},e.addGroup=function(t){var n=t,i=1==e.index;a.addGroup(n,i).then(function(t){e.groups.push({name:n,id:t.id,editable:!1,deleted:!1,changed:!1})})},e.editGroup=function(t){var n=1==e.index;a.changeGroup(t,n).then(function(e){console.log("changegroup")})},e.doEditGroup=function(t){t.editable=!t.editable,e.loadImages(t)},e.editing=function(e){e.editing=!0},e.edited=function(t){t.editing=!1,t.editable=!1,e.editGroup(t)},e.cancelEditing=function(e){e.editing=!1,e.editable=!1},e.doAddGroup=function(){e.addGroup("未命名")},e.delGroup=function(t){$("#categoryEditModal").hide(),t.deleted=!0;var n=1==e.index;a.delGroup(t.id,n).then(function(t){console.log("删除分组成功"),e.loadAll()})},e.moveToGroup=function(t){var n=1==e.index,i=l();0!=i.length?a.moveToGroup(i,t.id,n).then(function(e){util.message("移动成功"),g(t.id)}):util.message("请选择图片后移动")},m()}]),angular.module("we7resource").directive("we7ResourceKeywordDialog",function(){return{scope:{},restrict:"EA",templateUrl:"directive-keyword-keyword.html",link:function(e,t,a,n,i){t.bind("click","pagination li a",function(t){var a=$(t.target).attr("page");a&&e.$broadcast("keyword_page_change",a)})}}}),angular.module("we7resource").controller("we7resource-keyword-controller",["$scope","$sce","serviceResource",function(e,t,a){e.keyword="",e.currentId="",e.currentPage=1,e.itemClick=function(e){e.selected=!0,$(window).trigger("resource_selected",{type:"keyword",items:[e]})},e.$on("keyword_page_change",function(t,a){e.setCurrentPage(a)}),e.setCurrentPage=function(t){e.currentPage!==t&&(e.currentPage=t,n())},e.search=function(){e.currentPage=1,n()};var n=function(){a.getResources("keyword",e.currentPage,!0,{keyword:e.keyword}).then(function(a){e.keywords=a.items,e.pager=t.trustAsHtml(a.pager)})};n()}]),angular.module("we7resource").directive("we7ResourceModuleDialog",["$http",function(e){return{scope:{},restrict:"EA",templateUrl:"directive-module-module.html",link:function(e,t,a,n,i){t.bind("click","pagination li a",function(t){var a=$(t.target).attr("page");a&&e.$broadcast("module_page_change",a)})}}}]),angular.module("we7resource").controller("we7resource-module-controller",["$scope","$sce","serviceResource","config",function(e,t,a,n){function i(e){$(window).trigger("resource_selected",{type:"module",items:e})}function s(){$(window).trigger("resource_canceled")}function o(){a.getResources("module",e.currentPage,!0,{keyword:e.keyword,user_module:r,mtype:c,cover:u}).then(function(a){e.modules=a.items,e.pager=t.trustAsHtml(a.pager)})}e.multiple=n.multiple,e.keyword="";var r=0,l=n.others,c="",u=!1;l&&l.user_module&&(r=1),l&&l.mtype&&(c=l.mtype),l&&l.cover&&(u=l.cover),e.itemClick=function(t){if(e.multiple){if(t.selected)return void(t.selected=!1);t.selected=!0}else t.selected=!0,$(window).trigger("resource_selected",{type:"module",items:[t]})},e.$on("module_page_change",function(t,a){e.setCurrentPage(a)}),e.setCurrentPage=function(t){e.currentPage!=t&&(e.currentPage=t,o())},e.search=function(){o()},e.ok=function(){var t=[];angular.forEach(e.modules,function(e,a){e.selected&&t.push(e)}),t.length>0?i(t):s()},o()}]),angular.module("we7resource").directive("we7ResourceMusicDialog",function(){return{scope:{},restrict:"EA",replace:!1,templateUrl:"directive-music-music.html"}}),angular.module("we7resource").controller("we7resource-music-controller",["$scope","$sce","serviceResource","config",function(e,t,a,n){e.needType=n.needType,e.multiple=n.multiple,e.showMusicForm=!0,e.musicurl="",e.selectVoice=function(){e.showMusicForm=!1};var i=null;e.$on("selected_voice",function(t,a){i=a,e.musicurl=a.attachment,e.showMusicForm=!0}),e.$on("add_music",function(e,t){$(window).trigger("resource_selected",{type:"music",items:[t]})})}]),angular.module("we7resource").directive("we7ResourceNewsDialog",function(){return{scope:{},restrict:"EA",templateUrl:"directive-news-news.html",link:function(e,t,a,n,i){t.bind("click","pagination li a",function(t){var a=$(t.target).attr("page");a&&e.$broadcast("news_page_change",a)})}}}),angular.module("we7resource").controller("we7resource-news-controller",["$scope","$sce","serviceResource","$controller",function(e,t,a,n){function i(){a.getResources("news",e.currentPage,1==e.index,{keyword:e.keyword}).then(function(a){e.news=a.items,e.pager=t.trustAsHtml(a.pager)})}e.resourceType="news",n("we7resource-base-controller",{$scope:e}),e.keyword="",e.canConvert=function(e){return!e||!e.items||""!=e.items[0].author||""!=e.items[0].content},e.timeToDate=function(e){return new Date(1e3*e)},e.$on("news_page_change",function(t,a){e.setCurrentPage(a)}),e.loadData=function(){i()},e.search=function(){e.currentPage=1,i()},i()}]),angular.module("we7resource").directive("we7ResourceVideoDialog",function(){return{scope:{},restrict:"EA",templateUrl:"directive-video-video.html",link:function(e,t,a,n,i){t.bind("click","pagination li a",function(t){var a=$(t.target).attr("page");a&&e.$broadcast("video_page_change",a)})}}}),angular.module("we7resource").controller("we7resource-video-controller",["$scope","$sce","serviceResource","config","$controller",function(e,t,a,n,i){function s(e){if(/^<iframe/.test(e)){var t="";/src=\"[^\s"]+/i.test(e)&&(t=e.match(/src=\"[^\s"]+/i)[0].substr(5)),e=/http:\/\/|https:\/\//gi.test(t)?t:"http://"+t}return e}function o(){a.getResources("video",e.currentPage,1==e.index).then(function(a){e.videos=a.items,e.pager=t.trustAsHtml(a.pager)})}function r(){e.uploadurl=0===e.index?"./index.php?c=utility&a=file&do=wechat_upload&upload_type=video&mode=perm&uniacid="+e.uniacid:"./index.php?c=utility&a=file&do=upload&upload_type=video&global="+e.global+"&dest_dir="+e.dest_dir+"&uniacid="+e.uniacid}e.resourceType="video",i("we7resource-base-controller",{$scope:e}),e.accept="video/rm, video/rmvb, video/wmv, video/avi, video/mpg, video/mpeg, video/mp4",e.uploadname="上传视频",e.multiupload=!1,e.onIndexChange=function(e){o(),r()},r(),e.showNetWork=function(){return e.netWorkVideo},e.loadData=function(){o()},e.sceurl=function(){return t.trustAsResourceUrl(e.netWorkurl)},e.canConvert=function(e){return!1},e.$on("video_page_change",function(t,a){e.setCurrentPage(a)}),e.getTitle=function(e){return e.tag&&e.tag.title?e.tag.title:e.filename},e.fetchNetwork=function(){var t={url:s(e.netWorkurl),isRemote:!0};l("video",[t])},e.timeToDate=function(e){return new Date(1e3*e)};var l=function(e,t){$(window).trigger("resource_selected",{type:"video",items:t})};o()}]),angular.module("we7resource").directive("we7ResourceVoiceDialog",function(){return{scope:{},restrict:"EA",templateUrl:"directive-voice-voice.html",link:function(e,t,a,n,i){t.bind("click","pagination li a",function(t){var a=$(t.target).attr("page");a&&e.$broadcast("voice_page_change",a)})}}}),angular.module("we7resource").controller("we7resource-voice-controller",["$scope",function(e){e.$on("selected_voice",function(e,t){t&&!t.url&&(t.url=t.attachment),$(window).trigger("resource_selected",{type:"voice",items:[t]})})}]),angular.module("we7resource").service("serviceResource",["$rootScope","$http","$q",function(e,t,a){function n(e,t){return s("keyword",e,!0,t)}function i(e,t){return s("module",e,!0,t)}function s(e,n,i,s){var r=a.defer(),l=r.promise,c="./index.php?c=utility&a=file&do="+e+"&page="+n+"&local="+(i?"local":"wx")+o(s);return t.get(c).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno){var a=t.message.items;r.resolve({pager:t.message.pager,items:a})}}r.resolve([])},function(e){r.reject(e)}),l}function o(e){var t="";return angular.forEach(e,function(e,a){t+="&"+a+"="+e}),t}var r={};return r.getResources=function(e,t,a,o){var r=null;switch(e){case"keyword":r=n(t,o);break;case"module":r=i(t,o);break;case"video":r=s("video",t,a);break;case"news":r=s("news",t,a,o);break;case"voice":r=s("voice",t,a,o);break;case"image":r=s("image",t,a,o)}return r},r.imageGroup=function(e,n){var i=a.defer(),s=i.promise,r="./index.php?c=utility&a=file&do=group_list&local="+(e?"local":"wx")+o(n);return t.get(r).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void i.resolve(t.message);i.reject({state:!1,message:t.message})}}),s},r.addGroup=function(e,n,i){var s=a.defer(),r=s.promise,l="./index.php?c=utility&a=file&do=add_group&local="+(n?"local":"wx")+o(i);return t.post(l,{name:e}).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void s.resolve(t.message);s.reject({state:!1,message:t.message})}s.reject({state:!1,message:"添加失败"})},function(e){s.reject({state:!1,message:"添加失败"})}),r},r.changeGroup=function(e,n,i){var s=a.defer(),r=s.promise,l="./index.php?c=utility&a=file&do=change_group&local="+(n?"local":"wx")+o(i);return t.post(l,{name:e.name,id:e.id}).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void s.resolve(t.message);s.reject({state:!1,message:t.message})}s.reject({state:!1,message:"更新失败"})},function(e){s.reject({state:!1,message:"更新失败"})}),r},r.delGroup=function(e,n,i){var s=a.defer(),r=s.promise,l="./index.php?c=utility&a=file&do=del_group&local="+(n?"local":"wx")+o(i);return t.post(l,{id:e}).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void s.resolve(t.message);s.reject({state:!1,message:t.message})}s.reject({state:!1,message:"删除失败"})},function(e){s.reject({state:!1,message:"删除失败"})}),r},r.moveToGroup=function(e,n,i,s){var r=a.defer(),l=r.promise,c="./index.php?c=utility&a=file&do=move_to_group&local="+(i?"local":"wx")+o(s);return t.post(c,{id:n,keys:e}).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void r.resolve(t.message);r.reject({state:!1,message:t.message})}r.reject({state:!1,message:"移动成功"})},function(e){r.reject({state:!1,message:"移动失败"})}),l},r.delMuti=function(e,n,i,s){var r=a.defer(),l=r.promise,c="./index.php?c=utility&a=file&do=delete&local="+(i?"local":"wx")+o(s);return t.post(c,{id:e,type:n}).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void r.resolve(!0);r.reject({state:!1,message:t.message})}r.reject({state:!1,message:"删除失败"})},function(e){r.reject({state:!1,message:"删除失败"})}),l},r.delItem=function(e,n,i,s){var o=a.defer(),r=o.promise,l=i?"local":"wechat",c="./index.php?c=platform&a=material&do=delete&uniacid="+s;return t.post(c,{material_id:e,type:n,server:l}).then(function(e){if(200==e.status){var t=e.data.message;if("0"==t.errno)return void o.resolve(!0);o.reject({state:!1,message:t.message})}o.reject({state:!1,message:"删除失败"})},function(e){o.reject({state:!1,message:"删除失败"})}),r},r.convert=function(e,n,i){var s=a.defer(),o=s.promise,r="./index.php?c=utility&a=file&do="+(i?"tolocal":"towechat")+"&type="+n+"&resource_id="+e;return t.get(r).then(function(e){if(200==e.status){var t=e.data.message;if(0==t.errno){var a=t.message;s.resolve(a)}1==t.errno&&s.reject(t.message)}s.resolve(null)},function(e){s.reject(e)}),o},r.netWorkconvert=function(e,n,i){var s=a.defer(),o=s.promise,r="./index.php?c=utility&a=file&do="+(n?"networktolocal":"networktowechat")+"&url="+encodeURIComponent(e)+"&type="+i;return t.get(r).then(function(e){if(200==e.status){var t=e.data.message;if(0==t.errno){var a=t.message;s.resolve(a)}1==t.errno&&s.reject(t.message)}s.resolve(null)},function(e){s.reject(e)}),o},r}]),we7ResourceMusicFormController.$inject=["$scope"],angular.module("we7resource").component("we7ResourceMusicform",{templateUrl:"widget-musicform-musicform.html",bindToController:!0,controller:we7ResourceMusicFormController,bindings:{doselect:"&",musicurl:"<"}}),UploadController.$inject=["$scope","$sce","uiUploader","$timeout"],angular.module("we7resource").component("we7UploaderBtn",{templateUrl:"widget-upload-upload.html",controller:UploadController,transclude:!0,replace:!0,bindings:{name:"<",uploadUrl:"<",accept:"<",onUploading:"&",onUploaded:"&",onUploadError:"&",onProgress:"&",multiple:"<"}}),uiUploader.$inject=["$log","$q"],angular.module("we7resource").service("uiUploader",["$log","$q",uiUploader]),VoiceController.$inject=["$scope","$sce","serviceResource","$controller"],angular.module("we7resource").component("we7ResourceVoice",{templateUrl:"widget-voice-voice.html",controller:VoiceController,transclude:!0,bindings:{isWechat:"<",showType:"<"}}),angular.module("wesiteApp",["we7app"]),angular.module("wesiteApp").controller("WesiteDisplay",["$scope","$http","serviceCommon","config",function(e,t,a,n){e.default_site=n.default_site,e.multis=n.multis,e.links=n.links,angular.forEach(e.multis,function(t,a){t.copyLink=e.links.appHome+"t="+t.id}),e.preview=function(t){var t=parseInt(t),a=util.dialog("预览模板",'<iframe width="320px" scrolling="yes" height="480px" frameborder="0" src="about:blank"></iframe>','<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>'),n=e.links.appHome+"&t="+t;a.find("iframe").attr("src",n),a.find(".modal-dialog").css({width:"322px"}),a.find(".modal-body").css({padding:"0",height:"480px"}),a.modal("show")},e.switchOn=function(a,n){var i=_.indexOf(e.multis,a),n=parseInt(n);i>-1&&t.post(e.links.switch,{id:n}).success(function(t){0==t.message.errno&&(e.multis[i].status=1==e.multis[i].status?"0":"1",util.message("修改成功!"))})},e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');a.copySuccess(e,t)}}]),angular.module("wesiteApp").controller("WesitePost",["$scope","config","$http","serviceCommon","serviceHomeMenuBase","serviceQuickMenuBase","serviceQuickMenuSubmit",function(e,t,a,n,i,s,o){e.links=t.links,e.attachurl=t.attachurl,e.default_site=t.default_site,e.temtypes=t.temtypes,e.temtype={name:"all",title:"全部"},e.searchedStyleName="",e.multi=t.multi,e.styles=t.styles,e.siteEntrance=e.links.murl+"t="+e.multi.id,e.slideLists=[],e.showSlideSubmit=!1,e.addHomemenuStatus=!1,e.homeMenu=[],e.sections=i.initSections(),e.menuInfo=i.initHomemenuInfo(),e.activeItem={},e.modules={},e.quickMenuStatus=!0,e.hasIgnoreModules=0,e.submit={},e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');n.copySuccess(e,t)},e.selectStyle=function(t){e.multi.style=t},e.searchStyle=function(){a.post(e.links.searchStyleLink,{name:e.searchedStyleName}).success(function(t){0==t.message.errno&&(e.styles=t.message.message)})},e.changeMultiStatus=function(){e.multi.status=1==e.multi.status?0:1},e.uploadMultiImage=function(){require(["fileUploader"],function(t){t.init(function(t){e.multi.site_info.thumb=t.url,e.$apply(e.multi.site_info)},{direct:!0,multiple:!1})})},e.delMultiImage=function(){e.multi.site_info.thumb=""},e.loadSlideInfo=function(){a.post(e.links.slideDisplay,{multiid:t.multiid}).success(function(t){0==t.message.errno&&(e.slideLists=t.message.message,_.isEmpty(e.slideLists)||(e.showSlideSubmit=!0))})},e.addSlide=function(){e.slideLists.push({title:"",displayorder:0,thumb:"",url:""}),e.showSlideSubmit=!0},e.delSlide=function(t){var a=_.indexOf(e.slideLists,t);a>-1&&(e.slideLists=_.without(e.slideLists,e.slideLists[a])),_.isEmpty(e.slideLists)&&(e.showSlideSubmit=!1)},e.uploadSlideImage=function(t){var a=_.indexOf(e.slideLists,t);a>-1?require(["fileUploader"],function(t){t.init(function(t){e.slideLists[a].thumb=t.url,e.$apply(e.slideLists)},{direct:!0,multiple:!1})}):util.message("参数错误,请刷新页面重试!")},e.delSlideImage=function(t){var a=_.indexOf(e.slideLists,t);a>-1&&(e.slideLists[a].thumb="")},e.saveSlide=function(){a.post(e.links.slidePost,{slide:e.slideLists,multiid:t.multiid}).success(function(e){e.message.errno,util.message(e.message.message)})},e.loadHomemenuInfo=function(){a.post(e.links.homeMenuDisplay,{multiid:t.multiid},{cache:!1}).success(function(t){0==t.message.errno&&(e.homeMenu=t.message.message,e.addHomemenuStatus=!1)})},e.changeHomemenuStatus=function(t){if(e.addHomemenuStatus=!e.addHomemenuStatus,_.isEmpty(t))e.menuInfo=i.initHomemenuInfo();else{e.menuInfo=t;var a=parseInt(e.menuInfo.section);a=a<=10&&a>=0?a:0,e.menuInfo.section=e.sections[a],_.isEmpty(e.menuInfo.icon)?e.menuInfo.icontype=1:e.menuInfo.icontype=2}},e.updateMenu=function(t,n){var i=parseInt(t.id),s=_.indexOf(e.homeMenu,t);if(s>-1)switch(n){case"del":a.post(e.links.homeMenuDel,{id:i}).success(function(a){0==a.message.errno?(util.message("删除成功!"),e.homeMenu=_.without(e.homeMenu,t)):(-1==a.message.errno&&util.message("本公众号不存在该导航!"),1==a.message.errno&&util.message("删除失败,请稍候重试。"))});break;case"switch":a.post(e.links.homeMenuSwith,{id:i}).success(function(t){0==t.message.errno?e.homeMenu[s].status=!e.homeMenu[s].status:(-1==t.message.errno&&util.message("本公众号不存在该导航!"),1==t.message.errno&&util.message("更新失败,请稍候重试。"))})}},e.uploadHomemenuImage=function(t){require(["fileUploader"],function(t){t.init(function(t){e.menuInfo.icon=t.attachment,e.$apply(e.menuInfo)},{direct:!0,multiple:!1})})},e.delHomemenuImage=function(t){e.menuInfo.icon=""},e.selectHomemenuIcon=function(){util.iconBrowser(function(t){e.menuInfo.css.icon.icon=t,e.$apply(e.menuInfo.css)})},e.saveMenu=function(){a.post(e.links.homeMenuPost,{menu_info:e.menuInfo,multiid:t.multiid}).success(function(t){0==t.message.errno?(util.message("导航菜单保存成功!"),e.loadHomemenuInfo()):(1==t.message.errno&&util.message("保存失败!"),-1==t.message.errno&&util.message("抱歉,请输入导航菜单的名称!"))})},e.successMenu=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10;width:80px;margin-left:10px"><i class="fa fa-check-circle"></i> 复制成功</span>');n.copySuccess(e,t)},e.quickMenuSwitch=function(){e.quickMenuStatus=!e.quickMenuStatus},e.loadQuickmenuInfo=function(){a.post(e.links.quickMenuDisplay,{multiid:t.multiid}).success(function(t){0==t.message.errno?(e.activeItem=t.message.message.params,e.activeItem.position?(e.activeItem.position.homepage=!!e.activeItem.position.homepage,e.activeItem.position.page=!!e.activeItem.position.page,e.activeItem.position.article=!!e.activeItem.position.article):e.activeItem.position={homepage:!1,page:!1,article:!1},s.initActiveItem(e.activeItem),e.modules=t.message.message.modules,e.quickMenuStatus=t.message.message.status,e.hasIgnoreModules=_.size(e.activeItem.ignoreModules)):util.message("请求错误:微站不存在,请按“Ctrl+F5”刷新重试!")})},e.saveQucikMenu=function(){e.submit=o.submit(),a.post(e.links.quickMenuPost,{multiid:t.multiid,postdata:e.submit,status:e.quickMenuStatus?1:0}).success(function(e){0==e.message.errno?util.message("保存成功。您可点击“预览刷新”查看效果!"):util.message(e.message.message)})},e.showSearchModules=function(){e.moduleDialog=$("#shop-modules-modal").modal(),$("#shop-modules-modal .modal-body .btn-primary").html("取消"),$("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function(){e.activeItem.ignoreModules={},$("#shop-modules-modal .modal-body .btn-primary").each(function(){e.hasIgnoreModules=!0,e.activeItem.ignoreModules[$(this).attr("js-name")]={name:$(this).attr("js-name"),title:$(this).attr("js-title")}}),e.$apply("activeItem"),e.$apply("hasIgnoreModules"),s.setQuickMenuData("ignoreModules",e.activeItem.ignoreModules)})},e.selectNavStyle=function(){var t=$('#shop-nav-modal .alert input[type="radio"]:checked').val();e.activeItem.navStyle=s.selectNavStyle(t)},e.addMenu=function(){e.activeItem.menus=s.addMenu()},e.addSubMenu=function(t){var a=_.findIndex(e.activeItem.menus,t);e.activeItem.menus[a].submenus=s.addSubMenu(t)},e.removeMenu=function(t){e.activeItem.menus=s.removeMenu(t)},e.removeSubMenu=function(t,a){s.removeSubMenu(t,a),e.activeItem.menus[t].submenus=_.without(e.activeItem.menus[t].submenus,a)}}]),angular.module("wesiteApp").controller("WesiteTplDidplay",["$scope","config",function(e,t){e.stylesResult=t.stylesResult,e.temtypes=t.temtypes,e.type=t.type,e.setting=t.setting,e.links=t.links,e.preview=function(t){var t=parseInt(t),a='\t\t\t<a href="'+e.links.default+"&styleid="+t+'" class="btn btn-primary">设为默认模板</a>\t\t\t<a href="'+e.links.designer+"&styleid="+t+'" class="btn btn-primary">设计风格</a>\t\t\t<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>',n=util.dialog("预览模板",'<iframe width="320" scrolling="yes" height="480" frameborder="0" src="about:blank"></iframe>',a);n.find("iframe").on("load",function(){$("a",this.contentWindow.document.body).each(function(){var e=$(this).attr("href");if(e&&"#"!=e[0]){var a=e.split(/#/g),n=a[0];"&"!=n.slice(-1)&&(n+="&"),-1!=n.indexOf("?")&&(n+="s="+t),a[1]&&(n+="#"+a[1]),"javascript"!=n.substr(0,10)&&-1!=n.indexOf("?")||(n=n.substr(0,n.lastIndexOf("&"))),$(this).attr("href",n)}})});var i=e.links.home+"&s="+t;n.find("iframe").attr("src",i),n.find(".modal-dialog").css({width:"322px"}),n.find(".modal-body").css({padding:"0",height:"480px"}),n.modal("show")},e.selectDefault=function(t){var a=parseInt(t);location.href=e.links.default+"&styleid="+a}}]),angular.module("wesiteApp").controller("WesiteTplPost",["$scope","config",function(e,t){e.style=t.style,e.styles=t.styles?t.styles:{},e.template=t.template,e.systemtags=t.systemtags,e.customStyles=[],angular.forEach(e.styles,function(t,a){-1==_.indexOf(e.systemtags,t.variable)&&e.customStyles.push(t)}),e.addCustomAttribute=function(){$("#customForm").append($("#item-form-html").html())},e.delCustomArrtibute=function(e){$(e.target).parent().parent().remove()},e.uploadImage=function(){require(["fileUploader"],function(t){t.init(function(t){e.styles.indexbgimg={content:t.url},e.$apply(e.styles.indexbgimg.content)},{direct:!0,multiple:!1})})},e.delImage=function(){e.styles.indexbgimg=""},e.checkSubmit=function(e){for(var t=$(':text[name="custom[name][]"]'),a=$(':text[name="custom[desc][]"]'),n=$(':text[name="custom[value][]"]'),i=0;i<t.length;i++)if(_.isEmpty(t[i].value))return util.message("自定义属性变量名不可为空!"),!1;for(var s=0;s<a.length;s++)if(_.isEmpty(a[s].value))return util.message("自定义属性变量描述不可为空!"),!1;for(var o=0;o<n.length;o++)if(_.isEmpty(n[o].value))return util.message("自定义属性变量值不可为空!"),!1;$("#submit-post").click()}}]),angular.module("wesiteApp").controller("wesiteArticleDisplay",["$scope","config","serviceCommon","$http",function(e,t,a,n){e.category=t.category,e.articleList=t.articleList,e.commentListLink=t.commentListLink,e.articleComment=t.articleComment,e.setting=t.setting,e.commentLink=t.commentLink,angular.forEach(e.articleList,function(a,n){if(0!=a.pcate){var i=parseInt(a.pcate);if(0!=a.ccate){s=parseInt(a.ccate);angular.isDefined(e.category[i])&&angular.isDefined(e.category[s])&&(a.title="【"+e.category[i].name+"】-【"+e.category[s].name+"】"+a.title)}else angular.isDefined(e.category[i])&&(a.title="【"+e.category[i].name+"】"+a.title)}else if(0!=a.ccate){var s=parseInt(a.ccate);angular.isDefined(e.category[s])&&(a.title="【"+e.category[s].name+"】"+a.title)}a.link=t.copyCommonLink+a.id;var o=e.articleComment;a.count=o&&o[a.id]?e.articleComment[a.id].count:0,e.articleList[n]=a}),e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');a.copySuccess(e,t)},e.editArticle=function(e){var e=parseInt(e);location.href="./index.php?c=site&a=article&do=post&id="+e},e.delArticle=function(e){if(confirm("此操作不可恢复,确认吗?")){var e=parseInt(e);location.href="./index.php?c=site&a=article&do=del&id="+e}},e.comment=function(){n.post(e.commentLink,{}).success(function(t){0==t.message.errno?(e.setting.comment_status=t.message.message,util.message("设置成功")):util.message(t.message.message,t.direct)})}}]),angular.module("wesiteApp").controller("WesiteArticlePost",["$scope","config",function(e,t){e.item=t.item,e.keywords=t.keywords,e.id=t.id,e.template=t.template,e.uploadImage=function(){require(["fileUploader"],function(t){t.init(function(t){e.item.thumb=t.url,e.$apply(e.item.thumb)},{direct:!0,multiple:!1})})},e.delImage=function(){e.item.thumb=""}}]),angular.module("wesiteApp").controller("WesiteCategoryPost",["$scope","config",function(e,t){e.id=t.id,e.category=t.category,e.parent=t.parent,e.parentid=t.parentid,e.multis=t.multis,e.site_template=t.site_template,e.styles=t.styles,angular.isUndefined(e.category.enabled)?e.enabled=!0:e.id&&1==e.category.enabled?e.enabled=!0:e.enabled=!1,angular.isUndefined(e.category.icontype)||0==e.category.icontype||1==e.category.icontype?e.icontype=!0:e.icontype=!1,e.selectIcon=function(){util.iconBrowser(function(t){e.category.css.icon.icon=t,e.$apply(e.category.css)})},e.showWesite=function(){$(".js-site-selector").show()},e.hideWesite=function(){$(".js-site-selector").hide()},e.changeStyle=function(t){var a=parseInt(t),n=$(".title-"+a).text(),i=$(".preview-"+a).attr("src");$(".item-style").removeClass("active"),e.category.styleid=a,$("#current-title").text(n),$("#current-preview").attr("src",i),$(".title-"+a).parent().parent().addClass("active"),$("#ListStyle").modal("hide"),e.$apply(e.category.styleid)},e.uploadImage=function(){require(["fileUploader"],function(t){t.init(function(t){e.category.icon=t.url,e.$apply(e.category.icon)},{direct:!0,multiple:!1})})},e.delImage=function(){e.category.icon=""}}]),angular.module("wesiteApp").controller("articleComment",["$scope","config","$http",function(e,t,a){e.articleId=t.articleId,e.order_sort=t.order_sort,e.is_comment=t.is_comment,e.articleList=t.articleList,e.links=t.links,e.content="",e.replyarticle=function(e){e.replying=!0},e.cancel=function(e){e.replying=!1},e.send=function(t){var n=t.id;a.post(e.links.reply,{articleid:e.articleId,parentid:n,content:t.replycontent}).success(function(e){if(0!=e.message.errno)return util.message(e.message.message),!1;t.son_comment.push(e.message.message),t.replying=!1,t.replycontent=""})},e.changeSort=function(){a.post(e.links.display,{order:e.order_sort,id:e.articleId}).success(function(t){e.articleList=t.message.message})},e.changeComment=function(){a.post(e.links.display,{iscommend:e.is_comment,id:e.articleId}).success(function(t){e.articleList=t.message.message})}}]),angular.module("wesiteApp").service("serviceCommon",["$rootScope",function(e){var t={};return t.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},t}]),angular.module("wesiteApp").service("serviceHomeMenuBase",["$rootScope",function(e){var t={};return t.initHomemenuInfo=function(){return{css:{icon:{width:"",color:"",icon:""}},name:"",description:"",url:"",status:1,displayorder:0,icon:"",icontype:1,section:0}},t.initSections=function(){return[{num:0,val:"不设置位置"},{num:1,val:"位置1"},{num:2,val:"位置2"},{num:3,val:"位置3"},{num:4,val:"位置4"},{num:5,val:"位置5"},{num:6,val:"位置6"},{num:7,val:"位置7"},{num:8,val:"位置8"},{num:9,val:"位置9"},{num:10,val:"位置10"}]},t}]),angular.module("wesiteApp").service("serviceQuickMenuBase",["$rootScope",function(e){var t={},a={};return t.initActiveItem=function(e){return a=angular.isObject(e)?e:{navStyle:1,bgColor:"#2B2D30",menus:[],extend:[],position:{homepage:!0,usercenter:!0,page:!0,article:!0},ignoreModules:{}}},t.selectNavStyle=function(e){return a.navStyle=e,a.navStyle},t.addMenu=function(){return void 0===a.menus&&(a.menus=[]),a.menus.push({title:"标题",url:"",submenus:[],icon:{name:"fa-home",color:"#00ffff"},image:"",hoverimage:"",hovericon:""}),a.menus},t.removeMenu=function(e){var t=$.inArray(e,a.menus),n=angular.copy(a.menus);a.menus=[];for(i in n)i!=t&&a.menus.push(n[i]);return a.menus},t.addSubMenu=function(e){var t=_.findIndex(a.menus,e);return void 0===a.menus[t].submenus?a.menus[t].submenus=[{title:"标题",url:""}]:a.menus[t].submenus.push({title:"标题",url:""}),a.menus[t].submenus},t.removeSubMenu=function(e,t){return a.menus[e].submenus=_.without(a.menus[e].submenus,t),a.menus[e].submenus},t.getQuickMenuData=function(e){return angular.isString(e)?a[e]:a},t.setQuickMenuData=function(e,t){angular.isObject(e)?angular.forEach(e,function(e,t){a[t]=e}):a[e]=t},t}]),angular.module("wesiteApp").service("serviceQuickMenuSubmit",["serviceQuickMenuBase",function(e){var t={};return t.stripHaskey=function(e){for(var a in e)"$$hashKey"==a?delete e[a]:"object"==typeof e[a]&&t.stripHaskey(e[a]);return e},t.submit=function(){var a={params:{},html:""};a.params=e.getQuickMenuData(),t.stripHaskey(a.params);var n=$(".nav-menu").html();return n=n.replace(/<\!\-\-([^-]*?)\-\->/g,""),n=n.replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),n=n.replace(/[\t\n\n\r]/g,""),a.html=n,a},t}]),angular.module("specialApp",["wapeditorApp"]),angular.module("specialApp").controller("MainCtrl",["$scope","$timeout","$uibModal","widget","config","serviceCommon","serviceSetStyle","serviceBase","serviceSpecialBase","serviceSubmit","serviceMultiSubmit","serviceMultiPage","serviceUpwardCompatible","$sanitize",function(e,t,a,n,i,s,o,r,l,c,u,d,p,m){e.modules=[],e.editors=[],e.allPages=i.allPages,e.multipage=i.multipage?i.multipage:[],e.submit={params:{},html:"",multipage:[]},e.isNew=!0,e.allPages&&-1==_.findIndex(e.allPages,{active:!0})&&(e.isNew=!1,e.allPages=[{property:e.allPages,active:!0}]),r.setBaseData("isNew",e.isNew),e.allPages=e.allPages?e.allPages:[{property:[],active:!0}];var g=_.findIndex(e.allPages,{active:!0});e.activeModules=g>-1?r.initActiveModules(e.allPages[g].property):[],e.activePageIndex=g>-1?g:0,l.setBaseData("activePageIndex",e.activePageIndex),e.activeItem={},e.activeIndex=0,e.index=e.activeModules.length?s.getMaxScopeIndex(e.allPages)+1:0,r.setBaseData("index",e.index),e.pageLength=_.isEmpty(e.activeModules)?1:e.activeModules[0].params.pageLength?e.activeModules[0].params.pageLength:1,e.isMultiPage=0==e.index||!(e.activeModules[s.getHeaderIndex(e.activeModules)].params.pageLength>1),e.isLongPage=0==e.index||(e.activeModules[s.getHeaderIndex(e.activeModules)].params.pageLength>1||1==e.activeModules[s.getHeaderIndex(e.activeModules)].params.pageLength&&1==e.allPages.length),e.pageLengths={1:1,2:2,3:3,4:4,5:5},e.lineHeights={1:1,1.25:1.25,1.5:1.5,2:2,2.5:2.5},e.fontSizes={12:12,14:14,16:16,18:18,20:20,22:22,24:24,26:26,28:28,30:30,32:32,34:34,36:36,38:38,40:40},l.setBaseData("allPages",e.allPages),l.setBaseData("multipage",e.multipage),r.setBaseData("pageLength",e.pageLength),e.isNew||(e.activeModules=p.compatibility(e.activeModules),void 0===e.activeModules[0].params.pageLength&&(e.activeModules[0].params.pageLength=Math.ceil($(".modules").height()/568)),e.activeModules[0].params.pageLength>1&&(e.pageLength=e.activeModules[0].params.pageLength,e.isMultiPage=!1,e.isLongPage=!0,r.setBaseData("pageLength",e.pageLength),t(function(){$(".app-content").css("height",568*e.pageLength+"px")},100)),t(function(){var t=0,a=height="";$(".modules>div").each(function(){var n=parseInt($(this).attr("index"));if(a=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("width"),height=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("height"),n>0){for(var i in e.activeModules)e.activeModules[i].index==n&&(t+=parseInt(e.activeModules[i].marginTop),e.activeModules[i].params.positionStyle.width=parseInt(a),e.activeModules[i].params.positionStyle.height=parseInt(height),e.activeModules[i].params.positionStyle.top=t,e.activeModules[i].positionStyle="position:absolute;width:"+a+";height:"+height+";left:"+e.activeModules[i].params.positionStyle.left+"px;top:"+t+"px;",$(this).find("div[ng-controller]").attr("style",e.activeModules[i].positionStyle));t+=parseInt(height)}i++}),r.setBaseData("activeModules",e.activeModules)},1e3));for(var f in e.activeModules)e.activeModules[f].originParams=angular.copy(e.activeModules[f].params);e.$on("serviceBase.editors.update",function(t,a){e.editors=a}),e.$on("serviceBase.activeItem.update",function(t,a){e.activeItem=a}),e.$on("serviceBase.activeModules.update",function(t,a){e.activeModules=a}),e.$on("serviceBase.activeItem.params.update",function(t,a){e.activeItem.params=a}),e.$on("serviceBase.activeItem.animationName.update",function(t,a){e.activeItem.params.animationStyle.animationName=a}),e.$on("serviceBase.activeItem.style.update",function(t,a,n,i,s){e.activeItem.params[a]=n,e.activeItem[a]=i,void 0!==s&&(e.activeItem.transform=s)}),e.$on("updateScope",function(t,a){angular.forEach(a,function(t,a){e[a]=t})}),e.addItem=function(e){r.addItem(e)},e.editItem=function(e){r.editItem(e)},e.deleteItem=function(e){r.deleteItem(e)},e.submit=function(t){e.submit=c.submit(),e.$apply("submit"),$(t.target).parents("form").submit()},e.multiSubmit=function(t){e.submit=u.submit(),e.$apply("submit"),$(t.target).parents("form").submit()},e.init=function(t,a){if(e.modules=r.setModules(t,a),e.activeModules.length>0){var n=[];angular.forEach(e.activeModules,function(e,t){e&&n.push(e.id)})}angular.forEach(e.modules,function(e,t){e.defaultshow&&-1==$.inArray(e.id,n)&&r.addItem(e.id)})},e.setModulePositionStyle=function(e){o.setModulePositionStyle(e)},e.eleAnimationIns=function(e){o.eleAnimationIns(e)},e.savePagePosition=function(){o.savePagePosition(e.activeModules)},e.saveModulePosition=function(){o.saveModulePosition(e.activeItem)},e.changeTextAlign=function(t){o.changeTextAlign(e.activeItem,t)},e.changeBorderWidth=function(){o.changeBorderWidth(e.activeItem)},e.changeInnerHeight=function(){o.changeInnerHeight(e.activeItem)},e.clearModuleStyle=function(){o.clearModuleStyle(e.activeItem)},e.changePageLength=function(t){if(angular.isString(t))if("minus"==t&&e.pageLength>1)t=e.pageLength-1;else{if(!("plus"==t&&e.pageLength<5))return!1;t=e.pageLength+1}var a=o.changePageLength(t,e.activeModules);r.setBaseData("pageLength",parseInt(t)),r.setBaseData("activeModules",a)},e.insertPage=function(){d.insertPage(),e.init(null,["header"])},e.navToPage=function(t){d.navToPage(t),e.activeHeader()},e.removePage=function(t){d.removePage(t),e.activeHeader()},e.copyPage=function(t,a){d.copyPage(t,a),e.activeHeader()},e.changeLock=function(){e.activeItem.params.baseStyle.lock=!e.activeItem.params.baseStyle.lock},e.activeHeader=function(){for(var t in e.activeModules)if("header"==e.activeModules[t].id){e.pageLength=e.activeModules[t].params.pageLength?e.activeModules[t].params.pageLength:1,o.changePageLength(e.pageLength,e.activeModules),r.setBaseData("activeItem",e.activeModules[0]),e.editItem(e.activeModules[t].index);break}},$(".multi-submit").on("click",function(t){e.multiSubmit(t)}),$(".single-submit").on("click",function(t){e.submit(t)}),e.init(null,["header"]),e.activeHeader(),e.$watch("activeItem.params.baseStyle",function(e){e&&o.setModuleBaseStyle(e)},!0),e.$watch("activeItem.params.borderStyle",function(e){e&&o.setModuleBorderStyle(e)},!0),e.$watch("activeItem.params.shadowStyle",function(e){e&&o.setModuleShadowStyle(e)},!0),e.$watch("activeItem.params.animationStyle",function(e){e&&o.setModuleAnimationStyle(e)},!0),e.$watch("activeItem.params.positionStyle",function(e){e&&o.setModulePositionStyle(e)},!0)}]),angular.module("specialApp").controller("SpecialDisplay",["$scope","serviceCopy","config",function(e,t,a){e.pages=a.pages,e.links=a.links,angular.forEach(e.pages,function(t,a){t.copyLink=e.links.appHome+"id="+t.id}),e.success=function(e){var e=parseInt(e),a=$('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');t.copySuccess(e,a)}}]),angular.module("specialApp").directive("we7Multipage",function(){return{replace:!0,templateUrl:"directive-multipage-multipage.html"}}),angular.module("specialApp").service("serviceSpecialBase",["$rootScope","serviceBase",function(e,t){var a={},n={activePageIndex:0,isMultiPage:!0,isLongPage:!0,allPages:[],multipage:[]};return a.getBaseData=function(e){return n[e]},a.setBaseData=function(e,t){angular.isObject(e)?angular.forEach(e,function(e,t){n[t]=e}):n[e]=t},a}]),angular.module("specialApp").service("serviceCopy",["$rootScope",function(e){var t={};return t.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},t}]),angular.module("specialApp").service("serviceMultiPage",["$rootScope","serviceCommon","serviceBase","serviceSpecialBase","$window",function(e,t,a,n,i){var s={};return s.insertPage=function(){s.saveCurPage();var t=n.getBaseData("allPages"),i=n.getBaseData("activePageIndex");t[i].active=!1,t.push({property:[],active:!0}),$(".app-content").css("height","568px"),i=_.findIndex(t,{active:!0}),a.setBaseData({activeModules:[],pageLength:1}),n.setBaseData({allPages:t,isMultiPage:!0,isLongPage:!1,activePageIndex:i}),e.$broadcast("updateScope",{allPages:t,isMultiPage:!0,isLongPage:!1,pageLength:1,activePageIndex:i,activeModules:[]})},s.navToPage=function(t){var i=n.getBaseData("activePageIndex");if(i==t)return!1;s.saveCurPage();var o=n.getBaseData("allPages"),r=o[t].property;o[i].active=!1,o[t].active=!0,i=t,a.setBaseData("activeModules",r),a.setBaseData("activeItem",r[0]),n.setBaseData({allPages:o,activePageIndex:i}),e.$broadcast("updateScope",{allPages:o,activePageIndex:i,activeModules:r})},s.removePage=function(t){var i=[],o=n.getBaseData("allPages"),r=n.getBaseData("multipage");if(1==o.length)return!1;s.saveCurPage(),r.splice(parseInt(t),1);var l=_.clone(o),c=o.length-1-t;o=[];for(var u in l)if(u!=t)switch(c){case 0:parseInt(u)+1==t?(o.push({property:l[u].property,active:!0}),i=l[u].property):o.push({property:l[u].property,active:!1});break;default:u-1==t?(o.push({property:l[u].property,active:!0}),i=l[u].property):o.push({property:l[u].property,active:!1})}activePageIndex=_.findIndex(o,{active:!0}),1==o.length&&(n.setBaseData({isMultiPage:!0,isLongPage:!0}),e.$broadcast("updateScope",{isMultiPage:!0,isLongPage:!0})),a.setBaseData("activeModules",i),n.setBaseData({allPages:o,activePageIndex:activePageIndex}),e.$broadcast("updateScope",{allPages:o,activePageIndex:activePageIndex,activeModules:i})},s.copyPage=function(t,i){s.saveCurPage();var o=a.getBaseData("index"),r=n.getBaseData("allPages"),l=n.getBaseData("multipage");l.splice(parseInt(t),0,l[t]);var c=angular.copy(r);r=[];for(var u in c)if(u==t){r.push({property:c[u].property,active:!1});var d=angular.copy(c[u].property);for(var p in d)d[p].index=o++;r.push({property:d,active:!0});var m=d}else r.push({property:c[u].property,active:!1});activePageIndex=_.findIndex(r,{active:!0}),a.setBaseData("activeModules",m),a.setBaseData("index",o),n.setBaseData({allPages:r,multipage:l,isMultiPage:!0,isLongPage:!1,activePageIndex:activePageIndex}),i.stopPropagation(),e.$broadcast("updateScope",{allPages:r,isMultiPage:!0,isLongPage:!1,activePageIndex:activePageIndex,activeModules:m})},s.saveCurPage=function(){var i=a.getBaseData("activeModules"),s=a.getBaseData("pageLength"),o=n.getBaseData("allPages"),r=n.getBaseData("multipage"),l=_.findIndex(o,{active:!0}),c="";$($(".modules").html()).find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var e=$(this).parent().parent(),n=_.findIndex(i,{index:parseInt(e.attr("index"))}),o="",r=angular.copy(i[n].params);$(this).find(".js-default-content").remove(),$(this).find(".bar").remove();var l=e.attr("name").toLowerCase();if("header"!=l){var u=$(this).css("top"),d=$(this).css("left"),p=$(this).css("width"),m=$(this).css("height"),g="position:absolute;top:"+u+";left:"+d+";width:"+p+";height:"+m+";";i[n].params.positionStyle.top=parseInt(u),i[n].params.positionStyle.left=parseInt(d),i[n].params.positionStyle.width=parseInt(p),i[n].params.positionStyle.height=parseInt(m),i[n].positionStyle=g}else i[n].params.pageLength=s;switch(l){case"link":var f=this;angular.forEach(r.items,function(e,a){(e.selectCate.pid||e.selectCate.cid)&&$(f).find(".list-group").children().eq(a).replaceWith("<div>"+t.buildDataTagBegin("link",e)+'<div class="list-group-item ng-scope"><a href="{$row[url]}" class="clearfix"><span class="app-nav-title"> {$row[title]}<i class="pull-right fa fa-angle-right"></i></span></a></div>'+t.buildDataTagEnd()+"</div>")});break;case"richtext":i[n]&&(i[n].params.content="")}if(o=$(this).html(),!a.getBaseData("isNew")){var h=parseInt(u)-64;$(this).css("top",h+"px")}if("header"!=l){g=$(this).attr("style");c+='<div type="'+l+'" style="'+g+'">'+o+"</div>"}}),c=c.replace(/<\!\-\-([^-]*?)\-\->/g,""),c=c.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),c=c.replace(/ ng\-[a-zA-Z]+/g,""),r[l]=c,o[l].property=i,a.setBaseData("activeModules",i),n.setBaseData({allPages:o,multipage:r}),e.$broadcast("updateScope",{activeModules:i,allPages:o,multipage:r})},s}]),angular.module("specialApp").service("serviceMultiSubmit",["serviceCommon","serviceMultiPage","serviceSpecialBase",function(e,t,a){var n={};return n.submit=function(n){t.saveCurPage();var i=a.getBaseData("multipage"),s=a.getBaseData("allPages"),o="",r='<section class="u-arrow-bottom" style="bottom: 15%;"><div class="pre-wrap"><div class="pre-box1"><div class="pre1"></div></div><div class="pre-box2"><div class="pre2"></div></div></div></section></div>';$.each(i,function(e,t){e+1==i.length?o+=1==s.length?'<div class="pane">'+t+"</div>":'<div class="pane overflowhidden">'+t+"</div>":o+=1==s.length?'<div class="pane">'+t+r:'<div class="pane overflowhidden">'+t+r});for(var l in s)for(var c in s[l].property)delete s[l].property[c].originParams,delete s[l].property[c].marginTop;var u={},d=$(".app-content").css("height");return o='<div style="height:'+d+'"><div class="panes">'+o+"</div></div>",o=o.replace(/<\!\-\-([^-]*?)\-\->/g,""),o=o.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),o=o.replace(/ ng\-[a-zA-Z]+/g,""),u.html=o,u.params=angular.copy(s),u.multipage=i,e.stripHaskey(u.params),u},n}]),angular.module("statisticsApp",["we7app"]),angular.module("statisticsApp").controller("HorizontalBarCtrl",["$scope","$http","serviceCommon","config",function(e,t,a,n){e.needAccountApi="account"==n.frame||"wxapp"==n.frame,require(["echarts"],function(i){if(e.needAccountApi)var s=i.init(document.getElementById("chart-line"));accountOption={tooltip:{trigger:"axis",axisPointer:{type:"line"}},grid:{left:"3%",right:"3%",bottom:"3%",containLabel:!0},xAxis:{data:[]},yAxis:{splitArea:{show:!0}},series:[{name:"数量",type:"line",smooth:!0,data:[]}]},e.needAccountApi&&s.showLoading();var o=i.init(document.getElementById("chart-horizontal-bar"));moduleOption={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"3%",bottom:"3%",containLabel:!0},xAxis:{},yAxis:{type:"category",data:[]},series:[{name:"数量",type:"bar",data:[]}]},o.showLoading(),e.active=!0,e.code="<script type=\"text/javascript\" src=\"{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=utility&a=visit&do=showjs&m={$_W['current_module']['name']}\"><\/script>",e.show=!0,e.accountDateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.moduleDateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.changeDivideType=function(t,a){"account"==t&&(e.accountDivideType=a),"module"==t&&(e.moduleDivideType=a),e.getModuleApi(t,"week")},e.getModuleApi=function(a,i){var r="",l="",c="";"account"==a&&(e.accountTimeType=i,e.accountLabels=[],e.accountData=[],r=n.links.accountApi,l=e.accountDivideType,c=e.accountDateRange),"module"==a&&(e.moduleTimeType=i,e.moduleLabels=[],e.moduleData=[],r=n.links.moduleApi,l=e.moduleDivideType,c=e.moduleDateRange),t.post(r,{divide_type:l,time_type:i,daterange:c}).success(function(t){if(e.needAccountApi&&s.hideLoading(),o.hideLoading(),e.needAccountApi&&"account"==a&&(accountOption.xAxis.data=t.message.message.data_x,accountOption.series[0].data=t.message.message.data_y,s.setOption(accountOption)),"module"==a){var n=t.message.message.data_y.length;e.actualHight=15*parseInt(n)+"px",moduleOption.series[0].data=t.message.message.data_x,moduleOption.yAxis.data=t.message.message.data_y,o.setOption(moduleOption)}})},e.accountDivideType="bysum",e.moduleDivideType="bysum",e.accountTimeType="week",e.moduleTimeType="week",e.needAccountApi&&e.getModuleApi("account",e.accountTimeType),e.getModuleApi("module",e.moduleTimeType),e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');a.copySuccess(e,t)},e.changeStatus=function(){e.show=!e.show},e.$watch("moduleDateRange",function(t,a){t&&t!=a&&(e.moduleDateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.moduleDateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getModuleApi("module","daterange"))},!0),e.$watch("accountDateRange",function(t,a){t&&t!=a&&(e.accountDateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.accountDateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getModuleApi("account","daterange"))},!0)})}]),angular.module("statisticsApp").controller("statisticsSettingCtrl",["$scope","$http","config",function(e,t,a){e.setting=a.highest_visit,e.interval=a.interval,e.newVisitVal=0,e.newInterval=0,e.editInfo=function(t,a){switch(t){case"visit":e.newVisitVal=a||0;break;case"interval":e.newInterval=a||0}},e.saveSetting=function(n){switch(n){case"visit":t.post(a.links.editSetting,{highest_visit:e.newVisitVal,type:"highest_visit"}).success(function(t){0==t.message.errno&&(e.setting=e.newVisitVal),util.message(t.message.message)});break;case"interval":t.post(a.links.editSetting,{interval:e.newInterval,type:"interval"}).success(function(t){0==t.message.errno&&(e.interval=e.newInterval),util.message(t.message.message)})}}}]),angular.module("statisticsApp").controller("systemAccountAppAnalysisCtrl",["$scope","$http","config",function(e,t,a){require(["echarts"],function(n){var i=n.init(document.getElementById("chart-line"));option={tooltip:{trigger:"axis",axisPointer:{type:"line"}},xAxis:{data:[]},yAxis:{splitArea:{show:!0}},series:[{name:"数量",type:"line",smooth:!0,data:[]}]},i.showLoading(),e.dateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.changeDivideType=function(t){e.divideType=t,e.getAccountApi("week")},e.getAccountApi=function(n){e.timeType=n,t.post(a.links.accountApi,{divide_type:e.divideType,time_type:n,daterange:e.dateRange}).success(function(e){i.hideLoading(),option.xAxis.data=e.message.message.data_x,option.series[0].data=e.message.message.data_y,i.setOption(option)})},e.divideType="bysum",e.timeType="week",e.getAccountApi(e.timeType),e.$watch("dateRange",function(t,a){t&&t!=a&&(e.dateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.dateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getAccountApi("daterange"))},!0)})}]),angular.module("statisticsApp").controller("systemAccountAnalysisCtrl",["$scope","$http","config",function(e,t,a){require(["echarts"],function(n){var i=n.init(document.getElementById("chart-line"));accountOption={tooltip:{trigger:"axis",axisPointer:{type:"line"}},grid:{left:"3%",right:"3%",bottom:"3%",containLabel:!0},xAxis:{data:[]},yAxis:{splitArea:{show:!0}},series:[{name:"数量",type:"line",smooth:!0,data:[]}]},i.showLoading(),e.dateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.getAccountApi=function(n){e.timeType=n,t.post(a.links.accountApi,{time_type:n,daterange:e.dateRange}).success(function(e){i.hideLoading(),accountOption.xAxis.data=e.message.message.data_x,accountOption.series[0].data=e.message.message.data_y,i.setOption(accountOption)})},e.timeType="week",e.getAccountApi(e.timeType),e.$watch("dateRange",function(t,a){t&&t!=a&&(e.dateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.dateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getAccountApi("daterange"))},!0)})}]),angular.module("statisticsApp").controller("CurrentAccountCtrl",["$scope","$http","config",function(e,t,a){require(["echarts"],function(n){var i=n.init(document.getElementById("chart-line"));accountOption={tooltip:{trigger:"axis",axisPointer:{type:"line"}},grid:{left:"3%",right:"3%",bottom:"3%",containLabel:!0},xAxis:{data:[]},yAxis:{splitArea:{show:!0}},series:[{name:"数量",type:"line",smooth:!0,data:[]}]},i.showLoading(),e.accountDateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.getModuleApi=function(n){e.accountTimeType=n,t.post(a.links.accountApi,{time_type:n,daterange:e.accountDateRange}).success(function(e){i.hideLoading(),accountOption.xAxis.data=e.message.message.data_x,accountOption.series[0].data=e.message.message.data_y,i.setOption(accountOption)})},e.accountTimeType="week",e.getModuleApi(e.accountTimeType),e.$watch("accountDateRange",function(t,a){t&&t!=a&&(e.accountDateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.accountDateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getModuleApi("daterange"))},!0)})}]),angular.module("statisticsApp").controller("FansStatisticeCtrl",["$scope","$http","serviceCommon","config",function(e,t,a,n){require(["echarts"],function(a){var i=a.init(document.getElementById("chart-line"));option={tooltip:{trigger:"axis",axisPointer:{type:"line"}},grid:{left:"3%",right:"3%",bottom:"3%",containLabel:!0},xAxis:{data:[]},yAxis:{splitArea:{show:!0}},series:[{name:"数量",type:"line",smooth:!0,data:[]}]},i.showLoading(),e.dateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.changeDivideType=function(t){e.fansDivideType=t,e.getFansApi("week")},e.getFansApi=function(a){e.timeType=a,t.post(n.links.fansApi,{divide_type:e.fansDivideType,time_type:a,daterange:e.dateRange}).success(function(e){console.log(e),i.hideLoading(),option.xAxis.data=e.message.message.data_x,option.series[0].data=e.message.message.data_y,i.setOption(option)})},e.fansDivideType="bynew",e.fansTimeType="week",e.getFansApi(e.fansTimeType),e.$watch("dateRange",function(t,a){t&&t!=a&&(e.dateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.dateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getFansApi("daterange"))},!0)})}]),angular.module("statisticsApp").service("serviceCommon",["$rootScope",function(e){var t={};return t.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},t}]),angular.module("storeApp",["we7app"]),angular.module("storeApp").controller("goodsSellerCtrl",["$scope","$http","config",function(e,t,a){e.status=a.status,e.moduleList=a.moduleList,e.keyword="",e.selectedModule="",e.visitTimes=0,e.visitPrice=0,e.showModule=function(){$("#add_module").modal("show")},e.selectModule=function(t,a){$(a.target).parents(".select-module").find(".item").addClass("active"),$(a.target).parents(".select-module").siblings().find(".item").removeClass("active"),e.selectedModule=t},e.editPrice=function(n){switch(n){case"add_module":t.post(a.links.add,{module:e.selectedModule,toedit:!0}).success(function(e){0==e.message.errno?location.href=a.links.post+"&id="+e.message.message:util.message(e.message.message)});break;case"add_api":t.post(a.links.add,{title:"应用访问流量(API)",visit_times:e.visitTimes,price:e.visitPrice,online:!0}).success(function(e){0==e.message.errno?location.href=a.links.online:util.message(e.message.message)})}},e.toOffline=function(n){switch(n){case"add_module":t.post(a.links.add,{module:e.selectedModule}).success(function(e){0==e.message.errno?location.href=a.links.offline:util.message(e.message.message)});break;case"add_api":t.post(a.links.add,{title:"应用访问流量(API)",visit_times:e.visitTimes,price:e.visitPrice}).success(function(e){0==e.message.errno?location.href=a.links.offline:util.message(e.message.message)})}}}]),angular.module("storeApp").controller("goodsPostCtrl",["$scope","$http","$compile","config",function(e,t,a,n){if(e.slideLists=[],e.goodsInfo=n.goodsInfo,e.userGroups=n.userGroups,e.changeGroup=function(e,t){var a=!0;$('[name="user_group_id[]"]').each(function(e,n){t.currentTarget.dataset.id==$(n).val()&&(a=!1)}),a&&($(".user-group-price-content .form-group-"+e+" .group-title").text(t.currentTarget.dataset.title),$(".user-group-price-content .form-group-"+e+' [name="user_group_id[]"]').val(t.currentTarget.dataset.id),$(".user-group-price-content .form-group-"+e+' [name="user_group_name[]"]').val(t.currentTarget.dataset.title))},e.addGroupPrice=function(t,n,i){var s=$(".user-group-price-content .form-group").length+1,o=e.getuserGroupsLi(s),r='<div class="form-group form-group-'+s+'"><label class="control-label col-sm-2"></label><div class="col-sm-'+(6==e.goodsInfo.type?10:8)+'"><div class="input-group"><div class="input-group-btn"><button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width:120px;background-color: #f8f9f9;color: #666;"><span class="group-title">'+(i?n:"选择用户组")+'</span> <span class="caret" style="color: #3071a9"></span><input type="hidden" name="user_group_id[]" value="'+t+'"/><input type="hidden" name="user_group_name[]" value="'+n+'"/></button><ul class="dropdown-menu dropdown-menu-right">';r+=o,r+='</ul></div><input type="number" class="form-control" min="0" name="user_group_price[]" value="'+i+'" step="0.01"><span class="input-group-addon" >元 / <span ng-if="num > 0" ng-bind="num"></span><span ng-bind="unitTitle"></span></span><div class="input-group-btn" style="padding-left: 10px"><button type="button" class="btn btn-default" ng-click="deleteGroupPrice('+s+')">删除</button></div></div></div></div>',$(".user-group-price-content").append(a(r)(e))},e.getuserGroupsLi=function(t){var a="";for(key in e.userGroups)a+='<li><a href="" ng-click="changeGroup('+t+', $event)" data-title="'+e.userGroups[key].name+'" data-id="'+e.userGroups[key].id+'">'+e.userGroups[key].name+"</a></li>";return a},e.getUnitName=function(){switch(e.unit){case"day":return"日";case"month":return"月";case"year":return"年"}},e.deleteGroupPrice=function(e){$(".user-group-price-content .form-group-"+e).remove()},e.changeUnit=function(t){e.unit=t,$('[name="unit"]').val(t),e.unitTitle=e.getUnitName()},e.addSlide=function(){require(["fileUploader"],function(t){t.init(function(t){e.slideLists.push(t.url),e.$apply(e.slideLists)},{direct:!0,multiple:!1,uniacid:-1})})},e.delSlide=function(t){e.slideLists.splice(t,1)},e.goodsInfo){if(e.unit=e.goodsInfo.unit,7!=e.goodsInfo.type&&8!=e.goodsInfo.type||(e.num=e.goodsInfo.account_num||e.goodsInfo.account_num),e.slideLists=e.goodsInfo.slide,$("#description").html(e.goodsInfo.description),e.goodsInfo.user_group_price){console.log(e.goodsInfo.user_group_price);for(id in e.goodsInfo.user_group_price)e.addGroupPrice(id,e.goodsInfo.user_group_price[id].group_name,e.goodsInfo.user_group_price[id].price)}}else e.unit="month";e.unitTitle=e.getUnitName()}]),angular.module("storeApp").controller("storePaySettingCtrl",["$scope","$http","config",function(e,t,a){e.alipay=a.alipay}]),angular.module("storeApp").controller("storeOrdersCtrl",["$scope","$http","config",function(e,t,a){e.orderList=a.orderList,e.role=a.role,e.links=a.links,e.newPrice=[],e.showChangePriceModal=function(t){$("#change-price").modal("show");var t=parseInt(t);e.newPrice.orderid=t},e.changePrice=function(){t.post(a.links.changePrice,{id:e.newPrice.orderid,price:e.newPrice.price}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})}}]),angular.module("storeApp").controller("goodsBuyerCtrl",["$scope","$http","config",function(e,t,a){e.duration=1,e.unit=a.unit,e.expiretime=a.expiretime,e.singlePrice=a.singlePrice,e.price=a.singlePrice,e.account_list=a.account_list,e.wxapp=a.wxapp,e.wxapp_account_list=a.wxapp_account_list,e.uniacid=a.first_uniacid,e.goods=a.goods,e.pay_way_list=a.pay_way,e.packages=a.packages,0==e.pay_way_list.length?e.pay_way="":e.pay_way=e.pay_way_list.alipay?"alipay":"wechat",e.changePayWay=function(t){e.pay_way=t},e.changeDuration=function(t){e.duration=t},e.submit_order=function(n){if(e.duration<=0)return util.message("购买时长不合法,请重新填写!"),!1;var i={uniacid:e.uniacid,price:a.singlePrice,goodsid:e.goods.id,duration:e.duration,type:e.pay_way,wxapp:e.wxapp};t.post("./index.php?c=site&a=entry&m=store&do=goodsbuyer&operate=submit_order&direct=1",i).success(function(e){if(0!=e.message.errno)return util.message(e.message.message),!1;location.href="./index.php?c=site&a=entry&m=store&do=goodsbuyer&operate=pay_order&direct=1&orderid="+e.message.message,location.href="order"==n?"./index.php?c=site&a=entry&m=store&do=orders&direct=1":"./index.php?c=site&a=entry&m=store&do=goodsbuyer&operate=pay_order&direct=1&orderid="+e.message.message})},e.changeExpire=function(a,n){a=""==a||void 0==a?e.duration:a,n=""==n||void 0==n?e.uniacid:n,t.post("./index.php?c=site&a=entry&operate=change_order_expire&direct=1&do=changeorderexpire&m=store",{duration:a,unit:e.unit,uniacid:n,goodsid:e.goods.id}).success(function(t){0==t.message.errno&&(e.expiretime=t.message.message,e.price=100*e.singlePrice*a/100)})},e.$watch("duration",function(e,t,a){a.changeExpire(e,"")}),e.$watch("uniacid",function(e,t,a){a.changeExpire("",e)})}]),angular.module("storeApp").controller("storePermissionCtrl",["$scope","$http","config",function(e,t,a){e.blacklist=a.blacklist,e.whitelist=a.whitelist,e.permissionStatus=a.permissionStatus,e.addUsername="",e.changeType=function(t){"close"!=t||e.permissionStatus.close?e.type=t:confirm("确定要关闭权限设置吗?如若这样做,所有系统用户都可访问商城!")&&(e.type=t,e.changeStatus())},e.changeStatus=function(){t.post(a.links.changeStatus,{type:e.type}).success(function(t){console.log(t),0==t.message.errno?"close"==e.type?(e.permissionStatus.close=!0,util.message(t.message.message)):util.message(t.message.message,t.redirect,"success"):util.message(t.message.message)})},e.addUser=function(){t.post(a.links.addUser,{type:e.type,username:e.addUsername}).success(function(t){e.addUsername="",0==t.message.errno?util.message(t.message.message,t.redirect,"success"):util.message(t.message.message)})},e.deleteUser=function(n){t.post(a.links.deleteUser,{type:e.type,username:n}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.changeType(a.type)}]),angular.module("systemApp",["we7app"]),angular.module("systemApp").controller("UpdateCacheCtrl",["$scope","$http",function(e,t){e.updateCache=function(){t({method:"POST",url:"./index.php?c=system&a=updatecache",data:{submit:"submit"},beforeSend:function(){$(".loader").show()},complete:function(){$(".loader").hide()}}).success(function(e){0==e.message.errno&&util.message(e.message.message)})}}]),angular.module("systemApp").controller("MenuCtrl",["$scope","$http",function(e,t){e.subItemGroup={},e.displayStatus={},e.mainMenu={permission:"",displayorder:0},e.editItemPanel=function(t){t&&(e.activeItem={},e.activeItem=t,$(".js-edit-panel").modal())},e.editMainMenu=function(t,a){e.mainMenu.displayorder=t,e.mainMenu.permission=a,$("#editorder").modal("show")},e.saveorder=function(){t.post("./index.php?c=system&a=menu&do=change_displayorder",e.mainMenu).success(function(e){0==e.message.errno?($("#editorder").modal("hide"),util.message("操作成功",e.redirect,"ajax")):util.message("操作失败","","info")})},e.editItem=function(){t.post("./index.php?c=system&a=menu&do=post",e.activeItem).success(function(t){t.message.errno?util.message(t.message.message):(e.activeItem.isNew&&e.subItemGroup[e.activeItem.group].push(e.activeItem),util.message(t.message.message,t.redirect,"ajax"),$(".js-edit-panel").modal("hide"))})},e.addSubItem=function(t,a){e.subItemGroup[t]||(e.subItemGroup[t]=[]);var a={title:a.title,url:a.url,permissionName:a.permissionName,icon:a.icon,displayorder:a.displayorder,isDisplay:a.isDisplay,isSystem:!1,group:t,isNew:!0};e.editItemPanel(a)},e.selectMenuIcon=function(){util.iconBrowser(function(t){e.activeItem.icon=t,e.$apply("activeItem")})},e.removeSubItem=function(a,n){a&&confirm("确认删除此菜单?")&&(void 0===n?t.post("./index.php?c=system&a=menu&do=delete",{permission_name:a}).success(function(e){e.message.errno?util.message(e.message.message):util.message(e.message.message,"refresh")}):e.subItemGroup[a].splice(n,1))},e.changeDisplay=function(a){1==e.displayStatus[a]?status=0:status=1,t.post("./index.php?c=system&a=menu&do=display_status",{status:status,permission_name:a}).success(function(t){e.displayStatus[a]=!!parseInt(status)})}}]),angular.module("systemApp").controller("WelcomeCtrl",["$scope","$http","config",function(e,t,a){e.loaderror=0,e.ads=null,e.account_uninstall_modules_nums=0,e.wxapp_uninstall_modules_nums=0,e.account_modules_total=0,e.wxapp_modules_total=0,e.not_installed_module=[],e.not_installed_show=0,e.get_module_statistics=function(){t({url:a.moduleStatisticsUrl,method:"POST",data:{},beforeSend:function(){},complete:function(){}}).success(function(t){0==t.message.errno&&(e.module_statistics=t.message.message)})},e.upgrade_module_nums=[],e.upgrade_module_nums.account_upgrade_module_nums=0,e.upgrade_module_nums.wxapp_upgrade_module_nums=0,e.upgrade_module_list=[],e.upgrade_modules=[],e.get_upgrade_modules=function(){t({url:a.upgradeModulesUrl,method:"POST",data:{},beforeSend:function(){},complete:function(){}}).success(function(t){0==t.message.errno&&(e.upgrade_module_list=t.message.message,e.upgrade_module_list&&(e.upgrade_modules=e.upgrade_module_list,e.upgrade_modules_show=1))})},e.searchType=function(t){e.upgrade_modules=[],"all"==t?e.upgrade_modules=e.upgrade_module_list:"has_new_version"==t?angular.forEach(e.upgrade_module_list,function(t){1==t.has_new_version&&e.upgrade_modules.push(t)}):"has_new_branch"==t&&angular.forEach(e.upgrade_module_list,function(t){1==t.has_new_branch&&e.upgrade_modules.push(t)})},e.upgrade_show=0,e.get_system_upgrade=function(){t({url:a.systemUpgradeUrl,method:"POST",data:{},beforeSend:function(){},complete:function(){util.loaded()}}).success(function(t){if(0==t.message.errno){var a=t.message.message;e.upgrade=a,(a.file_nums>0||a.database_nums>0||a.script_nums>0)&&(e.upgrade_show=1)}})},e.get_ads=function(){t.post("./index.php?c=home&a=welcome&do=get_ads").success(function(t){0==t.message.errno?(e.ads=t.message.message.we7_index_ads,e.getCookie("closed_system_ads")==angular.toJson(e.ads)&&(e.ads=null)):(e.ads=null,e.loaderror=1)})},e.close_ads=function(){e.setCookie("closed_system_ads",angular.toJson(e.ads),365),e.ads=null},e.setCookie=function(e,t,a){var n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3);var i="expires="+n.toGMTString();document.cookie=e+"="+t+"; "+i},e.getCookie=function(e){for(var t=e+"=",a=document.cookie.split(";"),n=0;n<a.length;n++){var i=a[n].trim();if(0==i.indexOf(t))return i.substring(t.length,i.length)}return""},e.get_not_installed_module=function(){t.post("./index.php?c=home&a=welcome&do=get_not_installed_modules").success(function(t){0==t.message.errno&&(e.not_installed_module=t.message.message,e.not_installed_module&&(e.not_installed_show=1))})},e.ignoreUpdate=function(n){t.post(a.ignoreUpdateUrl,{name:n}).success(function(t){0==t.message.errno&&(e.upgrade_module_list[n].is_ignore=1)})},e.get_module_statistics(),e.get_upgrade_modules(),e.get_system_upgrade(),e.get_not_installed_module(),e.get_ads()}]),angular.module("systemApp").controller("ipWhiteListCtrl",["$scope","$http","config",function(e,t,a){e.lists=a.lists,e.links=a.links,e.ips="",e.changeStatus=function(a){t.post(e.links.change_status,{ip:a}).success(function(e){0==e.message.errno?location.reload():util.message(e.message.message,e.redirect,"ajax")})},e.saveIp=function(){$("#myModalIp").modal("hide"),t.post(e.links.add_link_ips,{ips:e.ips}).success(function(e){0!=e.message.errno?util.message(e.message.message):util.message("添加成功",e.redirect,"ajax")})}}]),angular.module("systemApp").controller("sensitiveWord",["$scope","$http","config",function(e,t,a){e.lists=a.lists,e.links=a.links,e.word="",e.saveWords=function(){$("#myModalSensitive").modal("hide"),t.post(e.links.add_word_link,{word:e.word}).success(function(e){0!=e.message.errno?util.message(e.message.message):util.message("添加成功",e.redirect,"ajax")})},e.del=function(a){t.post(e.links.del_word_link,{word:a}).success(function(e){0!=e.message.errno?util.message(e.message.message):util.message("删除成功",e.redirect,"ajax")})}}]),angular.module("systemApp").controller("SystemThirdpartyLogin",["$scope","$http","serviceCommon","config",function(e,t,a,n){e.thirdlogin=n.thirdlogin,e.links=n.links,e.siteroot=n.siteroot,e.url=n.url,e.newappid="",e.newappsecret="",e.httpChange=function(a,n){switch(a){case"authstate":t.post(e.links.save_setting,{authstate:"authstate",type:n}).success(function(e){0==e.message.errno?util.message("修改成功",e.redirect):util.message("修改失败,请稍后重试!")});break;case"appid":$("#AppID").modal("hide"),t.post(e.links.save_setting,{appid:e.newappid,type:n}).success(function(e){0==e.message.errno?util.message("修改成功",e.redirect):util.message("修改失败,请稍后重试!")});break;case"appsecret":$("#AppSecret").modal("hide"),t.post(e.links.save_setting,{appsecret:e.newappsecret,type:n}).success(function(e){0==e.message.errno?util.message("修改成功",e.redirect):util.message("修改失败,请稍后重试!")})}},e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10;margin-top:10px"><i class="fa fa-check-circle"></i> 复制成功</span>');a.copySuccess(e,t)}}]),angular.module("systemApp").controller("systemOauthCtrl",["$scope","$http","config",function(e,t,a){e.oauthHost=a.oauthHost,e.originalHost=a.oauthHost,e.oauthAccount=a.oauthAccount,e.oauthtitle=a.oauthAccounts[a.oauthAccount],e.links=a.links,e.saveOauth=function(){t.post(e.links.oauth_link,{account:e.oauthAccount,host:e.oauthHost}).success(function(t){0!=t.message.errno?util.message(t.message.message):(e.originalHost=e.oauthHost,util.message("成功",t.redirect,"ajax"))})}}]),angular.module("systemApp").controller("SmsSignCtrl",["$scope","$http","config",function(e,t,a){e.all_signatures=a.all_signatures,e.site_sms_sign=a.site_sms_sign,e.links=a.links,e.saveSms=function(a){t.post(e.links.site_sms_sign_link,{register:e.site_sms_sign.register,find_password:e.site_sms_sign.find_password,user_expire:e.site_sms_sign.user_expire}).success(function(e){0!=e.message.errno?util.message(e.message.message,e.redirect,"error"):util.message("设置成功",e.redirect,"success")})}}]),angular.module("systemApp").controller("systemInfoCtrl",["$scope","$http","config",function(e,t,a){e.content="查看",e.attachSize=function(){-1!=e.content.indexOf("查看")&&(e.content="请稍候...",t.get(a.get_attach_size_url).success(function(t){t.message.message.attach_size?e.content=t.message.message.attach_size:e.content=0}))}}]),angular.module("systemApp").service("serviceCommon",["$rootScope",function(e){var t={};return t.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},t}]),angular.module("userCardApp",["wapeditorApp"]).controller("MainCtrl",["$scope","widget","config","serviceBase","serviceUserCardBase","serviceSubmit","serviceCommon","$sanitize",function(e,t,a,n,i,s,o,r){e.modules=[],e.editors=[],e.activeModules=n.initActiveModules(a.activeModules),e.activeItem={},e.activeIndex=0,e.index=a.activeModules?a.activeModules.length:0,e.submit={params:{},html:""},e.newcard=a.newcard,e.fansFields=a.fansFields,e.$on("serviceBase.editors.update",function(t,a){e.editors=a}),e.$on("serviceBase.activeItem.update",function(t,a){e.activeItem=a}),e.$on("serviceBase.activeModules.update",function(t,a){e.activeModules=a}),e.addItem=function(e){n.addItem(e)},e.editItem=function(e){i.editItem(e)},e.deleteItem=function(e){n.deleteItem(e)},e.init=function(t,a){if(e.modules=n.setModules(t,a),e.activeModules.length>0){var i=[];angular.forEach(e.activeModules,function(e,t){e&&i.push(e.id)})}angular.forEach(e.modules,function(e,t){e.defaultshow&&-1==$.inArray(e.id,i)&&n.addItem(e.id)})},e.url=function(e){return o.url(e)},e.tomedia=function(e){return o.tomedia(e)},e.submit=function(t){e.submit=s.submit(),e.$apply("submit"),$(t.target).parents("form").submit()},e.addFields=function(){i.addFields()},e.removeFields=function(e){i.removeFields(e)},e.addNums=function(){i.addNums()},e.removeNums=function(e){i.removeNums(e)},e.addRecharges=function(){i.addRecharges()},e.removeRecharges=function(e){i.removeRecharges(e)},e.addTimes=function(){i.addTimes()},e.removeTimes=function(e){i.removeTimes(e)},e.selectCoupon=function(){i.selectCoupon()},e.clearCoupon=function(){i.clearCoupon()},e.addThumb=function(e){i.addThumb(e)},e.addBgThumb=function(){i.addBgThumb()},$(".single-submit").on("click",function(t){e.submit(t)}),e.init(null,["cardBasic","cardActivity","cardNums","cardTimes","cardRecharge"]),e.activeModules[1].params.discounts=a.discounts,e.editItem(0)}]),angular.module("userCardApp").service("serviceUserCardBase",["$rootScope","serviceBase",function(e,t){var a={};return a.triggerActiveItem=function(e){$(".app-side .editor").css("marginTop","0"),t.triggerActiveItem(e)},a.editItem=function(e){var a=t.getBaseData("activeModules");"string"==typeof e&&angular.forEach(a,function(t){t.id==e&&(e=t.index)}),t.editItem(e)},a.addFields=function(){var a=t.getBaseData("activeItem");a.params.fields.push({title:"",require:1,bind:"",issystem:0}),t.setBaseData("activeItem",a),e.$broadcast("serviceBase.activeItem.update",a)},a.removeFields=function(a){if("mobile"==a.bind||"realname"==a.bind)return!1;var n=t.getBaseData("activeItem");n.params.fields=_.without(n.params.fields,a),t.setBaseData("activeItem",n),e.$broadcast("serviceBase.activeItem.update",n)},a.addNums=function(){t.getBaseData("activeItem").params.nums.push({recharge:"",num:""})},a.removeNums=function(a){var n=t.getBaseData("activeItem");n.params.nums=_.without(n.params.nums,a),t.setBaseData("activeItem",n),e.$broadcast("serviceBase.activeItem.update",n)},a.addRecharges=function(){var a=t.getBaseData("activeItem");a.params.recharges.push({condition:"",back:"",backtype:"0",backunit:"元"}),t.setBaseData("activeItem",a),e.$broadcast("serviceBase.activeItem.update",a)},a.removeRecharges=function(a){var n=t.getBaseData("activeItem");n.params.recharges=_.without(n.params.recharges,a),t.setBaseData("activeItem",n),e.$broadcast("serviceBase.activeItem.update",n)},a.addTimes=function(){var a=t.getBaseData("activeItem");a.params.times.push({recharge:"",time:""}),t.setBaseData("activeItem",a),e.$broadcast("serviceBase.activeItem.update",a)},a.removeTimes=function(a){var n=t.getBaseData("activeItem");n.params.times=_.without(n.params.times,a),t.setBaseData("activeItem",n),e.$broadcast("serviceBase.activeItem.update",n)},a.selectCoupon=function(){var a=t.getBaseData("activeItem");util.coupon(function(n){a.params.grant.coupon=[],angular.forEach(n,function(e){a.params.grant.coupon.push({couponTitle:e.title,coupon:e.id})}),t.setBaseData("activeItem",a),e.$apply(),e.$broadcast("serviceBase.activeItem.update",a)},{multiple:!0})},a.clearCoupon=function(){var a=t.getBaseData("activeItem");a.params.grant.coupon=[],t.setBaseData("activeItem",a),e.$broadcast("serviceBase.activeItem.update",a)},a.addThumb=function(a){var n=t.getBaseData("activeItem");require(["fileUploader"],function(i){i.show(function(i){n.params[a]=i.url,t.setBaseData("activeItem",n),e.$apply(),e.$broadcast("serviceBase.activeItem.update",n)},{direct:!0,multiple:!1})})},a.addBgThumb=function(){var a=t.getBaseData("activeItem");require(["fileUploader"],function(n){n.show(function(n){a.params.background.image=n.url,t.setBaseData("activeItem",a),e.$apply(),e.$broadcast("serviceBase.activeItem.update",a)},{direct:!0,multiple:!1})})},a}]),angular.module("userCardApp").controller("CardActivityCtrl",["$scope",function(e){e.$watch("activeItem.params.grant_rate",function(t,a){(t+="").match(/^([1-9]\d*(\.(\d)?)?|0(\.(\d)?)?)?$/)?e.activeItem.params.grant_rate=t:e.activeItem.params.grant_rate=a})}]),angular.module("userCardApp").controller("CardBasicCtrl",["$scope","config",function(e,t){e.creditnames=t.creditnames,e.siteroot=t.siteroot,e.recharge_src=e.siteroot+"/app/Common/resource/images/sum-recharge.png",e.scanpay_src=e.siteroot+"/app/Common/resource/images/scan-pay.png"}]),angular.module("userCardApp").controller("CardNumsCtrl",["$scope",function(e){}]),angular.module("userCardApp").controller("CardRechargeCtrl",["$scope",function(e){require(["bootstrap"],function(e){e(".dropdown-toggle").dropdown()})}]),angular.module("userCardApp").controller("CardTimesCtrl",["$scope",function(e){}]),angular.module("userCenterApp",["wapeditorApp"]),angular.module("userCenterApp").controller("MainCtrl",["$scope","$timeout","widget","config","serviceCommon","serviceSetStyle","serviceBase","serviceUcSubmit","serviceUpwardCompatible",function(e,t,a,n,i,s,o,r,l){e.modules=[],e.editors=[],e.activeModules=n.activeModules?n.activeModules:[],e.activeMenus=n.activeMenus?n.activeMenus:[],e.submit={params:{},html:""},e.isNew=!0,e.siteroot=n.siteroot,e.logo_url=e.siteroot+"/app/Common/resource/images/heading.jpg",_.isEmpty(e.activeModules)||1==e.activeModules[0].params.isnew||(e.isNew=!1),e.siteEntrance=n.links.murl,e.activeItem={},e.activeIndex=0,e.index=e.activeModules.length?e.activeModules.length:0,o.setBaseData("index",e.index),o.setBaseData("activeModules",e.activeModules),e.pageLength=!_.isEmpty(e.activeModules)&&e.activeModules[0].params.pageLength?e.activeModules[0].params.pageLength:1,e.isLongPage=!0,e.pageLengths={1:1,2:2,3:3,4:4,5:5},e.lineHeights={1:1,1.25:1.25,1.5:1.5,2:2,2.5:2.5},e.fontSizes={12:12,14:14,16:16,18:18,20:20,22:22,24:24,26:26,28:28,30:30,32:32,34:34,36:36,38:38,40:40},e.isNew||(e.activeModules=l.compatibility(e.activeModules),e.activeModules[0].params.isnew=1,void 0===e.activeModules[0].params.pageLength&&(e.activeModules[0].params.pageLength=Math.ceil(($(".modules").height()+520)/568)),e.activeModules[0].params.pageLength>1&&(e.pageLength=e.activeModules[0].params.pageLength,o.setBaseData("pageLength",e.pageLength),t(function(){$(".app-content").css("height",568*e.pageLength+"px")},100)),t(function(){var t=0,a=height="";$(".modules>div").each(function(){var n=parseInt($(this).attr("index"));if(a=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("width"),height=$(this).find("div.ng-scope[ng-controller$='Ctrl']").css("height"),n>0){for(var i in e.activeModules)e.activeModules[i].index==n&&(t+=parseInt(e.activeModules[i].marginTop),e.activeModules[i].params.positionStyle.width=parseInt(a),e.activeModules[i].params.positionStyle.height=parseInt(height),e.activeModules[i].params.positionStyle.top=t,e.activeModules[i].positionStyle="position:absolute;width:"+a+";height:"+height+";left:"+e.activeModules[i].params.positionStyle.left+"px;top:"+t+"px;",$(this).find("div[ng-controller]").attr("style",e.activeModules[i].positionStyle));t+=parseInt(height)}i++}),o.setBaseData("activeModules",e.activeModules)},1e3));for(var c in e.activeModules)e.activeModules[c].originParams=angular.copy(e.activeModules[c].params);e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');i.copySuccess(e,t)},e.$on("serviceBase.editors.update",function(t,a){e.editors=a}),e.$on("serviceBase.activeItem.update",function(t,a){e.activeItem=a}),e.$on("serviceBase.activeModules.update",function(t,a){e.activeModules=a}),e.$on("serviceBase.activeItem.params.update",function(t,a){e.activeItem.params=a}),e.$on("serviceBase.activeItem.animationName.update",function(t,a){e.activeItem.params.animationStyle.animationName=a}),e.$on("serviceBase.activeItem.style.update",function(t,a,n,i,s){e.activeItem.params[a]=n,e.activeItem[a]=i,void 0!==s&&(e.activeItem.transform=s)}),e.$on("updateScope",function(t,a){angular.forEach(a,function(t,a){e[a]=t})}),e.addItem=function(e){o.addItem(e,"uc")},e.editItem=function(e){o.editItem(e)},e.deleteItem=function(e){o.deleteItem(e)},e.submit=function(t){e.submit=r.submit(),e.$apply("submit"),$(t.target).parents("form").submit()},e.init=function(t,a){if(e.modules=o.setModules(t,a),e.activeModules.length>0){var n=[];angular.forEach(e.activeModules,function(e,t){e&&n.push(e.id)})}angular.forEach(e.modules,function(e,t){e.defaultshow&&-1==$.inArray(e.id,n)&&o.addItem(e.id)})},e.setModulePositionStyle=function(e){s.setModulePositionStyle(e)},e.eleAnimationIns=function(e){s.eleAnimationIns(e)},e.savePagePosition=function(){s.savePagePosition(e.activeModules)},e.saveModulePosition=function(){s.saveModulePosition(e.activeItem)},e.changeTextAlign=function(t){s.changeTextAlign(e.activeItem,t)},e.changeBorderWidth=function(){s.changeBorderWidth(e.activeItem)},e.changeInnerHeight=function(){s.changeInnerHeight(e.activeItem)},e.changePageLength=function(t){if(angular.isString(t))if("minus"==t&&e.pageLength>1)t=e.pageLength-1;else{if(!("plus"==t&&e.pageLength<5))return!1;t=e.pageLength+1}var a=s.changePageLength(t,e.activeModules);o.setBaseData({pageLength:parseInt(t),activeModules:a})},e.clearModuleStyle=function(){s.clearModuleStyle(e.activeItem)},e.addThumb=function(t){require(["fileUploader"],function(a){a.show(function(a){e.activeItem.params[t]=a.url,e.$apply("activeItem")},{direct:!0,multiple:!1})})},e.showIconBrowser=function(t){util.iconBrowser(function(a){t.css.icon.icon=a,e.$apply("activeMenus")})},e.addMenu=function(){e.activeMenus.push({icon:"",css:{icon:{icon:"fa fa-external-link"}},name:"",url:""})},e.removeMenu=function(t){e.activeMenus=_.without(e.activeMenus,t)},$(".single-submit").on("click",function(t){e.submit(t)}),e.init(null,["UCheader"]),e.changePageLength(e.pageLength),e.editItem(0),e.$watch("activeItem.params.baseStyle",function(e){e&&s.setModuleBaseStyle(e)},!0),e.$watch("activeItem.params.borderStyle",function(e){e&&s.setModuleBorderStyle(e)},!0),e.$watch("activeItem.params.shadowStyle",function(e){e&&s.setModuleShadowStyle(e)},!0),e.$watch("activeItem.params.animationStyle",function(e){e&&s.setModuleAnimationStyle(e)},!0),e.$watch("activeItem.params.positionStyle",function(e){e&&s.setModulePositionStyle(e)},!0)}]),angular.module("userCenterApp").service("serviceUcSubmit",["serviceBase","serviceCommon",function(e,t){var a={};return a.submit=function(){var a="",n={params:{},html:""},i=$($(".modules").html()),s=e.getBaseData("activeModules"),o=$(".app-usercenter").height(),r=$(".app-content").height()-o+"px";i.find("div.ng-scope[ng-controller$='Ctrl']").each(function(){var e=_.findIndex(s,{index:parseInt($(this).parent().parent().attr("index"))}),n="",i=angular.copy(s[e].params);$(this).find(".js-default-content").remove();var o=$(this).parent().parent().attr("name").toLowerCase(),r=$(this).css("top"),l=$(this).css("left"),c=$(this).css("width"),u=$(this).css("height"),d="position:absolute;top:"+r+";left:"+l+";width:"+c+";height:"+u+";";switch(s[e].params.positionStyle.top=parseInt(r),s[e].params.positionStyle.left=parseInt(l),s[e].params.positionStyle.width=parseInt(c),s[e].params.positionStyle.height=parseInt(u),s[e].positionStyle=d,o){case"link":var p=this;angular.forEach(i.items,function(e,a){(e.selectCate.pid||e.selectCate.cid)&&$(p).find(".list-group").children().eq(a).replaceWith("<div>"+t.buildDataTagBegin("link",e)+'<div class="list-group-item ng-scope"><a href="{$row[url]}" class="clearfix"><span class="app-nav-title"> {$row[title]}<i class="pull-right fa fa-angle-right"></i></span></a></div>'+t.buildDataTagEnd()+"</div>")});break;case"richtext":s[e]&&(s[e].params.content="")}if(n=$(this).html(),"header"!=o){d=$(this).attr("style");a+='<div type="'+o+'" style="'+d+'">'+n+"</div>"}e++});var l=s[0].params.bgColor?s[0].params.bgColor:"";return a='<div class="js-design-page" style="background-color:'+l+";height:"+r+';position:absolute;">'+a+"</div>",a=a.replace(/<\!\-\-([^-]*?)\-\->/g,""),a=a.replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g,""),a=a.replace(/ ng\-[a-zA-Z]+/g,""),n.html=a,n.params=angular.copy(s),t.stripHaskey(n.params),n},a}]),angular.module("userGroup",["we7app"]),angular.module("userGroup").controller("UserGroupDisplay",["$scope","config",function(e,t){e.lists=t.lists,e.links=t.links,e.editGroup=function(t){var t=parseInt(t);location.href=e.links.groupPost+"id="+t},e.delGroup=function(t){var t=parseInt(t);location.href=e.links.groupDel+"id="+t}}]),angular.module("userGroup").controller("UserGroupPost",["$scope","$compile","config",function(e,t,a){e.groupInfo=a.groupInfo,e.packages=a.packages,e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"},null==e.groupInfo&&(e.groupInfo={check_all:!1}),e.hideCheckAll=!1,e.searchKeywords="";var n=a.pagesize,i=Math.ceil(a.packages.length/n);if(e.checkedGroup=[],e.groupInfo.check_all)e.checkedGroup=angular.copy(a.packages),e.checkedGroup.unshift({id:"-1",name:"所有服务"});else if(a.checkedGroup.length>0)for(var s in a.checkedGroup)e.checkedGroup.push(a.checkedGroup[s]);e.setChecked=function(){var t=[];angular.forEach(e.checkedGroup,function(e){t.push(e.id)}),-1!=$.inArray("-1",t)?angular.forEach(e.packages,function(t,a){e.packages[a].checked=!0}):angular.forEach(e.packages,function(a,n){-1==$.inArray(a.id,t)?e.packages[n].checked=!1:e.packages[n].checked=!0})},e.removeCheckedGroupItem=function(t){angular.forEach(e.checkedGroup,function(a,n){a.id==t&&e.checkedGroup.splice(n,1),1*t==-1&&(e.groupInfo.check_all=!1,e.checkedGroup=[])}),e.setChecked()},e.pushCheckedGroupItem=function(t,a){if(a.target.checked){var n=!1;angular.forEach(e.checkedGroup,function(e,a){e.id==t.id&&(n=!0)}),n||(e.checkedGroup.push(t),e.setChecked())}else 1*e.checkedGroup[0].id==-1?(e.checkedGroup=[],e.groupInfo.check_all=!1,e.setChecked()):e.removeCheckedGroupItem(t.id)},e.checkAllGroup=function(t){t.target.checked?(e.checkedGroup=angular.copy(a.packages),e.checkedGroup.unshift({id:"-1",name:"所有服务"}),e.groupInfo.check_all=!0):(e.checkedGroup=[],e.groupInfo.check_all=!1),e.setChecked()},e.setPackagesData=function(t){var i=-1,s=(t-1)*n;e.packages=[];var o=0;for(id in a.packages)e.searchKeywords&&a.packages[id].name.indexOf(e.searchKeywords)<=-1||(o+=1);for(id in a.packages)if(!(e.searchKeywords&&a.packages[id].name.indexOf(e.searchKeywords)<=-1||++i<s)){if(i>=s+n)break;e.packages.push(a.packages[id])}return e.setChecked(),Math.ceil(o/n)},e.loadMore=function(a,n,s){if(1==(n*=1)&&""==e.searchKeywords?e.hideCheckAll=!1:e.hideCheckAll=!0,(i=e.setPackagesData(n))<n)return!1;var o=Math.max(1,n-4),r=Math.min(i,n+4);r-o<9&&(r=Math.min(i,o+8),o=Math.max(1,r-8));for(var l="<li>"+$(".js-pager li:first").html()+"</li>",c=o;c<=r;c++)l+='<li><a href="javascript:;" page="'+c+'" ng-click="loadMore(\''+a+"',"+c+')">'+c+"</a></li>";n!=i&&(l+='<li><a href="javascript:;" page="'+i+'" ng-click="loadMore(\''+a+"',"+i+')">尾页</a></li>'),$(".js-pager ul").html(t(l)(e)),$(".js-pager li").attr("class",""),$(".js-pager a[page='"+n+"']").parent().attr("class","active"),$(".js-pager .pager-nav").parent().attr("class","")},e.loadMore("",1)}]),angular.module("userGroup").controller("ViceGroupDisplay",["$scope","config",function(e,t){e.lists=t.lists,e.links=t.links,e.editGroup=function(t){var t=parseInt(t);location.href=e.links.groupPost+"id="+t},e.delGroup=function(t){var t=parseInt(t);location.href=e.links.groupDel+"id="+t}}]),angular.module("userGroup").controller("ViceGroupPost",["$scope","config",function(e,t){e.groupInfo=t.groupInfo,e.packages=t.packages,e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"}}]),angular.module("userManageApp",["we7app"]),angular.module("userManageApp").controller("UserEditModules",["$scope","$http","$compile","config",function(e,t,a,n){e.user=n.user,e.profile=n.profile,e.group_info=n.group_info,e.groups=n.groups,e.links=n.links,e.extend=n.extend,e.changeGroup=e.user.groupid,e.jurindex="account",e.allmodule=!1,e.user_modules=n.user_modules,n.user_modules&&(e.modules=n.user_modules.account||n.user_modules.wxapp||n.user_modules.webapp||n.user_modules.phoneapp||n.user_modules.xzapp),e.source_templates=n.source_templates,e.templates=n.source_templates,e.recycleUser=function(){t.post(n.links.recycleUser,{uid:e.user.uid}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})},e.httpChange=function(a){t.post(e.links.editGroup+"uid="+e.user.uid,{type:a,groupid:e.changeGroup,founder_groupid:e.user.founder_groupid}).success(function(t){0==t.message.errno?(e.group_info=t.message.message,util.message("修改成功!")):util.message(t.message.message)})},e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"},e.tabChange=function(t){e.jurindex=t,e.modules=n.user_modules[t],e.loadMore(1)},e.loadMore=function(t){if("template"==e.jurindex)i=Math.ceil(e.source_templates.length/18);else var i=Math.ceil(n.user_modules[e.jurindex].length/18);if(i<t)return!1;if(e.changePage(t,18),i<2)return $(".js-pager ul").html(""),!1;t*=1;var s=Math.max(1,t-4),o=Math.min(i,t+4);o-s<9&&(o=Math.min(i,s+8),s=Math.max(1,o-8));var r="";1!=t&&(r='<li><a href="javascript:;" page="1" ng-click="loadMore(1)">首页</a></li>');for(var l=s;l<=o;l++)r+='<li><a href="javascript:;" page="'+l+'" ng-click="loadMore(\''+l+"')\">"+l+"</a></li>";t!=i&&(r+='<li><a href="javascript:;" page="'+i+'" ng-click="loadMore(\''+i+"')\">尾页</a></li>"),$(".js-pager ul").html(a(r)(e)),$(".js-pager li").attr("class",""),$(".js-pager a[page='"+t+"']").parent().attr("class","active"),$(".js-pager .pager-nav").parent().attr("class","")},e.changePage=function(t,a){var n=-1,i=(t-1)*a;if("template"==e.jurindex){e.templates=[];for(index in e.source_templates)if(!(++n<i)){if(n>=i+a)break;e.templates.push(e.source_templates[index])}}else{e.modules=[];for(index in e.user_modules[e.jurindex])if(!(++n<i)){if(n>=i+a)break;e.modules.push(e.user_modules[e.jurindex][index])}}return!1},e.allmodulechange=function(t){if("template"==e.jurindex){a="#content-templates";angular.forEach(e.source_templates,function(t,a){e.source_templates[a].checked=e.allmodule})}else{var a="#content-modules";angular.forEach(e.user_modules[e.jurindex],function(t,a){e.user_modules[e.jurindex][a].checked=e.allmodule})}t?$("#jurisdiction-add "+a+" .item").addClass("active"):$("#jurisdiction-add "+a+" .item").removeClass("active")},e.itemclick=function(t){"template"==e.jurindex?angular.forEach(e.source_templates,function(a,n){a.id==t&&(e.source_templates[n].checked=!e.source_templates[n].checked)}):angular.forEach(e.user_modules[e.jurindex],function(a,n){e.user_modules[e.jurindex][n].name==t&&(e.user_modules[e.jurindex][n].checked=!e.user_modules[e.jurindex][n].checked)})},e.addExtend=function(){var a=[];angular.forEach(e.source_templates,function(e,t){1!=e.checked&&1!=e.checked||a.push(e.id)});var i={modules:[],wxapp:[],webapp:[],xzapp:[],phoneapp:[]};angular.forEach(e.user_modules,function(e,t){e.length>0&&("account"==t&&(t="modules"),angular.forEach(e,function(e,a){!e.name||1!=e.checked&&1!=e.checked||i[t].push(e.name)}))}),$("#jurisdiction-add").modal("hide"),t.post(n.links.editUsersPermission,{type:"extend",module:i,tpl:a,uid:e.user.uid}).success(function(e){0==e.message.errno?location.reload(!0):util.message("参数错误!")})},e.loadMore(1)}]),angular.module("userManageApp").controller("UserEditModulesTpl",["$scope","$http","config",function(e,t,a){function n(){var t="#content-templates";0==e.jurindex&&(t="#content-modules"),$("#jurisdiction-add "+t+" .item").size()!=$("#jurisdiction-add "+t+" .item.active").size()?e.allmodule=!1:e.allmodule=!0}e.user=a.user,e.profile=a.profile,e.group_info=a.group_info,e.groups=a.groups,e.links=a.links,e.extend=a.extend,e.changeGroup=e.user.groupid,e.jurindex=0,e.allmodule=!1,e.httpChange=function(a){t.post(e.links.editGroup+"uid="+e.user.uid,{type:a,groupid:e.changeGroup,founder_groupid:e.user.founder_groupid}).success(function(t){0==t.message.errno?(e.group_info=t.message.message,util.message("修改成功!")):util.message(t.message.message)})},e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"},e.tabChange=function(t){e.jurindex=t,n()},e.allmodulechange=function(t){var a="#content-templates";0==e.jurindex&&(a="#content-modules"),t?$("#jurisdiction-add "+a+" .item").addClass("active"):$("#jurisdiction-add "+a+" .item").removeClass("active")},e.addExtend=function(){var n="",i="",s=[],o=[];$("#jurisdiction-add #content-modules").find(".active").each(function(){n+='<div class="col-sm-3 text-left we7-margin-bottom"><a href="javascript:;" class="label label-info">'+$(this).attr("data-title")+"</a></div>",s.push($(this).attr("data-name"))}),$("#jurisdiction-add #content-templates").find(".active").each(function(){i+='<div class="col-sm-3 text-left we7-margin-bottom"><a href="javascript:;" class="label label-info">'+$(this).attr("data-title")+"</a></div>",o.push($(this).attr("data-id"))}),n||i?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").append(n),$(".account-package-extra .js-extra-templates").append(i),$("#jurisdiction-add").modal("hide"),t.post(a.links.editUsersPermission,{type:"extend",module:s,tpl:o,uid:e.user.uid}).success(function(e){0==e.message.errno?location.reload():util.message("参数错误!")})}}]),angular.module("userManageApp").controller("UserEditAccount",["$scope","$http","config",function(e,t,a){e.user=a.user,e.wechats=a.wechats,e.wxapps=a.wxapps,e.webapps=a.webapps,e.phoneapps=a.phoneapps,e.xzapps=a.xzapps,e.profile=a.profile,e.recycleUser=function(){t.post(a.links.recycleUser,{uid:e.user.uid}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})}}]),angular.module("userManageApp").controller("UserCreate",["$scope","config","UserManageCommon",function(e,t,a){e.groups=t.groups,e.user={username:"",password:"",repassword:"",groupid:0,remark:""},e.changeType=function(e){var t=$(e)[0].target;$(t).attr("type","password")},e.checkSubmit=function(e){return""==$.trim($("#username").val())?(e.preventDefault(),util.message("请输入用户名.","","error"),!1):""==$("#password").val()?(e.preventDefault(),util.message("没有输入密码.","","error"),!1):$("#password").val().length<8?(e.preventDefault(),util.message("密码长度不能小于8个字符.","","error"),!1):$("#password").val()==$("#repassword").val()||(e.preventDefault(),util.message("两次输入的密码不一致.","","error"),!1)},e.addPermission=a.addPermission}]),angular.module("userManageApp").controller("UsersDisplay",["$scope","$http","config",function(e,t,a){e.type=a.type,e.users=a.users,e.usergroups=a.usergroups,e.links=a.links,e.operate=function(a,n){t.post(e.links.link,{uid:a,type:n}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})}}]),angular.module("userManageApp").controller("FieldsDisplay",["$scope","config",function(e,t){e.fields=t.fields,e.links=t.links}]),angular.module("userManageApp").controller("FieldsPost",["$scope","config",function(e,t){e.item=t.item,null==e.item?(e.available=!0,e.required=!0,e.unchangeable=!0,e.showinregister=!0):(1==e.item.available?e.available=!0:e.available=!1,1==e.item.required?e.required=!0:e.required=!1,1==e.item.unchangeable?e.unchangeable=!0:e.unchangeable=!1,1==e.item.showinregister?e.showinregister=!0:e.showinregister=!1),e.verifyField=function(){var e=$('input[name="field"]');field_value=e.val(),reg=/^[A-Za-z0-9_]*$/,reg.test(field_value)||(util.message("请使用字母或数字或下划线组合字段名!"),e.val(""))}}]),angular.module("userManageApp").controller("RegistersetCtrl",["$scope","config",function(e,t){e.settings=t.settings,e.groups=t.groups}]),angular.module("userManageApp").controller("UserAssignPermissionsCtrl",["$scope","config",function(e,t){e.user=t.user,e.profile=t.profile}]),angular.module("userManageApp").controller("UsersFindMobilePwd",["$scope","$http","config","$interval",function(e,t,a,n){e.links=a.links,e.code="",e.password="",e.repassword="",e.mobile="",e.find_password_sign=a.find_password_sign,e.expire=120,e.text="免费获取验证码",e.isDisable=!1,e.sendMessage=function(){if(""==e.mobile)return util.message("手机号不能为空"),!1;t.post(e.links.valid_mobile_link,{receiver:e.mobile}).success(function(a){0!=a.message.errno?util.message(a.message.message):t.post(e.links.send_code_link,{receiver:e.mobile,custom_sign:e.find_password_sign}).success(function(t){if(console.log(t),0==t.message.errno){util.message("发送验证码成功","","success");var a=n(function(){e.isDisable=!0,e.expire--,e.text=e.expire+"秒后重新获取",e.expire<=0&&(n.cancel(a),e.isDisable=!1,e.text="重新点击获取验证码",e.expire=120)},1e3)}else util.message(t.message.message,"","error")})})},e.validCode=function(){""==e.mobile&&util.message("手机号不能为空"),""==e.code&&util.message("短信验证码不能为空"),t.post(e.links.valid_code_link,{receiver:e.mobile,code:e.code}).success(function(e){0==e.message.errno?($(".step-2").removeClass("hide"),$(".step-1").hide(),$(".step-set-pwd").addClass("steps-status-finish")):util.message(e.message.message,"","error")})},e.changePassword=function(){return""==e.password?($(".password").html("密码不能为空"),!1):""==e.repassword?($(".repassword").html("密码不能为空"),!1):e.password!=e.repassword?($(".repassword").html("两次输入的密码不一致"),!1):void t.post(e.links.set_password_link,{password:e.password,repassword:e.repassword,receiver:e.mobile}).success(function(e){if(0==e.message.errno)$(".step-3").removeClass("hide"),$(".step-2").hide(),$(".step-pwd-success").addClass("steps-status-finish");else{if(-2==e.message.errno)return $(".password").html(e.message.message),!1;util.message(e.message.message)}})}}]),angular.module("userManageApp").controller("UserExpireCtrl",["$scope","$http","config",function(e,t,a){e.user_expire=a.user_expire,e.links=a.links,e.saveExpire=function(){t.post(e.links.user_expire_link,{day:e.user_expire.day}).success(function(e){0!=e.message.errno?util.message(e.message.message,e.redirect,"error"):util.message("设置成功",e.redirect,"success")})},e.httpChange=function(){t.post(e.links.user_expire_status_link,{}).success(function(e){0==e.message.errno?util.message("修改成功",e.redirect):util.message("修改失败,请稍后重试!")})}}]),angular.module("userManageApp").controller("UsersRegisterMobile",["$scope","$http","config","$interval",function(e,t,a,n){e.showImageCode=!1,e.links=a.links,e.smscode="",e.password="",e.repassword="",e.image=a.image,e.verify="",e.mobile="",e.owner_uid=a.owner_uid,e.register_type=a.register_type,e.register_sign=a.register_sign,e.expire=120,e.text="发送验证码",e.isDisable=!1,e.mobleInvalid=!0,e.smscodeInvalid=!0,e.imageInvalid=!0,e.passwordInvalid=!0,e.repasswordInvalid=!0,e.sendMessage=function(){t.post(e.links.send_code_link,{receiver:e.mobile,custom_sign:e.register_sign,imagecode:e.imagecode}).success(function(t){if(0==t.message.errno){util.message("发送验证码成功","","success");var a=n(function(){e.isDisable=!0,e.expire--,e.text=e.expire+"秒后重新获取",e.expire<=0&&(n.cancel(a),e.isDisable=!1,e.text="重新点击获取验证码",e.expire=120)},1e3)}else{if(-3==t.message.errno)return e.imagecodeErr=!0,$("#imageCode").modal(),!1;e.changeVerify(),util.message(t.message.message,"","error")}})},e.changeVerify=function(){return e.image=e.links.img_verify_link+"r="+Math.round((new Date).getTime()),!1},e.checkMobile=function(){var a=e.mobile;t.post(e.links.valid_mobile_link,{mobile:a}).success(function(t){0!=t.message.errno?(e.mobileErr=!0,e.mobileMsg=t.message.message):(e.mobileErr=!1,e.mobleInvalid=!1)})},e.checkImagecode=function(){""==e.imagecode||void 0==e.imagecode?(e.imagecodeErr=!0,e.imagecodeMsg="请输入验证码"):t.post(a.links.check_code_link,{code:e.imagecode}).success(function(t){0!=t.message.errno?(e.imagecodeErr=!0,e.imagecodeMsg="请输入正确的验证码",e.changeVerify()):(e.imagecodeErr=!1,e.imageInvalid=!1)})},e.checkPassword=function(){if(""==e.password||void 0==e.password)e.passwordErr=!0,e.passwordMsg="请输入密码";else if(e.password.length<8)e.passwordErr=!0,e.passwordMsg="密码长度不能少于8";else if(1==a.password_safe){var n=/(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,30}/;t.post(a.links.check_password_link,{password:e.password}).success(function(t){0==n.test(e.password)?(e.passwordErr=!0,e.passwordMsg=t.message.message):(e.passwordErr=!1,e.passwordInvalid=!1)})}else e.passwordErr=!1,e.passwordInvalid=!1},e.checkRepassword=function(){""==e.repassword||void 0==e.repassword?(e.repasswordErr=!0,e.repasswordMsg="确认密码不能为空"):e.repassword!=e.password?(e.repasswordErr=!0,e.repasswordMsg="两次密码输入不一致"):(e.repasswordErr=!1,e.repasswordInvalid=!1)},e.register=function(){t.post(e.links.register_link,{password:e.password,mobile:e.mobile,register_type:e.register_type,code:e.imagecode,smscode:e.smscode,owner_uid:e.owner_uid}).success(function(t){e.imagecode="",0==t.message.errno?util.message(t.message.message,t.redirect,"success"):util.message(t.message.message)})}}]),angular.module("userManageApp").controller("UserRegisterSystem",["$scope","$http","config",function(e,t,a){function n(t,a,n,i,s){return""==t||void 0==t?(e.extendfields[a].fieldErr=!0,e.extendfields[a].fieldMsg=n):s.test(t)?e.extendfields[a].fieldErr=!1:(e.extendfields[a].fieldErr=!0,e.extendfields[a].fieldMsg=i),e.extendfields[a].fieldErr}e.image=a.image,e.usernameInvalid=!0,e.passwordInvalid=!0,e.repasswordInvalid=!0,e.codeInvalid=!0,e.checkUsername=function(){""==e.username||void 0==e.username?(e.usernameErr=!0,e.usernameMsg="请输入用户名"):t.post(a.links.check_username_link,{username:e.username,owner_uid:e.owner_uid,password:e.password}).success(function(t){0!=t.message.errno?(e.usernameErr=!0,e.usernameMsg="非常抱歉,此用户名已经被注册,你需要更换注册名称!"):(e.usernameErr=!1,e.usernameInvalid=!1)})},e.checkPassword=function(){""==e.password||void 0==e.password?(e.passwordErr=!0,e.passwordMsg="请输入密码"):e.password.length<8?(e.passwordErr=!0,e.passwordMsg="密码长度不能少于8"):1==a.password_safe?t.post(a.links.check_password_link,{password:e.password}).success(function(t){0!=t.message.errno?(e.passwordErr=!0,e.passwordMsg=t.message.message):(e.passwordErr=!1,e.passwordInvalid=!1)}):(e.passwordErr=!1,e.passwordInvalid=!1)},e.checkRepassword=function(){e.repassword!=e.password?(e.repasswordErr=!0,e.repasswordMsg="两次密码输入不一致"):(e.repasswordErr=!1,e.repasswordInvalid=!1)},e.changeVerify=function(){return e.image=a.links.img_verify_link+"r="+Math.round((new Date).getTime()),!1},e.checkCode=function(){""==e.code||void 0==e.code?(e.codeErr=!0,e.codeMsg="请输入验证码"):t.post(a.links.check_code_link,{code:e.code}).success(function(t){0!=t.message.errno?(e.codeErr=!0,e.codeMsg="请输入正确的验证码",e.changeVerify()):(e.codeErr=!1,e.codeInvalid=!1)})},e.checkExtendfield=function(t){var a=document.getElementsByName(t)[0].value;switch(t){case"realname":var i=/^.{2,5}$/,s="请输入用户名",o="请输入您的真实姓名";checkRes=n(a,t,s,o,i);break;case"nickname":var i=/^.{3,30}$/,s="请输入昵称",o="昵称格式为 3-30 位字符";checkRes=n(a,t,s,o,i);break;case"qq":if(""==a||void 0==a)e.extendfields[t].fieldErr=!0,e.extendfields[t].fieldMsg="请输入QQ";else{var i=/^[1-9][0-9]{4,9}$/,s="请输入QQ号码",o="请输入正确的QQ号码";checkRes=n(a,t,s,o,i)}}}}]),angular.module("userManageApp").service("UserManageCommon",["$rootScope","$http","config",function(e,t,a){var n={};return n.addPermission=function(){var e="",t="";$("#jurisdiction-add #content-modules").find(".btn-primary").each(function(){e+='<span class="label label-info" style="margin-right:3px;">'+$(this).attr("data-title")+'</span><input type="hidden" name="extra[modules][]" value="'+$(this).attr("data-name")+'" />'}),$("#jurisdiction-add #content-templates").find(".btn-primary").each(function(){t+='<span class="label label-info" style="margin-right:3px;">'+$(this).attr("data-title")+'</span><input type="hidden" name="extra[templates][]" value="'+$(this).attr("data-name")+'" />'}),e||t?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").html(e),$(".account-package-extra .js-extra-templates").html(t),$("#jurisdiction-add").modal("hide")},n}]),angular.module("userProfile",["we7app"]),angular.module("userProfile").controller("UserProfileDisplay",["$scope","$window","$http","config",function(e,t,a,n){e.user=n.user,e.profile=n.profile,e.extra_fields=n.extra_fields,e.account_num=n.account_num,null==e.profile&&(e.profile={avatar:"",realname:"",births:"",address:"",resides:""}),e.links=n.links,e.group_info=n.group_info,e.groups=n.groups,e.changeGroup=e.user.groupid,e.wechats=n.wechats,e.wxapps=n.wxapps,e.recycleUser=function(){a.post(n.links.recycleUser,{uid:e.user.uid}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})},e.changeAvatar=function(){require(["fileUploader"],function(t){t.init(function(t){e.profile.avatar=t.url,e.$apply(e.profile),e.httpChange("avatar")},{direct:!0,multiple:!1,uniacid:0})})},$(".js-clip").each(function(){util.clip(this,$(this).attr("data-url"))}),e.editInfo=function(t,a){e.userOriginal={},e.userOriginal[t]=a},e.httpChange=function(n){switch(n){case"avatar":a.post(e.links.userPost,{type:n,avatar:e.profile.avatar,uid:e.user.uid}).success(function(e){0==e.message.errno?util.message("修改成功!"):(-1==e.message.errno&&util.message(e.message.message),1==e.message.errno&&util.message(e.message.message),40035==e.message.errno&&util.message(e.message.message))});break;case"username":$(".modal").modal("hide"),a.post(e.links.userPost,{type:n,username:e.userOriginal[n],uid:e.user.uid}).success(function(t){0==t.message.errno?(e.user[n]=e.userOriginal[n],util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message),1==t.message.errno&&util.message(t.message.message),2==t.message.errno&&util.message(t.message.message),40035==t.message.errno&&util.message(t.message.message))});break;case"vice_founder_name":$(".modal").modal("hide"),a.post(e.links.userPost,{type:n,vice_founder_name:e.userOriginal[n],uid:e.user.uid}).success(function(t){if(0!=t.message.errno)return util.message(t.message.message),!1;e.user[n]=e.userOriginal[n],util.message("修改成功!")});break;case"qq":$(".modal").modal("hide"),a.post(e.links.userPost,{type:n,qq:e.userOriginal[n],uid:e.user.uid}).success(function(t){if(0!=t.message.errno)return util.message(t.message.message),!1;e.profile[n]=e.userOriginal[n],util.message("修改成功!")});break;case"remark":$(".modal").modal("hide"),a.post(e.links.userPost,{type:n,remark:e.userOriginal[n],uid:e.user.uid}).success(function(t){if(0!=t.message.errno)return util.message(t.message.message),!1;e.user[n]=e.userOriginal[n],util.message("修改成功!")});break;case"welcome_link":$(".modal").modal("hide"),a.post(e.links.userPost,{type:n,welcome_link:e.user.welcome_link,uid:e.user.uid}).success(function(e){if(0!=e.message.errno)return util.message(e.message.message),!1;util.message("修改成功!")});break;case"mobile":$(".modal").modal("hide"),a.post(e.links.userPost,{type:n,mobile:e.userOriginal[n],uid:e.user.uid}).success(function(t){if(0!=t.message.errno)return util.message(t.message.message),!1;e.profile[n]=e.userOriginal[n],util.message("修改成功!")});break;case"password":if($(".modal").modal("hide"),0==t.sysinfo.isfounder&&0==e.user.register_type){var i=$(".old-password").val();if(_.isEmpty(i))return util.message("原密码不可为空!"),!1}var s=$(".new-password").val(),o=$(".renew-password").val();if(_.isEmpty(s))return util.message("新密码不可为空!"),!1;if(_.isEmpty(o))return util.message("确认新密码不可为空!"),!1;if(s!=o)return util.message("两次密码不一致!"),!1;a.post(e.links.userPost,{type:n,oldpwd:i,newpwd:s,renewpwd:o,uid:e.user.uid}).success(function(e){0==e.message.errno?util.message("密码修改成功!"):(-1==e.message.errno&&util.message("抱歉,用户不存在或是已经被删除!"),1==e.message.errno&&util.message("密码修改失败,请稍后重试!"),2==e.message.errno&&util.message("两次密码不一致!"),3==e.message.errno&&util.message("原密码不正确!"),4==e.message.errno&&util.message(e.message.message),40035==e.message.errno&&util.message("不合法的参数!"))});break;case"endtime":$(".modal").modal("hide");var r=e.user.endtype,l=$(':text[name="endtime"]').val();a.post(e.links.userPost,{type:n,endtype:r,endtime:l,uid:e.user.uid}).success(function(t){0==t.message.errno?(e.user.endtype=r,e.user.end=1==r?"永久":l,util.message("到期时间修改成功!")):(-1==t.message.errno&&util.message(t.message.message),1==t.message.errno&&util.message(t.message.message),40035==t.message.errno&&util.message(t.message.message))});break;case"realname":if($(".modal").modal("hide"),_.isEmpty(e.userOriginal.realname))return util.message("真实姓名不可为空!"),!1;a.post(e.links.userPost,{type:n,realname:e.userOriginal.realname,uid:e.user.uid}).success(function(t){0==t.message.errno?(e.profile.realname=e.userOriginal.realname,util.message("真实姓名修改成功!")):(-1==t.message.errno&&util.message(t.message.message),1==t.message.errno&&util.message(t.message.message),40035==t.message.errno&&util.message(t.message.message))});break;case"birth":$(".modal").modal("hide");var c=$(".tpl-year").val(),u=$(".tpl-month").val(),d=$(".tpl-day").val();a.post(e.links.userPost,{type:n,year:c,month:u,day:d,uid:e.user.uid}).success(function(t){0==t.message.errno?(e.profile.births=c+"年"+u+"月"+d+"日",util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message),1==t.message.errno&&util.message(t.message.message),40035==t.message.errno&&util.message(t.message.message))});break;case"address":if($(".modal").modal("hide"),_.isEmpty(e.userOriginal.address))return util.message("邮寄地址不可为空!"),!1;a.post(e.links.userPost,{type:n,address:e.userOriginal.address,uid:e.user.uid}).success(function(t){0==t.message.errno?(e.profile.address=e.userOriginal.address,util.message("邮寄地址修改成功!")):(-1==t.message.errno&&util.message(t.message.message),1==t.message.errno&&util.message(t.message.message),40035==t.message.errno&&util.message(t.message.message))});break;case"reside":$(".modal").modal("hide");var p=$(".tpl-province").val(),m=$(".tpl-city").val(),g=$(".tpl-district").val();a.post(e.links.userPost,{type:n,province:p,city:m,district:g,uid:e.user.uid}).success(function(t){0==t.message.errno?(e.profile.resides=p+" "+m+" "+g,util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message),1==t.message.errno&&util.message(t.message.message),40035==t.message.errno&&util.message(t.message.message))})}},e.changeText=function(e){var t=$(e)[0].target.text;$(e)[0].target.text="展开"==t?"收起":"展开"}}]),angular.module("userProfile").controller("userBindCtrl",["$scope","$http","config","$interval",function(e,t,a,n){e.bindqq=a.bindqq,e.bindwechat=a.bindwechat,e.bindmobile=a.bindmobile,e.login_urls=a.login_urls,e.thirdlogin=a.thirdlogin,e.bind_sign=a.bind_sign,e.image=a.image,e.mobile="",e.password="",e.repassword="",e.links=a.links,e.imagecode="",e.smscode="",e.expire=120,e.text="发送验证码",e.isDisable=!1,e.sendMessage=function(a){if(""==e.mobile)return util.message("手机号不能为空"),!1;t.post(e.links.valid_mobile_link,{mobile:e.mobile,type:a}).success(function(a){0!=a.message.errno?util.message(a.message.message):t.post(e.links.send_code_link,{receiver:e.mobile,custom_sign:e.bind_sign}).success(function(t){if("success"==t||t.message.errno==0){util.message("发送验证码成功","","success");var a=n(function(){e.isDisable=!0,e.expire--,e.text=e.expire+"秒后重新获取",e.expire<=0&&(n.cancel(a),e.isDisable=!1,e.text="重新点击获取验证码",e.expire=120)},1e3)}else util.message("发送失败!","","error")})})},e.changeVerify=function(){return e.image=e.links.img_verify_link+"r="+Math.round((new Date).getTime()),!1},e.mobileBind=function(a,n){if(""==e.mobile)return util.message("手机号不能为空"),!1;if(""==e.imagecode)return util.message("图形验证码不能为空"),!1;if(""==e.smscode)return util.message("手机号验证码不能为空"),!1;if(null==e.bindmobile){if(""==e.password)return util.message("密码不能为空"),!1;if(""==e.repassword)return util.message("确认密码不能为空"),!1;if(e.password!=e.repassword)return util.message("两次输入的密码不一致"),!1}null==e.bindmobile?t.post(e.links.bind_mobile_link,{mobile:e.mobile,password:e.password,repassword:e.repassword,imagecode:e.imagecode,smscode:e.smscode,type:a}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)}):t.post(e.links.unbind_third_link,{mobile:e.mobile,password:e.password,repassword:e.repassword,imagecode:e.imagecode,smscode:e.smscode,type:a,bind_type:n}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.unbind=function(a){t.post(e.links.unbind_third_link,{bind_type:a}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})}}]),angular.module("webApp",["we7app"]),angular.module("webApp").controller("webappModuleLinkUniacidCtrl",["$scope","$http","config",function(e,t,a){e.modules=a.modules,e.module="",e.linkWxappAccounts="",e.linkAppAccounts="",e.selectedAccount="",e.tabChange=function(t){e.jurindex=t,1!=t||e.linkAppAccounts||e.searchLinkAccount(e.module,"app"),1==e.jurindex&&$("#account-wxapp .row").find(".item").removeClass("active"),0==e.jurindex&&$("#account-app .row").find(".item").removeClass("active"),e.selectedAccount=""},e.searchLinkAccount=function(n,i){e.module=n,$("#show-account").modal("show"),"wxapp"==i?(e.tabChange(0),e.loadingWxappData=!0):e.loadingAppData=!0,t.post(a.links.search_link_account,{module_name:n,type:"wxapp"==i?a.wxapp:a.app}).success(function(t){console.log(t),"wxapp"==i?(e.loadingWxappData=!1,e.linkWxappAccounts=t.message.message,e.linkAppAccounts=""):(e.loadingAppData=!1,e.linkAppAccounts=t.message.message),console.log(e.linkWxappAccounts)})},e.selectLinkAccount=function(t,a){$(a.target).parentsUntil(".col-sm-2").addClass("active"),$(a.target).parentsUntil(".col-sm-2").parent().siblings().find(".item").removeClass("active"),e.selectedAccount=t},e.module_unlink_uniacid=function(e){t.post(a.links.module_unlink_uniacid,{module_name:e}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})},e.moduleLinkUniacid=function(){$("#show-account").modal("hide"),t.post(a.links.module_link_uniacid,{module_name:e.module,submit:"yes",token:a.token,uniacid:e.selectedAccount.uniacid}).success(function(e){0==e.message.errno?util.message("关联成功","refresh","success"):util.message(e.message.message)}),e.module=""}}]),angular.module("webApp").controller("bindDomainCtrl",["$scope","$http","config",function(e,t,a){e.account=a.account,e.moduleList=a.modulelist,e.middleAccount={bind_domain:""},e.httpChange=function(){t.post(a.links.postDomain,{bind_domain:e.middleAccount.bind_domain,submit:!0,token:a.token}).success(function(e){0==e.message.errno?util.message("修改成功!",e.redirect,"success"):util.message(e.message.message)})},e.changeModule=function(){t.post(a.links.postModule,{module_name:e.selectedModule,token:a.token}).success(function(e){0==e.message.errno?util.message("修改成功!",e.redirect,"success"):util.message(e.message.message)}),$("#add_module").modal("hide")},e.cancelModule=function(){$("#add_module").modal("hide")},e.selectModule=function(t){angular.forEach(e.moduleList,function(a,n){e.moduleList[n].selected=t==n}),e.selectedModule=t}}]),angular.module("wxApp",["we7app"]),angular.module("wxApp").controller("MainCtrl",["$scope","$http","config",function(e,t,a){function n(){var a=[];angular.forEach(e.wxappinfo.choose.modules,function(e){a.push(e.name)}),a=a.join(","),t.post(s,{modules:a}).then(function(t){if("0"==t.data.message.errno){var a=t.data.message.message,n=[];angular.forEach(a,function(e){e.module=e.name;for(var t=0;t<e.bindings.length;t++)e.bindings[t].modulename=e.title,n.push(e.bindings[t])}),e.module_bindings=n,e.wxappinfo.choose.modules=a}})}e.module_bindings=[],e.create_type=a.create_type,e.wxappinfo={name:a.wxappinfo.name,version:"",choose:{modules:[],template:1},quickmenu:{show:!0,bottom:{bgcolor:"#bebebe",boundary:"#fff",selectedColor:"#0f0",color:"#428bca"},menus:[{name:"首页",defaultImage:"./Common/resource/images/bottom-default.png",selectedImage:"./Common/resource/images/bottom-default.png",module:{}},{name:"首页",defaultImage:"./Common/resource/images/bottom-default.png",selectedImage:"./Common/resource/images/bottom-default.png",module:{}}]},submit:"yes",token:a.token,uniacid:a.uniacid,modules:[]},e.apps=[],e.createStep=1,e.version=a.version,e.isMuti=2==a.create_type,e.mtype=0==a.create_type?"wxapp":"account",e.designMethod=a.designMethod,a.isedit&&(e.wxappinfo.choose.modules=a.wxappinfo.modules,e.wxappinfo.quickmenu=a.wxappinfo.quickmenu,e.wxappinfo.version=a.wxappinfo.version,e.wxappinfo.description=a.wxappinfo.description),e.uploadMultiImage=function(t){require(["fileUploader"],function(a){a.init(function(a){e.wxappinfo[t]=a.url,e.$apply(e.wxappinfo)},{direct:!0,multiple:!1})})},e.delMultiImage=function(t){e.wxappinfo[t]=""};var s=a.bindingsUrl;e.moduleEntries=[],e.prevStep=function(){e.createStep<=1?e.createStep=1:e.createStep-=1,3==e.createStep&&3==e.designMethod&&(e.isMuti||(e.createStep=1))},e.nextStep=function(){e.createStep>4?e.createStep=4:e.checkComplete()&&(e.createStep+=1),2==e.createStep&&3==e.designMethod&&(e.isMuti?(n(),e.createStep=3):e.createStep=4)},e.backToStep=function(t){var a=parseInt(t);a<e.createStep&&(a<=2&&(e.type=0),e.createStep=a)},e.selectType=function(t){e.type=parseInt(t),$(':hidden[name="type"]').val(t)},e.changeType=function(t){e.type=parseInt(t),$(':hidden[name="type"]').val(t)},e.searchTpl=function(){var e=$(':text[id="searchtpl"]').val();"默认模版".match(e)?($(':hidden[name="template"]').val(1),$(".select-tem-list > ul").show()):($(':hidden[name="template"]').val(""),$(".select-tem-list > ul").hide())},e.selectTpl=function(t){e.wxappinfo.choose.template=t},e.getModuleEntries=function(){if(0==e.moduleEntries.length&&e.wxappinfo.choose.modules)for(i in e.wxappinfo.choose.modules)if(e.wxappinfo.choose.modules[i].bindings)for(j in e.wxappinfo.choose.modules[i].bindings)e.moduleEntries.push({title:e.wxappinfo.choose.modules[i].bindings[j].title,url:e.wxappinfo.choose.modules[i].bindings[j].do,module:e.wxappinfo.choose.modules[i].title})},e.showMenu=function(){e.wxappinfo.quickmenu.show=!e.wxappinfo.quickmenu.show},e.addMenu=function(){if(e.wxappinfo.quickmenu.menus.length>=5)return!1;e.wxappinfo.quickmenu.menus.push({name:"首页",defaultImage:"./Common/resource/images/bottom-default.png",selectedImage:"./Common/resource/images/bottom-default.png",module:{}})},e.delMenu=function(t){e.wxappinfo.quickmenu.menus=_.without(e.wxappinfo.quickmenu.menus,e.wxappinfo.quickmenu.menus[t])},e.addDefaultImg=function(t){require(["fileUploader"],function(a){a.show(function(a){e.wxappinfo.quickmenu.menus[t].defaultImage=a.url,e.$apply(e.wxappinfo)},{direct:!0,multiple:!1})})},e.addSelectedImg=function(t){require(["fileUploader"],function(a){a.show(function(a){e.wxappinfo.quickmenu.menus[t].selectedImage=a.url,e.$apply(e.wxappinfo)},{direct:!0,multiple:!1})})},e.addModuleImage=function(t){require(["fileUploader"],function(a){a.show(function(a){t.newicon=a.url,e.$apply(e.wxappinfo)},{direct:!0,multiple:!1})})},e.checkComplete=function(){e.createStep;if(!e.wxappinfo.uniacid){if(!e.wxappinfo.name)return util.message("小程序名称不可为空!"),!1;if(!e.wxappinfo.account)return util.message("小程序账号不可为空!"),!1;if(!e.wxappinfo.original)return util.message("原始ID不可为空!"),!1;if(!e.wxappinfo.appid)return util.message("AppId不可为空!"),!1;if(!e.wxappinfo.appsecret)return util.message("AppSecret不可为空!"),!1}return e.wxappinfo.description?!(!e.wxappinfo.version||!/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(e.wxappinfo.version))||(util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"),!1):(util.message("请填写描述"),!1)},e.wxapp_module_select=function(t,a){angular.isArray(a)||(a=[a]),e.wxappinfo.choose.modules=a,angular.forEach(e.wxappinfo.choose.modules,function(e,t,a){e.module=e.name}),e.$apply()},e.package=function(n){return!(0==e.wxappinfo.choose.modules.length&&!confirm("添加模块应用后才可进行打包操作,是否继续仅保存?"))&&(t.post(a.wxappPostUrl,e.wxappinfo).success(function(e){e.message.errno?util.message(e.message.message,"","error"):util.message(e.message.message,e.redirect,"success")}),!1)},$("#resource_module").unbind("click").click(function(){require(["fileUploader"],function(t){t.show(function(t){e.wxapp_module_select("module",t)},{direct:!0,multiple:e.isMuti,isWechat:!1,type:"module",others:{user_module:2,mtype:e.mtype,cover:"account"==e.mtype}})})})}]),angular.module("wxApp").controller("WxappEditCtrl",["$scope","$http","config",function(e,t,a){e.uniacid=a.uniacid,e.multiid=a.multiid,e.success_url=a.success_url,e.account_list=[],e.current_module="",e.category={id:"",name:"",displayorder:"",linkurl:""},e.wxapp=a.wxapp,e.slideedit=function(t){e.wxapp="slideedit",e.slideid=t},e.navedit=function(t){e.wxapp="navedit",e.navid=t},e.recommendedit=function(t,a){e.wxapp="recommendedit",e.recommendid=t,e.recommendpid=a},e.showAccount=function(n){e.account_list="",t.post(a.links.accountList,{module:n}).success(function(t){e.account_list=t.message.message,e.current_module=n,console.dir(t)}),$("#show_account").modal("show")},e.selectAccount=function(e,n){var i=window.location.href;t.post(a.links.saveConnection,{module:e,uniacid:n}).success(function(t){0==t.message.errno?($(".js-connection-img-"+e).attr("src",t.message.message.thumb),$(".js-connection-name-"+e).text(t.message.message.name),util.message("修改成功",i,"success")):util.message(t.message.message,"","error"),$("#show_account").modal("hide")})},e.categoryedit=function(t,a){e.wxapp="categoryedit",e.categoryeditid=t,e.categoryparentid=a},e.get_categorys=function(){t.post(a.links.getCategorys,{uniacid:e.uniacid,multiid:e.multiid}).success(function(t){e.categorys=t.message.message})},e.get_categorys(),e.edit_category=function(){e.categorys.push({name:"",displayorder:"",linkurl:""})},e.del_category=function(n){void 0!=e.categorys[n].id?(t.post(a.links.delCategory,{id:e.categorys[n].id}).success(function(){}),e.get_categorys()):e.categorys.splice(n,1)},e.save_category=function(){if(e.name_exist=!1,angular.forEach(e.categorys,function(t){""==t.name&&(util.message("请填写类名"),e.name_exist=!0)}),1==e.name_exist)return!1;t.post(a.links.saveCategory,{post:e.categorys,uniacid:uniacid,multiid:a.multiid}).success(function(e){}),e.get_categorys(),$("#myModal").modal("hide")}}]),angular.module("wxApp").controller("AccountManageWxappCtrl",["$scope","$http","config",function(e,t,a){e.wxapp_version_lists=a.wxapp_version_lists,e.wxapp_modules=a.wxapp_modules,e.version_exist=a.version_exist,e.activeVersion={},e.modules=a.wxapp_modules,e.search={},e.searchModuleName=function(){if(e.search.moduleName){e.modules={};for(key in e.wxapp_modules)-1!=e.wxapp_modules[key].title.indexOf(e.search.moduleName)&&(e.modules[key]=e.wxapp_modules[key])}},e.showEditVersionInfoModal=function(t){$("#modal_edit_versioninfo").modal("show"),e.activeVersion=t||{},e.middleVersion=angular.copy(e.activeVersion),!_.isEmpty(e.activeVersion)&&_.isEmpty(e.activeVersion.modules)&&$(".wxapp-module-list .add").css("display","")},e.showEditModuleModal=function(){$("#modal_edit_module").modal("show"),e.newWxModule={}},e.selectedWxModule=function(t,a){var n=$(a.target).parents(".select-module-wxapp");n.find("span").removeClass("hide"),n.siblings().find("span").addClass("hide"),e.newWxModule=t},e.changeWxModules=function(){e.newWxModule||util.message("请选择一个应用模块!"),e.activeVersion.modules&&3!=e.activeVersion.design_method?_.indexOf(e.activeVersion.modules,e.newWxModule)>-1?util.message("该应用模块已存在!"):e.activeVersion.modules.push(e.newWxModule):(e.activeVersion.modules=[e.newWxModule],$(".wxapp-module-list .add").css("display","none")),$("#modal_edit_module").modal("hide")},e.editVersionInfo=function(){if(_.isEmpty(e.activeVersion.modules))return util.message("应用模块不可为空!"),!1;t.post(a.links.edit_version,{version_info:e.activeVersion}).success(function(e){$("#modal_edit_versioninfo").modal("hide"),0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.cancelVersionInfo=function(){e.middleVersion.modules?e.activeVersion.modules=e.middleVersion.modules:e.activeVersion.modules=[]},e.delWxappVersion=function(e){var e=parseInt(e);t.post(a.links.del_version,{versionid:e}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.delModule=function(t){var a=_.indexOf(e.activeVersion.modules,t);a>-1&&(e.activeVersion.modules=_.without(e.activeVersion.modules,e.activeVersion.modules[a])),_.isEmpty(e.activeVersion.modules)&&$(".wxapp-module-list .add").css("display","")}}]),angular.module("wxApp").controller("PaymentCtrl",["$scope","$http","config",function(e,t,a){e.config=a,e.paysetting=a.paysetting,e.saveEdit=function(a){if("wechat"==a){if(""==e.paysetting.wechat.mchid)return util.message("请填写商户号","","info"),!1;if(""==e.paysetting.wechat.signkey)return util.message("请填写支付秘钥","","info"),!1}t.post(e.config.saveurl,{type:a,param:e.paysetting[a]}).success(function(e){if(0!=e.message.errno)return util.message(e.message.message,"","info"),!1;$(".modal").modal("hide"),util.message(e.message.message,e.redirect,"success")})},$(".modal").on("hide.bs.modal",function(){t.post(e.config.get_setting_url,{}).success(function(t){e.paysetting=t.message.message})}),e.tokenGen=function(t){if(confirm("确定要修改密钥吗?")){for(var a="",n=0;n<32;n++)a+="abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32*Math.random())];"wechat.signkey"==t&&(e.paysetting.wechat.signkey=a)}}}]),angular.module("wxApp").controller("WxappWelcomeCtrl",["$scope","$http","config",function(e,t,a){e.notices=a.notices,e.loaderror=0,e.last_modules=null,e.get_last_modules=function(){t.post("./index.php?c=home&a=welcome&do=get_last_modules").success(function(t){if(0==t.message.errno){var a=[];angular.forEach(t.message.message,function(e,t){e.wxapp&&a.push(e)}),e.last_modules=a}else e.last_modules=null,e.loaderror=1})},e.get_last_modules()}]),angular.module("wxApp").controller("moduleLinkUniacidCtrl",["$scope","$http","config",function(e,t,a){e.versionInfo=a.version_info,e.module="",e.linkWebappAccounts="",e.linkAppAccounts="",e.linkWxappAccounts="",e.selectedAccount="",e.tabChange=function(t){e.jurindex=t,1!=t||e.linkAppAccounts?2!=t||e.linkAppAccounts||e.searchLinkAccount(e.module,"wxapp"):e.searchLinkAccount(e.module,"app"),2==e.jurindex?$("#account-wxapp .row").find(".item").removeClass("active"):1==e.jurindex?$("#account-app .row").find(".item").removeClass("active"):0==e.jurindex&&$("#account-webapp .row").find(".item").removeClass("active"),e.selectedAccount=""},e.searchLinkAccount=function(n,i){if(!i||!n)return!1;e.module=n,$("#show-account").modal("show"),"webapp"==i&&e.tabChange(0),e.loadingData=!0,t.post(a.links.search_link_account,{module_name:n,type:"webapp"==i?a.webapp:"wxapp"==i?a.wxapp:a.app}).success(function(t){e.loadingData=!1,"webapp"==i?(e.linkWebappAccounts=t.message.message,e.linkAppAccounts=""):"wxapp"==i?(e.linkWxappAccounts=t.message.message,e.linkAppAccounts=""):e.linkAppAccounts=t.message.message})},e.selectLinkAccount=function(t,a){$(a.target).parentsUntil(".col-sm-2").addClass("active"),$(a.target).parentsUntil(".col-sm-2").parent().siblings().find(".item").removeClass("active"),e.selectedAccount=t},e.module_unlink_uniacid=function(){t.post(a.links.module_unlink_uniacid,{version_id:e.versionInfo.id}).success(function(e){e.message.errno,util.message(e.message.message,e.redirect)})},e.moduleLinkUniacid=function(){$("#show-account").modal("hide"),t.post(a.links.module_link_uniacid,{module_name:e.module,submit:"yes",token:a.token,uniacid:e.selectedAccount.uniacid,version_id:e.versionInfo.id}).success(function(e){0==e.message.errno?util.message("关联成功","refresh","success"):util.message(e.message.message)}),e.module=""}}]),angular.module("wxApp").controller("WxappEntranceCtrl",["$scope","$http","serviceCommon","config",function(e,t,a,n){e.moduleList=n.moduleList,e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');a.copySuccess(e,t)}}]),angular.module("wxApp").controller("StatisticeCtrl",["$scope","$http","serviceCommon","config",function(e,t,a,n){require(["echarts"],function(a){var i=a.init(document.getElementById("chart-line"));option={tooltip:{trigger:"axis",axisPointer:{type:"line"}},grid:{left:"3%",right:"3%",bottom:"3%",containLabel:!0},xAxis:{data:[]},yAxis:{splitArea:{show:!0}},series:[{name:"数量",type:"line",smooth:!0,data:[]}]},i.showLoading(),e.dateRange={startDate:moment().format("YYYY-MM-DD"),endDate:moment().format("YYYY-MM-DD")},e.changeDivideType=function(t){e.visitDivideType=t,e.getVisitApi("week")},e.getVisitApi=function(a){e.timeType=a,t.post(n.links.visitApi,{divide_type:e.visitDivideType,time_type:a,daterange:e.dateRange}).success(function(e){console.log(e),i.hideLoading(),option.xAxis.data=e.message.message.data_x,option.series[0].data=e.message.message.data_y,i.setOption(option)})},e.visitDivideType="session_cnt",e.visitTimeType="week",e.getVisitApi(e.visitTimeType),e.$watch("dateRange",function(t,a){t&&t!=a&&(e.dateRange.startDate=moment(t.startDate).format("YYYY-MM-DD"),e.dateRange.endDate=moment(t.endDate).format("YYYY-MM-DD"),e.getVisitApi("daterange"))},!0)})}]),angular.module("wxApp").controller("MiniappManageCtrl",["$scope","$http","config",function(e,t,a){e.version_lists=a.version_lists,e.miniapp_modules=a.miniapp_modules,e.version_exist=a.version_exist,e.activeVersion={},e.modules=a.miniapp_modules,e.search={},e.searchModuleName=function(){if(e.search.moduleName){e.modules={};for(key in e.miniapp_modules)-1!=e.miniapp_modules[key].title.indexOf(e.search.moduleName)&&(e.modules[key]=e.miniapp_modules[key])}},e.showEditVersionInfoModal=function(t){$("#modal_edit_versioninfo").modal("show"),e.showadd=!1,e.activeVersion=t||{},e.middleVersion=angular.copy(e.activeVersion),!_.isEmpty(e.activeVersion)&&_.isEmpty(e.activeVersion.modules)&&(e.showadd=!0)},e.showEditModuleModal=function(){$("#modal_edit_module").modal("show"),e.newWxModule={}},e.selectedWxModule=function(t,a){var n=$(a.target).parents(".select-module-wxapp");n.find("span").removeClass("hide"),n.siblings().find("span").addClass("hide"),e.newWxModule=t},e.changeWxModules=function(){e.newWxModule||util.message("请选择一个应用模块!"),e.activeVersion.module={name:e.newWxModule.name,version:e.newWxModule.version,module_info:e.newWxModule},e.showadd=!1,$("#modal_edit_module").modal("hide")},e.editVersionInfo=function(){if(_.isEmpty(e.activeVersion.module))return util.message("应用模块不可为空!"),!1;t.post(a.links.edit_version,{version_id:e.activeVersion.id,name:e.activeVersion.module.name}).success(function(e){$("#modal_edit_versioninfo").modal("hide"),0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.cancelVersionInfo=function(){e.middleVersion.modules?e.activeVersion.modules=e.middleVersion.modules:e.activeVersion.modules=[]},e.delWxappVersion=function(e){var e=parseInt(e);t.post(a.links.del_version,{versionid:e}).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message)})},e.delModule=function(t){e.activeVersion.modules=[],e.showadd=!0}}]),angular.module("wxApp").controller("CreateMiniappCtrl",["$scope","$http","config",function(e,t,a){e.mtype="aliapp",e.miniapp={name:a.miniapp.name,version:"",choose_module:[],submit:"yes",token:a.token,uniacid:a.uniacid,modules:[],type:a.type},e.apps=[],e.createStep=1,e.version=a.version,e.newversion=a.uniacid>0,e.designMethod=a.designMethod;a.bindingsUrl;e.moduleEntries=[],e.uploadMultiImage=function(t){require(["fileUploader"],function(a){a.init(function(a){e.miniapp[t]=a.url,e.$apply(e.miniapp)},{direct:!0,multiple:!1})})},e.delMultiImage=function(t){e.miniapp[t]=""},e.prevStep=function(){e.createStep=1},e.nextStep=function(){e.checkComplete()&&(e.createStep=2)},e.checkComplete=function(){if(0==e.miniapp.uniacid){if(!e.miniapp.name)return util.message("支付宝小程序名称不可为空!"),!1;if(!e.miniapp.appid)return util.message("AppId不可为空!"),!1}return e.miniapp.description?!(!e.miniapp.version||!/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(e.miniapp.version))||(util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"),!1):(util.message("请填写描述"),!1)},e.package=function(n){return!(!e.miniapp.choose_module&&!confirm("添加模块应用后才可进行打包操作,是否继续仅保存?"))&&(t.post(a.postUrl,e.miniapp).success(function(e){0==e.message.errno?util.message(e.message.message,e.redirect,"success"):util.message(e.message.message,"","error")}),!1)},$("#resource_module").unbind("click").click(function(){require(["fileUploader"],function(t){t.show(function(t){e.miniapp.choose_module=t,e.$apply(e.miniapp.choose_module)},{direct:!0,multiple:e.isMuti,isWechat:!1,type:"module",others:{user_module:0,mtype:e.mtype,cover:"account"==e.mtype}})})})}]),angular.module("wxApp").directive("we7ChooseMore",["$http",function(e){return{restrict:"EA",templateUrl:"directive-selectmore-module-item.html",scope:{selectModules:"=we7Modules",selectSingle:"=we7ChooseSingle"},link:function(t){t.selectMore=function(){t.wxappModuleList&&0!=t.wxappModuleList.length?$("#modules-Modal").modal("show"):e({method:"POST",url:"./index.php?c=wxapp&a=post&do=get_wxapp_modules",cache:!0}).success(function(e,a){t.wxappModuleList=e.message.message,$("#modules-Modal").modal("show")})},t.selectModule=function(e){if(t.selectSingle)return t.selectModules=[],t.selectModules.push({title:e.title,module:e.name,icon:e.logo,version:e.version,bindings:e.bindings}),$("#modules-Modal").modal("hide"),$(".app-list .select-more").css("display","none"),!1;t.selectModules.push({title:e.title,module:e.name,icon:e.logo,version:e.version,bindings:e.bindings}),$("#modules-Modal").modal("hide")},t.delModule=function(e){_.indexOf(t.selectModules,e)>-1&&(t.selectModules=_.without(t.selectModules,e)),_.isEmpty(t.selectModules)&&$(".app-list .select-more").css("display","")}}}}]),angular.module("wxApp").service("serviceCommon",["$rootScope",function(e){var t={};return t.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},t}]),angular.module("xzApp",["we7app","infinite-scroll"]),angular.module("xzApp").controller("XzappPostStepOne",["$scope","config",function(e,t){}]),angular.module("xzApp").controller("XzappPostStepTwo",["$scope",function(e){e.account={},e.uploadMultiImage=function(t){require(["fileUploader"],function(a){a.init(function(a){e.account[t]=a.url,e.$apply(e.account)},{direct:!0,multiple:!1})})},e.delMultiImage=function(t){e.account[t]=""}}]),angular.module("xzApp").controller("XzappPostStepThree",["$scope","config","XzAppCommon",function(e,t,a){e.notify=t.notify,e.owner=t.owner,e.links=t.links,e.selectOwner=function(e){e.preventDefault(),a.selectOwner()},e.changeGroup=function(){if(!$('input[name="uid"]').val())return $("#groupid").val(0),util.message("请先选择管理员"),!1;a.update_package_list($("#groupid").find("option:selected").data("package"))},e.addPermission=a.addPermission}]),angular.module("xzApp").controller("XzappPostStepFour",["$scope","config",function(e,t){e.account=t.account,e.links=t.links,e.url=t.links.siteroot+"api.php?id="+e.account.acid,e.success=function(e){var e=parseInt(e),t=$('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');AccountAppCommon.copySuccess(e,t)}}]),angular.module("xzApp").controller("XzappManageBase",["$scope","$http","config","XzAppCommon",function(e,t,a,n){e.account=a.account,e.uniaccount=a.uniaccount,e.authstate=a.authstate,e.authurl=a.authurl,e.founder=a.founder,e.owner=a.owner,e.xzapp_normal=a.xzapp_normal,e.xzapp_auth=a.xzapp_auth,e.other={headimgsrc:a.headimgsrc,qrcodeimgsrc:a.qrcodeimgsrc,serviceUrl:a.links.siteroot+"api.php?id="+e.account.acid,siteurl:a.links.siteroot},e.changeImage=function(t,a){"headimgsrc"!=t&&"qrcodeimgsrc"!=t||require(["fileUploader"],function(n){n.init(function(a){e.other[t]=a.url,e.$apply(e.other),e.httpChange(t)},{direct:!0,multiple:!1,uniacid:a})})},e.success=function(e){var e=parseInt(e),t=$('<a href="javascript:;" class="btn btn-success btn-sm we7-margin-left-sm"><i class="fa fa-check-circle"></i> 复制成功</a>');n.copySuccess(e,t)},e.editInfo=function(t,a){e.middleAccount={},e.middleAccount[t]=a},e.httpChange=function(i,s){switch(i){case"headimgsrc":case"qrcodeimgsrc":t.post(a.links.basePost,{type:i,imgsrc:e.other[i]}).success(function(t){0==t.message.errno?($(".wechat-img").attr("src",e.other[i]),util.message("修改成功!","","success")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"name":case"account":case"original":case"level":case"key":case"secret":case"attachment_limit":if($("#"+i).modal("hide"),0==e.middleAccount[i].length&&"attachment_limit"!=i)return util.message("不可为空!","","error"),!1;t.post(a.links.basePost,{type:i,request_data:e.middleAccount[i]}).success(function(t){0==t.message.errno?(e.account[i]=e.middleAccount[i],util.message("修改成功!","","success")):(1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"jointype":if($("#jointype").modal("hide"),e.middleAccount.type==e.xzapp_normal&&t.post(a.links.basePost,{type:"jointype",request_data:e.xzapp_normal}).success(function(t){0==t.message.errno?(e.account[i]=e.middleAccount[i],e.account.type=1,util.message("修改成功!","","success")):(1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))}),e.middleAccount.type==e.xzapp_auth)return util.message("暂不支持授权接入!"),!1;break;case"token":if($("#token").modal("hide"),void 0===s){if(!confirm("确定要生成新的吗?"))return!1;var o=n.tokenGen()}else{if(0==(o=$("#newtoken").val()).length)return util.message("不可为空!"),!1;if(!(l=new RegExp(/^[A-Za-z0-9]{3,32}$/)).test(o))return util.message("必须为英文或者数字,长度为3到32个字符!"),!1}t.post(a.links.basePost,{type:i,request_data:o}).success(function(t){0==t.message.errno?(e.account[i]=o,util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"encodingaeskey":if($("#encodingaeskey").modal("hide"),void 0===s){if(!confirm("确定要生成新的吗?"))return!1;var r=n.encodingAESKeyGen()}else{if(0==(r=$("#newencodingaeskey").val()).length)return util.message("不可为空!"),!1;var l=new RegExp(/^[A-Za-z0-9]{43}$/);if(!l.test(r))return util.message("必须为英文或者数字,长度为43个字符!"),!1}t.post(a.links.basePost,{type:i,request_data:r}).success(function(t){0==t.message.errno?(e.account[i]=r,util.message("修改成功!")):(-1==t.message.errno&&util.message(t.message.message,t.redirect,"error"),1==t.message.errno&&util.message(t.message.message,"","error"),40035==t.message.errno&&util.message(t.message.message,"","error"))});break;case"highest_visit":"number"==typeof e.middleAccount.highest_visit&&t.post(a.links.basePost,{type:i,request_data:e.middleAccount.highest_visit}).success(function(t){0==t.message.errno?(e.account[i]=e.middleAccount.highest_visit,util.message("修改成功!")):util.message(t.message.message,"","error")});break;case"endtime":var c=$('[name="endtime"]').val();t.post(a.links.basePost,{type:"endtime",endtype:e.middleAccount.endtype,endtime:c}).success(function(t){1==t.message.errno?util.message(t.message.message,"","info"):(e.account.endtype=e.middleAccount.endtype,e.account.end=2==e.account.endtype?c:"永久",util.message("修改成功!"))})}}}]),angular.module("xzApp").service("XzAppCommon",["$rootScope","$http","config",function(e,t,a){var n={};return n.addPermission=function(){var e="",t="";$("#jurisdiction-add #content-modules").find(".btn-primary").each(function(){e+='<span class="label label-info" style="margin-right:3px;">'+$(this).attr("data-title")+'</span><input type="hidden" name="extra[modules][]" value="'+$(this).attr("data-name")+'" />'}),$("#jurisdiction-add #content-templates").find(".btn-primary").each(function(){t+='<span class="label label-info" style="margin-right:3px;">'+$(this).attr("data-title")+'</span><input type="hidden" name="extra[templates][]" value="'+$(this).attr("data-name")+'" />'}),e||t?$(".account-package-extra").show():$(".account-package-extra").hide(),$(".account-package-extra .js-extra-modules").html(e),$(".account-package-extra .js-extra-templates").html(t),$("#jurisdiction-add").modal("hide")},n.update_package_list=function(e){$('input[name="package[]"]').prop("checked",!1),$('input[name="package[]"]').prop("disabled",!1);for(i in e)$('input[name="package[]"][value="'+e[i]+'"]').prop("checked",!0),$('input[name="package[]"][value="'+e[i]+'"]').prop("disabled",!0)},n.selectOwner=function(){var e=[];require(["biz"],function(i){i.user.browser(e,function(e){t.post(a.links.userinfo,{uid:e}).success(function(e){e.message.errno&&util.message(e.message.message),$("#manager").val(e.message.message.uid),$("#showname").val(e.message.message.username),$("#groupid").val(e.message.message.group.id),$(".account-package-extra").show(),n.update_package_list(e.message.message.package)})},{mode:"invisible",direct:!0})})},n.copySuccess=function(e,t){var e=parseInt(e),t=t,a=$("#copy-"+e).next().html();(!a||a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>')<0)&&$("#copy-"+e).after(t),setTimeout(function(){t.remove()},2e3)},n.tokenGen=function(){for(var e="",t=0;t<32;t++)e+="abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32*Math.random())];return e},n.encodingAESKeyGen=function(){for(var e="",t=0;t<43;t++)e+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[parseInt(61*Math.random()+1)];return e},n}]);